@rsbuild/webpack 1.0.11 → 1.1.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/15.cjs +368 -0
- package/dist/238.js +332 -0
- package/dist/997.cjs +2349 -0
- package/dist/997.js +2334 -0
- package/{dist-types → dist}/build.d.ts +1 -1
- package/{dist-types → dist}/createCompiler.d.ts +1 -1
- package/dist/index.cjs +1043 -2531
- package/dist/index.d.ts +2 -0
- package/dist/index.js +563 -2579
- package/{dist-types → dist}/initConfigs.d.ts +2 -2
- package/{dist-types → dist}/inspectConfig.d.ts +2 -2
- package/{dist-types → dist}/progress/ProgressPlugin.d.ts +1 -1
- package/{dist-types → dist}/progress/helpers/bar.d.ts +1 -1
- package/{dist-types → dist}/progress/helpers/bus.d.ts +2 -2
- package/dist/progress/helpers/index.d.ts +4 -0
- package/{dist-types → dist}/webpackConfig.d.ts +2 -2
- package/package.json +8 -9
- package/dist-types/index.d.ts +0 -2
- package/dist-types/package.json +0 -1
- package/dist-types/progress/helpers/index.d.ts +0 -4
- /package/{dist-types → dist}/plugin.d.ts +0 -0
- /package/{dist-types → dist}/progress/helpers/log.d.ts +0 -0
- /package/{dist-types → dist}/progress/helpers/nonTty.d.ts +0 -0
- /package/{dist-types → dist}/progress/helpers/percentage.d.ts +0 -0
- /package/{dist-types → dist}/progress/helpers/types.d.ts +0 -0
- /package/{dist-types → dist}/progress/helpers/utils.d.ts +0 -0
- /package/{dist-types → dist}/provider.d.ts +0 -0
- /package/{dist-types → dist}/shared.d.ts +0 -0
- /package/{dist-types → dist}/types.d.ts +0 -0
package/dist/997.cjs
ADDED
|
@@ -0,0 +1,2349 @@
|
|
|
1
|
+
exports.ids = [
|
|
2
|
+
'997'
|
|
3
|
+
];
|
|
4
|
+
exports.modules = {
|
|
5
|
+
"../../../node_modules/.pnpm/ansi-escapes@4.3.2/node_modules/ansi-escapes/index.js": function(module) {
|
|
6
|
+
"use strict";
|
|
7
|
+
const ansiEscapes = module.exports;
|
|
8
|
+
// TODO: remove this in the next major version
|
|
9
|
+
module.exports["default"] = ansiEscapes;
|
|
10
|
+
const ESC = '\u001B[';
|
|
11
|
+
const OSC = '\u001B]';
|
|
12
|
+
const BEL = '\u0007';
|
|
13
|
+
const SEP = ';';
|
|
14
|
+
const isTerminalApp = 'Apple_Terminal' === process.env.TERM_PROGRAM;
|
|
15
|
+
ansiEscapes.cursorTo = (x, y)=>{
|
|
16
|
+
if ('number' != typeof x) throw new TypeError('The `x` argument is required');
|
|
17
|
+
if ('number' != typeof y) return ESC + (x + 1) + 'G';
|
|
18
|
+
return ESC + (y + 1) + ';' + (x + 1) + 'H';
|
|
19
|
+
};
|
|
20
|
+
ansiEscapes.cursorMove = (x, y)=>{
|
|
21
|
+
if ('number' != typeof x) throw new TypeError('The `x` argument is required');
|
|
22
|
+
let ret = '';
|
|
23
|
+
if (x < 0) ret += ESC + -x + 'D';
|
|
24
|
+
else if (x > 0) ret += ESC + x + 'C';
|
|
25
|
+
if (y < 0) ret += ESC + -y + 'A';
|
|
26
|
+
else if (y > 0) ret += ESC + y + 'B';
|
|
27
|
+
return ret;
|
|
28
|
+
};
|
|
29
|
+
ansiEscapes.cursorUp = (count = 1)=>ESC + count + 'A';
|
|
30
|
+
ansiEscapes.cursorDown = (count = 1)=>ESC + count + 'B';
|
|
31
|
+
ansiEscapes.cursorForward = (count = 1)=>ESC + count + 'C';
|
|
32
|
+
ansiEscapes.cursorBackward = (count = 1)=>ESC + count + 'D';
|
|
33
|
+
ansiEscapes.cursorLeft = ESC + 'G';
|
|
34
|
+
ansiEscapes.cursorSavePosition = isTerminalApp ? '\u001B7' : ESC + 's';
|
|
35
|
+
ansiEscapes.cursorRestorePosition = isTerminalApp ? '\u001B8' : ESC + 'u';
|
|
36
|
+
ansiEscapes.cursorGetPosition = ESC + '6n';
|
|
37
|
+
ansiEscapes.cursorNextLine = ESC + 'E';
|
|
38
|
+
ansiEscapes.cursorPrevLine = ESC + 'F';
|
|
39
|
+
ansiEscapes.cursorHide = ESC + '?25l';
|
|
40
|
+
ansiEscapes.cursorShow = ESC + '?25h';
|
|
41
|
+
ansiEscapes.eraseLines = (count)=>{
|
|
42
|
+
let clear = '';
|
|
43
|
+
for(let i = 0; i < count; i++)clear += ansiEscapes.eraseLine + (i < count - 1 ? ansiEscapes.cursorUp() : '');
|
|
44
|
+
if (count) clear += ansiEscapes.cursorLeft;
|
|
45
|
+
return clear;
|
|
46
|
+
};
|
|
47
|
+
ansiEscapes.eraseEndLine = ESC + 'K';
|
|
48
|
+
ansiEscapes.eraseStartLine = ESC + '1K';
|
|
49
|
+
ansiEscapes.eraseLine = ESC + '2K';
|
|
50
|
+
ansiEscapes.eraseDown = ESC + 'J';
|
|
51
|
+
ansiEscapes.eraseUp = ESC + '1J';
|
|
52
|
+
ansiEscapes.eraseScreen = ESC + '2J';
|
|
53
|
+
ansiEscapes.scrollUp = ESC + 'S';
|
|
54
|
+
ansiEscapes.scrollDown = ESC + 'T';
|
|
55
|
+
ansiEscapes.clearScreen = '\u001Bc';
|
|
56
|
+
ansiEscapes.clearTerminal = 'win32' === process.platform ? `${ansiEscapes.eraseScreen}${ESC}0f` : // 1. Erases the screen (Only done in case `2` is not supported)
|
|
57
|
+
// 2. Erases the whole screen including scrollback buffer
|
|
58
|
+
// 3. Moves cursor to the top-left position
|
|
59
|
+
// More info: https://www.real-world-systems.com/docs/ANSIcode.html
|
|
60
|
+
`${ansiEscapes.eraseScreen}${ESC}3J${ESC}H`;
|
|
61
|
+
ansiEscapes.beep = BEL;
|
|
62
|
+
ansiEscapes.link = (text, url)=>[
|
|
63
|
+
OSC,
|
|
64
|
+
'8',
|
|
65
|
+
SEP,
|
|
66
|
+
SEP,
|
|
67
|
+
url,
|
|
68
|
+
BEL,
|
|
69
|
+
text,
|
|
70
|
+
OSC,
|
|
71
|
+
'8',
|
|
72
|
+
SEP,
|
|
73
|
+
SEP,
|
|
74
|
+
BEL
|
|
75
|
+
].join('');
|
|
76
|
+
ansiEscapes.image = (buffer, options = {})=>{
|
|
77
|
+
let ret = `${OSC}1337;File=inline=1`;
|
|
78
|
+
if (options.width) ret += `;width=${options.width}`;
|
|
79
|
+
if (options.height) ret += `;height=${options.height}`;
|
|
80
|
+
if (false === options.preserveAspectRatio) ret += ';preserveAspectRatio=0';
|
|
81
|
+
return ret + ':' + buffer.toString('base64') + BEL;
|
|
82
|
+
};
|
|
83
|
+
ansiEscapes.iTerm = {
|
|
84
|
+
setCwd: (cwd = process.cwd())=>`${OSC}50;CurrentDir=${cwd}${BEL}`,
|
|
85
|
+
annotation: (message, options = {})=>{
|
|
86
|
+
let ret = `${OSC}1337;`;
|
|
87
|
+
const hasX = void 0 !== options.x;
|
|
88
|
+
const hasY = void 0 !== options.y;
|
|
89
|
+
if ((hasX || hasY) && !(hasX && hasY && void 0 !== options.length)) throw new Error('`x`, `y` and `length` must be defined when `x` or `y` is defined');
|
|
90
|
+
message = message.replace(/\|/g, '');
|
|
91
|
+
ret += options.isHidden ? 'AddHiddenAnnotation=' : 'AddAnnotation=';
|
|
92
|
+
if (options.length > 0) ret += (hasX ? [
|
|
93
|
+
message,
|
|
94
|
+
options.length,
|
|
95
|
+
options.x,
|
|
96
|
+
options.y
|
|
97
|
+
] : [
|
|
98
|
+
options.length,
|
|
99
|
+
message
|
|
100
|
+
]).join('|');
|
|
101
|
+
else ret += message;
|
|
102
|
+
return ret + BEL;
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
},
|
|
106
|
+
"../../../node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/index.js": function(module) {
|
|
107
|
+
"use strict";
|
|
108
|
+
module.exports = ({ onlyFirst = false } = {})=>{
|
|
109
|
+
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=><~]))";
|
|
110
|
+
return new RegExp(pattern, onlyFirst ? void 0 : 'g');
|
|
111
|
+
};
|
|
112
|
+
},
|
|
113
|
+
"../../../node_modules/.pnpm/ansi-styles@4.3.0/node_modules/ansi-styles/index.js": function(module, __unused_webpack_exports, __webpack_require__) {
|
|
114
|
+
"use strict";
|
|
115
|
+
/* module decorator */ module = __webpack_require__.nmd(module);
|
|
116
|
+
const wrapAnsi16 = (fn, offset)=>(...args)=>{
|
|
117
|
+
const code = fn(...args);
|
|
118
|
+
return `\u001B[${code + offset}m`;
|
|
119
|
+
};
|
|
120
|
+
const wrapAnsi256 = (fn, offset)=>(...args)=>{
|
|
121
|
+
const code = fn(...args);
|
|
122
|
+
return `\u001B[${38 + offset};5;${code}m`;
|
|
123
|
+
};
|
|
124
|
+
const wrapAnsi16m = (fn, offset)=>(...args)=>{
|
|
125
|
+
const rgb = fn(...args);
|
|
126
|
+
return `\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;
|
|
127
|
+
};
|
|
128
|
+
const ansi2ansi = (n)=>n;
|
|
129
|
+
const rgb2rgb = (r, g, b)=>[
|
|
130
|
+
r,
|
|
131
|
+
g,
|
|
132
|
+
b
|
|
133
|
+
];
|
|
134
|
+
const setLazyProperty = (object, property, get)=>{
|
|
135
|
+
Object.defineProperty(object, property, {
|
|
136
|
+
get: ()=>{
|
|
137
|
+
const value = get();
|
|
138
|
+
Object.defineProperty(object, property, {
|
|
139
|
+
value,
|
|
140
|
+
enumerable: true,
|
|
141
|
+
configurable: true
|
|
142
|
+
});
|
|
143
|
+
return value;
|
|
144
|
+
},
|
|
145
|
+
enumerable: true,
|
|
146
|
+
configurable: true
|
|
147
|
+
});
|
|
148
|
+
};
|
|
149
|
+
/** @type {typeof import('color-convert')} */ let colorConvert;
|
|
150
|
+
const makeDynamicStyles = (wrap, targetSpace, identity, isBackground)=>{
|
|
151
|
+
if (void 0 === colorConvert) colorConvert = __webpack_require__("../../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/index.js");
|
|
152
|
+
const offset = isBackground ? 10 : 0;
|
|
153
|
+
const styles = {};
|
|
154
|
+
for (const [sourceSpace, suite] of Object.entries(colorConvert)){
|
|
155
|
+
const name = 'ansi16' === sourceSpace ? 'ansi' : sourceSpace;
|
|
156
|
+
if (sourceSpace === targetSpace) styles[name] = wrap(identity, offset);
|
|
157
|
+
else if ('object' == typeof suite) styles[name] = wrap(suite[targetSpace], offset);
|
|
158
|
+
}
|
|
159
|
+
return styles;
|
|
160
|
+
};
|
|
161
|
+
function assembleStyles() {
|
|
162
|
+
const codes = new Map();
|
|
163
|
+
const styles = {
|
|
164
|
+
modifier: {
|
|
165
|
+
reset: [
|
|
166
|
+
0,
|
|
167
|
+
0
|
|
168
|
+
],
|
|
169
|
+
// 21 isn't widely supported and 22 does the same thing
|
|
170
|
+
bold: [
|
|
171
|
+
1,
|
|
172
|
+
22
|
|
173
|
+
],
|
|
174
|
+
dim: [
|
|
175
|
+
2,
|
|
176
|
+
22
|
|
177
|
+
],
|
|
178
|
+
italic: [
|
|
179
|
+
3,
|
|
180
|
+
23
|
|
181
|
+
],
|
|
182
|
+
underline: [
|
|
183
|
+
4,
|
|
184
|
+
24
|
|
185
|
+
],
|
|
186
|
+
inverse: [
|
|
187
|
+
7,
|
|
188
|
+
27
|
|
189
|
+
],
|
|
190
|
+
hidden: [
|
|
191
|
+
8,
|
|
192
|
+
28
|
|
193
|
+
],
|
|
194
|
+
strikethrough: [
|
|
195
|
+
9,
|
|
196
|
+
29
|
|
197
|
+
]
|
|
198
|
+
},
|
|
199
|
+
color: {
|
|
200
|
+
black: [
|
|
201
|
+
30,
|
|
202
|
+
39
|
|
203
|
+
],
|
|
204
|
+
red: [
|
|
205
|
+
31,
|
|
206
|
+
39
|
|
207
|
+
],
|
|
208
|
+
green: [
|
|
209
|
+
32,
|
|
210
|
+
39
|
|
211
|
+
],
|
|
212
|
+
yellow: [
|
|
213
|
+
33,
|
|
214
|
+
39
|
|
215
|
+
],
|
|
216
|
+
blue: [
|
|
217
|
+
34,
|
|
218
|
+
39
|
|
219
|
+
],
|
|
220
|
+
magenta: [
|
|
221
|
+
35,
|
|
222
|
+
39
|
|
223
|
+
],
|
|
224
|
+
cyan: [
|
|
225
|
+
36,
|
|
226
|
+
39
|
|
227
|
+
],
|
|
228
|
+
white: [
|
|
229
|
+
37,
|
|
230
|
+
39
|
|
231
|
+
],
|
|
232
|
+
// Bright color
|
|
233
|
+
blackBright: [
|
|
234
|
+
90,
|
|
235
|
+
39
|
|
236
|
+
],
|
|
237
|
+
redBright: [
|
|
238
|
+
91,
|
|
239
|
+
39
|
|
240
|
+
],
|
|
241
|
+
greenBright: [
|
|
242
|
+
92,
|
|
243
|
+
39
|
|
244
|
+
],
|
|
245
|
+
yellowBright: [
|
|
246
|
+
93,
|
|
247
|
+
39
|
|
248
|
+
],
|
|
249
|
+
blueBright: [
|
|
250
|
+
94,
|
|
251
|
+
39
|
|
252
|
+
],
|
|
253
|
+
magentaBright: [
|
|
254
|
+
95,
|
|
255
|
+
39
|
|
256
|
+
],
|
|
257
|
+
cyanBright: [
|
|
258
|
+
96,
|
|
259
|
+
39
|
|
260
|
+
],
|
|
261
|
+
whiteBright: [
|
|
262
|
+
97,
|
|
263
|
+
39
|
|
264
|
+
]
|
|
265
|
+
},
|
|
266
|
+
bgColor: {
|
|
267
|
+
bgBlack: [
|
|
268
|
+
40,
|
|
269
|
+
49
|
|
270
|
+
],
|
|
271
|
+
bgRed: [
|
|
272
|
+
41,
|
|
273
|
+
49
|
|
274
|
+
],
|
|
275
|
+
bgGreen: [
|
|
276
|
+
42,
|
|
277
|
+
49
|
|
278
|
+
],
|
|
279
|
+
bgYellow: [
|
|
280
|
+
43,
|
|
281
|
+
49
|
|
282
|
+
],
|
|
283
|
+
bgBlue: [
|
|
284
|
+
44,
|
|
285
|
+
49
|
|
286
|
+
],
|
|
287
|
+
bgMagenta: [
|
|
288
|
+
45,
|
|
289
|
+
49
|
|
290
|
+
],
|
|
291
|
+
bgCyan: [
|
|
292
|
+
46,
|
|
293
|
+
49
|
|
294
|
+
],
|
|
295
|
+
bgWhite: [
|
|
296
|
+
47,
|
|
297
|
+
49
|
|
298
|
+
],
|
|
299
|
+
// Bright color
|
|
300
|
+
bgBlackBright: [
|
|
301
|
+
100,
|
|
302
|
+
49
|
|
303
|
+
],
|
|
304
|
+
bgRedBright: [
|
|
305
|
+
101,
|
|
306
|
+
49
|
|
307
|
+
],
|
|
308
|
+
bgGreenBright: [
|
|
309
|
+
102,
|
|
310
|
+
49
|
|
311
|
+
],
|
|
312
|
+
bgYellowBright: [
|
|
313
|
+
103,
|
|
314
|
+
49
|
|
315
|
+
],
|
|
316
|
+
bgBlueBright: [
|
|
317
|
+
104,
|
|
318
|
+
49
|
|
319
|
+
],
|
|
320
|
+
bgMagentaBright: [
|
|
321
|
+
105,
|
|
322
|
+
49
|
|
323
|
+
],
|
|
324
|
+
bgCyanBright: [
|
|
325
|
+
106,
|
|
326
|
+
49
|
|
327
|
+
],
|
|
328
|
+
bgWhiteBright: [
|
|
329
|
+
107,
|
|
330
|
+
49
|
|
331
|
+
]
|
|
332
|
+
}
|
|
333
|
+
};
|
|
334
|
+
// Alias bright black as gray (and grey)
|
|
335
|
+
styles.color.gray = styles.color.blackBright;
|
|
336
|
+
styles.bgColor.bgGray = styles.bgColor.bgBlackBright;
|
|
337
|
+
styles.color.grey = styles.color.blackBright;
|
|
338
|
+
styles.bgColor.bgGrey = styles.bgColor.bgBlackBright;
|
|
339
|
+
for (const [groupName, group] of Object.entries(styles)){
|
|
340
|
+
for (const [styleName, style] of Object.entries(group)){
|
|
341
|
+
styles[styleName] = {
|
|
342
|
+
open: `\u001B[${style[0]}m`,
|
|
343
|
+
close: `\u001B[${style[1]}m`
|
|
344
|
+
};
|
|
345
|
+
group[styleName] = styles[styleName];
|
|
346
|
+
codes.set(style[0], style[1]);
|
|
347
|
+
}
|
|
348
|
+
Object.defineProperty(styles, groupName, {
|
|
349
|
+
value: group,
|
|
350
|
+
enumerable: false
|
|
351
|
+
});
|
|
352
|
+
}
|
|
353
|
+
Object.defineProperty(styles, 'codes', {
|
|
354
|
+
value: codes,
|
|
355
|
+
enumerable: false
|
|
356
|
+
});
|
|
357
|
+
styles.color.close = '\u001B[39m';
|
|
358
|
+
styles.bgColor.close = '\u001B[49m';
|
|
359
|
+
setLazyProperty(styles.color, 'ansi', ()=>makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, false));
|
|
360
|
+
setLazyProperty(styles.color, 'ansi256', ()=>makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, false));
|
|
361
|
+
setLazyProperty(styles.color, 'ansi16m', ()=>makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, false));
|
|
362
|
+
setLazyProperty(styles.bgColor, 'ansi', ()=>makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, true));
|
|
363
|
+
setLazyProperty(styles.bgColor, 'ansi256', ()=>makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, true));
|
|
364
|
+
setLazyProperty(styles.bgColor, 'ansi16m', ()=>makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, true));
|
|
365
|
+
return styles;
|
|
366
|
+
}
|
|
367
|
+
// Make the export immutable
|
|
368
|
+
Object.defineProperty(module, 'exports', {
|
|
369
|
+
enumerable: true,
|
|
370
|
+
get: assembleStyles
|
|
371
|
+
});
|
|
372
|
+
},
|
|
373
|
+
"../../../node_modules/.pnpm/astral-regex@2.0.0/node_modules/astral-regex/index.js": function(module) {
|
|
374
|
+
"use strict";
|
|
375
|
+
const regex = '[\uD800-\uDBFF][\uDC00-\uDFFF]';
|
|
376
|
+
const astralRegex = (options)=>options && options.exact ? new RegExp(`^${regex}$`) : new RegExp(regex, 'g');
|
|
377
|
+
module.exports = astralRegex;
|
|
378
|
+
},
|
|
379
|
+
"../../../node_modules/.pnpm/cli-truncate@2.1.0/node_modules/cli-truncate/index.js": function(module, __unused_webpack_exports, __webpack_require__) {
|
|
380
|
+
"use strict";
|
|
381
|
+
const sliceAnsi = __webpack_require__("../../../node_modules/.pnpm/slice-ansi@3.0.0/node_modules/slice-ansi/index.js");
|
|
382
|
+
const stringWidth = __webpack_require__("../../../node_modules/.pnpm/string-width@4.2.3/node_modules/string-width/index.js");
|
|
383
|
+
function getIndexOfNearestSpace(string, index, shouldSearchRight) {
|
|
384
|
+
if (' ' === string.charAt(index)) return index;
|
|
385
|
+
for(let i = 1; i <= 3; i++)if (shouldSearchRight) {
|
|
386
|
+
if (' ' === string.charAt(index + i)) return index + i;
|
|
387
|
+
} else if (' ' === string.charAt(index - i)) return index - i;
|
|
388
|
+
return index;
|
|
389
|
+
}
|
|
390
|
+
module.exports = (text, columns, options)=>{
|
|
391
|
+
options = {
|
|
392
|
+
position: 'end',
|
|
393
|
+
preferTruncationOnSpace: false,
|
|
394
|
+
...options
|
|
395
|
+
};
|
|
396
|
+
const { position, space, preferTruncationOnSpace } = options;
|
|
397
|
+
let ellipsis = '…';
|
|
398
|
+
let ellipsisWidth = 1;
|
|
399
|
+
if ('string' != typeof text) throw new TypeError(`Expected \`input\` to be a string, got ${typeof text}`);
|
|
400
|
+
if ('number' != typeof columns) throw new TypeError(`Expected \`columns\` to be a number, got ${typeof columns}`);
|
|
401
|
+
if (columns < 1) return '';
|
|
402
|
+
if (1 === columns) return ellipsis;
|
|
403
|
+
const length = stringWidth(text);
|
|
404
|
+
if (length <= columns) return text;
|
|
405
|
+
if ('start' === position) {
|
|
406
|
+
if (preferTruncationOnSpace) {
|
|
407
|
+
const nearestSpace = getIndexOfNearestSpace(text, length - columns + 1, true);
|
|
408
|
+
return ellipsis + sliceAnsi(text, nearestSpace, length).trim();
|
|
409
|
+
}
|
|
410
|
+
if (true === space) {
|
|
411
|
+
ellipsis += ' ';
|
|
412
|
+
ellipsisWidth = 2;
|
|
413
|
+
}
|
|
414
|
+
return ellipsis + sliceAnsi(text, length - columns + ellipsisWidth, length);
|
|
415
|
+
}
|
|
416
|
+
if ('middle' === position) {
|
|
417
|
+
if (true === space) {
|
|
418
|
+
ellipsis = ' ' + ellipsis + ' ';
|
|
419
|
+
ellipsisWidth = 3;
|
|
420
|
+
}
|
|
421
|
+
const half = Math.floor(columns / 2);
|
|
422
|
+
if (preferTruncationOnSpace) {
|
|
423
|
+
const spaceNearFirstBreakPoint = getIndexOfNearestSpace(text, half);
|
|
424
|
+
const spaceNearSecondBreakPoint = getIndexOfNearestSpace(text, length - (columns - half) + 1, true);
|
|
425
|
+
return sliceAnsi(text, 0, spaceNearFirstBreakPoint) + ellipsis + sliceAnsi(text, spaceNearSecondBreakPoint, length).trim();
|
|
426
|
+
}
|
|
427
|
+
return sliceAnsi(text, 0, half) + ellipsis + sliceAnsi(text, length - (columns - half) + ellipsisWidth, length);
|
|
428
|
+
}
|
|
429
|
+
if ('end' === position) {
|
|
430
|
+
if (preferTruncationOnSpace) {
|
|
431
|
+
const nearestSpace = getIndexOfNearestSpace(text, columns - 1);
|
|
432
|
+
return sliceAnsi(text, 0, nearestSpace) + ellipsis;
|
|
433
|
+
}
|
|
434
|
+
if (true === space) {
|
|
435
|
+
ellipsis = ' ' + ellipsis;
|
|
436
|
+
ellipsisWidth = 2;
|
|
437
|
+
}
|
|
438
|
+
return sliceAnsi(text, 0, columns - ellipsisWidth) + ellipsis;
|
|
439
|
+
}
|
|
440
|
+
throw new Error(`Expected \`options.position\` to be either \`start\`, \`middle\` or \`end\`, got ${position}`);
|
|
441
|
+
};
|
|
442
|
+
},
|
|
443
|
+
"../../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/conversions.js": function(module, __unused_webpack_exports, __webpack_require__) {
|
|
444
|
+
/* MIT license */ /* eslint-disable no-mixed-operators */ const cssKeywords = __webpack_require__("../../../node_modules/.pnpm/color-name@1.1.4/node_modules/color-name/index.js");
|
|
445
|
+
// NOTE: conversions should only return primitive values (i.e. arrays, or
|
|
446
|
+
// values that give correct `typeof` results).
|
|
447
|
+
// do not use box values types (i.e. Number(), String(), etc.)
|
|
448
|
+
const reverseKeywords = {};
|
|
449
|
+
for (const key of Object.keys(cssKeywords))reverseKeywords[cssKeywords[key]] = key;
|
|
450
|
+
const convert = {
|
|
451
|
+
rgb: {
|
|
452
|
+
channels: 3,
|
|
453
|
+
labels: 'rgb'
|
|
454
|
+
},
|
|
455
|
+
hsl: {
|
|
456
|
+
channels: 3,
|
|
457
|
+
labels: 'hsl'
|
|
458
|
+
},
|
|
459
|
+
hsv: {
|
|
460
|
+
channels: 3,
|
|
461
|
+
labels: 'hsv'
|
|
462
|
+
},
|
|
463
|
+
hwb: {
|
|
464
|
+
channels: 3,
|
|
465
|
+
labels: 'hwb'
|
|
466
|
+
},
|
|
467
|
+
cmyk: {
|
|
468
|
+
channels: 4,
|
|
469
|
+
labels: 'cmyk'
|
|
470
|
+
},
|
|
471
|
+
xyz: {
|
|
472
|
+
channels: 3,
|
|
473
|
+
labels: 'xyz'
|
|
474
|
+
},
|
|
475
|
+
lab: {
|
|
476
|
+
channels: 3,
|
|
477
|
+
labels: 'lab'
|
|
478
|
+
},
|
|
479
|
+
lch: {
|
|
480
|
+
channels: 3,
|
|
481
|
+
labels: 'lch'
|
|
482
|
+
},
|
|
483
|
+
hex: {
|
|
484
|
+
channels: 1,
|
|
485
|
+
labels: [
|
|
486
|
+
'hex'
|
|
487
|
+
]
|
|
488
|
+
},
|
|
489
|
+
keyword: {
|
|
490
|
+
channels: 1,
|
|
491
|
+
labels: [
|
|
492
|
+
'keyword'
|
|
493
|
+
]
|
|
494
|
+
},
|
|
495
|
+
ansi16: {
|
|
496
|
+
channels: 1,
|
|
497
|
+
labels: [
|
|
498
|
+
'ansi16'
|
|
499
|
+
]
|
|
500
|
+
},
|
|
501
|
+
ansi256: {
|
|
502
|
+
channels: 1,
|
|
503
|
+
labels: [
|
|
504
|
+
'ansi256'
|
|
505
|
+
]
|
|
506
|
+
},
|
|
507
|
+
hcg: {
|
|
508
|
+
channels: 3,
|
|
509
|
+
labels: [
|
|
510
|
+
'h',
|
|
511
|
+
'c',
|
|
512
|
+
'g'
|
|
513
|
+
]
|
|
514
|
+
},
|
|
515
|
+
apple: {
|
|
516
|
+
channels: 3,
|
|
517
|
+
labels: [
|
|
518
|
+
'r16',
|
|
519
|
+
'g16',
|
|
520
|
+
'b16'
|
|
521
|
+
]
|
|
522
|
+
},
|
|
523
|
+
gray: {
|
|
524
|
+
channels: 1,
|
|
525
|
+
labels: [
|
|
526
|
+
'gray'
|
|
527
|
+
]
|
|
528
|
+
}
|
|
529
|
+
};
|
|
530
|
+
module.exports = convert;
|
|
531
|
+
// Hide .channels and .labels properties
|
|
532
|
+
for (const model of Object.keys(convert)){
|
|
533
|
+
if (!('channels' in convert[model])) throw new Error('missing channels property: ' + model);
|
|
534
|
+
if (!('labels' in convert[model])) throw new Error('missing channel labels property: ' + model);
|
|
535
|
+
if (convert[model].labels.length !== convert[model].channels) throw new Error('channel and label counts mismatch: ' + model);
|
|
536
|
+
const { channels, labels } = convert[model];
|
|
537
|
+
delete convert[model].channels;
|
|
538
|
+
delete convert[model].labels;
|
|
539
|
+
Object.defineProperty(convert[model], 'channels', {
|
|
540
|
+
value: channels
|
|
541
|
+
});
|
|
542
|
+
Object.defineProperty(convert[model], 'labels', {
|
|
543
|
+
value: labels
|
|
544
|
+
});
|
|
545
|
+
}
|
|
546
|
+
convert.rgb.hsl = function(rgb) {
|
|
547
|
+
const r = rgb[0] / 255;
|
|
548
|
+
const g = rgb[1] / 255;
|
|
549
|
+
const b = rgb[2] / 255;
|
|
550
|
+
const min = Math.min(r, g, b);
|
|
551
|
+
const max = Math.max(r, g, b);
|
|
552
|
+
const delta = max - min;
|
|
553
|
+
let h;
|
|
554
|
+
let s;
|
|
555
|
+
if (max === min) h = 0;
|
|
556
|
+
else if (r === max) h = (g - b) / delta;
|
|
557
|
+
else if (g === max) h = 2 + (b - r) / delta;
|
|
558
|
+
else if (b === max) h = 4 + (r - g) / delta;
|
|
559
|
+
h = Math.min(60 * h, 360);
|
|
560
|
+
if (h < 0) h += 360;
|
|
561
|
+
const l = (min + max) / 2;
|
|
562
|
+
s = max === min ? 0 : l <= 0.5 ? delta / (max + min) : delta / (2 - max - min);
|
|
563
|
+
return [
|
|
564
|
+
h,
|
|
565
|
+
100 * s,
|
|
566
|
+
100 * l
|
|
567
|
+
];
|
|
568
|
+
};
|
|
569
|
+
convert.rgb.hsv = function(rgb) {
|
|
570
|
+
let rdif;
|
|
571
|
+
let gdif;
|
|
572
|
+
let bdif;
|
|
573
|
+
let h;
|
|
574
|
+
let s;
|
|
575
|
+
const r = rgb[0] / 255;
|
|
576
|
+
const g = rgb[1] / 255;
|
|
577
|
+
const b = rgb[2] / 255;
|
|
578
|
+
const v = Math.max(r, g, b);
|
|
579
|
+
const diff = v - Math.min(r, g, b);
|
|
580
|
+
const diffc = function(c) {
|
|
581
|
+
return (v - c) / 6 / diff + 0.5;
|
|
582
|
+
};
|
|
583
|
+
if (0 === diff) {
|
|
584
|
+
h = 0;
|
|
585
|
+
s = 0;
|
|
586
|
+
} else {
|
|
587
|
+
s = diff / v;
|
|
588
|
+
rdif = diffc(r);
|
|
589
|
+
gdif = diffc(g);
|
|
590
|
+
bdif = diffc(b);
|
|
591
|
+
if (r === v) h = bdif - gdif;
|
|
592
|
+
else if (g === v) h = 1 / 3 + rdif - bdif;
|
|
593
|
+
else if (b === v) h = 2 / 3 + gdif - rdif;
|
|
594
|
+
if (h < 0) h += 1;
|
|
595
|
+
else if (h > 1) h -= 1;
|
|
596
|
+
}
|
|
597
|
+
return [
|
|
598
|
+
360 * h,
|
|
599
|
+
100 * s,
|
|
600
|
+
100 * v
|
|
601
|
+
];
|
|
602
|
+
};
|
|
603
|
+
convert.rgb.hwb = function(rgb) {
|
|
604
|
+
const r = rgb[0];
|
|
605
|
+
const g = rgb[1];
|
|
606
|
+
let b = rgb[2];
|
|
607
|
+
const h = convert.rgb.hsl(rgb)[0];
|
|
608
|
+
const w = 1 / 255 * Math.min(r, Math.min(g, b));
|
|
609
|
+
b = 1 - 1 / 255 * Math.max(r, Math.max(g, b));
|
|
610
|
+
return [
|
|
611
|
+
h,
|
|
612
|
+
100 * w,
|
|
613
|
+
100 * b
|
|
614
|
+
];
|
|
615
|
+
};
|
|
616
|
+
convert.rgb.cmyk = function(rgb) {
|
|
617
|
+
const r = rgb[0] / 255;
|
|
618
|
+
const g = rgb[1] / 255;
|
|
619
|
+
const b = rgb[2] / 255;
|
|
620
|
+
const k = Math.min(1 - r, 1 - g, 1 - b);
|
|
621
|
+
const c = (1 - r - k) / (1 - k) || 0;
|
|
622
|
+
const m = (1 - g - k) / (1 - k) || 0;
|
|
623
|
+
const y = (1 - b - k) / (1 - k) || 0;
|
|
624
|
+
return [
|
|
625
|
+
100 * c,
|
|
626
|
+
100 * m,
|
|
627
|
+
100 * y,
|
|
628
|
+
100 * k
|
|
629
|
+
];
|
|
630
|
+
};
|
|
631
|
+
function comparativeDistance(x, y) {
|
|
632
|
+
/*
|
|
633
|
+
See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
|
|
634
|
+
*/ return (x[0] - y[0]) ** 2 + (x[1] - y[1]) ** 2 + (x[2] - y[2]) ** 2;
|
|
635
|
+
}
|
|
636
|
+
convert.rgb.keyword = function(rgb) {
|
|
637
|
+
const reversed = reverseKeywords[rgb];
|
|
638
|
+
if (reversed) return reversed;
|
|
639
|
+
let currentClosestDistance = 1 / 0;
|
|
640
|
+
let currentClosestKeyword;
|
|
641
|
+
for (const keyword of Object.keys(cssKeywords)){
|
|
642
|
+
const value = cssKeywords[keyword];
|
|
643
|
+
// Compute comparative distance
|
|
644
|
+
const distance = comparativeDistance(rgb, value);
|
|
645
|
+
// Check if its less, if so set as closest
|
|
646
|
+
if (distance < currentClosestDistance) {
|
|
647
|
+
currentClosestDistance = distance;
|
|
648
|
+
currentClosestKeyword = keyword;
|
|
649
|
+
}
|
|
650
|
+
}
|
|
651
|
+
return currentClosestKeyword;
|
|
652
|
+
};
|
|
653
|
+
convert.keyword.rgb = function(keyword) {
|
|
654
|
+
return cssKeywords[keyword];
|
|
655
|
+
};
|
|
656
|
+
convert.rgb.xyz = function(rgb) {
|
|
657
|
+
let r = rgb[0] / 255;
|
|
658
|
+
let g = rgb[1] / 255;
|
|
659
|
+
let b = rgb[2] / 255;
|
|
660
|
+
// Assume sRGB
|
|
661
|
+
r = r > 0.04045 ? ((r + 0.055) / 1.055) ** 2.4 : r / 12.92;
|
|
662
|
+
g = g > 0.04045 ? ((g + 0.055) / 1.055) ** 2.4 : g / 12.92;
|
|
663
|
+
b = b > 0.04045 ? ((b + 0.055) / 1.055) ** 2.4 : b / 12.92;
|
|
664
|
+
const x = 0.4124 * r + 0.3576 * g + 0.1805 * b;
|
|
665
|
+
const y = 0.2126 * r + 0.7152 * g + 0.0722 * b;
|
|
666
|
+
const z = 0.0193 * r + 0.1192 * g + 0.9505 * b;
|
|
667
|
+
return [
|
|
668
|
+
100 * x,
|
|
669
|
+
100 * y,
|
|
670
|
+
100 * z
|
|
671
|
+
];
|
|
672
|
+
};
|
|
673
|
+
convert.rgb.lab = function(rgb) {
|
|
674
|
+
const xyz = convert.rgb.xyz(rgb);
|
|
675
|
+
let x = xyz[0];
|
|
676
|
+
let y = xyz[1];
|
|
677
|
+
let z = xyz[2];
|
|
678
|
+
x /= 95.047;
|
|
679
|
+
y /= 100;
|
|
680
|
+
z /= 108.883;
|
|
681
|
+
x = x > 0.008856 ? x ** (1 / 3) : 7.787 * x + 16 / 116;
|
|
682
|
+
y = y > 0.008856 ? y ** (1 / 3) : 7.787 * y + 16 / 116;
|
|
683
|
+
z = z > 0.008856 ? z ** (1 / 3) : 7.787 * z + 16 / 116;
|
|
684
|
+
const l = 116 * y - 16;
|
|
685
|
+
const a = 500 * (x - y);
|
|
686
|
+
const b = 200 * (y - z);
|
|
687
|
+
return [
|
|
688
|
+
l,
|
|
689
|
+
a,
|
|
690
|
+
b
|
|
691
|
+
];
|
|
692
|
+
};
|
|
693
|
+
convert.hsl.rgb = function(hsl) {
|
|
694
|
+
const h = hsl[0] / 360;
|
|
695
|
+
const s = hsl[1] / 100;
|
|
696
|
+
const l = hsl[2] / 100;
|
|
697
|
+
let t2;
|
|
698
|
+
let t3;
|
|
699
|
+
let val;
|
|
700
|
+
if (0 === s) {
|
|
701
|
+
val = 255 * l;
|
|
702
|
+
return [
|
|
703
|
+
val,
|
|
704
|
+
val,
|
|
705
|
+
val
|
|
706
|
+
];
|
|
707
|
+
}
|
|
708
|
+
t2 = l < 0.5 ? l * (1 + s) : l + s - l * s;
|
|
709
|
+
const t1 = 2 * l - t2;
|
|
710
|
+
const rgb = [
|
|
711
|
+
0,
|
|
712
|
+
0,
|
|
713
|
+
0
|
|
714
|
+
];
|
|
715
|
+
for(let i = 0; i < 3; i++){
|
|
716
|
+
t3 = h + 1 / 3 * -(i - 1);
|
|
717
|
+
if (t3 < 0) t3++;
|
|
718
|
+
if (t3 > 1) t3--;
|
|
719
|
+
val = 6 * t3 < 1 ? t1 + (t2 - t1) * 6 * t3 : 2 * t3 < 1 ? t2 : 3 * t3 < 2 ? t1 + (t2 - t1) * (2 / 3 - t3) * 6 : t1;
|
|
720
|
+
rgb[i] = 255 * val;
|
|
721
|
+
}
|
|
722
|
+
return rgb;
|
|
723
|
+
};
|
|
724
|
+
convert.hsl.hsv = function(hsl) {
|
|
725
|
+
const h = hsl[0];
|
|
726
|
+
let s = hsl[1] / 100;
|
|
727
|
+
let l = hsl[2] / 100;
|
|
728
|
+
let smin = s;
|
|
729
|
+
const lmin = Math.max(l, 0.01);
|
|
730
|
+
l *= 2;
|
|
731
|
+
s *= l <= 1 ? l : 2 - l;
|
|
732
|
+
smin *= lmin <= 1 ? lmin : 2 - lmin;
|
|
733
|
+
const v = (l + s) / 2;
|
|
734
|
+
const sv = 0 === l ? 2 * smin / (lmin + smin) : 2 * s / (l + s);
|
|
735
|
+
return [
|
|
736
|
+
h,
|
|
737
|
+
100 * sv,
|
|
738
|
+
100 * v
|
|
739
|
+
];
|
|
740
|
+
};
|
|
741
|
+
convert.hsv.rgb = function(hsv) {
|
|
742
|
+
const h = hsv[0] / 60;
|
|
743
|
+
const s = hsv[1] / 100;
|
|
744
|
+
let v = hsv[2] / 100;
|
|
745
|
+
const hi = Math.floor(h) % 6;
|
|
746
|
+
const f = h - Math.floor(h);
|
|
747
|
+
const p = 255 * v * (1 - s);
|
|
748
|
+
const q = 255 * v * (1 - s * f);
|
|
749
|
+
const t = 255 * v * (1 - s * (1 - f));
|
|
750
|
+
v *= 255;
|
|
751
|
+
switch(hi){
|
|
752
|
+
case 0:
|
|
753
|
+
return [
|
|
754
|
+
v,
|
|
755
|
+
t,
|
|
756
|
+
p
|
|
757
|
+
];
|
|
758
|
+
case 1:
|
|
759
|
+
return [
|
|
760
|
+
q,
|
|
761
|
+
v,
|
|
762
|
+
p
|
|
763
|
+
];
|
|
764
|
+
case 2:
|
|
765
|
+
return [
|
|
766
|
+
p,
|
|
767
|
+
v,
|
|
768
|
+
t
|
|
769
|
+
];
|
|
770
|
+
case 3:
|
|
771
|
+
return [
|
|
772
|
+
p,
|
|
773
|
+
q,
|
|
774
|
+
v
|
|
775
|
+
];
|
|
776
|
+
case 4:
|
|
777
|
+
return [
|
|
778
|
+
t,
|
|
779
|
+
p,
|
|
780
|
+
v
|
|
781
|
+
];
|
|
782
|
+
case 5:
|
|
783
|
+
return [
|
|
784
|
+
v,
|
|
785
|
+
p,
|
|
786
|
+
q
|
|
787
|
+
];
|
|
788
|
+
}
|
|
789
|
+
};
|
|
790
|
+
convert.hsv.hsl = function(hsv) {
|
|
791
|
+
const h = hsv[0];
|
|
792
|
+
const s = hsv[1] / 100;
|
|
793
|
+
const v = hsv[2] / 100;
|
|
794
|
+
const vmin = Math.max(v, 0.01);
|
|
795
|
+
let sl;
|
|
796
|
+
let l;
|
|
797
|
+
l = (2 - s) * v;
|
|
798
|
+
const lmin = (2 - s) * vmin;
|
|
799
|
+
sl = s * vmin;
|
|
800
|
+
sl /= lmin <= 1 ? lmin : 2 - lmin;
|
|
801
|
+
sl = sl || 0;
|
|
802
|
+
l /= 2;
|
|
803
|
+
return [
|
|
804
|
+
h,
|
|
805
|
+
100 * sl,
|
|
806
|
+
100 * l
|
|
807
|
+
];
|
|
808
|
+
};
|
|
809
|
+
// http://dev.w3.org/csswg/css-color/#hwb-to-rgb
|
|
810
|
+
convert.hwb.rgb = function(hwb) {
|
|
811
|
+
const h = hwb[0] / 360;
|
|
812
|
+
let wh = hwb[1] / 100;
|
|
813
|
+
let bl = hwb[2] / 100;
|
|
814
|
+
const ratio = wh + bl;
|
|
815
|
+
let f;
|
|
816
|
+
// Wh + bl cant be > 1
|
|
817
|
+
if (ratio > 1) {
|
|
818
|
+
wh /= ratio;
|
|
819
|
+
bl /= ratio;
|
|
820
|
+
}
|
|
821
|
+
const i = Math.floor(6 * h);
|
|
822
|
+
const v = 1 - bl;
|
|
823
|
+
f = 6 * h - i;
|
|
824
|
+
if ((0x01 & i) !== 0) f = 1 - f;
|
|
825
|
+
const n = wh + f * (v - wh); // Linear interpolation
|
|
826
|
+
let r;
|
|
827
|
+
let g;
|
|
828
|
+
let b;
|
|
829
|
+
/* eslint-disable max-statements-per-line,no-multi-spaces */ switch(i){
|
|
830
|
+
default:
|
|
831
|
+
case 6:
|
|
832
|
+
case 0:
|
|
833
|
+
r = v;
|
|
834
|
+
g = n;
|
|
835
|
+
b = wh;
|
|
836
|
+
break;
|
|
837
|
+
case 1:
|
|
838
|
+
r = n;
|
|
839
|
+
g = v;
|
|
840
|
+
b = wh;
|
|
841
|
+
break;
|
|
842
|
+
case 2:
|
|
843
|
+
r = wh;
|
|
844
|
+
g = v;
|
|
845
|
+
b = n;
|
|
846
|
+
break;
|
|
847
|
+
case 3:
|
|
848
|
+
r = wh;
|
|
849
|
+
g = n;
|
|
850
|
+
b = v;
|
|
851
|
+
break;
|
|
852
|
+
case 4:
|
|
853
|
+
r = n;
|
|
854
|
+
g = wh;
|
|
855
|
+
b = v;
|
|
856
|
+
break;
|
|
857
|
+
case 5:
|
|
858
|
+
r = v;
|
|
859
|
+
g = wh;
|
|
860
|
+
b = n;
|
|
861
|
+
break;
|
|
862
|
+
}
|
|
863
|
+
/* eslint-enable max-statements-per-line,no-multi-spaces */ return [
|
|
864
|
+
255 * r,
|
|
865
|
+
255 * g,
|
|
866
|
+
255 * b
|
|
867
|
+
];
|
|
868
|
+
};
|
|
869
|
+
convert.cmyk.rgb = function(cmyk) {
|
|
870
|
+
const c = cmyk[0] / 100;
|
|
871
|
+
const m = cmyk[1] / 100;
|
|
872
|
+
const y = cmyk[2] / 100;
|
|
873
|
+
const k = cmyk[3] / 100;
|
|
874
|
+
const r = 1 - Math.min(1, c * (1 - k) + k);
|
|
875
|
+
const g = 1 - Math.min(1, m * (1 - k) + k);
|
|
876
|
+
const b = 1 - Math.min(1, y * (1 - k) + k);
|
|
877
|
+
return [
|
|
878
|
+
255 * r,
|
|
879
|
+
255 * g,
|
|
880
|
+
255 * b
|
|
881
|
+
];
|
|
882
|
+
};
|
|
883
|
+
convert.xyz.rgb = function(xyz) {
|
|
884
|
+
const x = xyz[0] / 100;
|
|
885
|
+
const y = xyz[1] / 100;
|
|
886
|
+
const z = xyz[2] / 100;
|
|
887
|
+
let r;
|
|
888
|
+
let g;
|
|
889
|
+
let b;
|
|
890
|
+
r = 3.2406 * x + -1.5372 * y + -0.4986 * z;
|
|
891
|
+
g = -0.9689 * x + 1.8758 * y + 0.0415 * z;
|
|
892
|
+
b = 0.0557 * x + -0.204 * y + 1.0570 * z;
|
|
893
|
+
// Assume sRGB
|
|
894
|
+
r = r > 0.0031308 ? 1.055 * r ** (1.0 / 2.4) - 0.055 : 12.92 * r;
|
|
895
|
+
g = g > 0.0031308 ? 1.055 * g ** (1.0 / 2.4) - 0.055 : 12.92 * g;
|
|
896
|
+
b = b > 0.0031308 ? 1.055 * b ** (1.0 / 2.4) - 0.055 : 12.92 * b;
|
|
897
|
+
r = Math.min(Math.max(0, r), 1);
|
|
898
|
+
g = Math.min(Math.max(0, g), 1);
|
|
899
|
+
b = Math.min(Math.max(0, b), 1);
|
|
900
|
+
return [
|
|
901
|
+
255 * r,
|
|
902
|
+
255 * g,
|
|
903
|
+
255 * b
|
|
904
|
+
];
|
|
905
|
+
};
|
|
906
|
+
convert.xyz.lab = function(xyz) {
|
|
907
|
+
let x = xyz[0];
|
|
908
|
+
let y = xyz[1];
|
|
909
|
+
let z = xyz[2];
|
|
910
|
+
x /= 95.047;
|
|
911
|
+
y /= 100;
|
|
912
|
+
z /= 108.883;
|
|
913
|
+
x = x > 0.008856 ? x ** (1 / 3) : 7.787 * x + 16 / 116;
|
|
914
|
+
y = y > 0.008856 ? y ** (1 / 3) : 7.787 * y + 16 / 116;
|
|
915
|
+
z = z > 0.008856 ? z ** (1 / 3) : 7.787 * z + 16 / 116;
|
|
916
|
+
const l = 116 * y - 16;
|
|
917
|
+
const a = 500 * (x - y);
|
|
918
|
+
const b = 200 * (y - z);
|
|
919
|
+
return [
|
|
920
|
+
l,
|
|
921
|
+
a,
|
|
922
|
+
b
|
|
923
|
+
];
|
|
924
|
+
};
|
|
925
|
+
convert.lab.xyz = function(lab) {
|
|
926
|
+
const l = lab[0];
|
|
927
|
+
const a = lab[1];
|
|
928
|
+
const b = lab[2];
|
|
929
|
+
let x;
|
|
930
|
+
let y;
|
|
931
|
+
let z;
|
|
932
|
+
y = (l + 16) / 116;
|
|
933
|
+
x = a / 500 + y;
|
|
934
|
+
z = y - b / 200;
|
|
935
|
+
const y2 = y ** 3;
|
|
936
|
+
const x2 = x ** 3;
|
|
937
|
+
const z2 = z ** 3;
|
|
938
|
+
y = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787;
|
|
939
|
+
x = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787;
|
|
940
|
+
z = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787;
|
|
941
|
+
x *= 95.047;
|
|
942
|
+
y *= 100;
|
|
943
|
+
z *= 108.883;
|
|
944
|
+
return [
|
|
945
|
+
x,
|
|
946
|
+
y,
|
|
947
|
+
z
|
|
948
|
+
];
|
|
949
|
+
};
|
|
950
|
+
convert.lab.lch = function(lab) {
|
|
951
|
+
const l = lab[0];
|
|
952
|
+
const a = lab[1];
|
|
953
|
+
const b = lab[2];
|
|
954
|
+
let h;
|
|
955
|
+
const hr = Math.atan2(b, a);
|
|
956
|
+
h = 360 * hr / 2 / Math.PI;
|
|
957
|
+
if (h < 0) h += 360;
|
|
958
|
+
const c = Math.sqrt(a * a + b * b);
|
|
959
|
+
return [
|
|
960
|
+
l,
|
|
961
|
+
c,
|
|
962
|
+
h
|
|
963
|
+
];
|
|
964
|
+
};
|
|
965
|
+
convert.lch.lab = function(lch) {
|
|
966
|
+
const l = lch[0];
|
|
967
|
+
const c = lch[1];
|
|
968
|
+
const h = lch[2];
|
|
969
|
+
const hr = h / 360 * 2 * Math.PI;
|
|
970
|
+
const a = c * Math.cos(hr);
|
|
971
|
+
const b = c * Math.sin(hr);
|
|
972
|
+
return [
|
|
973
|
+
l,
|
|
974
|
+
a,
|
|
975
|
+
b
|
|
976
|
+
];
|
|
977
|
+
};
|
|
978
|
+
convert.rgb.ansi16 = function(args, saturation = null) {
|
|
979
|
+
const [r, g, b] = args;
|
|
980
|
+
let value = null === saturation ? convert.rgb.hsv(args)[2] : saturation; // Hsv -> ansi16 optimization
|
|
981
|
+
value = Math.round(value / 50);
|
|
982
|
+
if (0 === value) return 30;
|
|
983
|
+
let ansi = 30 + (Math.round(b / 255) << 2 | Math.round(g / 255) << 1 | Math.round(r / 255));
|
|
984
|
+
if (2 === value) ansi += 60;
|
|
985
|
+
return ansi;
|
|
986
|
+
};
|
|
987
|
+
convert.hsv.ansi16 = function(args) {
|
|
988
|
+
// Optimization here; we already know the value and don't need to get
|
|
989
|
+
// it converted for us.
|
|
990
|
+
return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);
|
|
991
|
+
};
|
|
992
|
+
convert.rgb.ansi256 = function(args) {
|
|
993
|
+
const r = args[0];
|
|
994
|
+
const g = args[1];
|
|
995
|
+
const b = args[2];
|
|
996
|
+
// We use the extended greyscale palette here, with the exception of
|
|
997
|
+
// black and white. normal palette only has 4 greyscale shades.
|
|
998
|
+
if (r === g && g === b) {
|
|
999
|
+
if (r < 8) return 16;
|
|
1000
|
+
if (r > 248) return 231;
|
|
1001
|
+
return Math.round((r - 8) / 247 * 24) + 232;
|
|
1002
|
+
}
|
|
1003
|
+
const ansi = 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5);
|
|
1004
|
+
return ansi;
|
|
1005
|
+
};
|
|
1006
|
+
convert.ansi16.rgb = function(args) {
|
|
1007
|
+
let color = args % 10;
|
|
1008
|
+
// Handle greyscale
|
|
1009
|
+
if (0 === color || 7 === color) {
|
|
1010
|
+
if (args > 50) color += 3.5;
|
|
1011
|
+
color = color / 10.5 * 255;
|
|
1012
|
+
return [
|
|
1013
|
+
color,
|
|
1014
|
+
color,
|
|
1015
|
+
color
|
|
1016
|
+
];
|
|
1017
|
+
}
|
|
1018
|
+
const mult = (~~(args > 50) + 1) * 0.5;
|
|
1019
|
+
const r = (1 & color) * mult * 255;
|
|
1020
|
+
const g = (color >> 1 & 1) * mult * 255;
|
|
1021
|
+
const b = (color >> 2 & 1) * mult * 255;
|
|
1022
|
+
return [
|
|
1023
|
+
r,
|
|
1024
|
+
g,
|
|
1025
|
+
b
|
|
1026
|
+
];
|
|
1027
|
+
};
|
|
1028
|
+
convert.ansi256.rgb = function(args) {
|
|
1029
|
+
// Handle greyscale
|
|
1030
|
+
if (args >= 232) {
|
|
1031
|
+
const c = (args - 232) * 10 + 8;
|
|
1032
|
+
return [
|
|
1033
|
+
c,
|
|
1034
|
+
c,
|
|
1035
|
+
c
|
|
1036
|
+
];
|
|
1037
|
+
}
|
|
1038
|
+
args -= 16;
|
|
1039
|
+
let rem;
|
|
1040
|
+
const r = Math.floor(args / 36) / 5 * 255;
|
|
1041
|
+
const g = Math.floor((rem = args % 36) / 6) / 5 * 255;
|
|
1042
|
+
const b = rem % 6 / 5 * 255;
|
|
1043
|
+
return [
|
|
1044
|
+
r,
|
|
1045
|
+
g,
|
|
1046
|
+
b
|
|
1047
|
+
];
|
|
1048
|
+
};
|
|
1049
|
+
convert.rgb.hex = function(args) {
|
|
1050
|
+
const integer = ((0xFF & Math.round(args[0])) << 16) + ((0xFF & Math.round(args[1])) << 8) + (0xFF & Math.round(args[2]));
|
|
1051
|
+
const string = integer.toString(16).toUpperCase();
|
|
1052
|
+
return '000000'.substring(string.length) + string;
|
|
1053
|
+
};
|
|
1054
|
+
convert.hex.rgb = function(args) {
|
|
1055
|
+
const match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
|
|
1056
|
+
if (!match) return [
|
|
1057
|
+
0,
|
|
1058
|
+
0,
|
|
1059
|
+
0
|
|
1060
|
+
];
|
|
1061
|
+
let colorString = match[0];
|
|
1062
|
+
if (3 === match[0].length) colorString = colorString.split('').map((char)=>char + char).join('');
|
|
1063
|
+
const integer = parseInt(colorString, 16);
|
|
1064
|
+
const r = integer >> 16 & 0xFF;
|
|
1065
|
+
const g = integer >> 8 & 0xFF;
|
|
1066
|
+
const b = 0xFF & integer;
|
|
1067
|
+
return [
|
|
1068
|
+
r,
|
|
1069
|
+
g,
|
|
1070
|
+
b
|
|
1071
|
+
];
|
|
1072
|
+
};
|
|
1073
|
+
convert.rgb.hcg = function(rgb) {
|
|
1074
|
+
const r = rgb[0] / 255;
|
|
1075
|
+
const g = rgb[1] / 255;
|
|
1076
|
+
const b = rgb[2] / 255;
|
|
1077
|
+
const max = Math.max(Math.max(r, g), b);
|
|
1078
|
+
const min = Math.min(Math.min(r, g), b);
|
|
1079
|
+
const chroma = max - min;
|
|
1080
|
+
let grayscale;
|
|
1081
|
+
let hue;
|
|
1082
|
+
grayscale = chroma < 1 ? min / (1 - chroma) : 0;
|
|
1083
|
+
hue = chroma <= 0 ? 0 : max === r ? (g - b) / chroma % 6 : max === g ? 2 + (b - r) / chroma : 4 + (r - g) / chroma;
|
|
1084
|
+
hue /= 6;
|
|
1085
|
+
hue %= 1;
|
|
1086
|
+
return [
|
|
1087
|
+
360 * hue,
|
|
1088
|
+
100 * chroma,
|
|
1089
|
+
100 * grayscale
|
|
1090
|
+
];
|
|
1091
|
+
};
|
|
1092
|
+
convert.hsl.hcg = function(hsl) {
|
|
1093
|
+
const s = hsl[1] / 100;
|
|
1094
|
+
const l = hsl[2] / 100;
|
|
1095
|
+
const c = l < 0.5 ? 2.0 * s * l : 2.0 * s * (1.0 - l);
|
|
1096
|
+
let f = 0;
|
|
1097
|
+
if (c < 1.0) f = (l - 0.5 * c) / (1.0 - c);
|
|
1098
|
+
return [
|
|
1099
|
+
hsl[0],
|
|
1100
|
+
100 * c,
|
|
1101
|
+
100 * f
|
|
1102
|
+
];
|
|
1103
|
+
};
|
|
1104
|
+
convert.hsv.hcg = function(hsv) {
|
|
1105
|
+
const s = hsv[1] / 100;
|
|
1106
|
+
const v = hsv[2] / 100;
|
|
1107
|
+
const c = s * v;
|
|
1108
|
+
let f = 0;
|
|
1109
|
+
if (c < 1.0) f = (v - c) / (1 - c);
|
|
1110
|
+
return [
|
|
1111
|
+
hsv[0],
|
|
1112
|
+
100 * c,
|
|
1113
|
+
100 * f
|
|
1114
|
+
];
|
|
1115
|
+
};
|
|
1116
|
+
convert.hcg.rgb = function(hcg) {
|
|
1117
|
+
const h = hcg[0] / 360;
|
|
1118
|
+
const c = hcg[1] / 100;
|
|
1119
|
+
const g = hcg[2] / 100;
|
|
1120
|
+
if (0.0 === c) return [
|
|
1121
|
+
255 * g,
|
|
1122
|
+
255 * g,
|
|
1123
|
+
255 * g
|
|
1124
|
+
];
|
|
1125
|
+
const pure = [
|
|
1126
|
+
0,
|
|
1127
|
+
0,
|
|
1128
|
+
0
|
|
1129
|
+
];
|
|
1130
|
+
const hi = h % 1 * 6;
|
|
1131
|
+
const v = hi % 1;
|
|
1132
|
+
const w = 1 - v;
|
|
1133
|
+
let mg = 0;
|
|
1134
|
+
/* eslint-disable max-statements-per-line */ switch(Math.floor(hi)){
|
|
1135
|
+
case 0:
|
|
1136
|
+
pure[0] = 1;
|
|
1137
|
+
pure[1] = v;
|
|
1138
|
+
pure[2] = 0;
|
|
1139
|
+
break;
|
|
1140
|
+
case 1:
|
|
1141
|
+
pure[0] = w;
|
|
1142
|
+
pure[1] = 1;
|
|
1143
|
+
pure[2] = 0;
|
|
1144
|
+
break;
|
|
1145
|
+
case 2:
|
|
1146
|
+
pure[0] = 0;
|
|
1147
|
+
pure[1] = 1;
|
|
1148
|
+
pure[2] = v;
|
|
1149
|
+
break;
|
|
1150
|
+
case 3:
|
|
1151
|
+
pure[0] = 0;
|
|
1152
|
+
pure[1] = w;
|
|
1153
|
+
pure[2] = 1;
|
|
1154
|
+
break;
|
|
1155
|
+
case 4:
|
|
1156
|
+
pure[0] = v;
|
|
1157
|
+
pure[1] = 0;
|
|
1158
|
+
pure[2] = 1;
|
|
1159
|
+
break;
|
|
1160
|
+
default:
|
|
1161
|
+
pure[0] = 1;
|
|
1162
|
+
pure[1] = 0;
|
|
1163
|
+
pure[2] = w;
|
|
1164
|
+
}
|
|
1165
|
+
/* eslint-enable max-statements-per-line */ mg = (1.0 - c) * g;
|
|
1166
|
+
return [
|
|
1167
|
+
(c * pure[0] + mg) * 255,
|
|
1168
|
+
(c * pure[1] + mg) * 255,
|
|
1169
|
+
(c * pure[2] + mg) * 255
|
|
1170
|
+
];
|
|
1171
|
+
};
|
|
1172
|
+
convert.hcg.hsv = function(hcg) {
|
|
1173
|
+
const c = hcg[1] / 100;
|
|
1174
|
+
const g = hcg[2] / 100;
|
|
1175
|
+
const v = c + g * (1.0 - c);
|
|
1176
|
+
let f = 0;
|
|
1177
|
+
if (v > 0.0) f = c / v;
|
|
1178
|
+
return [
|
|
1179
|
+
hcg[0],
|
|
1180
|
+
100 * f,
|
|
1181
|
+
100 * v
|
|
1182
|
+
];
|
|
1183
|
+
};
|
|
1184
|
+
convert.hcg.hsl = function(hcg) {
|
|
1185
|
+
const c = hcg[1] / 100;
|
|
1186
|
+
const g = hcg[2] / 100;
|
|
1187
|
+
const l = g * (1.0 - c) + 0.5 * c;
|
|
1188
|
+
let s = 0;
|
|
1189
|
+
if (l > 0.0 && l < 0.5) s = c / (2 * l);
|
|
1190
|
+
else if (l >= 0.5 && l < 1.0) s = c / (2 * (1 - l));
|
|
1191
|
+
return [
|
|
1192
|
+
hcg[0],
|
|
1193
|
+
100 * s,
|
|
1194
|
+
100 * l
|
|
1195
|
+
];
|
|
1196
|
+
};
|
|
1197
|
+
convert.hcg.hwb = function(hcg) {
|
|
1198
|
+
const c = hcg[1] / 100;
|
|
1199
|
+
const g = hcg[2] / 100;
|
|
1200
|
+
const v = c + g * (1.0 - c);
|
|
1201
|
+
return [
|
|
1202
|
+
hcg[0],
|
|
1203
|
+
(v - c) * 100,
|
|
1204
|
+
(1 - v) * 100
|
|
1205
|
+
];
|
|
1206
|
+
};
|
|
1207
|
+
convert.hwb.hcg = function(hwb) {
|
|
1208
|
+
const w = hwb[1] / 100;
|
|
1209
|
+
const b = hwb[2] / 100;
|
|
1210
|
+
const v = 1 - b;
|
|
1211
|
+
const c = v - w;
|
|
1212
|
+
let g = 0;
|
|
1213
|
+
if (c < 1) g = (v - c) / (1 - c);
|
|
1214
|
+
return [
|
|
1215
|
+
hwb[0],
|
|
1216
|
+
100 * c,
|
|
1217
|
+
100 * g
|
|
1218
|
+
];
|
|
1219
|
+
};
|
|
1220
|
+
convert.apple.rgb = function(apple) {
|
|
1221
|
+
return [
|
|
1222
|
+
apple[0] / 65535 * 255,
|
|
1223
|
+
apple[1] / 65535 * 255,
|
|
1224
|
+
apple[2] / 65535 * 255
|
|
1225
|
+
];
|
|
1226
|
+
};
|
|
1227
|
+
convert.rgb.apple = function(rgb) {
|
|
1228
|
+
return [
|
|
1229
|
+
rgb[0] / 255 * 65535,
|
|
1230
|
+
rgb[1] / 255 * 65535,
|
|
1231
|
+
rgb[2] / 255 * 65535
|
|
1232
|
+
];
|
|
1233
|
+
};
|
|
1234
|
+
convert.gray.rgb = function(args) {
|
|
1235
|
+
return [
|
|
1236
|
+
args[0] / 100 * 255,
|
|
1237
|
+
args[0] / 100 * 255,
|
|
1238
|
+
args[0] / 100 * 255
|
|
1239
|
+
];
|
|
1240
|
+
};
|
|
1241
|
+
convert.gray.hsl = function(args) {
|
|
1242
|
+
return [
|
|
1243
|
+
0,
|
|
1244
|
+
0,
|
|
1245
|
+
args[0]
|
|
1246
|
+
];
|
|
1247
|
+
};
|
|
1248
|
+
convert.gray.hsv = convert.gray.hsl;
|
|
1249
|
+
convert.gray.hwb = function(gray) {
|
|
1250
|
+
return [
|
|
1251
|
+
0,
|
|
1252
|
+
100,
|
|
1253
|
+
gray[0]
|
|
1254
|
+
];
|
|
1255
|
+
};
|
|
1256
|
+
convert.gray.cmyk = function(gray) {
|
|
1257
|
+
return [
|
|
1258
|
+
0,
|
|
1259
|
+
0,
|
|
1260
|
+
0,
|
|
1261
|
+
gray[0]
|
|
1262
|
+
];
|
|
1263
|
+
};
|
|
1264
|
+
convert.gray.lab = function(gray) {
|
|
1265
|
+
return [
|
|
1266
|
+
gray[0],
|
|
1267
|
+
0,
|
|
1268
|
+
0
|
|
1269
|
+
];
|
|
1270
|
+
};
|
|
1271
|
+
convert.gray.hex = function(gray) {
|
|
1272
|
+
const val = 0xFF & Math.round(gray[0] / 100 * 255);
|
|
1273
|
+
const integer = (val << 16) + (val << 8) + val;
|
|
1274
|
+
const string = integer.toString(16).toUpperCase();
|
|
1275
|
+
return '000000'.substring(string.length) + string;
|
|
1276
|
+
};
|
|
1277
|
+
convert.rgb.gray = function(rgb) {
|
|
1278
|
+
const val = (rgb[0] + rgb[1] + rgb[2]) / 3;
|
|
1279
|
+
return [
|
|
1280
|
+
val / 255 * 100
|
|
1281
|
+
];
|
|
1282
|
+
};
|
|
1283
|
+
},
|
|
1284
|
+
"../../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/index.js": function(module, __unused_webpack_exports, __webpack_require__) {
|
|
1285
|
+
const conversions = __webpack_require__("../../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/conversions.js");
|
|
1286
|
+
const route = __webpack_require__("../../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/route.js");
|
|
1287
|
+
const convert = {};
|
|
1288
|
+
const models = Object.keys(conversions);
|
|
1289
|
+
function wrapRaw(fn) {
|
|
1290
|
+
const wrappedFn = function(...args) {
|
|
1291
|
+
const arg0 = args[0];
|
|
1292
|
+
if (null == arg0) return arg0;
|
|
1293
|
+
if (arg0.length > 1) args = arg0;
|
|
1294
|
+
return fn(args);
|
|
1295
|
+
};
|
|
1296
|
+
// Preserve .conversion property if there is one
|
|
1297
|
+
if ('conversion' in fn) wrappedFn.conversion = fn.conversion;
|
|
1298
|
+
return wrappedFn;
|
|
1299
|
+
}
|
|
1300
|
+
function wrapRounded(fn) {
|
|
1301
|
+
const wrappedFn = function(...args) {
|
|
1302
|
+
const arg0 = args[0];
|
|
1303
|
+
if (null == arg0) return arg0;
|
|
1304
|
+
if (arg0.length > 1) args = arg0;
|
|
1305
|
+
const result = fn(args);
|
|
1306
|
+
// We're assuming the result is an array here.
|
|
1307
|
+
// see notice in conversions.js; don't use box types
|
|
1308
|
+
// in conversion functions.
|
|
1309
|
+
if ('object' == typeof result) for(let len = result.length, i = 0; i < len; i++)result[i] = Math.round(result[i]);
|
|
1310
|
+
return result;
|
|
1311
|
+
};
|
|
1312
|
+
// Preserve .conversion property if there is one
|
|
1313
|
+
if ('conversion' in fn) wrappedFn.conversion = fn.conversion;
|
|
1314
|
+
return wrappedFn;
|
|
1315
|
+
}
|
|
1316
|
+
models.forEach((fromModel)=>{
|
|
1317
|
+
convert[fromModel] = {};
|
|
1318
|
+
Object.defineProperty(convert[fromModel], 'channels', {
|
|
1319
|
+
value: conversions[fromModel].channels
|
|
1320
|
+
});
|
|
1321
|
+
Object.defineProperty(convert[fromModel], 'labels', {
|
|
1322
|
+
value: conversions[fromModel].labels
|
|
1323
|
+
});
|
|
1324
|
+
const routes = route(fromModel);
|
|
1325
|
+
const routeModels = Object.keys(routes);
|
|
1326
|
+
routeModels.forEach((toModel)=>{
|
|
1327
|
+
const fn = routes[toModel];
|
|
1328
|
+
convert[fromModel][toModel] = wrapRounded(fn);
|
|
1329
|
+
convert[fromModel][toModel].raw = wrapRaw(fn);
|
|
1330
|
+
});
|
|
1331
|
+
});
|
|
1332
|
+
module.exports = convert;
|
|
1333
|
+
},
|
|
1334
|
+
"../../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/route.js": function(module, __unused_webpack_exports, __webpack_require__) {
|
|
1335
|
+
const conversions = __webpack_require__("../../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/conversions.js");
|
|
1336
|
+
/*
|
|
1337
|
+
This function routes a model to all other models.
|
|
1338
|
+
|
|
1339
|
+
all functions that are routed have a property `.conversion` attached
|
|
1340
|
+
to the returned synthetic function. This property is an array
|
|
1341
|
+
of strings, each with the steps in between the 'from' and 'to'
|
|
1342
|
+
color models (inclusive).
|
|
1343
|
+
|
|
1344
|
+
conversions that are not possible simply are not included.
|
|
1345
|
+
*/ function buildGraph() {
|
|
1346
|
+
const graph = {};
|
|
1347
|
+
// https://jsperf.com/object-keys-vs-for-in-with-closure/3
|
|
1348
|
+
const models = Object.keys(conversions);
|
|
1349
|
+
for(let len = models.length, i = 0; i < len; i++)graph[models[i]] = {
|
|
1350
|
+
// http://jsperf.com/1-vs-infinity
|
|
1351
|
+
// micro-opt, but this is simple.
|
|
1352
|
+
distance: -1,
|
|
1353
|
+
parent: null
|
|
1354
|
+
};
|
|
1355
|
+
return graph;
|
|
1356
|
+
}
|
|
1357
|
+
// https://en.wikipedia.org/wiki/Breadth-first_search
|
|
1358
|
+
function deriveBFS(fromModel) {
|
|
1359
|
+
const graph = buildGraph();
|
|
1360
|
+
const queue = [
|
|
1361
|
+
fromModel
|
|
1362
|
+
]; // Unshift -> queue -> pop
|
|
1363
|
+
graph[fromModel].distance = 0;
|
|
1364
|
+
while(queue.length){
|
|
1365
|
+
const current = queue.pop();
|
|
1366
|
+
const adjacents = Object.keys(conversions[current]);
|
|
1367
|
+
for(let len = adjacents.length, i = 0; i < len; i++){
|
|
1368
|
+
const adjacent = adjacents[i];
|
|
1369
|
+
const node = graph[adjacent];
|
|
1370
|
+
if (-1 === node.distance) {
|
|
1371
|
+
node.distance = graph[current].distance + 1;
|
|
1372
|
+
node.parent = current;
|
|
1373
|
+
queue.unshift(adjacent);
|
|
1374
|
+
}
|
|
1375
|
+
}
|
|
1376
|
+
}
|
|
1377
|
+
return graph;
|
|
1378
|
+
}
|
|
1379
|
+
function link(from, to) {
|
|
1380
|
+
return function(args) {
|
|
1381
|
+
return to(from(args));
|
|
1382
|
+
};
|
|
1383
|
+
}
|
|
1384
|
+
function wrapConversion(toModel, graph) {
|
|
1385
|
+
const path = [
|
|
1386
|
+
graph[toModel].parent,
|
|
1387
|
+
toModel
|
|
1388
|
+
];
|
|
1389
|
+
let fn = conversions[graph[toModel].parent][toModel];
|
|
1390
|
+
let cur = graph[toModel].parent;
|
|
1391
|
+
while(graph[cur].parent){
|
|
1392
|
+
path.unshift(graph[cur].parent);
|
|
1393
|
+
fn = link(conversions[graph[cur].parent][cur], fn);
|
|
1394
|
+
cur = graph[cur].parent;
|
|
1395
|
+
}
|
|
1396
|
+
fn.conversion = path;
|
|
1397
|
+
return fn;
|
|
1398
|
+
}
|
|
1399
|
+
module.exports = function(fromModel) {
|
|
1400
|
+
const graph = deriveBFS(fromModel);
|
|
1401
|
+
const conversion = {};
|
|
1402
|
+
const models = Object.keys(graph);
|
|
1403
|
+
for(let len = models.length, i = 0; i < len; i++){
|
|
1404
|
+
const toModel = models[i];
|
|
1405
|
+
const node = graph[toModel];
|
|
1406
|
+
if (null !== node.parent) conversion[toModel] = wrapConversion(toModel, graph);
|
|
1407
|
+
}
|
|
1408
|
+
return conversion;
|
|
1409
|
+
};
|
|
1410
|
+
},
|
|
1411
|
+
"../../../node_modules/.pnpm/color-name@1.1.4/node_modules/color-name/index.js": function(module) {
|
|
1412
|
+
"use strict";
|
|
1413
|
+
module.exports = {
|
|
1414
|
+
aliceblue: [
|
|
1415
|
+
240,
|
|
1416
|
+
248,
|
|
1417
|
+
255
|
|
1418
|
+
],
|
|
1419
|
+
antiquewhite: [
|
|
1420
|
+
250,
|
|
1421
|
+
235,
|
|
1422
|
+
215
|
|
1423
|
+
],
|
|
1424
|
+
aqua: [
|
|
1425
|
+
0,
|
|
1426
|
+
255,
|
|
1427
|
+
255
|
|
1428
|
+
],
|
|
1429
|
+
aquamarine: [
|
|
1430
|
+
127,
|
|
1431
|
+
255,
|
|
1432
|
+
212
|
|
1433
|
+
],
|
|
1434
|
+
azure: [
|
|
1435
|
+
240,
|
|
1436
|
+
255,
|
|
1437
|
+
255
|
|
1438
|
+
],
|
|
1439
|
+
beige: [
|
|
1440
|
+
245,
|
|
1441
|
+
245,
|
|
1442
|
+
220
|
|
1443
|
+
],
|
|
1444
|
+
bisque: [
|
|
1445
|
+
255,
|
|
1446
|
+
228,
|
|
1447
|
+
196
|
|
1448
|
+
],
|
|
1449
|
+
black: [
|
|
1450
|
+
0,
|
|
1451
|
+
0,
|
|
1452
|
+
0
|
|
1453
|
+
],
|
|
1454
|
+
blanchedalmond: [
|
|
1455
|
+
255,
|
|
1456
|
+
235,
|
|
1457
|
+
205
|
|
1458
|
+
],
|
|
1459
|
+
blue: [
|
|
1460
|
+
0,
|
|
1461
|
+
0,
|
|
1462
|
+
255
|
|
1463
|
+
],
|
|
1464
|
+
blueviolet: [
|
|
1465
|
+
138,
|
|
1466
|
+
43,
|
|
1467
|
+
226
|
|
1468
|
+
],
|
|
1469
|
+
brown: [
|
|
1470
|
+
165,
|
|
1471
|
+
42,
|
|
1472
|
+
42
|
|
1473
|
+
],
|
|
1474
|
+
burlywood: [
|
|
1475
|
+
222,
|
|
1476
|
+
184,
|
|
1477
|
+
135
|
|
1478
|
+
],
|
|
1479
|
+
cadetblue: [
|
|
1480
|
+
95,
|
|
1481
|
+
158,
|
|
1482
|
+
160
|
|
1483
|
+
],
|
|
1484
|
+
chartreuse: [
|
|
1485
|
+
127,
|
|
1486
|
+
255,
|
|
1487
|
+
0
|
|
1488
|
+
],
|
|
1489
|
+
chocolate: [
|
|
1490
|
+
210,
|
|
1491
|
+
105,
|
|
1492
|
+
30
|
|
1493
|
+
],
|
|
1494
|
+
coral: [
|
|
1495
|
+
255,
|
|
1496
|
+
127,
|
|
1497
|
+
80
|
|
1498
|
+
],
|
|
1499
|
+
cornflowerblue: [
|
|
1500
|
+
100,
|
|
1501
|
+
149,
|
|
1502
|
+
237
|
|
1503
|
+
],
|
|
1504
|
+
cornsilk: [
|
|
1505
|
+
255,
|
|
1506
|
+
248,
|
|
1507
|
+
220
|
|
1508
|
+
],
|
|
1509
|
+
crimson: [
|
|
1510
|
+
220,
|
|
1511
|
+
20,
|
|
1512
|
+
60
|
|
1513
|
+
],
|
|
1514
|
+
cyan: [
|
|
1515
|
+
0,
|
|
1516
|
+
255,
|
|
1517
|
+
255
|
|
1518
|
+
],
|
|
1519
|
+
darkblue: [
|
|
1520
|
+
0,
|
|
1521
|
+
0,
|
|
1522
|
+
139
|
|
1523
|
+
],
|
|
1524
|
+
darkcyan: [
|
|
1525
|
+
0,
|
|
1526
|
+
139,
|
|
1527
|
+
139
|
|
1528
|
+
],
|
|
1529
|
+
darkgoldenrod: [
|
|
1530
|
+
184,
|
|
1531
|
+
134,
|
|
1532
|
+
11
|
|
1533
|
+
],
|
|
1534
|
+
darkgray: [
|
|
1535
|
+
169,
|
|
1536
|
+
169,
|
|
1537
|
+
169
|
|
1538
|
+
],
|
|
1539
|
+
darkgreen: [
|
|
1540
|
+
0,
|
|
1541
|
+
100,
|
|
1542
|
+
0
|
|
1543
|
+
],
|
|
1544
|
+
darkgrey: [
|
|
1545
|
+
169,
|
|
1546
|
+
169,
|
|
1547
|
+
169
|
|
1548
|
+
],
|
|
1549
|
+
darkkhaki: [
|
|
1550
|
+
189,
|
|
1551
|
+
183,
|
|
1552
|
+
107
|
|
1553
|
+
],
|
|
1554
|
+
darkmagenta: [
|
|
1555
|
+
139,
|
|
1556
|
+
0,
|
|
1557
|
+
139
|
|
1558
|
+
],
|
|
1559
|
+
darkolivegreen: [
|
|
1560
|
+
85,
|
|
1561
|
+
107,
|
|
1562
|
+
47
|
|
1563
|
+
],
|
|
1564
|
+
darkorange: [
|
|
1565
|
+
255,
|
|
1566
|
+
140,
|
|
1567
|
+
0
|
|
1568
|
+
],
|
|
1569
|
+
darkorchid: [
|
|
1570
|
+
153,
|
|
1571
|
+
50,
|
|
1572
|
+
204
|
|
1573
|
+
],
|
|
1574
|
+
darkred: [
|
|
1575
|
+
139,
|
|
1576
|
+
0,
|
|
1577
|
+
0
|
|
1578
|
+
],
|
|
1579
|
+
darksalmon: [
|
|
1580
|
+
233,
|
|
1581
|
+
150,
|
|
1582
|
+
122
|
|
1583
|
+
],
|
|
1584
|
+
darkseagreen: [
|
|
1585
|
+
143,
|
|
1586
|
+
188,
|
|
1587
|
+
143
|
|
1588
|
+
],
|
|
1589
|
+
darkslateblue: [
|
|
1590
|
+
72,
|
|
1591
|
+
61,
|
|
1592
|
+
139
|
|
1593
|
+
],
|
|
1594
|
+
darkslategray: [
|
|
1595
|
+
47,
|
|
1596
|
+
79,
|
|
1597
|
+
79
|
|
1598
|
+
],
|
|
1599
|
+
darkslategrey: [
|
|
1600
|
+
47,
|
|
1601
|
+
79,
|
|
1602
|
+
79
|
|
1603
|
+
],
|
|
1604
|
+
darkturquoise: [
|
|
1605
|
+
0,
|
|
1606
|
+
206,
|
|
1607
|
+
209
|
|
1608
|
+
],
|
|
1609
|
+
darkviolet: [
|
|
1610
|
+
148,
|
|
1611
|
+
0,
|
|
1612
|
+
211
|
|
1613
|
+
],
|
|
1614
|
+
deeppink: [
|
|
1615
|
+
255,
|
|
1616
|
+
20,
|
|
1617
|
+
147
|
|
1618
|
+
],
|
|
1619
|
+
deepskyblue: [
|
|
1620
|
+
0,
|
|
1621
|
+
191,
|
|
1622
|
+
255
|
|
1623
|
+
],
|
|
1624
|
+
dimgray: [
|
|
1625
|
+
105,
|
|
1626
|
+
105,
|
|
1627
|
+
105
|
|
1628
|
+
],
|
|
1629
|
+
dimgrey: [
|
|
1630
|
+
105,
|
|
1631
|
+
105,
|
|
1632
|
+
105
|
|
1633
|
+
],
|
|
1634
|
+
dodgerblue: [
|
|
1635
|
+
30,
|
|
1636
|
+
144,
|
|
1637
|
+
255
|
|
1638
|
+
],
|
|
1639
|
+
firebrick: [
|
|
1640
|
+
178,
|
|
1641
|
+
34,
|
|
1642
|
+
34
|
|
1643
|
+
],
|
|
1644
|
+
floralwhite: [
|
|
1645
|
+
255,
|
|
1646
|
+
250,
|
|
1647
|
+
240
|
|
1648
|
+
],
|
|
1649
|
+
forestgreen: [
|
|
1650
|
+
34,
|
|
1651
|
+
139,
|
|
1652
|
+
34
|
|
1653
|
+
],
|
|
1654
|
+
fuchsia: [
|
|
1655
|
+
255,
|
|
1656
|
+
0,
|
|
1657
|
+
255
|
|
1658
|
+
],
|
|
1659
|
+
gainsboro: [
|
|
1660
|
+
220,
|
|
1661
|
+
220,
|
|
1662
|
+
220
|
|
1663
|
+
],
|
|
1664
|
+
ghostwhite: [
|
|
1665
|
+
248,
|
|
1666
|
+
248,
|
|
1667
|
+
255
|
|
1668
|
+
],
|
|
1669
|
+
gold: [
|
|
1670
|
+
255,
|
|
1671
|
+
215,
|
|
1672
|
+
0
|
|
1673
|
+
],
|
|
1674
|
+
goldenrod: [
|
|
1675
|
+
218,
|
|
1676
|
+
165,
|
|
1677
|
+
32
|
|
1678
|
+
],
|
|
1679
|
+
gray: [
|
|
1680
|
+
128,
|
|
1681
|
+
128,
|
|
1682
|
+
128
|
|
1683
|
+
],
|
|
1684
|
+
green: [
|
|
1685
|
+
0,
|
|
1686
|
+
128,
|
|
1687
|
+
0
|
|
1688
|
+
],
|
|
1689
|
+
greenyellow: [
|
|
1690
|
+
173,
|
|
1691
|
+
255,
|
|
1692
|
+
47
|
|
1693
|
+
],
|
|
1694
|
+
grey: [
|
|
1695
|
+
128,
|
|
1696
|
+
128,
|
|
1697
|
+
128
|
|
1698
|
+
],
|
|
1699
|
+
honeydew: [
|
|
1700
|
+
240,
|
|
1701
|
+
255,
|
|
1702
|
+
240
|
|
1703
|
+
],
|
|
1704
|
+
hotpink: [
|
|
1705
|
+
255,
|
|
1706
|
+
105,
|
|
1707
|
+
180
|
|
1708
|
+
],
|
|
1709
|
+
indianred: [
|
|
1710
|
+
205,
|
|
1711
|
+
92,
|
|
1712
|
+
92
|
|
1713
|
+
],
|
|
1714
|
+
indigo: [
|
|
1715
|
+
75,
|
|
1716
|
+
0,
|
|
1717
|
+
130
|
|
1718
|
+
],
|
|
1719
|
+
ivory: [
|
|
1720
|
+
255,
|
|
1721
|
+
255,
|
|
1722
|
+
240
|
|
1723
|
+
],
|
|
1724
|
+
khaki: [
|
|
1725
|
+
240,
|
|
1726
|
+
230,
|
|
1727
|
+
140
|
|
1728
|
+
],
|
|
1729
|
+
lavender: [
|
|
1730
|
+
230,
|
|
1731
|
+
230,
|
|
1732
|
+
250
|
|
1733
|
+
],
|
|
1734
|
+
lavenderblush: [
|
|
1735
|
+
255,
|
|
1736
|
+
240,
|
|
1737
|
+
245
|
|
1738
|
+
],
|
|
1739
|
+
lawngreen: [
|
|
1740
|
+
124,
|
|
1741
|
+
252,
|
|
1742
|
+
0
|
|
1743
|
+
],
|
|
1744
|
+
lemonchiffon: [
|
|
1745
|
+
255,
|
|
1746
|
+
250,
|
|
1747
|
+
205
|
|
1748
|
+
],
|
|
1749
|
+
lightblue: [
|
|
1750
|
+
173,
|
|
1751
|
+
216,
|
|
1752
|
+
230
|
|
1753
|
+
],
|
|
1754
|
+
lightcoral: [
|
|
1755
|
+
240,
|
|
1756
|
+
128,
|
|
1757
|
+
128
|
|
1758
|
+
],
|
|
1759
|
+
lightcyan: [
|
|
1760
|
+
224,
|
|
1761
|
+
255,
|
|
1762
|
+
255
|
|
1763
|
+
],
|
|
1764
|
+
lightgoldenrodyellow: [
|
|
1765
|
+
250,
|
|
1766
|
+
250,
|
|
1767
|
+
210
|
|
1768
|
+
],
|
|
1769
|
+
lightgray: [
|
|
1770
|
+
211,
|
|
1771
|
+
211,
|
|
1772
|
+
211
|
|
1773
|
+
],
|
|
1774
|
+
lightgreen: [
|
|
1775
|
+
144,
|
|
1776
|
+
238,
|
|
1777
|
+
144
|
|
1778
|
+
],
|
|
1779
|
+
lightgrey: [
|
|
1780
|
+
211,
|
|
1781
|
+
211,
|
|
1782
|
+
211
|
|
1783
|
+
],
|
|
1784
|
+
lightpink: [
|
|
1785
|
+
255,
|
|
1786
|
+
182,
|
|
1787
|
+
193
|
|
1788
|
+
],
|
|
1789
|
+
lightsalmon: [
|
|
1790
|
+
255,
|
|
1791
|
+
160,
|
|
1792
|
+
122
|
|
1793
|
+
],
|
|
1794
|
+
lightseagreen: [
|
|
1795
|
+
32,
|
|
1796
|
+
178,
|
|
1797
|
+
170
|
|
1798
|
+
],
|
|
1799
|
+
lightskyblue: [
|
|
1800
|
+
135,
|
|
1801
|
+
206,
|
|
1802
|
+
250
|
|
1803
|
+
],
|
|
1804
|
+
lightslategray: [
|
|
1805
|
+
119,
|
|
1806
|
+
136,
|
|
1807
|
+
153
|
|
1808
|
+
],
|
|
1809
|
+
lightslategrey: [
|
|
1810
|
+
119,
|
|
1811
|
+
136,
|
|
1812
|
+
153
|
|
1813
|
+
],
|
|
1814
|
+
lightsteelblue: [
|
|
1815
|
+
176,
|
|
1816
|
+
196,
|
|
1817
|
+
222
|
|
1818
|
+
],
|
|
1819
|
+
lightyellow: [
|
|
1820
|
+
255,
|
|
1821
|
+
255,
|
|
1822
|
+
224
|
|
1823
|
+
],
|
|
1824
|
+
lime: [
|
|
1825
|
+
0,
|
|
1826
|
+
255,
|
|
1827
|
+
0
|
|
1828
|
+
],
|
|
1829
|
+
limegreen: [
|
|
1830
|
+
50,
|
|
1831
|
+
205,
|
|
1832
|
+
50
|
|
1833
|
+
],
|
|
1834
|
+
linen: [
|
|
1835
|
+
250,
|
|
1836
|
+
240,
|
|
1837
|
+
230
|
|
1838
|
+
],
|
|
1839
|
+
magenta: [
|
|
1840
|
+
255,
|
|
1841
|
+
0,
|
|
1842
|
+
255
|
|
1843
|
+
],
|
|
1844
|
+
maroon: [
|
|
1845
|
+
128,
|
|
1846
|
+
0,
|
|
1847
|
+
0
|
|
1848
|
+
],
|
|
1849
|
+
mediumaquamarine: [
|
|
1850
|
+
102,
|
|
1851
|
+
205,
|
|
1852
|
+
170
|
|
1853
|
+
],
|
|
1854
|
+
mediumblue: [
|
|
1855
|
+
0,
|
|
1856
|
+
0,
|
|
1857
|
+
205
|
|
1858
|
+
],
|
|
1859
|
+
mediumorchid: [
|
|
1860
|
+
186,
|
|
1861
|
+
85,
|
|
1862
|
+
211
|
|
1863
|
+
],
|
|
1864
|
+
mediumpurple: [
|
|
1865
|
+
147,
|
|
1866
|
+
112,
|
|
1867
|
+
219
|
|
1868
|
+
],
|
|
1869
|
+
mediumseagreen: [
|
|
1870
|
+
60,
|
|
1871
|
+
179,
|
|
1872
|
+
113
|
|
1873
|
+
],
|
|
1874
|
+
mediumslateblue: [
|
|
1875
|
+
123,
|
|
1876
|
+
104,
|
|
1877
|
+
238
|
|
1878
|
+
],
|
|
1879
|
+
mediumspringgreen: [
|
|
1880
|
+
0,
|
|
1881
|
+
250,
|
|
1882
|
+
154
|
|
1883
|
+
],
|
|
1884
|
+
mediumturquoise: [
|
|
1885
|
+
72,
|
|
1886
|
+
209,
|
|
1887
|
+
204
|
|
1888
|
+
],
|
|
1889
|
+
mediumvioletred: [
|
|
1890
|
+
199,
|
|
1891
|
+
21,
|
|
1892
|
+
133
|
|
1893
|
+
],
|
|
1894
|
+
midnightblue: [
|
|
1895
|
+
25,
|
|
1896
|
+
25,
|
|
1897
|
+
112
|
|
1898
|
+
],
|
|
1899
|
+
mintcream: [
|
|
1900
|
+
245,
|
|
1901
|
+
255,
|
|
1902
|
+
250
|
|
1903
|
+
],
|
|
1904
|
+
mistyrose: [
|
|
1905
|
+
255,
|
|
1906
|
+
228,
|
|
1907
|
+
225
|
|
1908
|
+
],
|
|
1909
|
+
moccasin: [
|
|
1910
|
+
255,
|
|
1911
|
+
228,
|
|
1912
|
+
181
|
|
1913
|
+
],
|
|
1914
|
+
navajowhite: [
|
|
1915
|
+
255,
|
|
1916
|
+
222,
|
|
1917
|
+
173
|
|
1918
|
+
],
|
|
1919
|
+
navy: [
|
|
1920
|
+
0,
|
|
1921
|
+
0,
|
|
1922
|
+
128
|
|
1923
|
+
],
|
|
1924
|
+
oldlace: [
|
|
1925
|
+
253,
|
|
1926
|
+
245,
|
|
1927
|
+
230
|
|
1928
|
+
],
|
|
1929
|
+
olive: [
|
|
1930
|
+
128,
|
|
1931
|
+
128,
|
|
1932
|
+
0
|
|
1933
|
+
],
|
|
1934
|
+
olivedrab: [
|
|
1935
|
+
107,
|
|
1936
|
+
142,
|
|
1937
|
+
35
|
|
1938
|
+
],
|
|
1939
|
+
orange: [
|
|
1940
|
+
255,
|
|
1941
|
+
165,
|
|
1942
|
+
0
|
|
1943
|
+
],
|
|
1944
|
+
orangered: [
|
|
1945
|
+
255,
|
|
1946
|
+
69,
|
|
1947
|
+
0
|
|
1948
|
+
],
|
|
1949
|
+
orchid: [
|
|
1950
|
+
218,
|
|
1951
|
+
112,
|
|
1952
|
+
214
|
|
1953
|
+
],
|
|
1954
|
+
palegoldenrod: [
|
|
1955
|
+
238,
|
|
1956
|
+
232,
|
|
1957
|
+
170
|
|
1958
|
+
],
|
|
1959
|
+
palegreen: [
|
|
1960
|
+
152,
|
|
1961
|
+
251,
|
|
1962
|
+
152
|
|
1963
|
+
],
|
|
1964
|
+
paleturquoise: [
|
|
1965
|
+
175,
|
|
1966
|
+
238,
|
|
1967
|
+
238
|
|
1968
|
+
],
|
|
1969
|
+
palevioletred: [
|
|
1970
|
+
219,
|
|
1971
|
+
112,
|
|
1972
|
+
147
|
|
1973
|
+
],
|
|
1974
|
+
papayawhip: [
|
|
1975
|
+
255,
|
|
1976
|
+
239,
|
|
1977
|
+
213
|
|
1978
|
+
],
|
|
1979
|
+
peachpuff: [
|
|
1980
|
+
255,
|
|
1981
|
+
218,
|
|
1982
|
+
185
|
|
1983
|
+
],
|
|
1984
|
+
peru: [
|
|
1985
|
+
205,
|
|
1986
|
+
133,
|
|
1987
|
+
63
|
|
1988
|
+
],
|
|
1989
|
+
pink: [
|
|
1990
|
+
255,
|
|
1991
|
+
192,
|
|
1992
|
+
203
|
|
1993
|
+
],
|
|
1994
|
+
plum: [
|
|
1995
|
+
221,
|
|
1996
|
+
160,
|
|
1997
|
+
221
|
|
1998
|
+
],
|
|
1999
|
+
powderblue: [
|
|
2000
|
+
176,
|
|
2001
|
+
224,
|
|
2002
|
+
230
|
|
2003
|
+
],
|
|
2004
|
+
purple: [
|
|
2005
|
+
128,
|
|
2006
|
+
0,
|
|
2007
|
+
128
|
|
2008
|
+
],
|
|
2009
|
+
rebeccapurple: [
|
|
2010
|
+
102,
|
|
2011
|
+
51,
|
|
2012
|
+
153
|
|
2013
|
+
],
|
|
2014
|
+
red: [
|
|
2015
|
+
255,
|
|
2016
|
+
0,
|
|
2017
|
+
0
|
|
2018
|
+
],
|
|
2019
|
+
rosybrown: [
|
|
2020
|
+
188,
|
|
2021
|
+
143,
|
|
2022
|
+
143
|
|
2023
|
+
],
|
|
2024
|
+
royalblue: [
|
|
2025
|
+
65,
|
|
2026
|
+
105,
|
|
2027
|
+
225
|
|
2028
|
+
],
|
|
2029
|
+
saddlebrown: [
|
|
2030
|
+
139,
|
|
2031
|
+
69,
|
|
2032
|
+
19
|
|
2033
|
+
],
|
|
2034
|
+
salmon: [
|
|
2035
|
+
250,
|
|
2036
|
+
128,
|
|
2037
|
+
114
|
|
2038
|
+
],
|
|
2039
|
+
sandybrown: [
|
|
2040
|
+
244,
|
|
2041
|
+
164,
|
|
2042
|
+
96
|
|
2043
|
+
],
|
|
2044
|
+
seagreen: [
|
|
2045
|
+
46,
|
|
2046
|
+
139,
|
|
2047
|
+
87
|
|
2048
|
+
],
|
|
2049
|
+
seashell: [
|
|
2050
|
+
255,
|
|
2051
|
+
245,
|
|
2052
|
+
238
|
|
2053
|
+
],
|
|
2054
|
+
sienna: [
|
|
2055
|
+
160,
|
|
2056
|
+
82,
|
|
2057
|
+
45
|
|
2058
|
+
],
|
|
2059
|
+
silver: [
|
|
2060
|
+
192,
|
|
2061
|
+
192,
|
|
2062
|
+
192
|
|
2063
|
+
],
|
|
2064
|
+
skyblue: [
|
|
2065
|
+
135,
|
|
2066
|
+
206,
|
|
2067
|
+
235
|
|
2068
|
+
],
|
|
2069
|
+
slateblue: [
|
|
2070
|
+
106,
|
|
2071
|
+
90,
|
|
2072
|
+
205
|
|
2073
|
+
],
|
|
2074
|
+
slategray: [
|
|
2075
|
+
112,
|
|
2076
|
+
128,
|
|
2077
|
+
144
|
|
2078
|
+
],
|
|
2079
|
+
slategrey: [
|
|
2080
|
+
112,
|
|
2081
|
+
128,
|
|
2082
|
+
144
|
|
2083
|
+
],
|
|
2084
|
+
snow: [
|
|
2085
|
+
255,
|
|
2086
|
+
250,
|
|
2087
|
+
250
|
|
2088
|
+
],
|
|
2089
|
+
springgreen: [
|
|
2090
|
+
0,
|
|
2091
|
+
255,
|
|
2092
|
+
127
|
|
2093
|
+
],
|
|
2094
|
+
steelblue: [
|
|
2095
|
+
70,
|
|
2096
|
+
130,
|
|
2097
|
+
180
|
|
2098
|
+
],
|
|
2099
|
+
tan: [
|
|
2100
|
+
210,
|
|
2101
|
+
180,
|
|
2102
|
+
140
|
|
2103
|
+
],
|
|
2104
|
+
teal: [
|
|
2105
|
+
0,
|
|
2106
|
+
128,
|
|
2107
|
+
128
|
|
2108
|
+
],
|
|
2109
|
+
thistle: [
|
|
2110
|
+
216,
|
|
2111
|
+
191,
|
|
2112
|
+
216
|
|
2113
|
+
],
|
|
2114
|
+
tomato: [
|
|
2115
|
+
255,
|
|
2116
|
+
99,
|
|
2117
|
+
71
|
|
2118
|
+
],
|
|
2119
|
+
turquoise: [
|
|
2120
|
+
64,
|
|
2121
|
+
224,
|
|
2122
|
+
208
|
|
2123
|
+
],
|
|
2124
|
+
violet: [
|
|
2125
|
+
238,
|
|
2126
|
+
130,
|
|
2127
|
+
238
|
|
2128
|
+
],
|
|
2129
|
+
wheat: [
|
|
2130
|
+
245,
|
|
2131
|
+
222,
|
|
2132
|
+
179
|
|
2133
|
+
],
|
|
2134
|
+
white: [
|
|
2135
|
+
255,
|
|
2136
|
+
255,
|
|
2137
|
+
255
|
|
2138
|
+
],
|
|
2139
|
+
whitesmoke: [
|
|
2140
|
+
245,
|
|
2141
|
+
245,
|
|
2142
|
+
245
|
|
2143
|
+
],
|
|
2144
|
+
yellow: [
|
|
2145
|
+
255,
|
|
2146
|
+
255,
|
|
2147
|
+
0
|
|
2148
|
+
],
|
|
2149
|
+
yellowgreen: [
|
|
2150
|
+
154,
|
|
2151
|
+
205,
|
|
2152
|
+
50
|
|
2153
|
+
]
|
|
2154
|
+
};
|
|
2155
|
+
},
|
|
2156
|
+
"../../../node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/index.js": function(module) {
|
|
2157
|
+
"use strict";
|
|
2158
|
+
module.exports = function() {
|
|
2159
|
+
// https://mths.be/emoji
|
|
2160
|
+
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;
|
|
2161
|
+
};
|
|
2162
|
+
},
|
|
2163
|
+
"../../../node_modules/.pnpm/is-fullwidth-code-point@3.0.0/node_modules/is-fullwidth-code-point/index.js": function(module) {
|
|
2164
|
+
"use strict";
|
|
2165
|
+
/* eslint-disable yoda */ const isFullwidthCodePoint = (codePoint)=>{
|
|
2166
|
+
if (Number.isNaN(codePoint)) return false;
|
|
2167
|
+
// Code points are derived from:
|
|
2168
|
+
// http://www.unix.org/Public/UNIDATA/EastAsianWidth.txt
|
|
2169
|
+
if (codePoint >= 0x1100 && (codePoint <= 0x115F || // Hangul Jamo
|
|
2170
|
+
0x2329 === codePoint || // LEFT-POINTING ANGLE BRACKET
|
|
2171
|
+
0x232A === codePoint || // RIGHT-POINTING ANGLE BRACKET
|
|
2172
|
+
// CJK Radicals Supplement .. Enclosed CJK Letters and Months
|
|
2173
|
+
0x2E80 <= codePoint && codePoint <= 0x3247 && 0x303F !== codePoint || // Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A
|
|
2174
|
+
0x3250 <= codePoint && codePoint <= 0x4DBF || // CJK Unified Ideographs .. Yi Radicals
|
|
2175
|
+
0x4E00 <= codePoint && codePoint <= 0xA4C6 || // Hangul Jamo Extended-A
|
|
2176
|
+
0xA960 <= codePoint && codePoint <= 0xA97C || // Hangul Syllables
|
|
2177
|
+
0xAC00 <= codePoint && codePoint <= 0xD7A3 || // CJK Compatibility Ideographs
|
|
2178
|
+
0xF900 <= codePoint && codePoint <= 0xFAFF || // Vertical Forms
|
|
2179
|
+
0xFE10 <= codePoint && codePoint <= 0xFE19 || // CJK Compatibility Forms .. Small Form Variants
|
|
2180
|
+
0xFE30 <= codePoint && codePoint <= 0xFE6B || // Halfwidth and Fullwidth Forms
|
|
2181
|
+
0xFF01 <= codePoint && codePoint <= 0xFF60 || 0xFFE0 <= codePoint && codePoint <= 0xFFE6 || // Kana Supplement
|
|
2182
|
+
0x1B000 <= codePoint && codePoint <= 0x1B001 || // Enclosed Ideographic Supplement
|
|
2183
|
+
0x1F200 <= codePoint && codePoint <= 0x1F251 || // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane
|
|
2184
|
+
0x20000 <= codePoint && codePoint <= 0x3FFFD)) return true;
|
|
2185
|
+
return false;
|
|
2186
|
+
};
|
|
2187
|
+
module.exports = isFullwidthCodePoint;
|
|
2188
|
+
module.exports["default"] = isFullwidthCodePoint;
|
|
2189
|
+
},
|
|
2190
|
+
"../../../node_modules/.pnpm/patch-console@1.0.0/node_modules/patch-console/build/index.js": function(module, __unused_webpack_exports, __webpack_require__) {
|
|
2191
|
+
"use strict";
|
|
2192
|
+
const stream_1 = __webpack_require__("stream");
|
|
2193
|
+
const CONSOLE_METHODS = [
|
|
2194
|
+
'assert',
|
|
2195
|
+
'count',
|
|
2196
|
+
'countReset',
|
|
2197
|
+
'debug',
|
|
2198
|
+
'dir',
|
|
2199
|
+
'dirxml',
|
|
2200
|
+
'error',
|
|
2201
|
+
'group',
|
|
2202
|
+
'groupCollapsed',
|
|
2203
|
+
'groupEnd',
|
|
2204
|
+
'info',
|
|
2205
|
+
'log',
|
|
2206
|
+
'table',
|
|
2207
|
+
'time',
|
|
2208
|
+
'timeEnd',
|
|
2209
|
+
'timeLog',
|
|
2210
|
+
'trace',
|
|
2211
|
+
'warn'
|
|
2212
|
+
];
|
|
2213
|
+
let originalMethods = {};
|
|
2214
|
+
const patchConsole = (callback)=>{
|
|
2215
|
+
const stdout = new stream_1.PassThrough();
|
|
2216
|
+
const stderr = new stream_1.PassThrough();
|
|
2217
|
+
stdout.write = (data)=>callback('stdout', data);
|
|
2218
|
+
stderr.write = (data)=>callback('stderr', data);
|
|
2219
|
+
const internalConsole = new console.Console(stdout, stderr);
|
|
2220
|
+
for (const method of CONSOLE_METHODS){
|
|
2221
|
+
originalMethods[method] = console[method];
|
|
2222
|
+
console[method] = internalConsole[method];
|
|
2223
|
+
}
|
|
2224
|
+
return ()=>{
|
|
2225
|
+
for (const method of CONSOLE_METHODS)console[method] = originalMethods[method];
|
|
2226
|
+
originalMethods = {};
|
|
2227
|
+
};
|
|
2228
|
+
};
|
|
2229
|
+
module.exports = patchConsole;
|
|
2230
|
+
//# sourceMappingURL=index.js.map
|
|
2231
|
+
},
|
|
2232
|
+
"../../../node_modules/.pnpm/slice-ansi@3.0.0/node_modules/slice-ansi/index.js": function(module, __unused_webpack_exports, __webpack_require__) {
|
|
2233
|
+
"use strict";
|
|
2234
|
+
const isFullwidthCodePoint = __webpack_require__("../../../node_modules/.pnpm/is-fullwidth-code-point@3.0.0/node_modules/is-fullwidth-code-point/index.js");
|
|
2235
|
+
const astralRegex = __webpack_require__("../../../node_modules/.pnpm/astral-regex@2.0.0/node_modules/astral-regex/index.js");
|
|
2236
|
+
const ansiStyles = __webpack_require__("../../../node_modules/.pnpm/ansi-styles@4.3.0/node_modules/ansi-styles/index.js");
|
|
2237
|
+
const ESCAPES = [
|
|
2238
|
+
'\u001B',
|
|
2239
|
+
'\u009B'
|
|
2240
|
+
];
|
|
2241
|
+
const wrapAnsi = (code)=>`${ESCAPES[0]}[${code}m`;
|
|
2242
|
+
const checkAnsi = (ansiCodes, isEscapes, endAnsiCode)=>{
|
|
2243
|
+
let output = [];
|
|
2244
|
+
ansiCodes = [
|
|
2245
|
+
...ansiCodes
|
|
2246
|
+
];
|
|
2247
|
+
for (let ansiCode of ansiCodes){
|
|
2248
|
+
const ansiCodeOrigin = ansiCode;
|
|
2249
|
+
if (ansiCode.match(';')) ansiCode = ansiCode.split(';')[0][0] + '0';
|
|
2250
|
+
const item = ansiStyles.codes.get(parseInt(ansiCode, 10));
|
|
2251
|
+
if (item) {
|
|
2252
|
+
const indexEscape = ansiCodes.indexOf(item.toString());
|
|
2253
|
+
if (indexEscape >= 0) ansiCodes.splice(indexEscape, 1);
|
|
2254
|
+
else output.push(wrapAnsi(isEscapes ? item : ansiCodeOrigin));
|
|
2255
|
+
} else if (isEscapes) {
|
|
2256
|
+
output.push(wrapAnsi(0));
|
|
2257
|
+
break;
|
|
2258
|
+
} else output.push(wrapAnsi(ansiCodeOrigin));
|
|
2259
|
+
}
|
|
2260
|
+
if (isEscapes) {
|
|
2261
|
+
output = output.filter((element, index)=>output.indexOf(element) === index);
|
|
2262
|
+
if (void 0 !== endAnsiCode) {
|
|
2263
|
+
const fistEscapeCode = wrapAnsi(ansiStyles.codes.get(parseInt(endAnsiCode, 10)));
|
|
2264
|
+
output = output.reduce((current, next)=>next === fistEscapeCode ? [
|
|
2265
|
+
next,
|
|
2266
|
+
...current
|
|
2267
|
+
] : [
|
|
2268
|
+
...current,
|
|
2269
|
+
next
|
|
2270
|
+
], []);
|
|
2271
|
+
}
|
|
2272
|
+
}
|
|
2273
|
+
return output.join('');
|
|
2274
|
+
};
|
|
2275
|
+
module.exports = (string, begin, end)=>{
|
|
2276
|
+
const characters = [
|
|
2277
|
+
...string.normalize()
|
|
2278
|
+
];
|
|
2279
|
+
const ansiCodes = [];
|
|
2280
|
+
end = 'number' == typeof end ? end : characters.length;
|
|
2281
|
+
let isInsideEscape = false;
|
|
2282
|
+
let ansiCode;
|
|
2283
|
+
let visible = 0;
|
|
2284
|
+
let output = '';
|
|
2285
|
+
for (const [index, character] of characters.entries()){
|
|
2286
|
+
let leftEscape = false;
|
|
2287
|
+
if (ESCAPES.includes(character)) {
|
|
2288
|
+
const code = /\d[^m]*/.exec(string.slice(index, index + 18));
|
|
2289
|
+
ansiCode = code && code.length > 0 ? code[0] : void 0;
|
|
2290
|
+
if (visible < end) {
|
|
2291
|
+
isInsideEscape = true;
|
|
2292
|
+
if (void 0 !== ansiCode) ansiCodes.push(ansiCode);
|
|
2293
|
+
}
|
|
2294
|
+
} else if (isInsideEscape && 'm' === character) {
|
|
2295
|
+
isInsideEscape = false;
|
|
2296
|
+
leftEscape = true;
|
|
2297
|
+
}
|
|
2298
|
+
if (!isInsideEscape && !leftEscape) ++visible;
|
|
2299
|
+
if (!astralRegex({
|
|
2300
|
+
exact: true
|
|
2301
|
+
}).test(character) && isFullwidthCodePoint(character.codePointAt())) ++visible;
|
|
2302
|
+
if (visible > begin && visible <= end) output += character;
|
|
2303
|
+
else if (visible !== begin || isInsideEscape || void 0 === ansiCode) {
|
|
2304
|
+
if (visible >= end) {
|
|
2305
|
+
output += checkAnsi(ansiCodes, true, ansiCode);
|
|
2306
|
+
break;
|
|
2307
|
+
}
|
|
2308
|
+
} else output = checkAnsi(ansiCodes);
|
|
2309
|
+
}
|
|
2310
|
+
return output;
|
|
2311
|
+
};
|
|
2312
|
+
},
|
|
2313
|
+
"../../../node_modules/.pnpm/string-width@4.2.3/node_modules/string-width/index.js": function(module, __unused_webpack_exports, __webpack_require__) {
|
|
2314
|
+
"use strict";
|
|
2315
|
+
const stripAnsi = __webpack_require__("../../../node_modules/.pnpm/strip-ansi@6.0.1/node_modules/strip-ansi/index.js");
|
|
2316
|
+
const isFullwidthCodePoint = __webpack_require__("../../../node_modules/.pnpm/is-fullwidth-code-point@3.0.0/node_modules/is-fullwidth-code-point/index.js");
|
|
2317
|
+
const emojiRegex = __webpack_require__("../../../node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/index.js");
|
|
2318
|
+
const stringWidth = (string)=>{
|
|
2319
|
+
if ('string' != typeof string || 0 === string.length) return 0;
|
|
2320
|
+
string = stripAnsi(string);
|
|
2321
|
+
if (0 === string.length) return 0;
|
|
2322
|
+
string = string.replace(emojiRegex(), ' ');
|
|
2323
|
+
let width = 0;
|
|
2324
|
+
for(let i = 0; i < string.length; i++){
|
|
2325
|
+
const code = string.codePointAt(i);
|
|
2326
|
+
// Ignore control characters
|
|
2327
|
+
if (code <= 0x1F || code >= 0x7F && code <= 0x9F) continue;
|
|
2328
|
+
// Ignore combining characters
|
|
2329
|
+
if (!(code >= 0x300) || !(code <= 0x36F)) {
|
|
2330
|
+
// Surrogates
|
|
2331
|
+
if (code > 0xFFFF) i++;
|
|
2332
|
+
width += isFullwidthCodePoint(code) ? 2 : 1;
|
|
2333
|
+
}
|
|
2334
|
+
}
|
|
2335
|
+
return width;
|
|
2336
|
+
};
|
|
2337
|
+
module.exports = stringWidth;
|
|
2338
|
+
// TODO: remove this in the next major version
|
|
2339
|
+
module.exports["default"] = stringWidth;
|
|
2340
|
+
},
|
|
2341
|
+
"../../../node_modules/.pnpm/strip-ansi@6.0.1/node_modules/strip-ansi/index.js": function(module, __unused_webpack_exports, __webpack_require__) {
|
|
2342
|
+
"use strict";
|
|
2343
|
+
const ansiRegex = __webpack_require__("../../../node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/index.js");
|
|
2344
|
+
module.exports = (string)=>'string' == typeof string ? string.replace(ansiRegex(), '') : string;
|
|
2345
|
+
}
|
|
2346
|
+
};
|
|
2347
|
+
|
|
2348
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
2349
|
+
0 && (module.exports = { webpackProvider: exports.webpackProvider });
|