@dexto/core 1.1.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.
@@ -0,0 +1,2203 @@
1
+ import {
2
+ __commonJS,
3
+ __toESM,
4
+ init_esm_shims
5
+ } from "./chunk-MVKLS3LM.js";
6
+
7
+ // ../../node_modules/.pnpm/eastasianwidth@0.2.0/node_modules/eastasianwidth/eastasianwidth.js
8
+ var require_eastasianwidth = __commonJS({
9
+ "../../node_modules/.pnpm/eastasianwidth@0.2.0/node_modules/eastasianwidth/eastasianwidth.js"(exports, module) {
10
+ "use strict";
11
+ init_esm_shims();
12
+ var eaw = {};
13
+ if ("undefined" == typeof module) {
14
+ window.eastasianwidth = eaw;
15
+ } else {
16
+ module.exports = eaw;
17
+ }
18
+ eaw.eastAsianWidth = function(character) {
19
+ var x = character.charCodeAt(0);
20
+ var y = character.length == 2 ? character.charCodeAt(1) : 0;
21
+ var codePoint = x;
22
+ if (55296 <= x && x <= 56319 && (56320 <= y && y <= 57343)) {
23
+ x &= 1023;
24
+ y &= 1023;
25
+ codePoint = x << 10 | y;
26
+ codePoint += 65536;
27
+ }
28
+ if (12288 == codePoint || 65281 <= codePoint && codePoint <= 65376 || 65504 <= codePoint && codePoint <= 65510) {
29
+ return "F";
30
+ }
31
+ 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) {
32
+ return "H";
33
+ }
34
+ 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) {
35
+ return "W";
36
+ }
37
+ 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) {
38
+ return "Na";
39
+ }
40
+ 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) {
41
+ return "A";
42
+ }
43
+ return "N";
44
+ };
45
+ eaw.characterLength = function(character) {
46
+ var code = this.eastAsianWidth(character);
47
+ if (code == "F" || code == "W" || code == "A") {
48
+ return 2;
49
+ } else {
50
+ return 1;
51
+ }
52
+ };
53
+ function stringToArray(string) {
54
+ return string.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g) || [];
55
+ }
56
+ eaw.length = function(string) {
57
+ var characters = stringToArray(string);
58
+ var len = 0;
59
+ for (var i = 0; i < characters.length; i++) {
60
+ len = len + this.characterLength(characters[i]);
61
+ }
62
+ return len;
63
+ };
64
+ eaw.slice = function(text, start, end) {
65
+ textLen = eaw.length(text);
66
+ start = start ? start : 0;
67
+ end = end ? end : 1;
68
+ if (start < 0) {
69
+ start = textLen + start;
70
+ }
71
+ if (end < 0) {
72
+ end = textLen + end;
73
+ }
74
+ var result = "";
75
+ var eawLen = 0;
76
+ var chars = stringToArray(text);
77
+ for (var i = 0; i < chars.length; i++) {
78
+ var char = chars[i];
79
+ var charLen = eaw.length(char);
80
+ if (eawLen >= start - (charLen == 2 ? 1 : 0)) {
81
+ if (eawLen + charLen <= end) {
82
+ result += char;
83
+ } else {
84
+ break;
85
+ }
86
+ }
87
+ eawLen += charLen;
88
+ }
89
+ return result;
90
+ };
91
+ }
92
+ });
93
+
94
+ // ../../node_modules/.pnpm/emoji-regex@9.2.2/node_modules/emoji-regex/index.js
95
+ var require_emoji_regex = __commonJS({
96
+ "../../node_modules/.pnpm/emoji-regex@9.2.2/node_modules/emoji-regex/index.js"(exports, module) {
97
+ "use strict";
98
+ init_esm_shims();
99
+ module.exports = function() {
100
+ 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;
101
+ };
102
+ }
103
+ });
104
+
105
+ // ../../node_modules/.pnpm/cli-boxes@3.0.0/node_modules/cli-boxes/boxes.json
106
+ var require_boxes = __commonJS({
107
+ "../../node_modules/.pnpm/cli-boxes@3.0.0/node_modules/cli-boxes/boxes.json"(exports, module) {
108
+ module.exports = {
109
+ single: {
110
+ topLeft: "\u250C",
111
+ top: "\u2500",
112
+ topRight: "\u2510",
113
+ right: "\u2502",
114
+ bottomRight: "\u2518",
115
+ bottom: "\u2500",
116
+ bottomLeft: "\u2514",
117
+ left: "\u2502"
118
+ },
119
+ double: {
120
+ topLeft: "\u2554",
121
+ top: "\u2550",
122
+ topRight: "\u2557",
123
+ right: "\u2551",
124
+ bottomRight: "\u255D",
125
+ bottom: "\u2550",
126
+ bottomLeft: "\u255A",
127
+ left: "\u2551"
128
+ },
129
+ round: {
130
+ topLeft: "\u256D",
131
+ top: "\u2500",
132
+ topRight: "\u256E",
133
+ right: "\u2502",
134
+ bottomRight: "\u256F",
135
+ bottom: "\u2500",
136
+ bottomLeft: "\u2570",
137
+ left: "\u2502"
138
+ },
139
+ bold: {
140
+ topLeft: "\u250F",
141
+ top: "\u2501",
142
+ topRight: "\u2513",
143
+ right: "\u2503",
144
+ bottomRight: "\u251B",
145
+ bottom: "\u2501",
146
+ bottomLeft: "\u2517",
147
+ left: "\u2503"
148
+ },
149
+ singleDouble: {
150
+ topLeft: "\u2553",
151
+ top: "\u2500",
152
+ topRight: "\u2556",
153
+ right: "\u2551",
154
+ bottomRight: "\u255C",
155
+ bottom: "\u2500",
156
+ bottomLeft: "\u2559",
157
+ left: "\u2551"
158
+ },
159
+ doubleSingle: {
160
+ topLeft: "\u2552",
161
+ top: "\u2550",
162
+ topRight: "\u2555",
163
+ right: "\u2502",
164
+ bottomRight: "\u255B",
165
+ bottom: "\u2550",
166
+ bottomLeft: "\u2558",
167
+ left: "\u2502"
168
+ },
169
+ classic: {
170
+ topLeft: "+",
171
+ top: "-",
172
+ topRight: "+",
173
+ right: "|",
174
+ bottomRight: "+",
175
+ bottom: "-",
176
+ bottomLeft: "+",
177
+ left: "|"
178
+ },
179
+ arrow: {
180
+ topLeft: "\u2198",
181
+ top: "\u2193",
182
+ topRight: "\u2199",
183
+ right: "\u2190",
184
+ bottomRight: "\u2196",
185
+ bottom: "\u2191",
186
+ bottomLeft: "\u2197",
187
+ left: "\u2192"
188
+ }
189
+ };
190
+ }
191
+ });
192
+
193
+ // ../../node_modules/.pnpm/cli-boxes@3.0.0/node_modules/cli-boxes/index.js
194
+ var require_cli_boxes = __commonJS({
195
+ "../../node_modules/.pnpm/cli-boxes@3.0.0/node_modules/cli-boxes/index.js"(exports, module) {
196
+ "use strict";
197
+ init_esm_shims();
198
+ var cliBoxes2 = require_boxes();
199
+ module.exports = cliBoxes2;
200
+ module.exports.default = cliBoxes2;
201
+ }
202
+ });
203
+
204
+ // ../../node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/index.js
205
+ var require_ansi_regex = __commonJS({
206
+ "../../node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/index.js"(exports, module) {
207
+ "use strict";
208
+ init_esm_shims();
209
+ module.exports = ({ onlyFirst = false } = {}) => {
210
+ const pattern = [
211
+ "[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
212
+ "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"
213
+ ].join("|");
214
+ return new RegExp(pattern, onlyFirst ? void 0 : "g");
215
+ };
216
+ }
217
+ });
218
+
219
+ // ../../node_modules/.pnpm/strip-ansi@6.0.1/node_modules/strip-ansi/index.js
220
+ var require_strip_ansi = __commonJS({
221
+ "../../node_modules/.pnpm/strip-ansi@6.0.1/node_modules/strip-ansi/index.js"(exports, module) {
222
+ "use strict";
223
+ init_esm_shims();
224
+ var ansiRegex2 = require_ansi_regex();
225
+ module.exports = (string) => typeof string === "string" ? string.replace(ansiRegex2(), "") : string;
226
+ }
227
+ });
228
+
229
+ // ../../node_modules/.pnpm/is-fullwidth-code-point@3.0.0/node_modules/is-fullwidth-code-point/index.js
230
+ var require_is_fullwidth_code_point = __commonJS({
231
+ "../../node_modules/.pnpm/is-fullwidth-code-point@3.0.0/node_modules/is-fullwidth-code-point/index.js"(exports, module) {
232
+ "use strict";
233
+ init_esm_shims();
234
+ var isFullwidthCodePoint = (codePoint) => {
235
+ if (Number.isNaN(codePoint)) {
236
+ return false;
237
+ }
238
+ if (codePoint >= 4352 && (codePoint <= 4447 || // Hangul Jamo
239
+ codePoint === 9001 || // LEFT-POINTING ANGLE BRACKET
240
+ codePoint === 9002 || // RIGHT-POINTING ANGLE BRACKET
241
+ // CJK Radicals Supplement .. Enclosed CJK Letters and Months
242
+ 11904 <= codePoint && codePoint <= 12871 && codePoint !== 12351 || // Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A
243
+ 12880 <= codePoint && codePoint <= 19903 || // CJK Unified Ideographs .. Yi Radicals
244
+ 19968 <= codePoint && codePoint <= 42182 || // Hangul Jamo Extended-A
245
+ 43360 <= codePoint && codePoint <= 43388 || // Hangul Syllables
246
+ 44032 <= codePoint && codePoint <= 55203 || // CJK Compatibility Ideographs
247
+ 63744 <= codePoint && codePoint <= 64255 || // Vertical Forms
248
+ 65040 <= codePoint && codePoint <= 65049 || // CJK Compatibility Forms .. Small Form Variants
249
+ 65072 <= codePoint && codePoint <= 65131 || // Halfwidth and Fullwidth Forms
250
+ 65281 <= codePoint && codePoint <= 65376 || 65504 <= codePoint && codePoint <= 65510 || // Kana Supplement
251
+ 110592 <= codePoint && codePoint <= 110593 || // Enclosed Ideographic Supplement
252
+ 127488 <= codePoint && codePoint <= 127569 || // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane
253
+ 131072 <= codePoint && codePoint <= 262141)) {
254
+ return true;
255
+ }
256
+ return false;
257
+ };
258
+ module.exports = isFullwidthCodePoint;
259
+ module.exports.default = isFullwidthCodePoint;
260
+ }
261
+ });
262
+
263
+ // ../../node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/index.js
264
+ var require_emoji_regex2 = __commonJS({
265
+ "../../node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/index.js"(exports, module) {
266
+ "use strict";
267
+ init_esm_shims();
268
+ module.exports = function() {
269
+ return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g;
270
+ };
271
+ }
272
+ });
273
+
274
+ // ../../node_modules/.pnpm/string-width@4.2.3/node_modules/string-width/index.js
275
+ var require_string_width = __commonJS({
276
+ "../../node_modules/.pnpm/string-width@4.2.3/node_modules/string-width/index.js"(exports, module) {
277
+ "use strict";
278
+ init_esm_shims();
279
+ var stripAnsi2 = require_strip_ansi();
280
+ var isFullwidthCodePoint = require_is_fullwidth_code_point();
281
+ var emojiRegex2 = require_emoji_regex2();
282
+ var stringWidth2 = (string) => {
283
+ if (typeof string !== "string" || string.length === 0) {
284
+ return 0;
285
+ }
286
+ string = stripAnsi2(string);
287
+ if (string.length === 0) {
288
+ return 0;
289
+ }
290
+ string = string.replace(emojiRegex2(), " ");
291
+ let width = 0;
292
+ for (let i = 0; i < string.length; i++) {
293
+ const code = string.codePointAt(i);
294
+ if (code <= 31 || code >= 127 && code <= 159) {
295
+ continue;
296
+ }
297
+ if (code >= 768 && code <= 879) {
298
+ continue;
299
+ }
300
+ if (code > 65535) {
301
+ i++;
302
+ }
303
+ width += isFullwidthCodePoint(code) ? 2 : 1;
304
+ }
305
+ return width;
306
+ };
307
+ module.exports = stringWidth2;
308
+ module.exports.default = stringWidth2;
309
+ }
310
+ });
311
+
312
+ // ../../node_modules/.pnpm/ansi-align@3.0.1/node_modules/ansi-align/index.js
313
+ var require_ansi_align = __commonJS({
314
+ "../../node_modules/.pnpm/ansi-align@3.0.1/node_modules/ansi-align/index.js"(exports, module) {
315
+ "use strict";
316
+ init_esm_shims();
317
+ var stringWidth2 = require_string_width();
318
+ function ansiAlign2(text, opts) {
319
+ if (!text) return text;
320
+ opts = opts || {};
321
+ const align = opts.align || "center";
322
+ if (align === "left") return text;
323
+ const split = opts.split || "\n";
324
+ const pad = opts.pad || " ";
325
+ const widthDiffFn = align !== "right" ? halfDiff : fullDiff;
326
+ let returnString = false;
327
+ if (!Array.isArray(text)) {
328
+ returnString = true;
329
+ text = String(text).split(split);
330
+ }
331
+ let width;
332
+ let maxWidth = 0;
333
+ text = text.map(function(str) {
334
+ str = String(str);
335
+ width = stringWidth2(str);
336
+ maxWidth = Math.max(width, maxWidth);
337
+ return {
338
+ str,
339
+ width
340
+ };
341
+ }).map(function(obj) {
342
+ return new Array(widthDiffFn(maxWidth, obj.width) + 1).join(pad) + obj.str;
343
+ });
344
+ return returnString ? text.join(split) : text;
345
+ }
346
+ ansiAlign2.left = function left(text) {
347
+ return ansiAlign2(text, { align: "left" });
348
+ };
349
+ ansiAlign2.center = function center(text) {
350
+ return ansiAlign2(text, { align: "center" });
351
+ };
352
+ ansiAlign2.right = function right(text) {
353
+ return ansiAlign2(text, { align: "right" });
354
+ };
355
+ module.exports = ansiAlign2;
356
+ function halfDiff(maxWidth, curWidth) {
357
+ return Math.floor((maxWidth - curWidth) / 2);
358
+ }
359
+ function fullDiff(maxWidth, curWidth) {
360
+ return maxWidth - curWidth;
361
+ }
362
+ }
363
+ });
364
+
365
+ // src/utils/path.ts
366
+ init_esm_shims();
367
+ import * as path4 from "path";
368
+ import { existsSync } from "fs";
369
+ import { promises as fs2 } from "fs";
370
+ import { homedir } from "os";
371
+ import { createRequire } from "module";
372
+
373
+ // src/utils/fs-walk.ts
374
+ init_esm_shims();
375
+ import * as path from "path";
376
+ function walkUpDirectories(startPath, predicate) {
377
+ let currentPath = path.resolve(startPath);
378
+ const rootPath = path.parse(currentPath).root;
379
+ while (true) {
380
+ if (predicate(currentPath)) {
381
+ return currentPath;
382
+ }
383
+ if (currentPath === rootPath) break;
384
+ const parent = path.dirname(currentPath);
385
+ if (parent === currentPath) break;
386
+ currentPath = parent;
387
+ }
388
+ return null;
389
+ }
390
+
391
+ // src/utils/execution-context.ts
392
+ init_esm_shims();
393
+ import { readFileSync } from "fs";
394
+ import * as path2 from "path";
395
+ function isDextoSourceDirectory(dirPath) {
396
+ const packageJsonPath = path2.join(dirPath, "package.json");
397
+ try {
398
+ const pkg = JSON.parse(readFileSync(packageJsonPath, "utf-8"));
399
+ return pkg.name === "dexto-monorepo";
400
+ } catch {
401
+ return false;
402
+ }
403
+ }
404
+ function isDextoProjectDirectory(dirPath) {
405
+ const packageJsonPath = path2.join(dirPath, "package.json");
406
+ try {
407
+ const pkg = JSON.parse(readFileSync(packageJsonPath, "utf-8"));
408
+ if (pkg.name === "dexto" || pkg.name === "@dexto/core" || pkg.name === "@dexto/webui") {
409
+ return false;
410
+ }
411
+ const allDeps = {
412
+ ...pkg.dependencies ?? {},
413
+ ...pkg.devDependencies ?? {},
414
+ ...pkg.peerDependencies ?? {}
415
+ };
416
+ return "dexto" in allDeps || "@dexto/core" in allDeps;
417
+ } catch {
418
+ return false;
419
+ }
420
+ }
421
+ function findDextoSourceRoot(startPath = process.cwd()) {
422
+ return walkUpDirectories(startPath, isDextoSourceDirectory);
423
+ }
424
+ function findDextoProjectRoot(startPath = process.cwd()) {
425
+ return walkUpDirectories(startPath, isDextoProjectDirectory);
426
+ }
427
+ function getExecutionContext(startPath = process.cwd()) {
428
+ if (findDextoSourceRoot(startPath)) {
429
+ return "dexto-source";
430
+ }
431
+ if (findDextoProjectRoot(startPath)) {
432
+ return "dexto-project";
433
+ }
434
+ return "global-cli";
435
+ }
436
+
437
+ // src/logger/logger.ts
438
+ init_esm_shims();
439
+ import * as winston from "winston";
440
+
441
+ // ../../node_modules/.pnpm/chalk@5.6.0/node_modules/chalk/source/index.js
442
+ init_esm_shims();
443
+
444
+ // ../../node_modules/.pnpm/chalk@5.6.0/node_modules/chalk/source/vendor/ansi-styles/index.js
445
+ init_esm_shims();
446
+ var ANSI_BACKGROUND_OFFSET = 10;
447
+ var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
448
+ var wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
449
+ var wrapAnsi16m = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`;
450
+ var styles = {
451
+ modifier: {
452
+ reset: [0, 0],
453
+ // 21 isn't widely supported and 22 does the same thing
454
+ bold: [1, 22],
455
+ dim: [2, 22],
456
+ italic: [3, 23],
457
+ underline: [4, 24],
458
+ overline: [53, 55],
459
+ inverse: [7, 27],
460
+ hidden: [8, 28],
461
+ strikethrough: [9, 29]
462
+ },
463
+ color: {
464
+ black: [30, 39],
465
+ red: [31, 39],
466
+ green: [32, 39],
467
+ yellow: [33, 39],
468
+ blue: [34, 39],
469
+ magenta: [35, 39],
470
+ cyan: [36, 39],
471
+ white: [37, 39],
472
+ // Bright color
473
+ blackBright: [90, 39],
474
+ gray: [90, 39],
475
+ // Alias of `blackBright`
476
+ grey: [90, 39],
477
+ // Alias of `blackBright`
478
+ redBright: [91, 39],
479
+ greenBright: [92, 39],
480
+ yellowBright: [93, 39],
481
+ blueBright: [94, 39],
482
+ magentaBright: [95, 39],
483
+ cyanBright: [96, 39],
484
+ whiteBright: [97, 39]
485
+ },
486
+ bgColor: {
487
+ bgBlack: [40, 49],
488
+ bgRed: [41, 49],
489
+ bgGreen: [42, 49],
490
+ bgYellow: [43, 49],
491
+ bgBlue: [44, 49],
492
+ bgMagenta: [45, 49],
493
+ bgCyan: [46, 49],
494
+ bgWhite: [47, 49],
495
+ // Bright color
496
+ bgBlackBright: [100, 49],
497
+ bgGray: [100, 49],
498
+ // Alias of `bgBlackBright`
499
+ bgGrey: [100, 49],
500
+ // Alias of `bgBlackBright`
501
+ bgRedBright: [101, 49],
502
+ bgGreenBright: [102, 49],
503
+ bgYellowBright: [103, 49],
504
+ bgBlueBright: [104, 49],
505
+ bgMagentaBright: [105, 49],
506
+ bgCyanBright: [106, 49],
507
+ bgWhiteBright: [107, 49]
508
+ }
509
+ };
510
+ var modifierNames = Object.keys(styles.modifier);
511
+ var foregroundColorNames = Object.keys(styles.color);
512
+ var backgroundColorNames = Object.keys(styles.bgColor);
513
+ var colorNames = [...foregroundColorNames, ...backgroundColorNames];
514
+ function assembleStyles() {
515
+ const codes = /* @__PURE__ */ new Map();
516
+ for (const [groupName, group] of Object.entries(styles)) {
517
+ for (const [styleName, style] of Object.entries(group)) {
518
+ styles[styleName] = {
519
+ open: `\x1B[${style[0]}m`,
520
+ close: `\x1B[${style[1]}m`
521
+ };
522
+ group[styleName] = styles[styleName];
523
+ codes.set(style[0], style[1]);
524
+ }
525
+ Object.defineProperty(styles, groupName, {
526
+ value: group,
527
+ enumerable: false
528
+ });
529
+ }
530
+ Object.defineProperty(styles, "codes", {
531
+ value: codes,
532
+ enumerable: false
533
+ });
534
+ styles.color.close = "\x1B[39m";
535
+ styles.bgColor.close = "\x1B[49m";
536
+ styles.color.ansi = wrapAnsi16();
537
+ styles.color.ansi256 = wrapAnsi256();
538
+ styles.color.ansi16m = wrapAnsi16m();
539
+ styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
540
+ styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
541
+ styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
542
+ Object.defineProperties(styles, {
543
+ rgbToAnsi256: {
544
+ value(red, green, blue) {
545
+ if (red === green && green === blue) {
546
+ if (red < 8) {
547
+ return 16;
548
+ }
549
+ if (red > 248) {
550
+ return 231;
551
+ }
552
+ return Math.round((red - 8) / 247 * 24) + 232;
553
+ }
554
+ return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5);
555
+ },
556
+ enumerable: false
557
+ },
558
+ hexToRgb: {
559
+ value(hex) {
560
+ const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
561
+ if (!matches) {
562
+ return [0, 0, 0];
563
+ }
564
+ let [colorString] = matches;
565
+ if (colorString.length === 3) {
566
+ colorString = [...colorString].map((character) => character + character).join("");
567
+ }
568
+ const integer = Number.parseInt(colorString, 16);
569
+ return [
570
+ /* eslint-disable no-bitwise */
571
+ integer >> 16 & 255,
572
+ integer >> 8 & 255,
573
+ integer & 255
574
+ /* eslint-enable no-bitwise */
575
+ ];
576
+ },
577
+ enumerable: false
578
+ },
579
+ hexToAnsi256: {
580
+ value: (hex) => styles.rgbToAnsi256(...styles.hexToRgb(hex)),
581
+ enumerable: false
582
+ },
583
+ ansi256ToAnsi: {
584
+ value(code) {
585
+ if (code < 8) {
586
+ return 30 + code;
587
+ }
588
+ if (code < 16) {
589
+ return 90 + (code - 8);
590
+ }
591
+ let red;
592
+ let green;
593
+ let blue;
594
+ if (code >= 232) {
595
+ red = ((code - 232) * 10 + 8) / 255;
596
+ green = red;
597
+ blue = red;
598
+ } else {
599
+ code -= 16;
600
+ const remainder = code % 36;
601
+ red = Math.floor(code / 36) / 5;
602
+ green = Math.floor(remainder / 6) / 5;
603
+ blue = remainder % 6 / 5;
604
+ }
605
+ const value = Math.max(red, green, blue) * 2;
606
+ if (value === 0) {
607
+ return 30;
608
+ }
609
+ let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red));
610
+ if (value === 2) {
611
+ result += 60;
612
+ }
613
+ return result;
614
+ },
615
+ enumerable: false
616
+ },
617
+ rgbToAnsi: {
618
+ value: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),
619
+ enumerable: false
620
+ },
621
+ hexToAnsi: {
622
+ value: (hex) => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),
623
+ enumerable: false
624
+ }
625
+ });
626
+ return styles;
627
+ }
628
+ var ansiStyles = assembleStyles();
629
+ var ansi_styles_default = ansiStyles;
630
+
631
+ // ../../node_modules/.pnpm/chalk@5.6.0/node_modules/chalk/source/vendor/supports-color/index.js
632
+ init_esm_shims();
633
+ import process2 from "process";
634
+ import os from "os";
635
+ import tty from "tty";
636
+ function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process2.argv) {
637
+ const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
638
+ const position = argv.indexOf(prefix + flag);
639
+ const terminatorPosition = argv.indexOf("--");
640
+ return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
641
+ }
642
+ var { env } = process2;
643
+ var flagForceColor;
644
+ if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
645
+ flagForceColor = 0;
646
+ } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
647
+ flagForceColor = 1;
648
+ }
649
+ function envForceColor() {
650
+ if ("FORCE_COLOR" in env) {
651
+ if (env.FORCE_COLOR === "true") {
652
+ return 1;
653
+ }
654
+ if (env.FORCE_COLOR === "false") {
655
+ return 0;
656
+ }
657
+ return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
658
+ }
659
+ }
660
+ function translateLevel(level) {
661
+ if (level === 0) {
662
+ return false;
663
+ }
664
+ return {
665
+ level,
666
+ hasBasic: true,
667
+ has256: level >= 2,
668
+ has16m: level >= 3
669
+ };
670
+ }
671
+ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
672
+ const noFlagForceColor = envForceColor();
673
+ if (noFlagForceColor !== void 0) {
674
+ flagForceColor = noFlagForceColor;
675
+ }
676
+ const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
677
+ if (forceColor === 0) {
678
+ return 0;
679
+ }
680
+ if (sniffFlags) {
681
+ if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
682
+ return 3;
683
+ }
684
+ if (hasFlag("color=256")) {
685
+ return 2;
686
+ }
687
+ }
688
+ if ("TF_BUILD" in env && "AGENT_NAME" in env) {
689
+ return 1;
690
+ }
691
+ if (haveStream && !streamIsTTY && forceColor === void 0) {
692
+ return 0;
693
+ }
694
+ const min = forceColor || 0;
695
+ if (env.TERM === "dumb") {
696
+ return min;
697
+ }
698
+ if (process2.platform === "win32") {
699
+ const osRelease = os.release().split(".");
700
+ if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
701
+ return Number(osRelease[2]) >= 14931 ? 3 : 2;
702
+ }
703
+ return 1;
704
+ }
705
+ if ("CI" in env) {
706
+ if (["GITHUB_ACTIONS", "GITEA_ACTIONS", "CIRCLECI"].some((key) => key in env)) {
707
+ return 3;
708
+ }
709
+ if (["TRAVIS", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
710
+ return 1;
711
+ }
712
+ return min;
713
+ }
714
+ if ("TEAMCITY_VERSION" in env) {
715
+ return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
716
+ }
717
+ if (env.COLORTERM === "truecolor") {
718
+ return 3;
719
+ }
720
+ if (env.TERM === "xterm-kitty") {
721
+ return 3;
722
+ }
723
+ if (env.TERM === "xterm-ghostty") {
724
+ return 3;
725
+ }
726
+ if (env.TERM === "wezterm") {
727
+ return 3;
728
+ }
729
+ if ("TERM_PROGRAM" in env) {
730
+ const version = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
731
+ switch (env.TERM_PROGRAM) {
732
+ case "iTerm.app": {
733
+ return version >= 3 ? 3 : 2;
734
+ }
735
+ case "Apple_Terminal": {
736
+ return 2;
737
+ }
738
+ }
739
+ }
740
+ if (/-256(color)?$/i.test(env.TERM)) {
741
+ return 2;
742
+ }
743
+ if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
744
+ return 1;
745
+ }
746
+ if ("COLORTERM" in env) {
747
+ return 1;
748
+ }
749
+ return min;
750
+ }
751
+ function createSupportsColor(stream, options = {}) {
752
+ const level = _supportsColor(stream, {
753
+ streamIsTTY: stream && stream.isTTY,
754
+ ...options
755
+ });
756
+ return translateLevel(level);
757
+ }
758
+ var supportsColor = {
759
+ stdout: createSupportsColor({ isTTY: tty.isatty(1) }),
760
+ stderr: createSupportsColor({ isTTY: tty.isatty(2) })
761
+ };
762
+ var supports_color_default = supportsColor;
763
+
764
+ // ../../node_modules/.pnpm/chalk@5.6.0/node_modules/chalk/source/utilities.js
765
+ init_esm_shims();
766
+ function stringReplaceAll(string, substring, replacer) {
767
+ let index = string.indexOf(substring);
768
+ if (index === -1) {
769
+ return string;
770
+ }
771
+ const substringLength = substring.length;
772
+ let endIndex = 0;
773
+ let returnValue = "";
774
+ do {
775
+ returnValue += string.slice(endIndex, index) + substring + replacer;
776
+ endIndex = index + substringLength;
777
+ index = string.indexOf(substring, endIndex);
778
+ } while (index !== -1);
779
+ returnValue += string.slice(endIndex);
780
+ return returnValue;
781
+ }
782
+ function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
783
+ let endIndex = 0;
784
+ let returnValue = "";
785
+ do {
786
+ const gotCR = string[index - 1] === "\r";
787
+ returnValue += string.slice(endIndex, gotCR ? index - 1 : index) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
788
+ endIndex = index + 1;
789
+ index = string.indexOf("\n", endIndex);
790
+ } while (index !== -1);
791
+ returnValue += string.slice(endIndex);
792
+ return returnValue;
793
+ }
794
+
795
+ // ../../node_modules/.pnpm/chalk@5.6.0/node_modules/chalk/source/index.js
796
+ var { stdout: stdoutColor, stderr: stderrColor } = supports_color_default;
797
+ var GENERATOR = Symbol("GENERATOR");
798
+ var STYLER = Symbol("STYLER");
799
+ var IS_EMPTY = Symbol("IS_EMPTY");
800
+ var levelMapping = [
801
+ "ansi",
802
+ "ansi",
803
+ "ansi256",
804
+ "ansi16m"
805
+ ];
806
+ var styles2 = /* @__PURE__ */ Object.create(null);
807
+ var applyOptions = (object, options = {}) => {
808
+ if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
809
+ throw new Error("The `level` option should be an integer from 0 to 3");
810
+ }
811
+ const colorLevel = stdoutColor ? stdoutColor.level : 0;
812
+ object.level = options.level === void 0 ? colorLevel : options.level;
813
+ };
814
+ var chalkFactory = (options) => {
815
+ const chalk2 = (...strings) => strings.join(" ");
816
+ applyOptions(chalk2, options);
817
+ Object.setPrototypeOf(chalk2, createChalk.prototype);
818
+ return chalk2;
819
+ };
820
+ function createChalk(options) {
821
+ return chalkFactory(options);
822
+ }
823
+ Object.setPrototypeOf(createChalk.prototype, Function.prototype);
824
+ for (const [styleName, style] of Object.entries(ansi_styles_default)) {
825
+ styles2[styleName] = {
826
+ get() {
827
+ const builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);
828
+ Object.defineProperty(this, styleName, { value: builder });
829
+ return builder;
830
+ }
831
+ };
832
+ }
833
+ styles2.visible = {
834
+ get() {
835
+ const builder = createBuilder(this, this[STYLER], true);
836
+ Object.defineProperty(this, "visible", { value: builder });
837
+ return builder;
838
+ }
839
+ };
840
+ var getModelAnsi = (model, level, type, ...arguments_) => {
841
+ if (model === "rgb") {
842
+ if (level === "ansi16m") {
843
+ return ansi_styles_default[type].ansi16m(...arguments_);
844
+ }
845
+ if (level === "ansi256") {
846
+ return ansi_styles_default[type].ansi256(ansi_styles_default.rgbToAnsi256(...arguments_));
847
+ }
848
+ return ansi_styles_default[type].ansi(ansi_styles_default.rgbToAnsi(...arguments_));
849
+ }
850
+ if (model === "hex") {
851
+ return getModelAnsi("rgb", level, type, ...ansi_styles_default.hexToRgb(...arguments_));
852
+ }
853
+ return ansi_styles_default[type][model](...arguments_);
854
+ };
855
+ var usedModels = ["rgb", "hex", "ansi256"];
856
+ for (const model of usedModels) {
857
+ styles2[model] = {
858
+ get() {
859
+ const { level } = this;
860
+ return function(...arguments_) {
861
+ const styler = createStyler(getModelAnsi(model, levelMapping[level], "color", ...arguments_), ansi_styles_default.color.close, this[STYLER]);
862
+ return createBuilder(this, styler, this[IS_EMPTY]);
863
+ };
864
+ }
865
+ };
866
+ const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
867
+ styles2[bgModel] = {
868
+ get() {
869
+ const { level } = this;
870
+ return function(...arguments_) {
871
+ const styler = createStyler(getModelAnsi(model, levelMapping[level], "bgColor", ...arguments_), ansi_styles_default.bgColor.close, this[STYLER]);
872
+ return createBuilder(this, styler, this[IS_EMPTY]);
873
+ };
874
+ }
875
+ };
876
+ }
877
+ var proto = Object.defineProperties(() => {
878
+ }, {
879
+ ...styles2,
880
+ level: {
881
+ enumerable: true,
882
+ get() {
883
+ return this[GENERATOR].level;
884
+ },
885
+ set(level) {
886
+ this[GENERATOR].level = level;
887
+ }
888
+ }
889
+ });
890
+ var createStyler = (open, close, parent) => {
891
+ let openAll;
892
+ let closeAll;
893
+ if (parent === void 0) {
894
+ openAll = open;
895
+ closeAll = close;
896
+ } else {
897
+ openAll = parent.openAll + open;
898
+ closeAll = close + parent.closeAll;
899
+ }
900
+ return {
901
+ open,
902
+ close,
903
+ openAll,
904
+ closeAll,
905
+ parent
906
+ };
907
+ };
908
+ var createBuilder = (self, _styler, _isEmpty) => {
909
+ const builder = (...arguments_) => applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
910
+ Object.setPrototypeOf(builder, proto);
911
+ builder[GENERATOR] = self;
912
+ builder[STYLER] = _styler;
913
+ builder[IS_EMPTY] = _isEmpty;
914
+ return builder;
915
+ };
916
+ var applyStyle = (self, string) => {
917
+ if (self.level <= 0 || !string) {
918
+ return self[IS_EMPTY] ? "" : string;
919
+ }
920
+ let styler = self[STYLER];
921
+ if (styler === void 0) {
922
+ return string;
923
+ }
924
+ const { openAll, closeAll } = styler;
925
+ if (string.includes("\x1B")) {
926
+ while (styler !== void 0) {
927
+ string = stringReplaceAll(string, styler.close, styler.open);
928
+ styler = styler.parent;
929
+ }
930
+ }
931
+ const lfIndex = string.indexOf("\n");
932
+ if (lfIndex !== -1) {
933
+ string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
934
+ }
935
+ return openAll + string + closeAll;
936
+ };
937
+ Object.defineProperties(createChalk.prototype, styles2);
938
+ var chalk = createChalk();
939
+ var chalkStderr = createChalk({ level: stderrColor ? stderrColor.level : 0 });
940
+ var source_default = chalk;
941
+
942
+ // ../../node_modules/.pnpm/boxen@7.1.1/node_modules/boxen/index.js
943
+ init_esm_shims();
944
+ import process3 from "process";
945
+
946
+ // ../../node_modules/.pnpm/string-width@5.1.2/node_modules/string-width/index.js
947
+ init_esm_shims();
948
+
949
+ // ../../node_modules/.pnpm/strip-ansi@7.1.0/node_modules/strip-ansi/index.js
950
+ init_esm_shims();
951
+
952
+ // ../../node_modules/.pnpm/ansi-regex@6.2.0/node_modules/ansi-regex/index.js
953
+ init_esm_shims();
954
+ function ansiRegex({ onlyFirst = false } = {}) {
955
+ const ST = "(?:\\u0007|\\u001B\\u005C|\\u009C)";
956
+ const osc = `(?:\\u001B\\][\\s\\S]*?${ST})`;
957
+ const csi = "[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";
958
+ const pattern = `${osc}|${csi}`;
959
+ return new RegExp(pattern, onlyFirst ? void 0 : "g");
960
+ }
961
+
962
+ // ../../node_modules/.pnpm/strip-ansi@7.1.0/node_modules/strip-ansi/index.js
963
+ var regex = ansiRegex();
964
+ function stripAnsi(string) {
965
+ if (typeof string !== "string") {
966
+ throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
967
+ }
968
+ return string.replace(regex, "");
969
+ }
970
+
971
+ // ../../node_modules/.pnpm/string-width@5.1.2/node_modules/string-width/index.js
972
+ var import_eastasianwidth = __toESM(require_eastasianwidth(), 1);
973
+ var import_emoji_regex = __toESM(require_emoji_regex(), 1);
974
+ function stringWidth(string, options = {}) {
975
+ if (typeof string !== "string" || string.length === 0) {
976
+ return 0;
977
+ }
978
+ options = {
979
+ ambiguousIsNarrow: true,
980
+ ...options
981
+ };
982
+ string = stripAnsi(string);
983
+ if (string.length === 0) {
984
+ return 0;
985
+ }
986
+ string = string.replace((0, import_emoji_regex.default)(), " ");
987
+ const ambiguousCharacterWidth = options.ambiguousIsNarrow ? 1 : 2;
988
+ let width = 0;
989
+ for (const character of string) {
990
+ const codePoint = character.codePointAt(0);
991
+ if (codePoint <= 31 || codePoint >= 127 && codePoint <= 159) {
992
+ continue;
993
+ }
994
+ if (codePoint >= 768 && codePoint <= 879) {
995
+ continue;
996
+ }
997
+ const code = import_eastasianwidth.default.eastAsianWidth(character);
998
+ switch (code) {
999
+ case "F":
1000
+ case "W":
1001
+ width += 2;
1002
+ break;
1003
+ case "A":
1004
+ width += ambiguousCharacterWidth;
1005
+ break;
1006
+ default:
1007
+ width += 1;
1008
+ }
1009
+ }
1010
+ return width;
1011
+ }
1012
+
1013
+ // ../../node_modules/.pnpm/widest-line@4.0.1/node_modules/widest-line/index.js
1014
+ init_esm_shims();
1015
+ function widestLine(string) {
1016
+ let lineWidth = 0;
1017
+ for (const line of string.split("\n")) {
1018
+ lineWidth = Math.max(lineWidth, stringWidth(line));
1019
+ }
1020
+ return lineWidth;
1021
+ }
1022
+
1023
+ // ../../node_modules/.pnpm/boxen@7.1.1/node_modules/boxen/index.js
1024
+ var import_cli_boxes = __toESM(require_cli_boxes(), 1);
1025
+
1026
+ // ../../node_modules/.pnpm/camelcase@7.0.1/node_modules/camelcase/index.js
1027
+ init_esm_shims();
1028
+ var UPPERCASE = /[\p{Lu}]/u;
1029
+ var LOWERCASE = /[\p{Ll}]/u;
1030
+ var LEADING_CAPITAL = /^[\p{Lu}](?![\p{Lu}])/gu;
1031
+ var IDENTIFIER = /([\p{Alpha}\p{N}_]|$)/u;
1032
+ var SEPARATORS = /[_.\- ]+/;
1033
+ var LEADING_SEPARATORS = new RegExp("^" + SEPARATORS.source);
1034
+ var SEPARATORS_AND_IDENTIFIER = new RegExp(SEPARATORS.source + IDENTIFIER.source, "gu");
1035
+ var NUMBERS_AND_IDENTIFIER = new RegExp("\\d+" + IDENTIFIER.source, "gu");
1036
+ var preserveCamelCase = (string, toLowerCase, toUpperCase, preserveConsecutiveUppercase2) => {
1037
+ let isLastCharLower = false;
1038
+ let isLastCharUpper = false;
1039
+ let isLastLastCharUpper = false;
1040
+ let isLastLastCharPreserved = false;
1041
+ for (let index = 0; index < string.length; index++) {
1042
+ const character = string[index];
1043
+ isLastLastCharPreserved = index > 2 ? string[index - 3] === "-" : true;
1044
+ if (isLastCharLower && UPPERCASE.test(character)) {
1045
+ string = string.slice(0, index) + "-" + string.slice(index);
1046
+ isLastCharLower = false;
1047
+ isLastLastCharUpper = isLastCharUpper;
1048
+ isLastCharUpper = true;
1049
+ index++;
1050
+ } else if (isLastCharUpper && isLastLastCharUpper && LOWERCASE.test(character) && (!isLastLastCharPreserved || preserveConsecutiveUppercase2)) {
1051
+ string = string.slice(0, index - 1) + "-" + string.slice(index - 1);
1052
+ isLastLastCharUpper = isLastCharUpper;
1053
+ isLastCharUpper = false;
1054
+ isLastCharLower = true;
1055
+ } else {
1056
+ isLastCharLower = toLowerCase(character) === character && toUpperCase(character) !== character;
1057
+ isLastLastCharUpper = isLastCharUpper;
1058
+ isLastCharUpper = toUpperCase(character) === character && toLowerCase(character) !== character;
1059
+ }
1060
+ }
1061
+ return string;
1062
+ };
1063
+ var preserveConsecutiveUppercase = (input, toLowerCase) => {
1064
+ LEADING_CAPITAL.lastIndex = 0;
1065
+ return input.replace(LEADING_CAPITAL, (m1) => toLowerCase(m1));
1066
+ };
1067
+ var postProcess = (input, toUpperCase) => {
1068
+ SEPARATORS_AND_IDENTIFIER.lastIndex = 0;
1069
+ NUMBERS_AND_IDENTIFIER.lastIndex = 0;
1070
+ return input.replace(SEPARATORS_AND_IDENTIFIER, (_, identifier) => toUpperCase(identifier)).replace(NUMBERS_AND_IDENTIFIER, (m) => toUpperCase(m));
1071
+ };
1072
+ function camelCase(input, options) {
1073
+ if (!(typeof input === "string" || Array.isArray(input))) {
1074
+ throw new TypeError("Expected the input to be `string | string[]`");
1075
+ }
1076
+ options = {
1077
+ pascalCase: false,
1078
+ preserveConsecutiveUppercase: false,
1079
+ ...options
1080
+ };
1081
+ if (Array.isArray(input)) {
1082
+ input = input.map((x) => x.trim()).filter((x) => x.length).join("-");
1083
+ } else {
1084
+ input = input.trim();
1085
+ }
1086
+ if (input.length === 0) {
1087
+ return "";
1088
+ }
1089
+ const toLowerCase = options.locale === false ? (string) => string.toLowerCase() : (string) => string.toLocaleLowerCase(options.locale);
1090
+ const toUpperCase = options.locale === false ? (string) => string.toUpperCase() : (string) => string.toLocaleUpperCase(options.locale);
1091
+ if (input.length === 1) {
1092
+ if (SEPARATORS.test(input)) {
1093
+ return "";
1094
+ }
1095
+ return options.pascalCase ? toUpperCase(input) : toLowerCase(input);
1096
+ }
1097
+ const hasUpperCase = input !== toLowerCase(input);
1098
+ if (hasUpperCase) {
1099
+ input = preserveCamelCase(input, toLowerCase, toUpperCase, options.preserveConsecutiveUppercase);
1100
+ }
1101
+ input = input.replace(LEADING_SEPARATORS, "");
1102
+ input = options.preserveConsecutiveUppercase ? preserveConsecutiveUppercase(input, toLowerCase) : toLowerCase(input);
1103
+ if (options.pascalCase) {
1104
+ input = toUpperCase(input.charAt(0)) + input.slice(1);
1105
+ }
1106
+ return postProcess(input, toUpperCase);
1107
+ }
1108
+
1109
+ // ../../node_modules/.pnpm/boxen@7.1.1/node_modules/boxen/index.js
1110
+ var import_ansi_align = __toESM(require_ansi_align(), 1);
1111
+
1112
+ // ../../node_modules/.pnpm/wrap-ansi@8.1.0/node_modules/wrap-ansi/index.js
1113
+ init_esm_shims();
1114
+
1115
+ // ../../node_modules/.pnpm/ansi-styles@6.2.1/node_modules/ansi-styles/index.js
1116
+ init_esm_shims();
1117
+ var ANSI_BACKGROUND_OFFSET2 = 10;
1118
+ var wrapAnsi162 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
1119
+ var wrapAnsi2562 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
1120
+ var wrapAnsi16m2 = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`;
1121
+ var styles3 = {
1122
+ modifier: {
1123
+ reset: [0, 0],
1124
+ // 21 isn't widely supported and 22 does the same thing
1125
+ bold: [1, 22],
1126
+ dim: [2, 22],
1127
+ italic: [3, 23],
1128
+ underline: [4, 24],
1129
+ overline: [53, 55],
1130
+ inverse: [7, 27],
1131
+ hidden: [8, 28],
1132
+ strikethrough: [9, 29]
1133
+ },
1134
+ color: {
1135
+ black: [30, 39],
1136
+ red: [31, 39],
1137
+ green: [32, 39],
1138
+ yellow: [33, 39],
1139
+ blue: [34, 39],
1140
+ magenta: [35, 39],
1141
+ cyan: [36, 39],
1142
+ white: [37, 39],
1143
+ // Bright color
1144
+ blackBright: [90, 39],
1145
+ gray: [90, 39],
1146
+ // Alias of `blackBright`
1147
+ grey: [90, 39],
1148
+ // Alias of `blackBright`
1149
+ redBright: [91, 39],
1150
+ greenBright: [92, 39],
1151
+ yellowBright: [93, 39],
1152
+ blueBright: [94, 39],
1153
+ magentaBright: [95, 39],
1154
+ cyanBright: [96, 39],
1155
+ whiteBright: [97, 39]
1156
+ },
1157
+ bgColor: {
1158
+ bgBlack: [40, 49],
1159
+ bgRed: [41, 49],
1160
+ bgGreen: [42, 49],
1161
+ bgYellow: [43, 49],
1162
+ bgBlue: [44, 49],
1163
+ bgMagenta: [45, 49],
1164
+ bgCyan: [46, 49],
1165
+ bgWhite: [47, 49],
1166
+ // Bright color
1167
+ bgBlackBright: [100, 49],
1168
+ bgGray: [100, 49],
1169
+ // Alias of `bgBlackBright`
1170
+ bgGrey: [100, 49],
1171
+ // Alias of `bgBlackBright`
1172
+ bgRedBright: [101, 49],
1173
+ bgGreenBright: [102, 49],
1174
+ bgYellowBright: [103, 49],
1175
+ bgBlueBright: [104, 49],
1176
+ bgMagentaBright: [105, 49],
1177
+ bgCyanBright: [106, 49],
1178
+ bgWhiteBright: [107, 49]
1179
+ }
1180
+ };
1181
+ var modifierNames2 = Object.keys(styles3.modifier);
1182
+ var foregroundColorNames2 = Object.keys(styles3.color);
1183
+ var backgroundColorNames2 = Object.keys(styles3.bgColor);
1184
+ var colorNames2 = [...foregroundColorNames2, ...backgroundColorNames2];
1185
+ function assembleStyles2() {
1186
+ const codes = /* @__PURE__ */ new Map();
1187
+ for (const [groupName, group] of Object.entries(styles3)) {
1188
+ for (const [styleName, style] of Object.entries(group)) {
1189
+ styles3[styleName] = {
1190
+ open: `\x1B[${style[0]}m`,
1191
+ close: `\x1B[${style[1]}m`
1192
+ };
1193
+ group[styleName] = styles3[styleName];
1194
+ codes.set(style[0], style[1]);
1195
+ }
1196
+ Object.defineProperty(styles3, groupName, {
1197
+ value: group,
1198
+ enumerable: false
1199
+ });
1200
+ }
1201
+ Object.defineProperty(styles3, "codes", {
1202
+ value: codes,
1203
+ enumerable: false
1204
+ });
1205
+ styles3.color.close = "\x1B[39m";
1206
+ styles3.bgColor.close = "\x1B[49m";
1207
+ styles3.color.ansi = wrapAnsi162();
1208
+ styles3.color.ansi256 = wrapAnsi2562();
1209
+ styles3.color.ansi16m = wrapAnsi16m2();
1210
+ styles3.bgColor.ansi = wrapAnsi162(ANSI_BACKGROUND_OFFSET2);
1211
+ styles3.bgColor.ansi256 = wrapAnsi2562(ANSI_BACKGROUND_OFFSET2);
1212
+ styles3.bgColor.ansi16m = wrapAnsi16m2(ANSI_BACKGROUND_OFFSET2);
1213
+ Object.defineProperties(styles3, {
1214
+ rgbToAnsi256: {
1215
+ value: (red, green, blue) => {
1216
+ if (red === green && green === blue) {
1217
+ if (red < 8) {
1218
+ return 16;
1219
+ }
1220
+ if (red > 248) {
1221
+ return 231;
1222
+ }
1223
+ return Math.round((red - 8) / 247 * 24) + 232;
1224
+ }
1225
+ return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5);
1226
+ },
1227
+ enumerable: false
1228
+ },
1229
+ hexToRgb: {
1230
+ value: (hex) => {
1231
+ const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
1232
+ if (!matches) {
1233
+ return [0, 0, 0];
1234
+ }
1235
+ let [colorString] = matches;
1236
+ if (colorString.length === 3) {
1237
+ colorString = [...colorString].map((character) => character + character).join("");
1238
+ }
1239
+ const integer = Number.parseInt(colorString, 16);
1240
+ return [
1241
+ /* eslint-disable no-bitwise */
1242
+ integer >> 16 & 255,
1243
+ integer >> 8 & 255,
1244
+ integer & 255
1245
+ /* eslint-enable no-bitwise */
1246
+ ];
1247
+ },
1248
+ enumerable: false
1249
+ },
1250
+ hexToAnsi256: {
1251
+ value: (hex) => styles3.rgbToAnsi256(...styles3.hexToRgb(hex)),
1252
+ enumerable: false
1253
+ },
1254
+ ansi256ToAnsi: {
1255
+ value: (code) => {
1256
+ if (code < 8) {
1257
+ return 30 + code;
1258
+ }
1259
+ if (code < 16) {
1260
+ return 90 + (code - 8);
1261
+ }
1262
+ let red;
1263
+ let green;
1264
+ let blue;
1265
+ if (code >= 232) {
1266
+ red = ((code - 232) * 10 + 8) / 255;
1267
+ green = red;
1268
+ blue = red;
1269
+ } else {
1270
+ code -= 16;
1271
+ const remainder = code % 36;
1272
+ red = Math.floor(code / 36) / 5;
1273
+ green = Math.floor(remainder / 6) / 5;
1274
+ blue = remainder % 6 / 5;
1275
+ }
1276
+ const value = Math.max(red, green, blue) * 2;
1277
+ if (value === 0) {
1278
+ return 30;
1279
+ }
1280
+ let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red));
1281
+ if (value === 2) {
1282
+ result += 60;
1283
+ }
1284
+ return result;
1285
+ },
1286
+ enumerable: false
1287
+ },
1288
+ rgbToAnsi: {
1289
+ value: (red, green, blue) => styles3.ansi256ToAnsi(styles3.rgbToAnsi256(red, green, blue)),
1290
+ enumerable: false
1291
+ },
1292
+ hexToAnsi: {
1293
+ value: (hex) => styles3.ansi256ToAnsi(styles3.hexToAnsi256(hex)),
1294
+ enumerable: false
1295
+ }
1296
+ });
1297
+ return styles3;
1298
+ }
1299
+ var ansiStyles2 = assembleStyles2();
1300
+ var ansi_styles_default2 = ansiStyles2;
1301
+
1302
+ // ../../node_modules/.pnpm/wrap-ansi@8.1.0/node_modules/wrap-ansi/index.js
1303
+ var ESCAPES = /* @__PURE__ */ new Set([
1304
+ "\x1B",
1305
+ "\x9B"
1306
+ ]);
1307
+ var END_CODE = 39;
1308
+ var ANSI_ESCAPE_BELL = "\x07";
1309
+ var ANSI_CSI = "[";
1310
+ var ANSI_OSC = "]";
1311
+ var ANSI_SGR_TERMINATOR = "m";
1312
+ var ANSI_ESCAPE_LINK = `${ANSI_OSC}8;;`;
1313
+ var wrapAnsiCode = (code) => `${ESCAPES.values().next().value}${ANSI_CSI}${code}${ANSI_SGR_TERMINATOR}`;
1314
+ var wrapAnsiHyperlink = (uri) => `${ESCAPES.values().next().value}${ANSI_ESCAPE_LINK}${uri}${ANSI_ESCAPE_BELL}`;
1315
+ var wordLengths = (string) => string.split(" ").map((character) => stringWidth(character));
1316
+ var wrapWord = (rows, word, columns) => {
1317
+ const characters = [...word];
1318
+ let isInsideEscape = false;
1319
+ let isInsideLinkEscape = false;
1320
+ let visible = stringWidth(stripAnsi(rows[rows.length - 1]));
1321
+ for (const [index, character] of characters.entries()) {
1322
+ const characterLength = stringWidth(character);
1323
+ if (visible + characterLength <= columns) {
1324
+ rows[rows.length - 1] += character;
1325
+ } else {
1326
+ rows.push(character);
1327
+ visible = 0;
1328
+ }
1329
+ if (ESCAPES.has(character)) {
1330
+ isInsideEscape = true;
1331
+ isInsideLinkEscape = characters.slice(index + 1).join("").startsWith(ANSI_ESCAPE_LINK);
1332
+ }
1333
+ if (isInsideEscape) {
1334
+ if (isInsideLinkEscape) {
1335
+ if (character === ANSI_ESCAPE_BELL) {
1336
+ isInsideEscape = false;
1337
+ isInsideLinkEscape = false;
1338
+ }
1339
+ } else if (character === ANSI_SGR_TERMINATOR) {
1340
+ isInsideEscape = false;
1341
+ }
1342
+ continue;
1343
+ }
1344
+ visible += characterLength;
1345
+ if (visible === columns && index < characters.length - 1) {
1346
+ rows.push("");
1347
+ visible = 0;
1348
+ }
1349
+ }
1350
+ if (!visible && rows[rows.length - 1].length > 0 && rows.length > 1) {
1351
+ rows[rows.length - 2] += rows.pop();
1352
+ }
1353
+ };
1354
+ var stringVisibleTrimSpacesRight = (string) => {
1355
+ const words = string.split(" ");
1356
+ let last = words.length;
1357
+ while (last > 0) {
1358
+ if (stringWidth(words[last - 1]) > 0) {
1359
+ break;
1360
+ }
1361
+ last--;
1362
+ }
1363
+ if (last === words.length) {
1364
+ return string;
1365
+ }
1366
+ return words.slice(0, last).join(" ") + words.slice(last).join("");
1367
+ };
1368
+ var exec = (string, columns, options = {}) => {
1369
+ if (options.trim !== false && string.trim() === "") {
1370
+ return "";
1371
+ }
1372
+ let returnValue = "";
1373
+ let escapeCode;
1374
+ let escapeUrl;
1375
+ const lengths = wordLengths(string);
1376
+ let rows = [""];
1377
+ for (const [index, word] of string.split(" ").entries()) {
1378
+ if (options.trim !== false) {
1379
+ rows[rows.length - 1] = rows[rows.length - 1].trimStart();
1380
+ }
1381
+ let rowLength = stringWidth(rows[rows.length - 1]);
1382
+ if (index !== 0) {
1383
+ if (rowLength >= columns && (options.wordWrap === false || options.trim === false)) {
1384
+ rows.push("");
1385
+ rowLength = 0;
1386
+ }
1387
+ if (rowLength > 0 || options.trim === false) {
1388
+ rows[rows.length - 1] += " ";
1389
+ rowLength++;
1390
+ }
1391
+ }
1392
+ if (options.hard && lengths[index] > columns) {
1393
+ const remainingColumns = columns - rowLength;
1394
+ const breaksStartingThisLine = 1 + Math.floor((lengths[index] - remainingColumns - 1) / columns);
1395
+ const breaksStartingNextLine = Math.floor((lengths[index] - 1) / columns);
1396
+ if (breaksStartingNextLine < breaksStartingThisLine) {
1397
+ rows.push("");
1398
+ }
1399
+ wrapWord(rows, word, columns);
1400
+ continue;
1401
+ }
1402
+ if (rowLength + lengths[index] > columns && rowLength > 0 && lengths[index] > 0) {
1403
+ if (options.wordWrap === false && rowLength < columns) {
1404
+ wrapWord(rows, word, columns);
1405
+ continue;
1406
+ }
1407
+ rows.push("");
1408
+ }
1409
+ if (rowLength + lengths[index] > columns && options.wordWrap === false) {
1410
+ wrapWord(rows, word, columns);
1411
+ continue;
1412
+ }
1413
+ rows[rows.length - 1] += word;
1414
+ }
1415
+ if (options.trim !== false) {
1416
+ rows = rows.map((row) => stringVisibleTrimSpacesRight(row));
1417
+ }
1418
+ const pre = [...rows.join("\n")];
1419
+ for (const [index, character] of pre.entries()) {
1420
+ returnValue += character;
1421
+ if (ESCAPES.has(character)) {
1422
+ const { groups } = new RegExp(`(?:\\${ANSI_CSI}(?<code>\\d+)m|\\${ANSI_ESCAPE_LINK}(?<uri>.*)${ANSI_ESCAPE_BELL})`).exec(pre.slice(index).join("")) || { groups: {} };
1423
+ if (groups.code !== void 0) {
1424
+ const code2 = Number.parseFloat(groups.code);
1425
+ escapeCode = code2 === END_CODE ? void 0 : code2;
1426
+ } else if (groups.uri !== void 0) {
1427
+ escapeUrl = groups.uri.length === 0 ? void 0 : groups.uri;
1428
+ }
1429
+ }
1430
+ const code = ansi_styles_default2.codes.get(Number(escapeCode));
1431
+ if (pre[index + 1] === "\n") {
1432
+ if (escapeUrl) {
1433
+ returnValue += wrapAnsiHyperlink("");
1434
+ }
1435
+ if (escapeCode && code) {
1436
+ returnValue += wrapAnsiCode(code);
1437
+ }
1438
+ } else if (character === "\n") {
1439
+ if (escapeCode && code) {
1440
+ returnValue += wrapAnsiCode(escapeCode);
1441
+ }
1442
+ if (escapeUrl) {
1443
+ returnValue += wrapAnsiHyperlink(escapeUrl);
1444
+ }
1445
+ }
1446
+ }
1447
+ return returnValue;
1448
+ };
1449
+ function wrapAnsi(string, columns, options) {
1450
+ return String(string).normalize().replace(/\r\n/g, "\n").split("\n").map((line) => exec(line, columns, options)).join("\n");
1451
+ }
1452
+
1453
+ // ../../node_modules/.pnpm/boxen@7.1.1/node_modules/boxen/index.js
1454
+ var import_cli_boxes2 = __toESM(require_cli_boxes(), 1);
1455
+ var NEWLINE = "\n";
1456
+ var PAD = " ";
1457
+ var NONE = "none";
1458
+ var terminalColumns = () => {
1459
+ const { env: env2, stdout, stderr } = process3;
1460
+ if (stdout?.columns) {
1461
+ return stdout.columns;
1462
+ }
1463
+ if (stderr?.columns) {
1464
+ return stderr.columns;
1465
+ }
1466
+ if (env2.COLUMNS) {
1467
+ return Number.parseInt(env2.COLUMNS, 10);
1468
+ }
1469
+ return 80;
1470
+ };
1471
+ var getObject = (detail) => typeof detail === "number" ? {
1472
+ top: detail,
1473
+ right: detail * 3,
1474
+ bottom: detail,
1475
+ left: detail * 3
1476
+ } : {
1477
+ top: 0,
1478
+ right: 0,
1479
+ bottom: 0,
1480
+ left: 0,
1481
+ ...detail
1482
+ };
1483
+ var getBorderWidth = (borderStyle) => borderStyle === NONE ? 0 : 2;
1484
+ var getBorderChars = (borderStyle) => {
1485
+ const sides = [
1486
+ "topLeft",
1487
+ "topRight",
1488
+ "bottomRight",
1489
+ "bottomLeft",
1490
+ "left",
1491
+ "right",
1492
+ "top",
1493
+ "bottom"
1494
+ ];
1495
+ let characters;
1496
+ if (borderStyle === NONE) {
1497
+ borderStyle = {};
1498
+ for (const side of sides) {
1499
+ borderStyle[side] = "";
1500
+ }
1501
+ }
1502
+ if (typeof borderStyle === "string") {
1503
+ characters = import_cli_boxes.default[borderStyle];
1504
+ if (!characters) {
1505
+ throw new TypeError(`Invalid border style: ${borderStyle}`);
1506
+ }
1507
+ } else {
1508
+ if (typeof borderStyle?.vertical === "string") {
1509
+ borderStyle.left = borderStyle.vertical;
1510
+ borderStyle.right = borderStyle.vertical;
1511
+ }
1512
+ if (typeof borderStyle?.horizontal === "string") {
1513
+ borderStyle.top = borderStyle.horizontal;
1514
+ borderStyle.bottom = borderStyle.horizontal;
1515
+ }
1516
+ for (const side of sides) {
1517
+ if (borderStyle[side] === null || typeof borderStyle[side] !== "string") {
1518
+ throw new TypeError(`Invalid border style: ${side}`);
1519
+ }
1520
+ }
1521
+ characters = borderStyle;
1522
+ }
1523
+ return characters;
1524
+ };
1525
+ var makeTitle = (text, horizontal, alignment) => {
1526
+ let title = "";
1527
+ const textWidth = stringWidth(text);
1528
+ switch (alignment) {
1529
+ case "left": {
1530
+ title = text + horizontal.slice(textWidth);
1531
+ break;
1532
+ }
1533
+ case "right": {
1534
+ title = horizontal.slice(textWidth) + text;
1535
+ break;
1536
+ }
1537
+ default: {
1538
+ horizontal = horizontal.slice(textWidth);
1539
+ if (horizontal.length % 2 === 1) {
1540
+ horizontal = horizontal.slice(Math.floor(horizontal.length / 2));
1541
+ title = horizontal.slice(1) + text + horizontal;
1542
+ } else {
1543
+ horizontal = horizontal.slice(horizontal.length / 2);
1544
+ title = horizontal + text + horizontal;
1545
+ }
1546
+ break;
1547
+ }
1548
+ }
1549
+ return title;
1550
+ };
1551
+ var makeContentText = (text, { padding, width, textAlignment, height }) => {
1552
+ text = (0, import_ansi_align.default)(text, { align: textAlignment });
1553
+ let lines = text.split(NEWLINE);
1554
+ const textWidth = widestLine(text);
1555
+ const max = width - padding.left - padding.right;
1556
+ if (textWidth > max) {
1557
+ const newLines = [];
1558
+ for (const line of lines) {
1559
+ const createdLines = wrapAnsi(line, max, { hard: true });
1560
+ const alignedLines = (0, import_ansi_align.default)(createdLines, { align: textAlignment });
1561
+ const alignedLinesArray = alignedLines.split("\n");
1562
+ const longestLength = Math.max(...alignedLinesArray.map((s) => stringWidth(s)));
1563
+ for (const alignedLine of alignedLinesArray) {
1564
+ let paddedLine;
1565
+ switch (textAlignment) {
1566
+ case "center": {
1567
+ paddedLine = PAD.repeat((max - longestLength) / 2) + alignedLine;
1568
+ break;
1569
+ }
1570
+ case "right": {
1571
+ paddedLine = PAD.repeat(max - longestLength) + alignedLine;
1572
+ break;
1573
+ }
1574
+ default: {
1575
+ paddedLine = alignedLine;
1576
+ break;
1577
+ }
1578
+ }
1579
+ newLines.push(paddedLine);
1580
+ }
1581
+ }
1582
+ lines = newLines;
1583
+ }
1584
+ if (textAlignment === "center" && textWidth < max) {
1585
+ lines = lines.map((line) => PAD.repeat((max - textWidth) / 2) + line);
1586
+ } else if (textAlignment === "right" && textWidth < max) {
1587
+ lines = lines.map((line) => PAD.repeat(max - textWidth) + line);
1588
+ }
1589
+ const paddingLeft = PAD.repeat(padding.left);
1590
+ const paddingRight = PAD.repeat(padding.right);
1591
+ lines = lines.map((line) => paddingLeft + line + paddingRight);
1592
+ lines = lines.map((line) => {
1593
+ if (width - stringWidth(line) > 0) {
1594
+ switch (textAlignment) {
1595
+ case "center": {
1596
+ return line + PAD.repeat(width - stringWidth(line));
1597
+ }
1598
+ case "right": {
1599
+ return line + PAD.repeat(width - stringWidth(line));
1600
+ }
1601
+ default: {
1602
+ return line + PAD.repeat(width - stringWidth(line));
1603
+ }
1604
+ }
1605
+ }
1606
+ return line;
1607
+ });
1608
+ if (padding.top > 0) {
1609
+ lines = [...Array.from({ length: padding.top }).fill(PAD.repeat(width)), ...lines];
1610
+ }
1611
+ if (padding.bottom > 0) {
1612
+ lines = [...lines, ...Array.from({ length: padding.bottom }).fill(PAD.repeat(width))];
1613
+ }
1614
+ if (height && lines.length > height) {
1615
+ lines = lines.slice(0, height);
1616
+ } else if (height && lines.length < height) {
1617
+ lines = [...lines, ...Array.from({ length: height - lines.length }).fill(PAD.repeat(width))];
1618
+ }
1619
+ return lines.join(NEWLINE);
1620
+ };
1621
+ var boxContent = (content, contentWidth, options) => {
1622
+ const colorizeBorder = (border) => {
1623
+ const newBorder = options.borderColor ? getColorFn(options.borderColor)(border) : border;
1624
+ return options.dimBorder ? source_default.dim(newBorder) : newBorder;
1625
+ };
1626
+ const colorizeContent = (content2) => options.backgroundColor ? getBGColorFn(options.backgroundColor)(content2) : content2;
1627
+ const chars = getBorderChars(options.borderStyle);
1628
+ const columns = terminalColumns();
1629
+ let marginLeft = PAD.repeat(options.margin.left);
1630
+ if (options.float === "center") {
1631
+ const marginWidth = Math.max((columns - contentWidth - getBorderWidth(options.borderStyle)) / 2, 0);
1632
+ marginLeft = PAD.repeat(marginWidth);
1633
+ } else if (options.float === "right") {
1634
+ const marginWidth = Math.max(columns - contentWidth - options.margin.right - getBorderWidth(options.borderStyle), 0);
1635
+ marginLeft = PAD.repeat(marginWidth);
1636
+ }
1637
+ let result = "";
1638
+ if (options.margin.top) {
1639
+ result += NEWLINE.repeat(options.margin.top);
1640
+ }
1641
+ if (options.borderStyle !== NONE || options.title) {
1642
+ result += colorizeBorder(marginLeft + chars.topLeft + (options.title ? makeTitle(options.title, chars.top.repeat(contentWidth), options.titleAlignment) : chars.top.repeat(contentWidth)) + chars.topRight) + NEWLINE;
1643
+ }
1644
+ const lines = content.split(NEWLINE);
1645
+ result += lines.map((line) => marginLeft + colorizeBorder(chars.left) + colorizeContent(line) + colorizeBorder(chars.right)).join(NEWLINE);
1646
+ if (options.borderStyle !== NONE) {
1647
+ result += NEWLINE + colorizeBorder(marginLeft + chars.bottomLeft + chars.bottom.repeat(contentWidth) + chars.bottomRight);
1648
+ }
1649
+ if (options.margin.bottom) {
1650
+ result += NEWLINE.repeat(options.margin.bottom);
1651
+ }
1652
+ return result;
1653
+ };
1654
+ var sanitizeOptions = (options) => {
1655
+ if (options.fullscreen && process3?.stdout) {
1656
+ let newDimensions = [process3.stdout.columns, process3.stdout.rows];
1657
+ if (typeof options.fullscreen === "function") {
1658
+ newDimensions = options.fullscreen(...newDimensions);
1659
+ }
1660
+ if (!options.width) {
1661
+ options.width = newDimensions[0];
1662
+ }
1663
+ if (!options.height) {
1664
+ options.height = newDimensions[1];
1665
+ }
1666
+ }
1667
+ if (options.width) {
1668
+ options.width = Math.max(1, options.width - getBorderWidth(options.borderStyle));
1669
+ }
1670
+ if (options.height) {
1671
+ options.height = Math.max(1, options.height - getBorderWidth(options.borderStyle));
1672
+ }
1673
+ return options;
1674
+ };
1675
+ var formatTitle = (title, borderStyle) => borderStyle === NONE ? title : ` ${title} `;
1676
+ var determineDimensions = (text, options) => {
1677
+ options = sanitizeOptions(options);
1678
+ const widthOverride = options.width !== void 0;
1679
+ const columns = terminalColumns();
1680
+ const borderWidth = getBorderWidth(options.borderStyle);
1681
+ const maxWidth = columns - options.margin.left - options.margin.right - borderWidth;
1682
+ const widest = widestLine(wrapAnsi(text, columns - borderWidth, { hard: true, trim: false })) + options.padding.left + options.padding.right;
1683
+ if (options.title && widthOverride) {
1684
+ options.title = options.title.slice(0, Math.max(0, options.width - 2));
1685
+ if (options.title) {
1686
+ options.title = formatTitle(options.title, options.borderStyle);
1687
+ }
1688
+ } else if (options.title) {
1689
+ options.title = options.title.slice(0, Math.max(0, maxWidth - 2));
1690
+ if (options.title) {
1691
+ options.title = formatTitle(options.title, options.borderStyle);
1692
+ if (stringWidth(options.title) > widest) {
1693
+ options.width = stringWidth(options.title);
1694
+ }
1695
+ }
1696
+ }
1697
+ options.width = options.width ? options.width : widest;
1698
+ if (!widthOverride) {
1699
+ if (options.margin.left && options.margin.right && options.width > maxWidth) {
1700
+ const spaceForMargins = columns - options.width - borderWidth;
1701
+ const multiplier = spaceForMargins / (options.margin.left + options.margin.right);
1702
+ options.margin.left = Math.max(0, Math.floor(options.margin.left * multiplier));
1703
+ options.margin.right = Math.max(0, Math.floor(options.margin.right * multiplier));
1704
+ }
1705
+ options.width = Math.min(options.width, columns - borderWidth - options.margin.left - options.margin.right);
1706
+ }
1707
+ if (options.width - (options.padding.left + options.padding.right) <= 0) {
1708
+ options.padding.left = 0;
1709
+ options.padding.right = 0;
1710
+ }
1711
+ if (options.height && options.height - (options.padding.top + options.padding.bottom) <= 0) {
1712
+ options.padding.top = 0;
1713
+ options.padding.bottom = 0;
1714
+ }
1715
+ return options;
1716
+ };
1717
+ var isHex = (color) => color.match(/^#(?:[0-f]{3}){1,2}$/i);
1718
+ var isColorValid = (color) => typeof color === "string" && (source_default[color] ?? isHex(color));
1719
+ var getColorFn = (color) => isHex(color) ? source_default.hex(color) : source_default[color];
1720
+ var getBGColorFn = (color) => isHex(color) ? source_default.bgHex(color) : source_default[camelCase(["bg", color])];
1721
+ function boxen(text, options) {
1722
+ options = {
1723
+ padding: 0,
1724
+ borderStyle: "single",
1725
+ dimBorder: false,
1726
+ textAlignment: "left",
1727
+ float: "left",
1728
+ titleAlignment: "left",
1729
+ ...options
1730
+ };
1731
+ if (options.align) {
1732
+ options.textAlignment = options.align;
1733
+ }
1734
+ if (options.borderColor && !isColorValid(options.borderColor)) {
1735
+ throw new Error(`${options.borderColor} is not a valid borderColor`);
1736
+ }
1737
+ if (options.backgroundColor && !isColorValid(options.backgroundColor)) {
1738
+ throw new Error(`${options.backgroundColor} is not a valid backgroundColor`);
1739
+ }
1740
+ options.padding = getObject(options.padding);
1741
+ options.margin = getObject(options.margin);
1742
+ options = determineDimensions(text, options);
1743
+ text = makeContentText(text, options);
1744
+ return boxContent(text, options.width, options);
1745
+ }
1746
+
1747
+ // src/logger/logger.ts
1748
+ import * as fs from "fs";
1749
+ import * as path3 from "path";
1750
+ var logLevels = {
1751
+ error: 0,
1752
+ warn: 1,
1753
+ info: 2,
1754
+ http: 3,
1755
+ verbose: 4,
1756
+ debug: 5,
1757
+ silly: 6
1758
+ };
1759
+ var consoleFormat = winston.format.printf(({ level, message, timestamp, color }) => {
1760
+ const levelColorMap = {
1761
+ error: source_default.red,
1762
+ warn: source_default.yellow,
1763
+ info: source_default.blue,
1764
+ http: source_default.cyan,
1765
+ verbose: source_default.magenta,
1766
+ debug: source_default.gray,
1767
+ silly: source_default.gray.dim
1768
+ };
1769
+ const colorize = levelColorMap[level] || source_default.white;
1770
+ const formattedMessage = color && typeof color === "string" && source_default[color] ? source_default[color](message) : message;
1771
+ return `${source_default.dim(timestamp)} ${colorize(level.toUpperCase())}: ${formattedMessage}`;
1772
+ });
1773
+ var SHOULD_REDACT = process.env.REDACT_SECRETS !== "false";
1774
+ var SENSITIVE_KEYS = ["apiKey", "password", "secret", "token"];
1775
+ var MASK_REGEX = new RegExp(
1776
+ `(${SENSITIVE_KEYS.join("|")})(["']?\\s*[:=]\\s*)(["'])?.*?\\3`,
1777
+ "gi"
1778
+ );
1779
+ var maskFormat = winston.format((info) => {
1780
+ if (SHOULD_REDACT && typeof info.message === "string") {
1781
+ info.message = info.message.replace(MASK_REGEX, "$1$2$3[REDACTED]$3");
1782
+ }
1783
+ return info;
1784
+ });
1785
+ var getDefaultLogLevel = () => {
1786
+ const envLevel = process.env.DEXTO_LOG_LEVEL;
1787
+ if (envLevel && Object.keys(logLevels).includes(envLevel.toLowerCase())) {
1788
+ return envLevel.toLowerCase();
1789
+ }
1790
+ return "info";
1791
+ };
1792
+ var Logger = class {
1793
+ logger;
1794
+ isSilent = false;
1795
+ logFilePath = null;
1796
+ logToConsole = false;
1797
+ constructor(options = {}) {
1798
+ this.isSilent = options.silent || false;
1799
+ this.initializeTransports(options);
1800
+ this.logger = winston.createLogger({
1801
+ levels: logLevels,
1802
+ level: options.level || getDefaultLogLevel(),
1803
+ silent: options.silent || false,
1804
+ format: winston.format.combine(
1805
+ winston.format.timestamp({ format: "YYYY-MM-DD HH:mm:ss" }),
1806
+ maskFormat(),
1807
+ winston.format.errors({ stack: true }),
1808
+ winston.format.splat(),
1809
+ winston.format.json()
1810
+ ),
1811
+ transports: this.createTransports(options)
1812
+ });
1813
+ }
1814
+ initializeTransports(options) {
1815
+ const logToConsole = options.logToConsole ?? process.env.DEXTO_LOG_TO_CONSOLE === "true";
1816
+ this.logToConsole = logToConsole;
1817
+ if (options.customLogPath) {
1818
+ this.logFilePath = options.customLogPath;
1819
+ } else {
1820
+ this.logFilePath = getDextoPath("logs", "dexto.log");
1821
+ }
1822
+ }
1823
+ createTransports(_options) {
1824
+ const transports2 = [];
1825
+ if (this.logToConsole) {
1826
+ transports2.push(
1827
+ new winston.transports.Console({
1828
+ format: winston.format.combine(
1829
+ winston.format.timestamp({ format: "HH:mm:ss" }),
1830
+ maskFormat(),
1831
+ consoleFormat
1832
+ )
1833
+ })
1834
+ );
1835
+ }
1836
+ try {
1837
+ if (this.logFilePath) {
1838
+ const logDir = path3.dirname(this.logFilePath);
1839
+ fs.mkdirSync(logDir, { recursive: true });
1840
+ transports2.push(
1841
+ new winston.transports.File({
1842
+ filename: this.logFilePath,
1843
+ format: winston.format.combine(
1844
+ winston.format.timestamp({ format: "YYYY-MM-DD HH:mm:ss" }),
1845
+ maskFormat(),
1846
+ winston.format.errors({ stack: true }),
1847
+ winston.format.json()
1848
+ ),
1849
+ // Add daily rotation
1850
+ maxsize: 10 * 1024 * 1024,
1851
+ // 10MB
1852
+ maxFiles: 7,
1853
+ // Keep 7 files
1854
+ tailable: true
1855
+ })
1856
+ );
1857
+ }
1858
+ } catch (error) {
1859
+ console.error(`Failed to initialize file logging: ${error}. Falling back to console.`);
1860
+ if (!this.logToConsole) {
1861
+ this.logToConsole = true;
1862
+ transports2.push(
1863
+ new winston.transports.Console({
1864
+ format: winston.format.combine(
1865
+ winston.format.timestamp({ format: "HH:mm:ss" }),
1866
+ maskFormat(),
1867
+ consoleFormat
1868
+ )
1869
+ })
1870
+ );
1871
+ }
1872
+ }
1873
+ return transports2;
1874
+ }
1875
+ // General logging methods with optional color parameter
1876
+ error(message, meta, color) {
1877
+ this.logger.error(message, { ...meta, color });
1878
+ }
1879
+ warn(message, meta, color) {
1880
+ this.logger.warn(message, { ...meta, color });
1881
+ }
1882
+ info(message, meta, color) {
1883
+ this.logger.info(message, { ...meta, color });
1884
+ }
1885
+ http(message, meta, color) {
1886
+ this.logger.http(message, { ...meta, color });
1887
+ }
1888
+ verbose(message, meta, color) {
1889
+ this.logger.verbose(message, { ...meta, color });
1890
+ }
1891
+ debug(message, meta, color) {
1892
+ const formattedMessage = typeof message === "string" ? message : JSON.stringify(message, null, 2);
1893
+ this.logger.debug(formattedMessage, { ...meta, color });
1894
+ }
1895
+ silly(message, meta, color) {
1896
+ this.logger.silly(message, { ...meta, color });
1897
+ }
1898
+ // Display AI response in a box
1899
+ displayAIResponse(response) {
1900
+ if (this.isSilent) return;
1901
+ if (response.content) {
1902
+ console.log(
1903
+ boxen(source_default.white(response.content), {
1904
+ padding: 1,
1905
+ borderColor: "yellow",
1906
+ title: "\u{1F916} AI Response",
1907
+ titleAlignment: "center"
1908
+ })
1909
+ );
1910
+ } else {
1911
+ console.log(source_default.yellow("AI is thinking..."));
1912
+ }
1913
+ }
1914
+ // Tool-related logging
1915
+ toolCall(toolName, args) {
1916
+ if (this.isSilent) return;
1917
+ console.log(
1918
+ boxen(
1919
+ `${source_default.cyan("Tool Call")}: ${source_default.yellow(toolName)}
1920
+ ${source_default.dim("Arguments")}:
1921
+ ${source_default.white(JSON.stringify(args, null, 2))}`,
1922
+ { padding: 1, borderColor: "blue", title: "\u{1F527} Tool Call", titleAlignment: "center" }
1923
+ )
1924
+ );
1925
+ }
1926
+ toolResult(result) {
1927
+ if (this.isSilent) return;
1928
+ let displayText = "";
1929
+ let isError = false;
1930
+ let borderColor = "green";
1931
+ let title = "\u2705 Tool Result";
1932
+ if (result?.error || result?.isError) {
1933
+ isError = true;
1934
+ borderColor = "yellow";
1935
+ title = "\u26A0\uFE0F Tool Result (Error)";
1936
+ }
1937
+ if (result?.content && Array.isArray(result.content)) {
1938
+ result.content.forEach((item) => {
1939
+ if (item.type === "text") {
1940
+ displayText += item.text;
1941
+ } else if (item.type === "image" && item.url) {
1942
+ displayText += `[Image URL: ${item.url}]`;
1943
+ } else if (item.type === "image") {
1944
+ displayText += `[Image Data: ${item.mimeType || "unknown type"}]`;
1945
+ } else if (item.type === "markdown") {
1946
+ displayText += item.markdown;
1947
+ } else {
1948
+ displayText += `[Unsupported content type: ${item.type}]`;
1949
+ }
1950
+ displayText += "\n";
1951
+ });
1952
+ } else if (result?.message) {
1953
+ displayText = result.message;
1954
+ isError = true;
1955
+ borderColor = "red";
1956
+ title = "\u274C Tool Error";
1957
+ } else if (typeof result === "string") {
1958
+ if (result.length > 1e3) {
1959
+ displayText = `${result.slice(0, 500)}... [${result.length - 500} chars omitted]`;
1960
+ } else {
1961
+ displayText = result;
1962
+ }
1963
+ } else {
1964
+ try {
1965
+ const resultStr = JSON.stringify(result, null, 2);
1966
+ if (resultStr.length > 2e3) {
1967
+ displayText = `${resultStr.slice(0, 1e3)}... [${resultStr.length - 1e3} chars omitted]`;
1968
+ } else {
1969
+ displayText = resultStr;
1970
+ }
1971
+ } catch {
1972
+ displayText = `[Unparseable result: ${typeof result}]`;
1973
+ }
1974
+ }
1975
+ if (!displayText || displayText.trim() === "") {
1976
+ displayText = "[Empty result]";
1977
+ }
1978
+ const textColor = isError ? source_default.yellow : source_default.green;
1979
+ console.log(
1980
+ boxen(textColor(displayText), {
1981
+ padding: 1,
1982
+ borderColor,
1983
+ title,
1984
+ titleAlignment: "center"
1985
+ })
1986
+ );
1987
+ }
1988
+ // Configuration
1989
+ setLevel(level) {
1990
+ if (Object.keys(logLevels).includes(level.toLowerCase())) {
1991
+ this.logger.level = level.toLowerCase();
1992
+ if (!this.isSilent) {
1993
+ console.log(`Log level set to: ${level}`);
1994
+ }
1995
+ } else {
1996
+ this.error(`Invalid log level: ${level}. Using current level: ${this.logger.level}`);
1997
+ }
1998
+ }
1999
+ // Get the current log file path
2000
+ getLogFilePath() {
2001
+ return this.logFilePath;
2002
+ }
2003
+ // Get current log level
2004
+ getLevel() {
2005
+ return this.logger.level;
2006
+ }
2007
+ // CLI startup information display methods
2008
+ displayStartupInfo(info) {
2009
+ if (this.isSilent) return;
2010
+ console.log("");
2011
+ if (info.model && info.provider) {
2012
+ console.log(
2013
+ `\u{1F916} ${source_default.bold("Current Model:")} ${source_default.cyan(info.model)} ${source_default.dim(`(${info.provider})`)}`
2014
+ );
2015
+ }
2016
+ if (info.connectedServers) {
2017
+ if (info.connectedServers.count > 0) {
2018
+ const serverNames = info.connectedServers.names.join(", ");
2019
+ console.log(
2020
+ `\u{1F517} ${source_default.bold("Connected Servers:")} ${source_default.green(info.connectedServers.count)} ${source_default.dim(`(${serverNames})`)}`
2021
+ );
2022
+ } else {
2023
+ console.log(
2024
+ `\u{1F517} ${source_default.bold("Connected Servers:")} ${source_default.yellow("0")} ${source_default.dim("(no MCP servers connected)")}`
2025
+ );
2026
+ }
2027
+ }
2028
+ if (info.failedConnections && Object.keys(info.failedConnections).length > 0) {
2029
+ const failedNames = Object.keys(info.failedConnections);
2030
+ console.log(
2031
+ `\u274C ${source_default.bold("Failed Connections:")} ${source_default.red(failedNames.length)} ${source_default.dim(`(${failedNames.join(", ")})`)}`
2032
+ );
2033
+ for (const [serverName, error] of Object.entries(info.failedConnections)) {
2034
+ console.log(` ${source_default.red("\u2022")} ${source_default.dim(serverName)}: ${source_default.red(error)}`);
2035
+ }
2036
+ }
2037
+ if (info.toolStats) {
2038
+ console.log(
2039
+ `\u{1F6E0}\uFE0F ${source_default.bold("Available Tools:")} ${source_default.green(info.toolStats.total)} total ${source_default.dim(`(${info.toolStats.mcp} MCP, ${info.toolStats.internal} internal)`)}`
2040
+ );
2041
+ }
2042
+ if (info.sessionId) {
2043
+ console.log(`\u{1F4AC} ${source_default.bold("Session:")} ${source_default.blue(info.sessionId)}`);
2044
+ }
2045
+ if (info.logLevel && info.logFile) {
2046
+ console.log(
2047
+ `\u{1F4CB} ${source_default.bold("Log Level:")} ${source_default.cyan(info.logLevel)} ${source_default.dim(`(file: ${info.logFile})`)}`
2048
+ );
2049
+ }
2050
+ }
2051
+ displayError(message, error) {
2052
+ if (this.isSilent) return;
2053
+ const showStack = this.getLevel() === "debug";
2054
+ const errorContent = error?.stack && showStack ? `${source_default.red("Error")}: ${source_default.red(message)}
2055
+ ${source_default.dim(error.stack)}` : `${source_default.red("Error")}: ${source_default.red(message)}`;
2056
+ console.log(
2057
+ boxen(errorContent, {
2058
+ padding: 1,
2059
+ borderColor: "red",
2060
+ title: "\u274C Error",
2061
+ titleAlignment: "center"
2062
+ })
2063
+ );
2064
+ }
2065
+ };
2066
+ var logger = new Logger();
2067
+
2068
+ // src/utils/path.ts
2069
+ function getDextoPath(type, filename, startPath) {
2070
+ const context = getExecutionContext(startPath);
2071
+ let basePath;
2072
+ switch (context) {
2073
+ case "dexto-source": {
2074
+ const sourceRoot = findDextoSourceRoot(startPath);
2075
+ if (!sourceRoot) {
2076
+ throw new Error("Not in dexto source context");
2077
+ }
2078
+ basePath = path4.join(sourceRoot, ".dexto", type);
2079
+ break;
2080
+ }
2081
+ case "dexto-project": {
2082
+ const projectRoot = findDextoProjectRoot(startPath);
2083
+ if (!projectRoot) {
2084
+ throw new Error("Not in dexto project context");
2085
+ }
2086
+ basePath = path4.join(projectRoot, ".dexto", type);
2087
+ break;
2088
+ }
2089
+ case "global-cli": {
2090
+ basePath = path4.join(homedir(), ".dexto", type);
2091
+ break;
2092
+ }
2093
+ default: {
2094
+ throw new Error(`Unknown execution context: ${context}`);
2095
+ }
2096
+ }
2097
+ return filename ? path4.join(basePath, filename) : basePath;
2098
+ }
2099
+ function getDextoGlobalPath(type, filename) {
2100
+ const basePath = path4.join(homedir(), ".dexto", type);
2101
+ return filename ? path4.join(basePath, filename) : basePath;
2102
+ }
2103
+ async function copyDirectory(src, dest) {
2104
+ await fs2.mkdir(dest, { recursive: true });
2105
+ const entries = await fs2.readdir(src, { withFileTypes: true });
2106
+ for (const entry of entries) {
2107
+ const srcPath = path4.join(src, entry.name);
2108
+ const destPath = path4.join(dest, entry.name);
2109
+ if (entry.isDirectory()) {
2110
+ await copyDirectory(srcPath, destPath);
2111
+ } else {
2112
+ await fs2.copyFile(srcPath, destPath);
2113
+ }
2114
+ }
2115
+ }
2116
+ function isPath(str) {
2117
+ if (path4.isAbsolute(str)) return true;
2118
+ if (/[\\/]/.test(str)) return true;
2119
+ if (/\.(ya?ml|json)$/i.test(str)) return true;
2120
+ return false;
2121
+ }
2122
+ function findPackageRoot(startPath = process.cwd()) {
2123
+ return walkUpDirectories(startPath, (dirPath) => {
2124
+ const pkgPath = path4.join(dirPath, "package.json");
2125
+ return existsSync(pkgPath);
2126
+ });
2127
+ }
2128
+ function resolveBundledScript(scriptPath) {
2129
+ const candidates = scriptPath.startsWith("dist/") ? [scriptPath, scriptPath.replace(/^dist\//, "")] : [`dist/${scriptPath}`, scriptPath];
2130
+ try {
2131
+ const require2 = createRequire(import.meta.url);
2132
+ const pkgJson = require2.resolve("dexto/package.json");
2133
+ const pkgRoot = path4.dirname(pkgJson);
2134
+ for (const rel of candidates) {
2135
+ const abs = path4.resolve(pkgRoot, rel);
2136
+ if (existsSync(abs)) return abs;
2137
+ }
2138
+ } catch {
2139
+ }
2140
+ const repoRoot = findPackageRoot();
2141
+ if (repoRoot) {
2142
+ for (const rel of candidates) {
2143
+ const abs = path4.resolve(repoRoot, rel);
2144
+ if (existsSync(abs)) return abs;
2145
+ }
2146
+ }
2147
+ throw new Error(`Bundled script not found: ${scriptPath} (tried: ${candidates.join(", ")})`);
2148
+ }
2149
+ async function ensureDextoGlobalDirectory() {
2150
+ const dextoDir = path4.join(homedir(), ".dexto");
2151
+ try {
2152
+ await fs2.mkdir(dextoDir, { recursive: true });
2153
+ } catch (error) {
2154
+ if (error.code !== "EEXIST") {
2155
+ throw error;
2156
+ }
2157
+ }
2158
+ }
2159
+ function getDextoEnvPath(startPath = process.cwd()) {
2160
+ const context = getExecutionContext(startPath);
2161
+ let envPath = "";
2162
+ switch (context) {
2163
+ case "dexto-source": {
2164
+ const sourceRoot = findDextoSourceRoot(startPath);
2165
+ if (!sourceRoot) {
2166
+ throw new Error("Not in dexto source context");
2167
+ }
2168
+ envPath = path4.join(sourceRoot, ".env");
2169
+ break;
2170
+ }
2171
+ case "dexto-project": {
2172
+ const projectRoot = findDextoProjectRoot(startPath);
2173
+ if (!projectRoot) {
2174
+ throw new Error("Not in dexto project context");
2175
+ }
2176
+ envPath = path4.join(projectRoot, ".env");
2177
+ break;
2178
+ }
2179
+ case "global-cli": {
2180
+ envPath = path4.join(homedir(), ".dexto", ".env");
2181
+ break;
2182
+ }
2183
+ }
2184
+ logger.debug(`Dexto env path: ${envPath}, context: ${context}`);
2185
+ return envPath;
2186
+ }
2187
+
2188
+ export {
2189
+ walkUpDirectories,
2190
+ findDextoSourceRoot,
2191
+ findDextoProjectRoot,
2192
+ getExecutionContext,
2193
+ getDextoPath,
2194
+ getDextoGlobalPath,
2195
+ copyDirectory,
2196
+ isPath,
2197
+ findPackageRoot,
2198
+ resolveBundledScript,
2199
+ ensureDextoGlobalDirectory,
2200
+ getDextoEnvPath,
2201
+ Logger,
2202
+ logger
2203
+ };