@rsbuild/webpack 1.1.0 → 1.1.2

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/997.cjs CHANGED
@@ -1,95 +1,44 @@
1
1
  exports.ids = [
2
2
  '997'
3
- ];
4
- exports.modules = {
3
+ ], exports.modules = {
5
4
  "../../../node_modules/.pnpm/ansi-escapes@4.3.2/node_modules/ansi-escapes/index.js": function(module) {
6
5
  "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;
6
+ let ansiEscapes = module.exports;
7
+ module.exports.default = ansiEscapes;
8
+ let isTerminalApp = 'Apple_Terminal' === process.env.TERM_PROGRAM;
15
9
  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');
10
+ if ('number' != typeof x) throw TypeError('The `x` argument is required');
11
+ return 'number' != typeof y ? '\u001B[' + (x + 1) + 'G' : '\u001B[' + (y + 1) + ';' + (x + 1) + 'H';
12
+ }, ansiEscapes.cursorMove = (x, y)=>{
13
+ if ('number' != typeof x) throw TypeError('The `x` argument is required');
22
14
  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)=>{
15
+ return x < 0 ? ret += '\u001B[' + -x + 'D' : x > 0 && (ret += '\u001B[' + x + 'C'), y < 0 ? ret += '\u001B[' + -y + 'A' : y > 0 && (ret += '\u001B[' + y + 'B'), ret;
16
+ }, ansiEscapes.cursorUp = (count = 1)=>'\u001B[' + count + 'A', ansiEscapes.cursorDown = (count = 1)=>'\u001B[' + count + 'B', ansiEscapes.cursorForward = (count = 1)=>'\u001B[' + count + 'C', ansiEscapes.cursorBackward = (count = 1)=>'\u001B[' + count + 'D', ansiEscapes.cursorLeft = "\x1b[G", ansiEscapes.cursorSavePosition = isTerminalApp ? '\u001B7' : "\x1b[s", ansiEscapes.cursorRestorePosition = isTerminalApp ? '\u001B8' : "\x1b[u", ansiEscapes.cursorGetPosition = "\x1b[6n", ansiEscapes.cursorNextLine = "\x1b[E", ansiEscapes.cursorPrevLine = "\x1b[F", ansiEscapes.cursorHide = "\x1b[?25l", ansiEscapes.cursorShow = "\x1b[?25h", ansiEscapes.eraseLines = (count)=>{
42
17
  let clear = '';
43
18
  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,
19
+ return count && (clear += ansiEscapes.cursorLeft), clear;
20
+ }, ansiEscapes.eraseEndLine = "\x1b[K", ansiEscapes.eraseStartLine = "\x1b[1K", ansiEscapes.eraseLine = "\x1b[2K", ansiEscapes.eraseDown = "\x1b[J", ansiEscapes.eraseUp = "\x1b[1J", ansiEscapes.eraseScreen = "\x1b[2J", ansiEscapes.scrollUp = "\x1b[S", ansiEscapes.scrollDown = "\x1b[T", ansiEscapes.clearScreen = '\u001Bc', ansiEscapes.clearTerminal = 'win32' === process.platform ? `${ansiEscapes.eraseScreen}\u001B[0f` : `${ansiEscapes.eraseScreen}\u001B[3J\u001B[H`, ansiEscapes.beep = '\u0007', ansiEscapes.link = (text, url)=>[
21
+ '\u001B]',
64
22
  '8',
65
- SEP,
66
- SEP,
23
+ ';',
24
+ ';',
67
25
  url,
68
- BEL,
26
+ '\u0007',
69
27
  text,
70
- OSC,
28
+ '\u001B]',
71
29
  '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}`,
30
+ ';',
31
+ ';',
32
+ '\u0007'
33
+ ].join(''), ansiEscapes.image = (buffer, options = {})=>{
34
+ let ret = `\u001B]1337;File=inline=1`;
35
+ return options.width && (ret += `;width=${options.width}`), options.height && (ret += `;height=${options.height}`), !1 === options.preserveAspectRatio && (ret += ';preserveAspectRatio=0'), ret + ':' + buffer.toString('base64') + '\u0007';
36
+ }, ansiEscapes.iTerm = {
37
+ setCwd: (cwd = process.cwd())=>`\u001B]50;CurrentDir=${cwd}\u0007`,
85
38
  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 ? [
39
+ let ret = `\u001B]1337;`, hasX = void 0 !== options.x, hasY = void 0 !== options.y;
40
+ if ((hasX || hasY) && !(hasX && hasY && void 0 !== options.length)) throw Error('`x`, `y` and `length` must be defined when `x` or `y` is defined');
41
+ return message = message.replace(/\|/g, ''), ret += options.isHidden ? 'AddHiddenAnnotation=' : 'AddAnnotation=', options.length > 0 ? ret += (hasX ? [
93
42
  message,
94
43
  options.length,
95
44
  options.x,
@@ -97,289 +46,249 @@ exports.modules = {
97
46
  ] : [
98
47
  options.length,
99
48
  message
100
- ]).join('|');
101
- else ret += message;
102
- return ret + BEL;
49
+ ]).join('|') : ret += message, ret + '\u0007';
103
50
  }
104
51
  };
105
52
  },
106
53
  "../../../node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/index.js": function(module) {
107
54
  "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
- };
55
+ module.exports = ({ onlyFirst = !1 } = {})=>RegExp("[\\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=><~]))", onlyFirst ? void 0 : 'g');
112
56
  },
