ccski 1.1.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +51 -92
- package/dist/chunk-B7onSSqq.mjs +34 -0
- package/dist/cli.mjs +1648 -3551
- package/dist/cli.mjs.map +1 -1
- package/dist/create-prompt-CkW5qmPT.mjs +3107 -0
- package/dist/create-prompt-CkW5qmPT.mjs.map +1 -0
- package/dist/esm-X74pBEPN.mjs +47 -0
- package/dist/esm-X74pBEPN.mjs.map +1 -0
- package/dist/index.d.mts +132 -56
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/{registry-DtGaEhsM.mjs → registry-DNMfmLqa.mjs} +388 -142
- package/dist/registry-DNMfmLqa.mjs.map +1 -0
- package/package.json +18 -4
- package/dist/registry-DtGaEhsM.mjs.map +0 -1
|
@@ -0,0 +1,3107 @@
|
|
|
1
|
+
import { n as __require, r as __toESM, t as __commonJS } from "./chunk-B7onSSqq.mjs";
|
|
2
|
+
import { stripVTControlCharacters } from "node:util";
|
|
3
|
+
import process$1 from "node:process";
|
|
4
|
+
import { AsyncLocalStorage, AsyncResource } from "node:async_hooks";
|
|
5
|
+
import * as readline from "node:readline";
|
|
6
|
+
|
|
7
|
+
//#region node_modules/.pnpm/@inquirer+core@10.3.2_@types+node@22.19.1/node_modules/@inquirer/core/dist/esm/lib/key.js
|
|
8
|
+
const isUpKey = (key, keybindings = []) => key.name === "up" || keybindings.includes("vim") && key.name === "k" || keybindings.includes("emacs") && key.ctrl && key.name === "p";
|
|
9
|
+
const isDownKey = (key, keybindings = []) => key.name === "down" || keybindings.includes("vim") && key.name === "j" || keybindings.includes("emacs") && key.ctrl && key.name === "n";
|
|
10
|
+
const isSpaceKey = (key) => key.name === "space";
|
|
11
|
+
const isTabKey = (key) => key.name === "tab";
|
|
12
|
+
const isNumberKey = (key) => "1234567890".includes(key.name);
|
|
13
|
+
const isEnterKey = (key) => key.name === "enter" || key.name === "return";
|
|
14
|
+
|
|
15
|
+
//#endregion
|
|
16
|
+
//#region node_modules/.pnpm/@inquirer+core@10.3.2_@types+node@22.19.1/node_modules/@inquirer/core/dist/esm/lib/errors.js
|
|
17
|
+
var AbortPromptError = class extends Error {
|
|
18
|
+
name = "AbortPromptError";
|
|
19
|
+
message = "Prompt was aborted";
|
|
20
|
+
constructor(options) {
|
|
21
|
+
super();
|
|
22
|
+
this.cause = options?.cause;
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
var CancelPromptError = class extends Error {
|
|
26
|
+
name = "CancelPromptError";
|
|
27
|
+
message = "Prompt was canceled";
|
|
28
|
+
};
|
|
29
|
+
var ExitPromptError = class extends Error {
|
|
30
|
+
name = "ExitPromptError";
|
|
31
|
+
};
|
|
32
|
+
var HookError = class extends Error {
|
|
33
|
+
name = "HookError";
|
|
34
|
+
};
|
|
35
|
+
var ValidationError = class extends Error {
|
|
36
|
+
name = "ValidationError";
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
//#endregion
|
|
40
|
+
//#region node_modules/.pnpm/@inquirer+core@10.3.2_@types+node@22.19.1/node_modules/@inquirer/core/dist/esm/lib/hook-engine.js
|
|
41
|
+
const hookStorage = new AsyncLocalStorage();
|
|
42
|
+
function createStore(rl) {
|
|
43
|
+
return {
|
|
44
|
+
rl,
|
|
45
|
+
hooks: [],
|
|
46
|
+
hooksCleanup: [],
|
|
47
|
+
hooksEffect: [],
|
|
48
|
+
index: 0,
|
|
49
|
+
handleChange() {}
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
function withHooks(rl, cb) {
|
|
53
|
+
const store = createStore(rl);
|
|
54
|
+
return hookStorage.run(store, () => {
|
|
55
|
+
function cycle(render) {
|
|
56
|
+
store.handleChange = () => {
|
|
57
|
+
store.index = 0;
|
|
58
|
+
render();
|
|
59
|
+
};
|
|
60
|
+
store.handleChange();
|
|
61
|
+
}
|
|
62
|
+
return cb(cycle);
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
function getStore() {
|
|
66
|
+
const store = hookStorage.getStore();
|
|
67
|
+
if (!store) throw new HookError("[Inquirer] Hook functions can only be called from within a prompt");
|
|
68
|
+
return store;
|
|
69
|
+
}
|
|
70
|
+
function readline$1() {
|
|
71
|
+
return getStore().rl;
|
|
72
|
+
}
|
|
73
|
+
function withUpdates(fn) {
|
|
74
|
+
const wrapped = (...args) => {
|
|
75
|
+
const store = getStore();
|
|
76
|
+
let shouldUpdate = false;
|
|
77
|
+
const oldHandleChange = store.handleChange;
|
|
78
|
+
store.handleChange = () => {
|
|
79
|
+
shouldUpdate = true;
|
|
80
|
+
};
|
|
81
|
+
const returnValue = fn(...args);
|
|
82
|
+
if (shouldUpdate) oldHandleChange();
|
|
83
|
+
store.handleChange = oldHandleChange;
|
|
84
|
+
return returnValue;
|
|
85
|
+
};
|
|
86
|
+
return AsyncResource.bind(wrapped);
|
|
87
|
+
}
|
|
88
|
+
function withPointer(cb) {
|
|
89
|
+
const store = getStore();
|
|
90
|
+
const { index } = store;
|
|
91
|
+
const returnValue = cb({
|
|
92
|
+
get() {
|
|
93
|
+
return store.hooks[index];
|
|
94
|
+
},
|
|
95
|
+
set(value) {
|
|
96
|
+
store.hooks[index] = value;
|
|
97
|
+
},
|
|
98
|
+
initialized: index in store.hooks
|
|
99
|
+
});
|
|
100
|
+
store.index++;
|
|
101
|
+
return returnValue;
|
|
102
|
+
}
|
|
103
|
+
function handleChange() {
|
|
104
|
+
getStore().handleChange();
|
|
105
|
+
}
|
|
106
|
+
const effectScheduler = {
|
|
107
|
+
queue(cb) {
|
|
108
|
+
const store = getStore();
|
|
109
|
+
const { index } = store;
|
|
110
|
+
store.hooksEffect.push(() => {
|
|
111
|
+
store.hooksCleanup[index]?.();
|
|
112
|
+
const cleanFn = cb(readline$1());
|
|
113
|
+
if (cleanFn != null && typeof cleanFn !== "function") throw new ValidationError("useEffect return value must be a cleanup function or nothing.");
|
|
114
|
+
store.hooksCleanup[index] = cleanFn;
|
|
115
|
+
});
|
|
116
|
+
},
|
|
117
|
+
run() {
|
|
118
|
+
const store = getStore();
|
|
119
|
+
withUpdates(() => {
|
|
120
|
+
store.hooksEffect.forEach((effect) => {
|
|
121
|
+
effect();
|
|
122
|
+
});
|
|
123
|
+
store.hooksEffect.length = 0;
|
|
124
|
+
})();
|
|
125
|
+
},
|
|
126
|
+
clearAll() {
|
|
127
|
+
const store = getStore();
|
|
128
|
+
store.hooksCleanup.forEach((cleanFn) => {
|
|
129
|
+
cleanFn?.();
|
|
130
|
+
});
|
|
131
|
+
store.hooksEffect.length = 0;
|
|
132
|
+
store.hooksCleanup.length = 0;
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
//#endregion
|
|
137
|
+
//#region node_modules/.pnpm/@inquirer+core@10.3.2_@types+node@22.19.1/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
|
138
|
+
function useState(defaultValue) {
|
|
139
|
+
return withPointer((pointer) => {
|
|
140
|
+
const setState = AsyncResource.bind(function setState$1(newValue) {
|
|
141
|
+
if (pointer.get() !== newValue) {
|
|
142
|
+
pointer.set(newValue);
|
|
143
|
+
handleChange();
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
if (pointer.initialized) return [pointer.get(), setState];
|
|
147
|
+
const value = typeof defaultValue === "function" ? defaultValue() : defaultValue;
|
|
148
|
+
pointer.set(value);
|
|
149
|
+
return [value, setState];
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
//#endregion
|
|
154
|
+
//#region node_modules/.pnpm/@inquirer+core@10.3.2_@types+node@22.19.1/node_modules/@inquirer/core/dist/esm/lib/use-effect.js
|
|
155
|
+
function useEffect(cb, depArray) {
|
|
156
|
+
withPointer((pointer) => {
|
|
157
|
+
const oldDeps = pointer.get();
|
|
158
|
+
if (!Array.isArray(oldDeps) || depArray.some((dep, i) => !Object.is(dep, oldDeps[i]))) effectScheduler.queue(cb);
|
|
159
|
+
pointer.set(depArray);
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
//#endregion
|
|
164
|
+
//#region node_modules/.pnpm/yoctocolors-cjs@2.1.3/node_modules/yoctocolors-cjs/index.js
|
|
165
|
+
var require_yoctocolors_cjs = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/yoctocolors-cjs@2.1.3/node_modules/yoctocolors-cjs/index.js": ((exports, module) => {
|
|
166
|
+
const hasColors = __require("node:tty")?.WriteStream?.prototype?.hasColors?.() ?? false;
|
|
167
|
+
const format = (open, close) => {
|
|
168
|
+
if (!hasColors) return (input) => input;
|
|
169
|
+
const openCode = `\u001B[${open}m`;
|
|
170
|
+
const closeCode = `\u001B[${close}m`;
|
|
171
|
+
return (input) => {
|
|
172
|
+
const string = input + "";
|
|
173
|
+
let index = string.indexOf(closeCode);
|
|
174
|
+
if (index === -1) return openCode + string + closeCode;
|
|
175
|
+
let result = openCode;
|
|
176
|
+
let lastIndex = 0;
|
|
177
|
+
const replaceCode = (close === 22 ? closeCode : "") + openCode;
|
|
178
|
+
while (index !== -1) {
|
|
179
|
+
result += string.slice(lastIndex, index) + replaceCode;
|
|
180
|
+
lastIndex = index + closeCode.length;
|
|
181
|
+
index = string.indexOf(closeCode, lastIndex);
|
|
182
|
+
}
|
|
183
|
+
result += string.slice(lastIndex) + closeCode;
|
|
184
|
+
return result;
|
|
185
|
+
};
|
|
186
|
+
};
|
|
187
|
+
const colors$1 = {};
|
|
188
|
+
colors$1.reset = format(0, 0);
|
|
189
|
+
colors$1.bold = format(1, 22);
|
|
190
|
+
colors$1.dim = format(2, 22);
|
|
191
|
+
colors$1.italic = format(3, 23);
|
|
192
|
+
colors$1.underline = format(4, 24);
|
|
193
|
+
colors$1.overline = format(53, 55);
|
|
194
|
+
colors$1.inverse = format(7, 27);
|
|
195
|
+
colors$1.hidden = format(8, 28);
|
|
196
|
+
colors$1.strikethrough = format(9, 29);
|
|
197
|
+
colors$1.black = format(30, 39);
|
|
198
|
+
colors$1.red = format(31, 39);
|
|
199
|
+
colors$1.green = format(32, 39);
|
|
200
|
+
colors$1.yellow = format(33, 39);
|
|
201
|
+
colors$1.blue = format(34, 39);
|
|
202
|
+
colors$1.magenta = format(35, 39);
|
|
203
|
+
colors$1.cyan = format(36, 39);
|
|
204
|
+
colors$1.white = format(37, 39);
|
|
205
|
+
colors$1.gray = format(90, 39);
|
|
206
|
+
colors$1.bgBlack = format(40, 49);
|
|
207
|
+
colors$1.bgRed = format(41, 49);
|
|
208
|
+
colors$1.bgGreen = format(42, 49);
|
|
209
|
+
colors$1.bgYellow = format(43, 49);
|
|
210
|
+
colors$1.bgBlue = format(44, 49);
|
|
211
|
+
colors$1.bgMagenta = format(45, 49);
|
|
212
|
+
colors$1.bgCyan = format(46, 49);
|
|
213
|
+
colors$1.bgWhite = format(47, 49);
|
|
214
|
+
colors$1.bgGray = format(100, 49);
|
|
215
|
+
colors$1.redBright = format(91, 39);
|
|
216
|
+
colors$1.greenBright = format(92, 39);
|
|
217
|
+
colors$1.yellowBright = format(93, 39);
|
|
218
|
+
colors$1.blueBright = format(94, 39);
|
|
219
|
+
colors$1.magentaBright = format(95, 39);
|
|
220
|
+
colors$1.cyanBright = format(96, 39);
|
|
221
|
+
colors$1.whiteBright = format(97, 39);
|
|
222
|
+
colors$1.bgRedBright = format(101, 49);
|
|
223
|
+
colors$1.bgGreenBright = format(102, 49);
|
|
224
|
+
colors$1.bgYellowBright = format(103, 49);
|
|
225
|
+
colors$1.bgBlueBright = format(104, 49);
|
|
226
|
+
colors$1.bgMagentaBright = format(105, 49);
|
|
227
|
+
colors$1.bgCyanBright = format(106, 49);
|
|
228
|
+
colors$1.bgWhiteBright = format(107, 49);
|
|
229
|
+
module.exports = colors$1;
|
|
230
|
+
}) });
|
|
231
|
+
|
|
232
|
+
//#endregion
|
|
233
|
+
//#region node_modules/.pnpm/@inquirer+figures@1.0.15/node_modules/@inquirer/figures/dist/esm/index.js
|
|
234
|
+
function isUnicodeSupported() {
|
|
235
|
+
if (process$1.platform !== "win32") return process$1.env["TERM"] !== "linux";
|
|
236
|
+
return Boolean(process$1.env["WT_SESSION"]) || Boolean(process$1.env["TERMINUS_SUBLIME"]) || process$1.env["ConEmuTask"] === "{cmd::Cmder}" || process$1.env["TERM_PROGRAM"] === "Terminus-Sublime" || process$1.env["TERM_PROGRAM"] === "vscode" || process$1.env["TERM"] === "xterm-256color" || process$1.env["TERM"] === "alacritty" || process$1.env["TERMINAL_EMULATOR"] === "JetBrains-JediTerm";
|
|
237
|
+
}
|
|
238
|
+
const common = {
|
|
239
|
+
circleQuestionMark: "(?)",
|
|
240
|
+
questionMarkPrefix: "(?)",
|
|
241
|
+
square: "█",
|
|
242
|
+
squareDarkShade: "▓",
|
|
243
|
+
squareMediumShade: "▒",
|
|
244
|
+
squareLightShade: "░",
|
|
245
|
+
squareTop: "▀",
|
|
246
|
+
squareBottom: "▄",
|
|
247
|
+
squareLeft: "▌",
|
|
248
|
+
squareRight: "▐",
|
|
249
|
+
squareCenter: "■",
|
|
250
|
+
bullet: "●",
|
|
251
|
+
dot: "․",
|
|
252
|
+
ellipsis: "…",
|
|
253
|
+
pointerSmall: "›",
|
|
254
|
+
triangleUp: "▲",
|
|
255
|
+
triangleUpSmall: "▴",
|
|
256
|
+
triangleDown: "▼",
|
|
257
|
+
triangleDownSmall: "▾",
|
|
258
|
+
triangleLeftSmall: "◂",
|
|
259
|
+
triangleRightSmall: "▸",
|
|
260
|
+
home: "⌂",
|
|
261
|
+
heart: "♥",
|
|
262
|
+
musicNote: "♪",
|
|
263
|
+
musicNoteBeamed: "♫",
|
|
264
|
+
arrowUp: "↑",
|
|
265
|
+
arrowDown: "↓",
|
|
266
|
+
arrowLeft: "←",
|
|
267
|
+
arrowRight: "→",
|
|
268
|
+
arrowLeftRight: "↔",
|
|
269
|
+
arrowUpDown: "↕",
|
|
270
|
+
almostEqual: "≈",
|
|
271
|
+
notEqual: "≠",
|
|
272
|
+
lessOrEqual: "≤",
|
|
273
|
+
greaterOrEqual: "≥",
|
|
274
|
+
identical: "≡",
|
|
275
|
+
infinity: "∞",
|
|
276
|
+
subscriptZero: "₀",
|
|
277
|
+
subscriptOne: "₁",
|
|
278
|
+
subscriptTwo: "₂",
|
|
279
|
+
subscriptThree: "₃",
|
|
280
|
+
subscriptFour: "₄",
|
|
281
|
+
subscriptFive: "₅",
|
|
282
|
+
subscriptSix: "₆",
|
|
283
|
+
subscriptSeven: "₇",
|
|
284
|
+
subscriptEight: "₈",
|
|
285
|
+
subscriptNine: "₉",
|
|
286
|
+
oneHalf: "½",
|
|
287
|
+
oneThird: "⅓",
|
|
288
|
+
oneQuarter: "¼",
|
|
289
|
+
oneFifth: "⅕",
|
|
290
|
+
oneSixth: "⅙",
|
|
291
|
+
oneEighth: "⅛",
|
|
292
|
+
twoThirds: "⅔",
|
|
293
|
+
twoFifths: "⅖",
|
|
294
|
+
threeQuarters: "¾",
|
|
295
|
+
threeFifths: "⅗",
|
|
296
|
+
threeEighths: "⅜",
|
|
297
|
+
fourFifths: "⅘",
|
|
298
|
+
fiveSixths: "⅚",
|
|
299
|
+
fiveEighths: "⅝",
|
|
300
|
+
sevenEighths: "⅞",
|
|
301
|
+
line: "─",
|
|
302
|
+
lineBold: "━",
|
|
303
|
+
lineDouble: "═",
|
|
304
|
+
lineDashed0: "┄",
|
|
305
|
+
lineDashed1: "┅",
|
|
306
|
+
lineDashed2: "┈",
|
|
307
|
+
lineDashed3: "┉",
|
|
308
|
+
lineDashed4: "╌",
|
|
309
|
+
lineDashed5: "╍",
|
|
310
|
+
lineDashed6: "╴",
|
|
311
|
+
lineDashed7: "╶",
|
|
312
|
+
lineDashed8: "╸",
|
|
313
|
+
lineDashed9: "╺",
|
|
314
|
+
lineDashed10: "╼",
|
|
315
|
+
lineDashed11: "╾",
|
|
316
|
+
lineDashed12: "−",
|
|
317
|
+
lineDashed13: "–",
|
|
318
|
+
lineDashed14: "‐",
|
|
319
|
+
lineDashed15: "⁃",
|
|
320
|
+
lineVertical: "│",
|
|
321
|
+
lineVerticalBold: "┃",
|
|
322
|
+
lineVerticalDouble: "║",
|
|
323
|
+
lineVerticalDashed0: "┆",
|
|
324
|
+
lineVerticalDashed1: "┇",
|
|
325
|
+
lineVerticalDashed2: "┊",
|
|
326
|
+
lineVerticalDashed3: "┋",
|
|
327
|
+
lineVerticalDashed4: "╎",
|
|
328
|
+
lineVerticalDashed5: "╏",
|
|
329
|
+
lineVerticalDashed6: "╵",
|
|
330
|
+
lineVerticalDashed7: "╷",
|
|
331
|
+
lineVerticalDashed8: "╹",
|
|
332
|
+
lineVerticalDashed9: "╻",
|
|
333
|
+
lineVerticalDashed10: "╽",
|
|
334
|
+
lineVerticalDashed11: "╿",
|
|
335
|
+
lineDownLeft: "┐",
|
|
336
|
+
lineDownLeftArc: "╮",
|
|
337
|
+
lineDownBoldLeftBold: "┓",
|
|
338
|
+
lineDownBoldLeft: "┒",
|
|
339
|
+
lineDownLeftBold: "┑",
|
|
340
|
+
lineDownDoubleLeftDouble: "╗",
|
|
341
|
+
lineDownDoubleLeft: "╖",
|
|
342
|
+
lineDownLeftDouble: "╕",
|
|
343
|
+
lineDownRight: "┌",
|
|
344
|
+
lineDownRightArc: "╭",
|
|
345
|
+
lineDownBoldRightBold: "┏",
|
|
346
|
+
lineDownBoldRight: "┎",
|
|
347
|
+
lineDownRightBold: "┍",
|
|
348
|
+
lineDownDoubleRightDouble: "╔",
|
|
349
|
+
lineDownDoubleRight: "╓",
|
|
350
|
+
lineDownRightDouble: "╒",
|
|
351
|
+
lineUpLeft: "┘",
|
|
352
|
+
lineUpLeftArc: "╯",
|
|
353
|
+
lineUpBoldLeftBold: "┛",
|
|
354
|
+
lineUpBoldLeft: "┚",
|
|
355
|
+
lineUpLeftBold: "┙",
|
|
356
|
+
lineUpDoubleLeftDouble: "╝",
|
|
357
|
+
lineUpDoubleLeft: "╜",
|
|
358
|
+
lineUpLeftDouble: "╛",
|
|
359
|
+
lineUpRight: "└",
|
|
360
|
+
lineUpRightArc: "╰",
|
|
361
|
+
lineUpBoldRightBold: "┗",
|
|
362
|
+
lineUpBoldRight: "┖",
|
|
363
|
+
lineUpRightBold: "┕",
|
|
364
|
+
lineUpDoubleRightDouble: "╚",
|
|
365
|
+
lineUpDoubleRight: "╙",
|
|
366
|
+
lineUpRightDouble: "╘",
|
|
367
|
+
lineUpDownLeft: "┤",
|
|
368
|
+
lineUpBoldDownBoldLeftBold: "┫",
|
|
369
|
+
lineUpBoldDownBoldLeft: "┨",
|
|
370
|
+
lineUpDownLeftBold: "┥",
|
|
371
|
+
lineUpBoldDownLeftBold: "┩",
|
|
372
|
+
lineUpDownBoldLeftBold: "┪",
|
|
373
|
+
lineUpDownBoldLeft: "┧",
|
|
374
|
+
lineUpBoldDownLeft: "┦",
|
|
375
|
+
lineUpDoubleDownDoubleLeftDouble: "╣",
|
|
376
|
+
lineUpDoubleDownDoubleLeft: "╢",
|
|
377
|
+
lineUpDownLeftDouble: "╡",
|
|
378
|
+
lineUpDownRight: "├",
|
|
379
|
+
lineUpBoldDownBoldRightBold: "┣",
|
|
380
|
+
lineUpBoldDownBoldRight: "┠",
|
|
381
|
+
lineUpDownRightBold: "┝",
|
|
382
|
+
lineUpBoldDownRightBold: "┡",
|
|
383
|
+
lineUpDownBoldRightBold: "┢",
|
|
384
|
+
lineUpDownBoldRight: "┟",
|
|
385
|
+
lineUpBoldDownRight: "┞",
|
|
386
|
+
lineUpDoubleDownDoubleRightDouble: "╠",
|
|
387
|
+
lineUpDoubleDownDoubleRight: "╟",
|
|
388
|
+
lineUpDownRightDouble: "╞",
|
|
389
|
+
lineDownLeftRight: "┬",
|
|
390
|
+
lineDownBoldLeftBoldRightBold: "┳",
|
|
391
|
+
lineDownLeftBoldRightBold: "┯",
|
|
392
|
+
lineDownBoldLeftRight: "┰",
|
|
393
|
+
lineDownBoldLeftBoldRight: "┱",
|
|
394
|
+
lineDownBoldLeftRightBold: "┲",
|
|
395
|
+
lineDownLeftRightBold: "┮",
|
|
396
|
+
lineDownLeftBoldRight: "┭",
|
|
397
|
+
lineDownDoubleLeftDoubleRightDouble: "╦",
|
|
398
|
+
lineDownDoubleLeftRight: "╥",
|
|
399
|
+
lineDownLeftDoubleRightDouble: "╤",
|
|
400
|
+
lineUpLeftRight: "┴",
|
|
401
|
+
lineUpBoldLeftBoldRightBold: "┻",
|
|
402
|
+
lineUpLeftBoldRightBold: "┷",
|
|
403
|
+
lineUpBoldLeftRight: "┸",
|
|
404
|
+
lineUpBoldLeftBoldRight: "┹",
|
|
405
|
+
lineUpBoldLeftRightBold: "┺",
|
|
406
|
+
lineUpLeftRightBold: "┶",
|
|
407
|
+
lineUpLeftBoldRight: "┵",
|
|
408
|
+
lineUpDoubleLeftDoubleRightDouble: "╩",
|
|
409
|
+
lineUpDoubleLeftRight: "╨",
|
|
410
|
+
lineUpLeftDoubleRightDouble: "╧",
|
|
411
|
+
lineUpDownLeftRight: "┼",
|
|
412
|
+
lineUpBoldDownBoldLeftBoldRightBold: "╋",
|
|
413
|
+
lineUpDownBoldLeftBoldRightBold: "╈",
|
|
414
|
+
lineUpBoldDownLeftBoldRightBold: "╇",
|
|
415
|
+
lineUpBoldDownBoldLeftRightBold: "╊",
|
|
416
|
+
lineUpBoldDownBoldLeftBoldRight: "╉",
|
|
417
|
+
lineUpBoldDownLeftRight: "╀",
|
|
418
|
+
lineUpDownBoldLeftRight: "╁",
|
|
419
|
+
lineUpDownLeftBoldRight: "┽",
|
|
420
|
+
lineUpDownLeftRightBold: "┾",
|
|
421
|
+
lineUpBoldDownBoldLeftRight: "╂",
|
|
422
|
+
lineUpDownLeftBoldRightBold: "┿",
|
|
423
|
+
lineUpBoldDownLeftBoldRight: "╃",
|
|
424
|
+
lineUpBoldDownLeftRightBold: "╄",
|
|
425
|
+
lineUpDownBoldLeftBoldRight: "╅",
|
|
426
|
+
lineUpDownBoldLeftRightBold: "╆",
|
|
427
|
+
lineUpDoubleDownDoubleLeftDoubleRightDouble: "╬",
|
|
428
|
+
lineUpDoubleDownDoubleLeftRight: "╫",
|
|
429
|
+
lineUpDownLeftDoubleRightDouble: "╪",
|
|
430
|
+
lineCross: "╳",
|
|
431
|
+
lineBackslash: "╲",
|
|
432
|
+
lineSlash: "╱"
|
|
433
|
+
};
|
|
434
|
+
const specialMainSymbols = {
|
|
435
|
+
tick: "✔",
|
|
436
|
+
info: "ℹ",
|
|
437
|
+
warning: "⚠",
|
|
438
|
+
cross: "✘",
|
|
439
|
+
squareSmall: "◻",
|
|
440
|
+
squareSmallFilled: "◼",
|
|
441
|
+
circle: "◯",
|
|
442
|
+
circleFilled: "◉",
|
|
443
|
+
circleDotted: "◌",
|
|
444
|
+
circleDouble: "◎",
|
|
445
|
+
circleCircle: "ⓞ",
|
|
446
|
+
circleCross: "ⓧ",
|
|
447
|
+
circlePipe: "Ⓘ",
|
|
448
|
+
radioOn: "◉",
|
|
449
|
+
radioOff: "◯",
|
|
450
|
+
checkboxOn: "☒",
|
|
451
|
+
checkboxOff: "☐",
|
|
452
|
+
checkboxCircleOn: "ⓧ",
|
|
453
|
+
checkboxCircleOff: "Ⓘ",
|
|
454
|
+
pointer: "❯",
|
|
455
|
+
triangleUpOutline: "△",
|
|
456
|
+
triangleLeft: "◀",
|
|
457
|
+
triangleRight: "▶",
|
|
458
|
+
lozenge: "◆",
|
|
459
|
+
lozengeOutline: "◇",
|
|
460
|
+
hamburger: "☰",
|
|
461
|
+
smiley: "㋡",
|
|
462
|
+
mustache: "෴",
|
|
463
|
+
star: "★",
|
|
464
|
+
play: "▶",
|
|
465
|
+
nodejs: "⬢",
|
|
466
|
+
oneSeventh: "⅐",
|
|
467
|
+
oneNinth: "⅑",
|
|
468
|
+
oneTenth: "⅒"
|
|
469
|
+
};
|
|
470
|
+
const specialFallbackSymbols = {
|
|
471
|
+
tick: "√",
|
|
472
|
+
info: "i",
|
|
473
|
+
warning: "‼",
|
|
474
|
+
cross: "×",
|
|
475
|
+
squareSmall: "□",
|
|
476
|
+
squareSmallFilled: "■",
|
|
477
|
+
circle: "( )",
|
|
478
|
+
circleFilled: "(*)",
|
|
479
|
+
circleDotted: "( )",
|
|
480
|
+
circleDouble: "( )",
|
|
481
|
+
circleCircle: "(○)",
|
|
482
|
+
circleCross: "(×)",
|
|
483
|
+
circlePipe: "(│)",
|
|
484
|
+
radioOn: "(*)",
|
|
485
|
+
radioOff: "( )",
|
|
486
|
+
checkboxOn: "[×]",
|
|
487
|
+
checkboxOff: "[ ]",
|
|
488
|
+
checkboxCircleOn: "(×)",
|
|
489
|
+
checkboxCircleOff: "( )",
|
|
490
|
+
pointer: ">",
|
|
491
|
+
triangleUpOutline: "∆",
|
|
492
|
+
triangleLeft: "◄",
|
|
493
|
+
triangleRight: "►",
|
|
494
|
+
lozenge: "♦",
|
|
495
|
+
lozengeOutline: "◊",
|
|
496
|
+
hamburger: "≡",
|
|
497
|
+
smiley: "☺",
|
|
498
|
+
mustache: "┌─┐",
|
|
499
|
+
star: "✶",
|
|
500
|
+
play: "►",
|
|
501
|
+
nodejs: "♦",
|
|
502
|
+
oneSeventh: "1/7",
|
|
503
|
+
oneNinth: "1/9",
|
|
504
|
+
oneTenth: "1/10"
|
|
505
|
+
};
|
|
506
|
+
const mainSymbols = {
|
|
507
|
+
...common,
|
|
508
|
+
...specialMainSymbols
|
|
509
|
+
};
|
|
510
|
+
const fallbackSymbols = {
|
|
511
|
+
...common,
|
|
512
|
+
...specialFallbackSymbols
|
|
513
|
+
};
|
|
514
|
+
const shouldUseMain = isUnicodeSupported();
|
|
515
|
+
const figures = shouldUseMain ? mainSymbols : fallbackSymbols;
|
|
516
|
+
var esm_default = figures;
|
|
517
|
+
const replacements = Object.entries(specialMainSymbols);
|
|
518
|
+
|
|
519
|
+
//#endregion
|
|
520
|
+
//#region node_modules/.pnpm/@inquirer+core@10.3.2_@types+node@22.19.1/node_modules/@inquirer/core/dist/esm/lib/theme.js
|
|
521
|
+
var import_yoctocolors_cjs = /* @__PURE__ */ __toESM(require_yoctocolors_cjs(), 1);
|
|
522
|
+
const defaultTheme = {
|
|
523
|
+
prefix: {
|
|
524
|
+
idle: import_yoctocolors_cjs.default.blue("?"),
|
|
525
|
+
done: import_yoctocolors_cjs.default.green(esm_default.tick)
|
|
526
|
+
},
|
|
527
|
+
spinner: {
|
|
528
|
+
interval: 80,
|
|
529
|
+
frames: [
|
|
530
|
+
"⠋",
|
|
531
|
+
"⠙",
|
|
532
|
+
"⠹",
|
|
533
|
+
"⠸",
|
|
534
|
+
"⠼",
|
|
535
|
+
"⠴",
|
|
536
|
+
"⠦",
|
|
537
|
+
"⠧",
|
|
538
|
+
"⠇",
|
|
539
|
+
"⠏"
|
|
540
|
+
].map((frame) => import_yoctocolors_cjs.default.yellow(frame))
|
|
541
|
+
},
|
|
542
|
+
style: {
|
|
543
|
+
answer: import_yoctocolors_cjs.default.cyan,
|
|
544
|
+
message: import_yoctocolors_cjs.default.bold,
|
|
545
|
+
error: (text) => import_yoctocolors_cjs.default.red(`> ${text}`),
|
|
546
|
+
defaultAnswer: (text) => import_yoctocolors_cjs.default.dim(`(${text})`),
|
|
547
|
+
help: import_yoctocolors_cjs.default.dim,
|
|
548
|
+
highlight: import_yoctocolors_cjs.default.cyan,
|
|
549
|
+
key: (text) => import_yoctocolors_cjs.default.cyan(import_yoctocolors_cjs.default.bold(`<${text}>`))
|
|
550
|
+
}
|
|
551
|
+
};
|
|
552
|
+
|
|
553
|
+
//#endregion
|
|
554
|
+
//#region node_modules/.pnpm/@inquirer+core@10.3.2_@types+node@22.19.1/node_modules/@inquirer/core/dist/esm/lib/make-theme.js
|
|
555
|
+
function isPlainObject(value) {
|
|
556
|
+
if (typeof value !== "object" || value === null) return false;
|
|
557
|
+
let proto = value;
|
|
558
|
+
while (Object.getPrototypeOf(proto) !== null) proto = Object.getPrototypeOf(proto);
|
|
559
|
+
return Object.getPrototypeOf(value) === proto;
|
|
560
|
+
}
|
|
561
|
+
function deepMerge(...objects) {
|
|
562
|
+
const output = {};
|
|
563
|
+
for (const obj of objects) for (const [key, value] of Object.entries(obj)) {
|
|
564
|
+
const prevValue = output[key];
|
|
565
|
+
output[key] = isPlainObject(prevValue) && isPlainObject(value) ? deepMerge(prevValue, value) : value;
|
|
566
|
+
}
|
|
567
|
+
return output;
|
|
568
|
+
}
|
|
569
|
+
function makeTheme(...themes) {
|
|
570
|
+
return deepMerge(...[defaultTheme, ...themes.filter((theme) => theme != null)]);
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
//#endregion
|
|
574
|
+
//#region node_modules/.pnpm/@inquirer+core@10.3.2_@types+node@22.19.1/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
|
575
|
+
function usePrefix({ status = "idle", theme }) {
|
|
576
|
+
const [showLoader, setShowLoader] = useState(false);
|
|
577
|
+
const [tick, setTick] = useState(0);
|
|
578
|
+
const { prefix, spinner } = makeTheme(theme);
|
|
579
|
+
useEffect(() => {
|
|
580
|
+
if (status === "loading") {
|
|
581
|
+
let tickInterval;
|
|
582
|
+
let inc = -1;
|
|
583
|
+
const delayTimeout = setTimeout(() => {
|
|
584
|
+
setShowLoader(true);
|
|
585
|
+
tickInterval = setInterval(() => {
|
|
586
|
+
inc = inc + 1;
|
|
587
|
+
setTick(inc % spinner.frames.length);
|
|
588
|
+
}, spinner.interval);
|
|
589
|
+
}, 300);
|
|
590
|
+
return () => {
|
|
591
|
+
clearTimeout(delayTimeout);
|
|
592
|
+
clearInterval(tickInterval);
|
|
593
|
+
};
|
|
594
|
+
} else setShowLoader(false);
|
|
595
|
+
}, [status]);
|
|
596
|
+
if (showLoader) return spinner.frames[tick];
|
|
597
|
+
return typeof prefix === "string" ? prefix : prefix[status === "loading" ? "idle" : status] ?? prefix["idle"];
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
//#endregion
|
|
601
|
+
//#region node_modules/.pnpm/@inquirer+core@10.3.2_@types+node@22.19.1/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
|
602
|
+
function useRef(val) {
|
|
603
|
+
return useState({ current: val })[0];
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
//#endregion
|
|
607
|
+
//#region node_modules/.pnpm/@inquirer+core@10.3.2_@types+node@22.19.1/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
|
608
|
+
function useKeypress(userHandler) {
|
|
609
|
+
const signal = useRef(userHandler);
|
|
610
|
+
signal.current = userHandler;
|
|
611
|
+
useEffect((rl) => {
|
|
612
|
+
let ignore = false;
|
|
613
|
+
const handler = withUpdates((_input, event) => {
|
|
614
|
+
if (ignore) return;
|
|
615
|
+
signal.current(event, rl);
|
|
616
|
+
});
|
|
617
|
+
rl.input.on("keypress", handler);
|
|
618
|
+
return () => {
|
|
619
|
+
ignore = true;
|
|
620
|
+
rl.input.removeListener("keypress", handler);
|
|
621
|
+
};
|
|
622
|
+
}, []);
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
//#endregion
|
|
626
|
+
//#region node_modules/.pnpm/cli-width@4.1.0/node_modules/cli-width/index.js
|
|
627
|
+
var require_cli_width = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/cli-width@4.1.0/node_modules/cli-width/index.js": ((exports, module) => {
|
|
628
|
+
module.exports = cliWidth$1;
|
|
629
|
+
function normalizeOpts(options) {
|
|
630
|
+
const defaultOpts = {
|
|
631
|
+
defaultWidth: 0,
|
|
632
|
+
output: process.stdout,
|
|
633
|
+
tty: __require("tty")
|
|
634
|
+
};
|
|
635
|
+
if (!options) return defaultOpts;
|
|
636
|
+
Object.keys(defaultOpts).forEach(function(key) {
|
|
637
|
+
if (!options[key]) options[key] = defaultOpts[key];
|
|
638
|
+
});
|
|
639
|
+
return options;
|
|
640
|
+
}
|
|
641
|
+
function cliWidth$1(options) {
|
|
642
|
+
const opts = normalizeOpts(options);
|
|
643
|
+
if (opts.output.getWindowSize) return opts.output.getWindowSize()[0] || opts.defaultWidth;
|
|
644
|
+
if (opts.tty.getWindowSize) return opts.tty.getWindowSize()[1] || opts.defaultWidth;
|
|
645
|
+
if (opts.output.columns) return opts.output.columns;
|
|
646
|
+
if (process.env.CLI_WIDTH) {
|
|
647
|
+
const width = parseInt(process.env.CLI_WIDTH, 10);
|
|
648
|
+
if (!isNaN(width) && width !== 0) return width;
|
|
649
|
+
}
|
|
650
|
+
return opts.defaultWidth;
|
|
651
|
+
}
|
|
652
|
+
}) });
|
|
653
|
+
|
|
654
|
+
//#endregion
|
|
655
|
+
//#region node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/index.js
|
|
656
|
+
var require_ansi_regex = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/index.js": ((exports, module) => {
|
|
657
|
+
module.exports = ({ onlyFirst = false } = {}) => {
|
|
658
|
+
const pattern = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");
|
|
659
|
+
return new RegExp(pattern, onlyFirst ? void 0 : "g");
|
|
660
|
+
};
|
|
661
|
+
}) });
|
|
662
|
+
|
|
663
|
+
//#endregion
|
|
664
|
+
//#region node_modules/.pnpm/strip-ansi@6.0.1/node_modules/strip-ansi/index.js
|
|
665
|
+
var require_strip_ansi = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/strip-ansi@6.0.1/node_modules/strip-ansi/index.js": ((exports, module) => {
|
|
666
|
+
const ansiRegex = require_ansi_regex();
|
|
667
|
+
module.exports = (string) => typeof string === "string" ? string.replace(ansiRegex(), "") : string;
|
|
668
|
+
}) });
|
|
669
|
+
|
|
670
|
+
//#endregion
|
|
671
|
+
//#region node_modules/.pnpm/is-fullwidth-code-point@3.0.0/node_modules/is-fullwidth-code-point/index.js
|
|
672
|
+
var require_is_fullwidth_code_point = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/is-fullwidth-code-point@3.0.0/node_modules/is-fullwidth-code-point/index.js": ((exports, module) => {
|
|
673
|
+
const isFullwidthCodePoint$1 = (codePoint) => {
|
|
674
|
+
if (Number.isNaN(codePoint)) return false;
|
|
675
|
+
if (codePoint >= 4352 && (codePoint <= 4447 || codePoint === 9001 || codePoint === 9002 || 11904 <= codePoint && codePoint <= 12871 && codePoint !== 12351 || 12880 <= codePoint && codePoint <= 19903 || 19968 <= codePoint && codePoint <= 42182 || 43360 <= codePoint && codePoint <= 43388 || 44032 <= codePoint && codePoint <= 55203 || 63744 <= codePoint && codePoint <= 64255 || 65040 <= codePoint && codePoint <= 65049 || 65072 <= codePoint && codePoint <= 65131 || 65281 <= codePoint && codePoint <= 65376 || 65504 <= codePoint && codePoint <= 65510 || 110592 <= codePoint && codePoint <= 110593 || 127488 <= codePoint && codePoint <= 127569 || 131072 <= codePoint && codePoint <= 262141)) return true;
|
|
676
|
+
return false;
|
|
677
|
+
};
|
|
678
|
+
module.exports = isFullwidthCodePoint$1;
|
|
679
|
+
module.exports.default = isFullwidthCodePoint$1;
|
|
680
|
+
}) });
|
|
681
|
+
|
|
682
|
+
//#endregion
|
|
683
|
+
//#region node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/index.js
|
|
684
|
+
var require_emoji_regex = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/index.js": ((exports, module) => {
|
|
685
|
+
module.exports = function() {
|
|
686
|
+
return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g;
|
|
687
|
+
};
|
|
688
|
+
}) });
|
|
689
|
+
|
|
690
|
+
//#endregion
|
|
691
|
+
//#region node_modules/.pnpm/string-width@4.2.3/node_modules/string-width/index.js
|
|
692
|
+
var require_string_width = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/string-width@4.2.3/node_modules/string-width/index.js": ((exports, module) => {
|
|
693
|
+
const stripAnsi$1 = require_strip_ansi();
|
|
694
|
+
const isFullwidthCodePoint = require_is_fullwidth_code_point();
|
|
695
|
+
const emojiRegex = require_emoji_regex();
|
|
696
|
+
const stringWidth$1 = (string) => {
|
|
697
|
+
if (typeof string !== "string" || string.length === 0) return 0;
|
|
698
|
+
string = stripAnsi$1(string);
|
|
699
|
+
if (string.length === 0) return 0;
|
|
700
|
+
string = string.replace(emojiRegex(), " ");
|
|
701
|
+
let width = 0;
|
|
702
|
+
for (let i = 0; i < string.length; i++) {
|
|
703
|
+
const code = string.codePointAt(i);
|
|
704
|
+
if (code <= 31 || code >= 127 && code <= 159) continue;
|
|
705
|
+
if (code >= 768 && code <= 879) continue;
|
|
706
|
+
if (code > 65535) i++;
|
|
707
|
+
width += isFullwidthCodePoint(code) ? 2 : 1;
|
|
708
|
+
}
|
|
709
|
+
return width;
|
|
710
|
+
};
|
|
711
|
+
module.exports = stringWidth$1;
|
|
712
|
+
module.exports.default = stringWidth$1;
|
|
713
|
+
}) });
|
|
714
|
+
|
|
715
|
+
//#endregion
|
|
716
|
+
//#region node_modules/.pnpm/color-name@1.1.4/node_modules/color-name/index.js
|
|
717
|
+
var require_color_name = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/color-name@1.1.4/node_modules/color-name/index.js": ((exports, module) => {
|
|
718
|
+
module.exports = {
|
|
719
|
+
"aliceblue": [
|
|
720
|
+
240,
|
|
721
|
+
248,
|
|
722
|
+
255
|
|
723
|
+
],
|
|
724
|
+
"antiquewhite": [
|
|
725
|
+
250,
|
|
726
|
+
235,
|
|
727
|
+
215
|
|
728
|
+
],
|
|
729
|
+
"aqua": [
|
|
730
|
+
0,
|
|
731
|
+
255,
|
|
732
|
+
255
|
|
733
|
+
],
|
|
734
|
+
"aquamarine": [
|
|
735
|
+
127,
|
|
736
|
+
255,
|
|
737
|
+
212
|
|
738
|
+
],
|
|
739
|
+
"azure": [
|
|
740
|
+
240,
|
|
741
|
+
255,
|
|
742
|
+
255
|
|
743
|
+
],
|
|
744
|
+
"beige": [
|
|
745
|
+
245,
|
|
746
|
+
245,
|
|
747
|
+
220
|
|
748
|
+
],
|
|
749
|
+
"bisque": [
|
|
750
|
+
255,
|
|
751
|
+
228,
|
|
752
|
+
196
|
|
753
|
+
],
|
|
754
|
+
"black": [
|
|
755
|
+
0,
|
|
756
|
+
0,
|
|
757
|
+
0
|
|
758
|
+
],
|
|
759
|
+
"blanchedalmond": [
|
|
760
|
+
255,
|
|
761
|
+
235,
|
|
762
|
+
205
|
|
763
|
+
],
|
|
764
|
+
"blue": [
|
|
765
|
+
0,
|
|
766
|
+
0,
|
|
767
|
+
255
|
|
768
|
+
],
|
|
769
|
+
"blueviolet": [
|
|
770
|
+
138,
|
|
771
|
+
43,
|
|
772
|
+
226
|
|
773
|
+
],
|
|
774
|
+
"brown": [
|
|
775
|
+
165,
|
|
776
|
+
42,
|
|
777
|
+
42
|
|
778
|
+
],
|
|
779
|
+
"burlywood": [
|
|
780
|
+
222,
|
|
781
|
+
184,
|
|
782
|
+
135
|
|
783
|
+
],
|
|
784
|
+
"cadetblue": [
|
|
785
|
+
95,
|
|
786
|
+
158,
|
|
787
|
+
160
|
|
788
|
+
],
|
|
789
|
+
"chartreuse": [
|
|
790
|
+
127,
|
|
791
|
+
255,
|
|
792
|
+
0
|
|
793
|
+
],
|
|
794
|
+
"chocolate": [
|
|
795
|
+
210,
|
|
796
|
+
105,
|
|
797
|
+
30
|
|
798
|
+
],
|
|
799
|
+
"coral": [
|
|
800
|
+
255,
|
|
801
|
+
127,
|
|
802
|
+
80
|
|
803
|
+
],
|
|
804
|
+
"cornflowerblue": [
|
|
805
|
+
100,
|
|
806
|
+
149,
|
|
807
|
+
237
|
|
808
|
+
],
|
|
809
|
+
"cornsilk": [
|
|
810
|
+
255,
|
|
811
|
+
248,
|
|
812
|
+
220
|
|
813
|
+
],
|
|
814
|
+
"crimson": [
|
|
815
|
+
220,
|
|
816
|
+
20,
|
|
817
|
+
60
|
|
818
|
+
],
|
|
819
|
+
"cyan": [
|
|
820
|
+
0,
|
|
821
|
+
255,
|
|
822
|
+
255
|
|
823
|
+
],
|
|
824
|
+
"darkblue": [
|
|
825
|
+
0,
|
|
826
|
+
0,
|
|
827
|
+
139
|
|
828
|
+
],
|
|
829
|
+
"darkcyan": [
|
|
830
|
+
0,
|
|
831
|
+
139,
|
|
832
|
+
139
|
|
833
|
+
],
|
|
834
|
+
"darkgoldenrod": [
|
|
835
|
+
184,
|
|
836
|
+
134,
|
|
837
|
+
11
|
|
838
|
+
],
|
|
839
|
+
"darkgray": [
|
|
840
|
+
169,
|
|
841
|
+
169,
|
|
842
|
+
169
|
|
843
|
+
],
|
|
844
|
+
"darkgreen": [
|
|
845
|
+
0,
|
|
846
|
+
100,
|
|
847
|
+
0
|
|
848
|
+
],
|
|
849
|
+
"darkgrey": [
|
|
850
|
+
169,
|
|
851
|
+
169,
|
|
852
|
+
169
|
|
853
|
+
],
|
|
854
|
+
"darkkhaki": [
|
|
855
|
+
189,
|
|
856
|
+
183,
|
|
857
|
+
107
|
|
858
|
+
],
|
|
859
|
+
"darkmagenta": [
|
|
860
|
+
139,
|
|
861
|
+
0,
|
|
862
|
+
139
|
|
863
|
+
],
|
|
864
|
+
"darkolivegreen": [
|
|
865
|
+
85,
|
|
866
|
+
107,
|
|
867
|
+
47
|
|
868
|
+
],
|
|
869
|
+
"darkorange": [
|
|
870
|
+
255,
|
|
871
|
+
140,
|
|
872
|
+
0
|
|
873
|
+
],
|
|
874
|
+
"darkorchid": [
|
|
875
|
+
153,
|
|
876
|
+
50,
|
|
877
|
+
204
|
|
878
|
+
],
|
|
879
|
+
"darkred": [
|
|
880
|
+
139,
|
|
881
|
+
0,
|
|
882
|
+
0
|
|
883
|
+
],
|
|
884
|
+
"darksalmon": [
|
|
885
|
+
233,
|
|
886
|
+
150,
|
|
887
|
+
122
|
|
888
|
+
],
|
|
889
|
+
"darkseagreen": [
|
|
890
|
+
143,
|
|
891
|
+
188,
|
|
892
|
+
143
|
|
893
|
+
],
|
|
894
|
+
"darkslateblue": [
|
|
895
|
+
72,
|
|
896
|
+
61,
|
|
897
|
+
139
|
|
898
|
+
],
|
|
899
|
+
"darkslategray": [
|
|
900
|
+
47,
|
|
901
|
+
79,
|
|
902
|
+
79
|
|
903
|
+
],
|
|
904
|
+
"darkslategrey": [
|
|
905
|
+
47,
|
|
906
|
+
79,
|
|
907
|
+
79
|
|
908
|
+
],
|
|
909
|
+
"darkturquoise": [
|
|
910
|
+
0,
|
|
911
|
+
206,
|
|
912
|
+
209
|
|
913
|
+
],
|
|
914
|
+
"darkviolet": [
|
|
915
|
+
148,
|
|
916
|
+
0,
|
|
917
|
+
211
|
|
918
|
+
],
|
|
919
|
+
"deeppink": [
|
|
920
|
+
255,
|
|
921
|
+
20,
|
|
922
|
+
147
|
|
923
|
+
],
|
|
924
|
+
"deepskyblue": [
|
|
925
|
+
0,
|
|
926
|
+
191,
|
|
927
|
+
255
|
|
928
|
+
],
|
|
929
|
+
"dimgray": [
|
|
930
|
+
105,
|
|
931
|
+
105,
|
|
932
|
+
105
|
|
933
|
+
],
|
|
934
|
+
"dimgrey": [
|
|
935
|
+
105,
|
|
936
|
+
105,
|
|
937
|
+
105
|
|
938
|
+
],
|
|
939
|
+
"dodgerblue": [
|
|
940
|
+
30,
|
|
941
|
+
144,
|
|
942
|
+
255
|
|
943
|
+
],
|
|
944
|
+
"firebrick": [
|
|
945
|
+
178,
|
|
946
|
+
34,
|
|
947
|
+
34
|
|
948
|
+
],
|
|
949
|
+
"floralwhite": [
|
|
950
|
+
255,
|
|
951
|
+
250,
|
|
952
|
+
240
|
|
953
|
+
],
|
|
954
|
+
"forestgreen": [
|
|
955
|
+
34,
|
|
956
|
+
139,
|
|
957
|
+
34
|
|
958
|
+
],
|
|
959
|
+
"fuchsia": [
|
|
960
|
+
255,
|
|
961
|
+
0,
|
|
962
|
+
255
|
|
963
|
+
],
|
|
964
|
+
"gainsboro": [
|
|
965
|
+
220,
|
|
966
|
+
220,
|
|
967
|
+
220
|
|
968
|
+
],
|
|
969
|
+
"ghostwhite": [
|
|
970
|
+
248,
|
|
971
|
+
248,
|
|
972
|
+
255
|
|
973
|
+
],
|
|
974
|
+
"gold": [
|
|
975
|
+
255,
|
|
976
|
+
215,
|
|
977
|
+
0
|
|
978
|
+
],
|
|
979
|
+
"goldenrod": [
|
|
980
|
+
218,
|
|
981
|
+
165,
|
|
982
|
+
32
|
|
983
|
+
],
|
|
984
|
+
"gray": [
|
|
985
|
+
128,
|
|
986
|
+
128,
|
|
987
|
+
128
|
|
988
|
+
],
|
|
989
|
+
"green": [
|
|
990
|
+
0,
|
|
991
|
+
128,
|
|
992
|
+
0
|
|
993
|
+
],
|
|
994
|
+
"greenyellow": [
|
|
995
|
+
173,
|
|
996
|
+
255,
|
|
997
|
+
47
|
|
998
|
+
],
|
|
999
|
+
"grey": [
|
|
1000
|
+
128,
|
|
1001
|
+
128,
|
|
1002
|
+
128
|
|
1003
|
+
],
|
|
1004
|
+
"honeydew": [
|
|
1005
|
+
240,
|
|
1006
|
+
255,
|
|
1007
|
+
240
|
|
1008
|
+
],
|
|
1009
|
+
"hotpink": [
|
|
1010
|
+
255,
|
|
1011
|
+
105,
|
|
1012
|
+
180
|
|
1013
|
+
],
|
|
1014
|
+
"indianred": [
|
|
1015
|
+
205,
|
|
1016
|
+
92,
|
|
1017
|
+
92
|
|
1018
|
+
],
|
|
1019
|
+
"indigo": [
|
|
1020
|
+
75,
|
|
1021
|
+
0,
|
|
1022
|
+
130
|
|
1023
|
+
],
|
|
1024
|
+
"ivory": [
|
|
1025
|
+
255,
|
|
1026
|
+
255,
|
|
1027
|
+
240
|
|
1028
|
+
],
|
|
1029
|
+
"khaki": [
|
|
1030
|
+
240,
|
|
1031
|
+
230,
|
|
1032
|
+
140
|
|
1033
|
+
],
|
|
1034
|
+
"lavender": [
|
|
1035
|
+
230,
|
|
1036
|
+
230,
|
|
1037
|
+
250
|
|
1038
|
+
],
|
|
1039
|
+
"lavenderblush": [
|
|
1040
|
+
255,
|
|
1041
|
+
240,
|
|
1042
|
+
245
|
|
1043
|
+
],
|
|
1044
|
+
"lawngreen": [
|
|
1045
|
+
124,
|
|
1046
|
+
252,
|
|
1047
|
+
0
|
|
1048
|
+
],
|
|
1049
|
+
"lemonchiffon": [
|
|
1050
|
+
255,
|
|
1051
|
+
250,
|
|
1052
|
+
205
|
|
1053
|
+
],
|
|
1054
|
+
"lightblue": [
|
|
1055
|
+
173,
|
|
1056
|
+
216,
|
|
1057
|
+
230
|
|
1058
|
+
],
|
|
1059
|
+
"lightcoral": [
|
|
1060
|
+
240,
|
|
1061
|
+
128,
|
|
1062
|
+
128
|
|
1063
|
+
],
|
|
1064
|
+
"lightcyan": [
|
|
1065
|
+
224,
|
|
1066
|
+
255,
|
|
1067
|
+
255
|
|
1068
|
+
],
|
|
1069
|
+
"lightgoldenrodyellow": [
|
|
1070
|
+
250,
|
|
1071
|
+
250,
|
|
1072
|
+
210
|
|
1073
|
+
],
|
|
1074
|
+
"lightgray": [
|
|
1075
|
+
211,
|
|
1076
|
+
211,
|
|
1077
|
+
211
|
|
1078
|
+
],
|
|
1079
|
+
"lightgreen": [
|
|
1080
|
+
144,
|
|
1081
|
+
238,
|
|
1082
|
+
144
|
|
1083
|
+
],
|
|
1084
|
+
"lightgrey": [
|
|
1085
|
+
211,
|
|
1086
|
+
211,
|
|
1087
|
+
211
|
|
1088
|
+
],
|
|
1089
|
+
"lightpink": [
|
|
1090
|
+
255,
|
|
1091
|
+
182,
|
|
1092
|
+
193
|
|
1093
|
+
],
|
|
1094
|
+
"lightsalmon": [
|
|
1095
|
+
255,
|
|
1096
|
+
160,
|
|
1097
|
+
122
|
|
1098
|
+
],
|
|
1099
|
+
"lightseagreen": [
|
|
1100
|
+
32,
|
|
1101
|
+
178,
|
|
1102
|
+
170
|
|
1103
|
+
],
|
|
1104
|
+
"lightskyblue": [
|
|
1105
|
+
135,
|
|
1106
|
+
206,
|
|
1107
|
+
250
|
|
1108
|
+
],
|
|
1109
|
+
"lightslategray": [
|
|
1110
|
+
119,
|
|
1111
|
+
136,
|
|
1112
|
+
153
|
|
1113
|
+
],
|
|
1114
|
+
"lightslategrey": [
|
|
1115
|
+
119,
|
|
1116
|
+
136,
|
|
1117
|
+
153
|
|
1118
|
+
],
|
|
1119
|
+
"lightsteelblue": [
|
|
1120
|
+
176,
|
|
1121
|
+
196,
|
|
1122
|
+
222
|
|
1123
|
+
],
|
|
1124
|
+
"lightyellow": [
|
|
1125
|
+
255,
|
|
1126
|
+
255,
|
|
1127
|
+
224
|
|
1128
|
+
],
|
|
1129
|
+
"lime": [
|
|
1130
|
+
0,
|
|
1131
|
+
255,
|
|
1132
|
+
0
|
|
1133
|
+
],
|
|
1134
|
+
"limegreen": [
|
|
1135
|
+
50,
|
|
1136
|
+
205,
|
|
1137
|
+
50
|
|
1138
|
+
],
|
|
1139
|
+
"linen": [
|
|
1140
|
+
250,
|
|
1141
|
+
240,
|
|
1142
|
+
230
|
|
1143
|
+
],
|
|
1144
|
+
"magenta": [
|
|
1145
|
+
255,
|
|
1146
|
+
0,
|
|
1147
|
+
255
|
|
1148
|
+
],
|
|
1149
|
+
"maroon": [
|
|
1150
|
+
128,
|
|
1151
|
+
0,
|
|
1152
|
+
0
|
|
1153
|
+
],
|
|
1154
|
+
"mediumaquamarine": [
|
|
1155
|
+
102,
|
|
1156
|
+
205,
|
|
1157
|
+
170
|
|
1158
|
+
],
|
|
1159
|
+
"mediumblue": [
|
|
1160
|
+
0,
|
|
1161
|
+
0,
|
|
1162
|
+
205
|
|
1163
|
+
],
|
|
1164
|
+
"mediumorchid": [
|
|
1165
|
+
186,
|
|
1166
|
+
85,
|
|
1167
|
+
211
|
|
1168
|
+
],
|
|
1169
|
+
"mediumpurple": [
|
|
1170
|
+
147,
|
|
1171
|
+
112,
|
|
1172
|
+
219
|
|
1173
|
+
],
|
|
1174
|
+
"mediumseagreen": [
|
|
1175
|
+
60,
|
|
1176
|
+
179,
|
|
1177
|
+
113
|
|
1178
|
+
],
|
|
1179
|
+
"mediumslateblue": [
|
|
1180
|
+
123,
|
|
1181
|
+
104,
|
|
1182
|
+
238
|
|
1183
|
+
],
|
|
1184
|
+
"mediumspringgreen": [
|
|
1185
|
+
0,
|
|
1186
|
+
250,
|
|
1187
|
+
154
|
|
1188
|
+
],
|
|
1189
|
+
"mediumturquoise": [
|
|
1190
|
+
72,
|
|
1191
|
+
209,
|
|
1192
|
+
204
|
|
1193
|
+
],
|
|
1194
|
+
"mediumvioletred": [
|
|
1195
|
+
199,
|
|
1196
|
+
21,
|
|
1197
|
+
133
|
|
1198
|
+
],
|
|
1199
|
+
"midnightblue": [
|
|
1200
|
+
25,
|
|
1201
|
+
25,
|
|
1202
|
+
112
|
|
1203
|
+
],
|
|
1204
|
+
"mintcream": [
|
|
1205
|
+
245,
|
|
1206
|
+
255,
|
|
1207
|
+
250
|
|
1208
|
+
],
|
|
1209
|
+
"mistyrose": [
|
|
1210
|
+
255,
|
|
1211
|
+
228,
|
|
1212
|
+
225
|
|
1213
|
+
],
|
|
1214
|
+
"moccasin": [
|
|
1215
|
+
255,
|
|
1216
|
+
228,
|
|
1217
|
+
181
|
|
1218
|
+
],
|
|
1219
|
+
"navajowhite": [
|
|
1220
|
+
255,
|
|
1221
|
+
222,
|
|
1222
|
+
173
|
|
1223
|
+
],
|
|
1224
|
+
"navy": [
|
|
1225
|
+
0,
|
|
1226
|
+
0,
|
|
1227
|
+
128
|
|
1228
|
+
],
|
|
1229
|
+
"oldlace": [
|
|
1230
|
+
253,
|
|
1231
|
+
245,
|
|
1232
|
+
230
|
|
1233
|
+
],
|
|
1234
|
+
"olive": [
|
|
1235
|
+
128,
|
|
1236
|
+
128,
|
|
1237
|
+
0
|
|
1238
|
+
],
|
|
1239
|
+
"olivedrab": [
|
|
1240
|
+
107,
|
|
1241
|
+
142,
|
|
1242
|
+
35
|
|
1243
|
+
],
|
|
1244
|
+
"orange": [
|
|
1245
|
+
255,
|
|
1246
|
+
165,
|
|
1247
|
+
0
|
|
1248
|
+
],
|
|
1249
|
+
"orangered": [
|
|
1250
|
+
255,
|
|
1251
|
+
69,
|
|
1252
|
+
0
|
|
1253
|
+
],
|
|
1254
|
+
"orchid": [
|
|
1255
|
+
218,
|
|
1256
|
+
112,
|
|
1257
|
+
214
|
|
1258
|
+
],
|
|
1259
|
+
"palegoldenrod": [
|
|
1260
|
+
238,
|
|
1261
|
+
232,
|
|
1262
|
+
170
|
|
1263
|
+
],
|
|
1264
|
+
"palegreen": [
|
|
1265
|
+
152,
|
|
1266
|
+
251,
|
|
1267
|
+
152
|
|
1268
|
+
],
|
|
1269
|
+
"paleturquoise": [
|
|
1270
|
+
175,
|
|
1271
|
+
238,
|
|
1272
|
+
238
|
|
1273
|
+
],
|
|
1274
|
+
"palevioletred": [
|
|
1275
|
+
219,
|
|
1276
|
+
112,
|
|
1277
|
+
147
|
|
1278
|
+
],
|
|
1279
|
+
"papayawhip": [
|
|
1280
|
+
255,
|
|
1281
|
+
239,
|
|
1282
|
+
213
|
|
1283
|
+
],
|
|
1284
|
+
"peachpuff": [
|
|
1285
|
+
255,
|
|
1286
|
+
218,
|
|
1287
|
+
185
|
|
1288
|
+
],
|
|
1289
|
+
"peru": [
|
|
1290
|
+
205,
|
|
1291
|
+
133,
|
|
1292
|
+
63
|
|
1293
|
+
],
|
|
1294
|
+
"pink": [
|
|
1295
|
+
255,
|
|
1296
|
+
192,
|
|
1297
|
+
203
|
|
1298
|
+
],
|
|
1299
|
+
"plum": [
|
|
1300
|
+
221,
|
|
1301
|
+
160,
|
|
1302
|
+
221
|
|
1303
|
+
],
|
|
1304
|
+
"powderblue": [
|
|
1305
|
+
176,
|
|
1306
|
+
224,
|
|
1307
|
+
230
|
|
1308
|
+
],
|
|
1309
|
+
"purple": [
|
|
1310
|
+
128,
|
|
1311
|
+
0,
|
|
1312
|
+
128
|
|
1313
|
+
],
|
|
1314
|
+
"rebeccapurple": [
|
|
1315
|
+
102,
|
|
1316
|
+
51,
|
|
1317
|
+
153
|
|
1318
|
+
],
|
|
1319
|
+
"red": [
|
|
1320
|
+
255,
|
|
1321
|
+
0,
|
|
1322
|
+
0
|
|
1323
|
+
],
|
|
1324
|
+
"rosybrown": [
|
|
1325
|
+
188,
|
|
1326
|
+
143,
|
|
1327
|
+
143
|
|
1328
|
+
],
|
|
1329
|
+
"royalblue": [
|
|
1330
|
+
65,
|
|
1331
|
+
105,
|
|
1332
|
+
225
|
|
1333
|
+
],
|
|
1334
|
+
"saddlebrown": [
|
|
1335
|
+
139,
|
|
1336
|
+
69,
|
|
1337
|
+
19
|
|
1338
|
+
],
|
|
1339
|
+
"salmon": [
|
|
1340
|
+
250,
|
|
1341
|
+
128,
|
|
1342
|
+
114
|
|
1343
|
+
],
|
|
1344
|
+
"sandybrown": [
|
|
1345
|
+
244,
|
|
1346
|
+
164,
|
|
1347
|
+
96
|
|
1348
|
+
],
|
|
1349
|
+
"seagreen": [
|
|
1350
|
+
46,
|
|
1351
|
+
139,
|
|
1352
|
+
87
|
|
1353
|
+
],
|
|
1354
|
+
"seashell": [
|
|
1355
|
+
255,
|
|
1356
|
+
245,
|
|
1357
|
+
238
|
|
1358
|
+
],
|
|
1359
|
+
"sienna": [
|
|
1360
|
+
160,
|
|
1361
|
+
82,
|
|
1362
|
+
45
|
|
1363
|
+
],
|
|
1364
|
+
"silver": [
|
|
1365
|
+
192,
|
|
1366
|
+
192,
|
|
1367
|
+
192
|
|
1368
|
+
],
|
|
1369
|
+
"skyblue": [
|
|
1370
|
+
135,
|
|
1371
|
+
206,
|
|
1372
|
+
235
|
|
1373
|
+
],
|
|
1374
|
+
"slateblue": [
|
|
1375
|
+
106,
|
|
1376
|
+
90,
|
|
1377
|
+
205
|
|
1378
|
+
],
|
|
1379
|
+
"slategray": [
|
|
1380
|
+
112,
|
|
1381
|
+
128,
|
|
1382
|
+
144
|
|
1383
|
+
],
|
|
1384
|
+
"slategrey": [
|
|
1385
|
+
112,
|
|
1386
|
+
128,
|
|
1387
|
+
144
|
|
1388
|
+
],
|
|
1389
|
+
"snow": [
|
|
1390
|
+
255,
|
|
1391
|
+
250,
|
|
1392
|
+
250
|
|
1393
|
+
],
|
|
1394
|
+
"springgreen": [
|
|
1395
|
+
0,
|
|
1396
|
+
255,
|
|
1397
|
+
127
|
|
1398
|
+
],
|
|
1399
|
+
"steelblue": [
|
|
1400
|
+
70,
|
|
1401
|
+
130,
|
|
1402
|
+
180
|
|
1403
|
+
],
|
|
1404
|
+
"tan": [
|
|
1405
|
+
210,
|
|
1406
|
+
180,
|
|
1407
|
+
140
|
|
1408
|
+
],
|
|
1409
|
+
"teal": [
|
|
1410
|
+
0,
|
|
1411
|
+
128,
|
|
1412
|
+
128
|
|
1413
|
+
],
|
|
1414
|
+
"thistle": [
|
|
1415
|
+
216,
|
|
1416
|
+
191,
|
|
1417
|
+
216
|
|
1418
|
+
],
|
|
1419
|
+
"tomato": [
|
|
1420
|
+
255,
|
|
1421
|
+
99,
|
|
1422
|
+
71
|
|
1423
|
+
],
|
|
1424
|
+
"turquoise": [
|
|
1425
|
+
64,
|
|
1426
|
+
224,
|
|
1427
|
+
208
|
|
1428
|
+
],
|
|
1429
|
+
"violet": [
|
|
1430
|
+
238,
|
|
1431
|
+
130,
|
|
1432
|
+
238
|
|
1433
|
+
],
|
|
1434
|
+
"wheat": [
|
|
1435
|
+
245,
|
|
1436
|
+
222,
|
|
1437
|
+
179
|
|
1438
|
+
],
|
|
1439
|
+
"white": [
|
|
1440
|
+
255,
|
|
1441
|
+
255,
|
|
1442
|
+
255
|
|
1443
|
+
],
|
|
1444
|
+
"whitesmoke": [
|
|
1445
|
+
245,
|
|
1446
|
+
245,
|
|
1447
|
+
245
|
|
1448
|
+
],
|
|
1449
|
+
"yellow": [
|
|
1450
|
+
255,
|
|
1451
|
+
255,
|
|
1452
|
+
0
|
|
1453
|
+
],
|
|
1454
|
+
"yellowgreen": [
|
|
1455
|
+
154,
|
|
1456
|
+
205,
|
|
1457
|
+
50
|
|
1458
|
+
]
|
|
1459
|
+
};
|
|
1460
|
+
}) });
|
|
1461
|
+
|
|
1462
|
+
//#endregion
|
|
1463
|
+
//#region node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/conversions.js
|
|
1464
|
+
var require_conversions = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/conversions.js": ((exports, module) => {
|
|
1465
|
+
const cssKeywords = require_color_name();
|
|
1466
|
+
const reverseKeywords = {};
|
|
1467
|
+
for (const key of Object.keys(cssKeywords)) reverseKeywords[cssKeywords[key]] = key;
|
|
1468
|
+
const convert$1 = {
|
|
1469
|
+
rgb: {
|
|
1470
|
+
channels: 3,
|
|
1471
|
+
labels: "rgb"
|
|
1472
|
+
},
|
|
1473
|
+
hsl: {
|
|
1474
|
+
channels: 3,
|
|
1475
|
+
labels: "hsl"
|
|
1476
|
+
},
|
|
1477
|
+
hsv: {
|
|
1478
|
+
channels: 3,
|
|
1479
|
+
labels: "hsv"
|
|
1480
|
+
},
|
|
1481
|
+
hwb: {
|
|
1482
|
+
channels: 3,
|
|
1483
|
+
labels: "hwb"
|
|
1484
|
+
},
|
|
1485
|
+
cmyk: {
|
|
1486
|
+
channels: 4,
|
|
1487
|
+
labels: "cmyk"
|
|
1488
|
+
},
|
|
1489
|
+
xyz: {
|
|
1490
|
+
channels: 3,
|
|
1491
|
+
labels: "xyz"
|
|
1492
|
+
},
|
|
1493
|
+
lab: {
|
|
1494
|
+
channels: 3,
|
|
1495
|
+
labels: "lab"
|
|
1496
|
+
},
|
|
1497
|
+
lch: {
|
|
1498
|
+
channels: 3,
|
|
1499
|
+
labels: "lch"
|
|
1500
|
+
},
|
|
1501
|
+
hex: {
|
|
1502
|
+
channels: 1,
|
|
1503
|
+
labels: ["hex"]
|
|
1504
|
+
},
|
|
1505
|
+
keyword: {
|
|
1506
|
+
channels: 1,
|
|
1507
|
+
labels: ["keyword"]
|
|
1508
|
+
},
|
|
1509
|
+
ansi16: {
|
|
1510
|
+
channels: 1,
|
|
1511
|
+
labels: ["ansi16"]
|
|
1512
|
+
},
|
|
1513
|
+
ansi256: {
|
|
1514
|
+
channels: 1,
|
|
1515
|
+
labels: ["ansi256"]
|
|
1516
|
+
},
|
|
1517
|
+
hcg: {
|
|
1518
|
+
channels: 3,
|
|
1519
|
+
labels: [
|
|
1520
|
+
"h",
|
|
1521
|
+
"c",
|
|
1522
|
+
"g"
|
|
1523
|
+
]
|
|
1524
|
+
},
|
|
1525
|
+
apple: {
|
|
1526
|
+
channels: 3,
|
|
1527
|
+
labels: [
|
|
1528
|
+
"r16",
|
|
1529
|
+
"g16",
|
|
1530
|
+
"b16"
|
|
1531
|
+
]
|
|
1532
|
+
},
|
|
1533
|
+
gray: {
|
|
1534
|
+
channels: 1,
|
|
1535
|
+
labels: ["gray"]
|
|
1536
|
+
}
|
|
1537
|
+
};
|
|
1538
|
+
module.exports = convert$1;
|
|
1539
|
+
for (const model of Object.keys(convert$1)) {
|
|
1540
|
+
if (!("channels" in convert$1[model])) throw new Error("missing channels property: " + model);
|
|
1541
|
+
if (!("labels" in convert$1[model])) throw new Error("missing channel labels property: " + model);
|
|
1542
|
+
if (convert$1[model].labels.length !== convert$1[model].channels) throw new Error("channel and label counts mismatch: " + model);
|
|
1543
|
+
const { channels, labels } = convert$1[model];
|
|
1544
|
+
delete convert$1[model].channels;
|
|
1545
|
+
delete convert$1[model].labels;
|
|
1546
|
+
Object.defineProperty(convert$1[model], "channels", { value: channels });
|
|
1547
|
+
Object.defineProperty(convert$1[model], "labels", { value: labels });
|
|
1548
|
+
}
|
|
1549
|
+
convert$1.rgb.hsl = function(rgb) {
|
|
1550
|
+
const r = rgb[0] / 255;
|
|
1551
|
+
const g = rgb[1] / 255;
|
|
1552
|
+
const b = rgb[2] / 255;
|
|
1553
|
+
const min = Math.min(r, g, b);
|
|
1554
|
+
const max = Math.max(r, g, b);
|
|
1555
|
+
const delta = max - min;
|
|
1556
|
+
let h;
|
|
1557
|
+
let s;
|
|
1558
|
+
if (max === min) h = 0;
|
|
1559
|
+
else if (r === max) h = (g - b) / delta;
|
|
1560
|
+
else if (g === max) h = 2 + (b - r) / delta;
|
|
1561
|
+
else if (b === max) h = 4 + (r - g) / delta;
|
|
1562
|
+
h = Math.min(h * 60, 360);
|
|
1563
|
+
if (h < 0) h += 360;
|
|
1564
|
+
const l = (min + max) / 2;
|
|
1565
|
+
if (max === min) s = 0;
|
|
1566
|
+
else if (l <= .5) s = delta / (max + min);
|
|
1567
|
+
else s = delta / (2 - max - min);
|
|
1568
|
+
return [
|
|
1569
|
+
h,
|
|
1570
|
+
s * 100,
|
|
1571
|
+
l * 100
|
|
1572
|
+
];
|
|
1573
|
+
};
|
|
1574
|
+
convert$1.rgb.hsv = function(rgb) {
|
|
1575
|
+
let rdif;
|
|
1576
|
+
let gdif;
|
|
1577
|
+
let bdif;
|
|
1578
|
+
let h;
|
|
1579
|
+
let s;
|
|
1580
|
+
const r = rgb[0] / 255;
|
|
1581
|
+
const g = rgb[1] / 255;
|
|
1582
|
+
const b = rgb[2] / 255;
|
|
1583
|
+
const v = Math.max(r, g, b);
|
|
1584
|
+
const diff = v - Math.min(r, g, b);
|
|
1585
|
+
const diffc = function(c) {
|
|
1586
|
+
return (v - c) / 6 / diff + 1 / 2;
|
|
1587
|
+
};
|
|
1588
|
+
if (diff === 0) {
|
|
1589
|
+
h = 0;
|
|
1590
|
+
s = 0;
|
|
1591
|
+
} else {
|
|
1592
|
+
s = diff / v;
|
|
1593
|
+
rdif = diffc(r);
|
|
1594
|
+
gdif = diffc(g);
|
|
1595
|
+
bdif = diffc(b);
|
|
1596
|
+
if (r === v) h = bdif - gdif;
|
|
1597
|
+
else if (g === v) h = 1 / 3 + rdif - bdif;
|
|
1598
|
+
else if (b === v) h = 2 / 3 + gdif - rdif;
|
|
1599
|
+
if (h < 0) h += 1;
|
|
1600
|
+
else if (h > 1) h -= 1;
|
|
1601
|
+
}
|
|
1602
|
+
return [
|
|
1603
|
+
h * 360,
|
|
1604
|
+
s * 100,
|
|
1605
|
+
v * 100
|
|
1606
|
+
];
|
|
1607
|
+
};
|
|
1608
|
+
convert$1.rgb.hwb = function(rgb) {
|
|
1609
|
+
const r = rgb[0];
|
|
1610
|
+
const g = rgb[1];
|
|
1611
|
+
let b = rgb[2];
|
|
1612
|
+
const h = convert$1.rgb.hsl(rgb)[0];
|
|
1613
|
+
const w = 1 / 255 * Math.min(r, Math.min(g, b));
|
|
1614
|
+
b = 1 - 1 / 255 * Math.max(r, Math.max(g, b));
|
|
1615
|
+
return [
|
|
1616
|
+
h,
|
|
1617
|
+
w * 100,
|
|
1618
|
+
b * 100
|
|
1619
|
+
];
|
|
1620
|
+
};
|
|
1621
|
+
convert$1.rgb.cmyk = function(rgb) {
|
|
1622
|
+
const r = rgb[0] / 255;
|
|
1623
|
+
const g = rgb[1] / 255;
|
|
1624
|
+
const b = rgb[2] / 255;
|
|
1625
|
+
const k = Math.min(1 - r, 1 - g, 1 - b);
|
|
1626
|
+
const c = (1 - r - k) / (1 - k) || 0;
|
|
1627
|
+
const m = (1 - g - k) / (1 - k) || 0;
|
|
1628
|
+
const y = (1 - b - k) / (1 - k) || 0;
|
|
1629
|
+
return [
|
|
1630
|
+
c * 100,
|
|
1631
|
+
m * 100,
|
|
1632
|
+
y * 100,
|
|
1633
|
+
k * 100
|
|
1634
|
+
];
|
|
1635
|
+
};
|
|
1636
|
+
function comparativeDistance(x, y) {
|
|
1637
|
+
return (x[0] - y[0]) ** 2 + (x[1] - y[1]) ** 2 + (x[2] - y[2]) ** 2;
|
|
1638
|
+
}
|
|
1639
|
+
convert$1.rgb.keyword = function(rgb) {
|
|
1640
|
+
const reversed = reverseKeywords[rgb];
|
|
1641
|
+
if (reversed) return reversed;
|
|
1642
|
+
let currentClosestDistance = Infinity;
|
|
1643
|
+
let currentClosestKeyword;
|
|
1644
|
+
for (const keyword of Object.keys(cssKeywords)) {
|
|
1645
|
+
const value = cssKeywords[keyword];
|
|
1646
|
+
const distance = comparativeDistance(rgb, value);
|
|
1647
|
+
if (distance < currentClosestDistance) {
|
|
1648
|
+
currentClosestDistance = distance;
|
|
1649
|
+
currentClosestKeyword = keyword;
|
|
1650
|
+
}
|
|
1651
|
+
}
|
|
1652
|
+
return currentClosestKeyword;
|
|
1653
|
+
};
|
|
1654
|
+
convert$1.keyword.rgb = function(keyword) {
|
|
1655
|
+
return cssKeywords[keyword];
|
|
1656
|
+
};
|
|
1657
|
+
convert$1.rgb.xyz = function(rgb) {
|
|
1658
|
+
let r = rgb[0] / 255;
|
|
1659
|
+
let g = rgb[1] / 255;
|
|
1660
|
+
let b = rgb[2] / 255;
|
|
1661
|
+
r = r > .04045 ? ((r + .055) / 1.055) ** 2.4 : r / 12.92;
|
|
1662
|
+
g = g > .04045 ? ((g + .055) / 1.055) ** 2.4 : g / 12.92;
|
|
1663
|
+
b = b > .04045 ? ((b + .055) / 1.055) ** 2.4 : b / 12.92;
|
|
1664
|
+
const x = r * .4124 + g * .3576 + b * .1805;
|
|
1665
|
+
const y = r * .2126 + g * .7152 + b * .0722;
|
|
1666
|
+
const z = r * .0193 + g * .1192 + b * .9505;
|
|
1667
|
+
return [
|
|
1668
|
+
x * 100,
|
|
1669
|
+
y * 100,
|
|
1670
|
+
z * 100
|
|
1671
|
+
];
|
|
1672
|
+
};
|
|
1673
|
+
convert$1.rgb.lab = function(rgb) {
|
|
1674
|
+
const xyz = convert$1.rgb.xyz(rgb);
|
|
1675
|
+
let x = xyz[0];
|
|
1676
|
+
let y = xyz[1];
|
|
1677
|
+
let z = xyz[2];
|
|
1678
|
+
x /= 95.047;
|
|
1679
|
+
y /= 100;
|
|
1680
|
+
z /= 108.883;
|
|
1681
|
+
x = x > .008856 ? x ** (1 / 3) : 7.787 * x + 16 / 116;
|
|
1682
|
+
y = y > .008856 ? y ** (1 / 3) : 7.787 * y + 16 / 116;
|
|
1683
|
+
z = z > .008856 ? z ** (1 / 3) : 7.787 * z + 16 / 116;
|
|
1684
|
+
return [
|
|
1685
|
+
116 * y - 16,
|
|
1686
|
+
500 * (x - y),
|
|
1687
|
+
200 * (y - z)
|
|
1688
|
+
];
|
|
1689
|
+
};
|
|
1690
|
+
convert$1.hsl.rgb = function(hsl) {
|
|
1691
|
+
const h = hsl[0] / 360;
|
|
1692
|
+
const s = hsl[1] / 100;
|
|
1693
|
+
const l = hsl[2] / 100;
|
|
1694
|
+
let t2;
|
|
1695
|
+
let t3;
|
|
1696
|
+
let val;
|
|
1697
|
+
if (s === 0) {
|
|
1698
|
+
val = l * 255;
|
|
1699
|
+
return [
|
|
1700
|
+
val,
|
|
1701
|
+
val,
|
|
1702
|
+
val
|
|
1703
|
+
];
|
|
1704
|
+
}
|
|
1705
|
+
if (l < .5) t2 = l * (1 + s);
|
|
1706
|
+
else t2 = l + s - l * s;
|
|
1707
|
+
const t1 = 2 * l - t2;
|
|
1708
|
+
const rgb = [
|
|
1709
|
+
0,
|
|
1710
|
+
0,
|
|
1711
|
+
0
|
|
1712
|
+
];
|
|
1713
|
+
for (let i = 0; i < 3; i++) {
|
|
1714
|
+
t3 = h + 1 / 3 * -(i - 1);
|
|
1715
|
+
if (t3 < 0) t3++;
|
|
1716
|
+
if (t3 > 1) t3--;
|
|
1717
|
+
if (6 * t3 < 1) val = t1 + (t2 - t1) * 6 * t3;
|
|
1718
|
+
else if (2 * t3 < 1) val = t2;
|
|
1719
|
+
else if (3 * t3 < 2) val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;
|
|
1720
|
+
else val = t1;
|
|
1721
|
+
rgb[i] = val * 255;
|
|
1722
|
+
}
|
|
1723
|
+
return rgb;
|
|
1724
|
+
};
|
|
1725
|
+
convert$1.hsl.hsv = function(hsl) {
|
|
1726
|
+
const h = hsl[0];
|
|
1727
|
+
let s = hsl[1] / 100;
|
|
1728
|
+
let l = hsl[2] / 100;
|
|
1729
|
+
let smin = s;
|
|
1730
|
+
const lmin = Math.max(l, .01);
|
|
1731
|
+
l *= 2;
|
|
1732
|
+
s *= l <= 1 ? l : 2 - l;
|
|
1733
|
+
smin *= lmin <= 1 ? lmin : 2 - lmin;
|
|
1734
|
+
const v = (l + s) / 2;
|
|
1735
|
+
return [
|
|
1736
|
+
h,
|
|
1737
|
+
(l === 0 ? 2 * smin / (lmin + smin) : 2 * s / (l + s)) * 100,
|
|
1738
|
+
v * 100
|
|
1739
|
+
];
|
|
1740
|
+
};
|
|
1741
|
+
convert$1.hsv.rgb = function(hsv) {
|
|
1742
|
+
const h = hsv[0] / 60;
|
|
1743
|
+
const s = hsv[1] / 100;
|
|
1744
|
+
let v = hsv[2] / 100;
|
|
1745
|
+
const hi = Math.floor(h) % 6;
|
|
1746
|
+
const f = h - Math.floor(h);
|
|
1747
|
+
const p = 255 * v * (1 - s);
|
|
1748
|
+
const q = 255 * v * (1 - s * f);
|
|
1749
|
+
const t = 255 * v * (1 - s * (1 - f));
|
|
1750
|
+
v *= 255;
|
|
1751
|
+
switch (hi) {
|
|
1752
|
+
case 0: return [
|
|
1753
|
+
v,
|
|
1754
|
+
t,
|
|
1755
|
+
p
|
|
1756
|
+
];
|
|
1757
|
+
case 1: return [
|
|
1758
|
+
q,
|
|
1759
|
+
v,
|
|
1760
|
+
p
|
|
1761
|
+
];
|
|
1762
|
+
case 2: return [
|
|
1763
|
+
p,
|
|
1764
|
+
v,
|
|
1765
|
+
t
|
|
1766
|
+
];
|
|
1767
|
+
case 3: return [
|
|
1768
|
+
p,
|
|
1769
|
+
q,
|
|
1770
|
+
v
|
|
1771
|
+
];
|
|
1772
|
+
case 4: return [
|
|
1773
|
+
t,
|
|
1774
|
+
p,
|
|
1775
|
+
v
|
|
1776
|
+
];
|
|
1777
|
+
case 5: return [
|
|
1778
|
+
v,
|
|
1779
|
+
p,
|
|
1780
|
+
q
|
|
1781
|
+
];
|
|
1782
|
+
}
|
|
1783
|
+
};
|
|
1784
|
+
convert$1.hsv.hsl = function(hsv) {
|
|
1785
|
+
const h = hsv[0];
|
|
1786
|
+
const s = hsv[1] / 100;
|
|
1787
|
+
const v = hsv[2] / 100;
|
|
1788
|
+
const vmin = Math.max(v, .01);
|
|
1789
|
+
let sl;
|
|
1790
|
+
let l;
|
|
1791
|
+
l = (2 - s) * v;
|
|
1792
|
+
const lmin = (2 - s) * vmin;
|
|
1793
|
+
sl = s * vmin;
|
|
1794
|
+
sl /= lmin <= 1 ? lmin : 2 - lmin;
|
|
1795
|
+
sl = sl || 0;
|
|
1796
|
+
l /= 2;
|
|
1797
|
+
return [
|
|
1798
|
+
h,
|
|
1799
|
+
sl * 100,
|
|
1800
|
+
l * 100
|
|
1801
|
+
];
|
|
1802
|
+
};
|
|
1803
|
+
convert$1.hwb.rgb = function(hwb) {
|
|
1804
|
+
const h = hwb[0] / 360;
|
|
1805
|
+
let wh = hwb[1] / 100;
|
|
1806
|
+
let bl = hwb[2] / 100;
|
|
1807
|
+
const ratio = wh + bl;
|
|
1808
|
+
let f;
|
|
1809
|
+
if (ratio > 1) {
|
|
1810
|
+
wh /= ratio;
|
|
1811
|
+
bl /= ratio;
|
|
1812
|
+
}
|
|
1813
|
+
const i = Math.floor(6 * h);
|
|
1814
|
+
const v = 1 - bl;
|
|
1815
|
+
f = 6 * h - i;
|
|
1816
|
+
if ((i & 1) !== 0) f = 1 - f;
|
|
1817
|
+
const n = wh + f * (v - wh);
|
|
1818
|
+
let r;
|
|
1819
|
+
let g;
|
|
1820
|
+
let b;
|
|
1821
|
+
switch (i) {
|
|
1822
|
+
default:
|
|
1823
|
+
case 6:
|
|
1824
|
+
case 0:
|
|
1825
|
+
r = v;
|
|
1826
|
+
g = n;
|
|
1827
|
+
b = wh;
|
|
1828
|
+
break;
|
|
1829
|
+
case 1:
|
|
1830
|
+
r = n;
|
|
1831
|
+
g = v;
|
|
1832
|
+
b = wh;
|
|
1833
|
+
break;
|
|
1834
|
+
case 2:
|
|
1835
|
+
r = wh;
|
|
1836
|
+
g = v;
|
|
1837
|
+
b = n;
|
|
1838
|
+
break;
|
|
1839
|
+
case 3:
|
|
1840
|
+
r = wh;
|
|
1841
|
+
g = n;
|
|
1842
|
+
b = v;
|
|
1843
|
+
break;
|
|
1844
|
+
case 4:
|
|
1845
|
+
r = n;
|
|
1846
|
+
g = wh;
|
|
1847
|
+
b = v;
|
|
1848
|
+
break;
|
|
1849
|
+
case 5:
|
|
1850
|
+
r = v;
|
|
1851
|
+
g = wh;
|
|
1852
|
+
b = n;
|
|
1853
|
+
break;
|
|
1854
|
+
}
|
|
1855
|
+
return [
|
|
1856
|
+
r * 255,
|
|
1857
|
+
g * 255,
|
|
1858
|
+
b * 255
|
|
1859
|
+
];
|
|
1860
|
+
};
|
|
1861
|
+
convert$1.cmyk.rgb = function(cmyk) {
|
|
1862
|
+
const c = cmyk[0] / 100;
|
|
1863
|
+
const m = cmyk[1] / 100;
|
|
1864
|
+
const y = cmyk[2] / 100;
|
|
1865
|
+
const k = cmyk[3] / 100;
|
|
1866
|
+
const r = 1 - Math.min(1, c * (1 - k) + k);
|
|
1867
|
+
const g = 1 - Math.min(1, m * (1 - k) + k);
|
|
1868
|
+
const b = 1 - Math.min(1, y * (1 - k) + k);
|
|
1869
|
+
return [
|
|
1870
|
+
r * 255,
|
|
1871
|
+
g * 255,
|
|
1872
|
+
b * 255
|
|
1873
|
+
];
|
|
1874
|
+
};
|
|
1875
|
+
convert$1.xyz.rgb = function(xyz) {
|
|
1876
|
+
const x = xyz[0] / 100;
|
|
1877
|
+
const y = xyz[1] / 100;
|
|
1878
|
+
const z = xyz[2] / 100;
|
|
1879
|
+
let r;
|
|
1880
|
+
let g;
|
|
1881
|
+
let b;
|
|
1882
|
+
r = x * 3.2406 + y * -1.5372 + z * -.4986;
|
|
1883
|
+
g = x * -.9689 + y * 1.8758 + z * .0415;
|
|
1884
|
+
b = x * .0557 + y * -.204 + z * 1.057;
|
|
1885
|
+
r = r > .0031308 ? 1.055 * r ** (1 / 2.4) - .055 : r * 12.92;
|
|
1886
|
+
g = g > .0031308 ? 1.055 * g ** (1 / 2.4) - .055 : g * 12.92;
|
|
1887
|
+
b = b > .0031308 ? 1.055 * b ** (1 / 2.4) - .055 : b * 12.92;
|
|
1888
|
+
r = Math.min(Math.max(0, r), 1);
|
|
1889
|
+
g = Math.min(Math.max(0, g), 1);
|
|
1890
|
+
b = Math.min(Math.max(0, b), 1);
|
|
1891
|
+
return [
|
|
1892
|
+
r * 255,
|
|
1893
|
+
g * 255,
|
|
1894
|
+
b * 255
|
|
1895
|
+
];
|
|
1896
|
+
};
|
|
1897
|
+
convert$1.xyz.lab = function(xyz) {
|
|
1898
|
+
let x = xyz[0];
|
|
1899
|
+
let y = xyz[1];
|
|
1900
|
+
let z = xyz[2];
|
|
1901
|
+
x /= 95.047;
|
|
1902
|
+
y /= 100;
|
|
1903
|
+
z /= 108.883;
|
|
1904
|
+
x = x > .008856 ? x ** (1 / 3) : 7.787 * x + 16 / 116;
|
|
1905
|
+
y = y > .008856 ? y ** (1 / 3) : 7.787 * y + 16 / 116;
|
|
1906
|
+
z = z > .008856 ? z ** (1 / 3) : 7.787 * z + 16 / 116;
|
|
1907
|
+
return [
|
|
1908
|
+
116 * y - 16,
|
|
1909
|
+
500 * (x - y),
|
|
1910
|
+
200 * (y - z)
|
|
1911
|
+
];
|
|
1912
|
+
};
|
|
1913
|
+
convert$1.lab.xyz = function(lab) {
|
|
1914
|
+
const l = lab[0];
|
|
1915
|
+
const a = lab[1];
|
|
1916
|
+
const b = lab[2];
|
|
1917
|
+
let x;
|
|
1918
|
+
let y;
|
|
1919
|
+
let z;
|
|
1920
|
+
y = (l + 16) / 116;
|
|
1921
|
+
x = a / 500 + y;
|
|
1922
|
+
z = y - b / 200;
|
|
1923
|
+
const y2 = y ** 3;
|
|
1924
|
+
const x2 = x ** 3;
|
|
1925
|
+
const z2 = z ** 3;
|
|
1926
|
+
y = y2 > .008856 ? y2 : (y - 16 / 116) / 7.787;
|
|
1927
|
+
x = x2 > .008856 ? x2 : (x - 16 / 116) / 7.787;
|
|
1928
|
+
z = z2 > .008856 ? z2 : (z - 16 / 116) / 7.787;
|
|
1929
|
+
x *= 95.047;
|
|
1930
|
+
y *= 100;
|
|
1931
|
+
z *= 108.883;
|
|
1932
|
+
return [
|
|
1933
|
+
x,
|
|
1934
|
+
y,
|
|
1935
|
+
z
|
|
1936
|
+
];
|
|
1937
|
+
};
|
|
1938
|
+
convert$1.lab.lch = function(lab) {
|
|
1939
|
+
const l = lab[0];
|
|
1940
|
+
const a = lab[1];
|
|
1941
|
+
const b = lab[2];
|
|
1942
|
+
let h;
|
|
1943
|
+
h = Math.atan2(b, a) * 360 / 2 / Math.PI;
|
|
1944
|
+
if (h < 0) h += 360;
|
|
1945
|
+
return [
|
|
1946
|
+
l,
|
|
1947
|
+
Math.sqrt(a * a + b * b),
|
|
1948
|
+
h
|
|
1949
|
+
];
|
|
1950
|
+
};
|
|
1951
|
+
convert$1.lch.lab = function(lch) {
|
|
1952
|
+
const l = lch[0];
|
|
1953
|
+
const c = lch[1];
|
|
1954
|
+
const hr = lch[2] / 360 * 2 * Math.PI;
|
|
1955
|
+
return [
|
|
1956
|
+
l,
|
|
1957
|
+
c * Math.cos(hr),
|
|
1958
|
+
c * Math.sin(hr)
|
|
1959
|
+
];
|
|
1960
|
+
};
|
|
1961
|
+
convert$1.rgb.ansi16 = function(args, saturation = null) {
|
|
1962
|
+
const [r, g, b] = args;
|
|
1963
|
+
let value = saturation === null ? convert$1.rgb.hsv(args)[2] : saturation;
|
|
1964
|
+
value = Math.round(value / 50);
|
|
1965
|
+
if (value === 0) return 30;
|
|
1966
|
+
let ansi = 30 + (Math.round(b / 255) << 2 | Math.round(g / 255) << 1 | Math.round(r / 255));
|
|
1967
|
+
if (value === 2) ansi += 60;
|
|
1968
|
+
return ansi;
|
|
1969
|
+
};
|
|
1970
|
+
convert$1.hsv.ansi16 = function(args) {
|
|
1971
|
+
return convert$1.rgb.ansi16(convert$1.hsv.rgb(args), args[2]);
|
|
1972
|
+
};
|
|
1973
|
+
convert$1.rgb.ansi256 = function(args) {
|
|
1974
|
+
const r = args[0];
|
|
1975
|
+
const g = args[1];
|
|
1976
|
+
const b = args[2];
|
|
1977
|
+
if (r === g && g === b) {
|
|
1978
|
+
if (r < 8) return 16;
|
|
1979
|
+
if (r > 248) return 231;
|
|
1980
|
+
return Math.round((r - 8) / 247 * 24) + 232;
|
|
1981
|
+
}
|
|
1982
|
+
return 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5);
|
|
1983
|
+
};
|
|
1984
|
+
convert$1.ansi16.rgb = function(args) {
|
|
1985
|
+
let color = args % 10;
|
|
1986
|
+
if (color === 0 || color === 7) {
|
|
1987
|
+
if (args > 50) color += 3.5;
|
|
1988
|
+
color = color / 10.5 * 255;
|
|
1989
|
+
return [
|
|
1990
|
+
color,
|
|
1991
|
+
color,
|
|
1992
|
+
color
|
|
1993
|
+
];
|
|
1994
|
+
}
|
|
1995
|
+
const mult = (~~(args > 50) + 1) * .5;
|
|
1996
|
+
return [
|
|
1997
|
+
(color & 1) * mult * 255,
|
|
1998
|
+
(color >> 1 & 1) * mult * 255,
|
|
1999
|
+
(color >> 2 & 1) * mult * 255
|
|
2000
|
+
];
|
|
2001
|
+
};
|
|
2002
|
+
convert$1.ansi256.rgb = function(args) {
|
|
2003
|
+
if (args >= 232) {
|
|
2004
|
+
const c = (args - 232) * 10 + 8;
|
|
2005
|
+
return [
|
|
2006
|
+
c,
|
|
2007
|
+
c,
|
|
2008
|
+
c
|
|
2009
|
+
];
|
|
2010
|
+
}
|
|
2011
|
+
args -= 16;
|
|
2012
|
+
let rem;
|
|
2013
|
+
return [
|
|
2014
|
+
Math.floor(args / 36) / 5 * 255,
|
|
2015
|
+
Math.floor((rem = args % 36) / 6) / 5 * 255,
|
|
2016
|
+
rem % 6 / 5 * 255
|
|
2017
|
+
];
|
|
2018
|
+
};
|
|
2019
|
+
convert$1.rgb.hex = function(args) {
|
|
2020
|
+
const string = (((Math.round(args[0]) & 255) << 16) + ((Math.round(args[1]) & 255) << 8) + (Math.round(args[2]) & 255)).toString(16).toUpperCase();
|
|
2021
|
+
return "000000".substring(string.length) + string;
|
|
2022
|
+
};
|
|
2023
|
+
convert$1.hex.rgb = function(args) {
|
|
2024
|
+
const match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
|
|
2025
|
+
if (!match) return [
|
|
2026
|
+
0,
|
|
2027
|
+
0,
|
|
2028
|
+
0
|
|
2029
|
+
];
|
|
2030
|
+
let colorString = match[0];
|
|
2031
|
+
if (match[0].length === 3) colorString = colorString.split("").map((char) => {
|
|
2032
|
+
return char + char;
|
|
2033
|
+
}).join("");
|
|
2034
|
+
const integer = parseInt(colorString, 16);
|
|
2035
|
+
return [
|
|
2036
|
+
integer >> 16 & 255,
|
|
2037
|
+
integer >> 8 & 255,
|
|
2038
|
+
integer & 255
|
|
2039
|
+
];
|
|
2040
|
+
};
|
|
2041
|
+
convert$1.rgb.hcg = function(rgb) {
|
|
2042
|
+
const r = rgb[0] / 255;
|
|
2043
|
+
const g = rgb[1] / 255;
|
|
2044
|
+
const b = rgb[2] / 255;
|
|
2045
|
+
const max = Math.max(Math.max(r, g), b);
|
|
2046
|
+
const min = Math.min(Math.min(r, g), b);
|
|
2047
|
+
const chroma = max - min;
|
|
2048
|
+
let grayscale;
|
|
2049
|
+
let hue;
|
|
2050
|
+
if (chroma < 1) grayscale = min / (1 - chroma);
|
|
2051
|
+
else grayscale = 0;
|
|
2052
|
+
if (chroma <= 0) hue = 0;
|
|
2053
|
+
else if (max === r) hue = (g - b) / chroma % 6;
|
|
2054
|
+
else if (max === g) hue = 2 + (b - r) / chroma;
|
|
2055
|
+
else hue = 4 + (r - g) / chroma;
|
|
2056
|
+
hue /= 6;
|
|
2057
|
+
hue %= 1;
|
|
2058
|
+
return [
|
|
2059
|
+
hue * 360,
|
|
2060
|
+
chroma * 100,
|
|
2061
|
+
grayscale * 100
|
|
2062
|
+
];
|
|
2063
|
+
};
|
|
2064
|
+
convert$1.hsl.hcg = function(hsl) {
|
|
2065
|
+
const s = hsl[1] / 100;
|
|
2066
|
+
const l = hsl[2] / 100;
|
|
2067
|
+
const c = l < .5 ? 2 * s * l : 2 * s * (1 - l);
|
|
2068
|
+
let f = 0;
|
|
2069
|
+
if (c < 1) f = (l - .5 * c) / (1 - c);
|
|
2070
|
+
return [
|
|
2071
|
+
hsl[0],
|
|
2072
|
+
c * 100,
|
|
2073
|
+
f * 100
|
|
2074
|
+
];
|
|
2075
|
+
};
|
|
2076
|
+
convert$1.hsv.hcg = function(hsv) {
|
|
2077
|
+
const s = hsv[1] / 100;
|
|
2078
|
+
const v = hsv[2] / 100;
|
|
2079
|
+
const c = s * v;
|
|
2080
|
+
let f = 0;
|
|
2081
|
+
if (c < 1) f = (v - c) / (1 - c);
|
|
2082
|
+
return [
|
|
2083
|
+
hsv[0],
|
|
2084
|
+
c * 100,
|
|
2085
|
+
f * 100
|
|
2086
|
+
];
|
|
2087
|
+
};
|
|
2088
|
+
convert$1.hcg.rgb = function(hcg) {
|
|
2089
|
+
const h = hcg[0] / 360;
|
|
2090
|
+
const c = hcg[1] / 100;
|
|
2091
|
+
const g = hcg[2] / 100;
|
|
2092
|
+
if (c === 0) return [
|
|
2093
|
+
g * 255,
|
|
2094
|
+
g * 255,
|
|
2095
|
+
g * 255
|
|
2096
|
+
];
|
|
2097
|
+
const pure = [
|
|
2098
|
+
0,
|
|
2099
|
+
0,
|
|
2100
|
+
0
|
|
2101
|
+
];
|
|
2102
|
+
const hi = h % 1 * 6;
|
|
2103
|
+
const v = hi % 1;
|
|
2104
|
+
const w = 1 - v;
|
|
2105
|
+
let mg = 0;
|
|
2106
|
+
switch (Math.floor(hi)) {
|
|
2107
|
+
case 0:
|
|
2108
|
+
pure[0] = 1;
|
|
2109
|
+
pure[1] = v;
|
|
2110
|
+
pure[2] = 0;
|
|
2111
|
+
break;
|
|
2112
|
+
case 1:
|
|
2113
|
+
pure[0] = w;
|
|
2114
|
+
pure[1] = 1;
|
|
2115
|
+
pure[2] = 0;
|
|
2116
|
+
break;
|
|
2117
|
+
case 2:
|
|
2118
|
+
pure[0] = 0;
|
|
2119
|
+
pure[1] = 1;
|
|
2120
|
+
pure[2] = v;
|
|
2121
|
+
break;
|
|
2122
|
+
case 3:
|
|
2123
|
+
pure[0] = 0;
|
|
2124
|
+
pure[1] = w;
|
|
2125
|
+
pure[2] = 1;
|
|
2126
|
+
break;
|
|
2127
|
+
case 4:
|
|
2128
|
+
pure[0] = v;
|
|
2129
|
+
pure[1] = 0;
|
|
2130
|
+
pure[2] = 1;
|
|
2131
|
+
break;
|
|
2132
|
+
default:
|
|
2133
|
+
pure[0] = 1;
|
|
2134
|
+
pure[1] = 0;
|
|
2135
|
+
pure[2] = w;
|
|
2136
|
+
}
|
|
2137
|
+
mg = (1 - c) * g;
|
|
2138
|
+
return [
|
|
2139
|
+
(c * pure[0] + mg) * 255,
|
|
2140
|
+
(c * pure[1] + mg) * 255,
|
|
2141
|
+
(c * pure[2] + mg) * 255
|
|
2142
|
+
];
|
|
2143
|
+
};
|
|
2144
|
+
convert$1.hcg.hsv = function(hcg) {
|
|
2145
|
+
const c = hcg[1] / 100;
|
|
2146
|
+
const v = c + hcg[2] / 100 * (1 - c);
|
|
2147
|
+
let f = 0;
|
|
2148
|
+
if (v > 0) f = c / v;
|
|
2149
|
+
return [
|
|
2150
|
+
hcg[0],
|
|
2151
|
+
f * 100,
|
|
2152
|
+
v * 100
|
|
2153
|
+
];
|
|
2154
|
+
};
|
|
2155
|
+
convert$1.hcg.hsl = function(hcg) {
|
|
2156
|
+
const c = hcg[1] / 100;
|
|
2157
|
+
const l = hcg[2] / 100 * (1 - c) + .5 * c;
|
|
2158
|
+
let s = 0;
|
|
2159
|
+
if (l > 0 && l < .5) s = c / (2 * l);
|
|
2160
|
+
else if (l >= .5 && l < 1) s = c / (2 * (1 - l));
|
|
2161
|
+
return [
|
|
2162
|
+
hcg[0],
|
|
2163
|
+
s * 100,
|
|
2164
|
+
l * 100
|
|
2165
|
+
];
|
|
2166
|
+
};
|
|
2167
|
+
convert$1.hcg.hwb = function(hcg) {
|
|
2168
|
+
const c = hcg[1] / 100;
|
|
2169
|
+
const v = c + hcg[2] / 100 * (1 - c);
|
|
2170
|
+
return [
|
|
2171
|
+
hcg[0],
|
|
2172
|
+
(v - c) * 100,
|
|
2173
|
+
(1 - v) * 100
|
|
2174
|
+
];
|
|
2175
|
+
};
|
|
2176
|
+
convert$1.hwb.hcg = function(hwb) {
|
|
2177
|
+
const w = hwb[1] / 100;
|
|
2178
|
+
const v = 1 - hwb[2] / 100;
|
|
2179
|
+
const c = v - w;
|
|
2180
|
+
let g = 0;
|
|
2181
|
+
if (c < 1) g = (v - c) / (1 - c);
|
|
2182
|
+
return [
|
|
2183
|
+
hwb[0],
|
|
2184
|
+
c * 100,
|
|
2185
|
+
g * 100
|
|
2186
|
+
];
|
|
2187
|
+
};
|
|
2188
|
+
convert$1.apple.rgb = function(apple) {
|
|
2189
|
+
return [
|
|
2190
|
+
apple[0] / 65535 * 255,
|
|
2191
|
+
apple[1] / 65535 * 255,
|
|
2192
|
+
apple[2] / 65535 * 255
|
|
2193
|
+
];
|
|
2194
|
+
};
|
|
2195
|
+
convert$1.rgb.apple = function(rgb) {
|
|
2196
|
+
return [
|
|
2197
|
+
rgb[0] / 255 * 65535,
|
|
2198
|
+
rgb[1] / 255 * 65535,
|
|
2199
|
+
rgb[2] / 255 * 65535
|
|
2200
|
+
];
|
|
2201
|
+
};
|
|
2202
|
+
convert$1.gray.rgb = function(args) {
|
|
2203
|
+
return [
|
|
2204
|
+
args[0] / 100 * 255,
|
|
2205
|
+
args[0] / 100 * 255,
|
|
2206
|
+
args[0] / 100 * 255
|
|
2207
|
+
];
|
|
2208
|
+
};
|
|
2209
|
+
convert$1.gray.hsl = function(args) {
|
|
2210
|
+
return [
|
|
2211
|
+
0,
|
|
2212
|
+
0,
|
|
2213
|
+
args[0]
|
|
2214
|
+
];
|
|
2215
|
+
};
|
|
2216
|
+
convert$1.gray.hsv = convert$1.gray.hsl;
|
|
2217
|
+
convert$1.gray.hwb = function(gray) {
|
|
2218
|
+
return [
|
|
2219
|
+
0,
|
|
2220
|
+
100,
|
|
2221
|
+
gray[0]
|
|
2222
|
+
];
|
|
2223
|
+
};
|
|
2224
|
+
convert$1.gray.cmyk = function(gray) {
|
|
2225
|
+
return [
|
|
2226
|
+
0,
|
|
2227
|
+
0,
|
|
2228
|
+
0,
|
|
2229
|
+
gray[0]
|
|
2230
|
+
];
|
|
2231
|
+
};
|
|
2232
|
+
convert$1.gray.lab = function(gray) {
|
|
2233
|
+
return [
|
|
2234
|
+
gray[0],
|
|
2235
|
+
0,
|
|
2236
|
+
0
|
|
2237
|
+
];
|
|
2238
|
+
};
|
|
2239
|
+
convert$1.gray.hex = function(gray) {
|
|
2240
|
+
const val = Math.round(gray[0] / 100 * 255) & 255;
|
|
2241
|
+
const string = ((val << 16) + (val << 8) + val).toString(16).toUpperCase();
|
|
2242
|
+
return "000000".substring(string.length) + string;
|
|
2243
|
+
};
|
|
2244
|
+
convert$1.rgb.gray = function(rgb) {
|
|
2245
|
+
return [(rgb[0] + rgb[1] + rgb[2]) / 3 / 255 * 100];
|
|
2246
|
+
};
|
|
2247
|
+
}) });
|
|
2248
|
+
|
|
2249
|
+
//#endregion
|
|
2250
|
+
//#region node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/route.js
|
|
2251
|
+
var require_route = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/route.js": ((exports, module) => {
|
|
2252
|
+
const conversions$1 = require_conversions();
|
|
2253
|
+
function buildGraph() {
|
|
2254
|
+
const graph = {};
|
|
2255
|
+
const models$1 = Object.keys(conversions$1);
|
|
2256
|
+
for (let len = models$1.length, i = 0; i < len; i++) graph[models$1[i]] = {
|
|
2257
|
+
distance: -1,
|
|
2258
|
+
parent: null
|
|
2259
|
+
};
|
|
2260
|
+
return graph;
|
|
2261
|
+
}
|
|
2262
|
+
function deriveBFS(fromModel) {
|
|
2263
|
+
const graph = buildGraph();
|
|
2264
|
+
const queue = [fromModel];
|
|
2265
|
+
graph[fromModel].distance = 0;
|
|
2266
|
+
while (queue.length) {
|
|
2267
|
+
const current = queue.pop();
|
|
2268
|
+
const adjacents = Object.keys(conversions$1[current]);
|
|
2269
|
+
for (let len = adjacents.length, i = 0; i < len; i++) {
|
|
2270
|
+
const adjacent = adjacents[i];
|
|
2271
|
+
const node = graph[adjacent];
|
|
2272
|
+
if (node.distance === -1) {
|
|
2273
|
+
node.distance = graph[current].distance + 1;
|
|
2274
|
+
node.parent = current;
|
|
2275
|
+
queue.unshift(adjacent);
|
|
2276
|
+
}
|
|
2277
|
+
}
|
|
2278
|
+
}
|
|
2279
|
+
return graph;
|
|
2280
|
+
}
|
|
2281
|
+
function link(from, to) {
|
|
2282
|
+
return function(args) {
|
|
2283
|
+
return to(from(args));
|
|
2284
|
+
};
|
|
2285
|
+
}
|
|
2286
|
+
function wrapConversion(toModel, graph) {
|
|
2287
|
+
const path = [graph[toModel].parent, toModel];
|
|
2288
|
+
let fn = conversions$1[graph[toModel].parent][toModel];
|
|
2289
|
+
let cur = graph[toModel].parent;
|
|
2290
|
+
while (graph[cur].parent) {
|
|
2291
|
+
path.unshift(graph[cur].parent);
|
|
2292
|
+
fn = link(conversions$1[graph[cur].parent][cur], fn);
|
|
2293
|
+
cur = graph[cur].parent;
|
|
2294
|
+
}
|
|
2295
|
+
fn.conversion = path;
|
|
2296
|
+
return fn;
|
|
2297
|
+
}
|
|
2298
|
+
module.exports = function(fromModel) {
|
|
2299
|
+
const graph = deriveBFS(fromModel);
|
|
2300
|
+
const conversion = {};
|
|
2301
|
+
const models$1 = Object.keys(graph);
|
|
2302
|
+
for (let len = models$1.length, i = 0; i < len; i++) {
|
|
2303
|
+
const toModel = models$1[i];
|
|
2304
|
+
if (graph[toModel].parent === null) continue;
|
|
2305
|
+
conversion[toModel] = wrapConversion(toModel, graph);
|
|
2306
|
+
}
|
|
2307
|
+
return conversion;
|
|
2308
|
+
};
|
|
2309
|
+
}) });
|
|
2310
|
+
|
|
2311
|
+
//#endregion
|
|
2312
|
+
//#region node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/index.js
|
|
2313
|
+
var require_color_convert = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/index.js": ((exports, module) => {
|
|
2314
|
+
const conversions = require_conversions();
|
|
2315
|
+
const route = require_route();
|
|
2316
|
+
const convert = {};
|
|
2317
|
+
const models = Object.keys(conversions);
|
|
2318
|
+
function wrapRaw(fn) {
|
|
2319
|
+
const wrappedFn = function(...args) {
|
|
2320
|
+
const arg0 = args[0];
|
|
2321
|
+
if (arg0 === void 0 || arg0 === null) return arg0;
|
|
2322
|
+
if (arg0.length > 1) args = arg0;
|
|
2323
|
+
return fn(args);
|
|
2324
|
+
};
|
|
2325
|
+
if ("conversion" in fn) wrappedFn.conversion = fn.conversion;
|
|
2326
|
+
return wrappedFn;
|
|
2327
|
+
}
|
|
2328
|
+
function wrapRounded(fn) {
|
|
2329
|
+
const wrappedFn = function(...args) {
|
|
2330
|
+
const arg0 = args[0];
|
|
2331
|
+
if (arg0 === void 0 || arg0 === null) return arg0;
|
|
2332
|
+
if (arg0.length > 1) args = arg0;
|
|
2333
|
+
const result = fn(args);
|
|
2334
|
+
if (typeof result === "object") for (let len = result.length, i = 0; i < len; i++) result[i] = Math.round(result[i]);
|
|
2335
|
+
return result;
|
|
2336
|
+
};
|
|
2337
|
+
if ("conversion" in fn) wrappedFn.conversion = fn.conversion;
|
|
2338
|
+
return wrappedFn;
|
|
2339
|
+
}
|
|
2340
|
+
models.forEach((fromModel) => {
|
|
2341
|
+
convert[fromModel] = {};
|
|
2342
|
+
Object.defineProperty(convert[fromModel], "channels", { value: conversions[fromModel].channels });
|
|
2343
|
+
Object.defineProperty(convert[fromModel], "labels", { value: conversions[fromModel].labels });
|
|
2344
|
+
const routes = route(fromModel);
|
|
2345
|
+
Object.keys(routes).forEach((toModel) => {
|
|
2346
|
+
const fn = routes[toModel];
|
|
2347
|
+
convert[fromModel][toModel] = wrapRounded(fn);
|
|
2348
|
+
convert[fromModel][toModel].raw = wrapRaw(fn);
|
|
2349
|
+
});
|
|
2350
|
+
});
|
|
2351
|
+
module.exports = convert;
|
|
2352
|
+
}) });
|
|
2353
|
+
|
|
2354
|
+
//#endregion
|
|
2355
|
+
//#region node_modules/.pnpm/ansi-styles@4.3.0/node_modules/ansi-styles/index.js
|
|
2356
|
+
var require_ansi_styles = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/ansi-styles@4.3.0/node_modules/ansi-styles/index.js": ((exports, module) => {
|
|
2357
|
+
const wrapAnsi16 = (fn, offset) => (...args) => {
|
|
2358
|
+
return `\u001B[${fn(...args) + offset}m`;
|
|
2359
|
+
};
|
|
2360
|
+
const wrapAnsi256 = (fn, offset) => (...args) => {
|
|
2361
|
+
const code = fn(...args);
|
|
2362
|
+
return `\u001B[${38 + offset};5;${code}m`;
|
|
2363
|
+
};
|
|
2364
|
+
const wrapAnsi16m = (fn, offset) => (...args) => {
|
|
2365
|
+
const rgb = fn(...args);
|
|
2366
|
+
return `\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;
|
|
2367
|
+
};
|
|
2368
|
+
const ansi2ansi = (n) => n;
|
|
2369
|
+
const rgb2rgb = (r, g, b) => [
|
|
2370
|
+
r,
|
|
2371
|
+
g,
|
|
2372
|
+
b
|
|
2373
|
+
];
|
|
2374
|
+
const setLazyProperty = (object, property, get) => {
|
|
2375
|
+
Object.defineProperty(object, property, {
|
|
2376
|
+
get: () => {
|
|
2377
|
+
const value = get();
|
|
2378
|
+
Object.defineProperty(object, property, {
|
|
2379
|
+
value,
|
|
2380
|
+
enumerable: true,
|
|
2381
|
+
configurable: true
|
|
2382
|
+
});
|
|
2383
|
+
return value;
|
|
2384
|
+
},
|
|
2385
|
+
enumerable: true,
|
|
2386
|
+
configurable: true
|
|
2387
|
+
});
|
|
2388
|
+
};
|
|
2389
|
+
/** @type {typeof import('color-convert')} */
|
|
2390
|
+
let colorConvert;
|
|
2391
|
+
const makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => {
|
|
2392
|
+
if (colorConvert === void 0) colorConvert = require_color_convert();
|
|
2393
|
+
const offset = isBackground ? 10 : 0;
|
|
2394
|
+
const styles = {};
|
|
2395
|
+
for (const [sourceSpace, suite] of Object.entries(colorConvert)) {
|
|
2396
|
+
const name = sourceSpace === "ansi16" ? "ansi" : sourceSpace;
|
|
2397
|
+
if (sourceSpace === targetSpace) styles[name] = wrap(identity, offset);
|
|
2398
|
+
else if (typeof suite === "object") styles[name] = wrap(suite[targetSpace], offset);
|
|
2399
|
+
}
|
|
2400
|
+
return styles;
|
|
2401
|
+
};
|
|
2402
|
+
function assembleStyles() {
|
|
2403
|
+
const codes = /* @__PURE__ */ new Map();
|
|
2404
|
+
const styles = {
|
|
2405
|
+
modifier: {
|
|
2406
|
+
reset: [0, 0],
|
|
2407
|
+
bold: [1, 22],
|
|
2408
|
+
dim: [2, 22],
|
|
2409
|
+
italic: [3, 23],
|
|
2410
|
+
underline: [4, 24],
|
|
2411
|
+
inverse: [7, 27],
|
|
2412
|
+
hidden: [8, 28],
|
|
2413
|
+
strikethrough: [9, 29]
|
|
2414
|
+
},
|
|
2415
|
+
color: {
|
|
2416
|
+
black: [30, 39],
|
|
2417
|
+
red: [31, 39],
|
|
2418
|
+
green: [32, 39],
|
|
2419
|
+
yellow: [33, 39],
|
|
2420
|
+
blue: [34, 39],
|
|
2421
|
+
magenta: [35, 39],
|
|
2422
|
+
cyan: [36, 39],
|
|
2423
|
+
white: [37, 39],
|
|
2424
|
+
blackBright: [90, 39],
|
|
2425
|
+
redBright: [91, 39],
|
|
2426
|
+
greenBright: [92, 39],
|
|
2427
|
+
yellowBright: [93, 39],
|
|
2428
|
+
blueBright: [94, 39],
|
|
2429
|
+
magentaBright: [95, 39],
|
|
2430
|
+
cyanBright: [96, 39],
|
|
2431
|
+
whiteBright: [97, 39]
|
|
2432
|
+
},
|
|
2433
|
+
bgColor: {
|
|
2434
|
+
bgBlack: [40, 49],
|
|
2435
|
+
bgRed: [41, 49],
|
|
2436
|
+
bgGreen: [42, 49],
|
|
2437
|
+
bgYellow: [43, 49],
|
|
2438
|
+
bgBlue: [44, 49],
|
|
2439
|
+
bgMagenta: [45, 49],
|
|
2440
|
+
bgCyan: [46, 49],
|
|
2441
|
+
bgWhite: [47, 49],
|
|
2442
|
+
bgBlackBright: [100, 49],
|
|
2443
|
+
bgRedBright: [101, 49],
|
|
2444
|
+
bgGreenBright: [102, 49],
|
|
2445
|
+
bgYellowBright: [103, 49],
|
|
2446
|
+
bgBlueBright: [104, 49],
|
|
2447
|
+
bgMagentaBright: [105, 49],
|
|
2448
|
+
bgCyanBright: [106, 49],
|
|
2449
|
+
bgWhiteBright: [107, 49]
|
|
2450
|
+
}
|
|
2451
|
+
};
|
|
2452
|
+
styles.color.gray = styles.color.blackBright;
|
|
2453
|
+
styles.bgColor.bgGray = styles.bgColor.bgBlackBright;
|
|
2454
|
+
styles.color.grey = styles.color.blackBright;
|
|
2455
|
+
styles.bgColor.bgGrey = styles.bgColor.bgBlackBright;
|
|
2456
|
+
for (const [groupName, group] of Object.entries(styles)) {
|
|
2457
|
+
for (const [styleName, style] of Object.entries(group)) {
|
|
2458
|
+
styles[styleName] = {
|
|
2459
|
+
open: `\u001B[${style[0]}m`,
|
|
2460
|
+
close: `\u001B[${style[1]}m`
|
|
2461
|
+
};
|
|
2462
|
+
group[styleName] = styles[styleName];
|
|
2463
|
+
codes.set(style[0], style[1]);
|
|
2464
|
+
}
|
|
2465
|
+
Object.defineProperty(styles, groupName, {
|
|
2466
|
+
value: group,
|
|
2467
|
+
enumerable: false
|
|
2468
|
+
});
|
|
2469
|
+
}
|
|
2470
|
+
Object.defineProperty(styles, "codes", {
|
|
2471
|
+
value: codes,
|
|
2472
|
+
enumerable: false
|
|
2473
|
+
});
|
|
2474
|
+
styles.color.close = "\x1B[39m";
|
|
2475
|
+
styles.bgColor.close = "\x1B[49m";
|
|
2476
|
+
setLazyProperty(styles.color, "ansi", () => makeDynamicStyles(wrapAnsi16, "ansi16", ansi2ansi, false));
|
|
2477
|
+
setLazyProperty(styles.color, "ansi256", () => makeDynamicStyles(wrapAnsi256, "ansi256", ansi2ansi, false));
|
|
2478
|
+
setLazyProperty(styles.color, "ansi16m", () => makeDynamicStyles(wrapAnsi16m, "rgb", rgb2rgb, false));
|
|
2479
|
+
setLazyProperty(styles.bgColor, "ansi", () => makeDynamicStyles(wrapAnsi16, "ansi16", ansi2ansi, true));
|
|
2480
|
+
setLazyProperty(styles.bgColor, "ansi256", () => makeDynamicStyles(wrapAnsi256, "ansi256", ansi2ansi, true));
|
|
2481
|
+
setLazyProperty(styles.bgColor, "ansi16m", () => makeDynamicStyles(wrapAnsi16m, "rgb", rgb2rgb, true));
|
|
2482
|
+
return styles;
|
|
2483
|
+
}
|
|
2484
|
+
Object.defineProperty(module, "exports", {
|
|
2485
|
+
enumerable: true,
|
|
2486
|
+
get: assembleStyles
|
|
2487
|
+
});
|
|
2488
|
+
}) });
|
|
2489
|
+
|
|
2490
|
+
//#endregion
|
|
2491
|
+
//#region node_modules/.pnpm/wrap-ansi@6.2.0/node_modules/wrap-ansi/index.js
|
|
2492
|
+
var require_wrap_ansi = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/wrap-ansi@6.2.0/node_modules/wrap-ansi/index.js": ((exports, module) => {
|
|
2493
|
+
const stringWidth = require_string_width();
|
|
2494
|
+
const stripAnsi = require_strip_ansi();
|
|
2495
|
+
const ansiStyles = require_ansi_styles();
|
|
2496
|
+
const ESCAPES = new Set(["\x1B", ""]);
|
|
2497
|
+
const END_CODE = 39;
|
|
2498
|
+
const wrapAnsi$1 = (code) => `${ESCAPES.values().next().value}[${code}m`;
|
|
2499
|
+
const wordLengths = (string) => string.split(" ").map((character) => stringWidth(character));
|
|
2500
|
+
const wrapWord = (rows, word, columns) => {
|
|
2501
|
+
const characters = [...word];
|
|
2502
|
+
let isInsideEscape = false;
|
|
2503
|
+
let visible = stringWidth(stripAnsi(rows[rows.length - 1]));
|
|
2504
|
+
for (const [index, character] of characters.entries()) {
|
|
2505
|
+
const characterLength = stringWidth(character);
|
|
2506
|
+
if (visible + characterLength <= columns) rows[rows.length - 1] += character;
|
|
2507
|
+
else {
|
|
2508
|
+
rows.push(character);
|
|
2509
|
+
visible = 0;
|
|
2510
|
+
}
|
|
2511
|
+
if (ESCAPES.has(character)) isInsideEscape = true;
|
|
2512
|
+
else if (isInsideEscape && character === "m") {
|
|
2513
|
+
isInsideEscape = false;
|
|
2514
|
+
continue;
|
|
2515
|
+
}
|
|
2516
|
+
if (isInsideEscape) continue;
|
|
2517
|
+
visible += characterLength;
|
|
2518
|
+
if (visible === columns && index < characters.length - 1) {
|
|
2519
|
+
rows.push("");
|
|
2520
|
+
visible = 0;
|
|
2521
|
+
}
|
|
2522
|
+
}
|
|
2523
|
+
if (!visible && rows[rows.length - 1].length > 0 && rows.length > 1) rows[rows.length - 2] += rows.pop();
|
|
2524
|
+
};
|
|
2525
|
+
const stringVisibleTrimSpacesRight = (str) => {
|
|
2526
|
+
const words = str.split(" ");
|
|
2527
|
+
let last = words.length;
|
|
2528
|
+
while (last > 0) {
|
|
2529
|
+
if (stringWidth(words[last - 1]) > 0) break;
|
|
2530
|
+
last--;
|
|
2531
|
+
}
|
|
2532
|
+
if (last === words.length) return str;
|
|
2533
|
+
return words.slice(0, last).join(" ") + words.slice(last).join("");
|
|
2534
|
+
};
|
|
2535
|
+
const exec = (string, columns, options = {}) => {
|
|
2536
|
+
if (options.trim !== false && string.trim() === "") return "";
|
|
2537
|
+
let pre = "";
|
|
2538
|
+
let ret = "";
|
|
2539
|
+
let escapeCode;
|
|
2540
|
+
const lengths = wordLengths(string);
|
|
2541
|
+
let rows = [""];
|
|
2542
|
+
for (const [index, word] of string.split(" ").entries()) {
|
|
2543
|
+
if (options.trim !== false) rows[rows.length - 1] = rows[rows.length - 1].trimLeft();
|
|
2544
|
+
let rowLength = stringWidth(rows[rows.length - 1]);
|
|
2545
|
+
if (index !== 0) {
|
|
2546
|
+
if (rowLength >= columns && (options.wordWrap === false || options.trim === false)) {
|
|
2547
|
+
rows.push("");
|
|
2548
|
+
rowLength = 0;
|
|
2549
|
+
}
|
|
2550
|
+
if (rowLength > 0 || options.trim === false) {
|
|
2551
|
+
rows[rows.length - 1] += " ";
|
|
2552
|
+
rowLength++;
|
|
2553
|
+
}
|
|
2554
|
+
}
|
|
2555
|
+
if (options.hard && lengths[index] > columns) {
|
|
2556
|
+
const remainingColumns = columns - rowLength;
|
|
2557
|
+
const breaksStartingThisLine = 1 + Math.floor((lengths[index] - remainingColumns - 1) / columns);
|
|
2558
|
+
if (Math.floor((lengths[index] - 1) / columns) < breaksStartingThisLine) rows.push("");
|
|
2559
|
+
wrapWord(rows, word, columns);
|
|
2560
|
+
continue;
|
|
2561
|
+
}
|
|
2562
|
+
if (rowLength + lengths[index] > columns && rowLength > 0 && lengths[index] > 0) {
|
|
2563
|
+
if (options.wordWrap === false && rowLength < columns) {
|
|
2564
|
+
wrapWord(rows, word, columns);
|
|
2565
|
+
continue;
|
|
2566
|
+
}
|
|
2567
|
+
rows.push("");
|
|
2568
|
+
}
|
|
2569
|
+
if (rowLength + lengths[index] > columns && options.wordWrap === false) {
|
|
2570
|
+
wrapWord(rows, word, columns);
|
|
2571
|
+
continue;
|
|
2572
|
+
}
|
|
2573
|
+
rows[rows.length - 1] += word;
|
|
2574
|
+
}
|
|
2575
|
+
if (options.trim !== false) rows = rows.map(stringVisibleTrimSpacesRight);
|
|
2576
|
+
pre = rows.join("\n");
|
|
2577
|
+
for (const [index, character] of [...pre].entries()) {
|
|
2578
|
+
ret += character;
|
|
2579
|
+
if (ESCAPES.has(character)) {
|
|
2580
|
+
const code$1 = parseFloat(/\d[^m]*/.exec(pre.slice(index, index + 4)));
|
|
2581
|
+
escapeCode = code$1 === END_CODE ? null : code$1;
|
|
2582
|
+
}
|
|
2583
|
+
const code = ansiStyles.codes.get(Number(escapeCode));
|
|
2584
|
+
if (escapeCode && code) {
|
|
2585
|
+
if (pre[index + 1] === "\n") ret += wrapAnsi$1(code);
|
|
2586
|
+
else if (character === "\n") ret += wrapAnsi$1(escapeCode);
|
|
2587
|
+
}
|
|
2588
|
+
}
|
|
2589
|
+
return ret;
|
|
2590
|
+
};
|
|
2591
|
+
module.exports = (string, columns, options) => {
|
|
2592
|
+
return String(string).normalize().replace(/\r\n/g, "\n").split("\n").map((line) => exec(line, columns, options)).join("\n");
|
|
2593
|
+
};
|
|
2594
|
+
}) });
|
|
2595
|
+
|
|
2596
|
+
//#endregion
|
|
2597
|
+
//#region node_modules/.pnpm/@inquirer+core@10.3.2_@types+node@22.19.1/node_modules/@inquirer/core/dist/esm/lib/utils.js
|
|
2598
|
+
var import_cli_width = /* @__PURE__ */ __toESM(require_cli_width(), 1);
|
|
2599
|
+
var import_wrap_ansi = /* @__PURE__ */ __toESM(require_wrap_ansi(), 1);
|
|
2600
|
+
/**
|
|
2601
|
+
* Force line returns at specific width. This function is ANSI code friendly and it'll
|
|
2602
|
+
* ignore invisible codes during width calculation.
|
|
2603
|
+
* @param {string} content
|
|
2604
|
+
* @param {number} width
|
|
2605
|
+
* @return {string}
|
|
2606
|
+
*/
|
|
2607
|
+
function breakLines(content, width) {
|
|
2608
|
+
return content.split("\n").flatMap((line) => (0, import_wrap_ansi.default)(line, width, {
|
|
2609
|
+
trim: false,
|
|
2610
|
+
hard: true
|
|
2611
|
+
}).split("\n").map((str) => str.trimEnd())).join("\n");
|
|
2612
|
+
}
|
|
2613
|
+
/**
|
|
2614
|
+
* Returns the width of the active readline, or 80 as default value.
|
|
2615
|
+
* @returns {number}
|
|
2616
|
+
*/
|
|
2617
|
+
function readlineWidth() {
|
|
2618
|
+
return (0, import_cli_width.default)({
|
|
2619
|
+
defaultWidth: 80,
|
|
2620
|
+
output: readline$1().output
|
|
2621
|
+
});
|
|
2622
|
+
}
|
|
2623
|
+
|
|
2624
|
+
//#endregion
|
|
2625
|
+
//#region node_modules/.pnpm/mute-stream@2.0.0/node_modules/mute-stream/lib/index.js
|
|
2626
|
+
var require_lib = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/mute-stream@2.0.0/node_modules/mute-stream/lib/index.js": ((exports, module) => {
|
|
2627
|
+
const Stream = __require("stream");
|
|
2628
|
+
var MuteStream$1 = class extends Stream {
|
|
2629
|
+
#isTTY = null;
|
|
2630
|
+
constructor(opts = {}) {
|
|
2631
|
+
super(opts);
|
|
2632
|
+
this.writable = this.readable = true;
|
|
2633
|
+
this.muted = false;
|
|
2634
|
+
this.on("pipe", this._onpipe);
|
|
2635
|
+
this.replace = opts.replace;
|
|
2636
|
+
this._prompt = opts.prompt || null;
|
|
2637
|
+
this._hadControl = false;
|
|
2638
|
+
}
|
|
2639
|
+
#destSrc(key, def) {
|
|
2640
|
+
if (this._dest) return this._dest[key];
|
|
2641
|
+
if (this._src) return this._src[key];
|
|
2642
|
+
return def;
|
|
2643
|
+
}
|
|
2644
|
+
#proxy(method, ...args) {
|
|
2645
|
+
if (typeof this._dest?.[method] === "function") this._dest[method](...args);
|
|
2646
|
+
if (typeof this._src?.[method] === "function") this._src[method](...args);
|
|
2647
|
+
}
|
|
2648
|
+
get isTTY() {
|
|
2649
|
+
if (this.#isTTY !== null) return this.#isTTY;
|
|
2650
|
+
return this.#destSrc("isTTY", false);
|
|
2651
|
+
}
|
|
2652
|
+
set isTTY(val) {
|
|
2653
|
+
this.#isTTY = val;
|
|
2654
|
+
}
|
|
2655
|
+
get rows() {
|
|
2656
|
+
return this.#destSrc("rows");
|
|
2657
|
+
}
|
|
2658
|
+
get columns() {
|
|
2659
|
+
return this.#destSrc("columns");
|
|
2660
|
+
}
|
|
2661
|
+
mute() {
|
|
2662
|
+
this.muted = true;
|
|
2663
|
+
}
|
|
2664
|
+
unmute() {
|
|
2665
|
+
this.muted = false;
|
|
2666
|
+
}
|
|
2667
|
+
_onpipe(src) {
|
|
2668
|
+
this._src = src;
|
|
2669
|
+
}
|
|
2670
|
+
pipe(dest, options) {
|
|
2671
|
+
this._dest = dest;
|
|
2672
|
+
return super.pipe(dest, options);
|
|
2673
|
+
}
|
|
2674
|
+
pause() {
|
|
2675
|
+
if (this._src) return this._src.pause();
|
|
2676
|
+
}
|
|
2677
|
+
resume() {
|
|
2678
|
+
if (this._src) return this._src.resume();
|
|
2679
|
+
}
|
|
2680
|
+
write(c) {
|
|
2681
|
+
if (this.muted) {
|
|
2682
|
+
if (!this.replace) return true;
|
|
2683
|
+
if (c.match(/^\u001b/)) {
|
|
2684
|
+
if (c.indexOf(this._prompt) === 0) {
|
|
2685
|
+
c = c.slice(this._prompt.length);
|
|
2686
|
+
c = c.replace(/./g, this.replace);
|
|
2687
|
+
c = this._prompt + c;
|
|
2688
|
+
}
|
|
2689
|
+
this._hadControl = true;
|
|
2690
|
+
return this.emit("data", c);
|
|
2691
|
+
} else {
|
|
2692
|
+
if (this._prompt && this._hadControl && c.indexOf(this._prompt) === 0) {
|
|
2693
|
+
this._hadControl = false;
|
|
2694
|
+
this.emit("data", this._prompt);
|
|
2695
|
+
c = c.slice(this._prompt.length);
|
|
2696
|
+
}
|
|
2697
|
+
c = c.toString().replace(/./g, this.replace);
|
|
2698
|
+
}
|
|
2699
|
+
}
|
|
2700
|
+
this.emit("data", c);
|
|
2701
|
+
}
|
|
2702
|
+
end(c) {
|
|
2703
|
+
if (this.muted) if (c && this.replace) c = c.toString().replace(/./g, this.replace);
|
|
2704
|
+
else c = null;
|
|
2705
|
+
if (c) this.emit("data", c);
|
|
2706
|
+
this.emit("end");
|
|
2707
|
+
}
|
|
2708
|
+
destroy(...args) {
|
|
2709
|
+
return this.#proxy("destroy", ...args);
|
|
2710
|
+
}
|
|
2711
|
+
destroySoon(...args) {
|
|
2712
|
+
return this.#proxy("destroySoon", ...args);
|
|
2713
|
+
}
|
|
2714
|
+
close(...args) {
|
|
2715
|
+
return this.#proxy("close", ...args);
|
|
2716
|
+
}
|
|
2717
|
+
};
|
|
2718
|
+
module.exports = MuteStream$1;
|
|
2719
|
+
}) });
|
|
2720
|
+
|
|
2721
|
+
//#endregion
|
|
2722
|
+
//#region node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/signals.js
|
|
2723
|
+
/**
|
|
2724
|
+
* This is not the set of all possible signals.
|
|
2725
|
+
*
|
|
2726
|
+
* It IS, however, the set of all signals that trigger
|
|
2727
|
+
* an exit on either Linux or BSD systems. Linux is a
|
|
2728
|
+
* superset of the signal names supported on BSD, and
|
|
2729
|
+
* the unknown signals just fail to register, so we can
|
|
2730
|
+
* catch that easily enough.
|
|
2731
|
+
*
|
|
2732
|
+
* Windows signals are a different set, since there are
|
|
2733
|
+
* signals that terminate Windows processes, but don't
|
|
2734
|
+
* terminate (or don't even exist) on Posix systems.
|
|
2735
|
+
*
|
|
2736
|
+
* Don't bother with SIGKILL. It's uncatchable, which
|
|
2737
|
+
* means that we can't fire any callbacks anyway.
|
|
2738
|
+
*
|
|
2739
|
+
* If a user does happen to register a handler on a non-
|
|
2740
|
+
* fatal signal like SIGWINCH or something, and then
|
|
2741
|
+
* exit, it'll end up firing `process.emit('exit')`, so
|
|
2742
|
+
* the handler will be fired anyway.
|
|
2743
|
+
*
|
|
2744
|
+
* SIGBUS, SIGFPE, SIGSEGV and SIGILL, when not raised
|
|
2745
|
+
* artificially, inherently leave the process in a
|
|
2746
|
+
* state from which it is not safe to try and enter JS
|
|
2747
|
+
* listeners.
|
|
2748
|
+
*/
|
|
2749
|
+
const signals = [];
|
|
2750
|
+
signals.push("SIGHUP", "SIGINT", "SIGTERM");
|
|
2751
|
+
if (process.platform !== "win32") signals.push("SIGALRM", "SIGABRT", "SIGVTALRM", "SIGXCPU", "SIGXFSZ", "SIGUSR2", "SIGTRAP", "SIGSYS", "SIGQUIT", "SIGIOT");
|
|
2752
|
+
if (process.platform === "linux") signals.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT");
|
|
2753
|
+
|
|
2754
|
+
//#endregion
|
|
2755
|
+
//#region node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/index.js
|
|
2756
|
+
const processOk = (process$3) => !!process$3 && typeof process$3 === "object" && typeof process$3.removeListener === "function" && typeof process$3.emit === "function" && typeof process$3.reallyExit === "function" && typeof process$3.listeners === "function" && typeof process$3.kill === "function" && typeof process$3.pid === "number" && typeof process$3.on === "function";
|
|
2757
|
+
const kExitEmitter = Symbol.for("signal-exit emitter");
|
|
2758
|
+
const global = globalThis;
|
|
2759
|
+
const ObjectDefineProperty = Object.defineProperty.bind(Object);
|
|
2760
|
+
var Emitter = class {
|
|
2761
|
+
emitted = {
|
|
2762
|
+
afterExit: false,
|
|
2763
|
+
exit: false
|
|
2764
|
+
};
|
|
2765
|
+
listeners = {
|
|
2766
|
+
afterExit: [],
|
|
2767
|
+
exit: []
|
|
2768
|
+
};
|
|
2769
|
+
count = 0;
|
|
2770
|
+
id = Math.random();
|
|
2771
|
+
constructor() {
|
|
2772
|
+
if (global[kExitEmitter]) return global[kExitEmitter];
|
|
2773
|
+
ObjectDefineProperty(global, kExitEmitter, {
|
|
2774
|
+
value: this,
|
|
2775
|
+
writable: false,
|
|
2776
|
+
enumerable: false,
|
|
2777
|
+
configurable: false
|
|
2778
|
+
});
|
|
2779
|
+
}
|
|
2780
|
+
on(ev, fn) {
|
|
2781
|
+
this.listeners[ev].push(fn);
|
|
2782
|
+
}
|
|
2783
|
+
removeListener(ev, fn) {
|
|
2784
|
+
const list = this.listeners[ev];
|
|
2785
|
+
const i = list.indexOf(fn);
|
|
2786
|
+
/* c8 ignore start */
|
|
2787
|
+
if (i === -1) return;
|
|
2788
|
+
/* c8 ignore stop */
|
|
2789
|
+
if (i === 0 && list.length === 1) list.length = 0;
|
|
2790
|
+
else list.splice(i, 1);
|
|
2791
|
+
}
|
|
2792
|
+
emit(ev, code, signal) {
|
|
2793
|
+
if (this.emitted[ev]) return false;
|
|
2794
|
+
this.emitted[ev] = true;
|
|
2795
|
+
let ret = false;
|
|
2796
|
+
for (const fn of this.listeners[ev]) ret = fn(code, signal) === true || ret;
|
|
2797
|
+
if (ev === "exit") ret = this.emit("afterExit", code, signal) || ret;
|
|
2798
|
+
return ret;
|
|
2799
|
+
}
|
|
2800
|
+
};
|
|
2801
|
+
var SignalExitBase = class {};
|
|
2802
|
+
const signalExitWrap = (handler) => {
|
|
2803
|
+
return {
|
|
2804
|
+
onExit(cb, opts) {
|
|
2805
|
+
return handler.onExit(cb, opts);
|
|
2806
|
+
},
|
|
2807
|
+
load() {
|
|
2808
|
+
return handler.load();
|
|
2809
|
+
},
|
|
2810
|
+
unload() {
|
|
2811
|
+
return handler.unload();
|
|
2812
|
+
}
|
|
2813
|
+
};
|
|
2814
|
+
};
|
|
2815
|
+
var SignalExitFallback = class extends SignalExitBase {
|
|
2816
|
+
onExit() {
|
|
2817
|
+
return () => {};
|
|
2818
|
+
}
|
|
2819
|
+
load() {}
|
|
2820
|
+
unload() {}
|
|
2821
|
+
};
|
|
2822
|
+
var SignalExit = class extends SignalExitBase {
|
|
2823
|
+
/* c8 ignore start */
|
|
2824
|
+
#hupSig = process$2.platform === "win32" ? "SIGINT" : "SIGHUP";
|
|
2825
|
+
/* c8 ignore stop */
|
|
2826
|
+
#emitter = new Emitter();
|
|
2827
|
+
#process;
|
|
2828
|
+
#originalProcessEmit;
|
|
2829
|
+
#originalProcessReallyExit;
|
|
2830
|
+
#sigListeners = {};
|
|
2831
|
+
#loaded = false;
|
|
2832
|
+
constructor(process$3) {
|
|
2833
|
+
super();
|
|
2834
|
+
this.#process = process$3;
|
|
2835
|
+
this.#sigListeners = {};
|
|
2836
|
+
for (const sig of signals) this.#sigListeners[sig] = () => {
|
|
2837
|
+
const listeners = this.#process.listeners(sig);
|
|
2838
|
+
let { count } = this.#emitter;
|
|
2839
|
+
/* c8 ignore start */
|
|
2840
|
+
const p = process$3;
|
|
2841
|
+
if (typeof p.__signal_exit_emitter__ === "object" && typeof p.__signal_exit_emitter__.count === "number") count += p.__signal_exit_emitter__.count;
|
|
2842
|
+
/* c8 ignore stop */
|
|
2843
|
+
if (listeners.length === count) {
|
|
2844
|
+
this.unload();
|
|
2845
|
+
const ret = this.#emitter.emit("exit", null, sig);
|
|
2846
|
+
/* c8 ignore start */
|
|
2847
|
+
const s = sig === "SIGHUP" ? this.#hupSig : sig;
|
|
2848
|
+
if (!ret) process$3.kill(process$3.pid, s);
|
|
2849
|
+
}
|
|
2850
|
+
};
|
|
2851
|
+
this.#originalProcessReallyExit = process$3.reallyExit;
|
|
2852
|
+
this.#originalProcessEmit = process$3.emit;
|
|
2853
|
+
}
|
|
2854
|
+
onExit(cb, opts) {
|
|
2855
|
+
/* c8 ignore start */
|
|
2856
|
+
if (!processOk(this.#process)) return () => {};
|
|
2857
|
+
/* c8 ignore stop */
|
|
2858
|
+
if (this.#loaded === false) this.load();
|
|
2859
|
+
const ev = opts?.alwaysLast ? "afterExit" : "exit";
|
|
2860
|
+
this.#emitter.on(ev, cb);
|
|
2861
|
+
return () => {
|
|
2862
|
+
this.#emitter.removeListener(ev, cb);
|
|
2863
|
+
if (this.#emitter.listeners["exit"].length === 0 && this.#emitter.listeners["afterExit"].length === 0) this.unload();
|
|
2864
|
+
};
|
|
2865
|
+
}
|
|
2866
|
+
load() {
|
|
2867
|
+
if (this.#loaded) return;
|
|
2868
|
+
this.#loaded = true;
|
|
2869
|
+
this.#emitter.count += 1;
|
|
2870
|
+
for (const sig of signals) try {
|
|
2871
|
+
const fn = this.#sigListeners[sig];
|
|
2872
|
+
if (fn) this.#process.on(sig, fn);
|
|
2873
|
+
} catch (_) {}
|
|
2874
|
+
this.#process.emit = (ev, ...a) => {
|
|
2875
|
+
return this.#processEmit(ev, ...a);
|
|
2876
|
+
};
|
|
2877
|
+
this.#process.reallyExit = (code) => {
|
|
2878
|
+
return this.#processReallyExit(code);
|
|
2879
|
+
};
|
|
2880
|
+
}
|
|
2881
|
+
unload() {
|
|
2882
|
+
if (!this.#loaded) return;
|
|
2883
|
+
this.#loaded = false;
|
|
2884
|
+
signals.forEach((sig) => {
|
|
2885
|
+
const listener = this.#sigListeners[sig];
|
|
2886
|
+
/* c8 ignore start */
|
|
2887
|
+
if (!listener) throw new Error("Listener not defined for signal: " + sig);
|
|
2888
|
+
/* c8 ignore stop */
|
|
2889
|
+
try {
|
|
2890
|
+
this.#process.removeListener(sig, listener);
|
|
2891
|
+
} catch (_) {}
|
|
2892
|
+
/* c8 ignore stop */
|
|
2893
|
+
});
|
|
2894
|
+
this.#process.emit = this.#originalProcessEmit;
|
|
2895
|
+
this.#process.reallyExit = this.#originalProcessReallyExit;
|
|
2896
|
+
this.#emitter.count -= 1;
|
|
2897
|
+
}
|
|
2898
|
+
#processReallyExit(code) {
|
|
2899
|
+
/* c8 ignore start */
|
|
2900
|
+
if (!processOk(this.#process)) return 0;
|
|
2901
|
+
this.#process.exitCode = code || 0;
|
|
2902
|
+
/* c8 ignore stop */
|
|
2903
|
+
this.#emitter.emit("exit", this.#process.exitCode, null);
|
|
2904
|
+
return this.#originalProcessReallyExit.call(this.#process, this.#process.exitCode);
|
|
2905
|
+
}
|
|
2906
|
+
#processEmit(ev, ...args) {
|
|
2907
|
+
const og = this.#originalProcessEmit;
|
|
2908
|
+
if (ev === "exit" && processOk(this.#process)) {
|
|
2909
|
+
if (typeof args[0] === "number") this.#process.exitCode = args[0];
|
|
2910
|
+
/* c8 ignore start */
|
|
2911
|
+
const ret = og.call(this.#process, ev, ...args);
|
|
2912
|
+
/* c8 ignore start */
|
|
2913
|
+
this.#emitter.emit("exit", this.#process.exitCode, null);
|
|
2914
|
+
/* c8 ignore stop */
|
|
2915
|
+
return ret;
|
|
2916
|
+
} else return og.call(this.#process, ev, ...args);
|
|
2917
|
+
}
|
|
2918
|
+
};
|
|
2919
|
+
const process$2 = globalThis.process;
|
|
2920
|
+
const { onExit, load, unload } = signalExitWrap(processOk(process$2) ? new SignalExit(process$2) : new SignalExitFallback());
|
|
2921
|
+
|
|
2922
|
+
//#endregion
|
|
2923
|
+
//#region node_modules/.pnpm/@inquirer+ansi@1.0.2/node_modules/@inquirer/ansi/dist/esm/index.js
|
|
2924
|
+
const ESC = "\x1B[";
|
|
2925
|
+
/** Move cursor to first column */
|
|
2926
|
+
const cursorLeft = ESC + "G";
|
|
2927
|
+
/** Hide the cursor */
|
|
2928
|
+
const cursorHide = ESC + "?25l";
|
|
2929
|
+
/** Show the cursor */
|
|
2930
|
+
const cursorShow = ESC + "?25h";
|
|
2931
|
+
/** Move cursor up by count rows */
|
|
2932
|
+
const cursorUp = (rows = 1) => rows > 0 ? `${ESC}${rows}A` : "";
|
|
2933
|
+
/** Move cursor down by count rows */
|
|
2934
|
+
const cursorDown = (rows = 1) => rows > 0 ? `${ESC}${rows}B` : "";
|
|
2935
|
+
/** Move cursor to position (x, y) */
|
|
2936
|
+
const cursorTo = (x, y) => {
|
|
2937
|
+
if (typeof y === "number" && !Number.isNaN(y)) return `${ESC}${y + 1};${x + 1}H`;
|
|
2938
|
+
return `${ESC}${x + 1}G`;
|
|
2939
|
+
};
|
|
2940
|
+
const eraseLine = ESC + "2K";
|
|
2941
|
+
/** Erase the specified number of lines above the cursor */
|
|
2942
|
+
const eraseLines = (lines) => lines > 0 ? (eraseLine + cursorUp(1)).repeat(lines - 1) + eraseLine + cursorLeft : "";
|
|
2943
|
+
|
|
2944
|
+
//#endregion
|
|
2945
|
+
//#region node_modules/.pnpm/@inquirer+core@10.3.2_@types+node@22.19.1/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
|
|
2946
|
+
const height = (content) => content.split("\n").length;
|
|
2947
|
+
const lastLine = (content) => content.split("\n").pop() ?? "";
|
|
2948
|
+
var ScreenManager = class {
|
|
2949
|
+
height = 0;
|
|
2950
|
+
extraLinesUnderPrompt = 0;
|
|
2951
|
+
cursorPos;
|
|
2952
|
+
rl;
|
|
2953
|
+
constructor(rl) {
|
|
2954
|
+
this.rl = rl;
|
|
2955
|
+
this.cursorPos = rl.getCursorPos();
|
|
2956
|
+
}
|
|
2957
|
+
write(content) {
|
|
2958
|
+
this.rl.output.unmute();
|
|
2959
|
+
this.rl.output.write(content);
|
|
2960
|
+
this.rl.output.mute();
|
|
2961
|
+
}
|
|
2962
|
+
render(content, bottomContent = "") {
|
|
2963
|
+
const rawPromptLine = stripVTControlCharacters(lastLine(content));
|
|
2964
|
+
let prompt = rawPromptLine;
|
|
2965
|
+
if (this.rl.line.length > 0) prompt = prompt.slice(0, -this.rl.line.length);
|
|
2966
|
+
this.rl.setPrompt(prompt);
|
|
2967
|
+
this.cursorPos = this.rl.getCursorPos();
|
|
2968
|
+
const width = readlineWidth();
|
|
2969
|
+
content = breakLines(content, width);
|
|
2970
|
+
bottomContent = breakLines(bottomContent, width);
|
|
2971
|
+
if (rawPromptLine.length % width === 0) content += "\n";
|
|
2972
|
+
let output = content + (bottomContent ? "\n" + bottomContent : "");
|
|
2973
|
+
const bottomContentHeight = Math.floor(rawPromptLine.length / width) - this.cursorPos.rows + (bottomContent ? height(bottomContent) : 0);
|
|
2974
|
+
if (bottomContentHeight > 0) output += cursorUp(bottomContentHeight);
|
|
2975
|
+
output += cursorTo(this.cursorPos.cols);
|
|
2976
|
+
/**
|
|
2977
|
+
* Render and store state for future re-rendering
|
|
2978
|
+
*/
|
|
2979
|
+
this.write(cursorDown(this.extraLinesUnderPrompt) + eraseLines(this.height) + output);
|
|
2980
|
+
this.extraLinesUnderPrompt = bottomContentHeight;
|
|
2981
|
+
this.height = height(output);
|
|
2982
|
+
}
|
|
2983
|
+
checkCursorPos() {
|
|
2984
|
+
const cursorPos = this.rl.getCursorPos();
|
|
2985
|
+
if (cursorPos.cols !== this.cursorPos.cols) {
|
|
2986
|
+
this.write(cursorTo(cursorPos.cols));
|
|
2987
|
+
this.cursorPos = cursorPos;
|
|
2988
|
+
}
|
|
2989
|
+
}
|
|
2990
|
+
done({ clearContent }) {
|
|
2991
|
+
this.rl.setPrompt("");
|
|
2992
|
+
let output = cursorDown(this.extraLinesUnderPrompt);
|
|
2993
|
+
output += clearContent ? eraseLines(this.height) : "\n";
|
|
2994
|
+
output += cursorShow;
|
|
2995
|
+
this.write(output);
|
|
2996
|
+
this.rl.close();
|
|
2997
|
+
}
|
|
2998
|
+
};
|
|
2999
|
+
|
|
3000
|
+
//#endregion
|
|
3001
|
+
//#region node_modules/.pnpm/@inquirer+core@10.3.2_@types+node@22.19.1/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js
|
|
3002
|
+
var PromisePolyfill = class extends Promise {
|
|
3003
|
+
static withResolver() {
|
|
3004
|
+
let resolve;
|
|
3005
|
+
let reject;
|
|
3006
|
+
return {
|
|
3007
|
+
promise: new Promise((res, rej) => {
|
|
3008
|
+
resolve = res;
|
|
3009
|
+
reject = rej;
|
|
3010
|
+
}),
|
|
3011
|
+
resolve,
|
|
3012
|
+
reject
|
|
3013
|
+
};
|
|
3014
|
+
}
|
|
3015
|
+
};
|
|
3016
|
+
|
|
3017
|
+
//#endregion
|
|
3018
|
+
//#region node_modules/.pnpm/@inquirer+core@10.3.2_@types+node@22.19.1/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
|
3019
|
+
var import_lib = /* @__PURE__ */ __toESM(require_lib(), 1);
|
|
3020
|
+
function getCallSites() {
|
|
3021
|
+
const _prepareStackTrace = Error.prepareStackTrace;
|
|
3022
|
+
let result = [];
|
|
3023
|
+
try {
|
|
3024
|
+
Error.prepareStackTrace = (_, callSites) => {
|
|
3025
|
+
const callSitesWithoutCurrent = callSites.slice(1);
|
|
3026
|
+
result = callSitesWithoutCurrent;
|
|
3027
|
+
return callSitesWithoutCurrent;
|
|
3028
|
+
};
|
|
3029
|
+
(/* @__PURE__ */ new Error()).stack;
|
|
3030
|
+
} catch {
|
|
3031
|
+
return result;
|
|
3032
|
+
}
|
|
3033
|
+
Error.prepareStackTrace = _prepareStackTrace;
|
|
3034
|
+
return result;
|
|
3035
|
+
}
|
|
3036
|
+
function createPrompt(view) {
|
|
3037
|
+
const callSites = getCallSites();
|
|
3038
|
+
const prompt = (config, context = {}) => {
|
|
3039
|
+
const { input = process.stdin, signal } = context;
|
|
3040
|
+
const cleanups = /* @__PURE__ */ new Set();
|
|
3041
|
+
const output = new import_lib.default();
|
|
3042
|
+
output.pipe(context.output ?? process.stdout);
|
|
3043
|
+
const rl = readline.createInterface({
|
|
3044
|
+
terminal: true,
|
|
3045
|
+
input,
|
|
3046
|
+
output
|
|
3047
|
+
});
|
|
3048
|
+
const screen = new ScreenManager(rl);
|
|
3049
|
+
const { promise, resolve, reject } = PromisePolyfill.withResolver();
|
|
3050
|
+
const cancel = () => reject(new CancelPromptError());
|
|
3051
|
+
if (signal) {
|
|
3052
|
+
const abort = () => reject(new AbortPromptError({ cause: signal.reason }));
|
|
3053
|
+
if (signal.aborted) {
|
|
3054
|
+
abort();
|
|
3055
|
+
return Object.assign(promise, { cancel });
|
|
3056
|
+
}
|
|
3057
|
+
signal.addEventListener("abort", abort);
|
|
3058
|
+
cleanups.add(() => signal.removeEventListener("abort", abort));
|
|
3059
|
+
}
|
|
3060
|
+
cleanups.add(onExit((code, signal$1) => {
|
|
3061
|
+
reject(new ExitPromptError(`User force closed the prompt with ${code} ${signal$1}`));
|
|
3062
|
+
}));
|
|
3063
|
+
const sigint = () => reject(new ExitPromptError(`User force closed the prompt with SIGINT`));
|
|
3064
|
+
rl.on("SIGINT", sigint);
|
|
3065
|
+
cleanups.add(() => rl.removeListener("SIGINT", sigint));
|
|
3066
|
+
const checkCursorPos = () => screen.checkCursorPos();
|
|
3067
|
+
rl.input.on("keypress", checkCursorPos);
|
|
3068
|
+
cleanups.add(() => rl.input.removeListener("keypress", checkCursorPos));
|
|
3069
|
+
return withHooks(rl, (cycle) => {
|
|
3070
|
+
const hooksCleanup = AsyncResource.bind(() => effectScheduler.clearAll());
|
|
3071
|
+
rl.on("close", hooksCleanup);
|
|
3072
|
+
cleanups.add(() => rl.removeListener("close", hooksCleanup));
|
|
3073
|
+
cycle(() => {
|
|
3074
|
+
try {
|
|
3075
|
+
const nextView = view(config, (value) => {
|
|
3076
|
+
setImmediate(() => resolve(value));
|
|
3077
|
+
});
|
|
3078
|
+
if (nextView === void 0) {
|
|
3079
|
+
const callerFilename = callSites[1]?.getFileName();
|
|
3080
|
+
throw new Error(`Prompt functions must return a string.\n at ${callerFilename}`);
|
|
3081
|
+
}
|
|
3082
|
+
const [content, bottomContent] = typeof nextView === "string" ? [nextView] : nextView;
|
|
3083
|
+
screen.render(content, bottomContent);
|
|
3084
|
+
effectScheduler.run();
|
|
3085
|
+
} catch (error) {
|
|
3086
|
+
reject(error);
|
|
3087
|
+
}
|
|
3088
|
+
});
|
|
3089
|
+
return Object.assign(promise.then((answer) => {
|
|
3090
|
+
effectScheduler.clearAll();
|
|
3091
|
+
return answer;
|
|
3092
|
+
}, (error) => {
|
|
3093
|
+
effectScheduler.clearAll();
|
|
3094
|
+
throw error;
|
|
3095
|
+
}).finally(() => {
|
|
3096
|
+
cleanups.forEach((cleanup) => cleanup());
|
|
3097
|
+
screen.done({ clearContent: Boolean(context.clearPromptOnDone) });
|
|
3098
|
+
output.end();
|
|
3099
|
+
}).then(() => promise), { cancel });
|
|
3100
|
+
});
|
|
3101
|
+
};
|
|
3102
|
+
return prompt;
|
|
3103
|
+
}
|
|
3104
|
+
|
|
3105
|
+
//#endregion
|
|
3106
|
+
export { isSpaceKey as _, useRef as a, esm_default as c, useState as d, withPointer as f, isNumberKey as g, isEnterKey as h, useKeypress as i, require_yoctocolors_cjs as l, isDownKey as m, breakLines as n, usePrefix as o, ValidationError as p, readlineWidth as r, makeTheme as s, createPrompt as t, useEffect as u, isTabKey as v, isUpKey as y };
|
|
3107
|
+
//# sourceMappingURL=create-prompt-CkW5qmPT.mjs.map
|