@brucewaynedecoy/make-docs 2.0.3 → 2.0.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.
Files changed (46) hide show
  1. package/README.md +1 -1
  2. package/dist/{backup-GCM64IPN.js → backup-CM7RL2Q7.js} +5 -5
  3. package/dist/chunk-3EXHM5L2.js +1225 -0
  4. package/dist/chunk-3EXHM5L2.js.map +1 -0
  5. package/dist/{chunk-4LLSMDWJ.js → chunk-52FTNVXS.js} +242 -76
  6. package/dist/{chunk-4LLSMDWJ.js.map → chunk-52FTNVXS.js.map} +1 -1
  7. package/dist/{chunk-DNDM7DUQ.js → chunk-65QWMODG.js} +2 -2
  8. package/dist/{chunk-57GN6ALR.js → chunk-7R2PPKTB.js} +2 -2
  9. package/dist/{chunk-GPVKIBFC.js → chunk-ADVNSMA7.js} +3 -3
  10. package/dist/{chunk-2HNJCJJE.js → chunk-GERMRLJ2.js} +2 -2
  11. package/dist/{chunk-IHMZ2OCS.js → chunk-J5QDGRZ7.js} +3 -3
  12. package/dist/{chunk-O2UZ35PV.js → chunk-LV3CBXZB.js} +20 -20
  13. package/dist/{chunk-O2UZ35PV.js.map → chunk-LV3CBXZB.js.map} +1 -1
  14. package/dist/{chunk-DFQJENNL.js → chunk-M7DMFIKU.js} +2 -2
  15. package/dist/{chunk-C2IBRVUA.js → chunk-OR5ZVGLG.js} +6 -5
  16. package/dist/chunk-OR5ZVGLG.js.map +1 -0
  17. package/dist/{chunk-U25GFKNZ.js → chunk-YVSASZMT.js} +3 -3
  18. package/dist/chunk-YVSASZMT.js.map +1 -0
  19. package/dist/index.js +118 -110
  20. package/dist/index.js.map +1 -1
  21. package/dist/{self-UHPM4A2U.js → self-36ULRIJ6.js} +17 -17
  22. package/dist/{self-UHPM4A2U.js.map → self-36ULRIJ6.js.map} +1 -1
  23. package/dist/{server-N7XAAV3X.js → server-H754TA4Q.js} +9 -9
  24. package/dist/{setup-system-JUHGDZJW.js → setup-system-JI36YJ6D.js} +15 -15
  25. package/dist/{setup-system-JUHGDZJW.js.map → setup-system-JI36YJ6D.js.map} +1 -1
  26. package/dist/{skills-command-W3SE3OFP.js → skills-command-IGDVLNKY.js} +28 -28
  27. package/dist/{skills-command-W3SE3OFP.js.map → skills-command-IGDVLNKY.js.map} +1 -1
  28. package/dist/{uninstall-BGMJ6KCI.js → uninstall-VBGMQQLA.js} +8 -8
  29. package/dist/{virtual_make-docs-first-party-skills-VXSUUHTL.js → virtual_make-docs-first-party-skills-H3FC47C2.js} +2 -2
  30. package/dist/{virtual_make-docs-first-party-skills-VXSUUHTL.js.map → virtual_make-docs-first-party-skills-H3FC47C2.js.map} +1 -1
  31. package/package.json +4 -4
  32. package/template/.make-docs/system/contracts/output-contract.md +3 -1
  33. package/template/.make-docs/system/references/prd-change-management.md +14 -2
  34. package/dist/chunk-C2IBRVUA.js.map +0 -1
  35. package/dist/chunk-U25GFKNZ.js.map +0 -1
  36. package/dist/chunk-Z5K4FHYP.js +0 -922
  37. package/dist/chunk-Z5K4FHYP.js.map +0 -1
  38. /package/dist/{backup-GCM64IPN.js.map → backup-CM7RL2Q7.js.map} +0 -0
  39. /package/dist/{chunk-DNDM7DUQ.js.map → chunk-65QWMODG.js.map} +0 -0
  40. /package/dist/{chunk-57GN6ALR.js.map → chunk-7R2PPKTB.js.map} +0 -0
  41. /package/dist/{chunk-GPVKIBFC.js.map → chunk-ADVNSMA7.js.map} +0 -0
  42. /package/dist/{chunk-2HNJCJJE.js.map → chunk-GERMRLJ2.js.map} +0 -0
  43. /package/dist/{chunk-IHMZ2OCS.js.map → chunk-J5QDGRZ7.js.map} +0 -0
  44. /package/dist/{chunk-DFQJENNL.js.map → chunk-M7DMFIKU.js.map} +0 -0
  45. /package/dist/{server-N7XAAV3X.js.map → server-H754TA4Q.js.map} +0 -0
  46. /package/dist/{uninstall-BGMJ6KCI.js.map → uninstall-VBGMQQLA.js.map} +0 -0