113
57
  "../../../node_modules/.pnpm/ansi-styles@4.3.0/node_modules/ansi-styles/index.js": function(module, __unused_webpack_exports, __webpack_require__) {
114
58
  "use strict";
115
- /* module decorator */ module = __webpack_require__.nmd(module);
116
- const wrapAnsi16 = (fn, offset)=>(...args)=>{
117
- const code = fn(...args);
59
+ let colorConvert;
60
+ module = __webpack_require__.nmd(module);
61
+ let wrapAnsi16 = (fn, offset)=>(...args)=>{
62
+ let code = fn(...args);
118
63
  return `\u001B[${code + offset}m`;
119
- };
120
- const wrapAnsi256 = (fn, offset)=>(...args)=>{
121
- const code = fn(...args);
64
+ }, wrapAnsi256 = (fn, offset)=>(...args)=>{
65
+ let code = fn(...args);
122
66
  return `\u001B[${38 + offset};5;${code}m`;
123
- };
124
- const wrapAnsi16m = (fn, offset)=>(...args)=>{
125
- const rgb = fn(...args);
67
+ }, wrapAnsi16m = (fn, offset)=>(...args)=>{
68
+ let rgb = fn(...args);
126
69
  return `\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;
127
- };
128
- const ansi2ansi = (n)=>n;
129
- const rgb2rgb = (r, g, b)=>[
70
+ }, ansi2ansi = (n)=>n, rgb2rgb = (r, g, b)=>[
130
71
  r,
131
72
  g,
132
73
  b
133
- ];
134
- const setLazyProperty = (object, property, get)=>{
74
+ ], setLazyProperty = (object, property, get)=>{
135
75
  Object.defineProperty(object, property, {
136
76
  get: ()=>{
137
- const value = get();
138
- Object.defineProperty(object, property, {
77
+ let value = get();
78
+ return Object.defineProperty(object, property, {
139
79
  value,
140
- enumerable: true,
141
- configurable: true
142
- });
143
- return value;
80
+ enumerable: !0,
81
+ configurable: !0
82
+ }), value;
144
83
  },
145
- enumerable: true,
146
- configurable: true
84
+ enumerable: !0,
85
+ configurable: !0
147
86
  });
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);
87
+ }, makeDynamicStyles = (wrap, targetSpace, identity, isBackground)=>{
88
+ void 0 === colorConvert && (colorConvert = __webpack_require__("../../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/index.js"));
89
+ let offset = isBackground ? 10 : 0, styles = {};
90
+ for (let [sourceSpace, suite] of Object.entries(colorConvert)){
91
+ let name = 'ansi16' === sourceSpace ? 'ansi' : sourceSpace;
92
+ sourceSpace === targetSpace ? styles[name] = wrap(identity, offset) : 'object' == typeof suite && (styles[name] = wrap(suite[targetSpace], offset));
158
93
  }
159
94
  return styles;
160
95
  };
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] = {
96
+ Object.defineProperty(module, 'exports', {
97
+ enumerable: !0,
98
+ get: function() {
99
+ let codes = new Map(), styles = {
100
+ modifier: {
101
+ reset: [
102
+ 0,
103
+ 0
104
+ ],
105
+ bold: [
106
+ 1,
107
+ 22
108
+ ],
109
+ dim: [
110
+ 2,
111
+ 22
112
+ ],
113
+ italic: [
114
+ 3,
115
+ 23
116
+ ],
117
+ underline: [
118
+ 4,
119
+ 24
120
+ ],
121
+ inverse: [
122
+ 7,
123
+ 27
124
+ ],
125
+ hidden: [
126
+ 8,
127
+ 28
128
+ ],
129
+ strikethrough: [
130
+ 9,
131
+ 29
132
+ ]
133
+ },
134
+ color: {
135
+ black: [
136
+ 30,
137
+ 39
138
+ ],
139
+ red: [
140
+ 31,
141
+ 39
142
+ ],
143
+ green: [
144
+ 32,
145
+ 39
146
+ ],
147
+ yellow: [
148
+ 33,
149
+ 39
150
+ ],
151
+ blue: [
152
+ 34,
153
+ 39
154
+ ],
155
+ magenta: [
156
+ 35,
157
+ 39
158
+ ],
159
+ cyan: [
160
+ 36,
161
+ 39
162
+ ],
163
+ white: [
164
+ 37,
165
+ 39
166
+ ],
167
+ blackBright: [
168
+ 90,
169
+ 39
170
+ ],
171
+ redBright: [
172
+ 91,
173
+ 39
174
+ ],
175
+ greenBright: [
176
+ 92,
177
+ 39
178
+ ],
179
+ yellowBright: [
180
+ 93,
181
+ 39
182
+ ],
183
+ blueBright: [
184
+ 94,
185
+ 39
186
+ ],
187
+ magentaBright: [
188
+ 95,
189
+ 39
190
+ ],
191
+ cyanBright: [
192
+ 96,
193
+ 39
194
+ ],
195
+ whiteBright: [
196
+ 97,
197
+ 39
198
+ ]
199
+ },
200
+ bgColor: {
201
+ bgBlack: [
202
+ 40,
203
+ 49
204
+ ],
205
+ bgRed: [
206
+ 41,
207
+ 49
208
+ ],
209
+ bgGreen: [
210
+ 42,
211
+ 49
212
+ ],
213
+ bgYellow: [
214
+ 43,
215
+ 49
216
+ ],
217
+ bgBlue: [
218
+ 44,
219
+ 49
220
+ ],
221
+ bgMagenta: [
222
+ 45,
223
+ 49
224
+ ],
225
+ bgCyan: [
226
+ 46,
227
+ 49
228
+ ],
229
+ bgWhite: [
230
+ 47,
231
+ 49
232
+ ],
233
+ bgBlackBright: [
234
+ 100,
235
+ 49
236
+ ],
237
+ bgRedBright: [
238
+ 101,
239
+ 49
240
+ ],
241
+ bgGreenBright: [
242
+ 102,
243
+ 49
244
+ ],
245
+ bgYellowBright: [
246
+ 103,
247
+ 49
248
+ ],
249
+ bgBlueBright: [
250
+ 104,
251
+ 49
252
+ ],
253
+ bgMagentaBright: [
254
+ 105,
255
+ 49
256
+ ],
257
+ bgCyanBright: [
258
+ 106,
259
+ 49
260
+ ],
261
+ bgWhiteBright: [
262
+ 107,
263
+ 49
264
+ ]
265
+ }
266
+ };
267
+ for (let [groupName, group] of (styles.color.gray = styles.color.blackBright, styles.bgColor.bgGray = styles.bgColor.bgBlackBright, styles.color.grey = styles.color.blackBright, styles.bgColor.bgGrey = styles.bgColor.bgBlackBright, Object.entries(styles))){
268
+ for (let [styleName, style] of Object.entries(group))styles[styleName] = {
342
269
  open: `\u001B[${style[0]}m`,
343
270
  close: `\u001B[${style[1]}m`
344
- };
345
- group[styleName] = styles[styleName];
346
- codes.set(style[0], style[1]);
271
+ }, group[styleName] = styles[styleName], codes.set(style[0], style[1]);
272
+ Object.defineProperty(styles, groupName, {
273
+ value: group,
274
+ enumerable: !1
275
+ });
347
276
  }
348
- Object.defineProperty(styles, groupName, {
349
- value: group,
350
- enumerable: false
351
- });
277
+ return Object.defineProperty(styles, 'codes', {
278
+ value: codes,
279
+ enumerable: !1
280
+ }), styles.color.close = '\u001B[39m', styles.bgColor.close = '\u001B[49m', setLazyProperty(styles.color, 'ansi', ()=>makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, !1)), setLazyProperty(styles.color, 'ansi256', ()=>makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, !1)), setLazyProperty(styles.color, 'ansi16m', ()=>makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, !1)), setLazyProperty(styles.bgColor, 'ansi', ()=>makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, !0)), setLazyProperty(styles.bgColor, 'ansi256', ()=>makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, !0)), setLazyProperty(styles.bgColor, 'ansi16m', ()=>makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, !0)), styles;
352
281
  }
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
282
  });
372
283
  },
373
284
  "../../../node_modules/.pnpm/astral-regex@2.0.0/node_modules/astral-regex/index.js": function(module) {
374
285
  "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;
286
+ let regex = '[\uD800-\uDBFF][\uDC00-\uDFFF]';
287
+ module.exports = (options)=>options && options.exact ? RegExp(`^${regex}$`) : RegExp(regex, 'g');
378
288
  },
379
289
  "../../../node_modules/.pnpm/cli-truncate@2.1.0/node_modules/cli-truncate/index.js": function(module, __unused_webpack_exports, __webpack_require__) {
380
290
  "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");
291
+ let sliceAnsi = __webpack_require__("../../../node_modules/.pnpm/slice-ansi@3.0.0/node_modules/slice-ansi/index.js"), stringWidth = __webpack_require__("../../../node_modules/.pnpm/string-width@4.2.3/node_modules/string-width/index.js");
383
292
  function getIndexOfNearestSpace(string, index, shouldSearchRight) {
384
293
  if (' ' === string.charAt(index)) return index;
385
294
  for(let i = 1; i <= 3; i++)if (shouldSearchRight) {
@@ -388,66 +297,47 @@ exports.modules = {
388
297
  return index;
389
298
  }
390
299
  module.exports = (text, columns, options)=>{
391
- options = {
300
+ let { position, space, preferTruncationOnSpace } = options = {
392
301
  position: 'end',
393
- preferTruncationOnSpace: false,
302
+ preferTruncationOnSpace: !1,
394
303
  ...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}`);
304
+ }, ellipsis = '…', ellipsisWidth = 1;
305
+ if ('string' != typeof text) throw TypeError(`Expected \`input\` to be a string, got ${typeof text}`);
306
+ if ('number' != typeof columns) throw TypeError(`Expected \`columns\` to be a number, got ${typeof columns}`);
401
307
  if (columns < 1) return '';
402
308
  if (1 === columns) return ellipsis;
403
- const length = stringWidth(text);
309
+ let length = stringWidth(text);
404
310
  if (length <= columns) return text;
405
311
  if ('start' === position) {
406
312
  if (preferTruncationOnSpace) {
407
- const nearestSpace = getIndexOfNearestSpace(text, length - columns + 1, true);
313
+ let nearestSpace = getIndexOfNearestSpace(text, length - columns + 1, !0);
408
314
  return ellipsis + sliceAnsi(text, nearestSpace, length).trim();
409
315
  }
410
- if (true === space) {
411
- ellipsis += ' ';
412
- ellipsisWidth = 2;
413
- }
414
- return ellipsis + sliceAnsi(text, length - columns + ellipsisWidth, length);
316
+ return !0 === space && (ellipsis += ' ', ellipsisWidth = 2), ellipsis + sliceAnsi(text, length - columns + ellipsisWidth, length);
415
317
  }
416
318
  if ('middle' === position) {
417
- if (true === space) {
418
- ellipsis = ' ' + ellipsis + ' ';
419
- ellipsisWidth = 3;
420
- }
421
- const half = Math.floor(columns / 2);
319
+ !0 === space && (ellipsis = ' ' + ellipsis + ' ', ellipsisWidth = 3);
320
+ let half = Math.floor(columns / 2);
422
321
  if (preferTruncationOnSpace) {
423
- const spaceNearFirstBreakPoint = getIndexOfNearestSpace(text, half);
424
- const spaceNearSecondBreakPoint = getIndexOfNearestSpace(text, length - (columns - half) + 1, true);
322
+ let spaceNearFirstBreakPoint = getIndexOfNearestSpace(text, half), spaceNearSecondBreakPoint = getIndexOfNearestSpace(text, length - (columns - half) + 1, !0);
425
323
  return sliceAnsi(text, 0, spaceNearFirstBreakPoint) + ellipsis + sliceAnsi(text, spaceNearSecondBreakPoint, length).trim();
426
324
  }
427
325
  return sliceAnsi(text, 0, half) + ellipsis + sliceAnsi(text, length - (columns - half) + ellipsisWidth, length);
428
326
  }
429
327
  if ('end' === position) {
430
328
  if (preferTruncationOnSpace) {
431
- const nearestSpace = getIndexOfNearestSpace(text, columns - 1);
329
+ let nearestSpace = getIndexOfNearestSpace(text, columns - 1);
432
330
  return sliceAnsi(text, 0, nearestSpace) + ellipsis;
433
331
  }
434
- if (true === space) {
435
- ellipsis = ' ' + ellipsis;
436
- ellipsisWidth = 2;
437
- }
438
- return sliceAnsi(text, 0, columns - ellipsisWidth) + ellipsis;
332
+ return !0 === space && (ellipsis = ' ' + ellipsis, ellipsisWidth = 2), sliceAnsi(text, 0, columns - ellipsisWidth) + ellipsis;
439
333
  }
440
- throw new Error(`Expected \`options.position\` to be either \`start\`, \`middle\` or \`end\`, got ${position}`);
334
+ throw Error(`Expected \`options.position\` to be either \`start\`, \`middle\` or \`end\`, got ${position}`);
441
335
  };
442
336
  },
443
337
  "../../../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 = {
338
+ let cssKeywords = __webpack_require__("../../../node_modules/.pnpm/color-name@1.1.4/node_modules/color-name/index.js"), reverseKeywords = {};
339
+ for (let key of Object.keys(cssKeywords))reverseKeywords[cssKeywords[key]] = key;
340
+ let convert = {
451
341
  rgb: {
452
342
  channels: 3,
453
343
  labels: 'rgb'
@@ -527,228 +417,109 @@ exports.modules = {
527
417
  ]
528
418
  }
529
419
  };
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', {
420
+ for (let model of (module.exports = convert, Object.keys(convert))){
421
+ if (!('channels' in convert[model])) throw Error('missing channels property: ' + model);
422
+ if (!('labels' in convert[model])) throw Error('missing channel labels property: ' + model);
423
+ if (convert[model].labels.length !== convert[model].channels) throw Error('channel and label counts mismatch: ' + model);
424
+ let { channels, labels } = convert[model];
425
+ delete convert[model].channels, delete convert[model].labels, Object.defineProperty(convert[model], 'channels', {
540
426
  value: channels
541
- });
542
- Object.defineProperty(convert[model], 'labels', {
427
+ }), Object.defineProperty(convert[model], 'labels', {
543
428
  value: labels
544
429
  });
545
430
  }
546
431
  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);
