@hot-updater/cloudflare 0.21.6 → 0.21.8

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.
@@ -12,7 +12,7 @@ var __copyProps = (to, from, except, desc) => {
12
12
  if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i$1 = 0, n$1 = keys.length, key; i$1 < n$1; i$1++) {
13
13
  key = keys[i$1];
14
14
  if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
15
- get: ((k$2) => from[k$2]).bind(null, key),
15
+ get: ((k) => from[k]).bind(null, key),
16
16
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
17
  });
18
18
  }
@@ -25,16 +25,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
25
25
  }) : target, mod));
26
26
 
27
27
  //#endregion
28
- let node_util = require("node:util");
29
- node_util = __toESM(node_util);
30
- let node_process = require("node:process");
31
- node_process = __toESM(node_process);
32
- let node_readline = require("node:readline");
33
- node_readline = __toESM(node_readline);
34
- let node_tty = require("node:tty");
35
- node_tty = __toESM(node_tty);
36
- let __hot_updater_plugin_core = require("@hot-updater/plugin-core");
37
- __hot_updater_plugin_core = __toESM(__hot_updater_plugin_core);
28
+ let __hot_updater_cli_tools = require("@hot-updater/cli-tools");
29
+ __hot_updater_cli_tools = __toESM(__hot_updater_cli_tools);
38
30
  let cloudflare = require("cloudflare");
39
31
  cloudflare = __toESM(cloudflare);
40
32
  let crypto = require("crypto");
@@ -45,6 +37,12 @@ let node_child_process = require("node:child_process");
45
37
  node_child_process = __toESM(node_child_process);
46
38
  let node_string_decoder = require("node:string_decoder");
47
39
  node_string_decoder = __toESM(node_string_decoder);
40
+ let node_util = require("node:util");
41
+ node_util = __toESM(node_util);
42
+ let node_process = require("node:process");
43
+ node_process = __toESM(node_process);
44
+ let node_tty = require("node:tty");
45
+ node_tty = __toESM(node_tty);
48
46
  let node_path = require("node:path");
49
47
  node_path = __toESM(node_path);
50
48
  let path = require("path");
@@ -72,1297 +70,134 @@ fs_promises = __toESM(fs_promises);
72
70
  let os = require("os");
73
71
  os = __toESM(os);
74
72
 