@@ -1,922 +0,0 @@
1
- #!/usr/bin/env node
2
- import {
3
- __commonJS,
4
- __toESM
5
- } from "./chunk-D4HDZEJT.js";
6
-
7
- // ../../node_modules/sisteransi/src/index.js
8
- var require_src = __commonJS({
9
- "../../node_modules/sisteransi/src/index.js"(exports, module) {
10
- "use strict";
11
- var ESC = "\x1B";
12
- var CSI = `${ESC}[`;
13
- var beep = "\x07";
14
- var cursor = {
15
- to(x3, y2) {
16
- if (!y2) return `${CSI}${x3 + 1}G`;
17
- return `${CSI}${y2 + 1};${x3 + 1}H`;
18
- },
19
- move(x3, y2) {
20
- let ret = "";
21
- if (x3 < 0) ret += `${CSI}${-x3}D`;
22
- else if (x3 > 0) ret += `${CSI}${x3}C`;
23
- if (y2 < 0) ret += `${CSI}${-y2}A`;
24
- else if (y2 > 0) ret += `${CSI}${y2}B`;
25
- return ret;
26
- },
27
- up: (count = 1) => `${CSI}${count}A`,
28
- down: (count = 1) => `${CSI}${count}B`,
29
- forward: (count = 1) => `${CSI}${count}C`,
30
- backward: (count = 1) => `${CSI}${count}D`,
31
- nextLine: (count = 1) => `${CSI}E`.repeat(count),
32
- prevLine: (count = 1) => `${CSI}F`.repeat(count),
33
- left: `${CSI}G`,
34
- hide: `${CSI}?25l`,
35
- show: `${CSI}?25h`,
36
- save: `${ESC}7`,
37
- restore: `${ESC}8`
38
- };
39
- var scroll = {
40
- up: (count = 1) => `${CSI}S`.repeat(count),
41
- down: (count = 1) => `${CSI}T`.repeat(count)
42
- };
43
- var erase = {
44
- screen: `${CSI}2J`,
45
- up: (count = 1) => `${CSI}1J`.repeat(count),
46
- down: (count = 1) => `${CSI}J`.repeat(count),
47
- line: `${CSI}2K`,
48
- lineEnd: `${CSI}K`,
49
- lineStart: `${CSI}1K`,
50
- lines(count) {
51
- let clear = "";
52
- for (let i = 0; i < count; i++)
53
- clear += this.line + (i < count - 1 ? cursor.up() : "");
54
- if (count)
55
- clear += cursor.left;
56
- return clear;
57
- }
58
- };
59
- module.exports = { cursor, scroll, erase, beep };
60
- }
61
- });
62
-
63
- // ../../node_modules/@clack/core/dist/index.mjs
64
- var import_sisteransi = __toESM(require_src(), 1);
65
- import { styleText as D } from "util";
66
- import { stdout as R, stdin as q } from "process";
67
- import * as k from "readline";
68
- import ot from "readline";
69
- import { ReadStream as J } from "tty";
70
- function x(t2, e, s) {
71
- if (!s.some((u) => !u.disabled)) return t2;
72
- const i = t2 + e, r = Math.max(s.length - 1, 0), n = i < 0 ? r : i > r ? 0 : i;
73
- return s[n].disabled ? x(n, e < 0 ? -1 : 1, s) : n;
74
- }
75
- var at = (t2) => t2 === 161 || t2 === 164 || t2 === 167 || t2 === 168 || t2 === 170 || t2 === 173 || t2 === 174 || t2 >= 176 && t2 <= 180 || t2 >= 182 && t2 <= 186 || t2 >= 188 && t2 <= 191 || t2 === 198 || t2 === 208 || t2 === 215 || t2 === 216 || t2 >= 222 && t2 <= 225 || t2 === 230 || t2 >= 232 && t2 <= 234 || t2 === 236 || t2 === 237 || t2 === 240 || t2 === 242 || t2 === 243 || t2 >= 247 && t2 <= 250 || t2 === 252 || t2 === 254 || t2 === 257 || t2 === 273 || t2 === 275 || t2 === 283 || t2 === 294 || t2 === 295 || t2 === 299 || t2 >= 305 && t2 <= 307 || t2 === 312 || t2 >= 319 && t2 <= 322 || t2 === 324 || t2 >= 328 && t2 <= 331 || t2 === 333 || t2 === 338 || t2 === 339 || t2 === 358 || t2 === 359 || t2 === 363 || t2 === 462 || t2 === 464 || t2 === 466 || t2 === 468 || t2 === 470 || t2 === 472 || t2 === 474 || t2 === 476 || t2 === 593 || t2 === 609 || t2 === 708 || t2 === 711 || t2 >= 713 && t2 <= 715 || t2 === 717 || t2 === 720 || t2 >= 728 && t2 <= 731 || t2 === 733 || t2 === 735 || t2 >= 768 && t2 <= 879 || t2 >= 913 && t2 <= 929 || t2 >= 931 && t2 <= 937 || t2 >= 945 && t2 <= 961 || t2 >= 963 && t2 <= 969 || t2 === 1025 || t2 >= 1040 && t2 <= 1103 || t2 === 1105 || t2 === 8208 || t2 >= 8211 && t2 <= 8214 || t2 === 8216 || t2 === 8217 || t2 === 8220 || t2 === 8221 || t2 >= 8224 && t2 <= 8226 || t2 >= 8228 && t2 <= 8231 || t2 === 8240 || t2 === 8242 || t2 === 8243 || t2 === 8245 || t2 === 8251 || t2 === 8254 || t2 === 8308 || t2 === 8319 || t2 >= 8321 && t2 <= 8324 || t2 === 8364 || t2 === 8451 || t2 === 8453 || t2 === 8457 || t2 === 8467 || t2 === 8470 || t2 === 8481 || t2 === 8482 || t2 === 8486 || t2 === 8491 || t2 === 8531 || t2 === 8532 || t2 >= 8539 && t2 <= 8542 || t2 >= 8544 && t2 <= 8555 || t2 >= 8560 && t2 <= 8569 || t2 === 8585 || t2 >= 8592 && t2 <= 8601 || t2 === 8632 || t2 === 8633 || t2 === 8658 || t2 === 8660 || t2 === 8679 || t2 === 8704 || t2 === 8706 || t2 === 8707 || t2 === 8711 || t2 === 8712 || t2 === 8715 || t2 === 8719 || t2 === 8721 || t2 === 8725 || t2 === 8730 || t2 >= 8733 && t2 <= 8736 || t2 === 8739 || t2 === 8741 || t2 >= 8743 && t2 <= 8748 || t2 === 8750 || t2 >= 8756 && t2 <= 8759 || t2 === 8764 || t2 === 8765 || t2 === 8776 || t2 === 8780 || t2 === 8786 || t2 === 8800 || t2 === 8801 || t2 >= 8804 && t2 <= 8807 || t2 === 8810 || t2 === 8811 || t2 === 8814 || t2 === 8815 || t2 === 8834 || t2 === 8835 || t2 === 8838 || t2 === 8839 || t2 === 8853 || t2 === 8857 || t2 === 8869 || t2 === 8895 || t2 === 8978 || t2 >= 9312 && t2 <= 9449 || t2 >= 9451 && t2 <= 9547 || t2 >= 9552 && t2 <= 9587 || t2 >= 9600 && t2 <= 9615 || t2 >= 9618 && t2 <= 9621 || t2 === 9632 || t2 === 9633 || t2 >= 9635 && t2 <= 9641 || t2 === 9650 || t2 === 9651 || t2 === 9654 || t2 === 9655 || t2 === 9660 || t2 === 9661 || t2 === 9664 || t2 === 9665 || t2 >= 9670 && t2 <= 9672 || t2 === 9675 || t2 >= 9678 && t2 <= 9681 || t2 >= 9698 && t2 <= 9701 || t2 === 9711 || t2 === 9733 || t2 === 9734 || t2 === 9737 || t2 === 9742 || t2 === 9743 || t2 === 9756 || t2 === 9758 || t2 === 9792 || t2 === 9794 || t2 === 9824 || t2 === 9825 || t2 >= 9827 && t2 <= 9829 || t2 >= 9831 && t2 <= 9834 || t2 === 9836 || t2 === 9837 || t2 === 9839 || t2 === 9886 || t2 === 9887 || t2 === 9919 || t2 >= 9926 && t2 <= 9933 || t2 >= 9935 && t2 <= 9939 || t2 >= 9941 && t2 <= 9953 || t2 === 9955 || t2 === 9960 || t2 === 9961 || t2 >= 9963 && t2 <= 9969 || t2 === 9972 || t2 >= 9974 && t2 <= 9977 || t2 === 9979 || t2 === 9980 || t2 === 9982 || t2 === 9983 || t2 === 10045 || t2 >= 10102 && t2 <= 10111 || t2 >= 11094 && t2 <= 11097 || t2 >= 12872 && t2 <= 12879 || t2 >= 57344 && t2 <= 63743 || t2 >= 65024 && t2 <= 65039 || t2 === 65533 || t2 >= 127232 && t2 <= 127242 || t2 >= 127248 && t2 <= 127277 || t2 >= 127280 && t2 <= 127337 || t2 >= 127344 && t2 <= 127373 || t2 === 127375 || t2 === 127376 || t2 >= 127387 && t2 <= 127404 || t2 >= 917760 && t2 <= 917999 || t2 >= 983040 && t2 <= 1048573 || t2 >= 1048576 && t2 <= 1114109;
76
- var lt = (t2) => t2 === 12288 || t2 >= 65281 && t2 <= 65376 || t2 >= 65504 && t2 <= 65510;
77
- var ht = (t2) => t2 >= 4352 && t2 <= 4447 || t2 === 8986 || t2 === 8987 || t2 === 9001 || t2 === 9002 || t2 >= 9193 && t2 <= 9196 || t2 === 9200 || t2 === 9203 || t2 === 9725 || t2 === 9726 || t2 === 9748 || t2 === 9749 || t2 >= 9800 && t2 <= 9811 || t2 === 9855 || t2 === 9875 || t2 === 9889 || t2 === 9898 || t2 === 9899 || t2 === 9917 || t2 === 9918 || t2 === 9924 || t2 === 9925 || t2 === 9934 || t2 === 9940 || t2 === 9962 || t2 === 9970 || t2 === 9971 || t2 === 9973 || t2 === 9978 || t2 === 9981 || t2 === 9989 || t2 === 9994 || t2 === 9995 || t2 === 10024 || t2 === 10060 || t2 === 10062 || t2 >= 10067 && t2 <= 10069 || t2 === 10071 || t2 >= 10133 && t2 <= 10135 || t2 === 10160 || t2 === 10175 || t2 === 11035 || t2 === 11036 || t2 === 11088 || t2 === 11093 || t2 >= 11904 && t2 <= 11929 || t2 >= 11931 && t2 <= 12019 || t2 >= 12032 && t2 <= 12245 || t2 >= 12272 && t2 <= 12287 || t2 >= 12289 && t2 <= 12350 || t2 >= 12353 && t2 <= 12438 || t2 >= 12441 && t2 <= 12543 || t2 >= 12549 && t2 <= 12591 || t2 >= 12593 && t2 <= 12686 || t2 >= 12688 && t2 <= 12771 || t2 >= 12783 && t2 <= 12830 || t2 >= 12832 && t2 <= 12871 || t2 >= 12880 && t2 <= 19903 || t2 >= 19968 && t2 <= 42124 || t2 >= 42128 && t2 <= 42182 || t2 >= 43360 && t2 <= 43388 || t2 >= 44032 && t2 <= 55203 || t2 >= 63744 && t2 <= 64255 || t2 >= 65040 && t2 <= 65049 || t2 >= 65072 && t2 <= 65106 || t2 >= 65108 && t2 <= 65126 || t2 >= 65128 && t2 <= 65131 || t2 >= 94176 && t2 <= 94180 || t2 === 94192 || t2 === 94193 || t2 >= 94208 && t2 <= 100343 || t2 >= 100352 && t2 <= 101589 || t2 >= 101632 && t2 <= 101640 || t2 >= 110576 && t2 <= 110579 || t2 >= 110581 && t2 <= 110587 || t2 === 110589 || t2 === 110590 || t2 >= 110592 && t2 <= 110882 || t2 === 110898 || t2 >= 110928 && t2 <= 110930 || t2 === 110933 || t2 >= 110948 && t2 <= 110951 || t2 >= 110960 && t2 <= 111355 || t2 === 126980 || t2 === 127183 || t2 === 127374 || t2 >= 127377 && t2 <= 127386 || t2 >= 127488 && t2 <= 127490 || t2 >= 127504 && t2 <= 127547 || t2 >= 127552 && t2 <= 127560 || t2 === 127568 || t2 === 127569 || t2 >= 127584 && t2 <= 127589 || t2 >= 127744 && t2 <= 127776 || t2 >= 127789 && t2 <= 127797 || t2 >= 127799 && t2 <= 127868 || t2 >= 127870 && t2 <= 127891 || t2 >= 127904 && t2 <= 127946 || t2 >= 127951 && t2 <= 127955 || t2 >= 127968 && t2 <= 127984 || t2 === 127988 || t2 >= 127992 && t2 <= 128062 || t2 === 128064 || t2 >= 128066 && t2 <= 128252 || t2 >= 128255 && t2 <= 128317 || t2 >= 128331 && t2 <= 128334 || t2 >= 128336 && t2 <= 128359 || t2 === 128378 || t2 === 128405 || t2 === 128406 || t2 === 128420 || t2 >= 128507 && t2 <= 128591 || t2 >= 128640 && t2 <= 128709 || t2 === 128716 || t2 >= 128720 && t2 <= 128722 || t2 >= 128725 && t2 <= 128727 || t2 >= 128732 && t2 <= 128735 || t2 === 128747 || t2 === 128748 || t2 >= 128756 && t2 <= 128764 || t2 >= 128992 && t2 <= 129003 || t2 === 129008 || t2 >= 129292 && t2 <= 129338 || t2 >= 129340 && t2 <= 129349 || t2 >= 129351 && t2 <= 129535 || t2 >= 129648 && t2 <= 129660 || t2 >= 129664 && t2 <= 129672 || t2 >= 129680 && t2 <= 129725 || t2 >= 129727 && t2 <= 129733 || t2 >= 129742 && t2 <= 129755 || t2 >= 129760 && t2 <= 129768 || t2 >= 129776 && t2 <= 129784 || t2 >= 131072 && t2 <= 196605 || t2 >= 196608 && t2 <= 262141;
78
- var O = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y;
79
- var y = /[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y;
80
- var L = /\t{1,1000}/y;
81
- var P = new RegExp("[\\u{1F1E6}-\\u{1F1FF}]{2}|\\u{1F3F4}[\\u{E0061}-\\u{E007A}]{2}[\\u{E0030}-\\u{E0039}\\u{E0061}-\\u{E007A}]{1,3}\\u{E007F}|(?:\\p{Emoji}\\uFE0F\\u20E3?|\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation})(?:\\u200D(?:\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation}|\\p{Emoji}\\uFE0F\\u20E3?))*", "yu");
82
- var M = /(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y;
83
- var ct = new RegExp("\\p{M}+", "gu");
84
- var ft = { limit: 1 / 0, ellipsis: "" };
85
- var X = (t2, e = {}, s = {}) => {
86
- const i = e.limit ?? 1 / 0, r = e.ellipsis ?? "", n = e?.ellipsisWidth ?? (r ? X(r, ft, s).width : 0), u = s.ansiWidth ?? 0, a = s.controlWidth ?? 0, l = s.tabWidth ?? 8, E = s.ambiguousWidth ?? 1, g = s.emojiWidth ?? 2, m = s.fullWidthWidth ?? 2, A = s.regularWidth ?? 1, V2 = s.wideWidth ?? 2;
87
- let h2 = 0, o = 0, p = t2.length, v = 0, F = false, d = p, b = Math.max(0, i - n), C = 0, w = 0, c = 0, f = 0;
88
- t: for (; ; ) {
89
- if (w > C || o >= p && o > h2) {
90
- const ut = t2.slice(C, w) || t2.slice(h2, o);
91
- v = 0;
92
- for (const Y of ut.replaceAll(ct, "")) {
93
- const $ = Y.codePointAt(0) || 0;
94
- if (lt($) ? f = m : ht($) ? f = V2 : E !== A && at($) ? f = E : f = A, c + f > b && (d = Math.min(d, Math.max(C, h2) + v)), c + f > i) {
95
- F = true;
96
- break t;
97
- }
98
- v += Y.length, c += f;
99
- }
100
- C = w = 0;
101
- }
102
- if (o >= p) break;
103
- if (M.lastIndex = o, M.test(t2)) {
104
- if (v = M.lastIndex - o, f = v * A, c + f > b && (d = Math.min(d, o + Math.floor((b - c) / A))), c + f > i) {
105
- F = true;
106
- break;
107
- }
108
- c += f, C = h2, w = o, o = h2 = M.lastIndex;
109
- continue;
110
- }
111
- if (O.lastIndex = o, O.test(t2)) {
112
- if (c + u > b && (d = Math.min(d, o)), c + u > i) {
113
- F = true;
114
- break;
115
- }
116
- c += u, C = h2, w = o, o = h2 = O.lastIndex;
117
- continue;
118
- }
119
- if (y.lastIndex = o, y.test(t2)) {
120
- if (v = y.lastIndex - o, f = v * a, c + f > b && (d = Math.min(d, o + Math.floor((b - c) / a))), c + f > i) {
121
- F = true;
122
- break;
123
- }
124
- c += f, C = h2, w = o, o = h2 = y.lastIndex;
125
- continue;
126
- }
127
- if (L.lastIndex = o, L.test(t2)) {
128
- if (v = L.lastIndex - o, f = v * l, c + f > b && (d = Math.min(d, o + Math.floor((b - c) / l))), c + f > i) {
129
- F = true;
130
- break;
131
- }
132
- c += f, C = h2, w = o, o = h2 = L.lastIndex;
133
- continue;
134
- }
135
- if (P.lastIndex = o, P.test(t2)) {
136
- if (c + g > b && (d = Math.min(d, o)), c + g > i) {
137
- F = true;
138
- break;
139
- }
140
- c += g, C = h2, w = o, o = h2 = P.lastIndex;
141
- continue;
142
- }
143
- o += 1;
144
- }
145
- return { width: F ? b : c, index: F ? d : p, truncated: F, ellipsed: F && i >= n };
146
- };
147
- var pt = { limit: 1 / 0, ellipsis: "", ellipsisWidth: 0 };
148
- var S = (t2, e = {}) => X(t2, pt, e).width;
149
- var T = "\x1B";
150
- var Z = "\x9B";
151
- var Ft = 39;
152
- var j = "\x07";
153
- var Q = "[";
154
- var dt = "]";
155
- var tt = "m";
156
- var U = `${dt}8;;`;
157
- var et = new RegExp(`(?:\\${Q}(?<code>\\d+)m|\\${U}(?<uri>.*)${j})`, "y");
158
- var mt = (t2) => {
159
- if (t2 >= 30 && t2 <= 37 || t2 >= 90 && t2 <= 97) return 39;
160
- if (t2 >= 40 && t2 <= 47 || t2 >= 100 && t2 <= 107) return 49;
161
- if (t2 === 1 || t2 === 2) return 22;
162
- if (t2 === 3) return 23;
163
- if (t2 === 4) return 24;
164
- if (t2 === 7) return 27;
165
- if (t2 === 8) return 28;
166
- if (t2 === 9) return 29;
167
- if (t2 === 0) return 0;
168
- };
169
- var st = (t2) => `${T}${Q}${t2}${tt}`;
170
- var it = (t2) => `${T}${U}${t2}${j}`;
171
- var gt = (t2) => t2.map((e) => S(e));
172
- var G = (t2, e, s) => {
173
- const i = e[Symbol.iterator]();
174
- let r = false, n = false, u = t2.at(-1), a = u === void 0 ? 0 : S(u), l = i.next(), E = i.next(), g = 0;
175
- for (; !l.done; ) {
176
- const m = l.value, A = S(m);
177
- a + A <= s ? t2[t2.length - 1] += m : (t2.push(m), a = 0), (m === T || m === Z) && (r = true, n = e.startsWith(U, g + 1)), r ? n ? m === j && (r = false, n = false) : m === tt && (r = false) : (a += A, a === s && !E.done && (t2.push(""), a = 0)), l = E, E = i.next(), g += m.length;
178
- }
179
- u = t2.at(-1), !a && u !== void 0 && u.length > 0 && t2.length > 1 && (t2[t2.length - 2] += t2.pop());
180
- };
181
- var vt = (t2) => {
182
- const e = t2.split(" ");
183
- let s = e.length;
184
- for (; s > 0 && !(S(e[s - 1]) > 0); ) s--;
185
- return s === e.length ? t2 : e.slice(0, s).join(" ") + e.slice(s).join("");
186
- };
187
- var Et = (t2, e, s = {}) => {
188
- if (s.trim !== false && t2.trim() === "") return "";
189
- let i = "", r, n;
190
- const u = t2.split(" "), a = gt(u);
191
- let l = [""];
192
- for (const [h2, o] of u.entries()) {
193
- s.trim !== false && (l[l.length - 1] = (l.at(-1) ?? "").trimStart());
194
- let p = S(l.at(-1) ?? "");
195
- if (h2 !== 0 && (p >= e && (s.wordWrap === false || s.trim === false) && (l.push(""), p = 0), (p > 0 || s.trim === false) && (l[l.length - 1] += " ", p++)), s.hard && a[h2] > e) {
196
- const v = e - p, F = 1 + Math.floor((a[h2] - v - 1) / e);
197
- Math.floor((a[h2] - 1) / e) < F && l.push(""), G(l, o, e);
198
- continue;
199
- }
200
- if (p + a[h2] > e && p > 0 && a[h2] > 0) {
201
- if (s.wordWrap === false && p < e) {
202
- G(l, o, e);
203
- continue;
204
- }
205
- l.push("");
206
- }
207
- if (p + a[h2] > e && s.wordWrap === false) {
208
- G(l, o, e);
209
- continue;
210
- }
211
- l[l.length - 1] += o;
212
- }
213
- s.trim !== false && (l = l.map((h2) => vt(h2)));
214
- const E = l.join(`
215
- `), g = E[Symbol.iterator]();
216
- let m = g.next(), A = g.next(), V2 = 0;
217
- for (; !m.done; ) {
218
- const h2 = m.value, o = A.value;
219
- if (i += h2, h2 === T || h2 === Z) {
220
- et.lastIndex = V2 + 1;
221
- const F = et.exec(E)?.groups;
222
- if (F?.code !== void 0) {
223
- const d = Number.parseFloat(F.code);
224
- r = d === Ft ? void 0 : d;
225
- } else F?.uri !== void 0 && (n = F.uri.length === 0 ? void 0 : F.uri);
226
- }
227
- const p = r ? mt(r) : void 0;
228
- o === `
229
- ` ? (n && (i += it("")), r && p && (i += st(p))) : h2 === `
230
- ` && (r && p && (i += st(r)), n && (i += it(n))), V2 += h2.length, m = A, A = g.next();
231
- }
232
- return i;
233
- };
234
- function K(t2, e, s) {
235
- return String(t2).normalize().replaceAll(`\r
236
- `, `
237
- `).split(`
238
- `).map((i) => Et(i, e, s)).join(`
239
- `);
240
- }
241
- var At = ["up", "down", "left", "right", "space", "enter", "cancel"];
242
- var _ = { actions: new Set(At), aliases: /* @__PURE__ */ new Map([["k", "up"], ["j", "down"], ["h", "left"], ["l", "right"], ["", "cancel"], ["escape", "cancel"]]), messages: { cancel: "Canceled", error: "Something went wrong" }, withGuide: true };
243
- function H(t2, e) {
244
- if (typeof t2 == "string") return _.aliases.get(t2) === e;
245
- for (const s of t2) if (s !== void 0 && H(s, e)) return true;
246
- return false;
247
- }
248
- function _t(t2, e) {
249
- if (t2 === e) return;
250
- const s = t2.split(`
251
- `), i = e.split(`
252
- `), r = Math.max(s.length, i.length), n = [];
253
- for (let u = 0; u < r; u++) s[u] !== i[u] && n.push(u);
254
- return { lines: n, numLinesBefore: s.length, numLinesAfter: i.length, numLines: r };
255
- }
256
- var bt = globalThis.process.platform.startsWith("win");
257
- var z = /* @__PURE__ */ Symbol("clack:cancel");
258
- function Ct(t2) {
259
- return t2 === z;
260
- }
261
- function W(t2, e) {
262
- const s = t2;
263
- s.isTTY && s.setRawMode(e);
264
- }
265
- var rt = (t2) => "columns" in t2 && typeof t2.columns == "number" ? t2.columns : 80;
266
- var nt = (t2) => "rows" in t2 && typeof t2.rows == "number" ? t2.rows : 20;
267
- function Bt(t2, e, s, i = s) {
268
- const r = rt(t2 ?? R);
269
- return K(e, r - s.length, { hard: true, trim: false }).split(`
270
- `).map((n, u) => `${u === 0 ? i : s}${n}`).join(`
271
- `);
272
- }
273
- var B = class {
274
- input;
275
- output;
276
- _abortSignal;
277
- rl;
278
- opts;
279
- _render;
280
- _track = false;
281
- _prevFrame = "";
282
- _subscribers = /* @__PURE__ */ new Map();
283
- _cursor = 0;
284
- state = "initial";
285
- error = "";
286
- value;
287
- userInput = "";
288
- constructor(e, s = true) {
289
- const { input: i = q, output: r = R, render: n, signal: u, ...a } = e;
290
- this.opts = a, this.onKeypress = this.onKeypress.bind(this), this.close = this.close.bind(this), this.render = this.render.bind(this), this._render = n.bind(this), this._track = s, this._abortSignal = u, this.input = i, this.output = r;
291
- }
292
- unsubscribe() {
293
- this._subscribers.clear();
294
- }
295
- setSubscriber(e, s) {
296
- const i = this._subscribers.get(e) ?? [];
297
- i.push(s), this._subscribers.set(e, i);
298
- }
299
- on(e, s) {
300
- this.setSubscriber(e, { cb: s });
301
- }
302
- once(e, s) {
303
- this.setSubscriber(e, { cb: s, once: true });
304
- }
305
- emit(e, ...s) {
306
- const i = this._subscribers.get(e) ?? [], r = [];
307
- for (const n of i) n.cb(...s), n.once && r.push(() => i.splice(i.indexOf(n), 1));
308
- for (const n of r) n();
309
- }
310
- prompt() {
311
- return new Promise((e) => {
312
- if (this._abortSignal) {
313
- if (this._abortSignal.aborted) return this.state = "cancel", this.close(), e(z);
314
- this._abortSignal.addEventListener("abort", () => {
315
- this.state = "cancel", this.close();
316
- }, { once: true });
317
- }
318
- this.rl = ot.createInterface({ input: this.input, tabSize: 2, prompt: "", escapeCodeTimeout: 50, terminal: true }), this.rl.prompt(), this.opts.initialUserInput !== void 0 && this._setUserInput(this.opts.initialUserInput, true), this.input.on("keypress", this.onKeypress), W(this.input, true), this.output.on("resize", this.render), this.render(), this.once("submit", () => {
319
- this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), W(this.input, false), e(this.value);
320
- }), this.once("cancel", () => {
321
- this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), W(this.input, false), e(z);
322
- });
323
- });
324
- }
325
- _isActionKey(e, s) {
326
- return e === " ";
327
- }
328
- _setValue(e) {
329
- this.value = e, this.emit("value", this.value);
330
- }
331
- _setUserInput(e, s) {
332
- this.userInput = e ?? "", this.emit("userInput", this.userInput), s && this._track && this.rl && (this.rl.write(this.userInput), this._cursor = this.rl.cursor);
333
- }
334
- _clearUserInput() {
335
- this.rl?.write(null, { ctrl: true, name: "u" }), this._setUserInput("");
336
- }
337
- onKeypress(e, s) {
338
- if (this._track && s.name !== "return" && (s.name && this._isActionKey(e, s) && this.rl?.write(null, { ctrl: true, name: "h" }), this._cursor = this.rl?.cursor ?? 0, this._setUserInput(this.rl?.line)), this.state === "error" && (this.state = "active"), s?.name && (!this._track && _.aliases.has(s.name) && this.emit("cursor", _.aliases.get(s.name)), _.actions.has(s.name) && this.emit("cursor", s.name)), e && (e.toLowerCase() === "y" || e.toLowerCase() === "n") && this.emit("confirm", e.toLowerCase() === "y"), this.emit("key", e?.toLowerCase(), s), s?.name === "return") {
339
- if (this.opts.validate) {
340
- const i = this.opts.validate(this.value);
341
- i && (this.error = i instanceof Error ? i.message : i, this.state = "error", this.rl?.write(this.userInput));
342
- }
343
- this.state !== "error" && (this.state = "submit");
344
- }
345
- H([e, s?.name, s?.sequence], "cancel") && (this.state = "cancel"), (this.state === "submit" || this.state === "cancel") && this.emit("finalize"), this.render(), (this.state === "submit" || this.state === "cancel") && this.close();
346
- }
347
- close() {
348
- this.input.unpipe(), this.input.removeListener("keypress", this.onKeypress), this.output.write(`
349
- `), W(this.input, false), this.rl?.close(), this.rl = void 0, this.emit(`${this.state}`, this.value), this.unsubscribe();
350
- }
351
- restoreCursor() {
352
- const e = K(this._prevFrame, process.stdout.columns, { hard: true, trim: false }).split(`
353
- `).length - 1;
354
- this.output.write(import_sisteransi.cursor.move(-999, e * -1));
355
- }
356
- render() {
357
- const e = K(this._render(this) ?? "", process.stdout.columns, { hard: true, trim: false });
358
- if (e !== this._prevFrame) {
359
- if (this.state === "initial") this.output.write(import_sisteransi.cursor.hide);
360
- else {
361
- const s = _t(this._prevFrame, e), i = nt(this.output);
362
- if (this.restoreCursor(), s) {
363
- const r = Math.max(0, s.numLinesAfter - i), n = Math.max(0, s.numLinesBefore - i);
364
- let u = s.lines.find((a) => a >= r);
365
- if (u === void 0) {
366
- this._prevFrame = e;
367
- return;
368
- }
369
- if (s.lines.length === 1) {
370
- this.output.write(import_sisteransi.cursor.move(0, u - n)), this.output.write(import_sisteransi.erase.lines(1));
371
- const a = e.split(`
372
- `);
373
- this.output.write(a[u]), this._prevFrame = e, this.output.write(import_sisteransi.cursor.move(0, a.length - u - 1));
374
- return;
375
- } else if (s.lines.length > 1) {
376
- if (r < n) u = r;
377
- else {
378
- const l = u - n;
379
- l > 0 && this.output.write(import_sisteransi.cursor.move(0, l));
380
- }
381
- this.output.write(import_sisteransi.erase.down());
382
- const a = e.split(`
383
- `).slice(u);
384
- this.output.write(a.join(`
385
- `)), this._prevFrame = e;
386
- return;
387
- }
388
- }
389
- this.output.write(import_sisteransi.erase.down());
390
- }
391
- this.output.write(e), this.state === "initial" && (this.state = "active"), this._prevFrame = e;
392
- }
393
- }
394
- };
395
- var kt = class extends B {
396
- get cursor() {
397
- return this.value ? 0 : 1;
398
- }
399
- get _value() {
400
- return this.cursor === 0;
401
- }
402
- constructor(e) {
403
- super(e, false), this.value = !!e.initialValue, this.on("userInput", () => {
404
- this.value = this._value;
405
- }), this.on("confirm", (s) => {
406
- this.output.write(import_sisteransi.cursor.move(0, -1)), this.value = s, this.state = "submit", this.close();
407
- }), this.on("cursor", () => {
408
- this.value = !this.value;
409
- });
410
- }
411
- };
412
- var Lt = class extends B {
413
- options;
414
- cursor = 0;
415
- get _value() {
416
- return this.options[this.cursor].value;
417
- }
418
- get _enabledOptions() {
419
- return this.options.filter((e) => e.disabled !== true);
420
- }
421
- toggleAll() {
422
- const e = this._enabledOptions, s = this.value !== void 0 && this.value.length === e.length;
423
- this.value = s ? [] : e.map((i) => i.value);
424
- }
425
- toggleInvert() {
426
- const e = this.value;
427
- if (!e) return;
428
- const s = this._enabledOptions.filter((i) => !e.includes(i.value));
429
- this.value = s.map((i) => i.value);
430
- }
431
- toggleValue() {
432
- this.value === void 0 && (this.value = []);
433
- const e = this.value.includes(this._value);
434
- this.value = e ? this.value.filter((s) => s !== this._value) : [...this.value, this._value];
435
- }
436
- constructor(e) {
437
- super(e, false), this.options = e.options, this.value = [...e.initialValues ?? []];
438
- const s = Math.max(this.options.findIndex(({ value: i }) => i === e.cursorAt), 0);
439
- this.cursor = this.options[s].disabled ? x(s, 1, this.options) : s, this.on("key", (i) => {
440
- i === "a" && this.toggleAll(), i === "i" && this.toggleInvert();
441
- }), this.on("cursor", (i) => {
442
- switch (i) {
443
- case "left":
444
- case "up":
445
- this.cursor = x(this.cursor, -1, this.options);
446
- break;
447
- case "down":
448
- case "right":
449
- this.cursor = x(this.cursor, 1, this.options);
450
- break;
451
- case "space":
452
- this.toggleValue();
453
- break;
454
- }
455
- });
456
- }
457
- };
458
- var Tt = class extends B {
459
- options;
460
- cursor = 0;
461
- get _selectedValue() {
462
- return this.options[this.cursor];
463
- }
464
- changeValue() {
465
- this.value = this._selectedValue.value;
466
- }
467
- constructor(e) {
468
- super(e, false), this.options = e.options;
469
- const s = this.options.findIndex(({ value: r }) => r === e.initialValue), i = s === -1 ? 0 : s;
470
- this.cursor = this.options[i].disabled ? x(i, 1, this.options) : i, this.changeValue(), this.on("cursor", (r) => {
471
- switch (r) {
472
- case "left":
473
- case "up":
474
- this.cursor = x(this.cursor, -1, this.options);
475
- break;
476
- case "down":
477
- case "right":
478
- this.cursor = x(this.cursor, 1, this.options);
479
- break;
480
- }
481
- this.changeValue();
482
- });
483
- }
484
- };
485
-
486
- // ../../node_modules/@clack/prompts/dist/index.mjs
487
- var import_sisteransi2 = __toESM(require_src(), 1);
488
- import { styleText as t, stripVTControlCharacters as ue } from "util";
489
- import N2 from "process";
490
- import { readdirSync as $t2, existsSync as dt2, lstatSync as xe } from "fs";
491
- import { dirname as _e, join as ht2 } from "path";
492
- function pt2() {
493
- return N2.platform !== "win32" ? N2.env.TERM !== "linux" : !!N2.env.CI || !!N2.env.WT_SESSION || !!N2.env.TERMINUS_SUBLIME || N2.env.ConEmuTask === "{cmd::Cmder}" || N2.env.TERM_PROGRAM === "Terminus-Sublime" || N2.env.TERM_PROGRAM === "vscode" || N2.env.TERM === "xterm-256color" || N2.env.TERM === "alacritty" || N2.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
494
- }
495
- var ee = pt2();
496
- var I2 = (e, r) => ee ? e : r;
497
- var Re = I2("\u25C6", "*");
498
- var $e = I2("\u25A0", "x");
499
- var de = I2("\u25B2", "x");
500
- var V = I2("\u25C7", "o");
501
- var he = I2("\u250C", "T");
502
- var h = I2("\u2502", "|");
503
- var x2 = I2("\u2514", "\u2014");
504
- var Oe = I2("\u2510", "T");
505
- var Pe = I2("\u2518", "\u2014");
506
- var z2 = I2("\u25CF", ">");
507
- var H2 = I2("\u25CB", " ");
508
- var te = I2("\u25FB", "[\u2022]");
509
- var U2 = I2("\u25FC", "[+]");
510
- var q2 = I2("\u25FB", "[ ]");
511
- var Ne = I2("\u25AA", "\u2022");
512
- var se = I2("\u2500", "-");
513
- var pe = I2("\u256E", "+");
514
- var We = I2("\u251C", "+");
515
- var me = I2("\u256F", "+");
516
- var ge = I2("\u2570", "+");
517
- var Ge = I2("\u256D", "+");
518
- var fe = I2("\u25CF", "\u2022");
519
- var Fe = I2("\u25C6", "*");
520
- var ye = I2("\u25B2", "!");
521
- var Ee = I2("\u25A0", "x");
522
- var W2 = (e) => {
523
- switch (e) {
524
- case "initial":
525
- case "active":
526
- return t("cyan", Re);
527
- case "cancel":
528
- return t("red", $e);
529
- case "error":
530
- return t("yellow", de);
531
- case "submit":
532
- return t("green", V);
533
- }
534
- };
535
- var ve = (e) => {
536
- switch (e) {
537
- case "initial":
538
- case "active":
539
- return t("cyan", h);
540
- case "cancel":
541
- return t("red", h);
542
- case "error":
543
- return t("yellow", h);
544
- case "submit":
545
- return t("green", h);
546
- }
547
- };
548
- var mt2 = (e) => e === 161 || e === 164 || e === 167 || e === 168 || e === 170 || e === 173 || e === 174 || e >= 176 && e <= 180 || e >= 182 && e <= 186 || e >= 188 && e <= 191 || e === 198 || e === 208 || e === 215 || e === 216 || e >= 222 && e <= 225 || e === 230 || e >= 232 && e <= 234 || e === 236 || e === 237 || e === 240 || e === 242 || e === 243 || e >= 247 && e <= 250 || e === 252 || e === 254 || e === 257 || e === 273 || e === 275 || e === 283 || e === 294 || e === 295 || e === 299 || e >= 305 && e <= 307 || e === 312 || e >= 319 && e <= 322 || e === 324 || e >= 328 && e <= 331 || e === 333 || e === 338 || e === 339 || e === 358 || e === 359 || e === 363 || e === 462 || e === 464 || e === 466 || e === 468 || e === 470 || e === 472 || e === 474 || e === 476 || e === 593 || e === 609 || e === 708 || e === 711 || e >= 713 && e <= 715 || e === 717 || e === 720 || e >= 728 && e <= 731 || e === 733 || e === 735 || e >= 768 && e <= 879 || e >= 913 && e <= 929 || e >= 931 && e <= 937 || e >= 945 && e <= 961 || e >= 963 && e <= 969 || e === 1025 || e >= 1040 && e <= 1103 || e === 1105 || e === 8208 || e >= 8211 && e <= 8214 || e === 8216 || e === 8217 || e === 8220 || e === 8221 || e >= 8224 && e <= 8226 || e >= 8228 && e <= 8231 || e === 8240 || e === 8242 || e === 8243 || e === 8245 || e === 8251 || e === 8254 || e === 8308 || e === 8319 || e >= 8321 && e <= 8324 || e === 8364 || e === 8451 || e === 8453 || e === 8457 || e === 8467 || e === 8470 || e === 8481 || e === 8482 || e === 8486 || e === 8491 || e === 8531 || e === 8532 || e >= 8539 && e <= 8542 || e >= 8544 && e <= 8555 || e >= 8560 && e <= 8569 || e === 8585 || e >= 8592 && e <= 8601 || e === 8632 || e === 8633 || e === 8658 || e === 8660 || e === 8679 || e === 8704 || e === 8706 || e === 8707 || e === 8711 || e === 8712 || e === 8715 || e === 8719 || e === 8721 || e === 8725 || e === 8730 || e >= 8733 && e <= 8736 || e === 8739 || e === 8741 || e >= 8743 && e <= 8748 || e === 8750 || e >= 8756 && e <= 8759 || e === 8764 || e === 8765 || e === 8776 || e === 8780 || e === 8786 || e === 8800 || e === 8801 || e >= 8804 && e <= 8807 || e === 8810 || e === 8811 || e === 8814 || e === 8815 || e === 8834 || e === 8835 || e === 8838 || e === 8839 || e === 8853 || e === 8857 || e === 8869 || e === 8895 || e === 8978 || e >= 9312 && e <= 9449 || e >= 9451 && e <= 9547 || e >= 9552 && e <= 9587 || e >= 9600 && e <= 9615 || e >= 9618 && e <= 9621 || e === 9632 || e === 9633 || e >= 9635 && e <= 9641 || e === 9650 || e === 9651 || e === 9654 || e === 9655 || e === 9660 || e === 9661 || e === 9664 || e === 9665 || e >= 9670 && e <= 9672 || e === 9675 || e >= 9678 && e <= 9681 || e >= 9698 && e <= 9701 || e === 9711 || e === 9733 || e === 9734 || e === 9737 || e === 9742 || e === 9743 || e === 9756 || e === 9758 || e === 9792 || e === 9794 || e === 9824 || e === 9825 || e >= 9827 && e <= 9829 || e >= 9831 && e <= 9834 || e === 9836 || e === 9837 || e === 9839 || e === 9886 || e === 9887 || e === 9919 || e >= 9926 && e <= 9933 || e >= 9935 && e <= 9939 || e >= 9941 && e <= 9953 || e === 9955 || e === 9960 || e === 9961 || e >= 9963 && e <= 9969 || e === 9972 || e >= 9974 && e <= 9977 || e === 9979 || e === 9980 || e === 9982 || e === 9983 || e === 10045 || e >= 10102 && e <= 10111 || e >= 11094 && e <= 11097 || e >= 12872 && e <= 12879 || e >= 57344 && e <= 63743 || e >= 65024 && e <= 65039 || e === 65533 || e >= 127232 && e <= 127242 || e >= 127248 && e <= 127277 || e >= 127280 && e <= 127337 || e >= 127344 && e <= 127373 || e === 127375 || e === 127376 || e >= 127387 && e <= 127404 || e >= 917760 && e <= 917999 || e >= 983040 && e <= 1048573 || e >= 1048576 && e <= 1114109;
549
- var gt2 = (e) => e === 12288 || e >= 65281 && e <= 65376 || e >= 65504 && e <= 65510;
550
- var ft2 = (e) => e >= 4352 && e <= 4447 || e === 8986 || e === 8987 || e === 9001 || e === 9002 || e >= 9193 && e <= 9196 || e === 9200 || e === 9203 || e === 9725 || e === 9726 || e === 9748 || e === 9749 || e >= 9800 && e <= 9811 || e === 9855 || e === 9875 || e === 9889 || e === 9898 || e === 9899 || e === 9917 || e === 9918 || e === 9924 || e === 9925 || e === 9934 || e === 9940 || e === 9962 || e === 9970 || e === 9971 || e === 9973 || e === 9978 || e === 9981 || e === 9989 || e === 9994 || e === 9995 || e === 10024 || e === 10060 || e === 10062 || e >= 10067 && e <= 10069 || e === 10071 || e >= 10133 && e <= 10135 || e === 10160 || e === 10175 || e === 11035 || e === 11036 || e === 11088 || e === 11093 || e >= 11904 && e <= 11929 || e >= 11931 && e <= 12019 || e >= 12032 && e <= 12245 || e >= 12272 && e <= 12287 || e >= 12289 && e <= 12350 || e >= 12353 && e <= 12438 || e >= 12441 && e <= 12543 || e >= 12549 && e <= 12591 || e >= 12593 && e <= 12686 || e >= 12688 && e <= 12771 || e >= 12783 && e <= 12830 || e >= 12832 && e <= 12871 || e >= 12880 && e <= 19903 || e >= 19968 && e <= 42124 || e >= 42128 && e <= 42182 || e >= 43360 && e <= 43388 || e >= 44032 && e <= 55203 || e >= 63744 && e <= 64255 || e >= 65040 && e <= 65049 || e >= 65072 && e <= 65106 || e >= 65108 && e <= 65126 || e >= 65128 && e <= 65131 || e >= 94176 && e <= 94180 || e === 94192 || e === 94193 || e >= 94208 && e <= 100343 || e >= 100352 && e <= 101589 || e >= 101632 && e <= 101640 || e >= 110576 && e <= 110579 || e >= 110581 && e <= 110587 || e === 110589 || e === 110590 || e >= 110592 && e <= 110882 || e === 110898 || e >= 110928 && e <= 110930 || e === 110933 || e >= 110948 && e <= 110951 || e >= 110960 && e <= 111355 || e === 126980 || e === 127183 || e === 127374 || e >= 127377 && e <= 127386 || e >= 127488 && e <= 127490 || e >= 127504 && e <= 127547 || e >= 127552 && e <= 127560 || e === 127568 || e === 127569 || e >= 127584 && e <= 127589 || e >= 127744 && e <= 127776 || e >= 127789 && e <= 127797 || e >= 127799 && e <= 127868 || e >= 127870 && e <= 127891 || e >= 127904 && e <= 127946 || e >= 127951 && e <= 127955 || e >= 127968 && e <= 127984 || e === 127988 || e >= 127992 && e <= 128062 || e === 128064 || e >= 128066 && e <= 128252 || e >= 128255 && e <= 128317 || e >= 128331 && e <= 128334 || e >= 128336 && e <= 128359 || e === 128378 || e === 128405 || e === 128406 || e === 128420 || e >= 128507 && e <= 128591 || e >= 128640 && e <= 128709 || e === 128716 || e >= 128720 && e <= 128722 || e >= 128725 && e <= 128727 || e >= 128732 && e <= 128735 || e === 128747 || e === 128748 || e >= 128756 && e <= 128764 || e >= 128992 && e <= 129003 || e === 129008 || e >= 129292 && e <= 129338 || e >= 129340 && e <= 129349 || e >= 129351 && e <= 129535 || e >= 129648 && e <= 129660 || e >= 129664 && e <= 129672 || e >= 129680 && e <= 129725 || e >= 129727 && e <= 129733 || e >= 129742 && e <= 129755 || e >= 129760 && e <= 129768 || e >= 129776 && e <= 129784 || e >= 131072 && e <= 196605 || e >= 196608 && e <= 262141;
551
- var we = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y;
552
- var re = /[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y;
553
- var ie = /\t{1,1000}/y;
554
- var Ae = new RegExp("[\\u{1F1E6}-\\u{1F1FF}]{2}|\\u{1F3F4}[\\u{E0061}-\\u{E007A}]{2}[\\u{E0030}-\\u{E0039}\\u{E0061}-\\u{E007A}]{1,3}\\u{E007F}|(?:\\p{Emoji}\\uFE0F\\u20E3?|\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation})(?:\\u200D(?:\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation}|\\p{Emoji}\\uFE0F\\u20E3?))*", "yu");
555
- var ne = /(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y;
556
- var Ft2 = new RegExp("\\p{M}+", "gu");
557
- var yt2 = { limit: 1 / 0, ellipsis: "" };
558
- var Le = (e, r = {}, s = {}) => {
559
- const i = r.limit ?? 1 / 0, a = r.ellipsis ?? "", o = r?.ellipsisWidth ?? (a ? Le(a, yt2, s).width : 0), u = s.ansiWidth ?? 0, l = s.controlWidth ?? 0, n = s.tabWidth ?? 8, c = s.ambiguousWidth ?? 1, p = s.emojiWidth ?? 2, f = s.fullWidthWidth ?? 2, g = s.regularWidth ?? 1, E = s.wideWidth ?? 2;
560
- let $ = 0, m = 0, d = e.length, F = 0, y2 = false, v = d, C = Math.max(0, i - o), A = 0, b = 0, w = 0, S2 = 0;
561
- e: for (; ; ) {
562
- if (b > A || m >= d && m > $) {
563
- const T2 = e.slice(A, b) || e.slice($, m);
564
- F = 0;
565
- for (const M2 of T2.replaceAll(Ft2, "")) {
566
- const O2 = M2.codePointAt(0) || 0;
567
- if (gt2(O2) ? S2 = f : ft2(O2) ? S2 = E : c !== g && mt2(O2) ? S2 = c : S2 = g, w + S2 > C && (v = Math.min(v, Math.max(A, $) + F)), w + S2 > i) {
568
- y2 = true;
569
- break e;
570
- }
571
- F += M2.length, w += S2;
572
- }
573
- A = b = 0;
574
- }
575
- if (m >= d) break;
576
- if (ne.lastIndex = m, ne.test(e)) {
577
- if (F = ne.lastIndex - m, S2 = F * g, w + S2 > C && (v = Math.min(v, m + Math.floor((C - w) / g))), w + S2 > i) {
578
- y2 = true;
579
- break;
580
- }
581
- w += S2, A = $, b = m, m = $ = ne.lastIndex;
582
- continue;
583
- }
584
- if (we.lastIndex = m, we.test(e)) {
585
- if (w + u > C && (v = Math.min(v, m)), w + u > i) {
586
- y2 = true;
587
- break;
588
- }
589
- w += u, A = $, b = m, m = $ = we.lastIndex;
590
- continue;
591
- }
592
- if (re.lastIndex = m, re.test(e)) {
593
- if (F = re.lastIndex - m, S2 = F * l, w + S2 > C && (v = Math.min(v, m + Math.floor((C - w) / l))), w + S2 > i) {
594
- y2 = true;
595
- break;
596
- }
597
- w += S2, A = $, b = m, m = $ = re.lastIndex;
598
- continue;
599
- }
600
- if (ie.lastIndex = m, ie.test(e)) {
601
- if (F = ie.lastIndex - m, S2 = F * n, w + S2 > C && (v = Math.min(v, m + Math.floor((C - w) / n))), w + S2 > i) {
602
- y2 = true;
603
- break;
604
- }
605
- w += S2, A = $, b = m, m = $ = ie.lastIndex;
606
- continue;
607
- }
608
- if (Ae.lastIndex = m, Ae.test(e)) {
609
- if (w + p > C && (v = Math.min(v, m)), w + p > i) {
610
- y2 = true;
611
- break;
612
- }
613
- w += p, A = $, b = m, m = $ = Ae.lastIndex;
614
- continue;
615
- }
616
- m += 1;
617
- }
618
- return { width: y2 ? C : w, index: y2 ? v : d, truncated: y2, ellipsed: y2 && i >= o };
619
- };
620
- var Et2 = { limit: 1 / 0, ellipsis: "", ellipsisWidth: 0 };
621
- var D2 = (e, r = {}) => Le(e, Et2, r).width;
622
- var ae = "\x1B";
623
- var je = "\x9B";
624
- var vt2 = 39;
625
- var Ce = "\x07";
626
- var ke = "[";
627
- var wt = "]";
628
- var Ve = "m";
629
- var Se = `${wt}8;;`;
630
- var He = new RegExp(`(?:\\${ke}(?<code>\\d+)m|\\${Se}(?<uri>.*)${Ce})`, "y");
631
- var At2 = (e) => {
632
- if (e >= 30 && e <= 37 || e >= 90 && e <= 97) return 39;
633
- if (e >= 40 && e <= 47 || e >= 100 && e <= 107) return 49;
634
- if (e === 1 || e === 2) return 22;
635
- if (e === 3) return 23;
636
- if (e === 4) return 24;
637
- if (e === 7) return 27;
638
- if (e === 8) return 28;
639
- if (e === 9) return 29;
640
- if (e === 0) return 0;
641
- };
642
- var Ue = (e) => `${ae}${ke}${e}${Ve}`;
643
- var Ke = (e) => `${ae}${Se}${e}${Ce}`;
644
- var Ct2 = (e) => e.map((r) => D2(r));
645
- var Ie = (e, r, s) => {
646
- const i = r[Symbol.iterator]();
647
- let a = false, o = false, u = e.at(-1), l = u === void 0 ? 0 : D2(u), n = i.next(), c = i.next(), p = 0;
648
- for (; !n.done; ) {
649
- const f = n.value, g = D2(f);
650
- l + g <= s ? e[e.length - 1] += f : (e.push(f), l = 0), (f === ae || f === je) && (a = true, o = r.startsWith(Se, p + 1)), a ? o ? f === Ce && (a = false, o = false) : f === Ve && (a = false) : (l += g, l === s && !c.done && (e.push(""), l = 0)), n = c, c = i.next(), p += f.length;
651
- }
652
- u = e.at(-1), !l && u !== void 0 && u.length > 0 && e.length > 1 && (e[e.length - 2] += e.pop());
653
- };
654
- var St = (e) => {
655
- const r = e.split(" ");
656
- let s = r.length;
657
- for (; s > 0 && !(D2(r[s - 1]) > 0); ) s--;
658
- return s === r.length ? e : r.slice(0, s).join(" ") + r.slice(s).join("");
659
- };
660
- var It2 = (e, r, s = {}) => {
661
- if (s.trim !== false && e.trim() === "") return "";
662
- let i = "", a, o;
663
- const u = e.split(" "), l = Ct2(u);
664
- let n = [""];
665
- for (const [$, m] of u.entries()) {
666
- s.trim !== false && (n[n.length - 1] = (n.at(-1) ?? "").trimStart());
667
- let d = D2(n.at(-1) ?? "");
668
- if ($ !== 0 && (d >= r && (s.wordWrap === false || s.trim === false) && (n.push(""), d = 0), (d > 0 || s.trim === false) && (n[n.length - 1] += " ", d++)), s.hard && l[$] > r) {
669
- const F = r - d, y2 = 1 + Math.floor((l[$] - F - 1) / r);
670
- Math.floor((l[$] - 1) / r) < y2 && n.push(""), Ie(n, m, r);
671
- continue;
672
- }
673
- if (d + l[$] > r && d > 0 && l[$] > 0) {
674
- if (s.wordWrap === false && d < r) {
675
- Ie(n, m, r);
676
- continue;
677
- }
678
- n.push("");
679
- }
680
- if (d + l[$] > r && s.wordWrap === false) {
681
- Ie(n, m, r);
682
- continue;
683
- }
684
- n[n.length - 1] += m;
685
- }
686
- s.trim !== false && (n = n.map(($) => St($)));
687
- const c = n.join(`
688
- `), p = c[Symbol.iterator]();
689
- let f = p.next(), g = p.next(), E = 0;
690
- for (; !f.done; ) {
691
- const $ = f.value, m = g.value;
692
- if (i += $, $ === ae || $ === je) {
693
- He.lastIndex = E + 1;
694
- const y2 = He.exec(c)?.groups;
695
- if (y2?.code !== void 0) {
696
- const v = Number.parseFloat(y2.code);
697
- a = v === vt2 ? void 0 : v;
698
- } else y2?.uri !== void 0 && (o = y2.uri.length === 0 ? void 0 : y2.uri);
699
- }
700
- const d = a ? At2(a) : void 0;
701
- m === `
702
- ` ? (o && (i += Ke("")), a && d && (i += Ue(d))) : $ === `
703
- ` && (a && d && (i += Ue(a)), o && (i += Ke(o))), E += $.length, f = g, g = p.next();
704
- }
705
- return i;
706
- };
707
- function J2(e, r, s) {
708
- return String(e).normalize().replaceAll(`\r
709
- `, `
710
- `).split(`
711
- `).map((i) => It2(i, r, s)).join(`
712
- `);
713
- }
714
- var bt2 = (e, r, s, i, a) => {
715
- let o = r, u = 0;
716
- for (let l = s; l < i; l++) {
717
- const n = e[l];
718
- if (o = o - n.length, u++, o <= a) break;
719
- }
720
- return { lineCount: o, removals: u };
721
- };
722
- var X2 = ({ cursor: e, options: r, style: s, output: i = process.stdout, maxItems: a = Number.POSITIVE_INFINITY, columnPadding: o = 0, rowPadding: u = 4 }) => {
723
- const l = rt(i) - o, n = nt(i), c = t("dim", "..."), p = Math.max(n - u, 0), f = Math.max(Math.min(a, p), 5);
724
- let g = 0;
725
- e >= f - 3 && (g = Math.max(Math.min(e - f + 3, r.length - f), 0));
726
- let E = f < r.length && g > 0, $ = f < r.length && g + f < r.length;
727
- const m = Math.min(g + f, r.length), d = [];
728
- let F = 0;
729
- E && F++, $ && F++;
730
- const y2 = g + (E ? 1 : 0), v = m - ($ ? 1 : 0);
731
- for (let A = y2; A < v; A++) {
732
- const b = J2(s(r[A], A === e), l, { hard: true, trim: false }).split(`
733
- `);
734
- d.push(b), F += b.length;
735
- }
736
- if (F > p) {
737
- let A = 0, b = 0, w = F;
738
- const S2 = e - y2, T2 = (M2, O2) => bt2(d, w, M2, O2, p);
739
- E ? ({ lineCount: w, removals: A } = T2(0, S2), w > p && ({ lineCount: w, removals: b } = T2(S2 + 1, d.length))) : ({ lineCount: w, removals: b } = T2(S2 + 1, d.length), w > p && ({ lineCount: w, removals: A } = T2(0, S2))), A > 0 && (E = true, d.splice(0, A)), b > 0 && ($ = true, d.splice(d.length - b, b));
740
- }
741
- const C = [];
742
- E && C.push(c);
743
- for (const A of d) for (const b of A) C.push(b);
744
- return $ && C.push(c), C;
745
- };
746
- var Rt = (e) => {
747
- const r = e.active ?? "Yes", s = e.inactive ?? "No";
748
- return new kt({ active: r, inactive: s, signal: e.signal, input: e.input, output: e.output, initialValue: e.initialValue ?? true, render() {
749
- const i = e.withGuide ?? _.withGuide, a = `${i ? `${t("gray", h)}
750
- ` : ""}${W2(this.state)} ${e.message}
751
- `, o = this.value ? r : s;
752
- switch (this.state) {
753
- case "submit": {
754
- const u = i ? `${t("gray", h)} ` : "";
755
- return `${a}${u}${t("dim", o)}`;
756
- }
757
- case "cancel": {
758
- const u = i ? `${t("gray", h)} ` : "";
759
- return `${a}${u}${t(["strikethrough", "dim"], o)}${i ? `
760
- ${t("gray", h)}` : ""}`;
761
- }
762
- default: {
763
- const u = i ? `${t("cyan", h)} ` : "", l = i ? t("cyan", x2) : "";
764
- return `${a}${u}${this.value ? `${t("green", z2)} ${r}` : `${t("dim", H2)} ${t("dim", r)}`}${e.vertical ? i ? `
765
- ${t("cyan", h)} ` : `
766
- ` : ` ${t("dim", "/")} `}${this.value ? `${t("dim", H2)} ${t("dim", s)}` : `${t("green", z2)} ${s}`}
767
- ${l}
768
- `;
769
- }
770
- }
771
- } }).prompt();
772
- };
773
- var Wt2 = (e = "", r) => {
774
- const s = r?.output ?? process.stdout, i = r?.withGuide ?? _.withGuide ? `${t("gray", he)} ` : "";
775
- s.write(`${i}${e}
776
- `);
777
- };
778
- var Gt = (e = "", r) => {
779
- const s = r?.output ?? process.stdout, i = r?.withGuide ?? _.withGuide ? `${t("gray", h)}
780
- ${t("gray", x2)} ` : "";
781
- s.write(`${i}${e}
782
-
783
- `);
784
- };
785
- var Q2 = (e, r) => e.split(`
786
- `).map((s) => r(s)).join(`
787
- `);
788
- var Lt2 = (e) => {
789
- const r = (i, a) => {
790
- const o = i.label ?? String(i.value);
791
- return a === "disabled" ? `${t("gray", q2)} ${Q2(o, (u) => t(["strikethrough", "gray"], u))}${i.hint ? ` ${t("dim", `(${i.hint ?? "disabled"})`)}` : ""}` : a === "active" ? `${t("cyan", te)} ${o}${i.hint ? ` ${t("dim", `(${i.hint})`)}` : ""}` : a === "selected" ? `${t("green", U2)} ${Q2(o, (u) => t("dim", u))}${i.hint ? ` ${t("dim", `(${i.hint})`)}` : ""}` : a === "cancelled" ? `${Q2(o, (u) => t(["strikethrough", "dim"], u))}` : a === "active-selected" ? `${t("green", U2)} ${o}${i.hint ? ` ${t("dim", `(${i.hint})`)}` : ""}` : a === "submitted" ? `${Q2(o, (u) => t("dim", u))}` : `${t("dim", q2)} ${Q2(o, (u) => t("dim", u))}`;
792
- }, s = e.required ?? true;
793
- return new Lt({ options: e.options, signal: e.signal, input: e.input, output: e.output, initialValues: e.initialValues, required: s, cursorAt: e.cursorAt, validate(i) {
794
- if (s && (i === void 0 || i.length === 0)) return `Please select at least one option.
795
- ${t("reset", t("dim", `Press ${t(["gray", "bgWhite", "inverse"], " space ")} to select, ${t("gray", t("bgWhite", t("inverse", " enter ")))} to submit`))}`;
796
- }, render() {
797
- const i = Bt(e.output, e.message, `${ve(this.state)} `, `${W2(this.state)} `), a = `${t("gray", h)}
798
- ${i}
799
- `, o = this.value ?? [], u = (l, n) => {
800
- if (l.disabled) return r(l, "disabled");
801
- const c = o.includes(l.value);
802
- return n && c ? r(l, "active-selected") : c ? r(l, "selected") : r(l, n ? "active" : "inactive");
803
- };
804
- switch (this.state) {
805
- case "submit": {
806
- const l = this.options.filter(({ value: c }) => o.includes(c)).map((c) => r(c, "submitted")).join(t("dim", ", ")) || t("dim", "none"), n = Bt(e.output, l, `${t("gray", h)} `);
807
- return `${a}${n}`;
808
- }
809
- case "cancel": {
810
- const l = this.options.filter(({ value: c }) => o.includes(c)).map((c) => r(c, "cancelled")).join(t("dim", ", "));
811
- if (l.trim() === "") return `${a}${t("gray", h)}`;
812
- const n = Bt(e.output, l, `${t("gray", h)} `);
813
- return `${a}${n}
814
- ${t("gray", h)}`;
815
- }
816
- case "error": {
817
- const l = `${t("yellow", h)} `, n = this.error.split(`
818
- `).map((f, g) => g === 0 ? `${t("yellow", x2)} ${t("yellow", f)}` : ` ${f}`).join(`
819
- `), c = a.split(`
820
- `).length, p = n.split(`
821
- `).length + 1;
822
- return `${a}${l}${X2({ output: e.output, options: this.options, cursor: this.cursor, maxItems: e.maxItems, columnPadding: l.length, rowPadding: c + p, style: u }).join(`
823
- ${l}`)}
824
- ${n}
825
- `;
826
- }
827
- default: {
828
- const l = `${t("cyan", h)} `, n = a.split(`
829
- `).length;
830
- return `${a}${l}${X2({ output: e.output, options: this.options, cursor: this.cursor, maxItems: e.maxItems, columnPadding: l.length, rowPadding: n + 2, style: u }).join(`
831
- ${l}`)}
832
- ${t("cyan", x2)}
833
- `;
834
- }
835
- }
836
- } }).prompt();
837
- };
838
- var jt = (e) => t("dim", e);
839
- var kt2 = (e, r, s) => {
840
- const i = { hard: true, trim: false }, a = J2(e, r, i).split(`
841
- `), o = a.reduce((n, c) => Math.max(D2(c), n), 0), u = a.map(s).reduce((n, c) => Math.max(D2(c), n), 0), l = r - (u - o);
842
- return J2(e, l, i);
843
- };
844
- var Vt2 = (e = "", r = "", s) => {
845
- const i = s?.output ?? N2.stdout, a = s?.withGuide ?? _.withGuide, o = s?.format ?? jt, u = ["", ...kt2(e, rt(i) - 6, o).split(`
846
- `).map(o), ""], l = D2(r), n = Math.max(u.reduce((g, E) => {
847
- const $ = D2(E);
848
- return $ > g ? $ : g;
849
- }, 0), l) + 2, c = u.map((g) => `${t("gray", h)} ${g}${" ".repeat(n - D2(g))}${t("gray", h)}`).join(`
850
- `), p = a ? `${t("gray", h)}
851
- ` : "", f = a ? We : ge;
852
- i.write(`${p}${t("green", V)} ${t("reset", r)} ${t("gray", se.repeat(Math.max(n - l - 1, 1)) + pe)}
853
- ${c}
854
- ${t("gray", f + se.repeat(n + 2) + me)}
855
- `);
856
- };
857
- var ze = { light: I2("\u2500", "-"), heavy: I2("\u2501", "="), block: I2("\u2588", "#") };
858
- var oe = (e, r) => e.includes(`
859
- `) ? e.split(`
860
- `).map((s) => r(s)).join(`
861
- `) : r(e);
862
- var Jt = (e) => {
863
- const r = (s, i) => {
864
- const a = s.label ?? String(s.value);
865
- switch (i) {
866
- case "disabled":
867
- return `${t("gray", H2)} ${oe(a, (o) => t("gray", o))}${s.hint ? ` ${t("dim", `(${s.hint ?? "disabled"})`)}` : ""}`;
868
- case "selected":
869
- return `${oe(a, (o) => t("dim", o))}`;
870
- case "active":
871
- return `${t("green", z2)} ${a}${s.hint ? ` ${t("dim", `(${s.hint})`)}` : ""}`;
872
- case "cancelled":
873
- return `${oe(a, (o) => t(["strikethrough", "dim"], o))}`;
874
- default:
875
- return `${t("dim", H2)} ${oe(a, (o) => t("dim", o))}`;
876
- }
877
- };
878
- return new Tt({ options: e.options, signal: e.signal, input: e.input, output: e.output, initialValue: e.initialValue, render() {
879
- const s = e.withGuide ?? _.withGuide, i = `${W2(this.state)} `, a = `${ve(this.state)} `, o = Bt(e.output, e.message, a, i), u = `${s ? `${t("gray", h)}
880
- ` : ""}${o}
881
- `;
882
- switch (this.state) {
883
- case "submit": {
884
- const l = s ? `${t("gray", h)} ` : "", n = Bt(e.output, r(this.options[this.cursor], "selected"), l);
885
- return `${u}${n}`;
886
- }
887
- case "cancel": {
888
- const l = s ? `${t("gray", h)} ` : "", n = Bt(e.output, r(this.options[this.cursor], "cancelled"), l);
889
- return `${u}${n}${s ? `
890
- ${t("gray", h)}` : ""}`;
891
- }
892
- default: {
893
- const l = s ? `${t("cyan", h)} ` : "", n = s ? t("cyan", x2) : "", c = u.split(`
894
- `).length, p = s ? 2 : 1;
895
- return `${u}${l}${X2({ output: e.output, cursor: this.cursor, options: this.options, maxItems: e.maxItems, columnPadding: l.length, rowPadding: c + p, style: (f, g) => r(f, f.disabled ? "disabled" : g ? "active" : "inactive") }).join(`
896
- ${l}`)}
897
- ${n}
898
- `;
899
- }
900
- }
901
- } }).prompt();
902
- };
903
- var Qe = `${t("gray", h)} `;
904
-
905
- export {
906
- Ct,
907
- Bt,
908
- Lt,
909
- h,
910
- x2 as x,
911
- te,
912
- U2 as U,
913
- q2 as q,
914
- W2 as W,
915
- Rt,
916
- Wt2 as Wt,
917
- Gt,
918
- Lt2,
919
- Vt2 as Vt,
920
- Jt
921
- };
922
- //# sourceMappingURL=chunk-Z5K4FHYP.js.map