432
+ let h, s;
433
+ let r = rgb[0] / 255, g = rgb[1] / 255, b = rgb[2] / 255, min = Math.min(r, g, b), max = Math.max(r, g, b), delta = max - min;
434
+ max === min ? h = 0 : r === max ? h = (g - b) / delta : g === max ? h = 2 + (b - r) / delta : b === max && (h = 4 + (r - g) / delta), (h = Math.min(60 * h, 360)) < 0 && (h += 360);
435
+ let l = (min + max) / 2;
563
436
  return [
564
437
  h,
565
- 100 * s,
438
+ 100 * (s = max === min ? 0 : l <= 0.5 ? delta / (max + min) : delta / (2 - max - min)),
566
439
  100 * l
567
440
  ];
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) {
441
+ }, convert.rgb.hsv = function(rgb) {
442
+ let rdif, gdif, bdif, h, s;
443
+ let r = rgb[0] / 255, g = rgb[1] / 255, b = rgb[2] / 255, v = Math.max(r, g, b), diff = v - Math.min(r, g, b), diffc = function(c) {
581
444
  return (v - c) / 6 / diff + 0.5;
582
445
  };
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 [
446
+ return 0 === diff ? (h = 0, s = 0) : (s = diff / v, rdif = diffc(r), gdif = diffc(g), bdif = diffc(b), r === v ? h = bdif - gdif : g === v ? h = 1 / 3 + rdif - bdif : b === v && (h = 2 / 3 + gdif - rdif), h < 0 ? h += 1 : h > 1 && (h -= 1)), [
598
447
  360 * h,
599
448
  100 * s,
600
449
  100 * v
601
450
  ];
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));
451
+ }, convert.rgb.hwb = function(rgb) {
452
+ let r = rgb[0], g = rgb[1], b = rgb[2], h = convert.rgb.hsl(rgb)[0];
610
453
  return [
611
454
  h,
612
- 100 * w,
613
- 100 * b
455
+ 1 / 255 * Math.min(r, Math.min(g, b)) * 100,
456
+ 100 * (b = 1 - 1 / 255 * Math.max(r, Math.max(g, b)))
614
457
  ];
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;
458
+ }, convert.rgb.cmyk = function(rgb) {
459
+ let r = rgb[0] / 255, g = rgb[1] / 255, b = rgb[2] / 255, k = Math.min(1 - r, 1 - g, 1 - b);
624
460
  return [
625
- 100 * c,
626
- 100 * m,
627
- 100 * y,
461
+ 100 * ((1 - r - k) / (1 - k) || 0),
462
+ 100 * ((1 - g - k) / (1 - k) || 0),
463
+ 100 * ((1 - b - k) / (1 - k) || 0),
628
464
  100 * k
629
465
  ];
630
466
  };
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
467
  convert.rgb.keyword = function(rgb) {
637
- const reversed = reverseKeywords[rgb];
468
+ let currentClosestKeyword;
469
+ let reversed = reverseKeywords[rgb];
638
470
  if (reversed) return reversed;
639
471
  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
- }
472
+ for (let keyword of Object.keys(cssKeywords)){
473
+ var x, y;
474
+ let value = cssKeywords[keyword];
475
+ let distance = (x = rgb, y = value, (x[0] - y[0]) ** 2 + (x[1] - y[1]) ** 2 + (x[2] - y[2]) ** 2);
476
+ distance < currentClosestDistance && (currentClosestDistance = distance, currentClosestKeyword = keyword);
650
477
  }
