@stamn/stamn-plugin 0.1.0-alpha.10 → 0.1.0-alpha.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -4,11 +4,11 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __getProtoOf = Object.getPrototypeOf;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __require = /* @__PURE__ */ ((x3) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x3, {
7
+ var __require = /* @__PURE__ */ ((x2) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x2, {
8
8
  get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
9
- }) : x3)(function(x3) {
9
+ }) : x2)(function(x2) {
10
10
  if (typeof require !== "undefined") return require.apply(this, arguments);
11
- throw Error('Dynamic require of "' + x3 + '" is not supported');
11
+ throw Error('Dynamic require of "' + x2 + '" is not supported');
12
12
  });
13
13
  var __commonJS = (cb, mod) => function __require2() {
14
14
  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
@@ -30,95 +30,22 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
30
30
  mod
31
31
  ));
32
32
 
33
- // ../stamn-cli/node_modules/picocolors/picocolors.js
34
- var require_picocolors = __commonJS({
35
- "../stamn-cli/node_modules/picocolors/picocolors.js"(exports, module) {
36
- "use strict";
37
- var p = process || {};
38
- var argv = p.argv || [];
39
- var env = p.env || {};
40
- var isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env.TERM !== "dumb" || !!env.CI);
41
- var formatter = (open, close, replace = open) => (input) => {
42
- let string = "" + input, index = string.indexOf(close, open.length);
43
- return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
44
- };
45
- var replaceClose = (string, close, replace, index) => {
46
- let result = "", cursor = 0;
47
- do {
48
- result += string.substring(cursor, index) + replace;
49
- cursor = index + close.length;
50
- index = string.indexOf(close, cursor);
51
- } while (~index);
52
- return result + string.substring(cursor);
53
- };
54
- var createColors = (enabled = isColorSupported) => {
55
- let f = enabled ? formatter : () => String;
56
- return {
57
- isColorSupported: enabled,
58
- reset: f("\x1B[0m", "\x1B[0m"),
59
- bold: f("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
60
- dim: f("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
61
- italic: f("\x1B[3m", "\x1B[23m"),
62
- underline: f("\x1B[4m", "\x1B[24m"),
63
- inverse: f("\x1B[7m", "\x1B[27m"),
64
- hidden: f("\x1B[8m", "\x1B[28m"),
65
- strikethrough: f("\x1B[9m", "\x1B[29m"),
66
- black: f("\x1B[30m", "\x1B[39m"),
67
- red: f("\x1B[31m", "\x1B[39m"),
68
- green: f("\x1B[32m", "\x1B[39m"),
69
- yellow: f("\x1B[33m", "\x1B[39m"),
70
- blue: f("\x1B[34m", "\x1B[39m"),
71
- magenta: f("\x1B[35m", "\x1B[39m"),
72
- cyan: f("\x1B[36m", "\x1B[39m"),
73
- white: f("\x1B[37m", "\x1B[39m"),
74
- gray: f("\x1B[90m", "\x1B[39m"),
75
- bgBlack: f("\x1B[40m", "\x1B[49m"),
76
- bgRed: f("\x1B[41m", "\x1B[49m"),
77
- bgGreen: f("\x1B[42m", "\x1B[49m"),
78
- bgYellow: f("\x1B[43m", "\x1B[49m"),
79
- bgBlue: f("\x1B[44m", "\x1B[49m"),
80
- bgMagenta: f("\x1B[45m", "\x1B[49m"),
81
- bgCyan: f("\x1B[46m", "\x1B[49m"),
82
- bgWhite: f("\x1B[47m", "\x1B[49m"),
83
- blackBright: f("\x1B[90m", "\x1B[39m"),
84
- redBright: f("\x1B[91m", "\x1B[39m"),
85
- greenBright: f("\x1B[92m", "\x1B[39m"),
86
- yellowBright: f("\x1B[93m", "\x1B[39m"),
87
- blueBright: f("\x1B[94m", "\x1B[39m"),
88
- magentaBright: f("\x1B[95m", "\x1B[39m"),
89
- cyanBright: f("\x1B[96m", "\x1B[39m"),
90
- whiteBright: f("\x1B[97m", "\x1B[39m"),
91
- bgBlackBright: f("\x1B[100m", "\x1B[49m"),
92
- bgRedBright: f("\x1B[101m", "\x1B[49m"),
93
- bgGreenBright: f("\x1B[102m", "\x1B[49m"),
94
- bgYellowBright: f("\x1B[103m", "\x1B[49m"),
95
- bgBlueBright: f("\x1B[104m", "\x1B[49m"),
96
- bgMagentaBright: f("\x1B[105m", "\x1B[49m"),
97
- bgCyanBright: f("\x1B[106m", "\x1B[49m"),
98
- bgWhiteBright: f("\x1B[107m", "\x1B[49m")
99
- };
100
- };
101
- module.exports = createColors();
102
- module.exports.createColors = createColors;
103
- }
104
- });
105
-
106
- // ../stamn-cli/node_modules/sisteransi/src/index.js
33
+ // node_modules/.pnpm/sisteransi@1.0.5/node_modules/sisteransi/src/index.js
107
34
  var require_src = __commonJS({
108
- "../stamn-cli/node_modules/sisteransi/src/index.js"(exports, module) {
35
+ "node_modules/.pnpm/sisteransi@1.0.5/node_modules/sisteransi/src/index.js"(exports, module) {
109
36
  "use strict";
110
37
  var ESC = "\x1B";
111
38
  var CSI = `${ESC}[`;
112
39
  var beep = "\x07";
113
40
  var cursor = {
114
- to(x3, y2) {
115
- if (!y2) return `${CSI}${x3 + 1}G`;
116
- return `${CSI}${y2 + 1};${x3 + 1}H`;
41
+ to(x2, y2) {
42
+ if (!y2) return `${CSI}${x2 + 1}G`;
43
+ return `${CSI}${y2 + 1};${x2 + 1}H`;
117
44
  },
118
- move(x3, y2) {
45
+ move(x2, y2) {
119
46
  let ret = "";
120
- if (x3 < 0) ret += `${CSI}${-x3}D`;
121
- else if (x3 > 0) ret += `${CSI}${x3}C`;
47
+ if (x2 < 0) ret += `${CSI}${-x2}D`;
48
+ else if (x2 > 0) ret += `${CSI}${x2}C`;
122
49
  if (y2 < 0) ret += `${CSI}${-y2}A`;
123
50
  else if (y2 > 0) ret += `${CSI}${y2}B`;
124
51
  return ret;
@@ -159,9 +86,9 @@ var require_src = __commonJS({
159
86
  }
160
87
  });
161
88
 
162
- // node_modules/ws/lib/constants.js
89
+ // node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/constants.js
163
90
  var require_constants = __commonJS({
164
- "node_modules/ws/lib/constants.js"(exports, module) {
91
+ "node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/constants.js"(exports, module) {
165
92
  "use strict";
166
93
  var BINARY_TYPES = ["nodebuffer", "arraybuffer", "fragments"];
167
94
  var hasBlob = typeof Blob !== "undefined";
@@ -182,9 +109,9 @@ var require_constants = __commonJS({
182
109
  }
183
110
  });
184
111
 
185
- // node_modules/ws/lib/buffer-util.js
112
+ // node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/buffer-util.js
186
113
  var require_buffer_util = __commonJS({
187
- "node_modules/ws/lib/buffer-util.js"(exports, module) {
114
+ "node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/buffer-util.js"(exports, module) {
188
115
  "use strict";
189
116
  var { EMPTY_BUFFER } = require_constants();
190
117
  var FastBuffer = Buffer[Symbol.species];
@@ -251,15 +178,15 @@ var require_buffer_util = __commonJS({
251
178
  if (buffer.length < 32) _unmask(buffer, mask);
252
179
  else bufferUtil.unmask(buffer, mask);
253
180
  };
254
- } catch (e2) {
181
+ } catch (e) {
255
182
  }
256
183
  }
257
184
  }
258
185
  });
259
186
 
260
- // node_modules/ws/lib/limiter.js
187
+ // node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/limiter.js
261
188
  var require_limiter = __commonJS({
262
- "node_modules/ws/lib/limiter.js"(exports, module) {
189
+ "node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/limiter.js"(exports, module) {
263
190
  "use strict";
264
191
  var kDone = /* @__PURE__ */ Symbol("kDone");
265
192
  var kRun = /* @__PURE__ */ Symbol("kRun");
@@ -307,9 +234,9 @@ var require_limiter = __commonJS({
307
234
  }
308
235
  });
309
236
 
310
- // node_modules/ws/lib/permessage-deflate.js
237
+ // node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/permessage-deflate.js
311
238
  var require_permessage_deflate = __commonJS({
312
- "node_modules/ws/lib/permessage-deflate.js"(exports, module) {
239
+ "node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/permessage-deflate.js"(exports, module) {
313
240
  "use strict";
314
241
  var zlib = __require("zlib");
315
242
  var bufferUtil = require_buffer_util();
@@ -690,9 +617,9 @@ var require_permessage_deflate = __commonJS({
690
617
  }
691
618
  });
692
619
 
693
- // node_modules/ws/lib/validation.js
620
+ // node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/validation.js
694
621
  var require_validation = __commonJS({
695
- "node_modules/ws/lib/validation.js"(exports, module) {
622
+ "node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/validation.js"(exports, module) {
696
623
  "use strict";
697
624
  var { isUtf8 } = __require("buffer");
698
625
  var { hasBlob } = require_constants();
@@ -885,15 +812,15 @@ var require_validation = __commonJS({
885
812
  module.exports.isValidUTF8 = function(buf) {
886
813
  return buf.length < 32 ? _isValidUTF8(buf) : isValidUTF8(buf);
887
814
  };
888
- } catch (e2) {
815
+ } catch (e) {
889
816
  }
890
817
  }
891
818
  }
892
819
  });
893
820
 
894
- // node_modules/ws/lib/receiver.js
821
+ // node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/receiver.js
895
822
  var require_receiver = __commonJS({
896
- "node_modules/ws/lib/receiver.js"(exports, module) {
823
+ "node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/receiver.js"(exports, module) {
897
824
  "use strict";
898
825
  var { Writable } = __require("stream");
899
826
  var PerMessageDeflate = require_permessage_deflate();
@@ -1483,9 +1410,9 @@ var require_receiver = __commonJS({
1483
1410
  }
1484
1411
  });
1485
1412
 
1486
- // node_modules/ws/lib/sender.js
1413
+ // node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/sender.js
1487
1414
  var require_sender = __commonJS({
1488
- "node_modules/ws/lib/sender.js"(exports, module) {
1415
+ "node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/sender.js"(exports, module) {
1489
1416
  "use strict";
1490
1417
  var { Duplex } = __require("stream");
1491
1418
  var { randomFillSync } = __require("crypto");
@@ -1971,9 +1898,9 @@ var require_sender = __commonJS({
1971
1898
  }
1972
1899
  });
1973
1900
 
1974
- // node_modules/ws/lib/event-target.js
1901
+ // node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/event-target.js
1975
1902
  var require_event_target = __commonJS({
1976
- "node_modules/ws/lib/event-target.js"(exports, module) {
1903
+ "node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/event-target.js"(exports, module) {
1977
1904
  "use strict";
1978
1905
  var { kForOnEventAttribute, kListener } = require_constants();
1979
1906
  var kCode = /* @__PURE__ */ Symbol("kCode");
@@ -2200,9 +2127,9 @@ var require_event_target = __commonJS({
2200
2127
  }
2201
2128
  });
2202
2129
 
2203
- // node_modules/ws/lib/extension.js
2130
+ // node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/extension.js
2204
2131
  var require_extension = __commonJS({
2205
- "node_modules/ws/lib/extension.js"(exports, module) {
2132
+ "node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/extension.js"(exports, module) {
2206
2133
  "use strict";
2207
2134
  var { tokenChars } = require_validation();
2208
2135
  function push(dest, name, elem) {
@@ -2353,9 +2280,9 @@ var require_extension = __commonJS({
2353
2280
  }
2354
2281
  });
2355
2282
 
2356
- // node_modules/ws/lib/websocket.js
2283
+ // node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/websocket.js
2357
2284
  var require_websocket = __commonJS({
2358
- "node_modules/ws/lib/websocket.js"(exports, module) {
2285
+ "node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/websocket.js"(exports, module) {
2359
2286
  "use strict";
2360
2287
  var EventEmitter = __require("events");
2361
2288
  var https = __require("https");
@@ -2862,7 +2789,7 @@ var require_websocket = __commonJS({
2862
2789
  } else {
2863
2790
  try {
2864
2791
  parsedUrl = new URL(address);
2865
- } catch (e2) {
2792
+ } catch (e) {
2866
2793
  throw new SyntaxError(`Invalid URL: ${address}`);
2867
2794
  }
2868
2795
  }
@@ -2999,7 +2926,7 @@ var require_websocket = __commonJS({
2999
2926
  let addr;
3000
2927
  try {
3001
2928
  addr = new URL(location, address);
3002
- } catch (e2) {
2929
+ } catch (e) {
3003
2930
  const err = new SyntaxError(`Invalid URL: ${location}`);
3004
2931
  emitErrorAndClose(websocket, err);
3005
2932
  return;
@@ -3239,9 +3166,9 @@ var require_websocket = __commonJS({
3239
3166
  }
3240
3167
  });
3241
3168
 
3242
- // node_modules/ws/lib/stream.js
3169
+ // node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/stream.js
3243
3170
  var require_stream = __commonJS({
3244
- "node_modules/ws/lib/stream.js"(exports, module) {
3171
+ "node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/stream.js"(exports, module) {
3245
3172
  "use strict";
3246
3173
  var WebSocket2 = require_websocket();
3247
3174
  var { Duplex } = __require("stream");
@@ -3337,9 +3264,9 @@ var require_stream = __commonJS({
3337
3264
  }
3338
3265
  });
3339
3266
 
3340
- // node_modules/ws/lib/subprotocol.js
3267
+ // node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/subprotocol.js
3341
3268
  var require_subprotocol = __commonJS({
3342
- "node_modules/ws/lib/subprotocol.js"(exports, module) {
3269
+ "node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/subprotocol.js"(exports, module) {
3343
3270
  "use strict";
3344
3271
  var { tokenChars } = require_validation();
3345
3272
  function parse(header) {
@@ -3382,9 +3309,9 @@ var require_subprotocol = __commonJS({
3382
3309
  }
3383
3310
  });
3384
3311
 
3385
- // node_modules/ws/lib/websocket-server.js
3312
+ // node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/websocket-server.js
3386
3313
  var require_websocket_server = __commonJS({
3387
- "node_modules/ws/lib/websocket-server.js"(exports, module) {
3314
+ "node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/websocket-server.js"(exports, module) {
3388
3315
  "use strict";
3389
3316
  var EventEmitter = __require("events");
3390
3317
  var http = __require("http");
@@ -3760,7 +3687,7 @@ var require_websocket_server = __commonJS({
3760
3687
  socket.once("finish", socket.destroy);
3761
3688
  socket.end(
3762
3689
  `HTTP/1.1 ${code} ${http.STATUS_CODES[code]}\r
3763
- ` + Object.keys(headers).map((h) => `${h}: ${headers[h]}`).join("\r\n") + "\r\n\r\n" + message
3690
+ ` + Object.keys(headers).map((h2) => `${h2}: ${headers[h2]}`).join("\r\n") + "\r\n\r\n" + message
3764
3691
  );
3765
3692
  }
3766
3693
  function abortHandshakeOrEmitwsClientError(server, req, socket, code, message, headers) {
@@ -3775,16 +3702,16 @@ var require_websocket_server = __commonJS({
3775
3702
  }
3776
3703
  });
3777
3704
 
3778
- // ../stamn-cli/node_modules/@clack/core/dist/index.mjs
3779
- var import_picocolors = __toESM(require_picocolors(), 1);
3705
+ // node_modules/.pnpm/@clack+core@1.1.0/node_modules/@clack/core/dist/index.mjs
3780
3706
  var import_sisteransi = __toESM(require_src(), 1);
3707
+ import { styleText as D } from "util";
3781
3708
  import { stdout as R, stdin as q } from "process";
3782
3709
  import * as k from "readline";
3783
3710
  import ot from "readline";
3784
3711
  import { ReadStream as J } from "tty";
3785
- var at = (t) => t === 161 || t === 164 || t === 167 || t === 168 || t === 170 || t === 173 || t === 174 || t >= 176 && t <= 180 || t >= 182 && t <= 186 || t >= 188 && t <= 191 || t === 198 || t === 208 || t === 215 || t === 216 || t >= 222 && t <= 225 || t === 230 || t >= 232 && t <= 234 || t === 236 || t === 237 || t === 240 || t === 242 || t === 243 || t >= 247 && t <= 250 || t === 252 || t === 254 || t === 257 || t === 273 || t === 275 || t === 283 || t === 294 || t === 295 || t === 299 || t >= 305 && t <= 307 || t === 312 || t >= 319 && t <= 322 || t === 324 || t >= 328 && t <= 331 || t === 333 || t === 338 || t === 339 || t === 358 || t === 359 || t === 363 || t === 462 || t === 464 || t === 466 || t === 468 || t === 470 || t === 472 || t === 474 || t === 476 || t === 593 || t === 609 || t === 708 || t === 711 || t >= 713 && t <= 715 || t === 717 || t === 720 || t >= 728 && t <= 731 || t === 733 || t === 735 || t >= 768 && t <= 879 || t >= 913 && t <= 929 || t >= 931 && t <= 937 || t >= 945 && t <= 961 || t >= 963 && t <= 969 || t === 1025 || t >= 1040 && t <= 1103 || t === 1105 || t === 8208 || t >= 8211 && t <= 8214 || t === 8216 || t === 8217 || t === 8220 || t === 8221 || t >= 8224 && t <= 8226 || t >= 8228 && t <= 8231 || t === 8240 || t === 8242 || t === 8243 || t === 8245 || t === 8251 || t === 8254 || t === 8308 || t === 8319 || t >= 8321 && t <= 8324 || t === 8364 || t === 8451 || t === 8453 || t === 8457 || t === 8467 || t === 8470 || t === 8481 || t === 8482 || t === 8486 || t === 8491 || t === 8531 || t === 8532 || t >= 8539 && t <= 8542 || t >= 8544 && t <= 8555 || t >= 8560 && t <= 8569 || t === 8585 || t >= 8592 && t <= 8601 || t === 8632 || t === 8633 || t === 8658 || t === 8660 || t === 8679 || t === 8704 || t === 8706 || t === 8707 || t === 8711 || t === 8712 || t === 8715 || t === 8719 || t === 8721 || t === 8725 || t === 8730 || t >= 8733 && t <= 8736 || t === 8739 || t === 8741 || t >= 8743 && t <= 8748 || t === 8750 || t >= 8756 && t <= 8759 || t === 8764 || t === 8765 || t === 8776 || t === 8780 || t === 8786 || t === 8800 || t === 8801 || t >= 8804 && t <= 8807 || t === 8810 || t === 8811 || t === 8814 || t === 8815 || t === 8834 || t === 8835 || t === 8838 || t === 8839 || t === 8853 || t === 8857 || t === 8869 || t === 8895 || t === 8978 || t >= 9312 && t <= 9449 || t >= 9451 && t <= 9547 || t >= 9552 && t <= 9587 || t >= 9600 && t <= 9615 || t >= 9618 && t <= 9621 || t === 9632 || t === 9633 || t >= 9635 && t <= 9641 || t === 9650 || t === 9651 || t === 9654 || t === 9655 || t === 9660 || t === 9661 || t === 9664 || t === 9665 || t >= 9670 && t <= 9672 || t === 9675 || t >= 9678 && t <= 9681 || t >= 9698 && t <= 9701 || t === 9711 || t === 9733 || t === 9734 || t === 9737 || t === 9742 || t === 9743 || t === 9756 || t === 9758 || t === 9792 || t === 9794 || t === 9824 || t === 9825 || t >= 9827 && t <= 9829 || t >= 9831 && t <= 9834 || t === 9836 || t === 9837 || t === 9839 || t === 9886 || t === 9887 || t === 9919 || t >= 9926 && t <= 9933 || t >= 9935 && t <= 9939 || t >= 9941 && t <= 9953 || t === 9955 || t === 9960 || t === 9961 || t >= 9963 && t <= 9969 || t === 9972 || t >= 9974 && t <= 9977 || t === 9979 || t === 9980 || t === 9982 || t === 9983 || t === 10045 || t >= 10102 && t <= 10111 || t >= 11094 && t <= 11097 || t >= 12872 && t <= 12879 || t >= 57344 && t <= 63743 || t >= 65024 && t <= 65039 || t === 65533 || t >= 127232 && t <= 127242 || t >= 127248 && t <= 127277 || t >= 127280 && t <= 127337 || t >= 127344 && t <= 127373 || t === 127375 || t === 127376 || t >= 127387 && t <= 127404 || t >= 917760 && t <= 917999 || t >= 983040 && t <= 1048573 || t >= 1048576 && t <= 1114109;
3786
- var lt = (t) => t === 12288 || t >= 65281 && t <= 65376 || t >= 65504 && t <= 65510;
3787
- var ht = (t) => t >= 4352 && t <= 4447 || t === 8986 || t === 8987 || t === 9001 || t === 9002 || t >= 9193 && t <= 9196 || t === 9200 || t === 9203 || t === 9725 || t === 9726 || t === 9748 || t === 9749 || t >= 9800 && t <= 9811 || t === 9855 || t === 9875 || t === 9889 || t === 9898 || t === 9899 || t === 9917 || t === 9918 || t === 9924 || t === 9925 || t === 9934 || t === 9940 || t === 9962 || t === 9970 || t === 9971 || t === 9973 || t === 9978 || t === 9981 || t === 9989 || t === 9994 || t === 9995 || t === 10024 || t === 10060 || t === 10062 || t >= 10067 && t <= 10069 || t === 10071 || t >= 10133 && t <= 10135 || t === 10160 || t === 10175 || t === 11035 || t === 11036 || t === 11088 || t === 11093 || t >= 11904 && t <= 11929 || t >= 11931 && t <= 12019 || t >= 12032 && t <= 12245 || t >= 12272 && t <= 12287 || t >= 12289 && t <= 12350 || t >= 12353 && t <= 12438 || t >= 12441 && t <= 12543 || t >= 12549 && t <= 12591 || t >= 12593 && t <= 12686 || t >= 12688 && t <= 12771 || t >= 12783 && t <= 12830 || t >= 12832 && t <= 12871 || t >= 12880 && t <= 19903 || t >= 19968 && t <= 42124 || t >= 42128 && t <= 42182 || t >= 43360 && t <= 43388 || t >= 44032 && t <= 55203 || t >= 63744 && t <= 64255 || t >= 65040 && t <= 65049 || t >= 65072 && t <= 65106 || t >= 65108 && t <= 65126 || t >= 65128 && t <= 65131 || t >= 94176 && t <= 94180 || t === 94192 || t === 94193 || t >= 94208 && t <= 100343 || t >= 100352 && t <= 101589 || t >= 101632 && t <= 101640 || t >= 110576 && t <= 110579 || t >= 110581 && t <= 110587 || t === 110589 || t === 110590 || t >= 110592 && t <= 110882 || t === 110898 || t >= 110928 && t <= 110930 || t === 110933 || t >= 110948 && t <= 110951 || t >= 110960 && t <= 111355 || t === 126980 || t === 127183 || t === 127374 || t >= 127377 && t <= 127386 || t >= 127488 && t <= 127490 || t >= 127504 && t <= 127547 || t >= 127552 && t <= 127560 || t === 127568 || t === 127569 || t >= 127584 && t <= 127589 || t >= 127744 && t <= 127776 || t >= 127789 && t <= 127797 || t >= 127799 && t <= 127868 || t >= 127870 && t <= 127891 || t >= 127904 && t <= 127946 || t >= 127951 && t <= 127955 || t >= 127968 && t <= 127984 || t === 127988 || t >= 127992 && t <= 128062 || t === 128064 || t >= 128066 && t <= 128252 || t >= 128255 && t <= 128317 || t >= 128331 && t <= 128334 || t >= 128336 && t <= 128359 || t === 128378 || t === 128405 || t === 128406 || t === 128420 || t >= 128507 && t <= 128591 || t >= 128640 && t <= 128709 || t === 128716 || t >= 128720 && t <= 128722 || t >= 128725 && t <= 128727 || t >= 128732 && t <= 128735 || t === 128747 || t === 128748 || t >= 128756 && t <= 128764 || t >= 128992 && t <= 129003 || t === 129008 || t >= 129292 && t <= 129338 || t >= 129340 && t <= 129349 || t >= 129351 && t <= 129535 || t >= 129648 && t <= 129660 || t >= 129664 && t <= 129672 || t >= 129680 && t <= 129725 || t >= 129727 && t <= 129733 || t >= 129742 && t <= 129755 || t >= 129760 && t <= 129768 || t >= 129776 && t <= 129784 || t >= 131072 && t <= 196605 || t >= 196608 && t <= 262141;
3712
+ var at = (t2) => t2 === 161 || t2 === 164 || t2 === 167 || t2 === 168 || t2 === 170 || t2 === 173 || t2 === 174 || t2 >= 176 && t2 <= 180 || t2 >= 182 && t2 <= 186 || t2 >= 188 && t2 <= 191 || t2 === 198 || t2 === 208 || t2 === 215 || t2 === 216 || t2 >= 222 && t2 <= 225 || t2 === 230 || t2 >= 232 && t2 <= 234 || t2 === 236 || t2 === 237 || t2 === 240 || t2 === 242 || t2 === 243 || t2 >= 247 && t2 <= 250 || t2 === 252 || t2 === 254 || t2 === 257 || t2 === 273 || t2 === 275 || t2 === 283 || t2 === 294 || t2 === 295 || t2 === 299 || t2 >= 305 && t2 <= 307 || t2 === 312 || t2 >= 319 && t2 <= 322 || t2 === 324 || t2 >= 328 && t2 <= 331 || t2 === 333 || t2 === 338 || t2 === 339 || t2 === 358 || t2 === 359 || t2 === 363 || t2 === 462 || t2 === 464 || t2 === 466 || t2 === 468 || t2 === 470 || t2 === 472 || t2 === 474 || t2 === 476 || t2 === 593 || t2 === 609 || t2 === 708 || t2 === 711 || t2 >= 713 && t2 <= 715 || t2 === 717 || t2 === 720 || t2 >= 728 && t2 <= 731 || t2 === 733 || t2 === 735 || t2 >= 768 && t2 <= 879 || t2 >= 913 && t2 <= 929 || t2 >= 931 && t2 <= 937 || t2 >= 945 && t2 <= 961 || t2 >= 963 && t2 <= 969 || t2 === 1025 || t2 >= 1040 && t2 <= 1103 || t2 === 1105 || t2 === 8208 || t2 >= 8211 && t2 <= 8214 || t2 === 8216 || t2 === 8217 || t2 === 8220 || t2 === 8221 || t2 >= 8224 && t2 <= 8226 || t2 >= 8228 && t2 <= 8231 || t2 === 8240 || t2 === 8242 || t2 === 8243 || t2 === 8245 || t2 === 8251 || t2 === 8254 || t2 === 8308 || t2 === 8319 || t2 >= 8321 && t2 <= 8324 || t2 === 8364 || t2 === 8451 || t2 === 8453 || t2 === 8457 || t2 === 8467 || t2 === 8470 || t2 === 8481 || t2 === 8482 || t2 === 8486 || t2 === 8491 || t2 === 8531 || t2 === 8532 || t2 >= 8539 && t2 <= 8542 || t2 >= 8544 && t2 <= 8555 || t2 >= 8560 && t2 <= 8569 || t2 === 8585 || t2 >= 8592 && t2 <= 8601 || t2 === 8632 || t2 === 8633 || t2 === 8658 || t2 === 8660 || t2 === 8679 || t2 === 8704 || t2 === 8706 || t2 === 8707 || t2 === 8711 || t2 === 8712 || t2 === 8715 || t2 === 8719 || t2 === 8721 || t2 === 8725 || t2 === 8730 || t2 >= 8733 && t2 <= 8736 || t2 === 8739 || t2 === 8741 || t2 >= 8743 && t2 <= 8748 || t2 === 8750 || t2 >= 8756 && t2 <= 8759 || t2 === 8764 || t2 === 8765 || t2 === 8776 || t2 === 8780 || t2 === 8786 || t2 === 8800 || t2 === 8801 || t2 >= 8804 && t2 <= 8807 || t2 === 8810 || t2 === 8811 || t2 === 8814 || t2 === 8815 || t2 === 8834 || t2 === 8835 || t2 === 8838 || t2 === 8839 || t2 === 8853 || t2 === 8857 || t2 === 8869 || t2 === 8895 || t2 === 8978 || t2 >= 9312 && t2 <= 9449 || t2 >= 9451 && t2 <= 9547 || t2 >= 9552 && t2 <= 9587 || t2 >= 9600 && t2 <= 9615 || t2 >= 9618 && t2 <= 9621 || t2 === 9632 || t2 === 9633 || t2 >= 9635 && t2 <= 9641 || t2 === 9650 || t2 === 9651 || t2 === 9654 || t2 === 9655 || t2 === 9660 || t2 === 9661 || t2 === 9664 || t2 === 9665 || t2 >= 9670 && t2 <= 9672 || t2 === 9675 || t2 >= 9678 && t2 <= 9681 || t2 >= 9698 && t2 <= 9701 || t2 === 9711 || t2 === 9733 || t2 === 9734 || t2 === 9737 || t2 === 9742 || t2 === 9743 || t2 === 9756 || t2 === 9758 || t2 === 9792 || t2 === 9794 || t2 === 9824 || t2 === 9825 || t2 >= 9827 && t2 <= 9829 || t2 >= 9831 && t2 <= 9834 || t2 === 9836 || t2 === 9837 || t2 === 9839 || t2 === 9886 || t2 === 9887 || t2 === 9919 || t2 >= 9926 && t2 <= 9933 || t2 >= 9935 && t2 <= 9939 || t2 >= 9941 && t2 <= 9953 || t2 === 9955 || t2 === 9960 || t2 === 9961 || t2 >= 9963 && t2 <= 9969 || t2 === 9972 || t2 >= 9974 && t2 <= 9977 || t2 === 9979 || t2 === 9980 || t2 === 9982 || t2 === 9983 || t2 === 10045 || t2 >= 10102 && t2 <= 10111 || t2 >= 11094 && t2 <= 11097 || t2 >= 12872 && t2 <= 12879 || t2 >= 57344 && t2 <= 63743 || t2 >= 65024 && t2 <= 65039 || t2 === 65533 || t2 >= 127232 && t2 <= 127242 || t2 >= 127248 && t2 <= 127277 || t2 >= 127280 && t2 <= 127337 || t2 >= 127344 && t2 <= 127373 || t2 === 127375 || t2 === 127376 || t2 >= 127387 && t2 <= 127404 || t2 >= 917760 && t2 <= 917999 || t2 >= 983040 && t2 <= 1048573 || t2 >= 1048576 && t2 <= 1114109;
3713
+ var lt = (t2) => t2 === 12288 || t2 >= 65281 && t2 <= 65376 || t2 >= 65504 && t2 <= 65510;
3714
+ var ht = (t2) => t2 >= 4352 && t2 <= 4447 || t2 === 8986 || t2 === 8987 || t2 === 9001 || t2 === 9002 || t2 >= 9193 && t2 <= 9196 || t2 === 9200 || t2 === 9203 || t2 === 9725 || t2 === 9726 || t2 === 9748 || t2 === 9749 || t2 >= 9800 && t2 <= 9811 || t2 === 9855 || t2 === 9875 || t2 === 9889 || t2 === 9898 || t2 === 9899 || t2 === 9917 || t2 === 9918 || t2 === 9924 || t2 === 9925 || t2 === 9934 || t2 === 9940 || t2 === 9962 || t2 === 9970 || t2 === 9971 || t2 === 9973 || t2 === 9978 || t2 === 9981 || t2 === 9989 || t2 === 9994 || t2 === 9995 || t2 === 10024 || t2 === 10060 || t2 === 10062 || t2 >= 10067 && t2 <= 10069 || t2 === 10071 || t2 >= 10133 && t2 <= 10135 || t2 === 10160 || t2 === 10175 || t2 === 11035 || t2 === 11036 || t2 === 11088 || t2 === 11093 || t2 >= 11904 && t2 <= 11929 || t2 >= 11931 && t2 <= 12019 || t2 >= 12032 && t2 <= 12245 || t2 >= 12272 && t2 <= 12287 || t2 >= 12289 && t2 <= 12350 || t2 >= 12353 && t2 <= 12438 || t2 >= 12441 && t2 <= 12543 || t2 >= 12549 && t2 <= 12591 || t2 >= 12593 && t2 <= 12686 || t2 >= 12688 && t2 <= 12771 || t2 >= 12783 && t2 <= 12830 || t2 >= 12832 && t2 <= 12871 || t2 >= 12880 && t2 <= 19903 || t2 >= 19968 && t2 <= 42124 || t2 >= 42128 && t2 <= 42182 || t2 >= 43360 && t2 <= 43388 || t2 >= 44032 && t2 <= 55203 || t2 >= 63744 && t2 <= 64255 || t2 >= 65040 && t2 <= 65049 || t2 >= 65072 && t2 <= 65106 || t2 >= 65108 && t2 <= 65126 || t2 >= 65128 && t2 <= 65131 || t2 >= 94176 && t2 <= 94180 || t2 === 94192 || t2 === 94193 || t2 >= 94208 && t2 <= 100343 || t2 >= 100352 && t2 <= 101589 || t2 >= 101632 && t2 <= 101640 || t2 >= 110576 && t2 <= 110579 || t2 >= 110581 && t2 <= 110587 || t2 === 110589 || t2 === 110590 || t2 >= 110592 && t2 <= 110882 || t2 === 110898 || t2 >= 110928 && t2 <= 110930 || t2 === 110933 || t2 >= 110948 && t2 <= 110951 || t2 >= 110960 && t2 <= 111355 || t2 === 126980 || t2 === 127183 || t2 === 127374 || t2 >= 127377 && t2 <= 127386 || t2 >= 127488 && t2 <= 127490 || t2 >= 127504 && t2 <= 127547 || t2 >= 127552 && t2 <= 127560 || t2 === 127568 || t2 === 127569 || t2 >= 127584 && t2 <= 127589 || t2 >= 127744 && t2 <= 127776 || t2 >= 127789 && t2 <= 127797 || t2 >= 127799 && t2 <= 127868 || t2 >= 127870 && t2 <= 127891 || t2 >= 127904 && t2 <= 127946 || t2 >= 127951 && t2 <= 127955 || t2 >= 127968 && t2 <= 127984 || t2 === 127988 || t2 >= 127992 && t2 <= 128062 || t2 === 128064 || t2 >= 128066 && t2 <= 128252 || t2 >= 128255 && t2 <= 128317 || t2 >= 128331 && t2 <= 128334 || t2 >= 128336 && t2 <= 128359 || t2 === 128378 || t2 === 128405 || t2 === 128406 || t2 === 128420 || t2 >= 128507 && t2 <= 128591 || t2 >= 128640 && t2 <= 128709 || t2 === 128716 || t2 >= 128720 && t2 <= 128722 || t2 >= 128725 && t2 <= 128727 || t2 >= 128732 && t2 <= 128735 || t2 === 128747 || t2 === 128748 || t2 >= 128756 && t2 <= 128764 || t2 >= 128992 && t2 <= 129003 || t2 === 129008 || t2 >= 129292 && t2 <= 129338 || t2 >= 129340 && t2 <= 129349 || t2 >= 129351 && t2 <= 129535 || t2 >= 129648 && t2 <= 129660 || t2 >= 129664 && t2 <= 129672 || t2 >= 129680 && t2 <= 129725 || t2 >= 129727 && t2 <= 129733 || t2 >= 129742 && t2 <= 129755 || t2 >= 129760 && t2 <= 129768 || t2 >= 129776 && t2 <= 129784 || t2 >= 131072 && t2 <= 196605 || t2 >= 196608 && t2 <= 262141;
3788
3715
  var O = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y;
3789
3716
  var y = /[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y;
3790
3717
  var L = /\t{1,1000}/y;
@@ -3792,71 +3719,71 @@ var P = /[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u
3792
3719
  var M = /(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y;
3793
3720
  var ct = /\p{M}+/gu;
3794
3721
  var ft = { limit: 1 / 0, ellipsis: "" };
3795
- var X = (t, e2 = {}, s = {}) => {
3796
- const i = e2.limit ?? 1 / 0, r = e2.ellipsis ?? "", n = e2?.ellipsisWidth ?? (r ? X(r, ft, s).width : 0), u = s.ansiWidth ?? 0, a = s.controlWidth ?? 0, l = s.tabWidth ?? 8, E = s.ambiguousWidth ?? 1, g = s.emojiWidth ?? 2, m = s.fullWidthWidth ?? 2, A = s.regularWidth ?? 1, V2 = s.wideWidth ?? 2;
3797
- let h = 0, o = 0, p = t.length, v = 0, F = false, d2 = p, b = Math.max(0, i - n), C2 = 0, w = 0, c = 0, f = 0;
3722
+ var X = (t2, e = {}, s = {}) => {
3723
+ const i = e.limit ?? 1 / 0, r = e.ellipsis ?? "", n = e?.ellipsisWidth ?? (r ? X(r, ft, s).width : 0), u = s.ansiWidth ?? 0, a = s.controlWidth ?? 0, l = s.tabWidth ?? 8, E = s.ambiguousWidth ?? 1, g = s.emojiWidth ?? 2, m = s.fullWidthWidth ?? 2, A = s.regularWidth ?? 1, V2 = s.wideWidth ?? 2;
3724
+ let h2 = 0, o = 0, p = t2.length, v = 0, F = false, d = p, b = Math.max(0, i - n), C = 0, w = 0, c = 0, f = 0;
3798
3725
  t: for (; ; ) {
3799
- if (w > C2 || o >= p && o > h) {
3800
- const ut2 = t.slice(C2, w) || t.slice(h, o);
3726
+ if (w > C || o >= p && o > h2) {
3727
+ const ut = t2.slice(C, w) || t2.slice(h2, o);
3801
3728
  v = 0;
3802
- for (const Y of ut2.replaceAll(ct, "")) {
3729
+ for (const Y of ut.replaceAll(ct, "")) {
3803
3730
  const $ = Y.codePointAt(0) || 0;
3804
- if (lt($) ? f = m : ht($) ? f = V2 : E !== A && at($) ? f = E : f = A, c + f > b && (d2 = Math.min(d2, Math.max(C2, h) + v)), c + f > i) {
3731
+ if (lt($) ? f = m : ht($) ? f = V2 : E !== A && at($) ? f = E : f = A, c + f > b && (d = Math.min(d, Math.max(C, h2) + v)), c + f > i) {
3805
3732
  F = true;
3806
3733
  break t;
3807
3734
  }
3808
3735
  v += Y.length, c += f;
3809
3736
  }
3810
- C2 = w = 0;
3737
+ C = w = 0;
3811
3738
  }
3812
3739
  if (o >= p) break;
3813
- if (M.lastIndex = o, M.test(t)) {
3814
- if (v = M.lastIndex - o, f = v * A, c + f > b && (d2 = Math.min(d2, o + Math.floor((b - c) / A))), c + f > i) {
3740
+ if (M.lastIndex = o, M.test(t2)) {
3741
+ if (v = M.lastIndex - o, f = v * A, c + f > b && (d = Math.min(d, o + Math.floor((b - c) / A))), c + f > i) {
3815
3742
  F = true;
3816
3743
  break;
3817
3744
  }
3818
- c += f, C2 = h, w = o, o = h = M.lastIndex;
3745
+ c += f, C = h2, w = o, o = h2 = M.lastIndex;
3819
3746
  continue;
3820
3747
  }
3821
- if (O.lastIndex = o, O.test(t)) {
3822
- if (c + u > b && (d2 = Math.min(d2, o)), c + u > i) {
3748
+ if (O.lastIndex = o, O.test(t2)) {
3749
+ if (c + u > b && (d = Math.min(d, o)), c + u > i) {
3823
3750
  F = true;
3824
3751
  break;
3825
3752
  }
3826
- c += u, C2 = h, w = o, o = h = O.lastIndex;
3753
+ c += u, C = h2, w = o, o = h2 = O.lastIndex;
3827
3754
  continue;
3828
3755
  }
3829
- if (y.lastIndex = o, y.test(t)) {
3830
- if (v = y.lastIndex - o, f = v * a, c + f > b && (d2 = Math.min(d2, o + Math.floor((b - c) / a))), c + f > i) {
3756
+ if (y.lastIndex = o, y.test(t2)) {
3757
+ if (v = y.lastIndex - o, f = v * a, c + f > b && (d = Math.min(d, o + Math.floor((b - c) / a))), c + f > i) {
3831
3758
  F = true;
3832
3759
  break;
3833
3760
  }
3834
- c += f, C2 = h, w = o, o = h = y.lastIndex;
3761
+ c += f, C = h2, w = o, o = h2 = y.lastIndex;
3835
3762
  continue;
3836
3763
  }
3837
- if (L.lastIndex = o, L.test(t)) {
3838
- if (v = L.lastIndex - o, f = v * l, c + f > b && (d2 = Math.min(d2, o + Math.floor((b - c) / l))), c + f > i) {
3764
+ if (L.lastIndex = o, L.test(t2)) {
3765
+ if (v = L.lastIndex - o, f = v * l, c + f > b && (d = Math.min(d, o + Math.floor((b - c) / l))), c + f > i) {
3839
3766
  F = true;
3840
3767
  break;
3841
3768
  }
3842
- c += f, C2 = h, w = o, o = h = L.lastIndex;
3769
+ c += f, C = h2, w = o, o = h2 = L.lastIndex;
3843
3770
  continue;
3844
3771
  }
3845
- if (P.lastIndex = o, P.test(t)) {
3846
- if (c + g > b && (d2 = Math.min(d2, o)), c + g > i) {
3772
+ if (P.lastIndex = o, P.test(t2)) {
3773
+ if (c + g > b && (d = Math.min(d, o)), c + g > i) {
3847
3774
  F = true;
3848
3775
  break;
3849
3776
  }
3850
- c += g, C2 = h, w = o, o = h = P.lastIndex;
3777
+ c += g, C = h2, w = o, o = h2 = P.lastIndex;
3851
3778
  continue;
3852
3779
  }
3853
3780
  o += 1;
3854
3781
  }
3855
- return { width: F ? b : c, index: F ? d2 : p, truncated: F, ellipsed: F && i >= n };
3782
+ return { width: F ? b : c, index: F ? d : p, truncated: F, ellipsed: F && i >= n };
3856
3783
  };
3857
3784
  var pt = { limit: 1 / 0, ellipsis: "", ellipsisWidth: 0 };
3858
- var S = (t, e2 = {}) => X(t, pt, e2).width;
3859
- var W = "\x1B";
3785
+ var S = (t2, e = {}) => X(t2, pt, e).width;
3786
+ var T = "\x1B";
3860
3787
  var Z = "\x9B";
3861
3788
  var Ft = 39;
3862
3789
  var j = "\x07";
@@ -3865,134 +3792,134 @@ var dt = "]";
3865
3792
  var tt = "m";
3866
3793
  var U = `${dt}8;;`;
3867
3794
  var et = new RegExp(`(?:\\${Q}(?<code>\\d+)m|\\${U}(?<uri>.*)${j})`, "y");
3868
- var mt = (t) => {
3869
- if (t >= 30 && t <= 37 || t >= 90 && t <= 97) return 39;
3870
- if (t >= 40 && t <= 47 || t >= 100 && t <= 107) return 49;
3871
- if (t === 1 || t === 2) return 22;
3872
- if (t === 3) return 23;
3873
- if (t === 4) return 24;
3874
- if (t === 7) return 27;
3875
- if (t === 8) return 28;
3876
- if (t === 9) return 29;
3877
- if (t === 0) return 0;
3795
+ var mt = (t2) => {
3796
+ if (t2 >= 30 && t2 <= 37 || t2 >= 90 && t2 <= 97) return 39;
3797
+ if (t2 >= 40 && t2 <= 47 || t2 >= 100 && t2 <= 107) return 49;
3798
+ if (t2 === 1 || t2 === 2) return 22;
3799
+ if (t2 === 3) return 23;
3800
+ if (t2 === 4) return 24;
3801
+ if (t2 === 7) return 27;
3802
+ if (t2 === 8) return 28;
3803
+ if (t2 === 9) return 29;
3804
+ if (t2 === 0) return 0;
3878
3805
  };
3879
- var st = (t) => `${W}${Q}${t}${tt}`;
3880
- var it = (t) => `${W}${U}${t}${j}`;
3881
- var gt = (t) => t.map((e2) => S(e2));
3882
- var G = (t, e2, s) => {
3883
- const i = e2[Symbol.iterator]();
3884
- let r = false, n = false, u = t.at(-1), a = u === void 0 ? 0 : S(u), l = i.next(), E = i.next(), g = 0;
3806
+ var st = (t2) => `${T}${Q}${t2}${tt}`;
3807
+ var it = (t2) => `${T}${U}${t2}${j}`;
3808
+ var gt = (t2) => t2.map((e) => S(e));
3809
+ var G = (t2, e, s) => {
3810
+ const i = e[Symbol.iterator]();
3811
+ let r = false, n = false, u = t2.at(-1), a = u === void 0 ? 0 : S(u), l = i.next(), E = i.next(), g = 0;
3885
3812
  for (; !l.done; ) {
3886
3813
  const m = l.value, A = S(m);
3887
- a + A <= s ? t[t.length - 1] += m : (t.push(m), a = 0), (m === W || m === Z) && (r = true, n = e2.startsWith(U, g + 1)), r ? n ? m === j && (r = false, n = false) : m === tt && (r = false) : (a += A, a === s && !E.done && (t.push(""), a = 0)), l = E, E = i.next(), g += m.length;
3814
+ a + A <= s ? t2[t2.length - 1] += m : (t2.push(m), a = 0), (m === T || m === Z) && (r = true, n = e.startsWith(U, g + 1)), r ? n ? m === j && (r = false, n = false) : m === tt && (r = false) : (a += A, a === s && !E.done && (t2.push(""), a = 0)), l = E, E = i.next(), g += m.length;
3888
3815
  }
3889
- u = t.at(-1), !a && u !== void 0 && u.length > 0 && t.length > 1 && (t[t.length - 2] += t.pop());
3816
+ u = t2.at(-1), !a && u !== void 0 && u.length > 0 && t2.length > 1 && (t2[t2.length - 2] += t2.pop());
3890
3817
  };
3891
- var vt = (t) => {
3892
- const e2 = t.split(" ");
3893
- let s = e2.length;
3894
- for (; s > 0 && !(S(e2[s - 1]) > 0); ) s--;
3895
- return s === e2.length ? t : e2.slice(0, s).join(" ") + e2.slice(s).join("");
3818
+ var vt = (t2) => {
3819
+ const e = t2.split(" ");
3820
+ let s = e.length;
3821
+ for (; s > 0 && !(S(e[s - 1]) > 0); ) s--;
3822
+ return s === e.length ? t2 : e.slice(0, s).join(" ") + e.slice(s).join("");
3896
3823
  };
3897
- var Et = (t, e2, s = {}) => {
3898
- if (s.trim !== false && t.trim() === "") return "";
3824
+ var Et = (t2, e, s = {}) => {
3825
+ if (s.trim !== false && t2.trim() === "") return "";
3899
3826
  let i = "", r, n;
3900
- const u = t.split(" "), a = gt(u);
3827
+ const u = t2.split(" "), a = gt(u);
3901
3828
  let l = [""];
3902
- for (const [h, o] of u.entries()) {
3829
+ for (const [h2, o] of u.entries()) {
3903
3830
  s.trim !== false && (l[l.length - 1] = (l.at(-1) ?? "").trimStart());
3904
3831
  let p = S(l.at(-1) ?? "");
3905
- if (h !== 0 && (p >= e2 && (s.wordWrap === false || s.trim === false) && (l.push(""), p = 0), (p > 0 || s.trim === false) && (l[l.length - 1] += " ", p++)), s.hard && a[h] > e2) {
3906
- const v = e2 - p, F = 1 + Math.floor((a[h] - v - 1) / e2);
3907
- Math.floor((a[h] - 1) / e2) < F && l.push(""), G(l, o, e2);
3832
+ if (h2 !== 0 && (p >= e && (s.wordWrap === false || s.trim === false) && (l.push(""), p = 0), (p > 0 || s.trim === false) && (l[l.length - 1] += " ", p++)), s.hard && a[h2] > e) {
3833
+ const v = e - p, F = 1 + Math.floor((a[h2] - v - 1) / e);
3834
+ Math.floor((a[h2] - 1) / e) < F && l.push(""), G(l, o, e);
3908
3835
  continue;
3909
3836
  }
3910
- if (p + a[h] > e2 && p > 0 && a[h] > 0) {
3911
- if (s.wordWrap === false && p < e2) {
3912
- G(l, o, e2);
3837
+ if (p + a[h2] > e && p > 0 && a[h2] > 0) {
3838
+ if (s.wordWrap === false && p < e) {
3839
+ G(l, o, e);
3913
3840
  continue;
3914
3841
  }
3915
3842
  l.push("");
3916
3843
  }
3917
- if (p + a[h] > e2 && s.wordWrap === false) {
3918
- G(l, o, e2);
3844
+ if (p + a[h2] > e && s.wordWrap === false) {
3845
+ G(l, o, e);
3919
3846
  continue;
3920
3847
  }
3921
3848
  l[l.length - 1] += o;
3922
3849
  }
3923
- s.trim !== false && (l = l.map((h) => vt(h)));
3850
+ s.trim !== false && (l = l.map((h2) => vt(h2)));
3924
3851
  const E = l.join(`
3925
3852
  `), g = E[Symbol.iterator]();
3926
3853
  let m = g.next(), A = g.next(), V2 = 0;
3927
3854
  for (; !m.done; ) {
3928
- const h = m.value, o = A.value;
3929
- if (i += h, h === W || h === Z) {
3855
+ const h2 = m.value, o = A.value;
3856
+ if (i += h2, h2 === T || h2 === Z) {
3930
3857
  et.lastIndex = V2 + 1;
3931
3858
  const F = et.exec(E)?.groups;
3932
3859
  if (F?.code !== void 0) {
3933
- const d2 = Number.parseFloat(F.code);
3934
- r = d2 === Ft ? void 0 : d2;
3860
+ const d = Number.parseFloat(F.code);
3861
+ r = d === Ft ? void 0 : d;
3935
3862
  } else F?.uri !== void 0 && (n = F.uri.length === 0 ? void 0 : F.uri);
3936
3863
  }
3937
3864
  const p = r ? mt(r) : void 0;
3938
3865
  o === `
3939
- ` ? (n && (i += it("")), r && p && (i += st(p))) : h === `
3940
- ` && (r && p && (i += st(r)), n && (i += it(n))), V2 += h.length, m = A, A = g.next();
3866
+ ` ? (n && (i += it("")), r && p && (i += st(p))) : h2 === `
3867
+ ` && (r && p && (i += st(r)), n && (i += it(n))), V2 += h2.length, m = A, A = g.next();
3941
3868
  }
3942
3869
  return i;
3943
3870
  };
3944
- function K(t, e2, s) {
3945
- return String(t).normalize().replaceAll(`\r
3871
+ function K(t2, e, s) {
3872
+ return String(t2).normalize().replaceAll(`\r
3946
3873
  `, `
3947
3874
  `).split(`
3948
- `).map((i) => Et(i, e2, s)).join(`
3875
+ `).map((i) => Et(i, e, s)).join(`
3949
3876
  `);
3950
3877
  }
3951
3878
  var At = ["up", "down", "left", "right", "space", "enter", "cancel"];
3952
3879
  var _ = { actions: new Set(At), aliases: /* @__PURE__ */ new Map([["k", "up"], ["j", "down"], ["h", "left"], ["l", "right"], ["", "cancel"], ["escape", "cancel"]]), messages: { cancel: "Canceled", error: "Something went wrong" }, withGuide: true };
3953
- function H(t, e2) {
3954
- if (typeof t == "string") return _.aliases.get(t) === e2;
3955
- for (const s of t) if (s !== void 0 && H(s, e2)) return true;
3880
+ function H(t2, e) {
3881
+ if (typeof t2 == "string") return _.aliases.get(t2) === e;
3882
+ for (const s of t2) if (s !== void 0 && H(s, e)) return true;
3956
3883
  return false;
3957
3884
  }
3958
- function _t(t, e2) {
3959
- if (t === e2) return;
3960
- const s = t.split(`
3961
- `), i = e2.split(`
3885
+ function _t(t2, e) {
3886
+ if (t2 === e) return;
3887
+ const s = t2.split(`
3888
+ `), i = e.split(`
3962
3889
  `), r = Math.max(s.length, i.length), n = [];
3963
3890
  for (let u = 0; u < r; u++) s[u] !== i[u] && n.push(u);
3964
3891
  return { lines: n, numLinesBefore: s.length, numLinesAfter: i.length, numLines: r };
3965
3892
  }
3966
3893
  var bt = globalThis.process.platform.startsWith("win");
3967
3894
  var z = /* @__PURE__ */ Symbol("clack:cancel");
3968
- function T(t, e2) {
3969
- const s = t;
3970
- s.isTTY && s.setRawMode(e2);
3895
+ function W(t2, e) {
3896
+ const s = t2;
3897
+ s.isTTY && s.setRawMode(e);
3971
3898
  }
3972
- function Bt({ input: t = q, output: e2 = R, overwrite: s = true, hideCursor: i = true } = {}) {
3973
- const r = k.createInterface({ input: t, output: e2, prompt: "", tabSize: 1 });
3974
- k.emitKeypressEvents(t, r), t instanceof J && t.isTTY && t.setRawMode(true);
3899
+ function xt({ input: t2 = q, output: e = R, overwrite: s = true, hideCursor: i = true } = {}) {
3900
+ const r = k.createInterface({ input: t2, output: e, prompt: "", tabSize: 1 });
3901
+ k.emitKeypressEvents(t2, r), t2 instanceof J && t2.isTTY && t2.setRawMode(true);
3975
3902
  const n = (u, { name: a, sequence: l }) => {
3976
3903
  const E = String(u);
3977
3904
  if (H([E, a, l], "cancel")) {
3978
- i && e2.write(import_sisteransi.cursor.show), process.exit(0);
3905
+ i && e.write(import_sisteransi.cursor.show), process.exit(0);
3979
3906
  return;
3980
3907
  }
3981
3908
  if (!s) return;
3982
3909
  const g = a === "return" ? 0 : -1, m = a === "return" ? -1 : 0;
3983
- k.moveCursor(e2, g, m, () => {
3984
- k.clearLine(e2, 1, () => {
3985
- t.once("keypress", n);
3910
+ k.moveCursor(e, g, m, () => {
3911
+ k.clearLine(e, 1, () => {
3912
+ t2.once("keypress", n);
3986
3913
  });
3987
3914
  });
3988
3915
  };
3989
- return i && e2.write(import_sisteransi.cursor.hide), t.once("keypress", n), () => {
3990
- t.off("keypress", n), i && e2.write(import_sisteransi.cursor.show), t instanceof J && t.isTTY && !bt && t.setRawMode(false), r.terminal = false, r.close();
3916
+ return i && e.write(import_sisteransi.cursor.hide), t2.once("keypress", n), () => {
3917
+ t2.off("keypress", n), i && e.write(import_sisteransi.cursor.show), t2 instanceof J && t2.isTTY && !bt && t2.setRawMode(false), r.terminal = false, r.close();
3991
3918
  };
3992
3919
  }
3993
- var rt = (t) => "columns" in t && typeof t.columns == "number" ? t.columns : 80;
3994
- var nt = (t) => "rows" in t && typeof t.rows == "number" ? t.rows : 20;
3995
- var x = class {
3920
+ var rt = (t2) => "columns" in t2 && typeof t2.columns == "number" ? t2.columns : 80;
3921
+ var nt = (t2) => "rows" in t2 && typeof t2.rows == "number" ? t2.rows : 20;
3922
+ var B = class {
3996
3923
  input;
3997
3924
  output;
3998
3925
  _abortSignal;
@@ -4007,92 +3934,92 @@ var x = class {
4007
3934
  error = "";
4008
3935
  value;
4009
3936
  userInput = "";
4010
- constructor(e2, s = true) {
4011
- const { input: i = q, output: r = R, render: n, signal: u, ...a } = e2;
3937
+ constructor(e, s = true) {
3938
+ const { input: i = q, output: r = R, render: n, signal: u, ...a } = e;
4012
3939
  this.opts = a, this.onKeypress = this.onKeypress.bind(this), this.close = this.close.bind(this), this.render = this.render.bind(this), this._render = n.bind(this), this._track = s, this._abortSignal = u, this.input = i, this.output = r;
4013
3940
  }
4014
3941
  unsubscribe() {
4015
3942
  this._subscribers.clear();
4016
3943
  }
4017
- setSubscriber(e2, s) {
4018
- const i = this._subscribers.get(e2) ?? [];
4019
- i.push(s), this._subscribers.set(e2, i);
3944
+ setSubscriber(e, s) {
3945
+ const i = this._subscribers.get(e) ?? [];
3946
+ i.push(s), this._subscribers.set(e, i);
4020
3947
  }
4021
- on(e2, s) {
4022
- this.setSubscriber(e2, { cb: s });
3948
+ on(e, s) {
3949
+ this.setSubscriber(e, { cb: s });
4023
3950
  }
4024
- once(e2, s) {
4025
- this.setSubscriber(e2, { cb: s, once: true });
3951
+ once(e, s) {
3952
+ this.setSubscriber(e, { cb: s, once: true });
4026
3953
  }
4027
- emit(e2, ...s) {
4028
- const i = this._subscribers.get(e2) ?? [], r = [];
3954
+ emit(e, ...s) {
3955
+ const i = this._subscribers.get(e) ?? [], r = [];
4029
3956
  for (const n of i) n.cb(...s), n.once && r.push(() => i.splice(i.indexOf(n), 1));
4030
3957
  for (const n of r) n();
4031
3958
  }
4032
3959
  prompt() {
4033
- return new Promise((e2) => {
3960
+ return new Promise((e) => {
4034
3961
  if (this._abortSignal) {
4035
- if (this._abortSignal.aborted) return this.state = "cancel", this.close(), e2(z);
3962
+ if (this._abortSignal.aborted) return this.state = "cancel", this.close(), e(z);
4036
3963
  this._abortSignal.addEventListener("abort", () => {
4037
3964
  this.state = "cancel", this.close();
4038
3965
  }, { once: true });
4039
3966
  }
4040
- this.rl = ot.createInterface({ input: this.input, tabSize: 2, prompt: "", escapeCodeTimeout: 50, terminal: true }), this.rl.prompt(), this.opts.initialUserInput !== void 0 && this._setUserInput(this.opts.initialUserInput, true), this.input.on("keypress", this.onKeypress), T(this.input, true), this.output.on("resize", this.render), this.render(), this.once("submit", () => {
4041
- this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), T(this.input, false), e2(this.value);
3967
+ this.rl = ot.createInterface({ input: this.input, tabSize: 2, prompt: "", escapeCodeTimeout: 50, terminal: true }), this.rl.prompt(), this.opts.initialUserInput !== void 0 && this._setUserInput(this.opts.initialUserInput, true), this.input.on("keypress", this.onKeypress), W(this.input, true), this.output.on("resize", this.render), this.render(), this.once("submit", () => {
3968
+ this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), W(this.input, false), e(this.value);
4042
3969
  }), this.once("cancel", () => {
4043
- this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), T(this.input, false), e2(z);
3970
+ this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), W(this.input, false), e(z);
4044
3971
  });
4045
3972
  });
4046
3973
  }
4047
- _isActionKey(e2, s) {
4048
- return e2 === " ";
3974
+ _isActionKey(e, s) {
3975
+ return e === " ";
4049
3976
  }
4050
- _setValue(e2) {
4051
- this.value = e2, this.emit("value", this.value);
3977
+ _setValue(e) {
3978
+ this.value = e, this.emit("value", this.value);
4052
3979
  }
4053
- _setUserInput(e2, s) {
4054
- this.userInput = e2 ?? "", this.emit("userInput", this.userInput), s && this._track && this.rl && (this.rl.write(this.userInput), this._cursor = this.rl.cursor);
3980
+ _setUserInput(e, s) {
3981
+ this.userInput = e ?? "", this.emit("userInput", this.userInput), s && this._track && this.rl && (this.rl.write(this.userInput), this._cursor = this.rl.cursor);
4055
3982
  }
4056
3983
  _clearUserInput() {
4057
3984
  this.rl?.write(null, { ctrl: true, name: "u" }), this._setUserInput("");
4058
3985
  }
4059
- onKeypress(e2, s) {
4060
- if (this._track && s.name !== "return" && (s.name && this._isActionKey(e2, s) && this.rl?.write(null, { ctrl: true, name: "h" }), this._cursor = this.rl?.cursor ?? 0, this._setUserInput(this.rl?.line)), this.state === "error" && (this.state = "active"), s?.name && (!this._track && _.aliases.has(s.name) && this.emit("cursor", _.aliases.get(s.name)), _.actions.has(s.name) && this.emit("cursor", s.name)), e2 && (e2.toLowerCase() === "y" || e2.toLowerCase() === "n") && this.emit("confirm", e2.toLowerCase() === "y"), this.emit("key", e2?.toLowerCase(), s), s?.name === "return") {
3986
+ onKeypress(e, s) {
3987
+ if (this._track && s.name !== "return" && (s.name && this._isActionKey(e, s) && this.rl?.write(null, { ctrl: true, name: "h" }), this._cursor = this.rl?.cursor ?? 0, this._setUserInput(this.rl?.line)), this.state === "error" && (this.state = "active"), s?.name && (!this._track && _.aliases.has(s.name) && this.emit("cursor", _.aliases.get(s.name)), _.actions.has(s.name) && this.emit("cursor", s.name)), e && (e.toLowerCase() === "y" || e.toLowerCase() === "n") && this.emit("confirm", e.toLowerCase() === "y"), this.emit("key", e?.toLowerCase(), s), s?.name === "return") {
4061
3988
  if (this.opts.validate) {
4062
3989
  const i = this.opts.validate(this.value);
4063
3990
  i && (this.error = i instanceof Error ? i.message : i, this.state = "error", this.rl?.write(this.userInput));
4064
3991
  }
4065
3992
  this.state !== "error" && (this.state = "submit");
4066
3993
  }
4067
- H([e2, s?.name, s?.sequence], "cancel") && (this.state = "cancel"), (this.state === "submit" || this.state === "cancel") && this.emit("finalize"), this.render(), (this.state === "submit" || this.state === "cancel") && this.close();
3994
+ H([e, s?.name, s?.sequence], "cancel") && (this.state = "cancel"), (this.state === "submit" || this.state === "cancel") && this.emit("finalize"), this.render(), (this.state === "submit" || this.state === "cancel") && this.close();
4068
3995
  }
4069
3996
  close() {
4070
3997
  this.input.unpipe(), this.input.removeListener("keypress", this.onKeypress), this.output.write(`
4071
- `), T(this.input, false), this.rl?.close(), this.rl = void 0, this.emit(`${this.state}`, this.value), this.unsubscribe();
3998
+ `), W(this.input, false), this.rl?.close(), this.rl = void 0, this.emit(`${this.state}`, this.value), this.unsubscribe();
4072
3999
  }
4073
4000
  restoreCursor() {
4074
- const e2 = K(this._prevFrame, process.stdout.columns, { hard: true, trim: false }).split(`
4001
+ const e = K(this._prevFrame, process.stdout.columns, { hard: true, trim: false }).split(`
4075
4002
  `).length - 1;
4076
- this.output.write(import_sisteransi.cursor.move(-999, e2 * -1));
4003
+ this.output.write(import_sisteransi.cursor.move(-999, e * -1));
4077
4004
  }
4078
4005
  render() {
4079
- const e2 = K(this._render(this) ?? "", process.stdout.columns, { hard: true, trim: false });
4080
- if (e2 !== this._prevFrame) {
4006
+ const e = K(this._render(this) ?? "", process.stdout.columns, { hard: true, trim: false });
4007
+ if (e !== this._prevFrame) {
4081
4008
  if (this.state === "initial") this.output.write(import_sisteransi.cursor.hide);
4082
4009
  else {
4083
- const s = _t(this._prevFrame, e2), i = nt(this.output);
4010
+ const s = _t(this._prevFrame, e), i = nt(this.output);
4084
4011
  if (this.restoreCursor(), s) {
4085
4012
  const r = Math.max(0, s.numLinesAfter - i), n = Math.max(0, s.numLinesBefore - i);
4086
4013
  let u = s.lines.find((a) => a >= r);
4087
4014
  if (u === void 0) {
4088
- this._prevFrame = e2;
4015
+ this._prevFrame = e;
4089
4016
  return;
4090
4017
  }
4091
4018
  if (s.lines.length === 1) {
4092
4019
  this.output.write(import_sisteransi.cursor.move(0, u - n)), this.output.write(import_sisteransi.erase.lines(1));
4093
- const a = e2.split(`
4020
+ const a = e.split(`
4094
4021
  `);
4095
- this.output.write(a[u]), this._prevFrame = e2, this.output.write(import_sisteransi.cursor.move(0, a.length - u - 1));
4022
+ this.output.write(a[u]), this._prevFrame = e, this.output.write(import_sisteransi.cursor.move(0, a.length - u - 1));
4096
4023
  return;
4097
4024
  } else if (s.lines.length > 1) {
4098
4025
  if (r < n) u = r;
@@ -4101,28 +4028,28 @@ var x = class {
4101
4028
  l > 0 && this.output.write(import_sisteransi.cursor.move(0, l));
4102
4029
  }
4103
4030
  this.output.write(import_sisteransi.erase.down());
4104
- const a = e2.split(`
4031
+ const a = e.split(`
4105
4032
  `).slice(u);
4106
4033
  this.output.write(a.join(`
4107
- `)), this._prevFrame = e2;
4034
+ `)), this._prevFrame = e;
4108
4035
  return;
4109
4036
  }
4110
4037
  }
4111
4038
  this.output.write(import_sisteransi.erase.down());
4112
4039
  }
4113
- this.output.write(e2), this.state === "initial" && (this.state = "active"), this._prevFrame = e2;
4040
+ this.output.write(e), this.state === "initial" && (this.state = "active"), this._prevFrame = e;
4114
4041
  }
4115
4042
  }
4116
4043
  };
4117
- var kt = class extends x {
4044
+ var kt = class extends B {
4118
4045
  get cursor() {
4119
4046
  return this.value ? 0 : 1;
4120
4047
  }
4121
4048
  get _value() {
4122
4049
  return this.cursor === 0;
4123
4050
  }
4124
- constructor(e2) {
4125
- super(e2, false), this.value = !!e2.initialValue, this.on("userInput", () => {
4051
+ constructor(e) {
4052
+ super(e, false), this.value = !!e.initialValue, this.on("userInput", () => {
4126
4053
  this.value = this._value;
4127
4054
  }), this.on("confirm", (s) => {
4128
4055
  this.output.write(import_sisteransi.cursor.move(0, -1)), this.value = s, this.state = "submit", this.close();
@@ -4131,408 +4058,410 @@ var kt = class extends x {
4131
4058
  });
4132
4059
  }
4133
4060
  };
4134
- var $t = class extends x {
4061
+ var $t = class extends B {
4135
4062
  get userInputWithCursor() {
4136
4063
  if (this.state === "submit") return this.userInput;
4137
- const e2 = this.userInput;
4138
- if (this.cursor >= e2.length) return `${this.userInput}\u2588`;
4139
- const s = e2.slice(0, this.cursor), [i, ...r] = e2.slice(this.cursor);
4140
- return `${s}${import_picocolors.default.inverse(i)}${r.join("")}`;
4064
+ const e = this.userInput;
4065
+ if (this.cursor >= e.length) return `${this.userInput}\u2588`;
4066
+ const s = e.slice(0, this.cursor), [i, ...r] = e.slice(this.cursor);
4067
+ return `${s}${D("inverse", i)}${r.join("")}`;
4141
4068
  }
4142
4069
  get cursor() {
4143
4070
  return this._cursor;
4144
4071
  }
4145
- constructor(e2) {
4146
- super({ ...e2, initialUserInput: e2.initialUserInput ?? e2.initialValue }), this.on("userInput", (s) => {
4072
+ constructor(e) {
4073
+ super({ ...e, initialUserInput: e.initialUserInput ?? e.initialValue }), this.on("userInput", (s) => {
4147
4074
  this._setValue(s);
4148
4075
  }), this.on("finalize", () => {
4149
- this.value || (this.value = e2.defaultValue), this.value === void 0 && (this.value = "");
4076
+ this.value || (this.value = e.defaultValue), this.value === void 0 && (this.value = "");
4150
4077
  });
4151
4078
  }
4152
4079
  };
4153
4080
 
4154
- // ../stamn-cli/node_modules/@clack/prompts/dist/index.mjs
4155
- var import_picocolors2 = __toESM(require_picocolors(), 1);
4081
+ // node_modules/.pnpm/@clack+prompts@1.1.0/node_modules/@clack/prompts/dist/index.mjs
4156
4082
  var import_sisteransi2 = __toESM(require_src(), 1);
4083
+ import { styleText as t, stripVTControlCharacters as ue } from "util";
4157
4084
  import N2 from "process";
4158
- import { readdirSync as de, existsSync as $e, lstatSync as xt2 } from "fs";
4159
- import { dirname as _t2, join as he } from "path";
4160
- import { stripVTControlCharacters as ut } from "util";
4161
- function me() {
4085
+ import { readdirSync as $t2, existsSync as dt2, lstatSync as xe } from "fs";
4086
+ import { dirname as _e, join as ht2 } from "path";
4087
+ function pt2() {
4162
4088
  return N2.platform !== "win32" ? N2.env.TERM !== "linux" : !!N2.env.CI || !!N2.env.WT_SESSION || !!N2.env.TERMINUS_SUBLIME || N2.env.ConEmuTask === "{cmd::Cmder}" || N2.env.TERM_PROGRAM === "Terminus-Sublime" || N2.env.TERM_PROGRAM === "vscode" || N2.env.TERM === "xterm-256color" || N2.env.TERM === "alacritty" || N2.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
4163
4089
  }
4164
- var et2 = me();
4165
- var ct2 = () => process.env.CI === "true";
4166
- var C = (t, r) => et2 ? t : r;
4167
- var Rt = C("\u25C6", "*");
4168
- var dt2 = C("\u25A0", "x");
4169
- var $t2 = C("\u25B2", "x");
4170
- var V = C("\u25C7", "o");
4171
- var ht2 = C("\u250C", "T");
4172
- var d = C("\u2502", "|");
4173
- var x2 = C("\u2514", "\u2014");
4174
- var Ot = C("\u2510", "T");
4175
- var Pt = C("\u2518", "\u2014");
4176
- var Q2 = C("\u25CF", ">");
4177
- var H2 = C("\u25CB", " ");
4178
- var st2 = C("\u25FB", "[\u2022]");
4179
- var U2 = C("\u25FC", "[+]");
4180
- var q2 = C("\u25FB", "[ ]");
4181
- var Nt = C("\u25AA", "\u2022");
4182
- var rt2 = C("\u2500", "-");
4183
- var mt2 = C("\u256E", "+");
4184
- var Wt2 = C("\u251C", "+");
4185
- var pt2 = C("\u256F", "+");
4186
- var gt2 = C("\u2570", "+");
4187
- var Lt2 = C("\u256D", "+");
4188
- var ft2 = C("\u25CF", "\u2022");
4189
- var Ft2 = C("\u25C6", "*");
4190
- var yt2 = C("\u25B2", "!");
4191
- var Et2 = C("\u25A0", "x");
4192
- var W2 = (t) => {
4193
- switch (t) {
4090
+ var ee = pt2();
4091
+ var ce = () => process.env.CI === "true";
4092
+ var I2 = (e, r) => ee ? e : r;
4093
+ var Re = I2("\u25C6", "*");
4094
+ var $e = I2("\u25A0", "x");
4095
+ var de = I2("\u25B2", "x");
4096
+ var V = I2("\u25C7", "o");
4097
+ var he = I2("\u250C", "T");
4098
+ var h = I2("\u2502", "|");
4099
+ var x = I2("\u2514", "\u2014");
4100
+ var Oe = I2("\u2510", "T");
4101
+ var Pe = I2("\u2518", "\u2014");
4102
+ var z2 = I2("\u25CF", ">");
4103
+ var H2 = I2("\u25CB", " ");
4104
+ var te = I2("\u25FB", "[\u2022]");
4105
+ var U2 = I2("\u25FC", "[+]");
4106
+ var q2 = I2("\u25FB", "[ ]");
4107
+ var Ne = I2("\u25AA", "\u2022");
4108
+ var se = I2("\u2500", "-");
4109
+ var pe = I2("\u256E", "+");
4110
+ var We = I2("\u251C", "+");
4111
+ var me = I2("\u256F", "+");
4112
+ var ge = I2("\u2570", "+");
4113
+ var Ge = I2("\u256D", "+");
4114
+ var fe = I2("\u25CF", "\u2022");
4115
+ var Fe = I2("\u25C6", "*");
4116
+ var ye = I2("\u25B2", "!");
4117
+ var Ee = I2("\u25A0", "x");
4118
+ var W2 = (e) => {
4119
+ switch (e) {
4194
4120
  case "initial":
4195
4121
  case "active":
4196
- return import_picocolors2.default.cyan(Rt);
4122
+ return t("cyan", Re);
4197
4123
  case "cancel":
4198
- return import_picocolors2.default.red(dt2);
4124
+ return t("red", $e);
4199
4125
  case "error":
4200
- return import_picocolors2.default.yellow($t2);
4126
+ return t("yellow", de);
4201
4127
  case "submit":
4202
- return import_picocolors2.default.green(V);
4128
+ return t("green", V);
4203
4129
  }
4204
4130
  };
4205
- var pe = (t) => t === 161 || t === 164 || t === 167 || t === 168 || t === 170 || t === 173 || t === 174 || t >= 176 && t <= 180 || t >= 182 && t <= 186 || t >= 188 && t <= 191 || t === 198 || t === 208 || t === 215 || t === 216 || t >= 222 && t <= 225 || t === 230 || t >= 232 && t <= 234 || t === 236 || t === 237 || t === 240 || t === 242 || t === 243 || t >= 247 && t <= 250 || t === 252 || t === 254 || t === 257 || t === 273 || t === 275 || t === 283 || t === 294 || t === 295 || t === 299 || t >= 305 && t <= 307 || t === 312 || t >= 319 && t <= 322 || t === 324 || t >= 328 && t <= 331 || t === 333 || t === 338 || t === 339 || t === 358 || t === 359 || t === 363 || t === 462 || t === 464 || t === 466 || t === 468 || t === 470 || t === 472 || t === 474 || t === 476 || t === 593 || t === 609 || t === 708 || t === 711 || t >= 713 && t <= 715 || t === 717 || t === 720 || t >= 728 && t <= 731 || t === 733 || t === 735 || t >= 768 && t <= 879 || t >= 913 && t <= 929 || t >= 931 && t <= 937 || t >= 945 && t <= 961 || t >= 963 && t <= 969 || t === 1025 || t >= 1040 && t <= 1103 || t === 1105 || t === 8208 || t >= 8211 && t <= 8214 || t === 8216 || t === 8217 || t === 8220 || t === 8221 || t >= 8224 && t <= 8226 || t >= 8228 && t <= 8231 || t === 8240 || t === 8242 || t === 8243 || t === 8245 || t === 8251 || t === 8254 || t === 8308 || t === 8319 || t >= 8321 && t <= 8324 || t === 8364 || t === 8451 || t === 8453 || t === 8457 || t === 8467 || t === 8470 || t === 8481 || t === 8482 || t === 8486 || t === 8491 || t === 8531 || t === 8532 || t >= 8539 && t <= 8542 || t >= 8544 && t <= 8555 || t >= 8560 && t <= 8569 || t === 8585 || t >= 8592 && t <= 8601 || t === 8632 || t === 8633 || t === 8658 || t === 8660 || t === 8679 || t === 8704 || t === 8706 || t === 8707 || t === 8711 || t === 8712 || t === 8715 || t === 8719 || t === 8721 || t === 8725 || t === 8730 || t >= 8733 && t <= 8736 || t === 8739 || t === 8741 || t >= 8743 && t <= 8748 || t === 8750 || t >= 8756 && t <= 8759 || t === 8764 || t === 8765 || t === 8776 || t === 8780 || t === 8786 || t === 8800 || t === 8801 || t >= 8804 && t <= 8807 || t === 8810 || t === 8811 || t === 8814 || t === 8815 || t === 8834 || t === 8835 || t === 8838 || t === 8839 || t === 8853 || t === 8857 || t === 8869 || t === 8895 || t === 8978 || t >= 9312 && t <= 9449 || t >= 9451 && t <= 9547 || t >= 9552 && t <= 9587 || t >= 9600 && t <= 9615 || t >= 9618 && t <= 9621 || t === 9632 || t === 9633 || t >= 9635 && t <= 9641 || t === 9650 || t === 9651 || t === 9654 || t === 9655 || t === 9660 || t === 9661 || t === 9664 || t === 9665 || t >= 9670 && t <= 9672 || t === 9675 || t >= 9678 && t <= 9681 || t >= 9698 && t <= 9701 || t === 9711 || t === 9733 || t === 9734 || t === 9737 || t === 9742 || t === 9743 || t === 9756 || t === 9758 || t === 9792 || t === 9794 || t === 9824 || t === 9825 || t >= 9827 && t <= 9829 || t >= 9831 && t <= 9834 || t === 9836 || t === 9837 || t === 9839 || t === 9886 || t === 9887 || t === 9919 || t >= 9926 && t <= 9933 || t >= 9935 && t <= 9939 || t >= 9941 && t <= 9953 || t === 9955 || t === 9960 || t === 9961 || t >= 9963 && t <= 9969 || t === 9972 || t >= 9974 && t <= 9977 || t === 9979 || t === 9980 || t === 9982 || t === 9983 || t === 10045 || t >= 10102 && t <= 10111 || t >= 11094 && t <= 11097 || t >= 12872 && t <= 12879 || t >= 57344 && t <= 63743 || t >= 65024 && t <= 65039 || t === 65533 || t >= 127232 && t <= 127242 || t >= 127248 && t <= 127277 || t >= 127280 && t <= 127337 || t >= 127344 && t <= 127373 || t === 127375 || t === 127376 || t >= 127387 && t <= 127404 || t >= 917760 && t <= 917999 || t >= 983040 && t <= 1048573 || t >= 1048576 && t <= 1114109;
4206
- var ge = (t) => t === 12288 || t >= 65281 && t <= 65376 || t >= 65504 && t <= 65510;
4207
- var fe = (t) => t >= 4352 && t <= 4447 || t === 8986 || t === 8987 || t === 9001 || t === 9002 || t >= 9193 && t <= 9196 || t === 9200 || t === 9203 || t === 9725 || t === 9726 || t === 9748 || t === 9749 || t >= 9800 && t <= 9811 || t === 9855 || t === 9875 || t === 9889 || t === 9898 || t === 9899 || t === 9917 || t === 9918 || t === 9924 || t === 9925 || t === 9934 || t === 9940 || t === 9962 || t === 9970 || t === 9971 || t === 9973 || t === 9978 || t === 9981 || t === 9989 || t === 9994 || t === 9995 || t === 10024 || t === 10060 || t === 10062 || t >= 10067 && t <= 10069 || t === 10071 || t >= 10133 && t <= 10135 || t === 10160 || t === 10175 || t === 11035 || t === 11036 || t === 11088 || t === 11093 || t >= 11904 && t <= 11929 || t >= 11931 && t <= 12019 || t >= 12032 && t <= 12245 || t >= 12272 && t <= 12287 || t >= 12289 && t <= 12350 || t >= 12353 && t <= 12438 || t >= 12441 && t <= 12543 || t >= 12549 && t <= 12591 || t >= 12593 && t <= 12686 || t >= 12688 && t <= 12771 || t >= 12783 && t <= 12830 || t >= 12832 && t <= 12871 || t >= 12880 && t <= 19903 || t >= 19968 && t <= 42124 || t >= 42128 && t <= 42182 || t >= 43360 && t <= 43388 || t >= 44032 && t <= 55203 || t >= 63744 && t <= 64255 || t >= 65040 && t <= 65049 || t >= 65072 && t <= 65106 || t >= 65108 && t <= 65126 || t >= 65128 && t <= 65131 || t >= 94176 && t <= 94180 || t === 94192 || t === 94193 || t >= 94208 && t <= 100343 || t >= 100352 && t <= 101589 || t >= 101632 && t <= 101640 || t >= 110576 && t <= 110579 || t >= 110581 && t <= 110587 || t === 110589 || t === 110590 || t >= 110592 && t <= 110882 || t === 110898 || t >= 110928 && t <= 110930 || t === 110933 || t >= 110948 && t <= 110951 || t >= 110960 && t <= 111355 || t === 126980 || t === 127183 || t === 127374 || t >= 127377 && t <= 127386 || t >= 127488 && t <= 127490 || t >= 127504 && t <= 127547 || t >= 127552 && t <= 127560 || t === 127568 || t === 127569 || t >= 127584 && t <= 127589 || t >= 127744 && t <= 127776 || t >= 127789 && t <= 127797 || t >= 127799 && t <= 127868 || t >= 127870 && t <= 127891 || t >= 127904 && t <= 127946 || t >= 127951 && t <= 127955 || t >= 127968 && t <= 127984 || t === 127988 || t >= 127992 && t <= 128062 || t === 128064 || t >= 128066 && t <= 128252 || t >= 128255 && t <= 128317 || t >= 128331 && t <= 128334 || t >= 128336 && t <= 128359 || t === 128378 || t === 128405 || t === 128406 || t === 128420 || t >= 128507 && t <= 128591 || t >= 128640 && t <= 128709 || t === 128716 || t >= 128720 && t <= 128722 || t >= 128725 && t <= 128727 || t >= 128732 && t <= 128735 || t === 128747 || t === 128748 || t >= 128756 && t <= 128764 || t >= 128992 && t <= 129003 || t === 129008 || t >= 129292 && t <= 129338 || t >= 129340 && t <= 129349 || t >= 129351 && t <= 129535 || t >= 129648 && t <= 129660 || t >= 129664 && t <= 129672 || t >= 129680 && t <= 129725 || t >= 129727 && t <= 129733 || t >= 129742 && t <= 129755 || t >= 129760 && t <= 129768 || t >= 129776 && t <= 129784 || t >= 131072 && t <= 196605 || t >= 196608 && t <= 262141;
4208
- var At2 = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y;
4209
- var it2 = /[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y;
4210
- var nt2 = /\t{1,1000}/y;
4211
- var wt = /[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/yu;
4212
- var at2 = /(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y;
4213
- var Fe = /\p{M}+/gu;
4214
- var ye = { limit: 1 / 0, ellipsis: "" };
4215
- var jt = (t, r = {}, s = {}) => {
4216
- const i = r.limit ?? 1 / 0, a = r.ellipsis ?? "", o = r?.ellipsisWidth ?? (a ? jt(a, ye, s).width : 0), u = s.ansiWidth ?? 0, l = s.controlWidth ?? 0, n = s.tabWidth ?? 8, c = s.ambiguousWidth ?? 1, g = s.emojiWidth ?? 2, F = s.fullWidthWidth ?? 2, p = s.regularWidth ?? 1, E = s.wideWidth ?? 2;
4217
- let $ = 0, m = 0, h = t.length, y2 = 0, f = false, v = h, S2 = Math.max(0, i - o), I2 = 0, B = 0, A = 0, w = 0;
4218
- t: for (; ; ) {
4219
- if (B > I2 || m >= h && m > $) {
4220
- const _2 = t.slice(I2, B) || t.slice($, m);
4221
- y2 = 0;
4222
- for (const D2 of _2.replaceAll(Fe, "")) {
4223
- const T2 = D2.codePointAt(0) || 0;
4224
- if (ge(T2) ? w = F : fe(T2) ? w = E : c !== p && pe(T2) ? w = c : w = p, A + w > S2 && (v = Math.min(v, Math.max(I2, $) + y2)), A + w > i) {
4225
- f = true;
4226
- break t;
4227
- }
4228
- y2 += D2.length, A += w;
4229
- }
4230
- I2 = B = 0;
4131
+ var mt2 = (e) => e === 161 || e === 164 || e === 167 || e === 168 || e === 170 || e === 173 || e === 174 || e >= 176 && e <= 180 || e >= 182 && e <= 186 || e >= 188 && e <= 191 || e === 198 || e === 208 || e === 215 || e === 216 || e >= 222 && e <= 225 || e === 230 || e >= 232 && e <= 234 || e === 236 || e === 237 || e === 240 || e === 242 || e === 243 || e >= 247 && e <= 250 || e === 252 || e === 254 || e === 257 || e === 273 || e === 275 || e === 283 || e === 294 || e === 295 || e === 299 || e >= 305 && e <= 307 || e === 312 || e >= 319 && e <= 322 || e === 324 || e >= 328 && e <= 331 || e === 333 || e === 338 || e === 339 || e === 358 || e === 359 || e === 363 || e === 462 || e === 464 || e === 466 || e === 468 || e === 470 || e === 472 || e === 474 || e === 476 || e === 593 || e === 609 || e === 708 || e === 711 || e >= 713 && e <= 715 || e === 717 || e === 720 || e >= 728 && e <= 731 || e === 733 || e === 735 || e >= 768 && e <= 879 || e >= 913 && e <= 929 || e >= 931 && e <= 937 || e >= 945 && e <= 961 || e >= 963 && e <= 969 || e === 1025 || e >= 1040 && e <= 1103 || e === 1105 || e === 8208 || e >= 8211 && e <= 8214 || e === 8216 || e === 8217 || e === 8220 || e === 8221 || e >= 8224 && e <= 8226 || e >= 8228 && e <= 8231 || e === 8240 || e === 8242 || e === 8243 || e === 8245 || e === 8251 || e === 8254 || e === 8308 || e === 8319 || e >= 8321 && e <= 8324 || e === 8364 || e === 8451 || e === 8453 || e === 8457 || e === 8467 || e === 8470 || e === 8481 || e === 8482 || e === 8486 || e === 8491 || e === 8531 || e === 8532 || e >= 8539 && e <= 8542 || e >= 8544 && e <= 8555 || e >= 8560 && e <= 8569 || e === 8585 || e >= 8592 && e <= 8601 || e === 8632 || e === 8633 || e === 8658 || e === 8660 || e === 8679 || e === 8704 || e === 8706 || e === 8707 || e === 8711 || e === 8712 || e === 8715 || e === 8719 || e === 8721 || e === 8725 || e === 8730 || e >= 8733 && e <= 8736 || e === 8739 || e === 8741 || e >= 8743 && e <= 8748 || e === 8750 || e >= 8756 && e <= 8759 || e === 8764 || e === 8765 || e === 8776 || e === 8780 || e === 8786 || e === 8800 || e === 8801 || e >= 8804 && e <= 8807 || e === 8810 || e === 8811 || e === 8814 || e === 8815 || e === 8834 || e === 8835 || e === 8838 || e === 8839 || e === 8853 || e === 8857 || e === 8869 || e === 8895 || e === 8978 || e >= 9312 && e <= 9449 || e >= 9451 && e <= 9547 || e >= 9552 && e <= 9587 || e >= 9600 && e <= 9615 || e >= 9618 && e <= 9621 || e === 9632 || e === 9633 || e >= 9635 && e <= 9641 || e === 9650 || e === 9651 || e === 9654 || e === 9655 || e === 9660 || e === 9661 || e === 9664 || e === 9665 || e >= 9670 && e <= 9672 || e === 9675 || e >= 9678 && e <= 9681 || e >= 9698 && e <= 9701 || e === 9711 || e === 9733 || e === 9734 || e === 9737 || e === 9742 || e === 9743 || e === 9756 || e === 9758 || e === 9792 || e === 9794 || e === 9824 || e === 9825 || e >= 9827 && e <= 9829 || e >= 9831 && e <= 9834 || e === 9836 || e === 9837 || e === 9839 || e === 9886 || e === 9887 || e === 9919 || e >= 9926 && e <= 9933 || e >= 9935 && e <= 9939 || e >= 9941 && e <= 9953 || e === 9955 || e === 9960 || e === 9961 || e >= 9963 && e <= 9969 || e === 9972 || e >= 9974 && e <= 9977 || e === 9979 || e === 9980 || e === 9982 || e === 9983 || e === 10045 || e >= 10102 && e <= 10111 || e >= 11094 && e <= 11097 || e >= 12872 && e <= 12879 || e >= 57344 && e <= 63743 || e >= 65024 && e <= 65039 || e === 65533 || e >= 127232 && e <= 127242 || e >= 127248 && e <= 127277 || e >= 127280 && e <= 127337 || e >= 127344 && e <= 127373 || e === 127375 || e === 127376 || e >= 127387 && e <= 127404 || e >= 917760 && e <= 917999 || e >= 983040 && e <= 1048573 || e >= 1048576 && e <= 1114109;
4132
+ var gt2 = (e) => e === 12288 || e >= 65281 && e <= 65376 || e >= 65504 && e <= 65510;
4133
+ var ft2 = (e) => e >= 4352 && e <= 4447 || e === 8986 || e === 8987 || e === 9001 || e === 9002 || e >= 9193 && e <= 9196 || e === 9200 || e === 9203 || e === 9725 || e === 9726 || e === 9748 || e === 9749 || e >= 9800 && e <= 9811 || e === 9855 || e === 9875 || e === 9889 || e === 9898 || e === 9899 || e === 9917 || e === 9918 || e === 9924 || e === 9925 || e === 9934 || e === 9940 || e === 9962 || e === 9970 || e === 9971 || e === 9973 || e === 9978 || e === 9981 || e === 9989 || e === 9994 || e === 9995 || e === 10024 || e === 10060 || e === 10062 || e >= 10067 && e <= 10069 || e === 10071 || e >= 10133 && e <= 10135 || e === 10160 || e === 10175 || e === 11035 || e === 11036 || e === 11088 || e === 11093 || e >= 11904 && e <= 11929 || e >= 11931 && e <= 12019 || e >= 12032 && e <= 12245 || e >= 12272 && e <= 12287 || e >= 12289 && e <= 12350 || e >= 12353 && e <= 12438 || e >= 12441 && e <= 12543 || e >= 12549 && e <= 12591 || e >= 12593 && e <= 12686 || e >= 12688 && e <= 12771 || e >= 12783 && e <= 12830 || e >= 12832 && e <= 12871 || e >= 12880 && e <= 19903 || e >= 19968 && e <= 42124 || e >= 42128 && e <= 42182 || e >= 43360 && e <= 43388 || e >= 44032 && e <= 55203 || e >= 63744 && e <= 64255 || e >= 65040 && e <= 65049 || e >= 65072 && e <= 65106 || e >= 65108 && e <= 65126 || e >= 65128 && e <= 65131 || e >= 94176 && e <= 94180 || e === 94192 || e === 94193 || e >= 94208 && e <= 100343 || e >= 100352 && e <= 101589 || e >= 101632 && e <= 101640 || e >= 110576 && e <= 110579 || e >= 110581 && e <= 110587 || e === 110589 || e === 110590 || e >= 110592 && e <= 110882 || e === 110898 || e >= 110928 && e <= 110930 || e === 110933 || e >= 110948 && e <= 110951 || e >= 110960 && e <= 111355 || e === 126980 || e === 127183 || e === 127374 || e >= 127377 && e <= 127386 || e >= 127488 && e <= 127490 || e >= 127504 && e <= 127547 || e >= 127552 && e <= 127560 || e === 127568 || e === 127569 || e >= 127584 && e <= 127589 || e >= 127744 && e <= 127776 || e >= 127789 && e <= 127797 || e >= 127799 && e <= 127868 || e >= 127870 && e <= 127891 || e >= 127904 && e <= 127946 || e >= 127951 && e <= 127955 || e >= 127968 && e <= 127984 || e === 127988 || e >= 127992 && e <= 128062 || e === 128064 || e >= 128066 && e <= 128252 || e >= 128255 && e <= 128317 || e >= 128331 && e <= 128334 || e >= 128336 && e <= 128359 || e === 128378 || e === 128405 || e === 128406 || e === 128420 || e >= 128507 && e <= 128591 || e >= 128640 && e <= 128709 || e === 128716 || e >= 128720 && e <= 128722 || e >= 128725 && e <= 128727 || e >= 128732 && e <= 128735 || e === 128747 || e === 128748 || e >= 128756 && e <= 128764 || e >= 128992 && e <= 129003 || e === 129008 || e >= 129292 && e <= 129338 || e >= 129340 && e <= 129349 || e >= 129351 && e <= 129535 || e >= 129648 && e <= 129660 || e >= 129664 && e <= 129672 || e >= 129680 && e <= 129725 || e >= 129727 && e <= 129733 || e >= 129742 && e <= 129755 || e >= 129760 && e <= 129768 || e >= 129776 && e <= 129784 || e >= 131072 && e <= 196605 || e >= 196608 && e <= 262141;
4134
+ var we = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y;
4135
+ var re = /[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y;
4136
+ var ie = /\t{1,1000}/y;
4137
+ var Ae = /[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/yu;
4138
+ var ne = /(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y;
4139
+ var Ft2 = /\p{M}+/gu;
4140
+ var yt2 = { limit: 1 / 0, ellipsis: "" };
4141
+ var Le = (e, r = {}, s = {}) => {
4142
+ const i = r.limit ?? 1 / 0, a = r.ellipsis ?? "", o = r?.ellipsisWidth ?? (a ? Le(a, yt2, s).width : 0), u = s.ansiWidth ?? 0, l = s.controlWidth ?? 0, n = s.tabWidth ?? 8, c = s.ambiguousWidth ?? 1, p = s.emojiWidth ?? 2, f = s.fullWidthWidth ?? 2, g = s.regularWidth ?? 1, E = s.wideWidth ?? 2;
4143
+ let $ = 0, m = 0, d = e.length, F = 0, y2 = false, v = d, C = Math.max(0, i - o), A = 0, b = 0, w = 0, S2 = 0;
4144
+ e: for (; ; ) {
4145
+ if (b > A || m >= d && m > $) {
4146
+ const T2 = e.slice(A, b) || e.slice($, m);
4147
+ F = 0;
4148
+ for (const M2 of T2.replaceAll(Ft2, "")) {
4149
+ const O2 = M2.codePointAt(0) || 0;
4150
+ if (gt2(O2) ? S2 = f : ft2(O2) ? S2 = E : c !== g && mt2(O2) ? S2 = c : S2 = g, w + S2 > C && (v = Math.min(v, Math.max(A, $) + F)), w + S2 > i) {
4151
+ y2 = true;
4152
+ break e;
4153
+ }
4154
+ F += M2.length, w += S2;
4155
+ }
4156
+ A = b = 0;
4231
4157
  }
4232
- if (m >= h) break;
4233
- if (at2.lastIndex = m, at2.test(t)) {
4234
- if (y2 = at2.lastIndex - m, w = y2 * p, A + w > S2 && (v = Math.min(v, m + Math.floor((S2 - A) / p))), A + w > i) {
4235
- f = true;
4158
+ if (m >= d) break;
4159
+ if (ne.lastIndex = m, ne.test(e)) {
4160
+ if (F = ne.lastIndex - m, S2 = F * g, w + S2 > C && (v = Math.min(v, m + Math.floor((C - w) / g))), w + S2 > i) {
4161
+ y2 = true;
4236
4162
  break;
4237
4163
  }
4238
- A += w, I2 = $, B = m, m = $ = at2.lastIndex;
4164
+ w += S2, A = $, b = m, m = $ = ne.lastIndex;
4239
4165
  continue;
4240
4166
  }
4241
- if (At2.lastIndex = m, At2.test(t)) {
4242
- if (A + u > S2 && (v = Math.min(v, m)), A + u > i) {
4243
- f = true;
4167
+ if (we.lastIndex = m, we.test(e)) {
4168
+ if (w + u > C && (v = Math.min(v, m)), w + u > i) {
4169
+ y2 = true;
4244
4170
  break;
4245
4171
  }
4246
- A += u, I2 = $, B = m, m = $ = At2.lastIndex;
4172
+ w += u, A = $, b = m, m = $ = we.lastIndex;
4247
4173
  continue;
4248
4174
  }
4249
- if (it2.lastIndex = m, it2.test(t)) {
4250
- if (y2 = it2.lastIndex - m, w = y2 * l, A + w > S2 && (v = Math.min(v, m + Math.floor((S2 - A) / l))), A + w > i) {
4251
- f = true;
4175
+ if (re.lastIndex = m, re.test(e)) {
4176
+ if (F = re.lastIndex - m, S2 = F * l, w + S2 > C && (v = Math.min(v, m + Math.floor((C - w) / l))), w + S2 > i) {
4177
+ y2 = true;
4252
4178
  break;
4253
4179
  }
4254
- A += w, I2 = $, B = m, m = $ = it2.lastIndex;
4180
+ w += S2, A = $, b = m, m = $ = re.lastIndex;
4255
4181
  continue;
4256
4182
  }
4257
- if (nt2.lastIndex = m, nt2.test(t)) {
4258
- if (y2 = nt2.lastIndex - m, w = y2 * n, A + w > S2 && (v = Math.min(v, m + Math.floor((S2 - A) / n))), A + w > i) {
4259
- f = true;
4183
+ if (ie.lastIndex = m, ie.test(e)) {
4184
+ if (F = ie.lastIndex - m, S2 = F * n, w + S2 > C && (v = Math.min(v, m + Math.floor((C - w) / n))), w + S2 > i) {
4185
+ y2 = true;
4260
4186
  break;
4261
4187
  }
4262
- A += w, I2 = $, B = m, m = $ = nt2.lastIndex;
4188
+ w += S2, A = $, b = m, m = $ = ie.lastIndex;
4263
4189
  continue;
4264
4190
  }
4265
- if (wt.lastIndex = m, wt.test(t)) {
4266
- if (A + g > S2 && (v = Math.min(v, m)), A + g > i) {
4267
- f = true;
4191
+ if (Ae.lastIndex = m, Ae.test(e)) {
4192
+ if (w + p > C && (v = Math.min(v, m)), w + p > i) {
4193
+ y2 = true;
4268
4194
  break;
4269
4195
  }
4270
- A += g, I2 = $, B = m, m = $ = wt.lastIndex;
4196
+ w += p, A = $, b = m, m = $ = Ae.lastIndex;
4271
4197
  continue;
4272
4198
  }
4273
4199
  m += 1;
4274
4200
  }
4275
- return { width: f ? S2 : A, index: f ? v : h, truncated: f, ellipsed: f && i >= o };
4201
+ return { width: y2 ? C : w, index: y2 ? v : d, truncated: y2, ellipsed: y2 && i >= o };
4276
4202
  };
4277
- var Ee = { limit: 1 / 0, ellipsis: "", ellipsisWidth: 0 };
4278
- var M2 = (t, r = {}) => jt(t, Ee, r).width;
4279
- var ot2 = "\x1B";
4280
- var Gt = "\x9B";
4281
- var ve = 39;
4282
- var Ct2 = "\x07";
4283
- var kt2 = "[";
4284
- var Ae = "]";
4285
- var Vt2 = "m";
4286
- var St = `${Ae}8;;`;
4287
- var Ht = new RegExp(`(?:\\${kt2}(?<code>\\d+)m|\\${St}(?<uri>.*)${Ct2})`, "y");
4288
- var we = (t) => {
4289
- if (t >= 30 && t <= 37 || t >= 90 && t <= 97) return 39;
4290
- if (t >= 40 && t <= 47 || t >= 100 && t <= 107) return 49;
4291
- if (t === 1 || t === 2) return 22;
4292
- if (t === 3) return 23;
4293
- if (t === 4) return 24;
4294
- if (t === 7) return 27;
4295
- if (t === 8) return 28;
4296
- if (t === 9) return 29;
4297
- if (t === 0) return 0;
4203
+ var Et2 = { limit: 1 / 0, ellipsis: "", ellipsisWidth: 0 };
4204
+ var D2 = (e, r = {}) => Le(e, Et2, r).width;
4205
+ var ae = "\x1B";
4206
+ var je = "\x9B";
4207
+ var vt2 = 39;
4208
+ var Ce = "\x07";
4209
+ var ke = "[";
4210
+ var wt = "]";
4211
+ var Ve = "m";
4212
+ var Se = `${wt}8;;`;
4213
+ var He = new RegExp(`(?:\\${ke}(?<code>\\d+)m|\\${Se}(?<uri>.*)${Ce})`, "y");
4214
+ var At2 = (e) => {
4215
+ if (e >= 30 && e <= 37 || e >= 90 && e <= 97) return 39;
4216
+ if (e >= 40 && e <= 47 || e >= 100 && e <= 107) return 49;
4217
+ if (e === 1 || e === 2) return 22;
4218
+ if (e === 3) return 23;
4219
+ if (e === 4) return 24;
4220
+ if (e === 7) return 27;
4221
+ if (e === 8) return 28;
4222
+ if (e === 9) return 29;
4223
+ if (e === 0) return 0;
4298
4224
  };
4299
- var Ut = (t) => `${ot2}${kt2}${t}${Vt2}`;
4300
- var Kt = (t) => `${ot2}${St}${t}${Ct2}`;
4301
- var Ce = (t) => t.map((r) => M2(r));
4302
- var It2 = (t, r, s) => {
4225
+ var Ue = (e) => `${ae}${ke}${e}${Ve}`;
4226
+ var Ke = (e) => `${ae}${Se}${e}${Ce}`;
4227
+ var Ct2 = (e) => e.map((r) => D2(r));
4228
+ var Ie = (e, r, s) => {
4303
4229
  const i = r[Symbol.iterator]();
4304
- let a = false, o = false, u = t.at(-1), l = u === void 0 ? 0 : M2(u), n = i.next(), c = i.next(), g = 0;
4230
+ let a = false, o = false, u = e.at(-1), l = u === void 0 ? 0 : D2(u), n = i.next(), c = i.next(), p = 0;
4305
4231
  for (; !n.done; ) {
4306
- const F = n.value, p = M2(F);
4307
- l + p <= s ? t[t.length - 1] += F : (t.push(F), l = 0), (F === ot2 || F === Gt) && (a = true, o = r.startsWith(St, g + 1)), a ? o ? F === Ct2 && (a = false, o = false) : F === Vt2 && (a = false) : (l += p, l === s && !c.done && (t.push(""), l = 0)), n = c, c = i.next(), g += F.length;
4232
+ const f = n.value, g = D2(f);
4233
+ l + g <= s ? e[e.length - 1] += f : (e.push(f), l = 0), (f === ae || f === je) && (a = true, o = r.startsWith(Se, p + 1)), a ? o ? f === Ce && (a = false, o = false) : f === Ve && (a = false) : (l += g, l === s && !c.done && (e.push(""), l = 0)), n = c, c = i.next(), p += f.length;
4308
4234
  }
4309
- u = t.at(-1), !l && u !== void 0 && u.length > 0 && t.length > 1 && (t[t.length - 2] += t.pop());
4235
+ u = e.at(-1), !l && u !== void 0 && u.length > 0 && e.length > 1 && (e[e.length - 2] += e.pop());
4310
4236
  };
4311
- var Se = (t) => {
4312
- const r = t.split(" ");
4237
+ var St = (e) => {
4238
+ const r = e.split(" ");
4313
4239
  let s = r.length;
4314
- for (; s > 0 && !(M2(r[s - 1]) > 0); ) s--;
4315
- return s === r.length ? t : r.slice(0, s).join(" ") + r.slice(s).join("");
4240
+ for (; s > 0 && !(D2(r[s - 1]) > 0); ) s--;
4241
+ return s === r.length ? e : r.slice(0, s).join(" ") + r.slice(s).join("");
4316
4242
  };
4317
- var Ie = (t, r, s = {}) => {
4318
- if (s.trim !== false && t.trim() === "") return "";
4243
+ var It2 = (e, r, s = {}) => {
4244
+ if (s.trim !== false && e.trim() === "") return "";
4319
4245
  let i = "", a, o;
4320
- const u = t.split(" "), l = Ce(u);
4246
+ const u = e.split(" "), l = Ct2(u);
4321
4247
  let n = [""];
4322
4248
  for (const [$, m] of u.entries()) {
4323
4249
  s.trim !== false && (n[n.length - 1] = (n.at(-1) ?? "").trimStart());
4324
- let h = M2(n.at(-1) ?? "");
4325
- if ($ !== 0 && (h >= r && (s.wordWrap === false || s.trim === false) && (n.push(""), h = 0), (h > 0 || s.trim === false) && (n[n.length - 1] += " ", h++)), s.hard && l[$] > r) {
4326
- const y2 = r - h, f = 1 + Math.floor((l[$] - y2 - 1) / r);
4327
- Math.floor((l[$] - 1) / r) < f && n.push(""), It2(n, m, r);
4250
+ let d = D2(n.at(-1) ?? "");
4251
+ if ($ !== 0 && (d >= r && (s.wordWrap === false || s.trim === false) && (n.push(""), d = 0), (d > 0 || s.trim === false) && (n[n.length - 1] += " ", d++)), s.hard && l[$] > r) {
4252
+ const F = r - d, y2 = 1 + Math.floor((l[$] - F - 1) / r);
4253
+ Math.floor((l[$] - 1) / r) < y2 && n.push(""), Ie(n, m, r);
4328
4254
  continue;
4329
4255
  }
4330
- if (h + l[$] > r && h > 0 && l[$] > 0) {
4331
- if (s.wordWrap === false && h < r) {
4332
- It2(n, m, r);
4256
+ if (d + l[$] > r && d > 0 && l[$] > 0) {
4257
+ if (s.wordWrap === false && d < r) {
4258
+ Ie(n, m, r);
4333
4259
  continue;
4334
4260
  }
4335
4261
  n.push("");
4336
4262
  }
4337
- if (h + l[$] > r && s.wordWrap === false) {
4338
- It2(n, m, r);
4263
+ if (d + l[$] > r && s.wordWrap === false) {
4264
+ Ie(n, m, r);
4339
4265
  continue;
4340
4266
  }
4341
4267
  n[n.length - 1] += m;
4342
4268
  }
4343
- s.trim !== false && (n = n.map(($) => Se($)));
4269
+ s.trim !== false && (n = n.map(($) => St($)));
4344
4270
  const c = n.join(`
4345
- `), g = c[Symbol.iterator]();
4346
- let F = g.next(), p = g.next(), E = 0;
4347
- for (; !F.done; ) {
4348
- const $ = F.value, m = p.value;
4349
- if (i += $, $ === ot2 || $ === Gt) {
4350
- Ht.lastIndex = E + 1;
4351
- const f = Ht.exec(c)?.groups;
4352
- if (f?.code !== void 0) {
4353
- const v = Number.parseFloat(f.code);
4354
- a = v === ve ? void 0 : v;
4355
- } else f?.uri !== void 0 && (o = f.uri.length === 0 ? void 0 : f.uri);
4271
+ `), p = c[Symbol.iterator]();
4272
+ let f = p.next(), g = p.next(), E = 0;
4273
+ for (; !f.done; ) {
4274
+ const $ = f.value, m = g.value;
4275
+ if (i += $, $ === ae || $ === je) {
4276
+ He.lastIndex = E + 1;
4277
+ const y2 = He.exec(c)?.groups;
4278
+ if (y2?.code !== void 0) {
4279
+ const v = Number.parseFloat(y2.code);
4280
+ a = v === vt2 ? void 0 : v;
4281
+ } else y2?.uri !== void 0 && (o = y2.uri.length === 0 ? void 0 : y2.uri);
4356
4282
  }
4357
- const h = a ? we(a) : void 0;
4283
+ const d = a ? At2(a) : void 0;
4358
4284
  m === `
4359
- ` ? (o && (i += Kt("")), a && h && (i += Ut(h))) : $ === `
4360
- ` && (a && h && (i += Ut(a)), o && (i += Kt(o))), E += $.length, F = p, p = g.next();
4285
+ ` ? (o && (i += Ke("")), a && d && (i += Ue(d))) : $ === `
4286
+ ` && (a && d && (i += Ue(a)), o && (i += Ke(o))), E += $.length, f = g, g = p.next();
4361
4287
  }
4362
4288
  return i;
4363
4289
  };
4364
- function J2(t, r, s) {
4365
- return String(t).normalize().replaceAll(`\r
4290
+ function J2(e, r, s) {
4291
+ return String(e).normalize().replaceAll(`\r
4366
4292
  `, `
4367
4293
  `).split(`
4368
- `).map((i) => Ie(i, r, s)).join(`
4294
+ `).map((i) => It2(i, r, s)).join(`
4369
4295
  `);
4370
4296
  }
4371
- var Re = (t) => {
4372
- const r = t.active ?? "Yes", s = t.inactive ?? "No";
4373
- return new kt({ active: r, inactive: s, signal: t.signal, input: t.input, output: t.output, initialValue: t.initialValue ?? true, render() {
4374
- const i = t.withGuide ?? _.withGuide, a = `${i ? `${import_picocolors2.default.gray(d)}
4375
- ` : ""}${W2(this.state)} ${t.message}
4297
+ var Rt = (e) => {
4298
+ const r = e.active ?? "Yes", s = e.inactive ?? "No";
4299
+ return new kt({ active: r, inactive: s, signal: e.signal, input: e.input, output: e.output, initialValue: e.initialValue ?? true, render() {
4300
+ const i = e.withGuide ?? _.withGuide, a = `${i ? `${t("gray", h)}
4301
+ ` : ""}${W2(this.state)} ${e.message}
4376
4302
  `, o = this.value ? r : s;
4377
4303
  switch (this.state) {
4378
4304
  case "submit": {
4379
- const u = i ? `${import_picocolors2.default.gray(d)} ` : "";
4380
- return `${a}${u}${import_picocolors2.default.dim(o)}`;
4305
+ const u = i ? `${t("gray", h)} ` : "";
4306
+ return `${a}${u}${t("dim", o)}`;
4381
4307
  }
4382
4308
  case "cancel": {
4383
- const u = i ? `${import_picocolors2.default.gray(d)} ` : "";
4384
- return `${a}${u}${import_picocolors2.default.strikethrough(import_picocolors2.default.dim(o))}${i ? `
4385
- ${import_picocolors2.default.gray(d)}` : ""}`;
4309
+ const u = i ? `${t("gray", h)} ` : "";
4310
+ return `${a}${u}${t(["strikethrough", "dim"], o)}${i ? `
4311
+ ${t("gray", h)}` : ""}`;
4386
4312
  }
4387
4313
  default: {
4388
- const u = i ? `${import_picocolors2.default.cyan(d)} ` : "", l = i ? import_picocolors2.default.cyan(x2) : "";
4389
- return `${a}${u}${this.value ? `${import_picocolors2.default.green(Q2)} ${r}` : `${import_picocolors2.default.dim(H2)} ${import_picocolors2.default.dim(r)}`}${t.vertical ? i ? `
4390
- ${import_picocolors2.default.cyan(d)} ` : `
4391
- ` : ` ${import_picocolors2.default.dim("/")} `}${this.value ? `${import_picocolors2.default.dim(H2)} ${import_picocolors2.default.dim(s)}` : `${import_picocolors2.default.green(Q2)} ${s}`}
4314
+ const u = i ? `${t("cyan", h)} ` : "", l = i ? t("cyan", x) : "";
4315
+ return `${a}${u}${this.value ? `${t("green", z2)} ${r}` : `${t("dim", H2)} ${t("dim", r)}`}${e.vertical ? i ? `
4316
+ ${t("cyan", h)} ` : `
4317
+ ` : ` ${t("dim", "/")} `}${this.value ? `${t("dim", H2)} ${t("dim", s)}` : `${t("green", z2)} ${s}`}
4392
4318
  ${l}
4393
4319
  `;
4394
4320
  }
4395
4321
  }
4396
4322
  } }).prompt();
4397
4323
  };
4398
- var R2 = { message: (t = [], { symbol: r = import_picocolors2.default.gray(d), secondarySymbol: s = import_picocolors2.default.gray(d), output: i = process.stdout, spacing: a = 1, withGuide: o } = {}) => {
4399
- const u = [], l = o ?? _.withGuide, n = l ? s : "", c = l ? `${r} ` : "", g = l ? `${s} ` : "";
4400
- for (let p = 0; p < a; p++) u.push(n);
4401
- const F = Array.isArray(t) ? t : t.split(`
4324
+ var R2 = { message: (e = [], { symbol: r = t("gray", h), secondarySymbol: s = t("gray", h), output: i = process.stdout, spacing: a = 1, withGuide: o } = {}) => {
4325
+ const u = [], l = o ?? _.withGuide, n = l ? s : "", c = l ? `${r} ` : "", p = l ? `${s} ` : "";
4326
+ for (let g = 0; g < a; g++) u.push(n);
4327
+ const f = Array.isArray(e) ? e : e.split(`
4402
4328
  `);
4403
- if (F.length > 0) {
4404
- const [p, ...E] = F;
4405
- p.length > 0 ? u.push(`${c}${p}`) : u.push(l ? r : "");
4406
- for (const $ of E) $.length > 0 ? u.push(`${g}${$}`) : u.push(l ? s : "");
4329
+ if (f.length > 0) {
4330
+ const [g, ...E] = f;
4331
+ g.length > 0 ? u.push(`${c}${g}`) : u.push(l ? r : "");
4332
+ for (const $ of E) $.length > 0 ? u.push(`${p}${$}`) : u.push(l ? s : "");
4407
4333
  }
4408
4334
  i.write(`${u.join(`
4409
4335
  `)}
4410
4336
  `);
4411
- }, info: (t, r) => {
4412
- R2.message(t, { ...r, symbol: import_picocolors2.default.blue(ft2) });
4413
- }, success: (t, r) => {
4414
- R2.message(t, { ...r, symbol: import_picocolors2.default.green(Ft2) });
4415
- }, step: (t, r) => {
4416
- R2.message(t, { ...r, symbol: import_picocolors2.default.green(V) });
4417
- }, warn: (t, r) => {
4418
- R2.message(t, { ...r, symbol: import_picocolors2.default.yellow(yt2) });
4419
- }, warning: (t, r) => {
4420
- R2.warn(t, r);
4421
- }, error: (t, r) => {
4422
- R2.message(t, { ...r, symbol: import_picocolors2.default.red(Et2) });
4337
+ }, info: (e, r) => {
4338
+ R2.message(e, { ...r, symbol: t("blue", fe) });
4339
+ }, success: (e, r) => {
4340
+ R2.message(e, { ...r, symbol: t("green", Fe) });
4341
+ }, step: (e, r) => {
4342
+ R2.message(e, { ...r, symbol: t("green", V) });
4343
+ }, warn: (e, r) => {
4344
+ R2.message(e, { ...r, symbol: t("yellow", ye) });
4345
+ }, warning: (e, r) => {
4346
+ R2.warn(e, r);
4347
+ }, error: (e, r) => {
4348
+ R2.message(e, { ...r, symbol: t("red", Ee) });
4423
4349
  } };
4424
- var Ne = (t = "", r) => {
4425
- (r?.output ?? process.stdout).write(`${import_picocolors2.default.gray(x2)} ${import_picocolors2.default.red(t)}
4350
+ var Nt = (e = "", r) => {
4351
+ const s = r?.output ?? process.stdout, i = r?.withGuide ?? _.withGuide ? `${t("gray", x)} ` : "";
4352
+ s.write(`${i}${t("red", e)}
4426
4353
 
4427
4354
  `);
4428
4355
  };
4429
- var We = (t = "", r) => {
4430
- (r?.output ?? process.stdout).write(`${import_picocolors2.default.gray(ht2)} ${t}
4356
+ var Wt2 = (e = "", r) => {
4357
+ const s = r?.output ?? process.stdout, i = r?.withGuide ?? _.withGuide ? `${t("gray", he)} ` : "";
4358
+ s.write(`${i}${e}
4431
4359
  `);
4432
4360
  };
4433
- var Le = (t = "", r) => {
4434
- (r?.output ?? process.stdout).write(`${import_picocolors2.default.gray(d)}
4435
- ${import_picocolors2.default.gray(x2)} ${t}
4361
+ var Gt = (e = "", r) => {
4362
+ const s = r?.output ?? process.stdout, i = r?.withGuide ?? _.withGuide ? `${t("gray", h)}
4363
+ ${t("gray", x)} ` : "";
4364
+ s.write(`${i}${e}
4436
4365
 
4437
4366
  `);
4438
4367
  };
4439
- var Ge = (t) => import_picocolors2.default.dim(t);
4440
- var ke = (t, r, s) => {
4441
- const i = { hard: true, trim: false }, a = J2(t, r, i).split(`
4442
- `), o = a.reduce((n, c) => Math.max(M2(c), n), 0), u = a.map(s).reduce((n, c) => Math.max(M2(c), n), 0), l = r - (u - o);
4443
- return J2(t, l, i);
4368
+ var jt = (e) => t("dim", e);
4369
+ var kt2 = (e, r, s) => {
4370
+ const i = { hard: true, trim: false }, a = J2(e, r, i).split(`
4371
+ `), o = a.reduce((n, c) => Math.max(D2(c), n), 0), u = a.map(s).reduce((n, c) => Math.max(D2(c), n), 0), l = r - (u - o);
4372
+ return J2(e, l, i);
4444
4373
  };
4445
- var Ve = (t = "", r = "", s) => {
4446
- const i = s?.output ?? N2.stdout, a = s?.withGuide ?? _.withGuide, o = s?.format ?? Ge, u = ["", ...ke(t, rt(i) - 6, o).split(`
4447
- `).map(o), ""], l = M2(r), n = Math.max(u.reduce((p, E) => {
4448
- const $ = M2(E);
4449
- return $ > p ? $ : p;
4450
- }, 0), l) + 2, c = u.map((p) => `${import_picocolors2.default.gray(d)} ${p}${" ".repeat(n - M2(p))}${import_picocolors2.default.gray(d)}`).join(`
4451
- `), g = a ? `${import_picocolors2.default.gray(d)}
4452
- ` : "", F = a ? Wt2 : gt2;
4453
- i.write(`${g}${import_picocolors2.default.green(V)} ${import_picocolors2.default.reset(r)} ${import_picocolors2.default.gray(rt2.repeat(Math.max(n - l - 1, 1)) + mt2)}
4374
+ var Vt2 = (e = "", r = "", s) => {
4375
+ const i = s?.output ?? N2.stdout, a = s?.withGuide ?? _.withGuide, o = s?.format ?? jt, u = ["", ...kt2(e, rt(i) - 6, o).split(`
4376
+ `).map(o), ""], l = D2(r), n = Math.max(u.reduce((g, E) => {
4377
+ const $ = D2(E);
4378
+ return $ > g ? $ : g;
4379
+ }, 0), l) + 2, c = u.map((g) => `${t("gray", h)} ${g}${" ".repeat(n - D2(g))}${t("gray", h)}`).join(`
4380
+ `), p = a ? `${t("gray", h)}
4381
+ ` : "", f = a ? We : ge;
4382
+ i.write(`${p}${t("green", V)} ${t("reset", r)} ${t("gray", se.repeat(Math.max(n - l - 1, 1)) + pe)}
4454
4383
  ${c}
4455
- ${import_picocolors2.default.gray(F + rt2.repeat(n + 2) + pt2)}
4384
+ ${t("gray", f + se.repeat(n + 2) + me)}
4456
4385
  `);
4457
4386
  };
4458
- var Ke = import_picocolors2.default.magenta;
4459
- var bt2 = ({ indicator: t = "dots", onCancel: r, output: s = process.stdout, cancelMessage: i, errorMessage: a, frames: o = et2 ? ["\u25D2", "\u25D0", "\u25D3", "\u25D1"] : ["\u2022", "o", "O", "0"], delay: u = et2 ? 80 : 120, signal: l, ...n } = {}) => {
4460
- const c = ct2();
4461
- let g, F, p = false, E = false, $ = "", m, h = performance.now();
4462
- const y2 = rt(s), f = n?.styleFrame ?? Ke, v = (b) => {
4463
- const O2 = b > 1 ? a ?? _.messages.error : i ?? _.messages.cancel;
4464
- E = b === 1, p && (L2(O2, b), E && typeof r == "function" && r());
4465
- }, S2 = () => v(2), I2 = () => v(1), B = () => {
4466
- process.on("uncaughtExceptionMonitor", S2), process.on("unhandledRejection", S2), process.on("SIGINT", I2), process.on("SIGTERM", I2), process.on("exit", v), l && l.addEventListener("abort", I2);
4467
- }, A = () => {
4468
- process.removeListener("uncaughtExceptionMonitor", S2), process.removeListener("unhandledRejection", S2), process.removeListener("SIGINT", I2), process.removeListener("SIGTERM", I2), process.removeListener("exit", v), l && l.removeEventListener("abort", I2);
4387
+ var Kt = (e) => t("magenta", e);
4388
+ var be = ({ indicator: e = "dots", onCancel: r, output: s = process.stdout, cancelMessage: i, errorMessage: a, frames: o = ee ? ["\u25D2", "\u25D0", "\u25D3", "\u25D1"] : ["\u2022", "o", "O", "0"], delay: u = ee ? 80 : 120, signal: l, ...n } = {}) => {
4389
+ const c = ce();
4390
+ let p, f, g = false, E = false, $ = "", m, d = performance.now();
4391
+ const F = rt(s), y2 = n?.styleFrame ?? Kt, v = (B2) => {
4392
+ const P2 = B2 > 1 ? a ?? _.messages.error : i ?? _.messages.cancel;
4393
+ E = B2 === 1, g && (k2(P2, B2), E && typeof r == "function" && r());
4394
+ }, C = () => v(2), A = () => v(1), b = () => {
4395
+ process.on("uncaughtExceptionMonitor", C), process.on("unhandledRejection", C), process.on("SIGINT", A), process.on("SIGTERM", A), process.on("exit", v), l && l.addEventListener("abort", A);
4469
4396
  }, w = () => {
4397
+ process.removeListener("uncaughtExceptionMonitor", C), process.removeListener("unhandledRejection", C), process.removeListener("SIGINT", A), process.removeListener("SIGTERM", A), process.removeListener("exit", v), l && l.removeEventListener("abort", A);
4398
+ }, S2 = () => {
4470
4399
  if (m === void 0) return;
4471
4400
  c && s.write(`
4472
4401
  `);
4473
- const b = J2(m, y2, { hard: true, trim: false }).split(`
4402
+ const B2 = J2(m, F, { hard: true, trim: false }).split(`
4474
4403
  `);
4475
- b.length > 1 && s.write(import_sisteransi2.cursor.up(b.length - 1)), s.write(import_sisteransi2.cursor.to(0)), s.write(import_sisteransi2.erase.down());
4476
- }, _2 = (b) => b.replace(/\.+$/, ""), D2 = (b) => {
4477
- const O2 = (performance.now() - b) / 1e3, j2 = Math.floor(O2 / 60), G2 = Math.floor(O2 % 60);
4478
- return j2 > 0 ? `[${j2}m ${G2}s]` : `[${G2}s]`;
4479
- }, T2 = n.withGuide ?? _.withGuide, Y = (b = "") => {
4480
- p = true, g = Bt({ output: s }), $ = _2(b), h = performance.now(), T2 && s.write(`${import_picocolors2.default.gray(d)}
4404
+ B2.length > 1 && s.write(import_sisteransi2.cursor.up(B2.length - 1)), s.write(import_sisteransi2.cursor.to(0)), s.write(import_sisteransi2.erase.down());
4405
+ }, T2 = (B2) => B2.replace(/\.+$/, ""), M2 = (B2) => {
4406
+ const P2 = (performance.now() - B2) / 1e3, G2 = Math.floor(P2 / 60), L2 = Math.floor(P2 % 60);
4407
+ return G2 > 0 ? `[${G2}m ${L2}s]` : `[${L2}s]`;
4408
+ }, O2 = n.withGuide ?? _.withGuide, le = (B2 = "") => {
4409
+ g = true, p = xt({ output: s }), $ = T2(B2), d = performance.now(), O2 && s.write(`${t("gray", h)}
4481
4410
  `);
4482
- let O2 = 0, j2 = 0;
4483
- B(), F = setInterval(() => {
4411
+ let P2 = 0, G2 = 0;
4412
+ b(), f = setInterval(() => {
4484
4413
  if (c && $ === m) return;
4485
- w(), m = $;
4486
- const G2 = f(o[O2]);
4487
- let tt2;
4488
- if (c) tt2 = `${G2} ${$}...`;
4489
- else if (t === "timer") tt2 = `${G2} ${$} ${D2(h)}`;
4414
+ S2(), m = $;
4415
+ const L2 = y2(o[P2]);
4416
+ let Z2;
4417
+ if (c) Z2 = `${L2} ${$}...`;
4418
+ else if (e === "timer") Z2 = `${L2} ${$} ${M2(d)}`;
4490
4419
  else {
4491
- const te = ".".repeat(Math.floor(j2)).slice(0, 3);
4492
- tt2 = `${G2} ${$}${te}`;
4420
+ const et2 = ".".repeat(Math.floor(G2)).slice(0, 3);
4421
+ Z2 = `${L2} ${$}${et2}`;
4493
4422
  }
4494
- const Zt = J2(tt2, y2, { hard: true, trim: false });
4495
- s.write(Zt), O2 = O2 + 1 < o.length ? O2 + 1 : 0, j2 = j2 < 4 ? j2 + 0.125 : 0;
4423
+ const Ze = J2(Z2, F, { hard: true, trim: false });
4424
+ s.write(Ze), P2 = P2 + 1 < o.length ? P2 + 1 : 0, G2 = G2 < 4 ? G2 + 0.125 : 0;
4496
4425
  }, u);
4497
- }, L2 = (b = "", O2 = 0, j2 = false) => {
4498
- if (!p) return;
4499
- p = false, clearInterval(F), w();
4500
- const G2 = O2 === 0 ? import_picocolors2.default.green(V) : O2 === 1 ? import_picocolors2.default.red(dt2) : import_picocolors2.default.red($t2);
4501
- $ = b ?? $, j2 || (t === "timer" ? s.write(`${G2} ${$} ${D2(h)}
4502
- `) : s.write(`${G2} ${$}
4503
- `)), A(), g();
4426
+ }, k2 = (B2 = "", P2 = 0, G2 = false) => {
4427
+ if (!g) return;
4428
+ g = false, clearInterval(f), S2();
4429
+ const L2 = P2 === 0 ? t("green", V) : P2 === 1 ? t("red", $e) : t("red", de);
4430
+ $ = B2 ?? $, G2 || (e === "timer" ? s.write(`${L2} ${$} ${M2(d)}
4431
+ `) : s.write(`${L2} ${$}
4432
+ `)), w(), p();
4504
4433
  };
4505
- return { start: Y, stop: (b = "") => L2(b, 0), message: (b = "") => {
4506
- $ = _2(b ?? $);
4507
- }, cancel: (b = "") => L2(b, 1), error: (b = "") => L2(b, 2), clear: () => L2("", 0, true), get isCancelled() {
4434
+ return { start: le, stop: (B2 = "") => k2(B2, 0), message: (B2 = "") => {
4435
+ $ = T2(B2 ?? $);
4436
+ }, cancel: (B2 = "") => k2(B2, 1), error: (B2 = "") => k2(B2, 2), clear: () => k2("", 0, true), get isCancelled() {
4508
4437
  return E;
4509
4438
  } };
4510
4439
  };
4511
- var zt = { light: C("\u2500", "-"), heavy: C("\u2501", "="), block: C("\u2588", "#") };
4512
- var Qt = `${import_picocolors2.default.gray(d)} `;
4513
- var Ze = (t) => new $t({ validate: t.validate, placeholder: t.placeholder, defaultValue: t.defaultValue, initialValue: t.initialValue, output: t.output, signal: t.signal, input: t.input, render() {
4514
- const r = t?.withGuide ?? _.withGuide, s = `${`${r ? `${import_picocolors2.default.gray(d)}
4515
- ` : ""}${W2(this.state)} `}${t.message}
4516
- `, i = t.placeholder ? import_picocolors2.default.inverse(t.placeholder[0]) + import_picocolors2.default.dim(t.placeholder.slice(1)) : import_picocolors2.default.inverse(import_picocolors2.default.hidden("_")), a = this.userInput ? this.userInputWithCursor : i, o = this.value ?? "";
4440
+ var ze = { light: I2("\u2500", "-"), heavy: I2("\u2501", "="), block: I2("\u2588", "#") };
4441
+ var Qe = `${t("gray", h)} `;
4442
+ var Zt = (e) => new $t({ validate: e.validate, placeholder: e.placeholder, defaultValue: e.defaultValue, initialValue: e.initialValue, output: e.output, signal: e.signal, input: e.input, render() {
4443
+ const r = e?.withGuide ?? _.withGuide, s = `${`${r ? `${t("gray", h)}
4444
+ ` : ""}${W2(this.state)} `}${e.message}
4445
+ `, i = e.placeholder ? t("inverse", e.placeholder[0]) + t("dim", e.placeholder.slice(1)) : t(["inverse", "hidden"], "_"), a = this.userInput ? this.userInputWithCursor : i, o = this.value ?? "";
4517
4446
  switch (this.state) {
4518
4447
  case "error": {
4519
- const u = this.error ? ` ${import_picocolors2.default.yellow(this.error)}` : "", l = r ? `${import_picocolors2.default.yellow(d)} ` : "", n = r ? import_picocolors2.default.yellow(x2) : "";
4448
+ const u = this.error ? ` ${t("yellow", this.error)}` : "", l = r ? `${t("yellow", h)} ` : "", n = r ? t("yellow", x) : "";
4520
4449
  return `${s.trim()}
4521
4450
  ${l}${a}
4522
4451
  ${n}${u}
4523
4452
  `;
4524
4453
  }
4525
4454
  case "submit": {
4526
- const u = o ? ` ${import_picocolors2.default.dim(o)}` : "", l = r ? import_picocolors2.default.gray(d) : "";
4455
+ const u = o ? ` ${t("dim", o)}` : "", l = r ? t("gray", h) : "";
4527
4456
  return `${s}${l}${u}`;
4528
4457
  }
4529
4458
  case "cancel": {
4530
- const u = o ? ` ${import_picocolors2.default.strikethrough(import_picocolors2.default.dim(o))}` : "", l = r ? import_picocolors2.default.gray(d) : "";
4459
+ const u = o ? ` ${t(["strikethrough", "dim"], o)}` : "", l = r ? t("gray", h) : "";
4531
4460
  return `${s}${l}${u}${o.trim() ? `
4532
4461
  ${l}` : ""}`;
4533
4462
  }
4534
4463
  default: {
4535
- const u = r ? `${import_picocolors2.default.cyan(d)} ` : "", l = r ? import_picocolors2.default.cyan(x2) : "";
4464
+ const u = r ? `${t("cyan", h)} ` : "", l = r ? t("cyan", x) : "";
4536
4465
  return `${s}${u}${a}
4537
4466
  ${l}
4538
4467
  `;
@@ -4540,7 +4469,7 @@ ${l}
4540
4469
  }
4541
4470
  } }).prompt();
4542
4471
 
4543
- // ../stamn-sdk/dist/index.js
4472
+ // node_modules/.pnpm/@stamn+sdk@0.1.0-alpha.1/node_modules/@stamn/sdk/dist/index.js
4544
4473
  var Resource = class {
4545
4474
  constructor(client) {
4546
4475
  this.client = client;
@@ -4816,7 +4745,7 @@ var StamnClient = class {
4816
4745
  }
4817
4746
  };
4818
4747
 
4819
- // ../stamn-cli/dist/chunk-ECKKSWUQ.js
4748
+ // node_modules/.pnpm/@stamn+cli@0.1.0-alpha.4/node_modules/@stamn/cli/dist/chunk-GNL7D4HS.js
4820
4749
  import { execSync } from "child_process";
4821
4750
  import { mkdirSync, readFileSync, writeFileSync, unlinkSync } from "fs";
4822
4751
  import { join } from "path";
@@ -4824,17 +4753,17 @@ import { tmpdir } from "os";
4824
4753
  import { existsSync, mkdirSync as mkdirSync2, readFileSync as readFileSync2, rmSync, writeFileSync as writeFileSync2 } from "fs";
4825
4754
  import { dirname, join as join2 } from "path";
4826
4755
  async function handleLogin(_opts, adapter) {
4827
- We("Stamn Login");
4756
+ Wt2("Stamn Login");
4828
4757
  const existing = adapter.readConfig();
4829
4758
  if (existing?.apiKey) {
4830
- const s2 = bt2();
4759
+ const s2 = be();
4831
4760
  s2.start("Checking existing session...");
4832
4761
  try {
4833
4762
  const client2 = new StamnClient({ apiKey: existing.apiKey });
4834
4763
  await client2.participants.list();
4835
4764
  s2.stop("Session valid.");
4836
4765
  R2.info("Already logged in.");
4837
- Le("Run `stamn agent register` to create an agent, or `stamn agent list` to see existing ones.");
4766
+ Gt("Run `stamn agent register` to create an agent, or `stamn agent list` to see existing ones.");
4838
4767
  return;
4839
4768
  } catch {
4840
4769
  s2.stop("Session expired.");
@@ -4842,13 +4771,13 @@ async function handleLogin(_opts, adapter) {
4842
4771
  }
4843
4772
  }
4844
4773
  const client = new StamnClient();
4845
- const s = bt2();
4774
+ const s = be();
4846
4775
  try {
4847
4776
  s.start("Initiating device flow...");
4848
4777
  const flow = await client.auth.initiateDeviceFlow();
4849
4778
  s.stop("Device flow initiated.");
4850
4779
  const label = (str) => str.padEnd(7);
4851
- Ve(
4780
+ Vt2(
4852
4781
  `${label("Open:")} ${flow.verificationUri}
4853
4782
  ${label("Code:")} ${flow.userCode}`,
4854
4783
  "Authorize in your browser"
@@ -4859,24 +4788,23 @@ ${label("Code:")} ${flow.userCode}`,
4859
4788
  adapter.writeConfig({ apiKey });
4860
4789
  R2.success("Logged in successfully.");
4861
4790
  R2.info(`Config written to ${adapter.getConfigPath()}`);
4862
- Le("Now run `stamn agent register` to create or reconnect an agent.");
4791
+ Gt("Now run `stamn agent register` to create or reconnect an agent.");
4863
4792
  } catch (err) {
4864
4793
  s.stop("Failed.");
4865
- Ne(`Login failed: ${err.message}`);
4866
- process.exitCode = 1;
4794
+ Nt(`Login failed: ${err.message}`);
4795
+ process.exit(1);
4867
4796
  }
4868
4797
  }
4869
4798
  async function handleAgentRegister(opts, adapter) {
4870
- We("Stamn Agent Register");
4799
+ Wt2("Stamn Agent Register");
4871
4800
  const config = adapter.readConfig();
4872
4801
  if (!config?.apiKey) {
4873
- Ne("Not logged in. Run `stamn login` first.");
4874
- process.exitCode = 1;
4875
- return;
4802
+ Nt("Not logged in. Run `stamn login` first.");
4803
+ process.exit(1);
4876
4804
  }
4877
4805
  let name = opts.name;
4878
4806
  if (!name) {
4879
- const input = await Ze({
4807
+ const input = await Zt({
4880
4808
  message: "What should we call this agent?",
4881
4809
  placeholder: "my-agent",
4882
4810
  validate: (value) => {
@@ -4884,13 +4812,13 @@ async function handleAgentRegister(opts, adapter) {
4884
4812
  }
4885
4813
  });
4886
4814
  if (typeof input === "symbol") {
4887
- Ne("Cancelled.");
4815
+ Nt("Cancelled.");
4888
4816
  return;
4889
4817
  }
4890
4818
  name = input;
4891
4819
  }
4892
4820
  const client = new StamnClient({ apiKey: config.apiKey });
4893
- const s = bt2();
4821
+ const s = be();
4894
4822
  try {
4895
4823
  s.start("Checking existing agents...");
4896
4824
  const agents = await client.participants.list();
@@ -4899,7 +4827,7 @@ async function handleAgentRegister(opts, adapter) {
4899
4827
  s.stop("Agent found.");
4900
4828
  adapter.writeConfig({ agentId: match.id, agentName: match.name });
4901
4829
  R2.success(`Agent "${match.name}" (${match.id}) already exists. Selected as active.`);
4902
- Le("Done!");
4830
+ Gt("Done!");
4903
4831
  return;
4904
4832
  }
4905
4833
  s.start("Registering agent...");
@@ -4907,23 +4835,22 @@ async function handleAgentRegister(opts, adapter) {
4907
4835
  s.stop("Agent registered.");
4908
4836
  adapter.writeConfig({ agentId: participant.id, agentName: participant.name });
4909
4837
  R2.success(`Agent "${participant.name}" (${participant.id})`);
4910
- Le("Done!");
4838
+ Gt("Done!");
4911
4839
  } catch (err) {
4912
4840
  s.stop("Failed.");
4913
- Ne(`Registration failed: ${err.message}`);
4914
- process.exitCode = 1;
4841
+ Nt(`Registration failed: ${err.message}`);
4842
+ process.exit(1);
4915
4843
  }
4916
4844
  }
4917
4845
  async function handleAgentList(_opts, adapter) {
4918
- We("Stamn Agents");
4846
+ Wt2("Stamn Agents");
4919
4847
  const config = adapter.readConfig();
4920
4848
  if (!config?.apiKey) {
4921
- Ne("Not logged in. Run `stamn login` first.");
4922
- process.exitCode = 1;
4923
- return;
4849
+ Nt("Not logged in. Run `stamn login` first.");
4850
+ process.exit(1);
4924
4851
  }
4925
4852
  const client = new StamnClient({ apiKey: config.apiKey });
4926
- const s = bt2();
4853
+ const s = be();
4927
4854
  try {
4928
4855
  s.start("Fetching agents...");
4929
4856
  const agents = await client.participants.list();
@@ -4938,57 +4865,56 @@ async function handleAgentList(_opts, adapter) {
4938
4865
  }
4939
4866
  } catch (err) {
4940
4867
  s.stop("Failed.");
4941
- Ne(`Failed to list agents: ${err.message}`);
4942
- process.exitCode = 1;
4868
+ Nt(`Failed to list agents: ${err.message}`);
4869
+ process.exit(1);
4943
4870
  }
4944
4871
  }
4945
4872
  async function handleAgentSelect(opts, adapter) {
4946
- We("Stamn Agent Select");
4873
+ Wt2("Stamn Agent Select");
4947
4874
  const config = adapter.readConfig();
4948
4875
  if (!config?.apiKey) {
4949
- Ne("Not logged in. Run `stamn login` first.");
4950
- process.exitCode = 1;
4951
- return;
4876
+ Nt("Not logged in. Run `stamn login` first.");
4877
+ process.exit(1);
4952
4878
  }
4953
4879
  const client = new StamnClient({ apiKey: config.apiKey });
4954
- const s = bt2();
4880
+ const s = be();
4955
4881
  try {
4956
4882
  s.start("Fetching agents...");
4957
4883
  const agents = await client.participants.list();
4958
4884
  s.stop(`${agents.length} agent${agents.length === 1 ? "" : "s"} found.`);
4959
4885
  const match = agents.find((a) => a.id === opts.nameOrId || a.name === opts.nameOrId);
4960
4886
  if (!match) {
4961
- Ne(`Agent "${opts.nameOrId}" not found. Run \`stamn agent list\` to see available agents.`);
4962
- process.exitCode = 1;
4887
+ Nt(`Agent "${opts.nameOrId}" not found. Run \`stamn agent list\` to see available agents.`);
4888
+ process.exit(1);
4963
4889
  return;
4964
4890
  }
4965
4891
  adapter.writeConfig({ agentId: match.id, agentName: match.name });
4966
4892
  R2.success(`Active agent set to "${match.name}" (${match.id})`);
4967
- Le("Done!");
4893
+ Gt("Done!");
4968
4894
  } catch (err) {
4969
4895
  s.stop("Failed.");
4970
- Ne(`Failed to select agent: ${err.message}`);
4971
- process.exitCode = 1;
4896
+ Nt(`Failed to select agent: ${err.message}`);
4897
+ process.exit(1);
4972
4898
  }
4973
4899
  }
4974
4900
  async function handleLogout(_opts, adapter) {
4975
- We("Stamn Logout");
4901
+ Wt2("Stamn Logout");
4976
4902
  const config = adapter.readConfig();
4977
4903
  if (!config?.apiKey) {
4978
4904
  R2.info("Not logged in.");
4979
- Le("Nothing to do.");
4905
+ Gt("Nothing to do.");
4980
4906
  return;
4981
4907
  }
4982
- const shouldContinue = await Re({
4908
+ const shouldContinue = await Rt({
4983
4909
  message: "This will clear your auth session. Your agents will not be deleted. Continue?"
4984
4910
  });
4985
4911
  if (!shouldContinue || typeof shouldContinue === "symbol") {
4986
- Ne("Cancelled.");
4912
+ Nt("Cancelled.");
4987
4913
  return;
4988
4914
  }
4989
4915
  adapter.writeConfig({ apiKey: "", agentId: "", agentName: "" });
4990
4916
  R2.success("Logged out.");
4991
- Le("Run `stamn login` to authenticate again.");
4917
+ Gt("Run `stamn login` to authenticate again.");
4992
4918
  }
4993
4919
  function openEditor(initial) {
4994
4920
  const editor = process.env.EDITOR || process.env.VISUAL || "vi";
@@ -5038,7 +4964,7 @@ async function handleStatus(adapter) {
5038
4964
  const config = adapter.readConfig();
5039
4965
  const status = adapter.readStatusFile();
5040
4966
  const label = (str) => str.padEnd(14);
5041
- We("Stamn Status");
4967
+ Wt2("Stamn Status");
5042
4968
  R2.info(`${label("Agent ID:")} ${config?.agentId || "(not configured)"}`);
5043
4969
  R2.info(
5044
4970
  `${label("Agent Name:")} ${config?.agentName || "(not configured)"}`
@@ -5054,24 +4980,24 @@ async function handleStatus(adapter) {
5054
4980
  const health = await client.health.check();
5055
4981
  R2.info(`${label("Server:")} ${health.ok ? "healthy" : "unhealthy"}`);
5056
4982
  }
5057
- Le("");
4983
+ Gt("");
5058
4984
  }
5059
4985
  async function handleUninstall(adapter) {
5060
- We("Stamn Uninstall");
5061
- const shouldContinue = await Re({
4986
+ Wt2("Stamn Uninstall");
4987
+ const shouldContinue = await Rt({
5062
4988
  message: "This will remove all Stamn config and data. Continue?"
5063
4989
  });
5064
4990
  if (!shouldContinue || typeof shouldContinue === "symbol") {
5065
- Ne("Uninstall cancelled.");
4991
+ Nt("Uninstall cancelled.");
5066
4992
  return;
5067
4993
  }
5068
4994
  try {
5069
4995
  adapter.uninstall?.();
5070
4996
  R2.success("Removed Stamn config");
5071
- Le("Stamn config removed.");
4997
+ Gt("Stamn config removed.");
5072
4998
  } catch (err) {
5073
- Ne(`Failed to remove config: ${err.message}`);
5074
- process.exitCode = 1;
4999
+ Nt(`Failed to remove config: ${err.message}`);
5000
+ process.exit(1);
5075
5001
  }
5076
5002
  }
5077
5003
  function readJsonFile(filePath) {
@@ -5151,6 +5077,53 @@ function createOpenclawAdapter() {
5151
5077
  };
5152
5078
  }
5153
5079
 
5080
+ // src/update.ts
5081
+ import { execSync as execSync2 } from "child_process";
5082
+ import { writeFileSync as writeFileSync3, mkdtempSync, rmSync as rmSync3 } from "fs";
5083
+ import { join as join4 } from "path";
5084
+ import { homedir as homedir2, tmpdir as tmpdir2 } from "os";
5085
+ var PACKAGE_NAME = "@stamn/stamn-plugin";
5086
+ async function handleUpdate() {
5087
+ Wt2("Stamn Plugin Update");
5088
+ const s = be();
5089
+ const pluginDir = join4(homedir2(), ".openclaw", "extensions", "stamn-plugin");
5090
+ try {
5091
+ const localPkg = readJsonFile(join4(pluginDir, "package.json"));
5092
+ const current = localPkg?.version ?? "unknown";
5093
+ s.start("Checking for updates...");
5094
+ const res = await fetch(`https://registry.npmjs.org/${PACKAGE_NAME}`);
5095
+ if (!res.ok) throw new Error(`Registry returned ${res.status}`);
5096
+ const data = await res.json();
5097
+ const latest = data["dist-tags"].alpha ?? data["dist-tags"].latest;
5098
+ if (!latest) throw new Error("No published version found");
5099
+ if (latest === current) {
5100
+ s.stop("Already up to date.");
5101
+ R2.info(`Current version: ${current}`);
5102
+ Gt("No update needed.");
5103
+ return;
5104
+ }
5105
+ s.stop(`Update available: ${current} \u2192 ${latest}`);
5106
+ const tarballUrl = data.versions[latest]?.dist?.tarball;
5107
+ if (!tarballUrl) throw new Error(`No tarball URL for version ${latest}`);
5108
+ s.start("Downloading...");
5109
+ const tarRes = await fetch(tarballUrl);
5110
+ if (!tarRes.ok) throw new Error(`Download failed: ${tarRes.status}`);
5111
+ const tmp = mkdtempSync(join4(tmpdir2(), "stamn-update-"));
5112
+ const tarballPath = join4(tmp, "plugin.tgz");
5113
+ writeFileSync3(tarballPath, Buffer.from(await tarRes.arrayBuffer()));
5114
+ execSync2(`tar -xzf "${tarballPath}" -C "${tmp}"`);
5115
+ execSync2(`cp -r "${tmp}/package/." "${pluginDir}/"`);
5116
+ rmSync3(tmp, { recursive: true, force: true });
5117
+ s.stop("Updated.");
5118
+ R2.success(`Updated to ${latest}`);
5119
+ Gt("Restart OpenClaw to apply the update.");
5120
+ } catch (err) {
5121
+ s.stop("Failed.");
5122
+ Nt(`Update failed: ${err.message}`);
5123
+ process.exit(1);
5124
+ }
5125
+ }
5126
+
5154
5127
  // src/register.ts
5155
5128
  function registerCli(api) {
5156
5129
  const adapter = createOpenclawAdapter();
@@ -5165,6 +5138,7 @@ function registerCli(api) {
5165
5138
  agent.command("select").description("Set active agent").argument("<nameOrId>", "Agent name or ID").action((nameOrId) => handleAgentSelect({ nameOrId }, adapter));
5166
5139
  agent.command("config").description("View or update agent configuration").option("--name <name>", "Agent display name").option("--personality", "Open editor to set agent personality").action((opts) => handleConfig(opts, adapter));
5167
5140
  stamn.command("status").description("Show connection status and server health").action(() => handleStatus(adapter));
5141
+ stamn.command("update").description("Update the Stamn plugin to the latest version").action(() => handleUpdate());
5168
5142
  stamn.command("uninstall").description("Remove all Stamn config and data").action(() => handleUninstall(adapter));
5169
5143
  },
5170
5144
  { commands: ["stamn"] }
@@ -5413,7 +5387,7 @@ function registerTools(api, wsService, config) {
5413
5387
  }
5414
5388
  }
5415
5389
 
5416
- // node_modules/ws/wrapper.mjs
5390
+ // node_modules/.pnpm/ws@8.19.0/node_modules/ws/wrapper.mjs
5417
5391
  var import_stream = __toESM(require_stream(), 1);
5418
5392
  var import_receiver = __toESM(require_receiver(), 1);
5419
5393
  var import_sender = __toESM(require_sender(), 1);
@@ -5466,12 +5440,12 @@ var StamnWsService = class {
5466
5440
  this.onStatusChange = opts.onStatusChange;
5467
5441
  this.createSocket = opts.createSocket ?? ((url) => new wrapper_default(url));
5468
5442
  this.messageHandlers = {
5469
- [ServerEvent.AUTHENTICATED]: (d2) => this.onAuthenticated(d2),
5470
- [ServerEvent.AUTH_ERROR]: (d2) => this.onAuthError(d2),
5443
+ [ServerEvent.AUTHENTICATED]: (d) => this.onAuthenticated(d),
5444
+ [ServerEvent.AUTH_ERROR]: (d) => this.onAuthError(d),
5471
5445
  [ServerEvent.HEARTBEAT_ACK]: () => this.logger.debug("Heartbeat acknowledged"),
5472
- [ServerEvent.WORLD_UPDATE]: (d2) => this.onWorldUpdate(d2),
5473
- [ServerEvent.BALANCE]: (d2) => this.onBalanceUpdate(d2),
5474
- [ServerEvent.OWNER_CHAT_MESSAGE]: (d2) => this.handleOwnerChat(d2)
5446
+ [ServerEvent.WORLD_UPDATE]: (d) => this.onWorldUpdate(d),
5447
+ [ServerEvent.BALANCE]: (d) => this.onBalanceUpdate(d),
5448
+ [ServerEvent.OWNER_CHAT_MESSAGE]: (d) => this.handleOwnerChat(d)
5475
5449
  };
5476
5450
  }
5477
5451
  async start() {