75
- //#region ../../node_modules/.pnpm/sisteransi@1.0.5/node_modules/sisteransi/src/index.js
76
- var require_src = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/sisteransi@1.0.5/node_modules/sisteransi/src/index.js": ((exports, module) => {
77
- const ESC = "\x1B";
78
- const CSI = `${ESC}[`;
79
- const beep = "\x07";
80
- const cursor = {
81
- to(x$1, y$1) {
82
- if (!y$1) return `${CSI}${x$1 + 1}G`;
83
- return `${CSI}${y$1 + 1};${x$1 + 1}H`;
84
- },
85
- move(x$1, y$1) {
86
- let ret = "";
87
- if (x$1 < 0) ret += `${CSI}${-x$1}D`;
88
- else if (x$1 > 0) ret += `${CSI}${x$1}C`;
89
- if (y$1 < 0) ret += `${CSI}${-y$1}A`;
90
- else if (y$1 > 0) ret += `${CSI}${y$1}B`;
91
- return ret;
92
- },
93
- up: (count$1 = 1) => `${CSI}${count$1}A`,
94
- down: (count$1 = 1) => `${CSI}${count$1}B`,
95
- forward: (count$1 = 1) => `${CSI}${count$1}C`,
96
- backward: (count$1 = 1) => `${CSI}${count$1}D`,
97
- nextLine: (count$1 = 1) => `${CSI}E`.repeat(count$1),
98
- prevLine: (count$1 = 1) => `${CSI}F`.repeat(count$1),
99
- left: `${CSI}G`,
100
- hide: `${CSI}?25l`,
101
- show: `${CSI}?25h`,
102
- save: `${ESC}7`,
103
- restore: `${ESC}8`
104
- };
105
- const scroll = {
106
- up: (count$1 = 1) => `${CSI}S`.repeat(count$1),
107
- down: (count$1 = 1) => `${CSI}T`.repeat(count$1)
108
- };
109
- const erase = {
110
- screen: `${CSI}2J`,
111
- up: (count$1 = 1) => `${CSI}1J`.repeat(count$1),
112
- down: (count$1 = 1) => `${CSI}J`.repeat(count$1),
113
- line: `${CSI}2K`,
114
- lineEnd: `${CSI}K`,
115
- lineStart: `${CSI}1K`,
116
- lines(count$1) {
117
- let clear = "";
118
- for (let i$1 = 0; i$1 < count$1; i$1++) clear += this.line + (i$1 < count$1 - 1 ? cursor.up() : "");
119
- if (count$1) clear += cursor.left;
120
- return clear;
121
- }
122
- };
123
- module.exports = {
124
- cursor,
125
- scroll,
126
- erase,
127
- beep
128
- };
129
- }) });
130
-
131
- //#endregion
132
- //#region ../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js
133
- var require_picocolors = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js": ((exports, module) => {
134
- let p = process || {}, argv = p.argv || [], env = p.env || {};
135
- let 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);
136
- let formatter = (open, close, replace = open) => (input) => {
137
- let string = "" + input, index = string.indexOf(close, open.length);
138
- return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
139
- };
140
- let replaceClose = (string, close, replace, index) => {
141
- let result = "", cursor$1 = 0;
142
- do {
143
- result += string.substring(cursor$1, index) + replace;
144
- cursor$1 = index + close.length;
145
- index = string.indexOf(close, cursor$1);
146
- } while (~index);
147
- return result + string.substring(cursor$1);
148
- };
149
- let createColors = (enabled = isColorSupported) => {
150
- let f$1 = enabled ? formatter : () => String;
151
- return {
152
- isColorSupported: enabled,
153
- reset: f$1("\x1B[0m", "\x1B[0m"),
154
- bold: f$1("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
155
- dim: f$1("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
156
- italic: f$1("\x1B[3m", "\x1B[23m"),
157
- underline: f$1("\x1B[4m", "\x1B[24m"),
158
- inverse: f$1("\x1B[7m", "\x1B[27m"),
159
- hidden: f$1("\x1B[8m", "\x1B[28m"),
160
- strikethrough: f$1("\x1B[9m", "\x1B[29m"),
161
- black: f$1("\x1B[30m", "\x1B[39m"),
162
- red: f$1("\x1B[31m", "\x1B[39m"),
163
- green: f$1("\x1B[32m", "\x1B[39m"),
164
- yellow: f$1("\x1B[33m", "\x1B[39m"),
165
- blue: f$1("\x1B[34m", "\x1B[39m"),
166
- magenta: f$1("\x1B[35m", "\x1B[39m"),
167
- cyan: f$1("\x1B[36m", "\x1B[39m"),
168
- white: f$1("\x1B[37m", "\x1B[39m"),
169
- gray: f$1("\x1B[90m", "\x1B[39m"),
170
- bgBlack: f$1("\x1B[40m", "\x1B[49m"),
171
- bgRed: f$1("\x1B[41m", "\x1B[49m"),
172
- bgGreen: f$1("\x1B[42m", "\x1B[49m"),
173
- bgYellow: f$1("\x1B[43m", "\x1B[49m"),
174
- bgBlue: f$1("\x1B[44m", "\x1B[49m"),
175
- bgMagenta: f$1("\x1B[45m", "\x1B[49m"),
176
- bgCyan: f$1("\x1B[46m", "\x1B[49m"),
177
- bgWhite: f$1("\x1B[47m", "\x1B[49m"),
178
- blackBright: f$1("\x1B[90m", "\x1B[39m"),
179
- redBright: f$1("\x1B[91m", "\x1B[39m"),
180
- greenBright: f$1("\x1B[92m", "\x1B[39m"),
181
- yellowBright: f$1("\x1B[93m", "\x1B[39m"),
182
- blueBright: f$1("\x1B[94m", "\x1B[39m"),
183
- magentaBright: f$1("\x1B[95m", "\x1B[39m"),
184
- cyanBright: f$1("\x1B[96m", "\x1B[39m"),
185
- whiteBright: f$1("\x1B[97m", "\x1B[39m"),
186
- bgBlackBright: f$1("\x1B[100m", "\x1B[49m"),
187
- bgRedBright: f$1("\x1B[101m", "\x1B[49m"),
188
- bgGreenBright: f$1("\x1B[102m", "\x1B[49m"),
189
- bgYellowBright: f$1("\x1B[103m", "\x1B[49m"),
190
- bgBlueBright: f$1("\x1B[104m", "\x1B[49m"),
191
- bgMagentaBright: f$1("\x1B[105m", "\x1B[49m"),
192
- bgCyanBright: f$1("\x1B[106m", "\x1B[49m"),
193
- bgWhiteBright: f$1("\x1B[107m", "\x1B[49m")
194
- };
195
- };
196
- module.exports = createColors();
197
- module.exports.createColors = createColors;
198
- }) });
199
-
200
- //#endregion
201
- //#region ../../node_modules/.pnpm/@clack+core@0.4.1/node_modules/@clack/core/dist/index.mjs
202
- var import_src$1 = /* @__PURE__ */ __toESM(require_src(), 1);
203
- var import_picocolors$1 = /* @__PURE__ */ __toESM(require_picocolors(), 1);
204
- function J$1({ onlyFirst: t = !1 } = {}) {
205
- const F$1 = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");
206
- return new RegExp(F$1, t ? void 0 : "g");
207
- }
208
- const Q = J$1();
209
- function T$1(t) {
210
- if (typeof t != "string") throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);
211
- return t.replace(Q, "");
212
- }
213
- function O(t) {
214
- return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
215
- }
216
- var P$1 = { exports: {} };
217
- (function(t) {
218
- var u$2 = {};
219
- t.exports = u$2, u$2.eastAsianWidth = function(e$1) {
220
- var s = e$1.charCodeAt(0), i$1 = e$1.length == 2 ? e$1.charCodeAt(1) : 0, D$1 = s;
221
- return 55296 <= s && s <= 56319 && 56320 <= i$1 && i$1 <= 57343 && (s &= 1023, i$1 &= 1023, D$1 = s << 10 | i$1, D$1 += 65536), D$1 == 12288 || 65281 <= D$1 && D$1 <= 65376 || 65504 <= D$1 && D$1 <= 65510 ? "F" : D$1 == 8361 || 65377 <= D$1 && D$1 <= 65470 || 65474 <= D$1 && D$1 <= 65479 || 65482 <= D$1 && D$1 <= 65487 || 65490 <= D$1 && D$1 <= 65495 || 65498 <= D$1 && D$1 <= 65500 || 65512 <= D$1 && D$1 <= 65518 ? "H" : 4352 <= D$1 && D$1 <= 4447 || 4515 <= D$1 && D$1 <= 4519 || 4602 <= D$1 && D$1 <= 4607 || 9001 <= D$1 && D$1 <= 9002 || 11904 <= D$1 && D$1 <= 11929 || 11931 <= D$1 && D$1 <= 12019 || 12032 <= D$1 && D$1 <= 12245 || 12272 <= D$1 && D$1 <= 12283 || 12289 <= D$1 && D$1 <= 12350 || 12353 <= D$1 && D$1 <= 12438 || 12441 <= D$1 && D$1 <= 12543 || 12549 <= D$1 && D$1 <= 12589 || 12593 <= D$1 && D$1 <= 12686 || 12688 <= D$1 && D$1 <= 12730 || 12736 <= D$1 && D$1 <= 12771 || 12784 <= D$1 && D$1 <= 12830 || 12832 <= D$1 && D$1 <= 12871 || 12880 <= D$1 && D$1 <= 13054 || 13056 <= D$1 && D$1 <= 19903 || 19968 <= D$1 && D$1 <= 42124 || 42128 <= D$1 && D$1 <= 42182 || 43360 <= D$1 && D$1 <= 43388 || 44032 <= D$1 && D$1 <= 55203 || 55216 <= D$1 && D$1 <= 55238 || 55243 <= D$1 && D$1 <= 55291 || 63744 <= D$1 && D$1 <= 64255 || 65040 <= D$1 && D$1 <= 65049 || 65072 <= D$1 && D$1 <= 65106 || 65108 <= D$1 && D$1 <= 65126 || 65128 <= D$1 && D$1 <= 65131 || 110592 <= D$1 && D$1 <= 110593 || 127488 <= D$1 && D$1 <= 127490 || 127504 <= D$1 && D$1 <= 127546 || 127552 <= D$1 && D$1 <= 127560 || 127568 <= D$1 && D$1 <= 127569 || 131072 <= D$1 && D$1 <= 194367 || 177984 <= D$1 && D$1 <= 196605 || 196608 <= D$1 && D$1 <= 262141 ? "W" : 32 <= D$1 && D$1 <= 126 || 162 <= D$1 && D$1 <= 163 || 165 <= D$1 && D$1 <= 166 || D$1 == 172 || D$1 == 175 || 10214 <= D$1 && D$1 <= 10221 || 10629 <= D$1 && D$1 <= 10630 ? "Na" : D$1 == 161 || D$1 == 164 || 167 <= D$1 && D$1 <= 168 || D$1 == 170 || 173 <= D$1 && D$1 <= 174 || 176 <= D$1 && D$1 <= 180 || 182 <= D$1 && D$1 <= 186 || 188 <= D$1 && D$1 <= 191 || D$1 == 198 || D$1 == 208 || 215 <= D$1 && D$1 <= 216 || 222 <= D$1 && D$1 <= 225 || D$1 == 230 || 232 <= D$1 && D$1 <= 234 || 236 <= D$1 && D$1 <= 237 || D$1 == 240 || 242 <= D$1 && D$1 <= 243 || 247 <= D$1 && D$1 <= 250 || D$1 == 252 || D$1 == 254 || D$1 == 257 || D$1 == 273 || D$1 == 275 || D$1 == 283 || 294 <= D$1 && D$1 <= 295 || D$1 == 299 || 305 <= D$1 && D$1 <= 307 || D$1 == 312 || 319 <= D$1 && D$1 <= 322 || D$1 == 324 || 328 <= D$1 && D$1 <= 331 || D$1 == 333 || 338 <= D$1 && D$1 <= 339 || 358 <= D$1 && D$1 <= 359 || D$1 == 363 || D$1 == 462 || D$1 == 464 || D$1 == 466 || D$1 == 468 || D$1 == 470 || D$1 == 472 || D$1 == 474 || D$1 == 476 || D$1 == 593 || D$1 == 609 || D$1 == 708 || D$1 == 711 || 713 <= D$1 && D$1 <= 715 || D$1 == 717 || D$1 == 720 || 728 <= D$1 && D$1 <= 731 || D$1 == 733 || D$1 == 735 || 768 <= D$1 && D$1 <= 879 || 913 <= D$1 && D$1 <= 929 || 931 <= D$1 && D$1 <= 937 || 945 <= D$1 && D$1 <= 961 || 963 <= D$1 && D$1 <= 969 || D$1 == 1025 || 1040 <= D$1 && D$1 <= 1103 || D$1 == 1105 || D$1 == 8208 || 8211 <= D$1 && D$1 <= 8214 || 8216 <= D$1 && D$1 <= 8217 || 8220 <= D$1 && D$1 <= 8221 || 8224 <= D$1 && D$1 <= 8226 || 8228 <= D$1 && D$1 <= 8231 || D$1 == 8240 || 8242 <= D$1 && D$1 <= 8243 || D$1 == 8245 || D$1 == 8251 || D$1 == 8254 || D$1 == 8308 || D$1 == 8319 || 8321 <= D$1 && D$1 <= 8324 || D$1 == 8364 || D$1 == 8451 || D$1 == 8453 || D$1 == 8457 || D$1 == 8467 || D$1 == 8470 || 8481 <= D$1 && D$1 <= 8482 || D$1 == 8486 || D$1 == 8491 || 8531 <= D$1 && D$1 <= 8532 || 8539 <= D$1 && D$1 <= 8542 || 8544 <= D$1 && D$1 <= 8555 || 8560 <= D$1 && D$1 <= 8569 || D$1 == 8585 || 8592 <= D$1 && D$1 <= 8601 || 8632 <= D$1 && D$1 <= 8633 || D$1 == 8658 || D$1 == 8660 || D$1 == 8679 || D$1 == 8704 || 8706 <= D$1 && D$1 <= 8707 || 8711 <= D$1 && D$1 <= 8712 || D$1 == 8715 || D$1 == 8719 || D$1 == 8721 || D$1 == 8725 || D$1 == 8730 || 8733 <= D$1 && D$1 <= 8736 || D$1 == 8739 || D$1 == 8741 || 8743 <= D$1 && D$1 <= 8748 || D$1 == 8750 || 8756 <= D$1 && D$1 <= 8759 || 8764 <= D$1 && D$1 <= 8765 || D$1 == 8776 || D$1 == 8780 || D$1 == 8786 || 8800 <= D$1 && D$1 <= 8801 || 8804 <= D$1 && D$1 <= 8807 || 8810 <= D$1 && D$1 <= 8811 || 8814 <= D$1 && D$1 <= 8815 || 8834 <= D$1 && D$1 <= 8835 || 8838 <= D$1 && D$1 <= 8839 || D$1 == 8853 || D$1 == 8857 || D$1 == 8869 || D$1 == 8895 || D$1 == 8978 || 9312 <= D$1 && D$1 <= 9449 || 9451 <= D$1 && D$1 <= 9547 || 9552 <= D$1 && D$1 <= 9587 || 9600 <= D$1 && D$1 <= 9615 || 9618 <= D$1 && D$1 <= 9621 || 9632 <= D$1 && D$1 <= 9633 || 9635 <= D$1 && D$1 <= 9641 || 9650 <= D$1 && D$1 <= 9651 || 9654 <= D$1 && D$1 <= 9655 || 9660 <= D$1 && D$1 <= 9661 || 9664 <= D$1 && D$1 <= 9665 || 9670 <= D$1 && D$1 <= 9672 || D$1 == 9675 || 9678 <= D$1 && D$1 <= 9681 || 9698 <= D$1 && D$1 <= 9701 || D$1 == 9711 || 9733 <= D$1 && D$1 <= 9734 || D$1 == 9737 || 9742 <= D$1 && D$1 <= 9743 || 9748 <= D$1 && D$1 <= 9749 || D$1 == 9756 || D$1 == 9758 || D$1 == 9792 || D$1 == 9794 || 9824 <= D$1 && D$1 <= 9825 || 9827 <= D$1 && D$1 <= 9829 || 9831 <= D$1 && D$1 <= 9834 || 9836 <= D$1 && D$1 <= 9837 || D$1 == 9839 || 9886 <= D$1 && D$1 <= 9887 || 9918 <= D$1 && D$1 <= 9919 || 9924 <= D$1 && D$1 <= 9933 || 9935 <= D$1 && D$1 <= 9953 || D$1 == 9955 || 9960 <= D$1 && D$1 <= 9983 || D$1 == 10045 || D$1 == 10071 || 10102 <= D$1 && D$1 <= 10111 || 11093 <= D$1 && D$1 <= 11097 || 12872 <= D$1 && D$1 <= 12879 || 57344 <= D$1 && D$1 <= 63743 || 65024 <= D$1 && D$1 <= 65039 || D$1 == 65533 || 127232 <= D$1 && D$1 <= 127242 || 127248 <= D$1 && D$1 <= 127277 || 127280 <= D$1 && D$1 <= 127337 || 127344 <= D$1 && D$1 <= 127386 || 917760 <= D$1 && D$1 <= 917999 || 983040 <= D$1 && D$1 <= 1048573 || 1048576 <= D$1 && D$1 <= 1114109 ? "A" : "N";
222
- }, u$2.characterLength = function(e$1) {
223
- var s = this.eastAsianWidth(e$1);
224
- return s == "F" || s == "W" || s == "A" ? 2 : 1;
225
- };
226
- function F$1(e$1) {
227
- return e$1.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g) || [];
228
- }
229
- u$2.length = function(e$1) {
230
- for (var s = F$1(e$1), i$1 = 0, D$1 = 0; D$1 < s.length; D$1++) i$1 = i$1 + this.characterLength(s[D$1]);
231
- return i$1;
232
- }, u$2.slice = function(e$1, s, i$1) {
233
- textLen = u$2.length(e$1), s = s || 0, i$1 = i$1 || 1, s < 0 && (s = textLen + s), i$1 < 0 && (i$1 = textLen + i$1);
234
- for (var D$1 = "", C$1 = 0, o$2 = F$1(e$1), E = 0; E < o$2.length; E++) {
235
- var a$1 = o$2[E], n$1 = u$2.length(a$1);
236
- if (C$1 >= s - (n$1 == 2 ? 1 : 0)) if (C$1 + n$1 <= i$1) D$1 += a$1;
237
- else break;
238
- C$1 += n$1;
239
- }
240
- return D$1;
241
- };
242
- })(P$1);
243
- var X = P$1.exports;
244
- const DD = O(X);
245
- var uD = function() {
246
- return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g;
247
- };
248
- const FD = O(uD);
249
- function A$1(t, u$2 = {}) {
250
- if (typeof t != "string" || t.length === 0 || (u$2 = {
251
- ambiguousIsNarrow: !0,
252
- ...u$2
253
- }, t = T$1(t), t.length === 0)) return 0;
254
- t = t.replace(FD(), " ");
255
- const F$1 = u$2.ambiguousIsNarrow ? 1 : 2;
256
- let e$1 = 0;
257
- for (const s of t) {
258
- const i$1 = s.codePointAt(0);
259
- if (i$1 <= 31 || i$1 >= 127 && i$1 <= 159 || i$1 >= 768 && i$1 <= 879) continue;
260
- switch (DD.eastAsianWidth(s)) {
261
- case "F":
262
- case "W":
263
- e$1 += 2;
264
- break;
265
- case "A":
266
- e$1 += F$1;
267
- break;
268
- default: e$1 += 1;
269
- }
270
- }
271
- return e$1;
272
- }
273
- const m = 10, L$1 = (t = 0) => (u$2) => `\x1B[${u$2 + t}m`, N = (t = 0) => (u$2) => `\x1B[${38 + t};5;${u$2}m`, I = (t = 0) => (u$2, F$1, e$1) => `\x1B[${38 + t};2;${u$2};${F$1};${e$1}m`, r = {
274
- modifier: {
275
- reset: [0, 0],
276
- bold: [1, 22],
277
- dim: [2, 22],
278
- italic: [3, 23],
279
- underline: [4, 24],
280
- overline: [53, 55],
281
- inverse: [7, 27],
282
- hidden: [8, 28],
283
- strikethrough: [9, 29]
284
- },
285
- color: {
286
- black: [30, 39],
287
- red: [31, 39],
288
- green: [32, 39],
289
- yellow: [33, 39],
290
- blue: [34, 39],
291
- magenta: [35, 39],
292
- cyan: [36, 39],
293
- white: [37, 39],
294
- blackBright: [90, 39],
295
- gray: [90, 39],
296
- grey: [90, 39],
297
- redBright: [91, 39],
298
- greenBright: [92, 39],
299
- yellowBright: [93, 39],
300
- blueBright: [94, 39],
301
- magentaBright: [95, 39],
302
- cyanBright: [96, 39],
303
- whiteBright: [97, 39]
304
- },
305
- bgColor: {
306
- bgBlack: [40, 49],
307
- bgRed: [41, 49],
308
- bgGreen: [42, 49],
309
- bgYellow: [43, 49],
310
- bgBlue: [44, 49],
311
- bgMagenta: [45, 49],
312
- bgCyan: [46, 49],
313
- bgWhite: [47, 49],
314
- bgBlackBright: [100, 49],
315
- bgGray: [100, 49],
316
- bgGrey: [100, 49],
317
- bgRedBright: [101, 49],
318
- bgGreenBright: [102, 49],
319
- bgYellowBright: [103, 49],
320
- bgBlueBright: [104, 49],
321
- bgMagentaBright: [105, 49],
322
- bgCyanBright: [106, 49],
323
- bgWhiteBright: [107, 49]
324
- }
325
- };
326
- Object.keys(r.modifier);
327
- const tD = Object.keys(r.color), eD = Object.keys(r.bgColor);
328
- [...tD, ...eD];
329
- function sD() {
330
- const t = /* @__PURE__ */ new Map();
331
- for (const [u$2, F$1] of Object.entries(r)) {
332
- for (const [e$1, s] of Object.entries(F$1)) r[e$1] = {
333
- open: `\x1B[${s[0]}m`,
334
- close: `\x1B[${s[1]}m`
335
- }, F$1[e$1] = r[e$1], t.set(s[0], s[1]);
336
- Object.defineProperty(r, u$2, {
337
- value: F$1,
338
- enumerable: !1
339
- });
340
- }
341
- return Object.defineProperty(r, "codes", {
342
- value: t,
343
- enumerable: !1
344
- }), r.color.close = "\x1B[39m", r.bgColor.close = "\x1B[49m", r.color.ansi = L$1(), r.color.ansi256 = N(), r.color.ansi16m = I(), r.bgColor.ansi = L$1(m), r.bgColor.ansi256 = N(m), r.bgColor.ansi16m = I(m), Object.defineProperties(r, {
345
- rgbToAnsi256: {
346
- value: (u$2, F$1, e$1) => u$2 === F$1 && F$1 === e$1 ? u$2 < 8 ? 16 : u$2 > 248 ? 231 : Math.round((u$2 - 8) / 247 * 24) + 232 : 16 + 36 * Math.round(u$2 / 255 * 5) + 6 * Math.round(F$1 / 255 * 5) + Math.round(e$1 / 255 * 5),
347
- enumerable: !1
348
- },
349
- hexToRgb: {
350
- value: (u$2) => {
351
- const F$1 = /[a-f\d]{6}|[a-f\d]{3}/i.exec(u$2.toString(16));
352
- if (!F$1) return [
353
- 0,
354
- 0,
355
- 0
356
- ];
357
- let [e$1] = F$1;
358
- e$1.length === 3 && (e$1 = [...e$1].map((i$1) => i$1 + i$1).join(""));
359
- const s = Number.parseInt(e$1, 16);
360
- return [
361
- s >> 16 & 255,
362
- s >> 8 & 255,
363
- s & 255
364
- ];
365
- },
366
- enumerable: !1
367
- },
368
- hexToAnsi256: {
369
- value: (u$2) => r.rgbToAnsi256(...r.hexToRgb(u$2)),
370
- enumerable: !1
371
- },
372
- ansi256ToAnsi: {
373
- value: (u$2) => {
374
- if (u$2 < 8) return 30 + u$2;
375
- if (u$2 < 16) return 90 + (u$2 - 8);
376
- let F$1, e$1, s;
377
- if (u$2 >= 232) F$1 = ((u$2 - 232) * 10 + 8) / 255, e$1 = F$1, s = F$1;
378
- else {
379
- u$2 -= 16;
380
- const C$1 = u$2 % 36;
381
- F$1 = Math.floor(u$2 / 36) / 5, e$1 = Math.floor(C$1 / 6) / 5, s = C$1 % 6 / 5;
382
- }
383
- const i$1 = Math.max(F$1, e$1, s) * 2;
384
- if (i$1 === 0) return 30;
385
- let D$1 = 30 + (Math.round(s) << 2 | Math.round(e$1) << 1 | Math.round(F$1));
386
- return i$1 === 2 && (D$1 += 60), D$1;
387
- },
388
- enumerable: !1
389
- },
390
- rgbToAnsi: {
391
- value: (u$2, F$1, e$1) => r.ansi256ToAnsi(r.rgbToAnsi256(u$2, F$1, e$1)),
392
- enumerable: !1
393
- },
394
- hexToAnsi: {
395
- value: (u$2) => r.ansi256ToAnsi(r.hexToAnsi256(u$2)),
396
- enumerable: !1
397
- }
398
- }), r;
399
- }
400
- const iD = sD(), v = new Set(["\x1B", "›"]), CD = 39, w$1 = "\x07", W$1 = "[", rD = "]", R = "m", y = `${rD}8;;`, V$1 = (t) => `${v.values().next().value}${W$1}${t}${R}`, z = (t) => `${v.values().next().value}${y}${t}${w$1}`, ED = (t) => t.split(" ").map((u$2) => A$1(u$2)), _$2 = (t, u$2, F$1) => {
401
- const e$1 = [...u$2];
402
- let s = !1, i$1 = !1, D$1 = A$1(T$1(t[t.length - 1]));
403
- for (const [C$1, o$2] of e$1.entries()) {
404
- const E = A$1(o$2);
405
- if (D$1 + E <= F$1 ? t[t.length - 1] += o$2 : (t.push(o$2), D$1 = 0), v.has(o$2) && (s = !0, i$1 = e$1.slice(C$1 + 1).join("").startsWith(y)), s) {
406
- i$1 ? o$2 === w$1 && (s = !1, i$1 = !1) : o$2 === R && (s = !1);
407
- continue;
408
- }
409
- D$1 += E, D$1 === F$1 && C$1 < e$1.length - 1 && (t.push(""), D$1 = 0);
410
- }
411
- !D$1 && t[t.length - 1].length > 0 && t.length > 1 && (t[t.length - 2] += t.pop());
412
- }, nD = (t) => {
413
- const u$2 = t.split(" ");
414
- let F$1 = u$2.length;
415
- for (; F$1 > 0 && !(A$1(u$2[F$1 - 1]) > 0);) F$1--;
416
- return F$1 === u$2.length ? t : u$2.slice(0, F$1).join(" ") + u$2.slice(F$1).join("");
417
- }, oD = (t, u$2, F$1 = {}) => {
418
- if (F$1.trim !== !1 && t.trim() === "") return "";
419
- let e$1 = "", s, i$1;
420
- const D$1 = ED(t);
421
- let C$1 = [""];
422
- for (const [E, a$1] of t.split(" ").entries()) {
423
- F$1.trim !== !1 && (C$1[C$1.length - 1] = C$1[C$1.length - 1].trimStart());
424
- let n$1 = A$1(C$1[C$1.length - 1]);
425
- if (E !== 0 && (n$1 >= u$2 && (F$1.wordWrap === !1 || F$1.trim === !1) && (C$1.push(""), n$1 = 0), (n$1 > 0 || F$1.trim === !1) && (C$1[C$1.length - 1] += " ", n$1++)), F$1.hard && D$1[E] > u$2) {
426
- const B$1 = u$2 - n$1, p$1 = 1 + Math.floor((D$1[E] - B$1 - 1) / u$2);
427
- Math.floor((D$1[E] - 1) / u$2) < p$1 && C$1.push(""), _$2(C$1, a$1, u$2);
428
- continue;
429
- }
430
- if (n$1 + D$1[E] > u$2 && n$1 > 0 && D$1[E] > 0) {
431
- if (F$1.wordWrap === !1 && n$1 < u$2) {
432
- _$2(C$1, a$1, u$2);
433
- continue;
434
- }
435
- C$1.push("");
436
- }
437
- if (n$1 + D$1[E] > u$2 && F$1.wordWrap === !1) {
438
- _$2(C$1, a$1, u$2);
439
- continue;
440
- }
441
- C$1[C$1.length - 1] += a$1;
442
- }
443
- F$1.trim !== !1 && (C$1 = C$1.map((E) => nD(E)));
444
- const o$2 = [...C$1.join(`
445
- `)];
446
- for (const [E, a$1] of o$2.entries()) {
447
- if (e$1 += a$1, v.has(a$1)) {
448
- const { groups: B$1 } = (/* @__PURE__ */ new RegExp(`(?:\\${W$1}(?<code>\\d+)m|\\${y}(?<uri>.*)${w$1})`)).exec(o$2.slice(E).join("")) || { groups: {} };
449
- if (B$1.code !== void 0) {
450
- const p$1 = Number.parseFloat(B$1.code);
451
- s = p$1 === CD ? void 0 : p$1;
452
- } else B$1.uri !== void 0 && (i$1 = B$1.uri.length === 0 ? void 0 : B$1.uri);
453
- }
454
- const n$1 = iD.codes.get(Number(s));
455
- o$2[E + 1] === `
456
- ` ? (i$1 && (e$1 += z("")), s && n$1 && (e$1 += V$1(n$1))) : a$1 === `
457
- ` && (s && n$1 && (e$1 += V$1(s)), i$1 && (e$1 += z(i$1)));
458
- }
459
- return e$1;
460
- };
461
- function G(t, u$2, F$1) {
462
- return String(t).normalize().replace(/\r\n/g, `
463
- `).split(`
464
- `).map((e$1) => oD(e$1, u$2, F$1)).join(`
465
- `);
466
- }
467
- const c$1 = {
468
- actions: new Set([
469
- "up",
470
- "down",
471
- "left",
472
- "right",
473
- "space",
474
- "enter",
475
- "cancel"
476
- ]),
477
- aliases: new Map([
478
- ["k", "up"],
479
- ["j", "down"],
480
- ["h", "left"],
481
- ["l", "right"],
482
- ["", "cancel"],
483
- ["escape", "cancel"]
484
- ])
485
- };
486
- function k$1(t, u$2) {
487
- if (typeof t == "string") return c$1.aliases.get(t) === u$2;
488
- for (const F$1 of t) if (F$1 !== void 0 && k$1(F$1, u$2)) return !0;
489
- return !1;
490
- }
491
- function lD(t, u$2) {
492
- if (t === u$2) return;
493
- const F$1 = t.split(`
494
- `), e$1 = u$2.split(`
495
- `), s = [];
496
- for (let i$1 = 0; i$1 < Math.max(F$1.length, e$1.length); i$1++) F$1[i$1] !== e$1[i$1] && s.push(i$1);
497
- return s;
498
- }
499
- const xD = globalThis.process.platform.startsWith("win"), S$1 = Symbol("clack:cancel");
500
- function BD(t) {
501
- return t === S$1;
502
- }
503
- function d$1(t, u$2) {
504
- const F$1 = t;
505
- F$1.isTTY && F$1.setRawMode(u$2);
506
- }
507
- function cD({ input: t = node_process.stdin, output: u$2 = node_process.stdout, overwrite: F$1 = !0, hideCursor: e$1 = !0 } = {}) {
508
- const s = node_readline.createInterface({
509
- input: t,
510
- output: u$2,
511
- prompt: "",
512
- tabSize: 1
513
- });
514
- node_readline.emitKeypressEvents(t, s), t.isTTY && t.setRawMode(!0);
515
- const i$1 = (D$1, { name: C$1, sequence: o$2 }) => {
516
- if (k$1([
517
- String(D$1),
518
- C$1,
519
- o$2
520
- ], "cancel")) {
521
- e$1 && u$2.write(import_src$1.cursor.show), process.exit(0);
522
- return;
523
- }
524
- if (!F$1) return;
525
- const a$1 = C$1 === "return" ? 0 : -1, n$1 = C$1 === "return" ? -1 : 0;
526
- node_readline.moveCursor(u$2, a$1, n$1, () => {
527
- node_readline.clearLine(u$2, 1, () => {
528
- t.once("keypress", i$1);
529
- });
530
- });
531
- };
532
- return e$1 && u$2.write(import_src$1.cursor.hide), t.once("keypress", i$1), () => {
533
- t.off("keypress", i$1), e$1 && u$2.write(import_src$1.cursor.show), t.isTTY && !xD && t.setRawMode(!1), s.terminal = !1, s.close();
534
- };
535
- }
536
- var AD = Object.defineProperty, pD = (t, u$2, F$1) => u$2 in t ? AD(t, u$2, {
537
- enumerable: !0,
538
- configurable: !0,
539
- writable: !0,
540
- value: F$1
541
- }) : t[u$2] = F$1, h$1 = (t, u$2, F$1) => (pD(t, typeof u$2 != "symbol" ? u$2 + "" : u$2, F$1), F$1);
542
- var x = class {
543
- constructor(u$2, F$1 = !0) {
544
- h$1(this, "input"), h$1(this, "output"), h$1(this, "_abortSignal"), h$1(this, "rl"), h$1(this, "opts"), h$1(this, "_render"), h$1(this, "_track", !1), h$1(this, "_prevFrame", ""), h$1(this, "_subscribers", /* @__PURE__ */ new Map()), h$1(this, "_cursor", 0), h$1(this, "state", "initial"), h$1(this, "error", ""), h$1(this, "value");
545
- const { input: e$1 = node_process.stdin, output: s = node_process.stdout, render: i$1, signal: D$1,...C$1 } = u$2;
546
- this.opts = C$1, this.onKeypress = this.onKeypress.bind(this), this.close = this.close.bind(this), this.render = this.render.bind(this), this._render = i$1.bind(this), this._track = F$1, this._abortSignal = D$1, this.input = e$1, this.output = s;
547
- }
548
- unsubscribe() {
549
- this._subscribers.clear();
550
- }
551
- setSubscriber(u$2, F$1) {
552
- const e$1 = this._subscribers.get(u$2) ?? [];
553
- e$1.push(F$1), this._subscribers.set(u$2, e$1);
554
- }
555
- on(u$2, F$1) {
556
- this.setSubscriber(u$2, { cb: F$1 });
557
- }
558
- once(u$2, F$1) {
559
- this.setSubscriber(u$2, {
560
- cb: F$1,
561
- once: !0
562
- });
563
- }
564
- emit(u$2, ...F$1) {
565
- const e$1 = this._subscribers.get(u$2) ?? [], s = [];
566
- for (const i$1 of e$1) i$1.cb(...F$1), i$1.once && s.push(() => e$1.splice(e$1.indexOf(i$1), 1));
567
- for (const i$1 of s) i$1();
568
- }
569
- prompt() {
570
- return new Promise((u$2, F$1) => {
571
- if (this._abortSignal) {
572
- if (this._abortSignal.aborted) return this.state = "cancel", this.close(), u$2(S$1);
573
- this._abortSignal.addEventListener("abort", () => {
574
- this.state = "cancel", this.close();
575
- }, { once: !0 });
576
- }
577
- const e$1 = new node_tty.WriteStream(0);
578
- e$1._write = (s, i$1, D$1) => {
579
- this._track && (this.value = this.rl?.line.replace(/\t/g, ""), this._cursor = this.rl?.cursor ?? 0, this.emit("value", this.value)), D$1();
580
- }, this.input.pipe(e$1), this.rl = node_readline.default.createInterface({
581
- input: this.input,
582
- output: e$1,
583
- tabSize: 2,
584
- prompt: "",
585
- escapeCodeTimeout: 50
586
- }), node_readline.default.emitKeypressEvents(this.input, this.rl), this.rl.prompt(), this.opts.initialValue !== void 0 && this._track && this.rl.write(this.opts.initialValue), this.input.on("keypress", this.onKeypress), d$1(this.input, !0), this.output.on("resize", this.render), this.render(), this.once("submit", () => {
587
- this.output.write(import_src$1.cursor.show), this.output.off("resize", this.render), d$1(this.input, !1), u$2(this.value);
588
- }), this.once("cancel", () => {
589
- this.output.write(import_src$1.cursor.show), this.output.off("resize", this.render), d$1(this.input, !1), u$2(S$1);
590
- });
591
- });
592
- }
593
- onKeypress(u$2, F$1) {
594
- if (this.state === "error" && (this.state = "active"), F$1?.name && (!this._track && c$1.aliases.has(F$1.name) && this.emit("cursor", c$1.aliases.get(F$1.name)), c$1.actions.has(F$1.name) && this.emit("cursor", F$1.name)), u$2 && (u$2.toLowerCase() === "y" || u$2.toLowerCase() === "n") && this.emit("confirm", u$2.toLowerCase() === "y"), u$2 === " " && this.opts.placeholder && (this.value || (this.rl?.write(this.opts.placeholder), this.emit("value", this.opts.placeholder))), u$2 && this.emit("key", u$2.toLowerCase()), F$1?.name === "return") {
595
- if (this.opts.validate) {
596
- const e$1 = this.opts.validate(this.value);
597
- e$1 && (this.error = e$1 instanceof Error ? e$1.message : e$1, this.state = "error", this.rl?.write(this.value));
598
- }
599
- this.state !== "error" && (this.state = "submit");
600
- }
601
- k$1([
602
- u$2,
603
- F$1?.name,
604
- F$1?.sequence
605
- ], "cancel") && (this.state = "cancel"), (this.state === "submit" || this.state === "cancel") && this.emit("finalize"), this.render(), (this.state === "submit" || this.state === "cancel") && this.close();
606
- }
607
- close() {
608
- this.input.unpipe(), this.input.removeListener("keypress", this.onKeypress), this.output.write(`
609
- `), d$1(this.input, !1), this.rl?.close(), this.rl = void 0, this.emit(`${this.state}`, this.value), this.unsubscribe();
610
- }
611
- restoreCursor() {
612
- const u$2 = G(this._prevFrame, process.stdout.columns, { hard: !0 }).split(`
613
- `).length - 1;
614
- this.output.write(import_src$1.cursor.move(-999, u$2 * -1));
615
- }
616
- render() {
617
- const u$2 = G(this._render(this) ?? "", process.stdout.columns, { hard: !0 });
618
- if (u$2 !== this._prevFrame) {
619
- if (this.state === "initial") this.output.write(import_src$1.cursor.hide);
620
- else {
621
- const F$1 = lD(this._prevFrame, u$2);
622
- if (this.restoreCursor(), F$1 && F$1?.length === 1) {
623
- const e$1 = F$1[0];
624
- this.output.write(import_src$1.cursor.move(0, e$1)), this.output.write(import_src$1.erase.lines(1));
625
- const s = u$2.split(`
626
- `);
627
- this.output.write(s[e$1]), this._prevFrame = u$2, this.output.write(import_src$1.cursor.move(0, s.length - e$1 - 1));
628
- return;
629
- }
630
- if (F$1 && F$1?.length > 1) {
631
- const e$1 = F$1[0];
632
- this.output.write(import_src$1.cursor.move(0, e$1)), this.output.write(import_src$1.erase.down());
633
- const s = u$2.split(`
634
- `).slice(e$1);
635
- this.output.write(s.join(`
636
- `)), this._prevFrame = u$2;
637
- return;
638
- }
639
- this.output.write(import_src$1.erase.down());
640
- }
641
- this.output.write(u$2), this.state === "initial" && (this.state = "active"), this._prevFrame = u$2;
642
- }
643
- }
644
- };
645
- var fD = class extends x {
646
- get cursor() {
647
- return this.value ? 0 : 1;
648
- }
649
- get _value() {
650
- return this.cursor === 0;
651
- }
652
- constructor(u$2) {
653
- super(u$2, !1), this.value = !!u$2.initialValue, this.on("value", () => {
654
- this.value = this._value;
655
- }), this.on("confirm", (F$1) => {
656
- this.output.write(import_src$1.cursor.move(0, -1)), this.value = F$1, this.state = "submit", this.close();
657
- }), this.on("cursor", () => {
658
- this.value = !this.value;
659
- });
660
- }
661
- };
662
- var gD = Object.defineProperty, vD = (t, u$2, F$1) => u$2 in t ? gD(t, u$2, {
663
- enumerable: !0,
664
- configurable: !0,
665
- writable: !0,
666
- value: F$1
667
- }) : t[u$2] = F$1, K$1 = (t, u$2, F$1) => (vD(t, typeof u$2 != "symbol" ? u$2 + "" : u$2, F$1), F$1);
668
- let dD = class extends x {
669
- constructor(u$2) {
670
- super(u$2, !1), K$1(this, "options"), K$1(this, "cursor", 0);
671
- const { options: F$1 } = u$2;
672
- this.options = Object.entries(F$1).flatMap(([e$1, s]) => [{
673
- value: e$1,
674
- group: !0,
675
- label: e$1
676
- }, ...s.map((i$1) => ({
677
- ...i$1,
678
- group: e$1
679
- }))]), this.value = [...u$2.initialValues ?? []], this.cursor = Math.max(this.options.findIndex(({ value: e$1 }) => e$1 === u$2.cursorAt), 0), this.on("cursor", (e$1) => {
680
- switch (e$1) {
681
- case "left":
682
- case "up":
683
- this.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1;
684
- break;
685
- case "down":
686
- case "right":
687
- this.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1;
688
- break;
689
- case "space":
690
- this.toggleValue();
691
- break;
692
- }
693
- });
694
- }
695
- getGroupItems(u$2) {
696
- return this.options.filter((F$1) => F$1.group === u$2);
697
- }
698
- isGroupSelected(u$2) {
699
- return this.getGroupItems(u$2).every((F$1) => this.value.includes(F$1.value));
700
- }
701
- toggleValue() {
702
- const u$2 = this.options[this.cursor];
703
- if (u$2.group === !0) {
704
- const F$1 = u$2.value, e$1 = this.getGroupItems(F$1);
705
- this.isGroupSelected(F$1) ? this.value = this.value.filter((s) => e$1.findIndex((i$1) => i$1.value === s) === -1) : this.value = [...this.value, ...e$1.map((s) => s.value)], this.value = Array.from(new Set(this.value));
706
- } else this.value = this.value.includes(u$2.value) ? this.value.filter((e$1) => e$1 !== u$2.value) : [...this.value, u$2.value];
707
- }
708
- };
709
- var bD = Object.defineProperty, mD = (t, u$2, F$1) => u$2 in t ? bD(t, u$2, {
710
- enumerable: !0,
711
- configurable: !0,
712
- writable: !0,
713
- value: F$1
714
- }) : t[u$2] = F$1, Y$1 = (t, u$2, F$1) => (mD(t, typeof u$2 != "symbol" ? u$2 + "" : u$2, F$1), F$1);
715
- let wD = class extends x {
716
- constructor(u$2) {
717
- super(u$2, !1), Y$1(this, "options"), Y$1(this, "cursor", 0), this.options = u$2.options, this.value = [...u$2.initialValues ?? []], this.cursor = Math.max(this.options.findIndex(({ value: F$1 }) => F$1 === u$2.cursorAt), 0), this.on("key", (F$1) => {
718
- F$1 === "a" && this.toggleAll();
719
- }), this.on("cursor", (F$1) => {
720
- switch (F$1) {
721
- case "left":
722
- case "up":
723
- this.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1;
724
- break;
725
- case "down":
726
- case "right":
727
- this.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1;
728
- break;
729
- case "space":
730
- this.toggleValue();
731
- break;
732
- }
733
- });
734
- }
735
- get _value() {
736
- return this.options[this.cursor].value;
737
- }
738
- toggleAll() {
739
- this.value = this.value.length === this.options.length ? [] : this.options.map((F$1) => F$1.value);
740
- }
741
- toggleValue() {
742
- this.value = this.value.includes(this._value) ? this.value.filter((F$1) => F$1 !== this._value) : [...this.value, this._value];
743
- }
744
- };
745
- var yD = Object.defineProperty, _D = (t, u$2, F$1) => u$2 in t ? yD(t, u$2, {
746
- enumerable: !0,
747
- configurable: !0,
748
- writable: !0,
749
- value: F$1
750
- }) : t[u$2] = F$1, Z = (t, u$2, F$1) => (_D(t, typeof u$2 != "symbol" ? u$2 + "" : u$2, F$1), F$1);
751
- var kD = class extends x {
752
- constructor({ mask: u$2,...F$1 }) {
753
- super(F$1), Z(this, "valueWithCursor", ""), Z(this, "_mask", "•"), this._mask = u$2 ?? "•", this.on("finalize", () => {
754
- this.valueWithCursor = this.masked;
755
- }), this.on("value", () => {
756
- if (this.cursor >= this.value.length) this.valueWithCursor = `${this.masked}${import_picocolors$1.default.inverse(import_picocolors$1.default.hidden("_"))}`;
757
- else {
758
- const e$1 = this.masked.slice(0, this.cursor), s = this.masked.slice(this.cursor);
759
- this.valueWithCursor = `${e$1}${import_picocolors$1.default.inverse(s[0])}${s.slice(1)}`;
760
- }
761
- });
762
- }
763
- get cursor() {
764
- return this._cursor;
765
- }
766
- get masked() {
767
- return this.value.replaceAll(/./g, this._mask);
768
- }
769
- };
770
- var SD = Object.defineProperty, $D = (t, u$2, F$1) => u$2 in t ? SD(t, u$2, {
771
- enumerable: !0,
772
- configurable: !0,
773
- writable: !0,
774
- value: F$1
775
- }) : t[u$2] = F$1, q$1 = (t, u$2, F$1) => ($D(t, typeof u$2 != "symbol" ? u$2 + "" : u$2, F$1), F$1);
776
- var jD = class extends x {
777
- constructor(u$2) {
778
- super(u$2, !1), q$1(this, "options"), q$1(this, "cursor", 0), this.options = u$2.options, this.cursor = this.options.findIndex(({ value: F$1 }) => F$1 === u$2.initialValue), this.cursor === -1 && (this.cursor = 0), this.changeValue(), this.on("cursor", (F$1) => {
779
- switch (F$1) {
780
- case "left":
781
- case "up":
782
- this.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1;
783
- break;
784
- case "down":
785
- case "right":
786
- this.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1;
787
- break;
788
- }
789
- this.changeValue();
790
- });
791
- }
792
- get _value() {
793
- return this.options[this.cursor];
794
- }
795
- changeValue() {
796
- this.value = this._value.value;
797
- }
798
- };
799
- var MD = Object.defineProperty, TD = (t, u$2, F$1) => u$2 in t ? MD(t, u$2, {
800
- enumerable: !0,
801
- configurable: !0,
802
- writable: !0,
803
- value: F$1
804
- }) : t[u$2] = F$1, H = (t, u$2, F$1) => (TD(t, typeof u$2 != "symbol" ? u$2 + "" : u$2, F$1), F$1);
805
- var OD = class extends x {
806
- constructor(u$2) {
807
- super(u$2, !1), H(this, "options"), H(this, "cursor", 0), this.options = u$2.options;
808
- const F$1 = this.options.map(({ value: [e$1] }) => e$1?.toLowerCase());
809
- this.cursor = Math.max(F$1.indexOf(u$2.initialValue), 0), this.on("key", (e$1) => {
810
- if (!F$1.includes(e$1)) return;
811
- const s = this.options.find(({ value: [i$1] }) => i$1?.toLowerCase() === e$1);
812
- s && (this.value = s.value, this.state = "submit", this.emit("submit"));
813
- });
814
- }
815
- };
816
- var PD = class extends x {
817
- get valueWithCursor() {
818
- if (this.state === "submit") return this.value;
819
- if (this.cursor >= this.value.length) return `${this.value}\u2588`;
820
- const u$2 = this.value.slice(0, this.cursor), [F$1, ...e$1] = this.value.slice(this.cursor);
821
- return `${u$2}${import_picocolors$1.default.inverse(F$1)}${e$1.join("")}`;
822
- }
823
- get cursor() {
824
- return this._cursor;
825
- }
826
- constructor(u$2) {
827
- super(u$2), this.on("finalize", () => {
828
- this.value || (this.value = u$2.defaultValue);
829
- });
830
- }
831
- };
832
-
833
- //#endregion
834
- //#region ../../node_modules/.pnpm/@clack+prompts@0.10.0/node_modules/@clack/prompts/dist/index.mjs
835
- var import_picocolors = /* @__PURE__ */ __toESM(require_picocolors(), 1);
836
- var import_src = /* @__PURE__ */ __toESM(require_src(), 1);
837
- function ce() {
838
- return node_process.default.platform !== "win32" ? node_process.default.env.TERM !== "linux" : !!node_process.default.env.CI || !!node_process.default.env.WT_SESSION || !!node_process.default.env.TERMINUS_SUBLIME || node_process.default.env.ConEmuTask === "{cmd::Cmder}" || node_process.default.env.TERM_PROGRAM === "Terminus-Sublime" || node_process.default.env.TERM_PROGRAM === "vscode" || node_process.default.env.TERM === "xterm-256color" || node_process.default.env.TERM === "alacritty" || node_process.default.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
839
- }
840
- const V = ce(), u$1 = (t, n$1) => V ? t : n$1, le = u$1("◆", "*"), L = u$1("■", "x"), W = u$1("▲", "x"), C = u$1("◇", "o"), ue = u$1("┌", "T"), o$1 = u$1("│", "|"), d = u$1("└", "—"), k = u$1("●", ">"), P = u$1("○", " "), A = u$1("◻", "[•]"), T = u$1("◼", "[+]"), F = u$1("◻", "[ ]"), $e = u$1("▪", "•"), _$1 = u$1("─", "-"), me = u$1("╮", "+"), de = u$1("├", "+"), pe = u$1("╯", "+"), q = u$1("●", "•"), D = u$1("◆", "*"), U = u$1("▲", "!"), K = u$1("■", "x"), w = (t) => {
841
- switch (t) {
842
- case "initial":
843
- case "active": return import_picocolors.default.cyan(le);
844
- case "cancel": return import_picocolors.default.red(L);
845
- case "error": return import_picocolors.default.yellow(W);
846
- case "submit": return import_picocolors.default.green(C);
847
- }
848
- }, B = (t) => {
849
- const { cursor: n$1, options: s, style: r$1 } = t, i$1 = t.maxItems ?? Number.POSITIVE_INFINITY, a$1 = Math.max(process.stdout.rows - 4, 0), c$2 = Math.min(a$1, Math.max(i$1, 5));
850
- let l$1 = 0;
851
- n$1 >= l$1 + c$2 - 3 ? l$1 = Math.max(Math.min(n$1 - c$2 + 3, s.length - c$2), 0) : n$1 < l$1 + 2 && (l$1 = Math.max(n$1 - 2, 0));
852
- const $$2 = c$2 < s.length && l$1 > 0, p$1 = c$2 < s.length && l$1 + c$2 < s.length;
853
- return s.slice(l$1, l$1 + c$2).map((M$1, v$1, x$1) => {
854
- const j$1 = v$1 === 0 && $$2, E = v$1 === x$1.length - 1 && p$1;
855
- return j$1 || E ? import_picocolors.default.dim("...") : r$1(M$1, v$1 + l$1 === n$1);
856
- });
857
- }, he = (t) => new PD({
858
- validate: t.validate,
859
- placeholder: t.placeholder,
860
- defaultValue: t.defaultValue,
861
- initialValue: t.initialValue,
862
- render() {
863
- const n$1 = `${import_picocolors.default.gray(o$1)}
864
- ${w(this.state)} ${t.message}
865
- `, s = t.placeholder ? import_picocolors.default.inverse(t.placeholder[0]) + import_picocolors.default.dim(t.placeholder.slice(1)) : import_picocolors.default.inverse(import_picocolors.default.hidden("_")), r$1 = this.value ? this.valueWithCursor : s;
866
- switch (this.state) {
867
- case "error": return `${n$1.trim()}
868
- ${import_picocolors.default.yellow(o$1)} ${r$1}
869
- ${import_picocolors.default.yellow(d)} ${import_picocolors.default.yellow(this.error)}
870
- `;
871
- case "submit": return `${n$1}${import_picocolors.default.gray(o$1)} ${import_picocolors.default.dim(this.value || t.placeholder)}`;
872
- case "cancel": return `${n$1}${import_picocolors.default.gray(o$1)} ${import_picocolors.default.strikethrough(import_picocolors.default.dim(this.value ?? ""))}${this.value?.trim() ? `
873
- ${import_picocolors.default.gray(o$1)}` : ""}`;
874
- default: return `${n$1}${import_picocolors.default.cyan(o$1)} ${r$1}
875
- ${import_picocolors.default.cyan(d)}
876
- `;
877
- }
878
- }
879
- }).prompt(), ge = (t) => new kD({
880
- validate: t.validate,
881
- mask: t.mask ?? $e,
882
- render() {
883
- const n$1 = `${import_picocolors.default.gray(o$1)}
884
- ${w(this.state)} ${t.message}
885
- `, s = this.valueWithCursor, r$1 = this.masked;
886
- switch (this.state) {
887
- case "error": return `${n$1.trim()}
888
- ${import_picocolors.default.yellow(o$1)} ${r$1}
889
- ${import_picocolors.default.yellow(d)} ${import_picocolors.default.yellow(this.error)}
890
- `;
891
- case "submit": return `${n$1}${import_picocolors.default.gray(o$1)} ${import_picocolors.default.dim(r$1)}`;
892
- case "cancel": return `${n$1}${import_picocolors.default.gray(o$1)} ${import_picocolors.default.strikethrough(import_picocolors.default.dim(r$1 ?? ""))}${r$1 ? `
893
- ${import_picocolors.default.gray(o$1)}` : ""}`;
894
- default: return `${n$1}${import_picocolors.default.cyan(o$1)} ${s}
895
- ${import_picocolors.default.cyan(d)}
896
- `;
897
- }
898
- }
899
- }).prompt(), ye = (t) => {
900
- const n$1 = t.active ?? "Yes", s = t.inactive ?? "No";
901
- return new fD({
902
- active: n$1,
903
- inactive: s,
904
- initialValue: t.initialValue ?? !0,
905
- render() {
906
- const r$1 = `${import_picocolors.default.gray(o$1)}
907
- ${w(this.state)} ${t.message}
908
- `, i$1 = this.value ? n$1 : s;
909
- switch (this.state) {
910
- case "submit": return `${r$1}${import_picocolors.default.gray(o$1)} ${import_picocolors.default.dim(i$1)}`;
911
- case "cancel": return `${r$1}${import_picocolors.default.gray(o$1)} ${import_picocolors.default.strikethrough(import_picocolors.default.dim(i$1))}
912
- ${import_picocolors.default.gray(o$1)}`;
913
- default: return `${r$1}${import_picocolors.default.cyan(o$1)} ${this.value ? `${import_picocolors.default.green(k)} ${n$1}` : `${import_picocolors.default.dim(P)} ${import_picocolors.default.dim(n$1)}`} ${import_picocolors.default.dim("/")} ${this.value ? `${import_picocolors.default.dim(P)} ${import_picocolors.default.dim(s)}` : `${import_picocolors.default.green(k)} ${s}`}
914
- ${import_picocolors.default.cyan(d)}
915
- `;
916
- }
917
- }
918
- }).prompt();
919
- }, ve = (t) => {
920
- const n$1 = (s, r$1) => {
921
- const i$1 = s.label ?? String(s.value);
922
- switch (r$1) {
923
- case "selected": return `${import_picocolors.default.dim(i$1)}`;
924
- case "active": return `${import_picocolors.default.green(k)} ${i$1} ${s.hint ? import_picocolors.default.dim(`(${s.hint})`) : ""}`;
925
- case "cancelled": return `${import_picocolors.default.strikethrough(import_picocolors.default.dim(i$1))}`;
926
- default: return `${import_picocolors.default.dim(P)} ${import_picocolors.default.dim(i$1)}`;
927
- }
928
- };
929
- return new jD({
930
- options: t.options,
931
- initialValue: t.initialValue,
932
- render() {
933
- const s = `${import_picocolors.default.gray(o$1)}
934
- ${w(this.state)} ${t.message}
935
- `;
936
- switch (this.state) {
937
- case "submit": return `${s}${import_picocolors.default.gray(o$1)} ${n$1(this.options[this.cursor], "selected")}`;
938
- case "cancel": return `${s}${import_picocolors.default.gray(o$1)} ${n$1(this.options[this.cursor], "cancelled")}
939
- ${import_picocolors.default.gray(o$1)}`;
940
- default: return `${s}${import_picocolors.default.cyan(o$1)} ${B({
941
- cursor: this.cursor,
942
- options: this.options,
943
- maxItems: t.maxItems,
944
- style: (r$1, i$1) => n$1(r$1, i$1 ? "active" : "inactive")
945
- }).join(`
946
- ${import_picocolors.default.cyan(o$1)} `)}
947
- ${import_picocolors.default.cyan(d)}
948
- `;
949
- }
950
- }
951
- }).prompt();
952
- }, we = (t) => {
953
- const n$1 = (s, r$1 = "inactive") => {
954
- const i$1 = s.label ?? String(s.value);
955
- return r$1 === "selected" ? `${import_picocolors.default.dim(i$1)}` : r$1 === "cancelled" ? `${import_picocolors.default.strikethrough(import_picocolors.default.dim(i$1))}` : r$1 === "active" ? `${import_picocolors.default.bgCyan(import_picocolors.default.gray(` ${s.value} `))} ${i$1} ${s.hint ? import_picocolors.default.dim(`(${s.hint})`) : ""}` : `${import_picocolors.default.gray(import_picocolors.default.bgWhite(import_picocolors.default.inverse(` ${s.value} `)))} ${i$1} ${s.hint ? import_picocolors.default.dim(`(${s.hint})`) : ""}`;
956
- };
957
- return new OD({
958
- options: t.options,
959
- initialValue: t.initialValue,
960
- render() {
961
- const s = `${import_picocolors.default.gray(o$1)}
962
- ${w(this.state)} ${t.message}
963
- `;
964
- switch (this.state) {
965
- case "submit": return `${s}${import_picocolors.default.gray(o$1)} ${n$1(this.options.find((r$1) => r$1.value === this.value) ?? t.options[0], "selected")}`;
966
- case "cancel": return `${s}${import_picocolors.default.gray(o$1)} ${n$1(this.options[0], "cancelled")}
967
- ${import_picocolors.default.gray(o$1)}`;
968
- default: return `${s}${import_picocolors.default.cyan(o$1)} ${this.options.map((r$1, i$1) => n$1(r$1, i$1 === this.cursor ? "active" : "inactive")).join(`
969
- ${import_picocolors.default.cyan(o$1)} `)}
970
- ${import_picocolors.default.cyan(d)}
971
- `;
972
- }
973
- }
974
- }).prompt();
975
- }, fe = (t) => {
976
- const n$1 = (s, r$1) => {
977
- const i$1 = s.label ?? String(s.value);
978
- return r$1 === "active" ? `${import_picocolors.default.cyan(A)} ${i$1} ${s.hint ? import_picocolors.default.dim(`(${s.hint})`) : ""}` : r$1 === "selected" ? `${import_picocolors.default.green(T)} ${import_picocolors.default.dim(i$1)}` : r$1 === "cancelled" ? `${import_picocolors.default.strikethrough(import_picocolors.default.dim(i$1))}` : r$1 === "active-selected" ? `${import_picocolors.default.green(T)} ${i$1} ${s.hint ? import_picocolors.default.dim(`(${s.hint})`) : ""}` : r$1 === "submitted" ? `${import_picocolors.default.dim(i$1)}` : `${import_picocolors.default.dim(F)} ${import_picocolors.default.dim(i$1)}`;
979
- };
980
- return new wD({
981
- options: t.options,
982
- initialValues: t.initialValues,
983
- required: t.required ?? !0,
984
- cursorAt: t.cursorAt,
985
- validate(s) {
986
- if (this.required && s.length === 0) return `Please select at least one option.
987
- ${import_picocolors.default.reset(import_picocolors.default.dim(`Press ${import_picocolors.default.gray(import_picocolors.default.bgWhite(import_picocolors.default.inverse(" space ")))} to select, ${import_picocolors.default.gray(import_picocolors.default.bgWhite(import_picocolors.default.inverse(" enter ")))} to submit`))}`;
988
- },
989
- render() {
990
- const s = `${import_picocolors.default.gray(o$1)}
991
- ${w(this.state)} ${t.message}
992
- `, r$1 = (i$1, a$1) => {
993
- const c$2 = this.value.includes(i$1.value);
994
- return a$1 && c$2 ? n$1(i$1, "active-selected") : c$2 ? n$1(i$1, "selected") : n$1(i$1, a$1 ? "active" : "inactive");
995
- };
996
- switch (this.state) {
997
- case "submit": return `${s}${import_picocolors.default.gray(o$1)} ${this.options.filter(({ value: i$1 }) => this.value.includes(i$1)).map((i$1) => n$1(i$1, "submitted")).join(import_picocolors.default.dim(", ")) || import_picocolors.default.dim("none")}`;
998
- case "cancel": {
999
- const i$1 = this.options.filter(({ value: a$1 }) => this.value.includes(a$1)).map((a$1) => n$1(a$1, "cancelled")).join(import_picocolors.default.dim(", "));
1000
- return `${s}${import_picocolors.default.gray(o$1)} ${i$1.trim() ? `${i$1}
1001
- ${import_picocolors.default.gray(o$1)}` : ""}`;
1002
- }
1003
- case "error": {
1004
- const i$1 = this.error.split(`
1005
- `).map((a$1, c$2) => c$2 === 0 ? `${import_picocolors.default.yellow(d)} ${import_picocolors.default.yellow(a$1)}` : ` ${a$1}`).join(`
1006
- `);
1007
- return `${s + import_picocolors.default.yellow(o$1)} ${B({
1008
- options: this.options,
1009
- cursor: this.cursor,
1010
- maxItems: t.maxItems,
1011
- style: r$1
1012
- }).join(`
1013
- ${import_picocolors.default.yellow(o$1)} `)}
1014
- ${i$1}
1015
- `;
1016
- }
1017
- default: return `${s}${import_picocolors.default.cyan(o$1)} ${B({
1018
- options: this.options,
1019
- cursor: this.cursor,
1020
- maxItems: t.maxItems,
1021
- style: r$1
1022
- }).join(`
1023
- ${import_picocolors.default.cyan(o$1)} `)}
1024
- ${import_picocolors.default.cyan(d)}
1025
- `;
1026
- }
1027
- }
1028
- }).prompt();
1029
- }, be = (t) => {
1030
- const n$1 = (s, r$1, i$1 = []) => {
1031
- const a$1 = s.label ?? String(s.value), c$2 = typeof s.group == "string", l$1 = c$2 && (i$1[i$1.indexOf(s) + 1] ?? { group: !0 }), $$2 = c$2 && l$1.group === !0, p$1 = c$2 ? `${$$2 ? d : o$1} ` : "";
1032
- return r$1 === "active" ? `${import_picocolors.default.dim(p$1)}${import_picocolors.default.cyan(A)} ${a$1} ${s.hint ? import_picocolors.default.dim(`(${s.hint})`) : ""}` : r$1 === "group-active" ? `${p$1}${import_picocolors.default.cyan(A)} ${import_picocolors.default.dim(a$1)}` : r$1 === "group-active-selected" ? `${p$1}${import_picocolors.default.green(T)} ${import_picocolors.default.dim(a$1)}` : r$1 === "selected" ? `${import_picocolors.default.dim(p$1)}${import_picocolors.default.green(T)} ${import_picocolors.default.dim(a$1)}` : r$1 === "cancelled" ? `${import_picocolors.default.strikethrough(import_picocolors.default.dim(a$1))}` : r$1 === "active-selected" ? `${import_picocolors.default.dim(p$1)}${import_picocolors.default.green(T)} ${a$1} ${s.hint ? import_picocolors.default.dim(`(${s.hint})`) : ""}` : r$1 === "submitted" ? `${import_picocolors.default.dim(a$1)}` : `${import_picocolors.default.dim(p$1)}${import_picocolors.default.dim(F)} ${import_picocolors.default.dim(a$1)}`;
1033
- };
1034
- return new dD({
1035
- options: t.options,
1036
- initialValues: t.initialValues,
1037
- required: t.required ?? !0,
1038
- cursorAt: t.cursorAt,
1039
- validate(s) {
1040
- if (this.required && s.length === 0) return `Please select at least one option.
1041
- ${import_picocolors.default.reset(import_picocolors.default.dim(`Press ${import_picocolors.default.gray(import_picocolors.default.bgWhite(import_picocolors.default.inverse(" space ")))} to select, ${import_picocolors.default.gray(import_picocolors.default.bgWhite(import_picocolors.default.inverse(" enter ")))} to submit`))}`;
1042
- },
1043
- render() {
1044
- const s = `${import_picocolors.default.gray(o$1)}
1045
- ${w(this.state)} ${t.message}
1046
- `;
1047
- switch (this.state) {
1048
- case "submit": return `${s}${import_picocolors.default.gray(o$1)} ${this.options.filter(({ value: r$1 }) => this.value.includes(r$1)).map((r$1) => n$1(r$1, "submitted")).join(import_picocolors.default.dim(", "))}`;
1049
- case "cancel": {
1050
- const r$1 = this.options.filter(({ value: i$1 }) => this.value.includes(i$1)).map((i$1) => n$1(i$1, "cancelled")).join(import_picocolors.default.dim(", "));
1051
- return `${s}${import_picocolors.default.gray(o$1)} ${r$1.trim() ? `${r$1}
1052
- ${import_picocolors.default.gray(o$1)}` : ""}`;
1053
- }
1054
- case "error": {
1055
- const r$1 = this.error.split(`
1056
- `).map((i$1, a$1) => a$1 === 0 ? `${import_picocolors.default.yellow(d)} ${import_picocolors.default.yellow(i$1)}` : ` ${i$1}`).join(`
1057
- `);
1058
- return `${s}${import_picocolors.default.yellow(o$1)} ${this.options.map((i$1, a$1, c$2) => {
1059
- const l$1 = this.value.includes(i$1.value) || i$1.group === !0 && this.isGroupSelected(`${i$1.value}`), $$2 = a$1 === this.cursor;
1060
- return !$$2 && typeof i$1.group == "string" && this.options[this.cursor].value === i$1.group ? n$1(i$1, l$1 ? "group-active-selected" : "group-active", c$2) : $$2 && l$1 ? n$1(i$1, "active-selected", c$2) : l$1 ? n$1(i$1, "selected", c$2) : n$1(i$1, $$2 ? "active" : "inactive", c$2);
1061
- }).join(`
1062
- ${import_picocolors.default.yellow(o$1)} `)}
1063
- ${r$1}
1064
- `;
1065
- }
1066
- default: return `${s}${import_picocolors.default.cyan(o$1)} ${this.options.map((r$1, i$1, a$1) => {
1067
- const c$2 = this.value.includes(r$1.value) || r$1.group === !0 && this.isGroupSelected(`${r$1.value}`), l$1 = i$1 === this.cursor;
1068
- return !l$1 && typeof r$1.group == "string" && this.options[this.cursor].value === r$1.group ? n$1(r$1, c$2 ? "group-active-selected" : "group-active", a$1) : l$1 && c$2 ? n$1(r$1, "active-selected", a$1) : c$2 ? n$1(r$1, "selected", a$1) : n$1(r$1, l$1 ? "active" : "inactive", a$1);
1069
- }).join(`
1070
- ${import_picocolors.default.cyan(o$1)} `)}
1071
- ${import_picocolors.default.cyan(d)}
1072
- `;
1073
- }
1074
- }
1075
- }).prompt();
1076
- }, Me = (t = "", n$1 = "") => {
1077
- const s = `
1078
- ${t}
1079
- `.split(`
1080
- `), r$1 = (0, node_util.stripVTControlCharacters)(n$1).length, i$1 = Math.max(s.reduce((c$2, l$1) => {
1081
- const $$2 = (0, node_util.stripVTControlCharacters)(l$1);
1082
- return $$2.length > c$2 ? $$2.length : c$2;
1083
- }, 0), r$1) + 2, a$1 = s.map((c$2) => `${import_picocolors.default.gray(o$1)} ${import_picocolors.default.dim(c$2)}${" ".repeat(i$1 - (0, node_util.stripVTControlCharacters)(c$2).length)}${import_picocolors.default.gray(o$1)}`).join(`
1084
- `);
1085
- process.stdout.write(`${import_picocolors.default.gray(o$1)}
1086
- ${import_picocolors.default.green(C)} ${import_picocolors.default.reset(n$1)} ${import_picocolors.default.gray(_$1.repeat(Math.max(i$1 - r$1 - 1, 1)) + me)}
1087
- ${a$1}
1088
- ${import_picocolors.default.gray(de + _$1.repeat(i$1 + 2) + pe)}
1089
- `);
1090
- }, xe = (t = "") => {
1091
- process.stdout.write(`${import_picocolors.default.gray(d)} ${import_picocolors.default.red(t)}
1092
-
1093
- `);
1094
- }, Ie = (t = "") => {
1095
- process.stdout.write(`${import_picocolors.default.gray(ue)} ${t}
1096
- `);
1097
- }, Se = (t = "") => {
1098
- process.stdout.write(`${import_picocolors.default.gray(o$1)}
1099
- ${import_picocolors.default.gray(d)} ${t}
1100
-
1101
- `);
1102
- }, f = {
1103
- message: (t = "", { symbol: n$1 = import_picocolors.default.gray(o$1) } = {}) => {
1104
- const s = [`${import_picocolors.default.gray(o$1)}`];
1105
- if (t) {
1106
- const [r$1, ...i$1] = t.split(`
1107
- `);
1108
- s.push(`${n$1} ${r$1}`, ...i$1.map((a$1) => `${import_picocolors.default.gray(o$1)} ${a$1}`));
1109
- }
1110
- process.stdout.write(`${s.join(`
1111
- `)}
1112
- `);
1113
- },
1114
- info: (t) => {
1115
- f.message(t, { symbol: import_picocolors.default.blue(q) });
1116
- },
1117
- success: (t) => {
1118
- f.message(t, { symbol: import_picocolors.default.green(D) });
1119
- },
1120
- step: (t) => {
1121
- f.message(t, { symbol: import_picocolors.default.green(C) });
1122
- },
1123
- warn: (t) => {
1124
- f.message(t, { symbol: import_picocolors.default.yellow(U) });
1125
- },
1126
- warning: (t) => {
1127
- f.warn(t);
1128
- },
1129
- error: (t) => {
1130
- f.message(t, { symbol: import_picocolors.default.red(K) });
1131
- }
1132
- }, J = `${import_picocolors.default.gray(o$1)} `, b = {
1133
- message: async (t, { symbol: n$1 = import_picocolors.default.gray(o$1) } = {}) => {
1134
- process.stdout.write(`${import_picocolors.default.gray(o$1)}
1135
- ${n$1} `);
1136
- let s = 3;
1137
- for await (let r$1 of t) {
1138
- r$1 = r$1.replace(/\n/g, `
1139
- ${J}`), r$1.includes(`
1140
- `) && (s = 3 + (0, node_util.stripVTControlCharacters)(r$1.slice(r$1.lastIndexOf(`
1141
- `))).length);
1142
- const i$1 = (0, node_util.stripVTControlCharacters)(r$1).length;
1143
- s + i$1 < process.stdout.columns ? (s += i$1, process.stdout.write(r$1)) : (process.stdout.write(`
1144
- ${J}${r$1.trimStart()}`), s = 3 + (0, node_util.stripVTControlCharacters)(r$1.trimStart()).length);
1145
- }
1146
- process.stdout.write(`
1147
- `);
1148
- },
1149
- info: (t) => b.message(t, { symbol: import_picocolors.default.blue(q) }),
1150
- success: (t) => b.message(t, { symbol: import_picocolors.default.green(D) }),
1151
- step: (t) => b.message(t, { symbol: import_picocolors.default.green(C) }),
1152
- warn: (t) => b.message(t, { symbol: import_picocolors.default.yellow(U) }),
1153
- warning: (t) => b.warn(t),
1154
- error: (t) => b.message(t, { symbol: import_picocolors.default.red(K) })
1155
- }, Y = ({ indicator: t = "dots" } = {}) => {
1156
- const n$1 = V ? [
1157
- "◒",
1158
- "◐",
1159
- "◓",
1160
- "◑"
1161
- ] : [
1162
- "•",
1163
- "o",
1164
- "O",
1165
- "0"
1166
- ], s = V ? 80 : 120, r$1 = process.env.CI === "true";
1167
- let i$1, a$1, c$2 = !1, l$1 = "", $$2, p$1 = performance.now();
1168
- const M$1 = (m$1) => {
1169
- c$2 && N$1(m$1 > 1 ? "Something went wrong" : "Canceled", m$1);
1170
- }, v$1 = () => M$1(2), x$1 = () => M$1(1), j$1 = () => {
1171
- process.on("uncaughtExceptionMonitor", v$1), process.on("unhandledRejection", v$1), process.on("SIGINT", x$1), process.on("SIGTERM", x$1), process.on("exit", M$1);
1172
- }, E = () => {
1173
- process.removeListener("uncaughtExceptionMonitor", v$1), process.removeListener("unhandledRejection", v$1), process.removeListener("SIGINT", x$1), process.removeListener("SIGTERM", x$1), process.removeListener("exit", M$1);
1174
- }, O$1 = () => {
1175
- if ($$2 === void 0) return;
1176
- r$1 && process.stdout.write(`
1177
- `);
1178
- const m$1 = $$2.split(`
1179
- `);
1180
- process.stdout.write(import_src.cursor.move(-999, m$1.length - 1)), process.stdout.write(import_src.erase.down(m$1.length));
1181
- }, R$1 = (m$1) => m$1.replace(/\.+$/, ""), G$1 = (m$1) => {
1182
- const h$2 = (performance.now() - m$1) / 1e3, y$1 = Math.floor(h$2 / 60), I$1 = Math.floor(h$2 % 60);
1183
- return y$1 > 0 ? `[${y$1}m ${I$1}s]` : `[${I$1}s]`;
1184
- }, H$1 = (m$1 = "") => {
1185
- c$2 = !0, i$1 = cD(), l$1 = R$1(m$1), p$1 = performance.now(), process.stdout.write(`${import_picocolors.default.gray(o$1)}
1186
- `);
1187
- let h$2 = 0, y$1 = 0;
1188
- j$1(), a$1 = setInterval(() => {
1189
- if (r$1 && l$1 === $$2) return;
1190
- O$1(), $$2 = l$1;
1191
- const I$1 = import_picocolors.default.magenta(n$1[h$2]);
1192
- if (r$1) process.stdout.write(`${I$1} ${l$1}...`);
1193
- else if (t === "timer") process.stdout.write(`${I$1} ${l$1} ${G$1(p$1)}`);
1194
- else {
1195
- const z$1 = ".".repeat(Math.floor(y$1)).slice(0, 3);
1196
- process.stdout.write(`${I$1} ${l$1}${z$1}`);
1197
- }
1198
- h$2 = h$2 + 1 < n$1.length ? h$2 + 1 : 0, y$1 = y$1 < n$1.length ? y$1 + .125 : 0;
1199
- }, s);
1200
- }, N$1 = (m$1 = "", h$2 = 0) => {
1201
- c$2 = !1, clearInterval(a$1), O$1();
1202
- const y$1 = h$2 === 0 ? import_picocolors.default.green(C) : h$2 === 1 ? import_picocolors.default.red(L) : import_picocolors.default.red(W);
1203
- l$1 = R$1(m$1 ?? l$1), t === "timer" ? process.stdout.write(`${y$1} ${l$1} ${G$1(p$1)}
1204
- `) : process.stdout.write(`${y$1} ${l$1}
1205
- `), E(), i$1();
1206
- };
1207
- return {
1208
- start: H$1,
1209
- stop: N$1,
1210
- message: (m$1 = "") => {
1211
- l$1 = R$1(m$1 ?? l$1);
1212
- }
1213
- };
1214
- }, Ce = async (t, n$1) => {
1215
- const s = {}, r$1 = Object.keys(t);
1216
- for (const i$1 of r$1) {
1217
- const a$1 = t[i$1], c$2 = await a$1({ results: s })?.catch((l$1) => {
1218
- throw l$1;
1219
- });
1220
- if (typeof n$1?.onCancel == "function" && BD(c$2)) {
1221
- s[i$1] = "canceled", n$1.onCancel({ results: s });
1222
- continue;
1223
- }
1224
- s[i$1] = c$2;
1225
- }
1226
- return s;
1227
- }, Te = async (t) => {
1228
- for (const n$1 of t) {
1229
- if (n$1.enabled === !1) continue;
1230
- const s = Y();
1231
- s.start(n$1.title);
1232
- const r$1 = await n$1.task(s.message);
1233
- s.stop(r$1 || n$1.title);
1234
- }
1235
- };
1236
-
1237
- //#endregion
1238
73
  //#region ../../node_modules/.pnpm/dayjs@1.11.13/node_modules/dayjs/dayjs.min.js