651
478
  return currentClosestKeyword;
652
- };
653
- convert.keyword.rgb = function(keyword) {
479
+ }, convert.keyword.rgb = function(keyword) {
654
480
  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;
481
+ }, convert.rgb.xyz = function(rgb) {
482
+ let r = rgb[0] / 255, g = rgb[1] / 255, b = rgb[2] / 255;
667
483
  return [
668
- 100 * x,
669
- 100 * y,
670
- 100 * z
484
+ 100 * (0.4124 * (r = r > 0.04045 ? ((r + 0.055) / 1.055) ** 2.4 : r / 12.92) + 0.3576 * (g = g > 0.04045 ? ((g + 0.055) / 1.055) ** 2.4 : g / 12.92) + 0.1805 * (b = b > 0.04045 ? ((b + 0.055) / 1.055) ** 2.4 : b / 12.92)),
485
+ 100 * (0.2126 * r + 0.7152 * g + 0.0722 * b),
486
+ 100 * (0.0193 * r + 0.1192 * g + 0.9505 * b)
671
487
  ];
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
488
+ }, convert.rgb.lab = function(rgb) {
489
+ let xyz = convert.rgb.xyz(rgb), x = xyz[0], y = xyz[1], z = xyz[2];
490
+ return x /= 95.047, y /= 100, z /= 108.883, [
491
+ 116 * (y = y > 0.008856 ? y ** (1 / 3) : 7.787 * y + 16 / 116) - 16,
492
+ 500 * ((x = x > 0.008856 ? x ** (1 / 3) : 7.787 * x + 16 / 116) - y),
493
+ 200 * (y - (z = z > 0.008856 ? z ** (1 / 3) : 7.787 * z + 16 / 116))
494
+ ];
495
+ }, convert.hsl.rgb = function(hsl) {
496
+ let t2, t3, val;
497
+ let h = hsl[0] / 360, s = hsl[1] / 100, l = hsl[2] / 100;
498
+ if (0 === s) return [
499
+ val = 255 * l,
500
+ val,
501
+ val
691
502
  ];
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
503
  t2 = l < 0.5 ? l * (1 + s) : l + s - l * s;
709
- const t1 = 2 * l - t2;
710
- const rgb = [
504
+ let t1 = 2 * l - t2, rgb = [
711
505
  0,
712
506
  0,
713
507
  0
714
508
  ];
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
- }
509
+ for(let i = 0; i < 3; i++)(t3 = h + -(1 / 3 * (i - 1))) < 0 && t3++, t3 > 1 && t3--, val = 6 * t3 < 1 ? t1 + (t2 - t1) * 6 * t3 : 2 * t3 < 1 ? t2 : 3 * t3 < 2 ? t1 + (t2 - t1) * (2 / 3 - t3) * 6 : t1, rgb[i] = 255 * val;
722
510
  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);
511
+ }, convert.hsl.hsv = function(hsl) {
512
+ let h = hsl[0], s = hsl[1] / 100, l = hsl[2] / 100, smin = s, lmin = Math.max(l, 0.01);
513
+ l *= 2, s *= l <= 1 ? l : 2 - l, smin *= lmin <= 1 ? lmin : 2 - lmin;
514
+ let v = (l + s) / 2;
735
515
  return [
736
516
  h,
737
- 100 * sv,
517
+ 100 * (0 === l ? 2 * smin / (lmin + smin) : 2 * s / (l + s)),
738
518
  100 * v
739
519
  ];
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){
520
+ }, convert.hsv.rgb = function(hsv) {
521
+ let h = hsv[0] / 60, s = hsv[1] / 100, v = hsv[2] / 100, hi = Math.floor(h) % 6, f = h - Math.floor(h), p = 255 * v * (1 - s), q = 255 * v * (1 - s * f), t = 255 * v * (1 - s * (1 - f));
522
+ switch(v *= 255, hi){
752
523
  case 0:
753
524
  return [
754
525
  v,
@@ -786,624 +557,360 @@ exports.modules = {
786
557
  q
787
558
  ];
788
559
  }
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;
560
+ }, convert.hsv.hsl = function(hsv) {
561
+ let sl, l;
562
+ let h = hsv[0], s = hsv[1] / 100, v = hsv[2] / 100, vmin = Math.max(v, 0.01);
797
563
  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 [
564
+ let lmin = (2 - s) * vmin;
565
+ return sl = (sl = s * vmin / (lmin <= 1 ? lmin : 2 - lmin)) || 0, [
804
566
  h,
805
567
  100 * sl,
806
- 100 * l
568
+ 100 * (l /= 2)
807
569
  ];
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){
570
+ }, convert.hwb.rgb = function(hwb) {
571
+ let f, r, g, b;
572
+ let h = hwb[0] / 360, wh = hwb[1] / 100, bl = hwb[2] / 100, ratio = wh + bl;
573
+ ratio > 1 && (wh /= ratio, bl /= ratio);
574
+ let i = Math.floor(6 * h), v = 1 - bl;
575
+ f = 6 * h - i, (0x01 & i) != 0 && (f = 1 - f);
576
+ let n = wh + f * (v - wh);
577
+ switch(i){
830
578
  default:
831
579
  case 6:
832
580
  case 0:
833
- r = v;
834
- g = n;
835
- b = wh;
581
+ r = v, g = n, b = wh;
836
582
  break;
837
583
  case 1:
838
- r = n;
839
- g = v;
840
- b = wh;
584
+ r = n, g = v, b = wh;
841
585
  break;
842
586
  case 2:
843
- r = wh;
844
- g = v;
845
- b = n;
587
+ r = wh, g = v, b = n;
846
588
  break;
847
589
  case 3:
848
- r = wh;
849
- g = n;
850
- b = v;
590
+ r = wh, g = n, b = v;
851
591
  break;
852
592
  case 4:
853
- r = n;
854
- g = wh;
855
- b = v;
593
+ r = n, g = wh, b = v;
856
594
  break;
857
595
  case 5:
858
- r = v;
859
- g = wh;
860
- b = n;
861
- break;
596
+ r = v, g = wh, b = n;
862
597
  }
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
598
  return [
878
599
  255 * r,
879
600
  255 * g,
880
601
  255 * b
881
602
  ];
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);
603
+ }, convert.cmyk.rgb = function(cmyk) {
604
+ let c = cmyk[0] / 100, m = cmyk[1] / 100, y = cmyk[2] / 100, k = cmyk[3] / 100;
900
605
  return [
901
- 255 * r,
902
- 255 * g,
903
- 255 * b
606
+ 255 * (1 - Math.min(1, c * (1 - k) + k)),
607
+ 255 * (1 - Math.min(1, m * (1 - k) + k)),
608
+ 255 * (1 - Math.min(1, y * (1 - k) + k))
904
609
  ];
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
610
+ }, convert.xyz.rgb = function(xyz) {
611
+ let r, g, b;
612
+ let x = xyz[0] / 100, y = xyz[1] / 100, z = xyz[2] / 100;
613
+ return r = (r = 3.2406 * x + -1.5372 * y + -0.4986 * z) > 0.0031308 ? 1.055 * r ** (1.0 / 2.4) - 0.055 : 12.92 * r, g = (g = -0.9689 * x + 1.8758 * y + 0.0415 * z) > 0.0031308 ? 1.055 * g ** (1.0 / 2.4) - 0.055 : 12.92 * g, b = (b = 0.0557 * x + -0.204 * y + 1.0570 * z) > 0.0031308 ? 1.055 * b ** (1.0 / 2.4) - 0.055 : 12.92 * b, [
614
+ 255 * (r = Math.min(Math.max(0, r), 1)),
615
+ 255 * (g = Math.min(Math.max(0, g), 1)),
616
+ 255 * (b = Math.min(Math.max(0, b), 1))
923
617
  ];
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,
618
+ }, convert.xyz.lab = function(xyz) {
619
+ let x = xyz[0], y = xyz[1], z = xyz[2];
620
+ return x /= 95.047, y /= 100, z /= 108.883, [
621
+ 116 * (y = y > 0.008856 ? y ** (1 / 3) : 7.787 * y + 16 / 116) - 16,
622
+ 500 * ((x = x > 0.008856 ? x ** (1 / 3) : 7.787 * x + 16 / 116) - y),
623
+ 200 * (y - (z = z > 0.008856 ? z ** (1 / 3) : 7.787 * z + 16 / 116))
624
+ ];
625
+ }, convert.lab.xyz = function(lab) {
626
+ let x, y, z;
627
+ let l = lab[0], a = lab[1], b = lab[2];
628
+ x = a / 500 + (y = (l + 16) / 116), z = y - b / 200;
629
+ let y2 = y ** 3, x2 = x ** 3, z2 = z ** 3;
630
+ return y = (y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787) * 100, [
631
+ x = (x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787) * 95.047,
946
632
  y,
947
- z
633
+ z = (z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787) * 108.883
948
634
  ];
949
- };
950
- convert.lab.lch = function(lab) {
951
- const l = lab[0];
952
- const a = lab[1];
953
- const b = lab[2];
635
+ }, convert.lab.lch = function(lab) {
954
636
  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 [
637
+ let l = lab[0], a = lab[1], b = lab[2];
638
+ return (h = 360 * Math.atan2(b, a) / 2 / Math.PI) < 0 && (h += 360), [
960
639
  l,
961
- c,
640
+ Math.sqrt(a * a + b * b),
962
641
  h
963
642
  ];
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);
643
+ }, convert.lch.lab = function(lch) {
644
+ let l = lch[0], c = lch[1], hr = lch[2] / 360 * 2 * Math.PI;
972
645
  return [
973
646
  l,
974
- a,
975
- b
647
+ c * Math.cos(hr),
648
+ c * Math.sin(hr)
976
649
  ];
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;
650
+ }, convert.rgb.ansi16 = function(args, saturation = null) {
651
+ let [r, g, b] = args, value = null === saturation ? convert.rgb.hsv(args)[2] : saturation;
652
+ if (0 === (value = Math.round(value / 50))) return 30;
983
653
  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.
654
+ return 2 === value && (ansi += 60), ansi;
655
+ }, convert.hsv.ansi16 = function(args) {
990
656
  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) {
657
+ }, convert.rgb.ansi256 = function(args) {
658
+ let r = args[0], g = args[1], b = args[2];
659
+ if (r === g && g === b) return r < 8 ? 16 : r > 248 ? 231 : Math.round((r - 8) / 247 * 24) + 232;
660
+ return 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5);
661
+ }, convert.ansi16.rgb = function(args) {
1007
662
  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;
663
+ if (0 === color || 7 === color) return args > 50 && (color += 3.5), [
664
+ color = color / 10.5 * 255,
665
+ color,
666
+ color
667
+ ];
668
+ let mult = (~~(args > 50) + 1) * 0.5;
1022
669
  return [
1023
- r,
1024
- g,
1025
- b
670
+ (1 & color) * mult * 255,
671
+ (color >> 1 & 1) * mult * 255,
672
+ (color >> 2 & 1) * mult * 255
1026
673
  ];
1027
- };
1028
- convert.ansi256.rgb = function(args) {
1029
- // Handle greyscale
674
+ }, convert.ansi256.rgb = function(args) {
675
+ let rem;
1030
676
  if (args >= 232) {
1031
- const c = (args - 232) * 10 + 8;
677
+ let c = (args - 232) * 10 + 8;
1032
678
  return [
1033
679
  c,
1034
680
  c,
1035
681
  c
1036
682
  ];
1037
683
  }
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;
684
+ let r = Math.floor((args -= 16) / 36) / 5 * 255, g = Math.floor((rem = args % 36) / 6) / 5 * 255;
1043
685
  return [
1044
686
  r,
1045
687
  g,
1046
- b
688
+ rem % 6 / 5 * 255
1047
689
  ];
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();
690
+ }, convert.rgb.hex = function(args) {
691
+ let string = (((0xFF & Math.round(args[0])) << 16) + ((0xFF & Math.round(args[1])) << 8) + (0xFF & Math.round(args[2]))).toString(16).toUpperCase();
1052
692
  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);