1239
74
  var require_dayjs_min = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/dayjs@1.11.13/node_modules/dayjs/dayjs.min.js": ((exports, module) => {
1240
- (function(t, e$1) {
1241
- "object" == typeof exports && "undefined" != typeof module ? module.exports = e$1() : "function" == typeof define && define.amd ? define(e$1) : (t = "undefined" != typeof globalThis ? globalThis : t || self).dayjs = e$1();
75
+ (function(t, e) {
76
+ "object" == typeof exports && "undefined" != typeof module ? module.exports = e() : "function" == typeof define && define.amd ? define(e) : (t = "undefined" != typeof globalThis ? globalThis : t || self).dayjs = e();
1242
77
  })(exports, (function() {
1243
- var t = 1e3, e$1 = 6e4, n$1 = 36e5, r$1 = "millisecond", i$1 = "second", s = "minute", u$2 = "hour", a$1 = "day", o$2 = "week", c$2 = "month", f$1 = "quarter", h$2 = "year", d$2 = "date", l$1 = "Invalid Date", $$2 = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y$1 = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, M$1 = {
78
+ var t = 1e3, e = 6e4, n$1 = 36e5, r = "millisecond", i$1 = "second", s = "minute", u$1 = "hour", a$1 = "day", o$1 = "week", c$1 = "month", f = "quarter", h$1 = "year", d = "date", l = "Invalid Date", $$1 = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, M = {
1244
79
  name: "en",
1245
80
  weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),
1246
81
  months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"),
1247
82
  ordinal: function(t$1) {
1248
- var e$2 = [
83
+ var e$1 = [
1249
84
  "th",
1250
85
  "st",
1251
86
  "nd",
1252
87
  "rd"
1253
88
  ], n$2 = t$1 % 100;
1254
- return "[" + t$1 + (e$2[(n$2 - 20) % 10] || e$2[n$2] || e$2[0]) + "]";
89
+ return "[" + t$1 + (e$1[(n$2 - 20) % 10] || e$1[n$2] || e$1[0]) + "]";
1255
90
  }
1256
- }, m$1 = function(t$1, e$2, n$2) {
1257
- var r$2 = String(t$1);
1258
- return !r$2 || r$2.length >= e$2 ? t$1 : "" + Array(e$2 + 1 - r$2.length).join(n$2) + t$1;
1259
- }, v$1 = {
1260
- s: m$1,
91
+ }, m = function(t$1, e$1, n$2) {
92
+ var r$1 = String(t$1);
93
+ return !r$1 || r$1.length >= e$1 ? t$1 : "" + Array(e$1 + 1 - r$1.length).join(n$2) + t$1;
94
+ }, v = {
95
+ s: m,
1261
96
  z: function(t$1) {
1262
- var e$2 = -t$1.utcOffset(), n$2 = Math.abs(e$2), r$2 = Math.floor(n$2 / 60), i$2 = n$2 % 60;
1263
- return (e$2 <= 0 ? "+" : "-") + m$1(r$2, 2, "0") + ":" + m$1(i$2, 2, "0");
97
+ var e$1 = -t$1.utcOffset(), n$2 = Math.abs(e$1), r$1 = Math.floor(n$2 / 60), i$2 = n$2 % 60;
98
+ return (e$1 <= 0 ? "+" : "-") + m(r$1, 2, "0") + ":" + m(i$2, 2, "0");
1264
99
  },
1265
- m: function t$1(e$2, n$2) {
1266
- if (e$2.date() < n$2.date()) return -t$1(n$2, e$2);
1267
- var r$2 = 12 * (n$2.year() - e$2.year()) + (n$2.month() - e$2.month()), i$2 = e$2.clone().add(r$2, c$2), s$1 = n$2 - i$2 < 0, u$3 = e$2.clone().add(r$2 + (s$1 ? -1 : 1), c$2);
1268
- return +(-(r$2 + (n$2 - i$2) / (s$1 ? i$2 - u$3 : u$3 - i$2)) || 0);
100
+ m: function t$1(e$1, n$2) {
101
+ if (e$1.date() < n$2.date()) return -t$1(n$2, e$1);
102
+ var r$1 = 12 * (n$2.year() - e$1.year()) + (n$2.month() - e$1.month()), i$2 = e$1.clone().add(r$1, c$1), s$1 = n$2 - i$2 < 0, u$2 = e$1.clone().add(r$1 + (s$1 ? -1 : 1), c$1);
103
+ return +(-(r$1 + (n$2 - i$2) / (s$1 ? i$2 - u$2 : u$2 - i$2)) || 0);
1269
104
  },
1270
105
  a: function(t$1) {
1271
106
  return t$1 < 0 ? Math.ceil(t$1) || 0 : Math.floor(t$1);
1272
107
  },
1273
108
  p: function(t$1) {
1274
109
  return {
1275
- M: c$2,
1276
- y: h$2,
1277
- w: o$2,
110
+ M: c$1,
111
+ y: h$1,
112
+ w: o$1,
1278
113
  d: a$1,
1279
- D: d$2,
1280
- h: u$2,
114
+ D: d,
115
+ h: u$1,
1281
116
  m: s,
1282
117
  s: i$1,
1283
- ms: r$1,
1284
- Q: f$1
118
+ ms: r,
119
+ Q: f
1285
120
  }[t$1] || String(t$1 || "").toLowerCase().replace(/s$/, "");
1286
121
  },
1287
122
  u: function(t$1) {
1288
123
  return void 0 === t$1;
1289
124
  }
1290
- }, g$2 = "en", D$1 = {};
1291
- D$1[g$2] = M$1;
1292
- var p$1 = "$isDayjsObject", S$2 = function(t$1) {
1293
- return t$1 instanceof _$3 || !(!t$1 || !t$1[p$1]);
1294
- }, w$2 = function t$1(e$2, n$2, r$2) {
125
+ }, g = "en", D = {};
126
+ D[g] = M;
127
+ var p$1 = "$isDayjsObject", S = function(t$1) {
128
+ return t$1 instanceof _$1 || !(!t$1 || !t$1[p$1]);
129
+ }, w = function t$1(e$1, n$2, r$1) {
1295
130
  var i$2;
1296
- if (!e$2) return g$2;
1297
- if ("string" == typeof e$2) {
1298
- var s$1 = e$2.toLowerCase();
1299
- D$1[s$1] && (i$2 = s$1), n$2 && (D$1[s$1] = n$2, i$2 = s$1);
1300
- var u$3 = e$2.split("-");
1301
- if (!i$2 && u$3.length > 1) return t$1(u$3[0]);
131
+ if (!e$1) return g;
132
+ if ("string" == typeof e$1) {
133
+ var s$1 = e$1.toLowerCase();
134
+ D[s$1] && (i$2 = s$1), n$2 && (D[s$1] = n$2, i$2 = s$1);
135
+ var u$2 = e$1.split("-");
136
+ if (!i$2 && u$2.length > 1) return t$1(u$2[0]);
1302
137
  } else {
1303
- var a$2 = e$2.name;
1304
- D$1[a$2] = e$2, i$2 = a$2;
138
+ var a$2 = e$1.name;
139
+ D[a$2] = e$1, i$2 = a$2;
1305
140
  }
1306
- return !r$2 && i$2 && (g$2 = i$2), i$2 || !r$2 && g$2;
1307
- }, O$1 = function(t$1, e$2) {
1308
- if (S$2(t$1)) return t$1.clone();
1309
- var n$2 = "object" == typeof e$2 ? e$2 : {};
1310
- return n$2.date = t$1, n$2.args = arguments, new _$3(n$2);
1311
- }, b$2 = v$1;
1312
- b$2.l = w$2, b$2.i = S$2, b$2.w = function(t$1, e$2) {
1313
- return O$1(t$1, {
1314
- locale: e$2.$L,
1315
- utc: e$2.$u,
1316
- x: e$2.$x,
1317
- $offset: e$2.$offset
141
+ return !r$1 && i$2 && (g = i$2), i$2 || !r$1 && g;
142
+ }, O = function(t$1, e$1) {
143
+ if (S(t$1)) return t$1.clone();
144
+ var n$2 = "object" == typeof e$1 ? e$1 : {};
145
+ return n$2.date = t$1, n$2.args = arguments, new _$1(n$2);
146
+ }, b = v;
147
+ b.l = w, b.i = S, b.w = function(t$1, e$1) {
148
+ return O(t$1, {
149
+ locale: e$1.$L,
150
+ utc: e$1.$u,
151
+ x: e$1.$x,
152
+ $offset: e$1.$offset
1318
153
  });
1319
154
  };
1320
- var _$3 = function() {
1321
- function M$2(t$1) {
1322
- this.$L = w$2(t$1.locale, null, !0), this.parse(t$1), this.$x = this.$x || t$1.x || {}, this[p$1] = !0;
155
+ var _$1 = function() {
156
+ function M$1(t$1) {
157
+ this.$L = w(t$1.locale, null, !0), this.parse(t$1), this.$x = this.$x || t$1.x || {}, this[p$1] = !0;
1323
158
  }
1324
- var m$2 = M$2.prototype;
1325
- return m$2.parse = function(t$1) {
159
+ var m$1 = M$1.prototype;
160
+ return m$1.parse = function(t$1) {
1326
161
  this.$d = function(t$2) {
1327
- var e$2 = t$2.date, n$2 = t$2.utc;
1328
- if (null === e$2) return /* @__PURE__ */ new Date(NaN);
1329
- if (b$2.u(e$2)) return /* @__PURE__ */ new Date();
1330
- if (e$2 instanceof Date) return new Date(e$2);
1331
- if ("string" == typeof e$2 && !/Z$/i.test(e$2)) {
1332
- var r$2 = e$2.match($$2);
1333
- if (r$2) {
1334
- var i$2 = r$2[2] - 1 || 0, s$1 = (r$2[7] || "0").substring(0, 3);
1335
- return n$2 ? new Date(Date.UTC(r$2[1], i$2, r$2[3] || 1, r$2[4] || 0, r$2[5] || 0, r$2[6] || 0, s$1)) : new Date(r$2[1], i$2, r$2[3] || 1, r$2[4] || 0, r$2[5] || 0, r$2[6] || 0, s$1);
162
+ var e$1 = t$2.date, n$2 = t$2.utc;
163
+ if (null === e$1) return /* @__PURE__ */ new Date(NaN);
164
+ if (b.u(e$1)) return /* @__PURE__ */ new Date();
165
+ if (e$1 instanceof Date) return new Date(e$1);
166
+ if ("string" == typeof e$1 && !/Z$/i.test(e$1)) {
167
+ var r$1 = e$1.match($$1);
168
+ if (r$1) {
169
+ var i$2 = r$1[2] - 1 || 0, s$1 = (r$1[7] || "0").substring(0, 3);
170
+ return n$2 ? new Date(Date.UTC(r$1[1], i$2, r$1[3] || 1, r$1[4] || 0, r$1[5] || 0, r$1[6] || 0, s$1)) : new Date(r$1[1], i$2, r$1[3] || 1, r$1[4] || 0, r$1[5] || 0, r$1[6] || 0, s$1);
1336
171
  }
1337
172
  }
1338
- return new Date(e$2);
173
+ return new Date(e$1);
1339
174
  }(t$1), this.init();
1340
- }, m$2.init = function() {
175
+ }, m$1.init = function() {
1341
176
  var t$1 = this.$d;
1342
177
  this.$y = t$1.getFullYear(), this.$M = t$1.getMonth(), this.$D = t$1.getDate(), this.$W = t$1.getDay(), this.$H = t$1.getHours(), this.$m = t$1.getMinutes(), this.$s = t$1.getSeconds(), this.$ms = t$1.getMilliseconds();
1343
- }, m$2.$utils = function() {
1344
- return b$2;
1345
- }, m$2.isValid = function() {
1346
- return !(this.$d.toString() === l$1);
1347
- }, m$2.isSame = function(t$1, e$2) {
1348
- var n$2 = O$1(t$1);
1349
- return this.startOf(e$2) <= n$2 && n$2 <= this.endOf(e$2);
1350
- }, m$2.isAfter = function(t$1, e$2) {
1351
- return O$1(t$1) < this.startOf(e$2);
1352
- }, m$2.isBefore = function(t$1, e$2) {
1353
- return this.endOf(e$2) < O$1(t$1);
1354
- }, m$2.$g = function(t$1, e$2, n$2) {
1355
- return b$2.u(t$1) ? this[e$2] : this.set(n$2, t$1);
1356
- }, m$2.unix = function() {
178
+ }, m$1.$utils = function() {
179
+ return b;
180
+ }, m$1.isValid = function() {
181
+ return !(this.$d.toString() === l);
182
+ }, m$1.isSame = function(t$1, e$1) {
183
+ var n$2 = O(t$1);
184
+ return this.startOf(e$1) <= n$2 && n$2 <= this.endOf(e$1);
185
+ }, m$1.isAfter = function(t$1, e$1) {
186
+ return O(t$1) < this.startOf(e$1);
187
+ }, m$1.isBefore = function(t$1, e$1) {
188
+ return this.endOf(e$1) < O(t$1);
189
+ }, m$1.$g = function(t$1, e$1, n$2) {
190
+ return b.u(t$1) ? this[e$1] : this.set(n$2, t$1);
191
+ }, m$1.unix = function() {
1357
192
  return Math.floor(this.valueOf() / 1e3);
1358
- }, m$2.valueOf = function() {
193
+ }, m$1.valueOf = function() {
1359
194
  return this.$d.getTime();
1360
- }, m$2.startOf = function(t$1, e$2) {
1361
- var n$2 = this, r$2 = !!b$2.u(e$2) || e$2, f$2 = b$2.p(t$1), l$2 = function(t$2, e$3) {
1362
- var i$2 = b$2.w(n$2.$u ? Date.UTC(n$2.$y, e$3, t$2) : new Date(n$2.$y, e$3, t$2), n$2);
1363
- return r$2 ? i$2 : i$2.endOf(a$1);
1364
- }, $$3 = function(t$2, e$3) {
1365
- return b$2.w(n$2.toDate()[t$2].apply(n$2.toDate("s"), (r$2 ? [
195
+ }, m$1.startOf = function(t$1, e$1) {
196
+ var n$2 = this, r$1 = !!b.u(e$1) || e$1, f$1 = b.p(t$1), l$1 = function(t$2, e$2) {
197
+ var i$2 = b.w(n$2.$u ? Date.UTC(n$2.$y, e$2, t$2) : new Date(n$2.$y, e$2, t$2), n$2);
198
+ return r$1 ? i$2 : i$2.endOf(a$1);
199
+ }, $$2 = function(t$2, e$2) {
200
+ return b.w(n$2.toDate()[t$2].apply(n$2.toDate("s"), (r$1 ? [
1366
201
  0,
1367
202
  0,
1368
203
  0,
@@ -1372,163 +207,163 @@ var require_dayjs_min = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/d
1372
207
  59,
1373
208
  59,
1374
209
  999
1375
- ]).slice(e$3)), n$2);
1376
- }, y$2 = this.$W, M$3 = this.$M, m$3 = this.$D, v$2 = "set" + (this.$u ? "UTC" : "");
1377
- switch (f$2) {
1378
- case h$2: return r$2 ? l$2(1, 0) : l$2(31, 11);
1379
- case c$2: return r$2 ? l$2(1, M$3) : l$2(0, M$3 + 1);
1380
- case o$2:
1381
- var g$3 = this.$locale().weekStart || 0, D$2 = (y$2 < g$3 ? y$2 + 7 : y$2) - g$3;
1382
- return l$2(r$2 ? m$3 - D$2 : m$3 + (6 - D$2), M$3);
210
+ ]).slice(e$2)), n$2);
211
+ }, y$1 = this.$W, M$2 = this.$M, m$2 = this.$D, v$1 = "set" + (this.$u ? "UTC" : "");
212
+ switch (f$1) {
213
+ case h$1: return r$1 ? l$1(1, 0) : l$1(31, 11);
214
+ case c$1: return r$1 ? l$1(1, M$2) : l$1(0, M$2 + 1);
215
+ case o$1:
216
+ var g$1 = this.$locale().weekStart || 0, D$1 = (y$1 < g$1 ? y$1 + 7 : y$1) - g$1;
217
+ return l$1(r$1 ? m$2 - D$1 : m$2 + (6 - D$1), M$2);
1383
218
  case a$1:
1384
- case d$2: return $$3(v$2 + "Hours", 0);
1385
- case u$2: return $$3(v$2 + "Minutes", 1);
1386
- case s: return $$3(v$2 + "Seconds", 2);
1387
- case i$1: return $$3(v$2 + "Milliseconds", 3);
219
+ case d: return $$2(v$1 + "Hours", 0);
220
+ case u$1: return $$2(v$1 + "Minutes", 1);
221
+ case s: return $$2(v$1 + "Seconds", 2);
222
+ case i$1: return $$2(v$1 + "Milliseconds", 3);
1388
223
  default: return this.clone();
1389
224
  }
1390
- }, m$2.endOf = function(t$1) {
225
+ }, m$1.endOf = function(t$1) {
1391
226
  return this.startOf(t$1, !1);
1392
- }, m$2.$set = function(t$1, e$2) {
1393
- var n$2, o$3 = b$2.p(t$1), f$2 = "set" + (this.$u ? "UTC" : ""), l$2 = (n$2 = {}, n$2[a$1] = f$2 + "Date", n$2[d$2] = f$2 + "Date", n$2[c$2] = f$2 + "Month", n$2[h$2] = f$2 + "FullYear", n$2[u$2] = f$2 + "Hours", n$2[s] = f$2 + "Minutes", n$2[i$1] = f$2 + "Seconds", n$2[r$1] = f$2 + "Milliseconds", n$2)[o$3], $$3 = o$3 === a$1 ? this.$D + (e$2 - this.$W) : e$2;
1394
- if (o$3 === c$2 || o$3 === h$2) {
1395
- var y$2 = this.clone().set(d$2, 1);
1396
- y$2.$d[l$2]($$3), y$2.init(), this.$d = y$2.set(d$2, Math.min(this.$D, y$2.daysInMonth())).$d;
1397
- } else l$2 && this.$d[l$2]($$3);
227
+ }, m$1.$set = function(t$1, e$1) {
228
+ var n$2, o$2 = b.p(t$1), f$1 = "set" + (this.$u ? "UTC" : ""), l$1 = (n$2 = {}, n$2[a$1] = f$1 + "Date", n$2[d] = f$1 + "Date", n$2[c$1] = f$1 + "Month", n$2[h$1] = f$1 + "FullYear", n$2[u$1] = f$1 + "Hours", n$2[s] = f$1 + "Minutes", n$2[i$1] = f$1 + "Seconds", n$2[r] = f$1 + "Milliseconds", n$2)[o$2], $$2 = o$2 === a$1 ? this.$D + (e$1 - this.$W) : e$1;
229
+ if (o$2 === c$1 || o$2 === h$1) {
230
+ var y$1 = this.clone().set(d, 1);
231
+ y$1.$d[l$1]($$2), y$1.init(), this.$d = y$1.set(d, Math.min(this.$D, y$1.daysInMonth())).$d;
232
+ } else l$1 && this.$d[l$1]($$2);
1398
233
  return this.init(), this;
1399
- }, m$2.set = function(t$1, e$2) {
1400
- return this.clone().$set(t$1, e$2);
1401
- }, m$2.get = function(t$1) {
1402
- return this[b$2.p(t$1)]();
1403
- }, m$2.add = function(r$2, f$2) {
1404
- var d$3, l$2 = this;
1405
- r$2 = Number(r$2);
1406
- var $$3 = b$2.p(f$2), y$2 = function(t$1) {
1407
- var e$2 = O$1(l$2);
1408
- return b$2.w(e$2.date(e$2.date() + Math.round(t$1 * r$2)), l$2);
234
+ }, m$1.set = function(t$1, e$1) {
235
+ return this.clone().$set(t$1, e$1);
236
+ }, m$1.get = function(t$1) {
237
+ return this[b.p(t$1)]();
238
+ }, m$1.add = function(r$1, f$1) {
239
+ var d$1, l$1 = this;
240
+ r$1 = Number(r$1);
241
+ var $$2 = b.p(f$1), y$1 = function(t$1) {
242
+ var e$1 = O(l$1);
243
+ return b.w(e$1.date(e$1.date() + Math.round(t$1 * r$1)), l$1);
1409
244
  };
1410
- if ($$3 === c$2) return this.set(c$2, this.$M + r$2);
1411
- if ($$3 === h$2) return this.set(h$2, this.$y + r$2);
1412
- if ($$3 === a$1) return y$2(1);
1413
- if ($$3 === o$2) return y$2(7);
1414
- var M$3 = (d$3 = {}, d$3[s] = e$1, d$3[u$2] = n$1, d$3[i$1] = t, d$3)[$$3] || 1, m$3 = this.$d.getTime() + r$2 * M$3;
1415
- return b$2.w(m$3, this);
1416
- }, m$2.subtract = function(t$1, e$2) {
1417
- return this.add(-1 * t$1, e$2);
1418
- }, m$2.format = function(t$1) {
1419
- var e$2 = this, n$2 = this.$locale();
1420
- if (!this.isValid()) return n$2.invalidDate || l$1;
1421
- var r$2 = t$1 || "YYYY-MM-DDTHH:mm:ssZ", i$2 = b$2.z(this), s$1 = this.$H, u$3 = this.$m, a$2 = this.$M, o$3 = n$2.weekdays, c$3 = n$2.months, f$2 = n$2.meridiem, h$3 = function(t$2, n$3, i$3, s$2) {
1422
- return t$2 && (t$2[n$3] || t$2(e$2, r$2)) || i$3[n$3].slice(0, s$2);
1423
- }, d$3 = function(t$2) {
1424
- return b$2.s(s$1 % 12 || 12, t$2, "0");
1425
- }, $$3 = f$2 || function(t$2, e$3, n$3) {
1426
- var r$3 = t$2 < 12 ? "AM" : "PM";
1427
- return n$3 ? r$3.toLowerCase() : r$3;
245
+ if ($$2 === c$1) return this.set(c$1, this.$M + r$1);
246
+ if ($$2 === h$1) return this.set(h$1, this.$y + r$1);
247
+ if ($$2 === a$1) return y$1(1);
248
+ if ($$2 === o$1) return y$1(7);
249
+ var M$2 = (d$1 = {}, d$1[s] = e, d$1[u$1] = n$1, d$1[i$1] = t, d$1)[$$2] || 1, m$2 = this.$d.getTime() + r$1 * M$2;
250
+ return b.w(m$2, this);
251
+ }, m$1.subtract = function(t$1, e$1) {
252
+ return this.add(-1 * t$1, e$1);
253
+ }, m$1.format = function(t$1) {
254
+ var e$1 = this, n$2 = this.$locale();
255
+ if (!this.isValid()) return n$2.invalidDate || l;
256
+ var r$1 = t$1 || "YYYY-MM-DDTHH:mm:ssZ", i$2 = b.z(this), s$1 = this.$H, u$2 = this.$m, a$2 = this.$M, o$2 = n$2.weekdays, c$2 = n$2.months, f$1 = n$2.meridiem, h$2 = function(t$2, n$3, i$3, s$2) {
257
+ return t$2 && (t$2[n$3] || t$2(e$1, r$1)) || i$3[n$3].slice(0, s$2);
258
+ }, d$1 = function(t$2) {
259
+ return b.s(s$1 % 12 || 12, t$2, "0");
260
+ }, $$2 = f$1 || function(t$2, e$2, n$3) {
261
+ var r$2 = t$2 < 12 ? "AM" : "PM";
262
+ return n$3 ? r$2.toLowerCase() : r$2;
1428
263
  };
1429
- return r$2.replace(y$1, (function(t$2, r$3) {
1430
- return r$3 || function(t$3) {
264
+ return r$1.replace(y, (function(t$2, r$2) {
265
+ return r$2 || function(t$3) {
1431
266
  switch (t$3) {
1432
- case "YY": return String(e$2.$y).slice(-2);
1433
- case "YYYY": return b$2.s(e$2.$y, 4, "0");
267
+ case "YY": return String(e$1.$y).slice(-2);
268
+ case "YYYY": return b.s(e$1.$y, 4, "0");
1434
269
  case "M": return a$2 + 1;
1435
- case "MM": return b$2.s(a$2 + 1, 2, "0");
1436
- case "MMM": return h$3(n$2.monthsShort, a$2, c$3, 3);
1437
- case "MMMM": return h$3(c$3, a$2);
1438
- case "D": return e$2.$D;
1439
- case "DD": return b$2.s(e$2.$D, 2, "0");
1440
- case "d": return String(e$2.$W);
1441
- case "dd": return h$3(n$2.weekdaysMin, e$2.$W, o$3, 2);
1442
- case "ddd": return h$3(n$2.weekdaysShort, e$2.$W, o$3, 3);
1443
- case "dddd": return o$3[e$2.$W];
270
+ case "MM": return b.s(a$2 + 1, 2, "0");
271
+ case "MMM": return h$2(n$2.monthsShort, a$2, c$2, 3);
272
+ case "MMMM": return h$2(c$2, a$2);
273
+ case "D": return e$1.$D;
274
+ case "DD": return b.s(e$1.$D, 2, "0");
275
+ case "d": return String(e$1.$W);
276
+ case "dd": return h$2(n$2.weekdaysMin, e$1.$W, o$2, 2);
277
+ case "ddd": return h$2(n$2.weekdaysShort, e$1.$W, o$2, 3);
278
+ case "dddd": return o$2[e$1.$W];
1444
279
  case "H": return String(s$1);
1445
- case "HH": return b$2.s(s$1, 2, "0");
1446
- case "h": return d$3(1);
1447
- case "hh": return d$3(2);
1448
- case "a": return $$3(s$1, u$3, !0);
1449
- case "A": return $$3(s$1, u$3, !1);
1450
- case "m": return String(u$3);
1451
- case "mm": return b$2.s(u$3, 2, "0");
1452
- case "s": return String(e$2.$s);
1453
- case "ss": return b$2.s(e$2.$s, 2, "0");
1454
- case "SSS": return b$2.s(e$2.$ms, 3, "0");
280
+ case "HH": return b.s(s$1, 2, "0");
281
+ case "h": return d$1(1);
282
+ case "hh": return d$1(2);
283
+ case "a": return $$2(s$1, u$2, !0);
284
+ case "A": return $$2(s$1, u$2, !1);
285
+ case "m": return String(u$2);
286
+ case "mm": return b.s(u$2, 2, "0");
287
+ case "s": return String(e$1.$s);
288
+ case "ss": return b.s(e$1.$s, 2, "0");
289
+ case "SSS": return b.s(e$1.$ms, 3, "0");
1455
290
  case "Z": return i$2;
1456
291
  }
1457
292
  return null;
1458
293
  }(t$2) || i$2.replace(":", "");
1459
294
  }));
1460
- }, m$2.utcOffset = function() {
295
+ }, m$1.utcOffset = function() {
1461
296
  return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
1462
- }, m$2.diff = function(r$2, d$3, l$2) {
1463
- var $$3, y$2 = this, M$3 = b$2.p(d$3), m$3 = O$1(r$2), v$2 = (m$3.utcOffset() - this.utcOffset()) * e$1, g$3 = this - m$3, D$2 = function() {
1464
- return b$2.m(y$2, m$3);
297
+ }, m$1.diff = function(r$1, d$1, l$1) {
298
+ var $$2, y$1 = this, M$2 = b.p(d$1), m$2 = O(r$1), v$1 = (m$2.utcOffset() - this.utcOffset()) * e, g$1 = this - m$2, D$1 = function() {
299
+ return b.m(y$1, m$2);
1465
300
  };
1466
- switch (M$3) {
1467
- case h$2:
1468
- $$3 = D$2() / 12;
301
+ switch (M$2) {
302
+ case h$1:
303
+ $$2 = D$1() / 12;
1469
304
  break;
1470
- case c$2:
1471
- $$3 = D$2();
305
+ case c$1:
306
+ $$2 = D$1();
1472
307
  break;
1473
- case f$1:
1474
- $$3 = D$2() / 3;
308
+ case f:
309
+ $$2 = D$1() / 3;
1475
310
  break;
1476
- case o$2:
1477
- $$3 = (g$3 - v$2) / 6048e5;
311
+ case o$1:
312
+ $$2 = (g$1 - v$1) / 6048e5;
1478
313
  break;
1479
314
  case a$1:
1480
- $$3 = (g$3 - v$2) / 864e5;
315
+ $$2 = (g$1 - v$1) / 864e5;
1481
316
  break;
1482
- case u$2:
1483
- $$3 = g$3 / n$1;
317
+ case u$1:
318
+ $$2 = g$1 / n$1;
1484
319
  break;
1485
320
  case s:
1486
- $$3 = g$3 / e$1;
321
+ $$2 = g$1 / e;
1487
322
  break;
1488
323
  case i$1:
1489
- $$3 = g$3 / t;
324
+ $$2 = g$1 / t;
1490
325
  break;
1491
- default: $$3 = g$3;
1492
- }
1493
- return l$2 ? $$3 : b$2.a($$3);
1494
- }, m$2.daysInMonth = function() {
1495
- return this.endOf(c$2).$D;
1496
- }, m$2.$locale = function() {
1497
- return D$1[this.$L];
1498
- }, m$2.locale = function(t$1, e$2) {
326
+ default: $$2 = g$1;
327
+ }
328
+ return l$1 ? $$2 : b.a($$2);
329
+ }, m$1.daysInMonth = function() {
330
+ return this.endOf(c$1).$D;
331
+ }, m$1.$locale = function() {
332
+ return D[this.$L];
333
+ }, m$1.locale = function(t$1, e$1) {
1499
334
  if (!t$1) return this.$L;
1500
- var n$2 = this.clone(), r$2 = w$2(t$1, e$2, !0);
1501
- return r$2 && (n$2.$L = r$2), n$2;
1502
- }, m$2.clone = function() {
1503
- return b$2.w(this.$d, this);
1504
- }, m$2.toDate = function() {
335
+ var n$2 = this.clone(), r$1 = w(t$1, e$1, !0);
336
+ return r$1 && (n$2.$L = r$1), n$2;
337
+ }, m$1.clone = function() {
338
+ return b.w(this.$d, this);
339
+ }, m$1.toDate = function() {
1505
340
  return new Date(this.valueOf());
1506
- }, m$2.toJSON = function() {
341
+ }, m$1.toJSON = function() {
1507
342
  return this.isValid() ? this.toISOString() : null;
1508
- }, m$2.toISOString = function() {
343
+ }, m$1.toISOString = function() {
1509
344
  return this.$d.toISOString();
1510
- }, m$2.toString = function() {
345
+ }, m$1.toString = function() {
1511
346
  return this.$d.toUTCString();
1512
- }, M$2;
1513
- }(), k$2 = _$3.prototype;
1514
- return O$1.prototype = k$2, [
1515
- ["$ms", r$1],
347
+ }, M$1;
348
+ }(), k = _$1.prototype;
349
+ return O.prototype = k, [
350
+ ["$ms", r],
1516
351
  ["$s", i$1],
1517
352
  ["$m", s],
1518
- ["$H", u$2],
353
+ ["$H", u$1],
1519
354
  ["$W", a$1],
1520
- ["$M", c$2],
1521
- ["$y", h$2],
1522
- ["$D", d$2]
355
+ ["$M", c$1],
356
+ ["$y", h$1],
357
+ ["$D", d]
1523
358
  ].forEach((function(t$1) {
1524
- k$2[t$1[1]] = function(e$2) {
1525
- return this.$g(e$2, t$1[0], t$1[1]);
359
+ k[t$1[1]] = function(e$1) {
360
+ return this.$g(e$1, t$1[0], t$1[1]);
1526
361
  };
1527
- })), O$1.extend = function(t$1, e$2) {
1528
- return t$1.$i || (t$1(e$2, _$3, O$1), t$1.$i = !0), O$1;
1529
- }, O$1.locale = w$2, O$1.isDayjs = S$2, O$1.unix = function(t$1) {
1530
- return O$1(1e3 * t$1);
1531
- }, O$1.en = D$1[g$2], O$1.Ls = D$1, O$1.p = {}, O$1;
362
+ })), O.extend = function(t$1, e$1) {
363
+ return t$1.$i || (t$1(e$1, _$1, O), t$1.$i = !0), O;
364
+ }, O.locale = w, O.isDayjs = S, O.unix = function(t$1) {
365
+ return O(1e3 * t$1);
366
+ }, O.en = D[g], O.Ls = D, O.p = {}, O;
1532
367
  }));
1533
368
  }) });
1534
369
 
@@ -1830,10 +665,10 @@ const NO_ESCAPE_REGEXP = /^[\w./-]+$/;
1830
665
  //#endregion
1831
666
  //#region ../../node_modules/.pnpm/is-unicode-supported@2.1.0/node_modules/is-unicode-supported/index.js
1832
667
  function isUnicodeSupported() {
1833
- const { env: env$1 } = node_process.default;
1834
- const { TERM, TERM_PROGRAM } = env$1;
668
+ const { env } = node_process.default;
669
+ const { TERM, TERM_PROGRAM } = env;
1835
670
  if (node_process.default.platform !== "win32") return TERM !== "linux";
1836
- return Boolean(env$1.WT_SESSION) || Boolean(env$1.TERMINUS_SUBLIME) || env$1.ConEmuTask === "{cmd::Cmder}" || TERM_PROGRAM === "Terminus-Sublime" || TERM_PROGRAM === "vscode" || TERM === "xterm-256color" || TERM === "alacritty" || TERM === "rxvt-unicode" || TERM === "rxvt-unicode-256color" || env$1.TERMINAL_EMULATOR === "JetBrains-JediTerm";
671
+ return Boolean(env.WT_SESSION) || Boolean(env.TERMINUS_SUBLIME) || env.ConEmuTask === "{cmd::Cmder}" || TERM_PROGRAM === "Terminus-Sublime" || TERM_PROGRAM === "vscode" || TERM === "xterm-256color" || TERM === "alacritty" || TERM === "rxvt-unicode" || TERM === "rxvt-unicode-256color" || env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
1837
672
  }
1838
673
 
1839
674
  //#endregion
@@ -2373,11 +1208,11 @@ var require_mode = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/isexe@
2373
1208
  var gid = stat.gid;
2374
1209
  var myUid = options.uid !== void 0 ? options.uid : process.getuid && process.getuid();
2375
1210
  var myGid = options.gid !== void 0 ? options.gid : process.getgid && process.getgid();
2376
- var u$2 = parseInt("100", 8);
2377
- var g$2 = parseInt("010", 8);
2378
- var o$2 = parseInt("001", 8);
2379
- var ug = u$2 | g$2;
2380
- return mod & o$2 || mod & g$2 && gid === myGid || mod & u$2 && uid === myUid || mod & ug && myUid === 0;
1211
+ var u$1 = parseInt("100", 8);
1212
+ var g = parseInt("010", 8);
1213
+ var o$1 = parseInt("001", 8);
1214
+ var ug = u$1 | g;
1215
+ return mod & o$1 || mod & g && gid === myGid || mod & u$1 && uid === myUid || mod & ug && myUid === 0;
2381
1216
  }
2382
1217
  }) });
2383
1218
 
@@ -2481,8 +1316,8 @@ var require_which = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/which
2481
1316
  const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
2482
1317
  const pCmd = path$13.join(pathPart, cmd);
2483
1318
  const p$1 = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
2484
- for (let j$1 = 0; j$1 < pathExt.length; j$1++) {
2485
- const cur = p$1 + pathExt[j$1];
1319
+ for (let j = 0; j < pathExt.length; j++) {
1320
+ const cur = p$1 + pathExt[j];
2486
1321
  try {
2487
1322
  if (isexe.sync(cur, { pathExt: pathExtExe })) if (opt.all) found.push(cur);
2488
1323
  else return cur;
@@ -2516,7 +1351,7 @@ var require_resolveCommand = /* @__PURE__ */ __commonJS({ "../../node_modules/.p
2516
1351
  const which = require_which();
2517
1352
  const getPathKey = require_path_key();
2518
1353
  function resolveCommandAttempt(parsed, withoutPathExt) {
2519
- const env$1 = parsed.options.env || process.env;
1354
+ const env = parsed.options.env || process.env;
2520
1355
  const cwd = process.cwd();
2521
1356
  const hasCustomCwd = parsed.options.cwd != null;
2522
1357
  const shouldSwitchCwd = hasCustomCwd && process.chdir !== void 0 && !process.chdir.disabled;
@@ -2526,10 +1361,10 @@ var require_resolveCommand = /* @__PURE__ */ __commonJS({ "../../node_modules/.p
2526
1361
  let resolved;
2527
1362
  try {
2528
1363
  resolved = which.sync(parsed.command, {
2529
- path: env$1[getPathKey({ env: env$1 })],
1364
+ path: env[getPathKey({ env })],
2530
1365
  pathExt: withoutPathExt ? path$12.delimiter : void 0
2531
1366
  });
2532
- } catch (e$1) {} finally {
1367
+ } catch (e) {} finally {
2533
1368
  if (shouldSwitchCwd) process.chdir(cwd);
2534
1369
  }
2535
1370
  if (resolved) resolved = path$12.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
@@ -2595,7 +1430,7 @@ var require_readShebang = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
2595
1430
  fd = fs$3.openSync(command, "r");
2596
1431
  fs$3.readSync(fd, buffer, 0, size, 0);
2597
1432
  fs$3.closeSync(fd);
2598
- } catch (e$1) {}
1433
+ } catch (e) {}
2599
1434
  return shebangCommand(buffer.toString());
2600
1435
  }
2601
1436
  module.exports = readShebang$1;
@@ -2732,9 +1567,9 @@ var require_cross_spawn = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
2732
1567
  //#region ../../node_modules/.pnpm/path-key@4.0.0/node_modules/path-key/index.js
2733
1568
  var import_cross_spawn = /* @__PURE__ */ __toESM(require_cross_spawn(), 1);
2734
1569
  function pathKey(options = {}) {
2735
- const { env: env$1 = process.env, platform: platform$1 = process.platform } = options;
1570
+ const { env = process.env, platform: platform$1 = process.platform } = options;
2736
1571
  if (platform$1 !== "win32") return "PATH";
2737
- return Object.keys(env$1).reverse().find((key) => key.toUpperCase() === "PATH") || "Path";
1572
+ return Object.keys(env).reverse().find((key) => key.toUpperCase() === "PATH") || "Path";
2738
1573
  }
2739
1574
 
2740
1575
  //#endregion
@@ -2776,12 +1611,12 @@ const applyExecPath = (result, pathParts, execPath$1, cwdPath) => {
2776
1611
  const pathPart = node_path.default.resolve(cwdPath, toPath(execPath$1), "..");
2777
1612
  if (!pathParts.includes(pathPart)) result.push(pathPart);
2778
1613
  };
2779
- const npmRunPathEnv = ({ env: env$1 = node_process.default.env,...options } = {}) => {
2780
- env$1 = { ...env$1 };
2781
- const pathName = pathKey({ env: env$1 });
2782
- options.path = env$1[pathName];
2783
- env$1[pathName] = npmRunPath(options);
2784
- return env$1;
1614
+ const npmRunPathEnv = ({ env = node_process.default.env,...options } = {}) => {
1615
+ env = { ...env };
1616
+ const pathName = pathKey({ env });
1617
+ options.path = env[pathName];
1618
+ env[pathName] = npmRunPath(options);
1619
+ return env;
2785
1620
  };
2786
1621
 
2787
1622
  //#endregion
@@ -3972,18 +2807,18 @@ const addDefaultOptions = ({ extendEnv = true, preferLocal = false, cwd, localDi
3972
2807
  serialization
3973
2808
  });
3974
2809
  const getEnv = ({ env: envOption, extendEnv, preferLocal, node, localDirectory, nodePath }) => {
3975
- const env$1 = extendEnv ? {
2810
+ const env = extendEnv ? {
3976
2811
  ...node_process.default.env,
3977
2812
  ...envOption
3978
2813
  } : envOption;
3979
2814
  if (preferLocal || node) return npmRunPathEnv({
3980
- env: env$1,
2815
+ env,
3981
2816
  cwd: localDirectory,
3982
2817
  execPath: nodePath,
3983
2818
  preferLocal,
3984
2819
  addExecPath: node
3985
2820
  });
3986
- return env$1;
2821
+ return env;
3987
2822
  };
3988
2823
 
3989
2824
  //#endregion
@@ -4026,15 +2861,15 @@ var c = class {
4026
2861
  #n;
4027
2862
  #r = !1;
4028
2863
  #e = void 0;
4029
- constructor(e$1, t) {
4030
- this.#t = e$1, this.#n = t;
2864
+ constructor(e, t) {
2865
+ this.#t = e, this.#n = t;
4031
2866
  }
4032
2867
  next() {
4033
- const e$1 = () => this.#s();
4034
- return this.#e = this.#e ? this.#e.then(e$1, e$1) : e$1(), this.#e;
2868
+ const e = () => this.#s();
2869
+ return this.#e = this.#e ? this.#e.then(e, e) : e(), this.#e;
4035
2870
  }
4036
- return(e$1) {
4037
- const t = () => this.#i(e$1);
2871
+ return(e) {
2872
+ const t = () => this.#i(e);
4038
2873
  return this.#e ? this.#e.then(t, t) : t();
4039
2874
  }
4040
2875
  async #s() {
@@ -4042,29 +2877,29 @@ var c = class {
4042
2877
  done: !0,
4043
2878
  value: void 0
4044
2879
  };
4045
- let e$1;
2880
+ let e;
4046
2881
  try {
4047
- e$1 = await this.#t.read();
2882
+ e = await this.#t.read();
4048
2883
  } catch (t) {
4049
2884
  throw this.#e = void 0, this.#r = !0, this.#t.releaseLock(), t;
4050
2885
  }
4051
- return e$1.done && (this.#e = void 0, this.#r = !0, this.#t.releaseLock()), e$1;
2886
+ return e.done && (this.#e = void 0, this.#r = !0, this.#t.releaseLock()), e;
4052
2887
  }
4053
- async #i(e$1) {
2888
+ async #i(e) {
4054
2889
  if (this.#r) return {
4055
2890
  done: !0,
4056
- value: e$1
2891
+ value: e
4057
2892
  };
4058
2893
  if (this.#r = !0, !this.#n) {
4059
- const t = this.#t.cancel(e$1);
2894
+ const t = this.#t.cancel(e);
4060
2895
  return this.#t.releaseLock(), await t, {
4061
2896
  done: !0,
4062
- value: e$1
2897
+ value: e
4063
2898
  };
4064
2899
  }
4065
2900
  return this.#t.releaseLock(), {
4066
2901
  done: !0,
4067
- value: e$1
2902
+ value: e
4068
2903
  };
4069
2904
  }
4070
2905
  };
@@ -4073,8 +2908,8 @@ function i() {
4073
2908
  return this[n].next();
4074
2909
  }
4075
2910
  Object.defineProperty(i, "name", { value: "next" });
4076
- function o(r$1) {
4077
- return this[n].return(r$1);
2911
+ function o(r) {
2912
+ return this[n].return(r);
4078
2913
  }
4079
2914
  Object.defineProperty(o, "name", { value: "return" });
4080
2915
  const u = Object.create(a, {
@@ -4091,8 +2926,8 @@ const u = Object.create(a, {
4091
2926
  value: o
4092
2927
  }
4093
2928
  });
4094
- function h({ preventCancel: r$1 = !1 } = {}) {
4095
- const t = new c(this.getReader(), r$1), s = Object.create(u);
2929
+ function h({ preventCancel: r = !1 } = {}) {
2930
+ const t = new c(this.getReader(), r), s = Object.create(u);
4096
2931
  return s[n] = t, s;
4097
2932
  }
4098
2933
 
@@ -4991,7 +3826,7 @@ const getStdioArray = (stdio, options) => {
4991
3826
  ];
4992
3827
  if (!Array.isArray(stdio)) throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof stdio}\``);
4993
3828
  const length = Math.max(stdio.length, STANDARD_STREAMS_ALIASES.length);
4994
- return Array.from({ length }, (_$3, fdNumber) => stdio[fdNumber]);
3829
+ return Array.from({ length }, (_$1, fdNumber) => stdio[fdNumber]);
4995
3830
  };
4996
3831
  const hasAlias = (options) => STANDARD_STREAMS_ALIASES.some((alias) => options[alias] !== void 0);
4997
3832
  const addDefaultValue = (stdioOption, fdNumber) => {
@@ -6558,7 +5393,7 @@ var SignalExit = class extends SignalExitBase {
6558
5393
  for (const sig of signals) try {
6559
5394
  const fn = this.#sigListeners[sig];
6560
5395
  if (fn) this.#process.on(sig, fn);
6561
- } catch (_$3) {}
5396
+ } catch (_$1) {}
6562
5397
  this.#process.emit = (ev, ...a$1) => {
6563
5398
  return this.#processEmit(ev, ...a$1);
6564
5399
  };
@@ -6576,7 +5411,7 @@ var SignalExit = class extends SignalExitBase {
6576
5411
  /* c8 ignore stop */
6577
5412
  try {
6578
5413
  this.#process.removeListener(sig, listener);
6579
- } catch (_$3) {}
5414
+ } catch (_$1) {}
6580
5415
  /* c8 ignore stop */
6581
5416
  });
6582
5417
  this.#process.emit = this.#originalProcessEmit;
@@ -7847,7 +6682,7 @@ const { sendMessage, getOneMessage, getEachMessage, getCancelSignal } = getIpcEx
7847
6682
  //#endregion
7848
6683
  //#region src/utils/createWrangler.ts
7849
6684
  const createWrangler = ({ stdio, accountId, cloudflareApiToken, cwd }) => {
7850
- const $$2 = execa({
6685
+ const $$1 = execa({
7851
6686
  stdio,
7852
6687
  extendsEnv: true,
7853
6688
  shell: stdio === "inherit",
@@ -7857,7 +6692,7 @@ const createWrangler = ({ stdio, accountId, cloudflareApiToken, cwd }) => {
7857
6692
  CLOUDFLARE_API_TOKEN: cloudflareApiToken
7858
6693
  }
7859
6694
  });
7860
- return (...command) => $$2("npx", ["wrangler", ...command]);
6695
+ return (...command) => $$1("npx", ["wrangler", ...command]);
7861
6696
  };
7862
6697
 
7863
6698
  //#endregion
@@ -8067,8 +6902,8 @@ var require_parser = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/toml
8067
6902
  type: "class",
8068
6903
  value: "[A-Za-z0-9_\\-]",
8069
6904
  description: "[A-Za-z0-9_\\-]"
8070
- }, peg$c96 = function(d$2) {
8071
- return d$2.join("");
6905
+ }, peg$c96 = function(d) {
6906
+ return d.join("");
8072
6907
  }, peg$c97 = "\\\"", peg$c98 = {
8073
6908
  type: "literal",
8074
6909
  value: "\\\"",
@@ -8180,9 +7015,9 @@ var require_parser = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/toml
8180
7015
  function peg$buildException(message, expected, pos) {
8181
7016
  function cleanupExpected(expected$1) {
8182
7017
  var i$1 = 1;
8183
- expected$1.sort(function(a$1, b$2) {
8184
- if (a$1.description < b$2.description) return -1;
8185
- else if (a$1.description > b$2.description) return 1;
7018
+ expected$1.sort(function(a$1, b) {
7019
+ if (a$1.description < b.description) return -1;
7020
+ else if (a$1.description > b.description) return 1;
8186
7021
  else return 0;
8187
7022
  });
8188
7023
  while (i$1 < expected$1.length) if (expected$1[i$1 - 1] === expected$1[i$1]) expected$1.splice(i$1, 1);
@@ -11672,8 +10507,8 @@ var require_XDGAppPaths = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
11672
10507
  meta.pkgMainFilename(),
11673
10508
  meta.mainFilename()
11674
10509
  ];
11675
- var name = path$14.parse(((_c = namePriorityList.find(function(e$1) {
11676
- return isString(e$1);
10510
+ var name = path$14.parse(((_c = namePriorityList.find(function(e) {
10511
+ return isString(e);
11677
10512
  })) !== null && _c !== void 0 ? _c : "$eval") + suffix).name;
11678
10513
  XDGAppPaths.$name = function $name() {
11679
10514
  return name;
@@ -11726,12 +10561,12 @@ var require_XDGAppPaths = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
11726
10561
  //#region ../../node_modules/.pnpm/xdg-portable@10.6.0/node_modules/xdg-portable/dist/cjs/lib/XDG.js
11727
10562
  var require_XDG = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/xdg-portable@10.6.0/node_modules/xdg-portable/dist/cjs/lib/XDG.js": ((exports) => {
11728
10563
  var __spreadArray$1 = exports && exports.__spreadArray || function(to, from) {
11729
- for (var i$1 = 0, il = from.length, j$1 = to.length; i$1 < il; i$1++, j$1++) to[j$1] = from[i$1];
10564
+ for (var i$1 = 0, il = from.length, j = to.length; i$1 < il; i$1++, j++) to[j] = from[i$1];
11730
10565
  return to;
11731
10566
  };
11732
10567
  exports.__esModule = true;
11733
10568
  function Adapt$1(adapter_) {
11734
- var env$1 = adapter_.env, osPaths = adapter_.osPaths, path$14 = adapter_.path;
10569
+ var env = adapter_.env, osPaths = adapter_.osPaths, path$14 = adapter_.path;
11735
10570
  var isMacOS = /^darwin$/i.test(adapter_.process.platform);
11736
10571
  var isWinOS = /^win/i.test(adapter_.process.platform);
11737
10572
  function baseDir() {
@@ -11742,23 +10577,23 @@ var require_XDG = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/xdg-por
11742
10577
  }
11743
10578
  var linux = function() {
11744
10579
  var cache = function() {
11745
- return valOrPath(env$1.get("XDG_CACHE_HOME"), [baseDir(), ".cache"]);
10580
+ return valOrPath(env.get("XDG_CACHE_HOME"), [baseDir(), ".cache"]);
11746
10581
  };
11747
10582
  var config = function() {
11748
- return valOrPath(env$1.get("XDG_CONFIG_HOME"), [baseDir(), ".config"]);
10583
+ return valOrPath(env.get("XDG_CONFIG_HOME"), [baseDir(), ".config"]);
11749
10584
  };
11750
10585
  var data = function() {
11751
- return valOrPath(env$1.get("XDG_DATA_HOME"), [
10586
+ return valOrPath(env.get("XDG_DATA_HOME"), [
11752
10587
  baseDir(),
11753
10588
  ".local",
11754
10589
  "share"
11755
10590
  ]);
11756
10591
  };
11757
10592
  var runtime = function() {
11758
- return env$1.get("XDG_RUNTIME_DIR") || void 0;
10593
+ return env.get("XDG_RUNTIME_DIR") || void 0;
11759
10594
  };
11760
10595
  var state = function() {
11761
- return valOrPath(env$1.get("XDG_STATE_HOME"), [
10596
+ return valOrPath(env.get("XDG_STATE_HOME"), [
11762
10597
  baseDir(),
11763
10598
  ".local",
11764
10599
  "state"
@@ -11774,31 +10609,31 @@ var require_XDG = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/xdg-por
11774
10609
  };
11775
10610
  var macos = function() {
11776
10611
  var cache = function() {
11777
- return valOrPath(env$1.get("XDG_CACHE_HOME"), [
10612
+ return valOrPath(env.get("XDG_CACHE_HOME"), [
11778
10613
  baseDir(),
11779
10614
  "Library",
11780
10615
  "Caches"
11781
10616
  ]);
11782
10617
  };
11783
10618
  var config = function() {
11784
- return valOrPath(env$1.get("XDG_CONFIG_HOME"), [
10619
+ return valOrPath(env.get("XDG_CONFIG_HOME"), [
11785
10620
  baseDir(),
11786
10621
  "Library",
11787
10622
  "Preferences"
11788
10623
  ]);
11789
10624
  };
11790
10625
  var data = function() {
11791
- return valOrPath(env$1.get("XDG_DATA_HOME"), [
10626
+ return valOrPath(env.get("XDG_DATA_HOME"), [
11792
10627
  baseDir(),
11793
10628
  "Library",
11794
10629
  "Application Support"
11795
10630
  ]);
11796
10631
  };
11797
10632
  var runtime = function() {
11798
- return env$1.get("XDG_RUNTIME_DIR") || void 0;
10633
+ return env.get("XDG_RUNTIME_DIR") || void 0;
11799
10634
  };
11800
10635
  var state = function() {
11801
- return valOrPath(env$1.get("XDG_STATE_HOME"), [
10636
+ return valOrPath(env.get("XDG_STATE_HOME"), [
11802
10637
  baseDir(),
11803
10638
  "Library",
11804
10639
  "State"
@@ -11814,33 +10649,33 @@ var require_XDG = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/xdg-por
11814
10649
  };
11815
10650
  var windows = function() {
11816
10651
  function appData() {
11817
- return valOrPath(env$1.get("APPDATA"), [
10652
+ return valOrPath(env.get("APPDATA"), [
11818
10653
  baseDir(),
11819
10654
  "AppData",
11820
10655
  "Roaming"
11821
10656
  ]);
11822
10657
  }
11823
10658
  function localAppData() {
11824
- return valOrPath(env$1.get("LOCALAPPDATA"), [
10659
+ return valOrPath(env.get("LOCALAPPDATA"), [
11825
10660
  baseDir(),
11826
10661
  "AppData",
11827
10662
  "Local"
11828
10663
  ]);
11829
10664
  }
11830
10665
  var cache = function() {
11831
- return valOrPath(env$1.get("XDG_CACHE_HOME"), [localAppData(), "xdg.cache"]);
10666
+ return valOrPath(env.get("XDG_CACHE_HOME"), [localAppData(), "xdg.cache"]);
11832
10667
  };
11833
10668
  var config = function() {
11834
- return valOrPath(env$1.get("XDG_CONFIG_HOME"), [appData(), "xdg.config"]);
10669
+ return valOrPath(env.get("XDG_CONFIG_HOME"), [appData(), "xdg.config"]);
11835
10670
  };
11836
10671
  var data = function() {
11837
- return valOrPath(env$1.get("XDG_DATA_HOME"), [appData(), "xdg.data"]);
10672
+ return valOrPath(env.get("XDG_DATA_HOME"), [appData(), "xdg.data"]);
11838
10673
  };
11839
10674
  var runtime = function() {
11840
- return env$1.get("XDG_RUNTIME_DIR") || void 0;
10675
+ return env.get("XDG_RUNTIME_DIR") || void 0;
11841
10676
  };
11842
10677
  var state = function() {
11843
- return valOrPath(env$1.get("XDG_STATE_HOME"), [localAppData(), "xdg.state"]);
10678
+ return valOrPath(env.get("XDG_STATE_HOME"), [localAppData(), "xdg.state"]);
11844
10679
  };
11845
10680
  return {
11846
10681
  cache,
@@ -11862,11 +10697,11 @@ var require_XDG = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/xdg-por
11862
10697
  XDG.runtime = extension.runtime;
11863
10698
  XDG.state = extension.state;
11864
10699
  XDG.configDirs = function configDirs() {
11865
- var pathList = env$1.get("XDG_CONFIG_DIRS");
10700
+ var pathList = env.get("XDG_CONFIG_DIRS");
11866
10701
  return __spreadArray$1([extension.config()], pathList ? pathList.split(path$14.delimiter) : []);
11867
10702
  };
11868
10703
  XDG.dataDirs = function dataDirs() {
11869
- var pathList = env$1.get("XDG_DATA_DIRS");
10704
+ var pathList = env.get("XDG_DATA_DIRS");
11870
10705
  return __spreadArray$1([extension.data()], pathList ? pathList.split(path$14.delimiter) : []);
11871
10706
  };
11872
10707
  return XDG;
@@ -11881,7 +10716,7 @@ var require_XDG = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/xdg-por
11881
10716
  //#region ../../node_modules/.pnpm/os-paths@7.4.0/node_modules/os-paths/dist/cjs/lib/OSPaths.js
11882
10717
  var require_OSPaths = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/os-paths@7.4.0/node_modules/os-paths/dist/cjs/lib/OSPaths.js": ((exports) => {
11883
10718
  var __spreadArray = exports && exports.__spreadArray || function(to, from) {
11884
- for (var i$1 = 0, il = from.length, j$1 = to.length; i$1 < il; i$1++, j$1++) to[j$1] = from[i$1];
10719
+ for (var i$1 = 0, il = from.length, j = to.length; i$1 < il; i$1++, j++) to[j] = from[i$1];
11885
10720
  return to;
11886
10721
  };
11887
10722
  exports.__esModule = true;
@@ -11889,23 +10724,23 @@ var require_OSPaths = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/os-
11889
10724
  return !s;
11890
10725
  }
11891
10726
  function Adapt(adapter_) {
11892
- var env$1 = adapter_.env, os$3 = adapter_.os, path$14 = adapter_.path;
10727
+ var env = adapter_.env, os$3 = adapter_.os, path$14 = adapter_.path;
11893
10728
  var isWinOS = /^win/i.test(adapter_.process.platform);
11894
10729
  function normalizePath(path_) {
11895
10730
  return path_ ? adapter_.path.normalize(adapter_.path.join(path_, ".")) : void 0;
11896
10731
  }
11897
10732
  function home() {
11898
10733
  var posix = function() {
11899
- return normalizePath((typeof os$3.homedir === "function" ? os$3.homedir() : void 0) || env$1.get("HOME"));
10734
+ return normalizePath((typeof os$3.homedir === "function" ? os$3.homedir() : void 0) || env.get("HOME"));
11900
10735
  };
11901
10736
  var windows = function() {
11902
10737
  return normalizePath([
11903
10738
  typeof os$3.homedir === "function" ? os$3.homedir() : void 0,
11904
- env$1.get("USERPROFILE"),
11905
- env$1.get("HOME"),
11906
- env$1.get("HOMEDRIVE") || env$1.get("HOMEPATH") ? path$14.join(env$1.get("HOMEDRIVE") || "", env$1.get("HOMEPATH") || "") : void 0
11907
- ].find(function(v$1) {
11908
- return !isEmpty(v$1);
10739
+ env.get("USERPROFILE"),
10740
+ env.get("HOME"),
10741
+ env.get("HOMEDRIVE") || env.get("HOMEPATH") ? path$14.join(env.get("HOMEDRIVE") || "", env.get("HOMEPATH") || "") : void 0
10742
+ ].find(function(v) {
10743
+ return !isEmpty(v);
11909
10744
  }));
11910
10745
  };
11911
10746
  return isWinOS ? windows() : posix();
@@ -11917,25 +10752,25 @@ var require_OSPaths = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/os-
11917
10752
  function posix() {
11918
10753
  return normalizePath([
11919
10754
  typeof os$3.tmpdir === "function" ? os$3.tmpdir() : void 0,
11920
- env$1.get("TMPDIR"),
11921
- env$1.get("TEMP"),
11922
- env$1.get("TMP")
11923
- ].find(function(v$1) {
11924
- return !isEmpty(v$1);
10755
+ env.get("TMPDIR"),
10756
+ env.get("TEMP"),
10757
+ env.get("TMP")
10758
+ ].find(function(v) {
10759
+ return !isEmpty(v);
11925
10760
  })) || "/tmp";
11926
10761
  }
11927
10762
  function windows() {
11928
10763
  var fallback = "C:\\Temp";
11929
- var v$1 = [
10764
+ var v = [
11930
10765
  typeof os$3.tmpdir === "function" ? os$3.tmpdir : function() {},
11931
10766
  function() {
11932
- return env$1.get("TEMP");
10767
+ return env.get("TEMP");
11933
10768
  },
11934
10769
  function() {
11935
- return env$1.get("TMP");
10770
+ return env.get("TMP");
11936
10771
  },
11937
10772
  function() {
11938
- return joinPathToBase(env$1.get("LOCALAPPDATA"), ["Temp"]);
10773
+ return joinPathToBase(env.get("LOCALAPPDATA"), ["Temp"]);
11939
10774
  },
11940
10775
  function() {
11941
10776
  return joinPathToBase(home(), [
@@ -11945,21 +10780,21 @@ var require_OSPaths = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/os-
11945
10780
  ]);
11946
10781
  },
11947
10782
  function() {
11948
- return joinPathToBase(env$1.get("ALLUSERSPROFILE"), ["Temp"]);
10783
+ return joinPathToBase(env.get("ALLUSERSPROFILE"), ["Temp"]);
11949
10784
  },
11950
10785
  function() {
11951
- return joinPathToBase(env$1.get("SystemRoot"), ["Temp"]);
10786
+ return joinPathToBase(env.get("SystemRoot"), ["Temp"]);
11952
10787
  },
11953
10788
  function() {
11954
- return joinPathToBase(env$1.get("windir"), ["Temp"]);
10789
+ return joinPathToBase(env.get("windir"), ["Temp"]);
11955
10790
  },
11956
10791
  function() {
11957
- return joinPathToBase(env$1.get("SystemDrive"), ["\\", "Temp"]);
10792
+ return joinPathToBase(env.get("SystemDrive"), ["\\", "Temp"]);
11958
10793
  }
11959
- ].find(function(v$2) {
11960
- return v$2 && !isEmpty(v$2());
10794
+ ].find(function(v$1) {
10795
+ return v$1 && !isEmpty(v$1());
11961
10796
  });
11962
- return v$1 && normalizePath(v$1()) || fallback;
10797
+ return v && normalizePath(v()) || fallback;
11963
10798
  }
11964
10799
  return isWinOS ? windows() : posix();
11965
10800
  }
@@ -11981,31 +10816,31 @@ var require_OSPaths = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/os-
11981
10816
  //#endregion
11982
10817
  //#region ../../node_modules/.pnpm/os-paths@7.4.0/node_modules/os-paths/dist/cjs/platform-adapters/node.js
11983
10818
  var require_node$2 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/os-paths@7.4.0/node_modules/os-paths/dist/cjs/platform-adapters/node.js": ((exports) => {
11984
- var __createBinding$2 = exports && exports.__createBinding || (Object.create ? (function(o$2, m$1, k$2, k2) {
11985
- if (k2 === void 0) k2 = k$2;
11986
- Object.defineProperty(o$2, k2, {
10819
+ var __createBinding$2 = exports && exports.__createBinding || (Object.create ? (function(o$1, m, k, k2) {
10820
+ if (k2 === void 0) k2 = k;
10821
+ Object.defineProperty(o$1, k2, {
11987
10822
  enumerable: true,
11988
10823
  get: function() {
11989
- return m$1[k$2];
10824
+ return m[k];
11990
10825
  }
11991
10826
  });
11992
- }) : (function(o$2, m$1, k$2, k2) {
11993
- if (k2 === void 0) k2 = k$2;
11994
- o$2[k2] = m$1[k$2];
10827
+ }) : (function(o$1, m, k, k2) {
10828
+ if (k2 === void 0) k2 = k;
10829
+ o$1[k2] = m[k];
11995
10830
  }));
11996
- var __setModuleDefault$2 = exports && exports.__setModuleDefault || (Object.create ? (function(o$2, v$1) {
11997
- Object.defineProperty(o$2, "default", {
10831
+ var __setModuleDefault$2 = exports && exports.__setModuleDefault || (Object.create ? (function(o$1, v) {
10832
+ Object.defineProperty(o$1, "default", {
11998
10833
  enumerable: true,
11999
- value: v$1
10834
+ value: v
12000
10835
  });
12001
- }) : function(o$2, v$1) {
12002
- o$2["default"] = v$1;
10836
+ }) : function(o$1, v) {
10837
+ o$1["default"] = v;
12003
10838
  });
12004
10839
  var __importStar$2 = exports && exports.__importStar || function(mod) {
12005
10840
  if (mod && mod.__esModule) return mod;
12006
10841
  var result = {};
12007
10842
  if (mod != null) {
12008
- for (var k$2 in mod) if (k$2 !== "default" && Object.prototype.hasOwnProperty.call(mod, k$2)) __createBinding$2(result, mod, k$2);
10843
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding$2(result, mod, k);
12009
10844
  }
12010
10845
  __setModuleDefault$2(result, mod);
12011
10846
  return result;
@@ -12035,31 +10870,31 @@ var require_mod_cjs$2 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/o
12035
10870
  //#endregion
12036
10871
  //#region ../../node_modules/.pnpm/xdg-portable@10.6.0/node_modules/xdg-portable/dist/cjs/platform-adapters/node.js
12037
10872
  var require_node$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/xdg-portable@10.6.0/node_modules/xdg-portable/dist/cjs/platform-adapters/node.js": ((exports) => {
12038
- var __createBinding$1 = exports && exports.__createBinding || (Object.create ? (function(o$2, m$1, k$2, k2) {
12039
- if (k2 === void 0) k2 = k$2;
12040
- Object.defineProperty(o$2, k2, {
10873
+ var __createBinding$1 = exports && exports.__createBinding || (Object.create ? (function(o$1, m, k, k2) {
10874
+ if (k2 === void 0) k2 = k;
10875
+ Object.defineProperty(o$1, k2, {
12041
10876
  enumerable: true,
12042
10877
  get: function() {
12043
- return m$1[k$2];
10878
+ return m[k];
12044
10879
  }
12045
10880
  });
12046
- }) : (function(o$2, m$1, k$2, k2) {
12047
- if (k2 === void 0) k2 = k$2;
12048
- o$2[k2] = m$1[k$2];
10881
+ }) : (function(o$1, m, k, k2) {
10882
+ if (k2 === void 0) k2 = k;
10883
+ o$1[k2] = m[k];
12049
10884
  }));
12050
- var __setModuleDefault$1 = exports && exports.__setModuleDefault || (Object.create ? (function(o$2, v$1) {
12051
- Object.defineProperty(o$2, "default", {
10885
+ var __setModuleDefault$1 = exports && exports.__setModuleDefault || (Object.create ? (function(o$1, v) {
10886
+ Object.defineProperty(o$1, "default", {
12052
10887
  enumerable: true,
12053
- value: v$1
10888
+ value: v
12054
10889
  });
12055
- }) : function(o$2, v$1) {
12056
- o$2["default"] = v$1;
10890
+ }) : function(o$1, v) {
10891
+ o$1["default"] = v;
12057
10892
  });
12058
10893
  var __importStar$1 = exports && exports.__importStar || function(mod) {
12059
10894
  if (mod && mod.__esModule) return mod;
12060
10895
  var result = {};
12061
10896
  if (mod != null) {
12062
- for (var k$2 in mod) if (k$2 !== "default" && Object.prototype.hasOwnProperty.call(mod, k$2)) __createBinding$1(result, mod, k$2);
10897
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding$1(result, mod, k);
12063
10898
  }
12064
10899
  __setModuleDefault$1(result, mod);
12065
10900
  return result;
@@ -12092,31 +10927,31 @@ var require_mod_cjs$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/x
12092
10927
  //#endregion
12093
10928
  //#region ../../node_modules/.pnpm/xdg-app-paths@8.3.0/node_modules/xdg-app-paths/dist/cjs/platform-adapters/node.js
12094
10929
  var require_node = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/xdg-app-paths@8.3.0/node_modules/xdg-app-paths/dist/cjs/platform-adapters/node.js": ((exports) => {
12095
- var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o$2, m$1, k$2, k2) {
12096
- if (k2 === void 0) k2 = k$2;
12097
- Object.defineProperty(o$2, k2, {
10930
+ var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o$1, m, k, k2) {
10931
+ if (k2 === void 0) k2 = k;
10932
+ Object.defineProperty(o$1, k2, {
12098
10933
  enumerable: true,
12099
10934
  get: function() {
12100
- return m$1[k$2];
10935
+ return m[k];
12101
10936
  }
12102
10937
  });
12103
- }) : (function(o$2, m$1, k$2, k2) {
12104
- if (k2 === void 0) k2 = k$2;
12105
- o$2[k2] = m$1[k$2];
10938
+ }) : (function(o$1, m, k, k2) {
10939
+ if (k2 === void 0) k2 = k;
10940
+ o$1[k2] = m[k];
12106
10941
  }));
12107
- var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o$2, v$1) {
12108
- Object.defineProperty(o$2, "default", {
10942
+ var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o$1, v) {
10943
+ Object.defineProperty(o$1, "default", {
12109
10944
  enumerable: true,
12110
- value: v$1
10945
+ value: v
12111
10946
  });
12112
- }) : function(o$2, v$1) {
12113
- o$2["default"] = v$1;
10947
+ }) : function(o$1, v) {
10948
+ o$1["default"] = v;
12114
10949
  });
12115
10950
  var __importStar = exports && exports.__importStar || function(mod) {
12116
10951
  if (mod && mod.__esModule) return mod;
12117
10952
  var result = {};
12118
10953
  if (mod != null) {
12119
- for (var k$2 in mod) if (k$2 !== "default" && Object.prototype.hasOwnProperty.call(mod, k$2)) __createBinding(result, mod, k$2);
10954
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
12120
10955
  }
12121
10956
  __setModuleDefault(result, mod);
12122
10957
  return result;
@@ -12189,7 +11024,7 @@ const getWranglerLoginAuthToken = () => {
12189
11024
  //#endregion
12190
11025
  //#region iac/index.ts
12191
11026
  const getConfigTemplate = (build) => {
12192
- return new __hot_updater_plugin_core.ConfigBuilder().setBuildType(build).setStorage({
11027
+ return new __hot_updater_cli_tools.ConfigBuilder().setBuildType(build).setStorage({
12193
11028
  imports: [{
12194
11029
  pkg: "@hot-updater/cloudflare",
12195
11030
  named: ["r2Storage"]
@@ -12224,9 +11059,9 @@ export default HotUpdater.wrap({
12224
11059
  }),
12225
11060
  })(App);`;
12226
11061
  const deployWorker = async (oauth_token, accountId, { d1DatabaseId, d1DatabaseName, r2BucketName }) => {
12227
- const cwd = (0, __hot_updater_plugin_core.getCwd)();
11062
+ const cwd = (0, __hot_updater_cli_tools.getCwd)();
12228
11063
  const workerPath = require.resolve("@hot-updater/cloudflare/worker", { paths: [cwd] });
12229
- const { tmpDir, removeTmpDir } = await (0, __hot_updater_plugin_core.copyDirToTmp)(path.default.dirname(workerPath));
11064
+ const { tmpDir, removeTmpDir } = await (0, __hot_updater_cli_tools.copyDirToTmp)(path.default.dirname(workerPath));
12230
11065
  try {
12231
11066
  const wranglerConfig = JSON.parse(await fs_promises.default.readFile(path.default.join(tmpDir, "wrangler.json"), "utf-8"));
12232
11067
  wranglerConfig.d1_databases = [{
@@ -12251,15 +11086,15 @@ const deployWorker = async (oauth_token, accountId, { d1DatabaseId, d1DatabaseNa
12251
11086
  for (const file of migrationFiles) if (file.endsWith(".sql")) {
12252
11087
  const filePath = path.default.join(migrationPath, file);
12253
11088
  const content = await fs_promises.default.readFile(filePath, "utf-8");
12254
- await fs_promises.default.writeFile(filePath, (0, __hot_updater_plugin_core.transformTemplate)(content, { BUCKET_NAME: r2BucketName }));
11089
+ await fs_promises.default.writeFile(filePath, (0, __hot_updater_cli_tools.transformTemplate)(content, { BUCKET_NAME: r2BucketName }));
12255
11090
  }
12256
11091
  await wrangler("d1", "migrations", "apply", d1DatabaseName, "--remote");
12257
- const workerName = await he({
11092
+ const workerName = await __hot_updater_cli_tools.p.text({
12258
11093
  message: "Enter the name of the worker",
12259
11094
  defaultValue: "hot-updater",
12260
11095
  placeholder: "hot-updater"
12261
11096
  });
12262
- if (BD(workerName)) process.exit(1);
11097
+ if (__hot_updater_cli_tools.p.isCancel(workerName)) process.exit(1);
12263
11098
  await wrangler("deploy", "--name", workerName);
12264
11099
  return workerName;
12265
11100
  } catch (error) {
@@ -12269,7 +11104,7 @@ const deployWorker = async (oauth_token, accountId, { d1DatabaseId, d1DatabaseNa
12269
11104
  }
12270
11105
  };
12271
11106
  const runInit = async ({ build }) => {
12272
- const cwd = (0, __hot_updater_plugin_core.getCwd)();
11107
+ const cwd = (0, __hot_updater_cli_tools.getCwd)();
12273
11108
  let auth = getWranglerLoginAuthToken();
12274
11109
  if (!auth || (0, import_dayjs_min.default)(auth?.expiration_time).isBefore((0, import_dayjs_min.default)())) {
12275
11110
  await execa("npx", [
@@ -12289,7 +11124,7 @@ const runInit = async ({ build }) => {
12289
11124
  const createKey = `create/${Math.random().toString(36).substring(2, 15)}`;
12290
11125
  const accounts = [];
12291
11126
  try {
12292
- await Te([{
11127
+ await __hot_updater_cli_tools.p.tasks([{
12293
11128
  title: "Checking Account List...",
12294
11129
  task: async () => {
12295
11130
  accounts.push(...(await cf.accounts.list()).result.map((account) => ({
@@ -12298,37 +11133,37 @@ const runInit = async ({ build }) => {
12298
11133
  })));
12299
11134
  }
12300
11135
  }]);
12301
- } catch (e$1) {
12302
- if (e$1 instanceof Error) f.error(e$1.message);
12303
- throw e$1;
11136
+ } catch (e) {
11137
+ if (e instanceof Error) __hot_updater_cli_tools.p.log.error(e.message);
11138
+ throw e;
12304
11139
  }
12305
- const accountId = await ve({
11140
+ const accountId = await __hot_updater_cli_tools.p.select({
12306
11141
  message: "Account List",
12307
11142
  options: accounts.map((account) => ({
12308
11143
  value: account.id,
12309
11144
  label: `${account.name} (${account.id})`
12310
11145
  }))
12311
11146
  });
12312
- if (BD(accountId)) process.exit(1);
12313
- f.step(`Please visit this link to create an API Token: ${(0, __hot_updater_plugin_core.link)(`https://dash.cloudflare.com/${accountId}/api-tokens`)}`);
12314
- f.step("You need edit permissions for both D1 and R2");
12315
- const apiToken = await ge({ message: "Enter the API Token" });
12316
- if (!apiToken) f.warn("Skipping API Token. You can set it later in .env HOT_UPDATER_CLOUDFLARE_API_TOKEN file.");
12317
- if (BD(apiToken)) process.exit(1);
11147
+ if (__hot_updater_cli_tools.p.isCancel(accountId)) process.exit(1);
11148
+ __hot_updater_cli_tools.p.log.step(`Please visit this link to create an API Token: ${(0, __hot_updater_cli_tools.link)(`https://dash.cloudflare.com/${accountId}/api-tokens`)}`);
11149
+ __hot_updater_cli_tools.p.log.step("You need edit permissions for both D1 and R2");
11150
+ const apiToken = await __hot_updater_cli_tools.p.password({ message: "Enter the API Token" });
11151
+ if (!apiToken) __hot_updater_cli_tools.p.log.warn("Skipping API Token. You can set it later in .env HOT_UPDATER_CLOUDFLARE_API_TOKEN file.");
11152
+ if (__hot_updater_cli_tools.p.isCancel(apiToken)) process.exit(1);
12318
11153
  const availableBuckets = [];
12319
11154
  try {
12320
- await Te([{
11155
+ await __hot_updater_cli_tools.p.tasks([{
12321
11156
  title: "Checking R2 Buckets...",
12322
11157
  task: async () => {
12323
11158
  const buckets = (await cf.r2.buckets.list({ account_id: accountId })).buckets ?? [];
12324
11159
  availableBuckets.push(...buckets.filter((bucket) => bucket.name).map((bucket) => ({ name: bucket.name })));
12325
11160
  }
12326
11161
  }]);
12327
- } catch (e$1) {
12328
- if (e$1 instanceof Error) f.error(e$1.message);
12329
- throw e$1;
11162
+ } catch (e) {
11163
+ if (e instanceof Error) __hot_updater_cli_tools.p.log.error(e.message);
11164
+ throw e;
12330
11165
  }
12331
- let selectedBucketName = await ve({
11166
+ let selectedBucketName = await __hot_updater_cli_tools.p.select({
12332
11167
  message: "R2 List",
12333
11168
  options: [...availableBuckets.map((bucket) => ({
12334
11169
  value: bucket.name,
@@ -12338,10 +11173,10 @@ const runInit = async ({ build }) => {
12338
11173
  label: "Create New R2 Bucket"
12339
11174
  }]
12340
11175
  });
12341
- if (BD(selectedBucketName)) process.exit(1);
11176
+ if (__hot_updater_cli_tools.p.isCancel(selectedBucketName)) process.exit(1);
12342
11177
  if (selectedBucketName === createKey) {
12343
- const name = await he({ message: "Enter the name of the new R2 Bucket" });
12344
- if (BD(name)) process.exit(1);
11178
+ const name = await __hot_updater_cli_tools.p.text({ message: "Enter the name of the new R2 Bucket" });
11179
+ if (__hot_updater_cli_tools.p.isCancel(name)) process.exit(1);
12345
11180
  const newR2 = await cf.r2.buckets.create({
12346
11181
  account_id: accountId,
12347
11182
  name
@@ -12349,10 +11184,10 @@ const runInit = async ({ build }) => {
12349
11184
  if (!newR2.name) throw new Error("Failed to create new R2 Bucket");
12350
11185
  selectedBucketName = newR2.name;
12351
11186
  }
12352
- f.info(`Selected R2: ${selectedBucketName}`);
11187
+ __hot_updater_cli_tools.p.log.info(`Selected R2: ${selectedBucketName}`);
12353
11188
  if ((await cf.r2.buckets.domains.managed.list(selectedBucketName, { account_id: accountId })).enabled) {
12354
- if (await ye({ message: "Make R2 bucket private?" })) try {
12355
- await Te([{
11189
+ if (await __hot_updater_cli_tools.p.confirm({ message: "Make R2 bucket private?" })) try {
11190
+ await __hot_updater_cli_tools.p.tasks([{
12356
11191
  title: "Making R2 bucket private...",
12357
11192
  task: async () => {
12358
11193
  await cf.r2.buckets.domains.managed.update(selectedBucketName, {
@@ -12361,14 +11196,14 @@ const runInit = async ({ build }) => {
12361
11196
  });
12362
11197
  }
12363
11198
  }]);
12364
- } catch (e$1) {
12365
- if (e$1 instanceof Error) f.error(e$1.message);
12366
- throw e$1;
11199
+ } catch (e) {
11200
+ if (e instanceof Error) __hot_updater_cli_tools.p.log.error(e.message);
11201
+ throw e;
12367
11202
  }
12368
11203
  }
12369
11204
  const availableD1List = [];
12370
11205
  try {
12371
- await Te([{
11206
+ await __hot_updater_cli_tools.p.tasks([{
12372
11207
  title: "Checking D1 List...",
12373
11208
  task: async () => {
12374
11209
  const d1List = (await cf.d1.database.list({ account_id: accountId })).result ?? [];
@@ -12378,11 +11213,11 @@ const runInit = async ({ build }) => {
12378
11213
  })));
12379
11214
  }
12380
11215
  }]);
12381
- } catch (e$1) {
12382
- if (e$1 instanceof Error) f.error(e$1.message);
12383
- throw e$1;
11216
+ } catch (e) {
11217
+ if (e instanceof Error) __hot_updater_cli_tools.p.log.error(e.message);
11218
+ throw e;
12384
11219
  }
12385
- let selectedD1DatabaseId = await ve({
11220
+ let selectedD1DatabaseId = await __hot_updater_cli_tools.p.select({
12386
11221
  message: "D1 List",
12387
11222
  options: [...availableD1List.map((d1) => ({
12388
11223
  value: d1.uuid,
@@ -12392,10 +11227,10 @@ const runInit = async ({ build }) => {
12392
11227
  label: "Create New D1 Database"
12393
11228
  }]
12394
11229
  });
12395
- if (BD(selectedD1DatabaseId)) process.exit(1);
11230
+ if (__hot_updater_cli_tools.p.isCancel(selectedD1DatabaseId)) process.exit(1);
12396
11231
  if (selectedD1DatabaseId === createKey) {
12397
- const name = await he({ message: "Enter the name of the new D1 Database" });
12398
- if (BD(name)) process.exit(1);
11232
+ const name = await __hot_updater_cli_tools.p.text({ message: "Enter the name of the new D1 Database" });
11233
+ if (__hot_updater_cli_tools.p.isCancel(name)) process.exit(1);
12399
11234
  const newD1 = await cf.d1.database.create({
12400
11235
  account_id: accountId,
12401
11236
  name
@@ -12406,8 +11241,8 @@ const runInit = async ({ build }) => {
12406
11241
  name: newD1.name,
12407
11242
  uuid: newD1.uuid
12408
11243
  });
12409
- f.info(`Created new D1 Database: ${newD1.name} (${newD1.uuid})`);
12410
- } else f.info(`Selected D1: ${selectedD1DatabaseId}`);
11244
+ __hot_updater_cli_tools.p.log.info(`Created new D1 Database: ${newD1.name} (${newD1.uuid})`);
11245
+ } else __hot_updater_cli_tools.p.log.info(`Selected D1: ${selectedD1DatabaseId}`);
12411
11246
  const d1DatabaseName = availableD1List.find((d1) => d1.uuid === selectedD1DatabaseId)?.name;
12412
11247
  if (!d1DatabaseName) throw new Error("Failed to get D1 Database name");
12413
11248
  const subdomains = await cf.workers.subdomains.get({ account_id: accountId });
@@ -12417,17 +11252,17 @@ const runInit = async ({ build }) => {
12417
11252
  r2BucketName: selectedBucketName
12418
11253
  });
12419
11254
  await fs_promises.default.writeFile("hot-updater.config.ts", getConfigTemplate(build));
12420
- await (0, __hot_updater_plugin_core.makeEnv)({
11255
+ await (0, __hot_updater_cli_tools.makeEnv)({
12421
11256
  HOT_UPDATER_CLOUDFLARE_API_TOKEN: apiToken,
12422
11257
  HOT_UPDATER_CLOUDFLARE_ACCOUNT_ID: accountId,
12423
11258
  HOT_UPDATER_CLOUDFLARE_R2_BUCKET_NAME: selectedBucketName,
12424
11259
  HOT_UPDATER_CLOUDFLARE_D1_DATABASE_ID: selectedD1DatabaseId
12425
11260
  });
12426
- f.success("Generated '.env.hotupdater' file with Cloudflare settings.");
12427
- f.success("Generated 'hot-updater.config.ts' file with Cloudflare settings.");
12428
- if (subdomains.subdomain) Me((0, __hot_updater_plugin_core.transformTemplate)(SOURCE_TEMPLATE, { source: `https://${workerName}.${subdomains.subdomain}.workers.dev/api/check-update` }));
12429
- f.message(`Next step: ${(0, __hot_updater_plugin_core.link)("https://hot-updater.dev/guide/providers/2_cloudflare.html#step-4-add-hotupdater-to-your-project")}`);
12430
- f.success("Done! 🎉");
11261
+ __hot_updater_cli_tools.p.log.success("Generated '.env.hotupdater' file with Cloudflare settings.");
11262
+ __hot_updater_cli_tools.p.log.success("Generated 'hot-updater.config.ts' file with Cloudflare settings.");
11263
+ if (subdomains.subdomain) __hot_updater_cli_tools.p.note((0, __hot_updater_cli_tools.transformTemplate)(SOURCE_TEMPLATE, { source: `https://${workerName}.${subdomains.subdomain}.workers.dev/api/check-update` }));
11264
+ __hot_updater_cli_tools.p.log.message(`Next step: ${(0, __hot_updater_cli_tools.link)("https://hot-updater.dev/docs/managed/cloudflare#step-4-add-hotupdater-to-your-project")}`);
11265
+ __hot_updater_cli_tools.p.log.success("Done! 🎉");
12431
11266
  };
12432
11267
 
12433
11268
  //#endregion