693
+ }, convert.hex.rgb = function(args) {
694
+ let match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
1056
695
  if (!match) return [
1057
696
  0,
1058
697
  0,
1059
698
  0
1060
699
  ];
1061
700
  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;
701
+ 3 === match[0].length && (colorString = colorString.split('').map((char)=>char + char).join(''));
702
+ let integer = parseInt(colorString, 16);
1067
703
  return [
1068
- r,
1069
- g,
1070
- b
704
+ integer >> 16 & 0xFF,
705
+ integer >> 8 & 0xFF,
706
+ 0xFF & integer
1071
707
  ];
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,
708
+ }, convert.rgb.hcg = function(rgb) {
709
+ let grayscale, hue;
710
+ let r = rgb[0] / 255, g = rgb[1] / 255, b = rgb[2] / 255, max = Math.max(Math.max(r, g), b), min = Math.min(Math.min(r, g), b), chroma = max - min;
711
+ return grayscale = chroma < 1 ? min / (1 - chroma) : 0, [
712
+ 360 * (hue = (chroma <= 0 ? 0 : max === r ? (g - b) / chroma % 6 : max === g ? 2 + (b - r) / chroma : 4 + (r - g) / chroma) / 6 % 1),
1088
713
  100 * chroma,
1089
714
  100 * grayscale
1090
715
  ];
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 [
716
+ }, convert.hsl.hcg = function(hsl) {
717
+ let s = hsl[1] / 100, l = hsl[2] / 100, c = l < 0.5 ? 2.0 * s * l : 2.0 * s * (1.0 - l), f = 0;
718
+ return c < 1.0 && (f = (l - 0.5 * c) / (1.0 - c)), [
1099
719
  hsl[0],
1100
720
  100 * c,
1101
721
  100 * f
1102
722
  ];
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 [
723
+ }, convert.hsv.hcg = function(hsv) {
724
+ let s = hsv[1] / 100, v = hsv[2] / 100, c = s * v, f = 0;
725
+ return c < 1.0 && (f = (v - c) / (1 - c)), [
1111
726
  hsv[0],
1112
727
  100 * c,
1113
728
  100 * f
1114
729
  ];
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;
730
+ }, convert.hcg.rgb = function(hcg) {
731
+ let h = hcg[0] / 360, c = hcg[1] / 100, g = hcg[2] / 100;
1120
732
  if (0.0 === c) return [
1121
733
  255 * g,
1122
734
  255 * g,
1123
735
  255 * g
1124
736
  ];
1125
- const pure = [
737
+ let pure = [
1126
738
  0,
1127
739
  0,
1128
740
  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)){
741
+ ], hi = h % 1 * 6, v = hi % 1, w = 1 - v, mg = 0;
742
+ switch(Math.floor(hi)){
1135
743
  case 0:
1136
- pure[0] = 1;
1137
- pure[1] = v;
1138
- pure[2] = 0;
744
+ pure[0] = 1, pure[1] = v, pure[2] = 0;
1139
745
  break;
1140
746
  case 1:
1141
- pure[0] = w;
1142
- pure[1] = 1;
1143
- pure[2] = 0;
747
+ pure[0] = w, pure[1] = 1, pure[2] = 0;
1144
748
  break;
1145
749
  case 2:
1146
- pure[0] = 0;
1147
- pure[1] = 1;
1148
- pure[2] = v;
750
+ pure[0] = 0, pure[1] = 1, pure[2] = v;
1149
751
  break;
1150
752
  case 3:
1151
- pure[0] = 0;
1152
- pure[1] = w;
1153
- pure[2] = 1;
753
+ pure[0] = 0, pure[1] = w, pure[2] = 1;
1154
754
  break;
1155
755
  case 4:
1156
- pure[0] = v;
1157
- pure[1] = 0;
1158
- pure[2] = 1;
756
+ pure[0] = v, pure[1] = 0, pure[2] = 1;
1159
757
  break;
1160
758
  default:
1161
- pure[0] = 1;
1162
- pure[1] = 0;
1163
- pure[2] = w;
759
+ pure[0] = 1, pure[1] = 0, pure[2] = w;
1164
760
  }
1165
- /* eslint-enable max-statements-per-line */ mg = (1.0 - c) * g;
1166
- return [
761
+ return mg = (1.0 - c) * g, [
1167
762
  (c * pure[0] + mg) * 255,
1168
763
  (c * pure[1] + mg) * 255,
1169
764
  (c * pure[2] + mg) * 255
1170
765
  ];
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 [
766
+ }, convert.hcg.hsv = function(hcg) {
767
+ let c = hcg[1] / 100, v = c + hcg[2] / 100 * (1.0 - c), f = 0;
768
+ return v > 0.0 && (f = c / v), [
1179
769
  hcg[0],
1180
770
  100 * f,
1181
771
  100 * v
1182
772
  ];
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 [
773
+ }, convert.hcg.hsl = function(hcg) {
774
+ let c = hcg[1] / 100, l = hcg[2] / 100 * (1.0 - c) + 0.5 * c, s = 0;
775
+ return l > 0.0 && l < 0.5 ? s = c / (2 * l) : l >= 0.5 && l < 1.0 && (s = c / (2 * (1 - l))), [
1192
776
  hcg[0],
1193
777
  100 * s,
1194
778
  100 * l
1195
779
  ];
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);
780
+ }, convert.hcg.hwb = function(hcg) {
781
+ let c = hcg[1] / 100, v = c + hcg[2] / 100 * (1.0 - c);
1201
782
  return [
1202
783
  hcg[0],
1203
784
  (v - c) * 100,
1204
785
  (1 - v) * 100
1205
786
  ];
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 [
787
+ }, convert.hwb.hcg = function(hwb) {
788
+ let w = hwb[1] / 100, v = 1 - hwb[2] / 100, c = v - w, g = 0;
789
+ return c < 1 && (g = (v - c) / (1 - c)), [
1215
790
  hwb[0],
1216
791
  100 * c,
1217
792
  100 * g
1218
793
  ];
1219
- };
1220
- convert.apple.rgb = function(apple) {
794
+ }, convert.apple.rgb = function(apple) {
1221
795
  return [
1222
796
  apple[0] / 65535 * 255,
1223
797
  apple[1] / 65535 * 255,
1224
798
  apple[2] / 65535 * 255
1225
799
  ];
1226
- };
1227
- convert.rgb.apple = function(rgb) {
800
+ }, convert.rgb.apple = function(rgb) {
1228
801
  return [
1229
802
  rgb[0] / 255 * 65535,
1230
803
  rgb[1] / 255 * 65535,
1231
804
  rgb[2] / 255 * 65535
1232
805
  ];
1233
- };
1234
- convert.gray.rgb = function(args) {
806
+ }, convert.gray.rgb = function(args) {
1235
807
  return [
1236
808
  args[0] / 100 * 255,
1237
809
  args[0] / 100 * 255,
1238
810
  args[0] / 100 * 255
1239
811
  ];
1240
- };
1241
- convert.gray.hsl = function(args) {
812
+ }, convert.gray.hsl = function(args) {
1242
813
  return [
1243
814
  0,
1244
815
  0,
1245
816
  args[0]
1246
817
  ];
1247
- };
1248
- convert.gray.hsv = convert.gray.hsl;
1249
- convert.gray.hwb = function(gray) {
818
+ }, convert.gray.hsv = convert.gray.hsl, convert.gray.hwb = function(gray) {
1250
819
  return [
1251
820
  0,
1252
821
  100,
1253
822
  gray[0]
1254
823
  ];
1255
- };
1256
- convert.gray.cmyk = function(gray) {
824
+ }, convert.gray.cmyk = function(gray) {
1257
825
  return [
1258
826
  0,
1259
827
  0,
1260
828
  0,
1261
829
  gray[0]
1262
830
  ];
1263
- };
1264
- convert.gray.lab = function(gray) {
831
+ }, convert.gray.lab = function(gray) {
1265
832
  return [
1266
833
  gray[0],
1267
834
  0,
1268
835
  0
1269
836
  ];
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();
837
+ }, convert.gray.hex = function(gray) {
838
+ let val = 0xFF & Math.round(gray[0] / 100 * 255), string = ((val << 16) + (val << 8) + val).toString(16).toUpperCase();
1275
839
  return '000000'.substring(string.length) + string;
1276
- };
1277
- convert.rgb.gray = function(rgb) {
1278
- const val = (rgb[0] + rgb[1] + rgb[2]) / 3;
840
+ }, convert.rgb.gray = function(rgb) {
1279
841
  return [
1280
- val / 255 * 100
842
+ (rgb[0] + rgb[1] + rgb[2]) / 3 / 255 * 100
1281
843
  ];
1282
844
  };
1283
845
  },
1284
846
  "../../../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
- }
847
+ let conversions = __webpack_require__("../../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/conversions.js"), route = __webpack_require__("../../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/route.js"), convert = {}, models = Object.keys(conversions);
1316
848
  models.forEach((fromModel)=>{
1317
- convert[fromModel] = {};
1318
- Object.defineProperty(convert[fromModel], 'channels', {
849
+ convert[fromModel] = {}, Object.defineProperty(convert[fromModel], 'channels', {
1319
850
  value: conversions[fromModel].channels
1320
- });
1321
- Object.defineProperty(convert[fromModel], 'labels', {
851
+ }), Object.defineProperty(convert[fromModel], 'labels', {
1322
852
  value: conversions[fromModel].labels
1323
853
  });
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);
854
+ let routes = route(fromModel);
855
+ Object.keys(routes).forEach((toModel)=>{
856
+ let fn = routes[toModel];
857
+ convert[fromModel][toModel] = function(fn) {
858
+ let wrappedFn = function(...args) {
859
+ let arg0 = args[0];
860
+ if (null == arg0) return arg0;
861
+ arg0.length > 1 && (args = arg0);
862
+ let result = fn(args);
863
+ if ('object' == typeof result) for(let len = result.length, i = 0; i < len; i++)result[i] = Math.round(result[i]);
864
+ return result;
865
+ };
866
+ return 'conversion' in fn && (wrappedFn.conversion = fn.conversion), wrappedFn;
867
+ }(fn), convert[fromModel][toModel].raw = function(fn) {
868
+ let wrappedFn = function(...args) {
869
+ let arg0 = args[0];
870
+ return null == arg0 ? arg0 : (arg0.length > 1 && (args = arg0), fn(args));
871
+ };
872
+ return 'conversion' in fn && (wrappedFn.conversion = fn.conversion), wrappedFn;
873
+ }(fn);
1330
874
  });
1331
- });
1332
- module.exports = convert;
875
+ }), module.exports = convert;
1333
876
  },
1334
877
  "../../../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);
878
+ let conversions = __webpack_require__("../../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/conversions.js");
879
+ module.exports = function(fromModel) {
880
+ let graph = function(fromModel) {
881
+ let graph = function() {
882
+ let graph = {}, models = Object.keys(conversions);
883
+ for(let len = models.length, i = 0; i < len; i++)graph[models[i]] = {
884
+ distance: -1,
885
+ parent: null
886
+ };
887
+ return graph;
888
+ }(), queue = [
889
+ fromModel
890
+ ];
891
+ for(graph[fromModel].distance = 0; queue.length;){
892
+ let current = queue.pop(), adjacents = Object.keys(conversions[current]);
893
+ for(let len = adjacents.length, i = 0; i < len; i++){
894
+ let adjacent = adjacents[i], node = graph[adjacent];
895
+ -1 === node.distance && (node.distance = graph[current].distance + 1, node.parent = current, queue.unshift(adjacent));
1374
896
  }
1375
897
  }
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);
898
+ return graph;
899
+ }(fromModel), conversion = {}, models = Object.keys(graph);
1403
900
  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);
901
+ let toModel = models[i];
902
+ if (null !== graph[toModel].parent) conversion[toModel] = function(toModel, graph) {
903
+ let path = [
904
+ graph[toModel].parent,
905
+ toModel
906
+ ], fn = conversions[graph[toModel].parent][toModel], cur = graph[toModel].parent;
907
+ for(; graph[cur].parent;)path.unshift(graph[cur].parent), fn = function(from, to) {
908
+ return function(args) {
909
+ return to(from(args));
910
+ };
911
+ }(conversions[graph[cur].parent][cur], fn), cur = graph[cur].parent;
912
+ return fn.conversion = path, fn;
913
+ }(toModel, graph);
1407
914
  }
1408
915
  return conversion;
1409
916
  };
@@ -2156,41 +1663,17 @@ exports.modules = {
2156
1663
  "../../../node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/index.js": function(module) {
2157
1664
  "use strict";
2158
1665
  module.exports = function() {
2159
- // https://mths.be/emoji
2160
1666
  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
1667
  };
2162
1668
  },
2163
1669
  "../../../node_modules/.pnpm/is-fullwidth-code-point@3.0.0/node_modules/is-fullwidth-code-point/index.js": function(module) {
2164
1670
  "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;
1671
+ let isFullwidthCodePoint = (codePoint)=>!Number.isNaN(codePoint) && (!!(codePoint >= 0x1100) && (!!(codePoint <= 0x115F) || 0x2329 === codePoint || 0x232A === codePoint || !!(0x2E80 <= codePoint) && !!(codePoint <= 0x3247) && 0x303F !== codePoint || !!(0x3250 <= codePoint) && !!(codePoint <= 0x4DBF) || !!(0x4E00 <= codePoint) && !!(codePoint <= 0xA4C6) || !!(0xA960 <= codePoint) && !!(codePoint <= 0xA97C) || !!(0xAC00 <= codePoint) && !!(codePoint <= 0xD7A3) || !!(0xF900 <= codePoint) && !!(codePoint <= 0xFAFF) || !!(0xFE10 <= codePoint) && !!(codePoint <= 0xFE19) || !!(0xFE30 <= codePoint) && !!(codePoint <= 0xFE6B) || !!(0xFF01 <= codePoint) && !!(codePoint <= 0xFF60) || !!(0xFFE0 <= codePoint) && !!(codePoint <= 0xFFE6) || !!(0x1B000 <= codePoint) && !!(codePoint <= 0x1B001) || !!(0x1F200 <= codePoint) && !!(codePoint <= 0x1F251) || !!(0x20000 <= codePoint) && !!(codePoint <= 0x3FFFD)) || !1);
1672
+ module.exports = isFullwidthCodePoint, module.exports.default = isFullwidthCodePoint;
2189
1673
  },
2190
1674
  "../../../node_modules/.pnpm/patch-console@1.0.0/node_modules/patch-console/build/index.js": function(module, __unused_webpack_exports, __webpack_require__) {
2191
1675
  "use strict";
2192
- const stream_1 = __webpack_require__("stream");
2193
- const CONSOLE_METHODS = [
1676
+ let stream_1 = __webpack_require__("stream"), CONSOLE_METHODS = [
2194
1677
  'assert',
2195
1678
  'count',
2196
1679
  'countReset',
@@ -2209,100 +1692,70 @@ exports.modules = {
2209
1692
  'timeLog',
2210
1693
  'trace',
2211
1694
  '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
- }
1695
+ ], originalMethods = {};
1696
+ module.exports = (callback)=>{
1697
+ let stdout = new stream_1.PassThrough(), stderr = new stream_1.PassThrough();
1698
+ stdout.write = (data)=>callback('stdout', data), stderr.write = (data)=>callback('stderr', data);
1699
+ let internalConsole = new console.Console(stdout, stderr);
1700
+ for (let method of CONSOLE_METHODS)originalMethods[method] = console[method], console[method] = internalConsole[method];
2224
1701
  return ()=>{
2225
- for (const method of CONSOLE_METHODS)console[method] = originalMethods[method];
1702
+ for (let method of CONSOLE_METHODS)console[method] = originalMethods[method];
2226
1703
  originalMethods = {};
2227
1704
  };
2228
1705
  };
2229
- module.exports = patchConsole;
2230
- //# sourceMappingURL=index.js.map
2231
1706
  },
2232
1707
  "../../../node_modules/.pnpm/slice-ansi@3.0.0/node_modules/slice-ansi/index.js": function(module, __unused_webpack_exports, __webpack_require__) {
2233
1708
  "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 = [
1709
+ let isFullwidthCodePoint = __webpack_require__("../../../node_modules/.pnpm/is-fullwidth-code-point@3.0.0/node_modules/is-fullwidth-code-point/index.js"), astralRegex = __webpack_require__("../../../node_modules/.pnpm/astral-regex@2.0.0/node_modules/astral-regex/index.js"), ansiStyles = __webpack_require__("../../../node_modules/.pnpm/ansi-styles@4.3.0/node_modules/ansi-styles/index.js"), ESCAPES = [
2238
1710
  '\u001B',
2239
1711
  '\u009B'
2240
- ];
2241
- const wrapAnsi = (code)=>`${ESCAPES[0]}[${code}m`;
2242
- const checkAnsi = (ansiCodes, isEscapes, endAnsiCode)=>{
1712
+ ], wrapAnsi = (code)=>`${ESCAPES[0]}[${code}m`, checkAnsi = (ansiCodes, isEscapes, endAnsiCode)=>{
2243
1713
  let output = [];
2244
- ansiCodes = [
1714
+ for (let ansiCode of ansiCodes = [
2245
1715
  ...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));
1716
+ ]){
1717
+ let ansiCodeOrigin = ansiCode;
1718
+ ansiCode.match(';') && (ansiCode = ansiCode.split(';')[0][0] + '0');
1719
+ let item = ansiStyles.codes.get(parseInt(ansiCode, 10));
2251
1720
  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));
1721
+ let indexEscape = ansiCodes.indexOf(item.toString());
1722
+ indexEscape >= 0 ? ansiCodes.splice(indexEscape, 1) : output.push(wrapAnsi(isEscapes ? item : ansiCodeOrigin));
2255
1723
  } else if (isEscapes) {
2256
1724
  output.push(wrapAnsi(0));
2257
1725
  break;
2258
1726
  } else output.push(wrapAnsi(ansiCodeOrigin));
2259
1727
  }
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
- }
1728
+ if (isEscapes && (output = output.filter((element, index)=>output.indexOf(element) === index), void 0 !== endAnsiCode)) {
1729
+ let fistEscapeCode = wrapAnsi(ansiStyles.codes.get(parseInt(endAnsiCode, 10)));
1730
+ output = output.reduce((current, next)=>next === fistEscapeCode ? [
1731
+ next,
1732
+ ...current
1733
+ ] : [
1734
+ ...current,
1735
+ next
1736
+ ], []);
2272
1737
  }
2273
1738
  return output.join('');
2274
1739
  };
2275
1740
  module.exports = (string, begin, end)=>{
2276
- const characters = [
1741
+ let ansiCode;
1742
+ let characters = [
2277
1743
  ...string.normalize()
2278
- ];
2279
- const ansiCodes = [];
1744
+ ], ansiCodes = [];
2280
1745
  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;
1746
+ let isInsideEscape = !1, visible = 0, output = '';
1747
+ for (let [index, character] of characters.entries()){
1748
+ let leftEscape = !1;
2287
1749
  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;
1750
+ let code = /\d[^m]*/.exec(string.slice(index, index + 18));
1751
+ ansiCode = code && code.length > 0 ? code[0] : void 0, visible < end && (isInsideEscape = !0, void 0 !== ansiCode && ansiCodes.push(ansiCode));
1752
+ } else isInsideEscape && 'm' === character && (isInsideEscape = !1, leftEscape = !0);
1753
+ if (!isInsideEscape && !leftEscape && ++visible, !astralRegex({
1754
+ exact: !0
1755
+ }).test(character) && isFullwidthCodePoint(character.codePointAt()) && ++visible, visible > begin && visible <= end) output += character;
2303
1756
  else if (visible !== begin || isInsideEscape || void 0 === ansiCode) {
2304
1757
  if (visible >= end) {
2305
- output += checkAnsi(ansiCodes, true, ansiCode);
1758
+ output += checkAnsi(ansiCodes, !0, ansiCode);
2306
1759
  break;
2307
1760
  }
2308
1761
  } else output = checkAnsi(ansiCodes);
@@ -2312,35 +1765,21 @@ exports.modules = {
2312
1765
  },
2313
1766
  "../../../node_modules/.pnpm/string-width@4.2.3/node_modules/string-width/index.js": function(module, __unused_webpack_exports, __webpack_require__) {
2314
1767
  "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;
1768
+ let stripAnsi = __webpack_require__("../../../node_modules/.pnpm/strip-ansi@6.0.1/node_modules/strip-ansi/index.js"), isFullwidthCodePoint = __webpack_require__("../../../node_modules/.pnpm/is-fullwidth-code-point@3.0.0/node_modules/is-fullwidth-code-point/index.js"), emojiRegex = __webpack_require__("../../../node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/index.js"), stringWidth = (string)=>{
1769
+ if ('string' != typeof string || 0 === string.length || 0 === (string = stripAnsi(string)).length) return 0;
2322
1770
  string = string.replace(emojiRegex(), ' ');
2323
1771
  let width = 0;
2324
1772
  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
- }
1773
+ let code = string.codePointAt(i);
1774
+ if (!(code <= 0x1F) && (!(code >= 0x7F) || !(code <= 0x9F)) && (!(code >= 0x300) || !(code <= 0x36F))) code > 0xFFFF && i++, width += isFullwidthCodePoint(code) ? 2 : 1;
2334
1775
  }
2335
1776
  return width;
2336
1777
  };
2337
- module.exports = stringWidth;
2338
- // TODO: remove this in the next major version
2339
- module.exports["default"] = stringWidth;
1778
+ module.exports = stringWidth, module.exports.default = stringWidth;
2340
1779
  },
2341
1780
  "../../../node_modules/.pnpm/strip-ansi@6.0.1/node_modules/strip-ansi/index.js": function(module, __unused_webpack_exports, __webpack_require__) {
2342
1781
  "use strict";
2343
- const ansiRegex = __webpack_require__("../../../node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/index.js");
1782
+ let ansiRegex = __webpack_require__("../../../node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/index.js");
2344
1783
  module.exports = (string)=>'string' == typeof string ? string.replace(ansiRegex(), '') : string;
2345
1784
  }
2346
1785
  };