@rsbuild/core 2.0.0-beta.1 → 2.0.0-beta.3

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.
@@ -0,0 +1,3480 @@
1
+ /*! For license information please see http-proxy-middleware.js.LICENSE.txt */
2
+ import * as __rspack_external_assert from "assert";
3
+ import * as __rspack_external_https from "https";
4
+ import * as __rspack_external_querystring from "querystring";
5
+ import * as __rspack_external_stream from "stream";
6
+ import * as __rspack_external_zlib from "zlib";
7
+ import { __webpack_require__ } from "./rslib-runtime.js";
8
+ import "./712.js";
9
+ import "./131.js";
10
+ __webpack_require__.add({
11
+ "../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/index.js" (module, __unused_rspack_exports, __webpack_require__) {
12
+ let stringify = __webpack_require__("../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/stringify.js"), compile = __webpack_require__("../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/compile.js"), expand = __webpack_require__("../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/expand.js"), parse = __webpack_require__("../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/parse.js"), braces = (input, options = {})=>{
13
+ let output = [];
14
+ if (Array.isArray(input)) for (let pattern of input){
15
+ let result = braces.create(pattern, options);
16
+ Array.isArray(result) ? output.push(...result) : output.push(result);
17
+ }
18
+ else output = [].concat(braces.create(input, options));
19
+ return options && !0 === options.expand && !0 === options.nodupes && (output = [
20
+ ...new Set(output)
21
+ ]), output;
22
+ };
23
+ braces.parse = (input, options = {})=>parse(input, options), braces.stringify = (input, options = {})=>'string' == typeof input ? stringify(braces.parse(input, options), options) : stringify(input, options), braces.compile = (input, options = {})=>('string' == typeof input && (input = braces.parse(input, options)), compile(input, options)), braces.expand = (input, options = {})=>{
24
+ 'string' == typeof input && (input = braces.parse(input, options));
25
+ let result = expand(input, options);
26
+ return !0 === options.noempty && (result = result.filter(Boolean)), !0 === options.nodupes && (result = [
27
+ ...new Set(result)
28
+ ]), result;
29
+ }, braces.create = (input, options = {})=>'' === input || input.length < 3 ? [
30
+ input
31
+ ] : !0 !== options.expand ? braces.compile(input, options) : braces.expand(input, options), module.exports = braces;
32
+ },
33
+ "../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/compile.js" (module, __unused_rspack_exports, __webpack_require__) {
34
+ let fill = __webpack_require__("../../node_modules/.pnpm/fill-range@7.1.1/node_modules/fill-range/index.js"), utils = __webpack_require__("../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/utils.js");
35
+ module.exports = (ast, options = {})=>{
36
+ let walk = (node, parent = {})=>{
37
+ let invalidBlock = utils.isInvalidBrace(parent), invalidNode = !0 === node.invalid && !0 === options.escapeInvalid, invalid = !0 === invalidBlock || !0 === invalidNode, prefix = !0 === options.escapeInvalid ? '\\' : '', output = '';
38
+ if (!0 === node.isOpen) return prefix + node.value;
39
+ if (!0 === node.isClose) return console.log('node.isClose', prefix, node.value), prefix + node.value;
40
+ if ('open' === node.type) return invalid ? prefix + node.value : '(';
41
+ if ('close' === node.type) return invalid ? prefix + node.value : ')';
42
+ if ('comma' === node.type) return 'comma' === node.prev.type ? '' : invalid ? node.value : '|';
43
+ if (node.value) return node.value;
44
+ if (node.nodes && node.ranges > 0) {
45
+ let args = utils.reduce(node.nodes), range = fill(...args, {
46
+ ...options,
47
+ wrap: !1,
48
+ toRegex: !0,
49
+ strictZeros: !0
50
+ });
51
+ if (0 !== range.length) return args.length > 1 && range.length > 1 ? `(${range})` : range;
52
+ }
53
+ if (node.nodes) for (let child of node.nodes)output += walk(child, node);
54
+ return output;
55
+ };
56
+ return walk(ast);
57
+ };
58
+ },
59
+ "../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/constants.js" (module) {
60
+ module.exports = {
61
+ MAX_LENGTH: 10000,
62
+ CHAR_0: '0',
63
+ CHAR_9: '9',
64
+ CHAR_UPPERCASE_A: 'A',
65
+ CHAR_LOWERCASE_A: 'a',
66
+ CHAR_UPPERCASE_Z: 'Z',
67
+ CHAR_LOWERCASE_Z: 'z',
68
+ CHAR_LEFT_PARENTHESES: '(',
69
+ CHAR_RIGHT_PARENTHESES: ')',
70
+ CHAR_ASTERISK: '*',
71
+ CHAR_AMPERSAND: '&',
72
+ CHAR_AT: '@',
73
+ CHAR_BACKSLASH: '\\',
74
+ CHAR_BACKTICK: '`',
75
+ CHAR_CARRIAGE_RETURN: '\r',
76
+ CHAR_CIRCUMFLEX_ACCENT: '^',
77
+ CHAR_COLON: ':',
78
+ CHAR_COMMA: ',',
79
+ CHAR_DOLLAR: '$',
80
+ CHAR_DOT: '.',
81
+ CHAR_DOUBLE_QUOTE: '"',
82
+ CHAR_EQUAL: '=',
83
+ CHAR_EXCLAMATION_MARK: '!',
84
+ CHAR_FORM_FEED: '\f',
85
+ CHAR_FORWARD_SLASH: '/',
86
+ CHAR_HASH: '#',
87
+ CHAR_HYPHEN_MINUS: '-',
88
+ CHAR_LEFT_ANGLE_BRACKET: '<',
89
+ CHAR_LEFT_CURLY_BRACE: '{',
90
+ CHAR_LEFT_SQUARE_BRACKET: '[',
91
+ CHAR_LINE_FEED: '\n',
92
+ CHAR_NO_BREAK_SPACE: '\u00A0',
93
+ CHAR_PERCENT: '%',
94
+ CHAR_PLUS: '+',
95
+ CHAR_QUESTION_MARK: '?',
96
+ CHAR_RIGHT_ANGLE_BRACKET: '>',
97
+ CHAR_RIGHT_CURLY_BRACE: '}',
98
+ CHAR_RIGHT_SQUARE_BRACKET: ']',
99
+ CHAR_SEMICOLON: ';',
100
+ CHAR_SINGLE_QUOTE: '\'',
101
+ CHAR_SPACE: ' ',
102
+ CHAR_TAB: '\t',
103
+ CHAR_UNDERSCORE: '_',
104
+ CHAR_VERTICAL_LINE: '|',
105
+ CHAR_ZERO_WIDTH_NOBREAK_SPACE: '\uFEFF'
106
+ };
107
+ },
108
+ "../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/expand.js" (module, __unused_rspack_exports, __webpack_require__) {
109
+ let fill = __webpack_require__("../../node_modules/.pnpm/fill-range@7.1.1/node_modules/fill-range/index.js"), stringify = __webpack_require__("../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/stringify.js"), utils = __webpack_require__("../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/utils.js"), append = (queue = '', stash = '', enclose = !1)=>{
110
+ let result = [];
111
+ if (queue = [].concat(queue), !(stash = [].concat(stash)).length) return queue;
112
+ if (!queue.length) return enclose ? utils.flatten(stash).map((ele)=>`{${ele}}`) : stash;
113
+ for (let item of queue)if (Array.isArray(item)) for (let value of item)result.push(append(value, stash, enclose));
114
+ else for (let ele of stash)!0 === enclose && 'string' == typeof ele && (ele = `{${ele}}`), result.push(Array.isArray(ele) ? append(item, ele, enclose) : item + ele);
115
+ return utils.flatten(result);
116
+ };
117
+ module.exports = (ast, options = {})=>{
118
+ let rangeLimit = void 0 === options.rangeLimit ? 1000 : options.rangeLimit, walk = (node, parent = {})=>{
119
+ node.queue = [];
120
+ let p = parent, q = parent.queue;
121
+ for(; 'brace' !== p.type && 'root' !== p.type && p.parent;)q = (p = p.parent).queue;
122
+ if (node.invalid || node.dollar) return void q.push(append(q.pop(), stringify(node, options)));
123
+ if ('brace' === node.type && !0 !== node.invalid && 2 === node.nodes.length) return void q.push(append(q.pop(), [
124
+ '{}'
125
+ ]));
126
+ if (node.nodes && node.ranges > 0) {
127
+ let args = utils.reduce(node.nodes);
128
+ if (utils.exceedsLimit(...args, options.step, rangeLimit)) throw RangeError('expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.');
129
+ let range = fill(...args, options);
130
+ 0 === range.length && (range = stringify(node, options)), q.push(append(q.pop(), range)), node.nodes = [];
131
+ return;
132
+ }
133
+ let enclose = utils.encloseBrace(node), queue = node.queue, block = node;
134
+ for(; 'brace' !== block.type && 'root' !== block.type && block.parent;)queue = (block = block.parent).queue;
135
+ for(let i = 0; i < node.nodes.length; i++){
136
+ let child = node.nodes[i];
137
+ if ('comma' === child.type && 'brace' === node.type) {
138
+ 1 === i && queue.push(''), queue.push('');
139
+ continue;
140
+ }
141
+ if ('close' === child.type) {
142
+ q.push(append(q.pop(), queue, enclose));
143
+ continue;
144
+ }
145
+ if (child.value && 'open' !== child.type) {
146
+ queue.push(append(queue.pop(), child.value));
147
+ continue;
148
+ }
149
+ child.nodes && walk(child, node);
150
+ }
151
+ return queue;
152
+ };
153
+ return utils.flatten(walk(ast));
154
+ };
155
+ },
156
+ "../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/parse.js" (module, __unused_rspack_exports, __webpack_require__) {
157
+ let stringify = __webpack_require__("../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/stringify.js"), { MAX_LENGTH, CHAR_BACKSLASH, CHAR_BACKTICK, CHAR_COMMA, CHAR_DOT, CHAR_LEFT_PARENTHESES, CHAR_RIGHT_PARENTHESES, CHAR_LEFT_CURLY_BRACE, CHAR_RIGHT_CURLY_BRACE, CHAR_LEFT_SQUARE_BRACKET, CHAR_RIGHT_SQUARE_BRACKET, CHAR_DOUBLE_QUOTE, CHAR_SINGLE_QUOTE, CHAR_NO_BREAK_SPACE, CHAR_ZERO_WIDTH_NOBREAK_SPACE } = __webpack_require__("../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/constants.js");
158
+ module.exports = (input, options = {})=>{
159
+ let value;
160
+ if ('string' != typeof input) throw TypeError('Expected a string');
161
+ let opts = options || {}, max = 'number' == typeof opts.maxLength ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
162
+ if (input.length > max) throw SyntaxError(`Input length (${input.length}), exceeds max characters (${max})`);
163
+ let ast = {
164
+ type: 'root',
165
+ input,
166
+ nodes: []
167
+ }, stack = [
168
+ ast
169
+ ], block = ast, prev = ast, brackets = 0, length = input.length, index = 0, depth = 0, advance = ()=>input[index++], push = (node)=>{
170
+ if ('text' === node.type && 'dot' === prev.type && (prev.type = 'text'), prev && 'text' === prev.type && 'text' === node.type) {
171
+ prev.value += node.value;
172
+ return;
173
+ }
174
+ return block.nodes.push(node), node.parent = block, node.prev = prev, prev = node, node;
175
+ };
176
+ for(push({
177
+ type: 'bos'
178
+ }); index < length;)if (block = stack[stack.length - 1], (value = advance()) !== CHAR_ZERO_WIDTH_NOBREAK_SPACE && value !== CHAR_NO_BREAK_SPACE) {
179
+ if (value === CHAR_BACKSLASH) {
180
+ push({
181
+ type: 'text',
182
+ value: (options.keepEscaping ? value : '') + advance()
183
+ });
184
+ continue;
185
+ }
186
+ if (value === CHAR_RIGHT_SQUARE_BRACKET) {
187
+ push({
188
+ type: 'text',
189
+ value: '\\' + value
190
+ });
191
+ continue;
192
+ }
193
+ if (value === CHAR_LEFT_SQUARE_BRACKET) {
194
+ let next;
195
+ for(brackets++; index < length && (next = advance());){
196
+ if (value += next, next === CHAR_LEFT_SQUARE_BRACKET) {
197
+ brackets++;
198
+ continue;
199
+ }
200
+ if (next === CHAR_BACKSLASH) {
201
+ value += advance();
202
+ continue;
203
+ }
204
+ if (next === CHAR_RIGHT_SQUARE_BRACKET && 0 == --brackets) break;
205
+ }
206
+ push({
207
+ type: 'text',
208
+ value
209
+ });
210
+ continue;
211
+ }
212
+ if (value === CHAR_LEFT_PARENTHESES) {
213
+ block = push({
214
+ type: 'paren',
215
+ nodes: []
216
+ }), stack.push(block), push({
217
+ type: 'text',
218
+ value
219
+ });
220
+ continue;
221
+ }
222
+ if (value === CHAR_RIGHT_PARENTHESES) {
223
+ if ('paren' !== block.type) {
224
+ push({
225
+ type: 'text',
226
+ value
227
+ });
228
+ continue;
229
+ }
230
+ block = stack.pop(), push({
231
+ type: 'text',
232
+ value
233
+ }), block = stack[stack.length - 1];
234
+ continue;
235
+ }
236
+ if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) {
237
+ let next, open = value;
238
+ for(!0 !== options.keepQuotes && (value = ''); index < length && (next = advance());){
239
+ if (next === CHAR_BACKSLASH) {
240
+ value += next + advance();
241
+ continue;
242
+ }
243
+ if (next === open) {
244
+ !0 === options.keepQuotes && (value += next);
245
+ break;
246
+ }
247
+ value += next;
248
+ }
249
+ push({
250
+ type: 'text',
251
+ value
252
+ });
253
+ continue;
254
+ }
255
+ if (value === CHAR_LEFT_CURLY_BRACE) {
256
+ depth++, block = push({
257
+ type: 'brace',
258
+ open: !0,
259
+ close: !1,
260
+ dollar: prev.value && '$' === prev.value.slice(-1) || !0 === block.dollar,
261
+ depth,
262
+ commas: 0,
263
+ ranges: 0,
264
+ nodes: []
265
+ }), stack.push(block), push({
266
+ type: 'open',
267
+ value
268
+ });
269
+ continue;
270
+ }
271
+ if (value === CHAR_RIGHT_CURLY_BRACE) {
272
+ if ('brace' !== block.type) {
273
+ push({
274
+ type: 'text',
275
+ value
276
+ });
277
+ continue;
278
+ }
279
+ (block = stack.pop()).close = !0, push({
280
+ type: 'close',
281
+ value
282
+ }), depth--, block = stack[stack.length - 1];
283
+ continue;
284
+ }
285
+ if (value === CHAR_COMMA && depth > 0) {
286
+ if (block.ranges > 0) {
287
+ block.ranges = 0;
288
+ let open = block.nodes.shift();
289
+ block.nodes = [
290
+ open,
291
+ {
292
+ type: 'text',
293
+ value: stringify(block)
294
+ }
295
+ ];
296
+ }
297
+ push({
298
+ type: 'comma',
299
+ value
300
+ }), block.commas++;
301
+ continue;
302
+ }
303
+ if (value === CHAR_DOT && depth > 0 && 0 === block.commas) {
304
+ let siblings = block.nodes;
305
+ if (0 === depth || 0 === siblings.length) {
306
+ push({
307
+ type: 'text',
308
+ value
309
+ });
310
+ continue;
311
+ }
312
+ if ('dot' === prev.type) {
313
+ if (block.range = [], prev.value += value, prev.type = 'range', 3 !== block.nodes.length && 5 !== block.nodes.length) {
314
+ block.invalid = !0, block.ranges = 0, prev.type = 'text';
315
+ continue;
316
+ }
317
+ block.ranges++, block.args = [];
318
+ continue;
319
+ }
320
+ if ('range' === prev.type) {
321
+ siblings.pop();
322
+ let before = siblings[siblings.length - 1];
323
+ before.value += prev.value + value, prev = before, block.ranges--;
324
+ continue;
325
+ }
326
+ push({
327
+ type: 'dot',
328
+ value
329
+ });
330
+ continue;
331
+ }
332
+ push({
333
+ type: 'text',
334
+ value
335
+ });
336
+ }
337
+ do if ('root' !== (block = stack.pop()).type) {
338
+ block.nodes.forEach((node)=>{
339
+ node.nodes || ('open' === node.type && (node.isOpen = !0), 'close' === node.type && (node.isClose = !0), node.nodes || (node.type = 'text'), node.invalid = !0);
340
+ });
341
+ let parent = stack[stack.length - 1], index = parent.nodes.indexOf(block);
342
+ parent.nodes.splice(index, 1, ...block.nodes);
343
+ }
344
+ while (stack.length > 0);
345
+ return push({
346
+ type: 'eos'
347
+ }), ast;
348
+ };
349
+ },
350
+ "../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/stringify.js" (module, __unused_rspack_exports, __webpack_require__) {
351
+ let utils = __webpack_require__("../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/utils.js");
352
+ module.exports = (ast, options = {})=>{
353
+ let stringify = (node, parent = {})=>{
354
+ let invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent), invalidNode = !0 === node.invalid && !0 === options.escapeInvalid, output = '';
355
+ if (node.value) return (invalidBlock || invalidNode) && utils.isOpenOrClose(node) ? '\\' + node.value : node.value;
356
+ if (node.value) return node.value;
357
+ if (node.nodes) for (let child of node.nodes)output += stringify(child);
358
+ return output;
359
+ };
360
+ return stringify(ast);
361
+ };
362
+ },
363
+ "../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/utils.js" (__unused_rspack_module, exports) {
364
+ exports.isInteger = (num)=>'number' == typeof num ? Number.isInteger(num) : 'string' == typeof num && '' !== num.trim() && Number.isInteger(Number(num)), exports.find = (node, type)=>node.nodes.find((node)=>node.type === type), exports.exceedsLimit = (min, max, step = 1, limit)=>!1 !== limit && !!exports.isInteger(min) && !!exports.isInteger(max) && (Number(max) - Number(min)) / Number(step) >= limit, exports.escapeNode = (block, n = 0, type)=>{
365
+ let node = block.nodes[n];
366
+ node && (type && node.type === type || 'open' === node.type || 'close' === node.type) && !0 !== node.escaped && (node.value = '\\' + node.value, node.escaped = !0);
367
+ }, exports.encloseBrace = (node)=>'brace' === node.type && node.commas >> 0 + node.ranges == 0 && (node.invalid = !0, !0), exports.isInvalidBrace = (block)=>'brace' === block.type && (!0 === block.invalid || !!block.dollar || (block.commas >> 0 + block.ranges == 0 || !0 !== block.open || !0 !== block.close) && (block.invalid = !0, !0)), exports.isOpenOrClose = (node)=>'open' === node.type || 'close' === node.type || !0 === node.open || !0 === node.close, exports.reduce = (nodes)=>nodes.reduce((acc, node)=>('text' === node.type && acc.push(node.value), 'range' === node.type && (node.type = 'text'), acc), []), exports.flatten = (...args)=>{
368
+ let result = [], flat = (arr)=>{
369
+ for(let i = 0; i < arr.length; i++){
370
+ let ele = arr[i];
371
+ if (Array.isArray(ele)) {
372
+ flat(ele);
373
+ continue;
374
+ }
375
+ void 0 !== ele && result.push(ele);
376
+ }
377
+ return result;
378
+ };
379
+ return flat(args), result;
380
+ };
381
+ },
382
+ "../../node_modules/.pnpm/debug@4.4.3_supports-color@10.2.2/node_modules/debug/src/browser.js" (module, exports, __webpack_require__) {
383
+ let warned;
384
+ function useColors() {
385
+ let m;
386
+ return "u" > typeof window && !!window.process && ('renderer' === window.process.type || !!window.process.__nwjs) || !("u" > typeof navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) && ("u" > typeof document && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || "u" > typeof window && window.console && (window.console.firebug || window.console.exception && window.console.table) || "u" > typeof navigator && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31 || "u" > typeof navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
387
+ }
388
+ function formatArgs(args) {
389
+ if (args[0] = (this.useColors ? '%c' : '') + this.namespace + (this.useColors ? ' %c' : ' ') + args[0] + (this.useColors ? '%c ' : ' ') + '+' + module.exports.humanize(this.diff), !this.useColors) return;
390
+ let c = 'color: ' + this.color;
391
+ args.splice(1, 0, c, 'color: inherit');
392
+ let index = 0, lastC = 0;
393
+ args[0].replace(/%[a-zA-Z%]/g, (match)=>{
394
+ '%%' !== match && (index++, '%c' === match && (lastC = index));
395
+ }), args.splice(lastC, 0, c);
396
+ }
397
+ function save(namespaces) {
398
+ try {
399
+ namespaces ? exports.storage.setItem('debug', namespaces) : exports.storage.removeItem('debug');
400
+ } catch (error) {}
401
+ }
402
+ function load() {
403
+ let r;
404
+ try {
405
+ r = exports.storage.getItem('debug') || exports.storage.getItem('DEBUG');
406
+ } catch (error) {}
407
+ return !r && "u" > typeof process && 'env' in process && (r = process.env.DEBUG), r;
408
+ }
409
+ function localstorage() {
410
+ try {
411
+ return localStorage;
412
+ } catch (error) {}
413
+ }
414
+ exports.formatArgs = formatArgs, exports.save = save, exports.load = load, exports.useColors = useColors, exports.storage = localstorage(), warned = !1, exports.destroy = ()=>{
415
+ warned || (warned = !0, console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'));
416
+ }, exports.colors = [
417
+ '#0000CC',
418
+ '#0000FF',
419
+ '#0033CC',
420
+ '#0033FF',
421
+ '#0066CC',
422
+ '#0066FF',
423
+ '#0099CC',
424
+ '#0099FF',
425
+ '#00CC00',
426
+ '#00CC33',
427
+ '#00CC66',
428
+ '#00CC99',
429
+ '#00CCCC',
430
+ '#00CCFF',
431
+ '#3300CC',
432
+ '#3300FF',
433
+ '#3333CC',
434
+ '#3333FF',
435
+ '#3366CC',
436
+ '#3366FF',
437
+ '#3399CC',
438
+ '#3399FF',
439
+ '#33CC00',
440
+ '#33CC33',
441
+ '#33CC66',
442
+ '#33CC99',
443
+ '#33CCCC',
444
+ '#33CCFF',
445
+ '#6600CC',
446
+ '#6600FF',
447
+ '#6633CC',
448
+ '#6633FF',
449
+ '#66CC00',
450
+ '#66CC33',
451
+ '#9900CC',
452
+ '#9900FF',
453
+ '#9933CC',
454
+ '#9933FF',
455
+ '#99CC00',
456
+ '#99CC33',
457
+ '#CC0000',
458
+ '#CC0033',
459
+ '#CC0066',
460
+ '#CC0099',
461
+ '#CC00CC',
462
+ '#CC00FF',
463
+ '#CC3300',
464
+ '#CC3333',
465
+ '#CC3366',
466
+ '#CC3399',
467
+ '#CC33CC',
468
+ '#CC33FF',
469
+ '#CC6600',
470
+ '#CC6633',
471
+ '#CC9900',
472
+ '#CC9933',
473
+ '#CCCC00',
474
+ '#CCCC33',
475
+ '#FF0000',
476
+ '#FF0033',
477
+ '#FF0066',
478
+ '#FF0099',
479
+ '#FF00CC',
480
+ '#FF00FF',
481
+ '#FF3300',
482
+ '#FF3333',
483
+ '#FF3366',
484
+ '#FF3399',
485
+ '#FF33CC',
486
+ '#FF33FF',
487
+ '#FF6600',
488
+ '#FF6633',
489
+ '#FF9900',
490
+ '#FF9933',
491
+ '#FFCC00',
492
+ '#FFCC33'
493
+ ], exports.log = console.debug || console.log || (()=>{}), module.exports = __webpack_require__("../../node_modules/.pnpm/debug@4.4.3_supports-color@10.2.2/node_modules/debug/src/common.js")(exports);
494
+ let { formatters } = module.exports;
495
+ formatters.j = function(v) {
496
+ try {
497
+ return JSON.stringify(v);
498
+ } catch (error) {
499
+ return '[UnexpectedJSONParseError]: ' + error.message;
500
+ }
501
+ };
502
+ },
503
+ "../../node_modules/.pnpm/debug@4.4.3_supports-color@10.2.2/node_modules/debug/src/common.js" (module, __unused_rspack_exports, __webpack_require__) {
504
+ module.exports = function setup(env) {
505
+ function selectColor(namespace) {
506
+ let hash = 0;
507
+ for(let i = 0; i < namespace.length; i++)hash = (hash << 5) - hash + namespace.charCodeAt(i) | 0;
508
+ return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
509
+ }
510
+ function createDebug(namespace) {
511
+ let prevTime, namespacesCache, enabledCache, enableOverride = null;
512
+ function debug(...args) {
513
+ if (!debug.enabled) return;
514
+ let self = debug, curr = Number(new Date());
515
+ self.diff = curr - (prevTime || curr), self.prev = prevTime, self.curr = curr, prevTime = curr, args[0] = createDebug.coerce(args[0]), 'string' != typeof args[0] && args.unshift('%O');
516
+ let index = 0;
517
+ args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format)=>{
518
+ if ('%%' === match) return '%';
519
+ index++;
520
+ let formatter = createDebug.formatters[format];
521
+ if ('function' == typeof formatter) {
522
+ let val = args[index];
523
+ match = formatter.call(self, val), args.splice(index, 1), index--;
524
+ }
525
+ return match;
526
+ }), createDebug.formatArgs.call(self, args), (self.log || createDebug.log).apply(self, args);
527
+ }
528
+ return debug.namespace = namespace, debug.useColors = createDebug.useColors(), debug.color = createDebug.selectColor(namespace), debug.extend = extend, debug.destroy = createDebug.destroy, Object.defineProperty(debug, 'enabled', {
529
+ enumerable: !0,
530
+ configurable: !1,
531
+ get: ()=>null !== enableOverride ? enableOverride : (namespacesCache !== createDebug.namespaces && (namespacesCache = createDebug.namespaces, enabledCache = createDebug.enabled(namespace)), enabledCache),
532
+ set: (v)=>{
533
+ enableOverride = v;
534
+ }
535
+ }), 'function' == typeof createDebug.init && createDebug.init(debug), debug;
536
+ }
537
+ function extend(namespace, delimiter) {
538
+ let newDebug = createDebug(this.namespace + (void 0 === delimiter ? ':' : delimiter) + namespace);
539
+ return newDebug.log = this.log, newDebug;
540
+ }
541
+ function enable(namespaces) {
542
+ for (let ns of (createDebug.save(namespaces), createDebug.namespaces = namespaces, createDebug.names = [], createDebug.skips = [], ('string' == typeof namespaces ? namespaces : '').trim().replace(/\s+/g, ',').split(',').filter(Boolean)))'-' === ns[0] ? createDebug.skips.push(ns.slice(1)) : createDebug.names.push(ns);
543
+ }
544
+ function matchesTemplate(search, template) {
545
+ let searchIndex = 0, templateIndex = 0, starIndex = -1, matchIndex = 0;
546
+ for(; searchIndex < search.length;)if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || '*' === template[templateIndex])) '*' === template[templateIndex] ? (starIndex = templateIndex, matchIndex = searchIndex) : searchIndex++, templateIndex++;
547
+ else {
548
+ if (-1 === starIndex) return !1;
549
+ templateIndex = starIndex + 1, searchIndex = ++matchIndex;
550
+ }
551
+ for(; templateIndex < template.length && '*' === template[templateIndex];)templateIndex++;
552
+ return templateIndex === template.length;
553
+ }
554
+ function disable() {
555
+ let namespaces = [
556
+ ...createDebug.names,
557
+ ...createDebug.skips.map((namespace)=>'-' + namespace)
558
+ ].join(',');
559
+ return createDebug.enable(''), namespaces;
560
+ }
561
+ function enabled(name) {
562
+ for (let skip of createDebug.skips)if (matchesTemplate(name, skip)) return !1;
563
+ for (let ns of createDebug.names)if (matchesTemplate(name, ns)) return !0;
564
+ return !1;
565
+ }
566
+ function coerce(val) {
567
+ return val instanceof Error ? val.stack || val.message : val;
568
+ }
569
+ function destroy() {
570
+ console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
571
+ }
572
+ return createDebug.debug = createDebug, createDebug.default = createDebug, createDebug.coerce = coerce, createDebug.disable = disable, createDebug.enable = enable, createDebug.enabled = enabled, createDebug.humanize = __webpack_require__("../../node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js"), createDebug.destroy = destroy, Object.keys(env).forEach((key)=>{
573
+ createDebug[key] = env[key];
574
+ }), createDebug.names = [], createDebug.skips = [], createDebug.formatters = {}, createDebug.selectColor = selectColor, createDebug.enable(createDebug.load()), createDebug;
575
+ };
576
+ },
577
+ "../../node_modules/.pnpm/debug@4.4.3_supports-color@10.2.2/node_modules/debug/src/index.js" (module, __unused_rspack_exports, __webpack_require__) {
578
+ "u" < typeof process || 'renderer' === process.type || !0 === process.browser || process.__nwjs ? module.exports = __webpack_require__("../../node_modules/.pnpm/debug@4.4.3_supports-color@10.2.2/node_modules/debug/src/browser.js") : module.exports = __webpack_require__("../../node_modules/.pnpm/debug@4.4.3_supports-color@10.2.2/node_modules/debug/src/node.js");
579
+ },
580
+ "../../node_modules/.pnpm/debug@4.4.3_supports-color@10.2.2/node_modules/debug/src/node.js" (module, exports, __webpack_require__) {
581
+ let tty = __webpack_require__("tty"), util = __webpack_require__("util");
582
+ exports.init = init, exports.log = log, exports.formatArgs = formatArgs, exports.save = save, exports.load = load, exports.useColors = useColors, exports.destroy = util.deprecate(()=>{}, 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'), exports.colors = [
583
+ 6,
584
+ 2,
585
+ 3,
586
+ 4,
587
+ 5,
588
+ 1
589
+ ];
590
+ try {
591
+ let supportsColor = __webpack_require__("../../node_modules/.pnpm/supports-color@10.2.2/node_modules/supports-color/index.js");
592
+ supportsColor && (supportsColor.stderr || supportsColor).level >= 2 && (exports.colors = [
593
+ 20,
594
+ 21,
595
+ 26,
596
+ 27,
597
+ 32,
598
+ 33,
599
+ 38,
600
+ 39,
601
+ 40,
602
+ 41,
603
+ 42,
604
+ 43,
605
+ 44,
606
+ 45,
607
+ 56,
608
+ 57,
609
+ 62,
610
+ 63,
611
+ 68,
612
+ 69,
613
+ 74,
614
+ 75,
615
+ 76,
616
+ 77,
617
+ 78,
618
+ 79,
619
+ 80,
620
+ 81,
621
+ 92,
622
+ 93,
623
+ 98,
624
+ 99,
625
+ 112,
626
+ 113,
627
+ 128,
628
+ 129,
629
+ 134,
630
+ 135,
631
+ 148,
632
+ 149,
633
+ 160,
634
+ 161,
635
+ 162,
636
+ 163,
637
+ 164,
638
+ 165,
639
+ 166,
640
+ 167,
641
+ 168,
642
+ 169,
643
+ 170,
644
+ 171,
645
+ 172,
646
+ 173,
647
+ 178,
648
+ 179,
649
+ 184,
650
+ 185,
651
+ 196,
652
+ 197,
653
+ 198,
654
+ 199,
655
+ 200,
656
+ 201,
657
+ 202,
658
+ 203,
659
+ 204,
660
+ 205,
661
+ 206,
662
+ 207,
663
+ 208,
664
+ 209,
665
+ 214,
666
+ 215,
667
+ 220,
668
+ 221
669
+ ]);
670
+ } catch (error) {}
671
+ function useColors() {
672
+ return 'colors' in exports.inspectOpts ? !!exports.inspectOpts.colors : tty.isatty(process.stderr.fd);
673
+ }
674
+ function formatArgs(args) {
675
+ let { namespace: name, useColors } = this;
676
+ if (useColors) {
677
+ let c = this.color, colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c), prefix = ` ${colorCode};1m${name} \u001B[0m`;
678
+ args[0] = prefix + args[0].split('\n').join('\n' + prefix), args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m');
679
+ } else args[0] = getDate() + name + ' ' + args[0];
680
+ }
681
+ function getDate() {
682
+ return exports.inspectOpts.hideDate ? '' : new Date().toISOString() + ' ';
683
+ }
684
+ function log(...args) {
685
+ return process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + '\n');
686
+ }
687
+ function save(namespaces) {
688
+ namespaces ? process.env.DEBUG = namespaces : delete process.env.DEBUG;
689
+ }
690
+ function load() {
691
+ return process.env.DEBUG;
692
+ }
693
+ function init(debug) {
694
+ debug.inspectOpts = {};
695
+ let keys = Object.keys(exports.inspectOpts);
696
+ for(let i = 0; i < keys.length; i++)debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
697
+ }
698
+ exports.inspectOpts = Object.keys(process.env).filter((key)=>/^debug_/i.test(key)).reduce((obj, key)=>{
699
+ let prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_, k)=>k.toUpperCase()), val = process.env[key];
700
+ return val = !!/^(yes|on|true|enabled)$/i.test(val) || !/^(no|off|false|disabled)$/i.test(val) && ('null' === val ? null : Number(val)), obj[prop] = val, obj;
701
+ }, {}), module.exports = __webpack_require__("../../node_modules/.pnpm/debug@4.4.3_supports-color@10.2.2/node_modules/debug/src/common.js")(exports);
702
+ let { formatters } = module.exports;
703
+ formatters.o = function(v) {
704
+ return this.inspectOpts.colors = this.useColors, util.inspect(v, this.inspectOpts).split('\n').map((str)=>str.trim()).join(' ');
705
+ }, formatters.O = function(v) {
706
+ return this.inspectOpts.colors = this.useColors, util.inspect(v, this.inspectOpts);
707
+ };
708
+ },
709
+ "../../node_modules/.pnpm/eventemitter3@4.0.7/node_modules/eventemitter3/index.js" (module) {
710
+ var has = Object.prototype.hasOwnProperty, prefix = '~';
711
+ function Events() {}
712
+ function EE(fn, context, once) {
713
+ this.fn = fn, this.context = context, this.once = once || !1;
714
+ }
715
+ function addListener(emitter, event, fn, context, once) {
716
+ if ('function' != typeof fn) throw TypeError('The listener must be a function');
717
+ var listener = new EE(fn, context || emitter, once), evt = prefix ? prefix + event : event;
718
+ return emitter._events[evt] ? emitter._events[evt].fn ? emitter._events[evt] = [
719
+ emitter._events[evt],
720
+ listener
721
+ ] : emitter._events[evt].push(listener) : (emitter._events[evt] = listener, emitter._eventsCount++), emitter;
722
+ }
723
+ function clearEvent(emitter, evt) {
724
+ 0 == --emitter._eventsCount ? emitter._events = new Events() : delete emitter._events[evt];
725
+ }
726
+ function EventEmitter() {
727
+ this._events = new Events(), this._eventsCount = 0;
728
+ }
729
+ Object.create && (Events.prototype = Object.create(null), new Events().__proto__ || (prefix = !1)), EventEmitter.prototype.eventNames = function eventNames() {
730
+ var events, name, names = [];
731
+ if (0 === this._eventsCount) return names;
732
+ for(name in events = this._events)has.call(events, name) && names.push(prefix ? name.slice(1) : name);
733
+ return Object.getOwnPropertySymbols ? names.concat(Object.getOwnPropertySymbols(events)) : names;
734
+ }, EventEmitter.prototype.listeners = function listeners(event) {
735
+ var evt = prefix ? prefix + event : event, handlers = this._events[evt];
736
+ if (!handlers) return [];
737
+ if (handlers.fn) return [
738
+ handlers.fn
739
+ ];
740
+ for(var i = 0, l = handlers.length, ee = Array(l); i < l; i++)ee[i] = handlers[i].fn;
741
+ return ee;
742
+ }, EventEmitter.prototype.listenerCount = function listenerCount(event) {
743
+ var evt = prefix ? prefix + event : event, listeners = this._events[evt];
744
+ return listeners ? listeners.fn ? 1 : listeners.length : 0;
745
+ }, EventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {
746
+ var evt = prefix ? prefix + event : event;
747
+ if (!this._events[evt]) return !1;
748
+ var args, i, listeners = this._events[evt], len = arguments.length;
749
+ if (listeners.fn) {
750
+ switch(listeners.once && this.removeListener(event, listeners.fn, void 0, !0), len){
751
+ case 1:
752
+ return listeners.fn.call(listeners.context), !0;
753
+ case 2:
754
+ return listeners.fn.call(listeners.context, a1), !0;
755
+ case 3:
756
+ return listeners.fn.call(listeners.context, a1, a2), !0;
757
+ case 4:
758
+ return listeners.fn.call(listeners.context, a1, a2, a3), !0;
759
+ case 5:
760
+ return listeners.fn.call(listeners.context, a1, a2, a3, a4), !0;
761
+ case 6:
762
+ return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), !0;
763
+ }
764
+ for(i = 1, args = Array(len - 1); i < len; i++)args[i - 1] = arguments[i];
765
+ listeners.fn.apply(listeners.context, args);
766
+ } else {
767
+ var j, length = listeners.length;
768
+ for(i = 0; i < length; i++)switch(listeners[i].once && this.removeListener(event, listeners[i].fn, void 0, !0), len){
769
+ case 1:
770
+ listeners[i].fn.call(listeners[i].context);
771
+ break;
772
+ case 2:
773
+ listeners[i].fn.call(listeners[i].context, a1);
774
+ break;
775
+ case 3:
776
+ listeners[i].fn.call(listeners[i].context, a1, a2);
777
+ break;
778
+ case 4:
779
+ listeners[i].fn.call(listeners[i].context, a1, a2, a3);
780
+ break;
781
+ default:
782
+ if (!args) for(j = 1, args = Array(len - 1); j < len; j++)args[j - 1] = arguments[j];
783
+ listeners[i].fn.apply(listeners[i].context, args);
784
+ }
785
+ }
786
+ return !0;
787
+ }, EventEmitter.prototype.on = function on(event, fn, context) {
788
+ return addListener(this, event, fn, context, !1);
789
+ }, EventEmitter.prototype.once = function once(event, fn, context) {
790
+ return addListener(this, event, fn, context, !0);
791
+ }, EventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {
792
+ var evt = prefix ? prefix + event : event;
793
+ if (!this._events[evt]) return this;
794
+ if (!fn) return clearEvent(this, evt), this;
795
+ var listeners = this._events[evt];
796
+ if (listeners.fn) listeners.fn !== fn || once && !listeners.once || context && listeners.context !== context || clearEvent(this, evt);
797
+ else {
798
+ for(var i = 0, events = [], length = listeners.length; i < length; i++)(listeners[i].fn !== fn || once && !listeners[i].once || context && listeners[i].context !== context) && events.push(listeners[i]);
799
+ events.length ? this._events[evt] = 1 === events.length ? events[0] : events : clearEvent(this, evt);
800
+ }
801
+ return this;
802
+ }, EventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {
803
+ var evt;
804
+ return event ? (evt = prefix ? prefix + event : event, this._events[evt] && clearEvent(this, evt)) : (this._events = new Events(), this._eventsCount = 0), this;
805
+ }, EventEmitter.prototype.off = EventEmitter.prototype.removeListener, EventEmitter.prototype.addListener = EventEmitter.prototype.on, EventEmitter.prefixed = prefix, EventEmitter.EventEmitter = EventEmitter, module.exports = EventEmitter;
806
+ },
807
+ "../../node_modules/.pnpm/fill-range@7.1.1/node_modules/fill-range/index.js" (module, __unused_rspack_exports, __webpack_require__) {
808
+ let util = __webpack_require__("util"), toRegexRange = __webpack_require__("../../node_modules/.pnpm/to-regex-range@5.0.1/node_modules/to-regex-range/index.js"), isObject = (val)=>null !== val && 'object' == typeof val && !Array.isArray(val), isValidValue = (value)=>'number' == typeof value || 'string' == typeof value && '' !== value, zeros = (input)=>{
809
+ let value = `${input}`, index = -1;
810
+ if ('-' === value[0] && (value = value.slice(1)), '0' === value) return !1;
811
+ for(; '0' === value[++index];);
812
+ return index > 0;
813
+ }, pad = (input, maxLength, toNumber)=>{
814
+ if (maxLength > 0) {
815
+ let dash = '-' === input[0] ? '-' : '';
816
+ dash && (input = input.slice(1)), input = dash + input.padStart(dash ? maxLength - 1 : maxLength, '0');
817
+ }
818
+ return !1 === toNumber ? String(input) : input;
819
+ }, toMaxLen = (input, maxLength)=>{
820
+ let negative = '-' === input[0] ? '-' : '';
821
+ for(negative && (input = input.slice(1), maxLength--); input.length < maxLength;)input = '0' + input;
822
+ return negative ? '-' + input : input;
823
+ }, toRange = (a, b, isNumbers, options)=>{
824
+ if (isNumbers) return toRegexRange(a, b, {
825
+ wrap: !1,
826
+ ...options
827
+ });
828
+ let start = String.fromCharCode(a);
829
+ if (a === b) return start;
830
+ let stop = String.fromCharCode(b);
831
+ return `[${start}-${stop}]`;
832
+ }, toRegex = (start, end, options)=>{
833
+ if (Array.isArray(start)) {
834
+ let wrap = !0 === options.wrap, prefix = options.capture ? '' : '?:';
835
+ return wrap ? `(${prefix}${start.join('|')})` : start.join('|');
836
+ }
837
+ return toRegexRange(start, end, options);
838
+ }, rangeError = (...args)=>RangeError('Invalid range arguments: ' + util.inspect(...args)), invalidRange = (start, end, options)=>{
839
+ if (!0 === options.strictRanges) throw rangeError([
840
+ start,
841
+ end
842
+ ]);
843
+ return [];
844
+ }, fill = (start, end, step, options = {})=>{
845
+ if (null == end && isValidValue(start)) return [
846
+ start
847
+ ];
848
+ if (!isValidValue(start) || !isValidValue(end)) return invalidRange(start, end, options);
849
+ if ('function' == typeof step) return fill(start, end, 1, {
850
+ transform: step
851
+ });
852
+ if (isObject(step)) return fill(start, end, 0, step);
853
+ let opts = {
854
+ ...options
855
+ };
856
+ if (!0 === opts.capture && (opts.wrap = !0), !Number.isInteger(+(step = step || opts.step || 1))) {
857
+ if (null != step && !isObject(step)) {
858
+ var step1 = step;
859
+ if (!0 === opts.strictRanges) throw TypeError(`Expected step "${step1}" to be a number`);
860
+ return [];
861
+ }
862
+ return fill(start, end, 1, step);
863
+ }
864
+ return Number.isInteger(+start) && Number.isInteger(+end) ? ((start, end, step = 1, options = {})=>{
865
+ let a = Number(start), b = Number(end);
866
+ if (!Number.isInteger(a) || !Number.isInteger(b)) {
867
+ if (!0 === options.strictRanges) throw rangeError([
868
+ start,
869
+ end
870
+ ]);
871
+ return [];
872
+ }
873
+ 0 === a && (a = 0), 0 === b && (b = 0);
874
+ let descending = a > b, startString = String(start), endString = String(end), stepString = String(step);
875
+ step = Math.max(Math.abs(step), 1);
876
+ let padded = zeros(startString) || zeros(endString) || zeros(stepString), maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0, toNumber = !1 === padded && !1 == ('string' == typeof start || 'string' == typeof end || !0 === options.stringify), format = options.transform || ((value)=>!0 === toNumber ? Number(value) : String(value));
877
+ if (options.toRegex && 1 === step) return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), !0, options);
878
+ let parts = {
879
+ negatives: [],
880
+ positives: []
881
+ }, push = (num)=>parts[num < 0 ? 'negatives' : 'positives'].push(Math.abs(num)), range = [], index = 0;
882
+ for(; descending ? a >= b : a <= b;)!0 === options.toRegex && step > 1 ? push(a) : range.push(pad(format(a, index), maxLen, toNumber)), a = descending ? a - step : a + step, index++;
883
+ if (!0 === options.toRegex) {
884
+ let result, prefix, positives, negatives;
885
+ return step > 1 ? (parts.negatives.sort((a, b)=>a < b ? -1 : +(a > b)), parts.positives.sort((a, b)=>a < b ? -1 : +(a > b)), prefix = options.capture ? '' : '?:', positives = '', negatives = '', (parts.positives.length && (positives = parts.positives.map((v)=>toMaxLen(String(v), maxLen)).join('|')), parts.negatives.length && (negatives = `-(${prefix}${parts.negatives.map((v)=>toMaxLen(String(v), maxLen)).join('|')})`), result = positives && negatives ? `${positives}|${negatives}` : positives || negatives, options.wrap) ? `(${prefix}${result})` : result) : toRegex(range, null, {
886
+ wrap: !1,
887
+ ...options
888
+ });
889
+ }
890
+ return range;
891
+ })(start, end, step, opts) : ((start, end, step = 1, options = {})=>{
892
+ if (!Number.isInteger(+start) && start.length > 1 || !Number.isInteger(+end) && end.length > 1) return invalidRange(start, end, options);
893
+ let format = options.transform || ((val)=>String.fromCharCode(val)), a = `${start}`.charCodeAt(0), b = `${end}`.charCodeAt(0), descending = a > b, min = Math.min(a, b), max = Math.max(a, b);
894
+ if (options.toRegex && 1 === step) return toRange(min, max, !1, options);
895
+ let range = [], index = 0;
896
+ for(; descending ? a >= b : a <= b;)range.push(format(a, index)), a = descending ? a - step : a + step, index++;
897
+ return !0 === options.toRegex ? toRegex(range, null, {
898
+ wrap: !1,
899
+ options
900
+ }) : range;
901
+ })(start, end, Math.max(Math.abs(step), 1), opts);
902
+ };
903
+ module.exports = fill;
904
+ },
905
+ "../../node_modules/.pnpm/follow-redirects@1.15.11_debug@4.4.3_supports-color@10.2.2_/node_modules/follow-redirects/debug.js" (module, __unused_rspack_exports, __webpack_require__) {
906
+ var debug;
907
+ module.exports = function() {
908
+ if (!debug) {
909
+ try {
910
+ debug = __webpack_require__("../../node_modules/.pnpm/debug@4.4.3_supports-color@10.2.2/node_modules/debug/src/index.js")("follow-redirects");
911
+ } catch (error) {}
912
+ "function" != typeof debug && (debug = function() {});
913
+ }
914
+ debug.apply(null, arguments);
915
+ };
916
+ },
917
+ "../../node_modules/.pnpm/follow-redirects@1.15.11_debug@4.4.3_supports-color@10.2.2_/node_modules/follow-redirects/index.js" (module, __unused_rspack_exports, __webpack_require__) {
918
+ var looksLikeNode, looksLikeBrowser, looksLikeV8, url = __webpack_require__("url"), URL = url.URL, http = __webpack_require__("http"), https = __webpack_require__("https"), Writable = __webpack_require__("stream").Writable, assert = __webpack_require__("assert"), debug = __webpack_require__("../../node_modules/.pnpm/follow-redirects@1.15.11_debug@4.4.3_supports-color@10.2.2_/node_modules/follow-redirects/debug.js");
919
+ looksLikeNode = "u" > typeof process, looksLikeBrowser = "u" > typeof window && "u" > typeof document, looksLikeV8 = isFunction(Error.captureStackTrace), looksLikeNode || !looksLikeBrowser && looksLikeV8 || console.warn("The follow-redirects package should be excluded from browser builds.");
920
+ var useNativeURL = !1;
921
+ try {
922
+ assert(new URL(""));
923
+ } catch (error) {
924
+ useNativeURL = "ERR_INVALID_URL" === error.code;
925
+ }
926
+ var preservedUrlFields = [
927
+ "auth",
928
+ "host",
929
+ "hostname",
930
+ "href",
931
+ "path",
932
+ "pathname",
933
+ "port",
934
+ "protocol",
935
+ "query",
936
+ "search",
937
+ "hash"
938
+ ], events = [
939
+ "abort",
940
+ "aborted",
941
+ "connect",
942
+ "error",
943
+ "socket",
944
+ "timeout"
945
+ ], eventHandlers = Object.create(null);
946
+ events.forEach(function(event) {
947
+ eventHandlers[event] = function(arg1, arg2, arg3) {
948
+ this._redirectable.emit(event, arg1, arg2, arg3);
949
+ };
950
+ });
951
+ var InvalidUrlError = createErrorType("ERR_INVALID_URL", "Invalid URL", TypeError), RedirectionError = createErrorType("ERR_FR_REDIRECTION_FAILURE", "Redirected request failed"), TooManyRedirectsError = createErrorType("ERR_FR_TOO_MANY_REDIRECTS", "Maximum number of redirects exceeded", RedirectionError), MaxBodyLengthExceededError = createErrorType("ERR_FR_MAX_BODY_LENGTH_EXCEEDED", "Request body larger than maxBodyLength limit"), WriteAfterEndError = createErrorType("ERR_STREAM_WRITE_AFTER_END", "write after end"), destroy = Writable.prototype.destroy || noop;
952
+ function RedirectableRequest(options, responseCallback) {
953
+ Writable.call(this), this._sanitizeOptions(options), this._options = options, this._ended = !1, this._ending = !1, this._redirectCount = 0, this._redirects = [], this._requestBodyLength = 0, this._requestBodyBuffers = [], responseCallback && this.on("response", responseCallback);
954
+ var self = this;
955
+ this._onNativeResponse = function(response) {
956
+ try {
957
+ self._processResponse(response);
958
+ } catch (cause) {
959
+ self.emit("error", cause instanceof RedirectionError ? cause : new RedirectionError({
960
+ cause: cause
961
+ }));
962
+ }
963
+ }, this._performRequest();
964
+ }
965
+ function wrap(protocols) {
966
+ var exports = {
967
+ maxRedirects: 21,
968
+ maxBodyLength: 10485760
969
+ }, nativeProtocols = {};
970
+ return Object.keys(protocols).forEach(function(scheme) {
971
+ var protocol = scheme + ":", nativeProtocol = nativeProtocols[protocol] = protocols[scheme], wrappedProtocol = exports[scheme] = Object.create(nativeProtocol);
972
+ function get(input, options, callback) {
973
+ var wrappedRequest = wrappedProtocol.request(input, options, callback);
974
+ return wrappedRequest.end(), wrappedRequest;
975
+ }
976
+ Object.defineProperties(wrappedProtocol, {
977
+ request: {
978
+ value: function request(input, options, callback) {
979
+ return isURL(input) ? input = spreadUrlObject(input) : isString(input) ? input = spreadUrlObject(parseUrl(input)) : (callback = options, options = validateUrl(input), input = {
980
+ protocol: protocol
981
+ }), isFunction(options) && (callback = options, options = null), (options = Object.assign({
982
+ maxRedirects: exports.maxRedirects,
983
+ maxBodyLength: exports.maxBodyLength
984
+ }, input, options)).nativeProtocols = nativeProtocols, isString(options.host) || isString(options.hostname) || (options.hostname = "::1"), assert.equal(options.protocol, protocol, "protocol mismatch"), debug("options", options), new RedirectableRequest(options, callback);
985
+ },
986
+ configurable: !0,
987
+ enumerable: !0,
988
+ writable: !0
989
+ },
990
+ get: {
991
+ value: get,
992
+ configurable: !0,
993
+ enumerable: !0,
994
+ writable: !0
995
+ }
996
+ });
997
+ }), exports;
998
+ }
999
+ function noop() {}
1000
+ function parseUrl(input) {
1001
+ var parsed;
1002
+ if (useNativeURL) parsed = new URL(input);
1003
+ else if (!isString((parsed = validateUrl(url.parse(input))).protocol)) throw new InvalidUrlError({
1004
+ input
1005
+ });
1006
+ return parsed;
1007
+ }
1008
+ function resolveUrl(relative, base) {
1009
+ return useNativeURL ? new URL(relative, base) : parseUrl(url.resolve(base, relative));
1010
+ }
1011
+ function validateUrl(input) {
1012
+ if (/^\[/.test(input.hostname) && !/^\[[:0-9a-f]+\]$/i.test(input.hostname) || /^\[/.test(input.host) && !/^\[[:0-9a-f]+\](:\d+)?$/i.test(input.host)) throw new InvalidUrlError({
1013
+ input: input.href || input
1014
+ });
1015
+ return input;
1016
+ }
1017
+ function spreadUrlObject(urlObject, target) {
1018
+ var spread = target || {};
1019
+ for (var key of preservedUrlFields)spread[key] = urlObject[key];
1020
+ return spread.hostname.startsWith("[") && (spread.hostname = spread.hostname.slice(1, -1)), "" !== spread.port && (spread.port = Number(spread.port)), spread.path = spread.search ? spread.pathname + spread.search : spread.pathname, spread;
1021
+ }
1022
+ function removeMatchingHeaders(regex, headers) {
1023
+ var lastValue;
1024
+ for(var header in headers)regex.test(header) && (lastValue = headers[header], delete headers[header]);
1025
+ return null == lastValue ? void 0 : String(lastValue).trim();
1026
+ }
1027
+ function createErrorType(code, message, baseClass) {
1028
+ function CustomError(properties) {
1029
+ isFunction(Error.captureStackTrace) && Error.captureStackTrace(this, this.constructor), Object.assign(this, properties || {}), this.code = code, this.message = this.cause ? message + ": " + this.cause.message : message;
1030
+ }
1031
+ return CustomError.prototype = new (baseClass || Error)(), Object.defineProperties(CustomError.prototype, {
1032
+ constructor: {
1033
+ value: CustomError,
1034
+ enumerable: !1
1035
+ },
1036
+ name: {
1037
+ value: "Error [" + code + "]",
1038
+ enumerable: !1
1039
+ }
1040
+ }), CustomError;
1041
+ }
1042
+ function destroyRequest(request, error) {
1043
+ for (var event of events)request.removeListener(event, eventHandlers[event]);
1044
+ request.on("error", noop), request.destroy(error);
1045
+ }
1046
+ function isSubdomain(subdomain, domain) {
1047
+ assert(isString(subdomain) && isString(domain));
1048
+ var dot = subdomain.length - domain.length - 1;
1049
+ return dot > 0 && "." === subdomain[dot] && subdomain.endsWith(domain);
1050
+ }
1051
+ function isString(value) {
1052
+ return "string" == typeof value || value instanceof String;
1053
+ }
1054
+ function isFunction(value) {
1055
+ return "function" == typeof value;
1056
+ }
1057
+ function isBuffer(value) {
1058
+ return "object" == typeof value && "length" in value;
1059
+ }
1060
+ function isURL(value) {
1061
+ return URL && value instanceof URL;
1062
+ }
1063
+ RedirectableRequest.prototype = Object.create(Writable.prototype), RedirectableRequest.prototype.abort = function() {
1064
+ destroyRequest(this._currentRequest), this._currentRequest.abort(), this.emit("abort");
1065
+ }, RedirectableRequest.prototype.destroy = function(error) {
1066
+ return destroyRequest(this._currentRequest, error), destroy.call(this, error), this;
1067
+ }, RedirectableRequest.prototype.write = function(data, encoding, callback) {
1068
+ if (this._ending) throw new WriteAfterEndError();
1069
+ if (!isString(data) && !isBuffer(data)) throw TypeError("data should be a string, Buffer or Uint8Array");
1070
+ if (isFunction(encoding) && (callback = encoding, encoding = null), 0 === data.length) {
1071
+ callback && callback();
1072
+ return;
1073
+ }
1074
+ this._requestBodyLength + data.length <= this._options.maxBodyLength ? (this._requestBodyLength += data.length, this._requestBodyBuffers.push({
1075
+ data: data,
1076
+ encoding: encoding
1077
+ }), this._currentRequest.write(data, encoding, callback)) : (this.emit("error", new MaxBodyLengthExceededError()), this.abort());
1078
+ }, RedirectableRequest.prototype.end = function(data, encoding, callback) {
1079
+ if (isFunction(data) ? (callback = data, data = encoding = null) : isFunction(encoding) && (callback = encoding, encoding = null), data) {
1080
+ var self = this, currentRequest = this._currentRequest;
1081
+ this.write(data, encoding, function() {
1082
+ self._ended = !0, currentRequest.end(null, null, callback);
1083
+ }), this._ending = !0;
1084
+ } else this._ended = this._ending = !0, this._currentRequest.end(null, null, callback);
1085
+ }, RedirectableRequest.prototype.setHeader = function(name, value) {
1086
+ this._options.headers[name] = value, this._currentRequest.setHeader(name, value);
1087
+ }, RedirectableRequest.prototype.removeHeader = function(name) {
1088
+ delete this._options.headers[name], this._currentRequest.removeHeader(name);
1089
+ }, RedirectableRequest.prototype.setTimeout = function(msecs, callback) {
1090
+ var self = this;
1091
+ function destroyOnTimeout(socket) {
1092
+ socket.setTimeout(msecs), socket.removeListener("timeout", socket.destroy), socket.addListener("timeout", socket.destroy);
1093
+ }
1094
+ function startTimer(socket) {
1095
+ self._timeout && clearTimeout(self._timeout), self._timeout = setTimeout(function() {
1096
+ self.emit("timeout"), clearTimer();
1097
+ }, msecs), destroyOnTimeout(socket);
1098
+ }
1099
+ function clearTimer() {
1100
+ self._timeout && (clearTimeout(self._timeout), self._timeout = null), self.removeListener("abort", clearTimer), self.removeListener("error", clearTimer), self.removeListener("response", clearTimer), self.removeListener("close", clearTimer), callback && self.removeListener("timeout", callback), self.socket || self._currentRequest.removeListener("socket", startTimer);
1101
+ }
1102
+ return callback && this.on("timeout", callback), this.socket ? startTimer(this.socket) : this._currentRequest.once("socket", startTimer), this.on("socket", destroyOnTimeout), this.on("abort", clearTimer), this.on("error", clearTimer), this.on("response", clearTimer), this.on("close", clearTimer), this;
1103
+ }, [
1104
+ "flushHeaders",
1105
+ "getHeader",
1106
+ "setNoDelay",
1107
+ "setSocketKeepAlive"
1108
+ ].forEach(function(method) {
1109
+ RedirectableRequest.prototype[method] = function(a, b) {
1110
+ return this._currentRequest[method](a, b);
1111
+ };
1112
+ }), [
1113
+ "aborted",
1114
+ "connection",
1115
+ "socket"
1116
+ ].forEach(function(property) {
1117
+ Object.defineProperty(RedirectableRequest.prototype, property, {
1118
+ get: function() {
1119
+ return this._currentRequest[property];
1120
+ }
1121
+ });
1122
+ }), RedirectableRequest.prototype._sanitizeOptions = function(options) {
1123
+ if (options.headers || (options.headers = {}), options.host && (options.hostname || (options.hostname = options.host), delete options.host), !options.pathname && options.path) {
1124
+ var searchPos = options.path.indexOf("?");
1125
+ searchPos < 0 ? options.pathname = options.path : (options.pathname = options.path.substring(0, searchPos), options.search = options.path.substring(searchPos));
1126
+ }
1127
+ }, RedirectableRequest.prototype._performRequest = function() {
1128
+ var protocol = this._options.protocol, nativeProtocol = this._options.nativeProtocols[protocol];
1129
+ if (!nativeProtocol) throw TypeError("Unsupported protocol " + protocol);
1130
+ if (this._options.agents) {
1131
+ var scheme = protocol.slice(0, -1);
1132
+ this._options.agent = this._options.agents[scheme];
1133
+ }
1134
+ var request = this._currentRequest = nativeProtocol.request(this._options, this._onNativeResponse);
1135
+ for (var event of (request._redirectable = this, events))request.on(event, eventHandlers[event]);
1136
+ if (this._currentUrl = /^\//.test(this._options.path) ? url.format(this._options) : this._options.path, this._isRedirect) {
1137
+ var i = 0, self = this, buffers = this._requestBodyBuffers;
1138
+ !function writeNext(error) {
1139
+ if (request === self._currentRequest) if (error) self.emit("error", error);
1140
+ else if (i < buffers.length) {
1141
+ var buffer = buffers[i++];
1142
+ request.finished || request.write(buffer.data, buffer.encoding, writeNext);
1143
+ } else self._ended && request.end();
1144
+ }();
1145
+ }
1146
+ }, RedirectableRequest.prototype._processResponse = function(response) {
1147
+ var requestHeaders, statusCode = response.statusCode;
1148
+ this._options.trackRedirects && this._redirects.push({
1149
+ url: this._currentUrl,
1150
+ headers: response.headers,
1151
+ statusCode: statusCode
1152
+ });
1153
+ var location = response.headers.location;
1154
+ if (!location || !1 === this._options.followRedirects || statusCode < 300 || statusCode >= 400) {
1155
+ response.responseUrl = this._currentUrl, response.redirects = this._redirects, this.emit("response", response), this._requestBodyBuffers = [];
1156
+ return;
1157
+ }
1158
+ if (destroyRequest(this._currentRequest), response.destroy(), ++this._redirectCount > this._options.maxRedirects) throw new TooManyRedirectsError();
1159
+ var beforeRedirect = this._options.beforeRedirect;
1160
+ beforeRedirect && (requestHeaders = Object.assign({
1161
+ Host: response.req.getHeader("host")
1162
+ }, this._options.headers));
1163
+ var method = this._options.method;
1164
+ (301 !== statusCode && 302 !== statusCode || "POST" !== this._options.method) && (303 !== statusCode || /^(?:GET|HEAD)$/.test(this._options.method)) || (this._options.method = "GET", this._requestBodyBuffers = [], removeMatchingHeaders(/^content-/i, this._options.headers));
1165
+ var currentHostHeader = removeMatchingHeaders(/^host$/i, this._options.headers), currentUrlParts = parseUrl(this._currentUrl), currentHost = currentHostHeader || currentUrlParts.host, currentUrl = /^\w+:/.test(location) ? this._currentUrl : url.format(Object.assign(currentUrlParts, {
1166
+ host: currentHost
1167
+ })), redirectUrl = resolveUrl(location, currentUrl);
1168
+ if (debug("redirecting to", redirectUrl.href), this._isRedirect = !0, spreadUrlObject(redirectUrl, this._options), (redirectUrl.protocol === currentUrlParts.protocol || "https:" === redirectUrl.protocol) && (redirectUrl.host === currentHost || isSubdomain(redirectUrl.host, currentHost)) || removeMatchingHeaders(/^(?:(?:proxy-)?authorization|cookie)$/i, this._options.headers), isFunction(beforeRedirect)) {
1169
+ var responseDetails = {
1170
+ headers: response.headers,
1171
+ statusCode: statusCode
1172
+ }, requestDetails = {
1173
+ url: currentUrl,
1174
+ method: method,
1175
+ headers: requestHeaders
1176
+ };
1177
+ beforeRedirect(this._options, responseDetails, requestDetails), this._sanitizeOptions(this._options);
1178
+ }
1179
+ this._performRequest();
1180
+ }, module.exports = wrap({
1181
+ http: http,
1182
+ https: https
1183
+ }), module.exports.wrap = wrap;
1184
+ },
1185
+ "../../node_modules/.pnpm/http-proxy@1.18.1_patch_hash=424b689da454f1f336d635615733f30568882789c1173f861c30f95ba8_7c4b684cae90eb7d05b3dfae37f0ceb4/node_modules/http-proxy/index.js" (module, __unused_rspack_exports, __webpack_require__) {
1186
+ module.exports = __webpack_require__("../../node_modules/.pnpm/http-proxy@1.18.1_patch_hash=424b689da454f1f336d635615733f30568882789c1173f861c30f95ba8_7c4b684cae90eb7d05b3dfae37f0ceb4/node_modules/http-proxy/lib/http-proxy.js");
1187
+ },
1188
+ "../../node_modules/.pnpm/http-proxy@1.18.1_patch_hash=424b689da454f1f336d635615733f30568882789c1173f861c30f95ba8_7c4b684cae90eb7d05b3dfae37f0ceb4/node_modules/http-proxy/lib/http-proxy.js" (module, __unused_rspack_exports, __webpack_require__) {
1189
+ var ProxyServer = __webpack_require__("../../node_modules/.pnpm/http-proxy@1.18.1_patch_hash=424b689da454f1f336d635615733f30568882789c1173f861c30f95ba8_7c4b684cae90eb7d05b3dfae37f0ceb4/node_modules/http-proxy/lib/http-proxy/index.js").Server;
1190
+ function createProxyServer(options) {
1191
+ return new ProxyServer(options);
1192
+ }
1193
+ ProxyServer.createProxyServer = createProxyServer, ProxyServer.createServer = createProxyServer, ProxyServer.createProxy = createProxyServer, module.exports = ProxyServer;
1194
+ },
1195
+ "../../node_modules/.pnpm/http-proxy@1.18.1_patch_hash=424b689da454f1f336d635615733f30568882789c1173f861c30f95ba8_7c4b684cae90eb7d05b3dfae37f0ceb4/node_modules/http-proxy/lib/http-proxy/common.js" (__unused_rspack_module, exports, __webpack_require__) {
1196
+ var url = __webpack_require__("url"), required = __webpack_require__("../../node_modules/.pnpm/requires-port@1.0.0/node_modules/requires-port/index.js"), upgradeHeader = /(^|,)\s*upgrade\s*($|,)/i, isSSL = /^https|wss/;
1197
+ function hasPort(host) {
1198
+ return !!~host.indexOf(':');
1199
+ }
1200
+ exports.isSSL = isSSL, exports.setupOutgoing = function(outgoing, options, req, forward) {
1201
+ outgoing.port = options[forward || 'target'].port || (isSSL.test(options[forward || 'target'].protocol) ? 443 : 80), [
1202
+ 'host',
1203
+ 'hostname',
1204
+ 'socketPath',
1205
+ 'pfx',
1206
+ 'key',
1207
+ 'passphrase',
1208
+ 'cert',
1209
+ 'ca',
1210
+ 'ciphers',
1211
+ 'secureProtocol'
1212
+ ].forEach(function(e) {
1213
+ outgoing[e] = options[forward || 'target'][e];
1214
+ }), outgoing.method = options.method || req.method, outgoing.headers = Object.assign({}, req.headers), options.headers && Object.assign(outgoing.headers, options.headers), options.auth && (outgoing.auth = options.auth), options.ca && (outgoing.ca = options.ca), isSSL.test(options[forward || 'target'].protocol) && (outgoing.rejectUnauthorized = void 0 === options.secure || options.secure), outgoing.agent = options.agent || !1, outgoing.localAddress = options.localAddress, !outgoing.agent && (outgoing.headers = outgoing.headers || {}, 'string' == typeof outgoing.headers.connection && upgradeHeader.test(outgoing.headers.connection) || (outgoing.headers.connection = 'close'));
1215
+ var target = options[forward || 'target'], targetPath = target && !1 !== options.prependPath && target.path || '', outgoingPath = options.toProxy ? req.url : url.parse(req.url).path || '';
1216
+ return outgoingPath = options.ignorePath ? '' : outgoingPath, outgoing.path = exports.urlJoin(targetPath, outgoingPath), options.changeOrigin && (outgoing.headers.host = required(outgoing.port, options[forward || 'target'].protocol) && !hasPort(outgoing.host) ? outgoing.host + ':' + outgoing.port : outgoing.host), outgoing;
1217
+ }, exports.setupSocket = function(socket) {
1218
+ return socket.setTimeout(0), socket.setNoDelay(!0), socket.setKeepAlive(!0, 0), socket;
1219
+ }, exports.getPort = function(req) {
1220
+ var res = req.headers.host ? req.headers.host.match(/:(\d+)/) : '';
1221
+ return res ? res[1] : exports.hasEncryptedConnection(req) ? '443' : '80';
1222
+ }, exports.hasEncryptedConnection = function(req) {
1223
+ return !!(req.connection.encrypted || req.connection.pair);
1224
+ }, exports.urlJoin = function() {
1225
+ var retSegs, args = Array.prototype.slice.call(arguments), lastIndex = args.length - 1, lastSegs = args[lastIndex].split('?');
1226
+ return args[lastIndex] = lastSegs.shift(), (retSegs = [
1227
+ args.filter(Boolean).join('/').replace(/\/+/g, '/').replace('http:/', 'http://').replace('https:/', 'https://')
1228
+ ]).push.apply(retSegs, lastSegs), retSegs.join('?');
1229
+ }, exports.rewriteCookieProperty = function rewriteCookieProperty(header, config, property) {
1230
+ return Array.isArray(header) ? header.map(function(headerElement) {
1231
+ return rewriteCookieProperty(headerElement, config, property);
1232
+ }) : header.replace(RegExp("(;\\s*" + property + "=)([^;]+)", 'i'), function(match, prefix, previousValue) {
1233
+ var newValue;
1234
+ if (previousValue in config) newValue = config[previousValue];
1235
+ else {
1236
+ if (!('*' in config)) return match;
1237
+ newValue = config['*'];
1238
+ }
1239
+ return newValue ? prefix + newValue : '';
1240
+ });
1241
+ };
1242
+ },
1243
+ "../../node_modules/.pnpm/http-proxy@1.18.1_patch_hash=424b689da454f1f336d635615733f30568882789c1173f861c30f95ba8_7c4b684cae90eb7d05b3dfae37f0ceb4/node_modules/http-proxy/lib/http-proxy/index.js" (module, __unused_rspack_exports, __webpack_require__) {
1244
+ var httpProxy = module.exports, parse_url = __webpack_require__("url").parse, EE3 = __webpack_require__("../../node_modules/.pnpm/eventemitter3@4.0.7/node_modules/eventemitter3/index.js"), http = __webpack_require__("http"), https = __webpack_require__("https"), web = __webpack_require__("../../node_modules/.pnpm/http-proxy@1.18.1_patch_hash=424b689da454f1f336d635615733f30568882789c1173f861c30f95ba8_7c4b684cae90eb7d05b3dfae37f0ceb4/node_modules/http-proxy/lib/http-proxy/passes/web-incoming.js"), ws = __webpack_require__("../../node_modules/.pnpm/http-proxy@1.18.1_patch_hash=424b689da454f1f336d635615733f30568882789c1173f861c30f95ba8_7c4b684cae90eb7d05b3dfae37f0ceb4/node_modules/http-proxy/lib/http-proxy/passes/ws-incoming.js");
1245
+ function createRightProxy(type) {
1246
+ return function(options) {
1247
+ return function(req, res) {
1248
+ var head, cbl, passes = 'ws' === type ? this.wsPasses : this.webPasses, args = [].slice.call(arguments), cntr = args.length - 1;
1249
+ 'function' == typeof args[cntr] && (cbl = args[cntr], cntr--);
1250
+ var requestOptions = options;
1251
+ if (!(args[cntr] instanceof Buffer) && args[cntr] !== res && (Object.assign(requestOptions = Object.assign({}, options), args[cntr]), cntr--), args[cntr] instanceof Buffer && (head = args[cntr]), [
1252
+ 'target',
1253
+ 'forward'
1254
+ ].forEach(function(e) {
1255
+ 'string' == typeof requestOptions[e] && (requestOptions[e] = parse_url(requestOptions[e]));
1256
+ }), !requestOptions.target && !requestOptions.forward) return this.emit('error', Error('Must provide a proper URL as target'));
1257
+ for(var i = 0; i < passes.length && !passes[i](req, res, requestOptions, head, this, cbl); i++);
1258
+ };
1259
+ };
1260
+ }
1261
+ function ProxyServer(options) {
1262
+ EE3.call(this), (options = options || {}).prependPath = !1 !== options.prependPath, this.web = this.proxyRequest = createRightProxy('web')(options), this.ws = this.proxyWebsocketRequest = createRightProxy('ws')(options), this.options = options, this.webPasses = Object.keys(web).map(function(pass) {
1263
+ return web[pass];
1264
+ }), this.wsPasses = Object.keys(ws).map(function(pass) {
1265
+ return ws[pass];
1266
+ }), this.on('error', this.onError, this);
1267
+ }
1268
+ httpProxy.Server = ProxyServer, httpProxy.createRightProxy = createRightProxy, __webpack_require__("util").inherits(ProxyServer, EE3), ProxyServer.prototype.onError = function(err) {
1269
+ if (1 === this.listeners('error').length) throw err;
1270
+ }, ProxyServer.prototype.listen = function(port, hostname) {
1271
+ var self = this, closure = function(req, res) {
1272
+ self.web(req, res);
1273
+ };
1274
+ return this._server = this.options.ssl ? https.createServer(this.options.ssl, closure) : http.createServer(closure), this.options.ws && this._server.on('upgrade', function(req, socket, head) {
1275
+ self.ws(req, socket, head);
1276
+ }), this._server.listen(port, hostname), this;
1277
+ }, ProxyServer.prototype.close = function(callback) {
1278
+ var self = this;
1279
+ function done() {
1280
+ self._server = null, callback && callback.apply(null, arguments);
1281
+ }
1282
+ this._server && this._server.close(done);
1283
+ }, ProxyServer.prototype.before = function(type, passName, callback) {
1284
+ if ('ws' !== type && 'web' !== type) throw Error('type must be `web` or `ws`');
1285
+ var passes = 'ws' === type ? this.wsPasses : this.webPasses, i = !1;
1286
+ if (passes.forEach(function(v, idx) {
1287
+ v.name === passName && (i = idx);
1288
+ }), !1 === i) throw Error('No such pass');
1289
+ passes.splice(i, 0, callback);
1290
+ }, ProxyServer.prototype.after = function(type, passName, callback) {
1291
+ if ('ws' !== type && 'web' !== type) throw Error('type must be `web` or `ws`');
1292
+ var passes = 'ws' === type ? this.wsPasses : this.webPasses, i = !1;
1293
+ if (passes.forEach(function(v, idx) {
1294
+ v.name === passName && (i = idx);
1295
+ }), !1 === i) throw Error('No such pass');
1296
+ passes.splice(i++, 0, callback);
1297
+ };
1298
+ },
1299
+ "../../node_modules/.pnpm/http-proxy@1.18.1_patch_hash=424b689da454f1f336d635615733f30568882789c1173f861c30f95ba8_7c4b684cae90eb7d05b3dfae37f0ceb4/node_modules/http-proxy/lib/http-proxy/passes/web-incoming.js" (module, __unused_rspack_exports, __webpack_require__) {
1300
+ var httpNative = __webpack_require__("http"), httpsNative = __webpack_require__("https"), web_o = __webpack_require__("../../node_modules/.pnpm/http-proxy@1.18.1_patch_hash=424b689da454f1f336d635615733f30568882789c1173f861c30f95ba8_7c4b684cae90eb7d05b3dfae37f0ceb4/node_modules/http-proxy/lib/http-proxy/passes/web-outgoing.js"), common = __webpack_require__("../../node_modules/.pnpm/http-proxy@1.18.1_patch_hash=424b689da454f1f336d635615733f30568882789c1173f861c30f95ba8_7c4b684cae90eb7d05b3dfae37f0ceb4/node_modules/http-proxy/lib/http-proxy/common.js"), followRedirects = __webpack_require__("../../node_modules/.pnpm/follow-redirects@1.15.11_debug@4.4.3_supports-color@10.2.2_/node_modules/follow-redirects/index.js");
1301
+ web_o = Object.keys(web_o).map(function(pass) {
1302
+ return web_o[pass];
1303
+ });
1304
+ var nativeAgents = {
1305
+ http: httpNative,
1306
+ https: httpsNative
1307
+ };
1308
+ module.exports = {
1309
+ deleteLength: function deleteLength(req, res, options) {
1310
+ 'DELETE' !== req.method && 'OPTIONS' !== req.method || req.headers['content-length'] || (req.headers['content-length'] = '0', delete req.headers['transfer-encoding']);
1311
+ },
1312
+ timeout: function timeout(req, res, options) {
1313
+ options.timeout && req.socket.setTimeout(options.timeout);
1314
+ },
1315
+ XHeaders: function XHeaders(req, res, options) {
1316
+ if (options.xfwd) {
1317
+ var encrypted = req.isSpdy || common.hasEncryptedConnection(req), values = {
1318
+ for: req.connection.remoteAddress || req.socket.remoteAddress,
1319
+ port: common.getPort(req),
1320
+ proto: encrypted ? 'https' : 'http'
1321
+ };
1322
+ [
1323
+ 'for',
1324
+ 'port',
1325
+ 'proto'
1326
+ ].forEach(function(header) {
1327
+ req.headers['x-forwarded-' + header] = (req.headers['x-forwarded-' + header] || '') + (req.headers['x-forwarded-' + header] ? ',' : '') + values[header];
1328
+ }), req.headers['x-forwarded-host'] = req.headers['x-forwarded-host'] || req.headers.host || '';
1329
+ }
1330
+ },
1331
+ stream: function stream(req, res, options, _, server, clb) {
1332
+ server.emit('start', req, res, options.target || options.forward);
1333
+ var agents = options.followRedirects ? followRedirects : nativeAgents, http = agents.http, https = agents.https;
1334
+ if (options.forward) {
1335
+ var forwardReq = ('https:' === options.forward.protocol ? https : http).request(common.setupOutgoing(options.ssl || {}, options, req, 'forward')), forwardError = createErrorHandler(forwardReq, options.forward);
1336
+ if (req.on('error', forwardError), forwardReq.on('error', forwardError), (options.buffer || req).pipe(forwardReq), !options.target) return res.end();
1337
+ }
1338
+ var proxyReq = ('https:' === options.target.protocol ? https : http).request(common.setupOutgoing(options.ssl || {}, options, req));
1339
+ proxyReq.on('socket', function(socket) {
1340
+ server && !proxyReq.getHeader('expect') && server.emit('proxyReq', proxyReq, req, res, options);
1341
+ }), options.proxyTimeout && proxyReq.setTimeout(options.proxyTimeout, function() {
1342
+ proxyReq.abort();
1343
+ }), req.on('aborted', function() {
1344
+ proxyReq.abort();
1345
+ });
1346
+ var proxyError = createErrorHandler(proxyReq, options.target);
1347
+ function createErrorHandler(proxyReq, url) {
1348
+ return function proxyError(err) {
1349
+ if (req.socket.destroyed && 'ECONNRESET' === err.code) return server.emit('econnreset', err, req, res, url), proxyReq.abort();
1350
+ clb ? clb(err, req, res, url) : server.emit('error', err, req, res, url);
1351
+ };
1352
+ }
1353
+ req.on('error', proxyError), proxyReq.on('error', proxyError), (options.buffer || req).pipe(proxyReq), proxyReq.on('response', function(proxyRes) {
1354
+ if (server && server.emit('proxyRes', proxyRes, req, res), !res.headersSent && !options.selfHandleResponse) for(var i = 0; i < web_o.length && !web_o[i](req, res, proxyRes, options); i++);
1355
+ res.finished ? server && server.emit('end', req, res, proxyRes) : (proxyRes.on('end', function() {
1356
+ server && server.emit('end', req, res, proxyRes);
1357
+ }), options.selfHandleResponse || proxyRes.pipe(res));
1358
+ });
1359
+ }
1360
+ };
1361
+ },
1362
+ "../../node_modules/.pnpm/http-proxy@1.18.1_patch_hash=424b689da454f1f336d635615733f30568882789c1173f861c30f95ba8_7c4b684cae90eb7d05b3dfae37f0ceb4/node_modules/http-proxy/lib/http-proxy/passes/web-outgoing.js" (module, __unused_rspack_exports, __webpack_require__) {
1363
+ var url = __webpack_require__("url"), common = __webpack_require__("../../node_modules/.pnpm/http-proxy@1.18.1_patch_hash=424b689da454f1f336d635615733f30568882789c1173f861c30f95ba8_7c4b684cae90eb7d05b3dfae37f0ceb4/node_modules/http-proxy/lib/http-proxy/common.js"), redirectRegex = /^201|30(1|2|7|8)$/;
1364
+ module.exports = {
1365
+ removeChunked: function removeChunked(req, res, proxyRes) {
1366
+ '1.0' === req.httpVersion && delete proxyRes.headers['transfer-encoding'];
1367
+ },
1368
+ setConnection: function setConnection(req, res, proxyRes) {
1369
+ '1.0' === req.httpVersion ? proxyRes.headers.connection = req.headers.connection || 'close' : '2.0' === req.httpVersion || proxyRes.headers.connection || (proxyRes.headers.connection = req.headers.connection || 'keep-alive');
1370
+ },
1371
+ setRedirectHostRewrite: function setRedirectHostRewrite(req, res, proxyRes, options) {
1372
+ if ((options.hostRewrite || options.autoRewrite || options.protocolRewrite) && proxyRes.headers.location && redirectRegex.test(proxyRes.statusCode)) {
1373
+ var target = url.parse(options.target), u = url.parse(proxyRes.headers.location);
1374
+ target.host == u.host && (options.hostRewrite ? u.host = options.hostRewrite : options.autoRewrite && (u.host = req.headers.host), options.protocolRewrite && (u.protocol = options.protocolRewrite), proxyRes.headers.location = u.format());
1375
+ }
1376
+ },
1377
+ writeHeaders: function writeHeaders(req, res, proxyRes, options) {
1378
+ var rawHeaderKeyMap, rewriteCookieDomainConfig = options.cookieDomainRewrite, rewriteCookiePathConfig = options.cookiePathRewrite, preserveHeaderKeyCase = options.preserveHeaderKeyCase, setHeader = function(key, header) {
1379
+ void 0 != header && (rewriteCookieDomainConfig && 'set-cookie' === key.toLowerCase() && (header = common.rewriteCookieProperty(header, rewriteCookieDomainConfig, 'domain')), rewriteCookiePathConfig && 'set-cookie' === key.toLowerCase() && (header = common.rewriteCookieProperty(header, rewriteCookiePathConfig, 'path')), res.setHeader(String(key).trim(), header));
1380
+ };
1381
+ if ('string' == typeof rewriteCookieDomainConfig && (rewriteCookieDomainConfig = {
1382
+ '*': rewriteCookieDomainConfig
1383
+ }), 'string' == typeof rewriteCookiePathConfig && (rewriteCookiePathConfig = {
1384
+ '*': rewriteCookiePathConfig
1385
+ }), preserveHeaderKeyCase && void 0 != proxyRes.rawHeaders) {
1386
+ rawHeaderKeyMap = {};
1387
+ for(var i = 0; i < proxyRes.rawHeaders.length; i += 2){
1388
+ var key = proxyRes.rawHeaders[i];
1389
+ rawHeaderKeyMap[key.toLowerCase()] = key;
1390
+ }
1391
+ }
1392
+ Object.keys(proxyRes.headers).forEach(function(key) {
1393
+ var header = proxyRes.headers[key];
1394
+ preserveHeaderKeyCase && rawHeaderKeyMap && (key = rawHeaderKeyMap[key] || key), setHeader(key, header);
1395
+ });
1396
+ },
1397
+ writeStatusCode: function writeStatusCode(req, res, proxyRes) {
1398
+ proxyRes.statusMessage ? (res.statusCode = proxyRes.statusCode, res.statusMessage = proxyRes.statusMessage) : res.statusCode = proxyRes.statusCode;
1399
+ }
1400
+ };
1401
+ },
1402
+ "../../node_modules/.pnpm/http-proxy@1.18.1_patch_hash=424b689da454f1f336d635615733f30568882789c1173f861c30f95ba8_7c4b684cae90eb7d05b3dfae37f0ceb4/node_modules/http-proxy/lib/http-proxy/passes/ws-incoming.js" (module, __unused_rspack_exports, __webpack_require__) {
1403
+ var http = __webpack_require__("http"), https = __webpack_require__("https"), common = __webpack_require__("../../node_modules/.pnpm/http-proxy@1.18.1_patch_hash=424b689da454f1f336d635615733f30568882789c1173f861c30f95ba8_7c4b684cae90eb7d05b3dfae37f0ceb4/node_modules/http-proxy/lib/http-proxy/common.js");
1404
+ module.exports = {
1405
+ checkMethodAndHeader: function checkMethodAndHeader(req, socket) {
1406
+ if ('GET' !== req.method || !req.headers.upgrade || 'websocket' !== req.headers.upgrade.toLowerCase()) return socket.destroy(), !0;
1407
+ },
1408
+ XHeaders: function XHeaders(req, socket, options) {
1409
+ if (options.xfwd) {
1410
+ var values = {
1411
+ for: req.connection.remoteAddress || req.socket.remoteAddress,
1412
+ port: common.getPort(req),
1413
+ proto: common.hasEncryptedConnection(req) ? 'wss' : 'ws'
1414
+ };
1415
+ [
1416
+ 'for',
1417
+ 'port',
1418
+ 'proto'
1419
+ ].forEach(function(header) {
1420
+ req.headers['x-forwarded-' + header] = (req.headers['x-forwarded-' + header] || '') + (req.headers['x-forwarded-' + header] ? ',' : '') + values[header];
1421
+ });
1422
+ }
1423
+ },
1424
+ stream: function stream(req, socket, options, head, server, clb) {
1425
+ var createHttpHeader = function(line, headers) {
1426
+ return Object.keys(headers).reduce(function(head, key) {
1427
+ var value = headers[key];
1428
+ if (!Array.isArray(value)) return head.push(key + ': ' + value), head;
1429
+ for(var i = 0; i < value.length; i++)head.push(key + ': ' + value[i]);
1430
+ return head;
1431
+ }, [
1432
+ line
1433
+ ]).join('\r\n') + '\r\n\r\n';
1434
+ };
1435
+ common.setupSocket(socket), head && head.length && socket.unshift(head);
1436
+ var proxyReq = (common.isSSL.test(options.target.protocol) ? https : http).request(common.setupOutgoing(options.ssl || {}, options, req));
1437
+ return server && server.emit('proxyReqWs', proxyReq, req, socket, options, head), proxyReq.on('error', onOutgoingError), proxyReq.on('response', function(res) {
1438
+ res.upgrade || (socket.write(createHttpHeader('HTTP/' + res.httpVersion + ' ' + res.statusCode + ' ' + res.statusMessage, res.headers)), res.pipe(socket));
1439
+ }), proxyReq.on('upgrade', function(proxyRes, proxySocket, proxyHead) {
1440
+ proxySocket.on('error', onOutgoingError), proxySocket.on('end', function() {
1441
+ server.emit('close', proxyRes, proxySocket, proxyHead);
1442
+ }), socket.on('error', function() {
1443
+ proxySocket.end();
1444
+ }), common.setupSocket(proxySocket), proxyHead && proxyHead.length && proxySocket.unshift(proxyHead), socket.write(createHttpHeader('HTTP/1.1 101 Switching Protocols', proxyRes.headers)), proxySocket.pipe(socket).pipe(proxySocket), server.emit('open', proxySocket), server.emit('proxySocket', proxySocket);
1445
+ }), proxyReq.end();
1446
+ function onOutgoingError(err) {
1447
+ clb ? clb(err, req, socket) : server.emit('error', err, req, socket), socket.end();
1448
+ }
1449
+ }
1450
+ };
1451
+ },
1452
+ "../../node_modules/.pnpm/is-extglob@2.1.1/node_modules/is-extglob/index.js" (module) {
1453
+ module.exports = function isExtglob(str) {
1454
+ var match;
1455
+ if ('string' != typeof str || '' === str) return !1;
1456
+ for(; match = /(\\).|([@?!+*]\(.*\))/g.exec(str);){
1457
+ if (match[2]) return !0;
1458
+ str = str.slice(match.index + match[0].length);
1459
+ }
1460
+ return !1;
1461
+ };
1462
+ },
1463
+ "../../node_modules/.pnpm/is-glob@4.0.3/node_modules/is-glob/index.js" (module, __unused_rspack_exports, __webpack_require__) {
1464
+ var isExtglob = __webpack_require__("../../node_modules/.pnpm/is-extglob@2.1.1/node_modules/is-extglob/index.js"), chars = {
1465
+ '{': '}',
1466
+ '(': ')',
1467
+ '[': ']'
1468
+ }, strictCheck = function(str) {
1469
+ if ('!' === str[0]) return !0;
1470
+ for(var index = 0, pipeIndex = -2, closeSquareIndex = -2, closeCurlyIndex = -2, closeParenIndex = -2, backSlashIndex = -2; index < str.length;){
1471
+ if ('*' === str[index] || '?' === str[index + 1] && /[\].+)]/.test(str[index]) || -1 !== closeSquareIndex && '[' === str[index] && ']' !== str[index + 1] && (closeSquareIndex < index && (closeSquareIndex = str.indexOf(']', index)), closeSquareIndex > index) && (-1 === backSlashIndex || backSlashIndex > closeSquareIndex || -1 === (backSlashIndex = str.indexOf('\\', index)) || backSlashIndex > closeSquareIndex) || -1 !== closeCurlyIndex && '{' === str[index] && '}' !== str[index + 1] && (closeCurlyIndex = str.indexOf('}', index)) > index && (-1 === (backSlashIndex = str.indexOf('\\', index)) || backSlashIndex > closeCurlyIndex) || -1 !== closeParenIndex && '(' === str[index] && '?' === str[index + 1] && /[:!=]/.test(str[index + 2]) && ')' !== str[index + 3] && (closeParenIndex = str.indexOf(')', index)) > index && (-1 === (backSlashIndex = str.indexOf('\\', index)) || backSlashIndex > closeParenIndex) || -1 !== pipeIndex && '(' === str[index] && '|' !== str[index + 1] && (pipeIndex < index && (pipeIndex = str.indexOf('|', index)), -1 !== pipeIndex && ')' !== str[pipeIndex + 1] && (closeParenIndex = str.indexOf(')', pipeIndex)) > pipeIndex) && (-1 === (backSlashIndex = str.indexOf('\\', pipeIndex)) || backSlashIndex > closeParenIndex)) return !0;
1472
+ if ('\\' === str[index]) {
1473
+ var open = str[index + 1];
1474
+ index += 2;
1475
+ var close = chars[open];
1476
+ if (close) {
1477
+ var n = str.indexOf(close, index);
1478
+ -1 !== n && (index = n + 1);
1479
+ }
1480
+ if ('!' === str[index]) return !0;
1481
+ } else index++;
1482
+ }
1483
+ return !1;
1484
+ }, relaxedCheck = function(str) {
1485
+ if ('!' === str[0]) return !0;
1486
+ for(var index = 0; index < str.length;){
1487
+ if (/[*?{}()[\]]/.test(str[index])) return !0;
1488
+ if ('\\' === str[index]) {
1489
+ var open = str[index + 1];
1490
+ index += 2;
1491
+ var close = chars[open];
1492
+ if (close) {
1493
+ var n = str.indexOf(close, index);
1494
+ -1 !== n && (index = n + 1);
1495
+ }
1496
+ if ('!' === str[index]) return !0;
1497
+ } else index++;
1498
+ }
1499
+ return !1;
1500
+ };
1501
+ module.exports = function isGlob(str, options) {
1502
+ if ('string' != typeof str || '' === str) return !1;
1503
+ if (isExtglob(str)) return !0;
1504
+ var check = strictCheck;
1505
+ return options && !1 === options.strict && (check = relaxedCheck), check(str);
1506
+ };
1507
+ },
1508
+ "../../node_modules/.pnpm/is-number@7.0.0/node_modules/is-number/index.js" (module) {
1509
+ module.exports = function(num) {
1510
+ return 'number' == typeof num ? num - num == 0 : 'string' == typeof num && '' !== num.trim() && (Number.isFinite ? Number.isFinite(+num) : isFinite(+num));
1511
+ };
1512
+ },
1513
+ "../../node_modules/.pnpm/is-plain-object@5.0.0/node_modules/is-plain-object/dist/is-plain-object.js" (__unused_rspack_module, exports) {
1514
+ function isObject(o) {
1515
+ return '[object Object]' === Object.prototype.toString.call(o);
1516
+ }
1517
+ Object.defineProperty(exports, "__esModule", {
1518
+ value: !0
1519
+ }), exports.isPlainObject = function isPlainObject(o) {
1520
+ var ctor, prot;
1521
+ return !1 !== isObject(o) && (void 0 === (ctor = o.constructor) || !1 !== isObject(prot = ctor.prototype) && !1 !== prot.hasOwnProperty('isPrototypeOf'));
1522
+ };
1523
+ },
1524
+ "../../node_modules/.pnpm/micromatch@4.0.8/node_modules/micromatch/index.js" (module, __unused_rspack_exports, __webpack_require__) {
1525
+ let util = __webpack_require__("util"), braces = __webpack_require__("../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/index.js"), picomatch = __webpack_require__("../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/index.js"), utils = __webpack_require__("../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/utils.js"), isEmptyString = (v)=>'' === v || './' === v, hasBraces = (v)=>{
1526
+ let index = v.indexOf('{');
1527
+ return index > -1 && v.indexOf('}', index) > -1;
1528
+ }, micromatch = (list, patterns, options)=>{
1529
+ patterns = [].concat(patterns), list = [].concat(list);
1530
+ let omit = new Set(), keep = new Set(), items = new Set(), negatives = 0, onResult = (state)=>{
1531
+ items.add(state.output), options && options.onResult && options.onResult(state);
1532
+ };
1533
+ for(let i = 0; i < patterns.length; i++){
1534
+ let isMatch = picomatch(String(patterns[i]), {
1535
+ ...options,
1536
+ onResult
1537
+ }, !0), negated = isMatch.state.negated || isMatch.state.negatedExtglob;
1538
+ for (let item of (negated && negatives++, list)){
1539
+ let matched = isMatch(item, !0);
1540
+ (negated ? !matched.isMatch : matched.isMatch) && (negated ? omit.add(matched.output) : (omit.delete(matched.output), keep.add(matched.output)));
1541
+ }
1542
+ }
1543
+ let matches = (negatives === patterns.length ? [
1544
+ ...items
1545
+ ] : [
1546
+ ...keep
1547
+ ]).filter((item)=>!omit.has(item));
1548
+ if (options && 0 === matches.length) {
1549
+ if (!0 === options.failglob) throw Error(`No matches found for "${patterns.join(', ')}"`);
1550
+ if (!0 === options.nonull || !0 === options.nullglob) return options.unescape ? patterns.map((p)=>p.replace(/\\/g, '')) : patterns;
1551
+ }
1552
+ return matches;
1553
+ };
1554
+ micromatch.match = micromatch, micromatch.matcher = (pattern, options)=>picomatch(pattern, options), micromatch.isMatch = (str, patterns, options)=>picomatch(patterns, options)(str), micromatch.any = micromatch.isMatch, micromatch.not = (list, patterns, options = {})=>{
1555
+ patterns = [].concat(patterns).map(String);
1556
+ let result = new Set(), items = [], matches = new Set(micromatch(list, patterns, {
1557
+ ...options,
1558
+ onResult: (state)=>{
1559
+ options.onResult && options.onResult(state), items.push(state.output);
1560
+ }
1561
+ }));
1562
+ for (let item of items)matches.has(item) || result.add(item);
1563
+ return [
1564
+ ...result
1565
+ ];
1566
+ }, micromatch.contains = (str, pattern, options)=>{
1567
+ if ('string' != typeof str) throw TypeError(`Expected a string: "${util.inspect(str)}"`);
1568
+ if (Array.isArray(pattern)) return pattern.some((p)=>micromatch.contains(str, p, options));
1569
+ if ('string' == typeof pattern) {
1570
+ if (isEmptyString(str) || isEmptyString(pattern)) return !1;
1571
+ if (str.includes(pattern) || str.startsWith('./') && str.slice(2).includes(pattern)) return !0;
1572
+ }
1573
+ return micromatch.isMatch(str, pattern, {
1574
+ ...options,
1575
+ contains: !0
1576
+ });
1577
+ }, micromatch.matchKeys = (obj, patterns, options)=>{
1578
+ if (!utils.isObject(obj)) throw TypeError('Expected the first argument to be an object');
1579
+ let keys = micromatch(Object.keys(obj), patterns, options), res = {};
1580
+ for (let key of keys)res[key] = obj[key];
1581
+ return res;
1582
+ }, micromatch.some = (list, patterns, options)=>{
1583
+ let items = [].concat(list);
1584
+ for (let pattern of [].concat(patterns)){
1585
+ let isMatch = picomatch(String(pattern), options);
1586
+ if (items.some((item)=>isMatch(item))) return !0;
1587
+ }
1588
+ return !1;
1589
+ }, micromatch.every = (list, patterns, options)=>{
1590
+ let items = [].concat(list);
1591
+ for (let pattern of [].concat(patterns)){
1592
+ let isMatch = picomatch(String(pattern), options);
1593
+ if (!items.every((item)=>isMatch(item))) return !1;
1594
+ }
1595
+ return !0;
1596
+ }, micromatch.all = (str, patterns, options)=>{
1597
+ if ('string' != typeof str) throw TypeError(`Expected a string: "${util.inspect(str)}"`);
1598
+ return [].concat(patterns).every((p)=>picomatch(p, options)(str));
1599
+ }, micromatch.capture = (glob, input, options)=>{
1600
+ let posix = utils.isWindows(options), match = picomatch.makeRe(String(glob), {
1601
+ ...options,
1602
+ capture: !0
1603
+ }).exec(posix ? utils.toPosixSlashes(input) : input);
1604
+ if (match) return match.slice(1).map((v)=>void 0 === v ? '' : v);
1605
+ }, micromatch.makeRe = (...args)=>picomatch.makeRe(...args), micromatch.scan = (...args)=>picomatch.scan(...args), micromatch.parse = (patterns, options)=>{
1606
+ let res = [];
1607
+ for (let pattern of [].concat(patterns || []))for (let str of braces(String(pattern), options))res.push(picomatch.parse(str, options));
1608
+ return res;
1609
+ }, micromatch.braces = (pattern, options)=>{
1610
+ if ('string' != typeof pattern) throw TypeError('Expected a string');
1611
+ return options && !0 === options.nobrace || !hasBraces(pattern) ? [
1612
+ pattern
1613
+ ] : braces(pattern, options);
1614
+ }, micromatch.braceExpand = (pattern, options)=>{
1615
+ if ('string' != typeof pattern) throw TypeError('Expected a string');
1616
+ return micromatch.braces(pattern, {
1617
+ ...options,
1618
+ expand: !0
1619
+ });
1620
+ }, micromatch.hasBraces = hasBraces, module.exports = micromatch;
1621
+ },
1622
+ "../../node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js" (module) {
1623
+ function parse(str) {
1624
+ if (!((str = String(str)).length > 100)) {
1625
+ var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(str);
1626
+ if (match) {
1627
+ var n = parseFloat(match[1]);
1628
+ switch((match[2] || 'ms').toLowerCase()){
1629
+ case 'years':
1630
+ case 'year':
1631
+ case 'yrs':
1632
+ case 'yr':
1633
+ case 'y':
1634
+ return 31557600000 * n;
1635
+ case 'weeks':
1636
+ case 'week':
1637
+ case 'w':
1638
+ return 604800000 * n;
1639
+ case 'days':
1640
+ case 'day':
1641
+ case 'd':
1642
+ return 86400000 * n;
1643
+ case 'hours':
1644
+ case 'hour':
1645
+ case 'hrs':
1646
+ case 'hr':
1647
+ case 'h':
1648
+ return 3600000 * n;
1649
+ case 'minutes':
1650
+ case 'minute':
1651
+ case 'mins':
1652
+ case 'min':
1653
+ case 'm':
1654
+ return 60000 * n;
1655
+ case 'seconds':
1656
+ case 'second':
1657
+ case 'secs':
1658
+ case 'sec':
1659
+ case 's':
1660
+ return 1000 * n;
1661
+ case 'milliseconds':
1662
+ case 'millisecond':
1663
+ case 'msecs':
1664
+ case 'msec':
1665
+ case 'ms':
1666
+ return n;
1667
+ default:
1668
+ return;
1669
+ }
1670
+ }
1671
+ }
1672
+ }
1673
+ function fmtShort(ms) {
1674
+ var msAbs = Math.abs(ms);
1675
+ return msAbs >= 86400000 ? Math.round(ms / 86400000) + 'd' : msAbs >= 3600000 ? Math.round(ms / 3600000) + 'h' : msAbs >= 60000 ? Math.round(ms / 60000) + 'm' : msAbs >= 1000 ? Math.round(ms / 1000) + 's' : ms + 'ms';
1676
+ }
1677
+ function fmtLong(ms) {
1678
+ var msAbs = Math.abs(ms);
1679
+ return msAbs >= 86400000 ? plural(ms, msAbs, 86400000, 'day') : msAbs >= 3600000 ? plural(ms, msAbs, 3600000, 'hour') : msAbs >= 60000 ? plural(ms, msAbs, 60000, 'minute') : msAbs >= 1000 ? plural(ms, msAbs, 1000, 'second') : ms + ' ms';
1680
+ }
1681
+ function plural(ms, msAbs, n, name) {
1682
+ return Math.round(ms / n) + ' ' + name + (msAbs >= 1.5 * n ? 's' : '');
1683
+ }
1684
+ module.exports = function(val, options) {
1685
+ options = options || {};
1686
+ var type = typeof val;
1687
+ if ('string' === type && val.length > 0) return parse(val);
1688
+ if ('number' === type && isFinite(val)) return options.long ? fmtLong(val) : fmtShort(val);
1689
+ throw Error('val is not a non-empty string or a valid number. val=' + JSON.stringify(val));
1690
+ };
1691
+ },
1692
+ "../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/index.js" (module, __unused_rspack_exports, __webpack_require__) {
1693
+ module.exports = __webpack_require__("../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/picomatch.js");
1694
+ },
1695
+ "../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/constants.js" (module, __unused_rspack_exports, __webpack_require__) {
1696
+ let path = __webpack_require__("path"), WIN_NO_SLASH = "[^\\\\/]", QMARK = '[^/]', END_ANCHOR = "(?:\\/|$)", START_ANCHOR = "(?:^|\\/)", DOTS_SLASH = `\\.{1,2}${END_ANCHOR}`, NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`, NO_DOT_SLASH = `(?!\\.{0,1}${END_ANCHOR})`, NO_DOTS_SLASH = `(?!${DOTS_SLASH})`, STAR = `${QMARK}*?`, POSIX_CHARS = {
1697
+ DOT_LITERAL: '\\.',
1698
+ PLUS_LITERAL: '\\+',
1699
+ QMARK_LITERAL: '\\?',
1700
+ SLASH_LITERAL: '\\/',
1701
+ ONE_CHAR: '(?=.)',
1702
+ QMARK,
1703
+ END_ANCHOR,
1704
+ DOTS_SLASH,
1705
+ NO_DOT: "(?!\\.)",
1706
+ NO_DOTS,
1707
+ NO_DOT_SLASH,
1708
+ NO_DOTS_SLASH,
1709
+ QMARK_NO_DOT: "[^.\\/]",
1710
+ STAR,
1711
+ START_ANCHOR
1712
+ }, WINDOWS_CHARS = {
1713
+ ...POSIX_CHARS,
1714
+ SLASH_LITERAL: "[\\\\/]",
1715
+ QMARK: WIN_NO_SLASH,
1716
+ STAR: `${WIN_NO_SLASH}*?`,
1717
+ DOTS_SLASH: "\\.{1,2}(?:[\\\\/]|$)",
1718
+ NO_DOT: "(?!\\.)",
1719
+ NO_DOTS: "(?!(?:^|[\\\\/])\\.{1,2}(?:[\\\\/]|$))",
1720
+ NO_DOT_SLASH: "(?!\\.{0,1}(?:[\\\\/]|$))",
1721
+ NO_DOTS_SLASH: "(?!\\.{1,2}(?:[\\\\/]|$))",
1722
+ QMARK_NO_DOT: "[^.\\\\/]",
1723
+ START_ANCHOR: "(?:^|[\\\\/])",
1724
+ END_ANCHOR: "(?:[\\\\/]|$)"
1725
+ };
1726
+ module.exports = {
1727
+ MAX_LENGTH: 65536,
1728
+ POSIX_REGEX_SOURCE: {
1729
+ alnum: 'a-zA-Z0-9',
1730
+ alpha: 'a-zA-Z',
1731
+ ascii: '\\x00-\\x7F',
1732
+ blank: ' \\t',
1733
+ cntrl: '\\x00-\\x1F\\x7F',
1734
+ digit: '0-9',
1735
+ graph: '\\x21-\\x7E',
1736
+ lower: 'a-z',
1737
+ print: '\\x20-\\x7E ',
1738
+ punct: '\\-!"#$%&\'()\\*+,./:;<=>?@[\\]^_`{|}~',
1739
+ space: ' \\t\\r\\n\\v\\f',
1740
+ upper: 'A-Z',
1741
+ word: 'A-Za-z0-9_',
1742
+ xdigit: 'A-Fa-f0-9'
1743
+ },
1744
+ REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g,
1745
+ REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/,
1746
+ REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/,
1747
+ REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g,
1748
+ REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g,
1749
+ REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g,
1750
+ REPLACEMENTS: {
1751
+ '***': '*',
1752
+ '**/**': '**',
1753
+ '**/**/**': '**'
1754
+ },
1755
+ CHAR_0: 48,
1756
+ CHAR_9: 57,
1757
+ CHAR_UPPERCASE_A: 65,
1758
+ CHAR_LOWERCASE_A: 97,
1759
+ CHAR_UPPERCASE_Z: 90,
1760
+ CHAR_LOWERCASE_Z: 122,
1761
+ CHAR_LEFT_PARENTHESES: 40,
1762
+ CHAR_RIGHT_PARENTHESES: 41,
1763
+ CHAR_ASTERISK: 42,
1764
+ CHAR_AMPERSAND: 38,
1765
+ CHAR_AT: 64,
1766
+ CHAR_BACKWARD_SLASH: 92,
1767
+ CHAR_CARRIAGE_RETURN: 13,
1768
+ CHAR_CIRCUMFLEX_ACCENT: 94,
1769
+ CHAR_COLON: 58,
1770
+ CHAR_COMMA: 44,
1771
+ CHAR_DOT: 46,
1772
+ CHAR_DOUBLE_QUOTE: 34,
1773
+ CHAR_EQUAL: 61,
1774
+ CHAR_EXCLAMATION_MARK: 33,
1775
+ CHAR_FORM_FEED: 12,
1776
+ CHAR_FORWARD_SLASH: 47,
1777
+ CHAR_GRAVE_ACCENT: 96,
1778
+ CHAR_HASH: 35,
1779
+ CHAR_HYPHEN_MINUS: 45,
1780
+ CHAR_LEFT_ANGLE_BRACKET: 60,
1781
+ CHAR_LEFT_CURLY_BRACE: 123,
1782
+ CHAR_LEFT_SQUARE_BRACKET: 91,
1783
+ CHAR_LINE_FEED: 10,
1784
+ CHAR_NO_BREAK_SPACE: 160,
1785
+ CHAR_PERCENT: 37,
1786
+ CHAR_PLUS: 43,
1787
+ CHAR_QUESTION_MARK: 63,
1788
+ CHAR_RIGHT_ANGLE_BRACKET: 62,
1789
+ CHAR_RIGHT_CURLY_BRACE: 125,
1790
+ CHAR_RIGHT_SQUARE_BRACKET: 93,
1791
+ CHAR_SEMICOLON: 59,
1792
+ CHAR_SINGLE_QUOTE: 39,
1793
+ CHAR_SPACE: 32,
1794
+ CHAR_TAB: 9,
1795
+ CHAR_UNDERSCORE: 95,
1796
+ CHAR_VERTICAL_LINE: 124,
1797
+ CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
1798
+ SEP: path.sep,
1799
+ extglobChars: (chars)=>({
1800
+ '!': {
1801
+ type: 'negate',
1802
+ open: '(?:(?!(?:',
1803
+ close: `))${chars.STAR})`
1804
+ },
1805
+ '?': {
1806
+ type: 'qmark',
1807
+ open: '(?:',
1808
+ close: ')?'
1809
+ },
1810
+ '+': {
1811
+ type: 'plus',
1812
+ open: '(?:',
1813
+ close: ')+'
1814
+ },
1815
+ '*': {
1816
+ type: 'star',
1817
+ open: '(?:',
1818
+ close: ')*'
1819
+ },
1820
+ '@': {
1821
+ type: 'at',
1822
+ open: '(?:',
1823
+ close: ')'
1824
+ }
1825
+ }),
1826
+ globChars: (win32)=>!0 === win32 ? WINDOWS_CHARS : POSIX_CHARS
1827
+ };
1828
+ },
1829
+ "../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/parse.js" (module, __unused_rspack_exports, __webpack_require__) {
1830
+ let constants = __webpack_require__("../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/constants.js"), utils = __webpack_require__("../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/utils.js"), { MAX_LENGTH, POSIX_REGEX_SOURCE, REGEX_NON_SPECIAL_CHARS, REGEX_SPECIAL_CHARS_BACKREF, REPLACEMENTS } = constants, expandRange = (args, options)=>{
1831
+ if ('function' == typeof options.expandRange) return options.expandRange(...args, options);
1832
+ args.sort();
1833
+ let value = `[${args.join('-')}]`;
1834
+ try {
1835
+ new RegExp(value);
1836
+ } catch (ex) {
1837
+ return args.map((v)=>utils.escapeRegex(v)).join('..');
1838
+ }
1839
+ return value;
1840
+ }, syntaxError = (type, char)=>`Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`, parse = (input, options)=>{
1841
+ let value;
1842
+ if ('string' != typeof input) throw TypeError('Expected a string');
1843
+ input = REPLACEMENTS[input] || input;
1844
+ let opts = {
1845
+ ...options
1846
+ }, max = 'number' == typeof opts.maxLength ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH, len = input.length;
1847
+ if (len > max) throw SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
1848
+ let bos = {
1849
+ type: 'bos',
1850
+ value: '',
1851
+ output: opts.prepend || ''
1852
+ }, tokens = [
1853
+ bos
1854
+ ], capture = opts.capture ? '' : '?:', win32 = utils.isWindows(options), PLATFORM_CHARS = constants.globChars(win32), EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS), { DOT_LITERAL, PLUS_LITERAL, SLASH_LITERAL, ONE_CHAR, DOTS_SLASH, NO_DOT, NO_DOT_SLASH, NO_DOTS_SLASH, QMARK, QMARK_NO_DOT, STAR, START_ANCHOR } = PLATFORM_CHARS, globstar = (opts)=>`(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`, nodot = opts.dot ? '' : NO_DOT, qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT, star = !0 === opts.bash ? globstar(opts) : STAR;
1855
+ opts.capture && (star = `(${star})`), 'boolean' == typeof opts.noext && (opts.noextglob = opts.noext);
1856
+ let state = {
1857
+ input,
1858
+ index: -1,
1859
+ start: 0,
1860
+ dot: !0 === opts.dot,
1861
+ consumed: '',
1862
+ output: '',
1863
+ prefix: '',
1864
+ backtrack: !1,
1865
+ negated: !1,
1866
+ brackets: 0,
1867
+ braces: 0,
1868
+ parens: 0,
1869
+ quotes: 0,
1870
+ globstar: !1,
1871
+ tokens
1872
+ };
1873
+ len = (input = utils.removePrefix(input, state)).length;
1874
+ let extglobs = [], braces = [], stack = [], prev = bos, eos = ()=>state.index === len - 1, peek = state.peek = (n = 1)=>input[state.index + n], advance = state.advance = ()=>input[++state.index] || '', remaining = ()=>input.slice(state.index + 1), consume = (value = '', num = 0)=>{
1875
+ state.consumed += value, state.index += num;
1876
+ }, append = (token)=>{
1877
+ state.output += null != token.output ? token.output : token.value, consume(token.value);
1878
+ }, negate = ()=>{
1879
+ let count = 1;
1880
+ for(; '!' === peek() && ('(' !== peek(2) || '?' === peek(3));)advance(), state.start++, count++;
1881
+ return count % 2 != 0 && (state.negated = !0, state.start++, !0);
1882
+ }, increment = (type)=>{
1883
+ state[type]++, stack.push(type);
1884
+ }, decrement = (type)=>{
1885
+ state[type]--, stack.pop();
1886
+ }, push = (tok)=>{
1887
+ if ('globstar' === prev.type) {
1888
+ let isBrace = state.braces > 0 && ('comma' === tok.type || 'brace' === tok.type), isExtglob = !0 === tok.extglob || extglobs.length && ('pipe' === tok.type || 'paren' === tok.type);
1889
+ 'slash' === tok.type || 'paren' === tok.type || isBrace || isExtglob || (state.output = state.output.slice(0, -prev.output.length), prev.type = 'star', prev.value = '*', prev.output = star, state.output += prev.output);
1890
+ }
1891
+ if (extglobs.length && 'paren' !== tok.type && (extglobs[extglobs.length - 1].inner += tok.value), (tok.value || tok.output) && append(tok), prev && 'text' === prev.type && 'text' === tok.type) {
1892
+ prev.value += tok.value, prev.output = (prev.output || '') + tok.value;
1893
+ return;
1894
+ }
1895
+ tok.prev = prev, tokens.push(tok), prev = tok;
1896
+ }, extglobOpen = (type, value)=>{
1897
+ let token = {
1898
+ ...EXTGLOB_CHARS[value],
1899
+ conditions: 1,
1900
+ inner: ''
1901
+ };
1902
+ token.prev = prev, token.parens = state.parens, token.output = state.output;
1903
+ let output = (opts.capture ? '(' : '') + token.open;
1904
+ increment('parens'), push({
1905
+ type,
1906
+ value,
1907
+ output: state.output ? '' : ONE_CHAR
1908
+ }), push({
1909
+ type: 'paren',
1910
+ extglob: !0,
1911
+ value: advance(),
1912
+ output
1913
+ }), extglobs.push(token);
1914
+ }, extglobClose = (token)=>{
1915
+ let rest, output = token.close + (opts.capture ? ')' : '');
1916
+ if ('negate' === token.type) {
1917
+ let extglobStar = star;
1918
+ if (token.inner && token.inner.length > 1 && token.inner.includes('/') && (extglobStar = globstar(opts)), (extglobStar !== star || eos() || /^\)+$/.test(remaining())) && (output = token.close = `)$))${extglobStar}`), token.inner.includes('*') && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) {
1919
+ let expression = parse(rest, {
1920
+ ...options,
1921
+ fastpaths: !1
1922
+ }).output;
1923
+ output = token.close = `)${expression})${extglobStar})`;
1924
+ }
1925
+ 'bos' === token.prev.type && (state.negatedExtglob = !0);
1926
+ }
1927
+ push({
1928
+ type: 'paren',
1929
+ extglob: !0,
1930
+ value,
1931
+ output
1932
+ }), decrement('parens');
1933
+ };
1934
+ if (!1 !== opts.fastpaths && !/(^[*!]|[/()[\]{}"])/.test(input)) {
1935
+ let backslashes = !1, output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index)=>'\\' === first ? (backslashes = !0, m) : '?' === first ? esc ? esc + first + (rest ? QMARK.repeat(rest.length) : '') : 0 === index ? qmarkNoDot + (rest ? QMARK.repeat(rest.length) : '') : QMARK.repeat(chars.length) : '.' === first ? DOT_LITERAL.repeat(chars.length) : '*' === first ? esc ? esc + first + (rest ? star : '') : star : esc ? m : `\\${m}`);
1936
+ return (!0 === backslashes && (output = !0 === opts.unescape ? output.replace(/\\/g, '') : output.replace(/\\+/g, (m)=>m.length % 2 == 0 ? '\\\\' : m ? '\\' : '')), output === input && !0 === opts.contains) ? state.output = input : state.output = utils.wrapOutput(output, state, options), state;
1937
+ }
1938
+ for(; !eos();){
1939
+ if ('\u0000' === (value = advance())) continue;
1940
+ if ('\\' === value) {
1941
+ let next = peek();
1942
+ if ('/' === next && !0 !== opts.bash || '.' === next || ';' === next) continue;
1943
+ if (!next) {
1944
+ push({
1945
+ type: 'text',
1946
+ value: value += '\\'
1947
+ });
1948
+ continue;
1949
+ }
1950
+ let match = /^\\+/.exec(remaining()), slashes = 0;
1951
+ if (match && match[0].length > 2 && (slashes = match[0].length, state.index += slashes, slashes % 2 != 0 && (value += '\\')), !0 === opts.unescape ? value = advance() : value += advance(), 0 === state.brackets) {
1952
+ push({
1953
+ type: 'text',
1954
+ value
1955
+ });
1956
+ continue;
1957
+ }
1958
+ }
1959
+ if (state.brackets > 0 && (']' !== value || '[' === prev.value || '[^' === prev.value)) {
1960
+ if (!1 !== opts.posix && ':' === value) {
1961
+ let inner = prev.value.slice(1);
1962
+ if (inner.includes('[') && (prev.posix = !0, inner.includes(':'))) {
1963
+ let idx = prev.value.lastIndexOf('['), pre = prev.value.slice(0, idx), posix = POSIX_REGEX_SOURCE[prev.value.slice(idx + 2)];
1964
+ if (posix) {
1965
+ prev.value = pre + posix, state.backtrack = !0, advance(), bos.output || 1 !== tokens.indexOf(prev) || (bos.output = ONE_CHAR);
1966
+ continue;
1967
+ }
1968
+ }
1969
+ }
1970
+ ('[' === value && ':' !== peek() || '-' === value && ']' === peek()) && (value = `\\${value}`), ']' === value && ('[' === prev.value || '[^' === prev.value) && (value = `\\${value}`), !0 === opts.posix && '!' === value && '[' === prev.value && (value = '^'), prev.value += value, append({
1971
+ value
1972
+ });
1973
+ continue;
1974
+ }
1975
+ if (1 === state.quotes && '"' !== value) {
1976
+ value = utils.escapeRegex(value), prev.value += value, append({
1977
+ value
1978
+ });
1979
+ continue;
1980
+ }
1981
+ if ('"' === value) {
1982
+ state.quotes = +(1 !== state.quotes), !0 === opts.keepQuotes && push({
1983
+ type: 'text',
1984
+ value
1985
+ });
1986
+ continue;
1987
+ }
1988
+ if ('(' === value) {
1989
+ increment('parens'), push({
1990
+ type: 'paren',
1991
+ value
1992
+ });
1993
+ continue;
1994
+ }
1995
+ if (')' === value) {
1996
+ if (0 === state.parens && !0 === opts.strictBrackets) throw SyntaxError(syntaxError('opening', '('));
1997
+ let extglob = extglobs[extglobs.length - 1];
1998
+ if (extglob && state.parens === extglob.parens + 1) {
1999
+ extglobClose(extglobs.pop());
2000
+ continue;
2001
+ }
2002
+ push({
2003
+ type: 'paren',
2004
+ value,
2005
+ output: state.parens ? ')' : '\\)'
2006
+ }), decrement('parens');
2007
+ continue;
2008
+ }
2009
+ if ('[' === value) {
2010
+ if (!0 !== opts.nobracket && remaining().includes(']')) increment('brackets');
2011
+ else {
2012
+ if (!0 !== opts.nobracket && !0 === opts.strictBrackets) throw SyntaxError(syntaxError('closing', ']'));
2013
+ value = `\\${value}`;
2014
+ }
2015
+ push({
2016
+ type: 'bracket',
2017
+ value
2018
+ });
2019
+ continue;
2020
+ }
2021
+ if (']' === value) {
2022
+ if (!0 === opts.nobracket || prev && 'bracket' === prev.type && 1 === prev.value.length) {
2023
+ push({
2024
+ type: 'text',
2025
+ value,
2026
+ output: `\\${value}`
2027
+ });
2028
+ continue;
2029
+ }
2030
+ if (0 === state.brackets) {
2031
+ if (!0 === opts.strictBrackets) throw SyntaxError(syntaxError('opening', '['));
2032
+ push({
2033
+ type: 'text',
2034
+ value,
2035
+ output: `\\${value}`
2036
+ });
2037
+ continue;
2038
+ }
2039
+ decrement('brackets');
2040
+ let prevValue = prev.value.slice(1);
2041
+ if (!0 === prev.posix || '^' !== prevValue[0] || prevValue.includes('/') || (value = `/${value}`), prev.value += value, append({
2042
+ value
2043
+ }), !1 === opts.literalBrackets || utils.hasRegexChars(prevValue)) continue;
2044
+ let escaped = utils.escapeRegex(prev.value);
2045
+ if (state.output = state.output.slice(0, -prev.value.length), !0 === opts.literalBrackets) {
2046
+ state.output += escaped, prev.value = escaped;
2047
+ continue;
2048
+ }
2049
+ prev.value = `(${capture}${escaped}|${prev.value})`, state.output += prev.value;
2050
+ continue;
2051
+ }
2052
+ if ('{' === value && !0 !== opts.nobrace) {
2053
+ increment('braces');
2054
+ let open = {
2055
+ type: 'brace',
2056
+ value,
2057
+ output: '(',
2058
+ outputIndex: state.output.length,
2059
+ tokensIndex: state.tokens.length
2060
+ };
2061
+ braces.push(open), push(open);
2062
+ continue;
2063
+ }
2064
+ if ('}' === value) {
2065
+ let brace = braces[braces.length - 1];
2066
+ if (!0 === opts.nobrace || !brace) {
2067
+ push({
2068
+ type: 'text',
2069
+ value,
2070
+ output: value
2071
+ });
2072
+ continue;
2073
+ }
2074
+ let output = ')';
2075
+ if (!0 === brace.dots) {
2076
+ let arr = tokens.slice(), range = [];
2077
+ for(let i = arr.length - 1; i >= 0 && (tokens.pop(), 'brace' !== arr[i].type); i--)'dots' !== arr[i].type && range.unshift(arr[i].value);
2078
+ output = expandRange(range, opts), state.backtrack = !0;
2079
+ }
2080
+ if (!0 !== brace.comma && !0 !== brace.dots) {
2081
+ let out = state.output.slice(0, brace.outputIndex), toks = state.tokens.slice(brace.tokensIndex);
2082
+ for (let t of (brace.value = brace.output = '\\{', value = output = '\\}', state.output = out, toks))state.output += t.output || t.value;
2083
+ }
2084
+ push({
2085
+ type: 'brace',
2086
+ value,
2087
+ output
2088
+ }), decrement('braces'), braces.pop();
2089
+ continue;
2090
+ }
2091
+ if ('|' === value) {
2092
+ extglobs.length > 0 && extglobs[extglobs.length - 1].conditions++, push({
2093
+ type: 'text',
2094
+ value
2095
+ });
2096
+ continue;
2097
+ }
2098
+ if (',' === value) {
2099
+ let output = value, brace = braces[braces.length - 1];
2100
+ brace && 'braces' === stack[stack.length - 1] && (brace.comma = !0, output = '|'), push({
2101
+ type: 'comma',
2102
+ value,
2103
+ output
2104
+ });
2105
+ continue;
2106
+ }
2107
+ if ('/' === value) {
2108
+ if ('dot' === prev.type && state.index === state.start + 1) {
2109
+ state.start = state.index + 1, state.consumed = '', state.output = '', tokens.pop(), prev = bos;
2110
+ continue;
2111
+ }
2112
+ push({
2113
+ type: 'slash',
2114
+ value,
2115
+ output: SLASH_LITERAL
2116
+ });
2117
+ continue;
2118
+ }
2119
+ if ('.' === value) {
2120
+ if (state.braces > 0 && 'dot' === prev.type) {
2121
+ '.' === prev.value && (prev.output = DOT_LITERAL);
2122
+ let brace = braces[braces.length - 1];
2123
+ prev.type = 'dots', prev.output += value, prev.value += value, brace.dots = !0;
2124
+ continue;
2125
+ }
2126
+ if (state.braces + state.parens === 0 && 'bos' !== prev.type && 'slash' !== prev.type) {
2127
+ push({
2128
+ type: 'text',
2129
+ value,
2130
+ output: DOT_LITERAL
2131
+ });
2132
+ continue;
2133
+ }
2134
+ push({
2135
+ type: 'dot',
2136
+ value,
2137
+ output: DOT_LITERAL
2138
+ });
2139
+ continue;
2140
+ }
2141
+ if ('?' === value) {
2142
+ if (!(prev && '(' === prev.value) && !0 !== opts.noextglob && '(' === peek() && '?' !== peek(2)) {
2143
+ extglobOpen('qmark', value);
2144
+ continue;
2145
+ }
2146
+ if (prev && 'paren' === prev.type) {
2147
+ let next = peek(), output = value;
2148
+ if ('<' === next && !utils.supportsLookbehinds()) throw Error('Node.js v10 or higher is required for regex lookbehinds');
2149
+ ('(' !== prev.value || /[!=<:]/.test(next)) && ('<' !== next || /<([!=]|\w+>)/.test(remaining())) || (output = `\\${value}`), push({
2150
+ type: 'text',
2151
+ value,
2152
+ output
2153
+ });
2154
+ continue;
2155
+ }
2156
+ if (!0 !== opts.dot && ('slash' === prev.type || 'bos' === prev.type)) {
2157
+ push({
2158
+ type: 'qmark',
2159
+ value,
2160
+ output: QMARK_NO_DOT
2161
+ });
2162
+ continue;
2163
+ }
2164
+ push({
2165
+ type: 'qmark',
2166
+ value,
2167
+ output: QMARK
2168
+ });
2169
+ continue;
2170
+ }
2171
+ if ('!' === value) {
2172
+ if (!0 !== opts.noextglob && '(' === peek() && ('?' !== peek(2) || !/[!=<:]/.test(peek(3)))) {
2173
+ extglobOpen('negate', value);
2174
+ continue;
2175
+ }
2176
+ if (!0 !== opts.nonegate && 0 === state.index) {
2177
+ negate();
2178
+ continue;
2179
+ }
2180
+ }
2181
+ if ('+' === value) {
2182
+ if (!0 !== opts.noextglob && '(' === peek() && '?' !== peek(2)) {
2183
+ extglobOpen('plus', value);
2184
+ continue;
2185
+ }
2186
+ if (prev && '(' === prev.value || !1 === opts.regex) {
2187
+ push({
2188
+ type: 'plus',
2189
+ value,
2190
+ output: PLUS_LITERAL
2191
+ });
2192
+ continue;
2193
+ }
2194
+ if (prev && ('bracket' === prev.type || 'paren' === prev.type || 'brace' === prev.type) || state.parens > 0) {
2195
+ push({
2196
+ type: 'plus',
2197
+ value
2198
+ });
2199
+ continue;
2200
+ }
2201
+ push({
2202
+ type: 'plus',
2203
+ value: PLUS_LITERAL
2204
+ });
2205
+ continue;
2206
+ }
2207
+ if ('@' === value) {
2208
+ if (!0 !== opts.noextglob && '(' === peek() && '?' !== peek(2)) {
2209
+ push({
2210
+ type: 'at',
2211
+ extglob: !0,
2212
+ value,
2213
+ output: ''
2214
+ });
2215
+ continue;
2216
+ }
2217
+ push({
2218
+ type: 'text',
2219
+ value
2220
+ });
2221
+ continue;
2222
+ }
2223
+ if ('*' !== value) {
2224
+ ('$' === value || '^' === value) && (value = `\\${value}`);
2225
+ let match = REGEX_NON_SPECIAL_CHARS.exec(remaining());
2226
+ match && (value += match[0], state.index += match[0].length), push({
2227
+ type: 'text',
2228
+ value
2229
+ });
2230
+ continue;
2231
+ }
2232
+ if (prev && ('globstar' === prev.type || !0 === prev.star)) {
2233
+ prev.type = 'star', prev.star = !0, prev.value += value, prev.output = star, state.backtrack = !0, state.globstar = !0, consume(value);
2234
+ continue;
2235
+ }
2236
+ let rest = remaining();
2237
+ if (!0 !== opts.noextglob && /^\([^?]/.test(rest)) {
2238
+ extglobOpen('star', value);
2239
+ continue;
2240
+ }
2241
+ if ('star' === prev.type) {
2242
+ if (!0 === opts.noglobstar) {
2243
+ consume(value);
2244
+ continue;
2245
+ }
2246
+ let prior = prev.prev, before = prior.prev, isStart = 'slash' === prior.type || 'bos' === prior.type, afterStar = before && ('star' === before.type || 'globstar' === before.type);
2247
+ if (!0 === opts.bash && (!isStart || rest[0] && '/' !== rest[0])) {
2248
+ push({
2249
+ type: 'star',
2250
+ value,
2251
+ output: ''
2252
+ });
2253
+ continue;
2254
+ }
2255
+ let isBrace = state.braces > 0 && ('comma' === prior.type || 'brace' === prior.type), isExtglob = extglobs.length && ('pipe' === prior.type || 'paren' === prior.type);
2256
+ if (!isStart && 'paren' !== prior.type && !isBrace && !isExtglob) {
2257
+ push({
2258
+ type: 'star',
2259
+ value,
2260
+ output: ''
2261
+ });
2262
+ continue;
2263
+ }
2264
+ for(; '/**' === rest.slice(0, 3);){
2265
+ let after = input[state.index + 4];
2266
+ if (after && '/' !== after) break;
2267
+ rest = rest.slice(3), consume('/**', 3);
2268
+ }
2269
+ if ('bos' === prior.type && eos()) {
2270
+ prev.type = 'globstar', prev.value += value, prev.output = globstar(opts), state.output = prev.output, state.globstar = !0, consume(value);
2271
+ continue;
2272
+ }
2273
+ if ('slash' === prior.type && 'bos' !== prior.prev.type && !afterStar && eos()) {
2274
+ state.output = state.output.slice(0, -(prior.output + prev.output).length), prior.output = `(?:${prior.output}`, prev.type = 'globstar', prev.output = globstar(opts) + (opts.strictSlashes ? ')' : '|$)'), prev.value += value, state.globstar = !0, state.output += prior.output + prev.output, consume(value);
2275
+ continue;
2276
+ }
2277
+ if ('slash' === prior.type && 'bos' !== prior.prev.type && '/' === rest[0]) {
2278
+ let end = void 0 !== rest[1] ? '|$' : '';
2279
+ state.output = state.output.slice(0, -(prior.output + prev.output).length), prior.output = `(?:${prior.output}`, prev.type = 'globstar', prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`, prev.value += value, state.output += prior.output + prev.output, state.globstar = !0, consume(value + advance()), push({
2280
+ type: 'slash',
2281
+ value: '/',
2282
+ output: ''
2283
+ });
2284
+ continue;
2285
+ }
2286
+ if ('bos' === prior.type && '/' === rest[0]) {
2287
+ prev.type = 'globstar', prev.value += value, prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`, state.output = prev.output, state.globstar = !0, consume(value + advance()), push({
2288
+ type: 'slash',
2289
+ value: '/',
2290
+ output: ''
2291
+ });
2292
+ continue;
2293
+ }
2294
+ state.output = state.output.slice(0, -prev.output.length), prev.type = 'globstar', prev.output = globstar(opts), prev.value += value, state.output += prev.output, state.globstar = !0, consume(value);
2295
+ continue;
2296
+ }
2297
+ let token = {
2298
+ type: 'star',
2299
+ value,
2300
+ output: star
2301
+ };
2302
+ if (!0 === opts.bash) {
2303
+ token.output = '.*?', ('bos' === prev.type || 'slash' === prev.type) && (token.output = nodot + token.output), push(token);
2304
+ continue;
2305
+ }
2306
+ if (prev && ('bracket' === prev.type || 'paren' === prev.type) && !0 === opts.regex) {
2307
+ token.output = value, push(token);
2308
+ continue;
2309
+ }
2310
+ (state.index === state.start || 'slash' === prev.type || 'dot' === prev.type) && ('dot' === prev.type ? (state.output += NO_DOT_SLASH, prev.output += NO_DOT_SLASH) : !0 === opts.dot ? (state.output += NO_DOTS_SLASH, prev.output += NO_DOTS_SLASH) : (state.output += nodot, prev.output += nodot), '*' !== peek() && (state.output += ONE_CHAR, prev.output += ONE_CHAR)), push(token);
2311
+ }
2312
+ for(; state.brackets > 0;){
2313
+ if (!0 === opts.strictBrackets) throw SyntaxError(syntaxError('closing', ']'));
2314
+ state.output = utils.escapeLast(state.output, '['), decrement('brackets');
2315
+ }
2316
+ for(; state.parens > 0;){
2317
+ if (!0 === opts.strictBrackets) throw SyntaxError(syntaxError('closing', ')'));
2318
+ state.output = utils.escapeLast(state.output, '('), decrement('parens');
2319
+ }
2320
+ for(; state.braces > 0;){
2321
+ if (!0 === opts.strictBrackets) throw SyntaxError(syntaxError('closing', '}'));
2322
+ state.output = utils.escapeLast(state.output, '{'), decrement('braces');
2323
+ }
2324
+ if (!0 !== opts.strictSlashes && ('star' === prev.type || 'bracket' === prev.type) && push({
2325
+ type: 'maybe_slash',
2326
+ value: '',
2327
+ output: `${SLASH_LITERAL}?`
2328
+ }), !0 === state.backtrack) for (let token of (state.output = '', state.tokens))state.output += null != token.output ? token.output : token.value, token.suffix && (state.output += token.suffix);
2329
+ return state;
2330
+ };
2331
+ parse.fastpaths = (input, options)=>{
2332
+ let opts = {
2333
+ ...options
2334
+ }, max = 'number' == typeof opts.maxLength ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH, len = input.length;
2335
+ if (len > max) throw SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
2336
+ input = REPLACEMENTS[input] || input;
2337
+ let win32 = utils.isWindows(options), { DOT_LITERAL, SLASH_LITERAL, ONE_CHAR, DOTS_SLASH, NO_DOT, NO_DOTS, NO_DOTS_SLASH, STAR, START_ANCHOR } = constants.globChars(win32), nodot = opts.dot ? NO_DOTS : NO_DOT, slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT, capture = opts.capture ? '' : '?:', star = !0 === opts.bash ? '.*?' : STAR;
2338
+ opts.capture && (star = `(${star})`);
2339
+ let globstar = (opts)=>!0 === opts.noglobstar ? star : `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`, create = (str)=>{
2340
+ switch(str){
2341
+ case '*':
2342
+ return `${nodot}${ONE_CHAR}${star}`;
2343
+ case '.*':
2344
+ return `${DOT_LITERAL}${ONE_CHAR}${star}`;
2345
+ case '*.*':
2346
+ return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
2347
+ case '*/*':
2348
+ return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`;
2349
+ case '**':
2350
+ return nodot + globstar(opts);
2351
+ case '**/*':
2352
+ return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`;
2353
+ case '**/*.*':
2354
+ return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
2355
+ case '**/.*':
2356
+ return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`;
2357
+ default:
2358
+ {
2359
+ let match = /^(.*?)\.(\w+)$/.exec(str);
2360
+ if (!match) return;
2361
+ let source = create(match[1]);
2362
+ if (!source) return;
2363
+ return source + DOT_LITERAL + match[2];
2364
+ }
2365
+ }
2366
+ }, source = create(utils.removePrefix(input, {
2367
+ negated: !1,
2368
+ prefix: ''
2369
+ }));
2370
+ return source && !0 !== opts.strictSlashes && (source += `${SLASH_LITERAL}?`), source;
2371
+ }, module.exports = parse;
2372
+ },
2373
+ "../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/picomatch.js" (module, __unused_rspack_exports, __webpack_require__) {
2374
+ let path = __webpack_require__("path"), scan = __webpack_require__("../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/scan.js"), parse = __webpack_require__("../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/parse.js"), utils = __webpack_require__("../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/utils.js"), constants = __webpack_require__("../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/constants.js"), picomatch = (glob, options, returnState = !1)=>{
2375
+ if (Array.isArray(glob)) {
2376
+ let fns = glob.map((input)=>picomatch(input, options, returnState));
2377
+ return (str)=>{
2378
+ for (let isMatch of fns){
2379
+ let state = isMatch(str);
2380
+ if (state) return state;
2381
+ }
2382
+ return !1;
2383
+ };
2384
+ }
2385
+ let isState = glob && 'object' == typeof glob && !Array.isArray(glob) && glob.tokens && glob.input;
2386
+ if ('' === glob || 'string' != typeof glob && !isState) throw TypeError('Expected pattern to be a non-empty string');
2387
+ let opts = options || {}, posix = utils.isWindows(options), regex = isState ? picomatch.compileRe(glob, options) : picomatch.makeRe(glob, options, !1, !0), state = regex.state;
2388
+ delete regex.state;
2389
+ let isIgnored = ()=>!1;
2390
+ if (opts.ignore) {
2391
+ let ignoreOpts = {
2392
+ ...options,
2393
+ ignore: null,
2394
+ onMatch: null,
2395
+ onResult: null
2396
+ };
2397
+ isIgnored = picomatch(opts.ignore, ignoreOpts, returnState);
2398
+ }
2399
+ let matcher = (input, returnObject = !1)=>{
2400
+ let { isMatch, match, output } = picomatch.test(input, regex, options, {
2401
+ glob,
2402
+ posix
2403
+ }), result = {
2404
+ glob,
2405
+ state,
2406
+ regex,
2407
+ posix,
2408
+ input,
2409
+ output,
2410
+ match,
2411
+ isMatch
2412
+ };
2413
+ return ('function' == typeof opts.onResult && opts.onResult(result), !1 === isMatch) ? (result.isMatch = !1, !!returnObject && result) : isIgnored(input) ? ('function' == typeof opts.onIgnore && opts.onIgnore(result), result.isMatch = !1, !!returnObject && result) : ('function' == typeof opts.onMatch && opts.onMatch(result), !returnObject || result);
2414
+ };
2415
+ return returnState && (matcher.state = state), matcher;
2416
+ };
2417
+ picomatch.test = (input, regex, options, { glob, posix } = {})=>{
2418
+ if ('string' != typeof input) throw TypeError('Expected input to be a string');
2419
+ if ('' === input) return {
2420
+ isMatch: !1,
2421
+ output: ''
2422
+ };
2423
+ let opts = options || {}, format = opts.format || (posix ? utils.toPosixSlashes : null), match = input === glob, output = match && format ? format(input) : input;
2424
+ return !1 === match && (match = (output = format ? format(input) : input) === glob), (!1 === match || !0 === opts.capture) && (match = !0 === opts.matchBase || !0 === opts.basename ? picomatch.matchBase(input, regex, options, posix) : regex.exec(output)), {
2425
+ isMatch: !!match,
2426
+ match,
2427
+ output
2428
+ };
2429
+ }, picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options))=>(glob instanceof RegExp ? glob : picomatch.makeRe(glob, options)).test(path.basename(input)), picomatch.isMatch = (str, patterns, options)=>picomatch(patterns, options)(str), picomatch.parse = (pattern, options)=>Array.isArray(pattern) ? pattern.map((p)=>picomatch.parse(p, options)) : parse(pattern, {
2430
+ ...options,
2431
+ fastpaths: !1
2432
+ }), picomatch.scan = (input, options)=>scan(input, options), picomatch.compileRe = (state, options, returnOutput = !1, returnState = !1)=>{
2433
+ if (!0 === returnOutput) return state.output;
2434
+ let opts = options || {}, prepend = opts.contains ? '' : '^', append = opts.contains ? '' : '$', source = `${prepend}(?:${state.output})${append}`;
2435
+ state && !0 === state.negated && (source = `^(?!${source}).*$`);
2436
+ let regex = picomatch.toRegex(source, options);
2437
+ return !0 === returnState && (regex.state = state), regex;
2438
+ }, picomatch.makeRe = (input, options = {}, returnOutput = !1, returnState = !1)=>{
2439
+ if (!input || 'string' != typeof input) throw TypeError('Expected a non-empty string');
2440
+ let parsed = {
2441
+ negated: !1,
2442
+ fastpaths: !0
2443
+ };
2444
+ return !1 !== options.fastpaths && ('.' === input[0] || '*' === input[0]) && (parsed.output = parse.fastpaths(input, options)), parsed.output || (parsed = parse(input, options)), picomatch.compileRe(parsed, options, returnOutput, returnState);
2445
+ }, picomatch.toRegex = (source, options)=>{
2446
+ try {
2447
+ let opts = options || {};
2448
+ return new RegExp(source, opts.flags || (opts.nocase ? 'i' : ''));
2449
+ } catch (err) {
2450
+ if (options && !0 === options.debug) throw err;
2451
+ return /$^/;
2452
+ }
2453
+ }, picomatch.constants = constants, module.exports = picomatch;
2454
+ },
2455
+ "../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/scan.js" (module, __unused_rspack_exports, __webpack_require__) {
2456
+ let utils = __webpack_require__("../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/utils.js"), { CHAR_ASTERISK, CHAR_AT, CHAR_BACKWARD_SLASH, CHAR_COMMA, CHAR_DOT, CHAR_EXCLAMATION_MARK, CHAR_FORWARD_SLASH, CHAR_LEFT_CURLY_BRACE, CHAR_LEFT_PARENTHESES, CHAR_LEFT_SQUARE_BRACKET, CHAR_PLUS, CHAR_QUESTION_MARK, CHAR_RIGHT_CURLY_BRACE, CHAR_RIGHT_PARENTHESES, CHAR_RIGHT_SQUARE_BRACKET } = __webpack_require__("../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/constants.js"), isPathSeparator = (code)=>code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH, depth = (token)=>{
2457
+ !0 !== token.isPrefix && (token.depth = token.isGlobstar ? 1 / 0 : 1);
2458
+ };
2459
+ module.exports = (input, options)=>{
2460
+ let prev, code, opts = options || {}, length = input.length - 1, scanToEnd = !0 === opts.parts || !0 === opts.scanToEnd, slashes = [], tokens = [], parts = [], str = input, index = -1, start = 0, lastIndex = 0, isBrace = !1, isBracket = !1, isGlob = !1, isExtglob = !1, isGlobstar = !1, braceEscaped = !1, backslashes = !1, negated = !1, negatedExtglob = !1, finished = !1, braces = 0, token = {
2461
+ value: '',
2462
+ depth: 0,
2463
+ isGlob: !1
2464
+ }, eos = ()=>index >= length, peek = ()=>str.charCodeAt(index + 1), advance = ()=>(prev = code, str.charCodeAt(++index));
2465
+ for(; index < length;){
2466
+ let next;
2467
+ if ((code = advance()) === CHAR_BACKWARD_SLASH) {
2468
+ backslashes = token.backslashes = !0, (code = advance()) === CHAR_LEFT_CURLY_BRACE && (braceEscaped = !0);
2469
+ continue;
2470
+ }
2471
+ if (!0 === braceEscaped || code === CHAR_LEFT_CURLY_BRACE) {
2472
+ for(braces++; !0 !== eos() && (code = advance());){
2473
+ if (code === CHAR_BACKWARD_SLASH) {
2474
+ backslashes = token.backslashes = !0, advance();
2475
+ continue;
2476
+ }
2477
+ if (code === CHAR_LEFT_CURLY_BRACE) {
2478
+ braces++;
2479
+ continue;
2480
+ }
2481
+ if (!0 !== braceEscaped && code === CHAR_DOT && (code = advance()) === CHAR_DOT || !0 !== braceEscaped && code === CHAR_COMMA) {
2482
+ if (isBrace = token.isBrace = !0, isGlob = token.isGlob = !0, finished = !0, !0 === scanToEnd) continue;
2483
+ break;
2484
+ }
2485
+ if (code === CHAR_RIGHT_CURLY_BRACE && 0 == --braces) {
2486
+ braceEscaped = !1, isBrace = token.isBrace = !0, finished = !0;
2487
+ break;
2488
+ }
2489
+ }
2490
+ if (!0 === scanToEnd) continue;
2491
+ break;
2492
+ }
2493
+ if (code === CHAR_FORWARD_SLASH) {
2494
+ if (slashes.push(index), tokens.push(token), token = {
2495
+ value: '',
2496
+ depth: 0,
2497
+ isGlob: !1
2498
+ }, !0 === finished) continue;
2499
+ if (prev === CHAR_DOT && index === start + 1) {
2500
+ start += 2;
2501
+ continue;
2502
+ }
2503
+ lastIndex = index + 1;
2504
+ continue;
2505
+ }
2506
+ if (!0 !== opts.noext && !0 == (code === CHAR_PLUS || code === CHAR_AT || code === CHAR_ASTERISK || code === CHAR_QUESTION_MARK || code === CHAR_EXCLAMATION_MARK) && peek() === CHAR_LEFT_PARENTHESES) {
2507
+ if (isGlob = token.isGlob = !0, isExtglob = token.isExtglob = !0, finished = !0, code === CHAR_EXCLAMATION_MARK && index === start && (negatedExtglob = !0), !0 === scanToEnd) {
2508
+ for(; !0 !== eos() && (code = advance());){
2509
+ if (code === CHAR_BACKWARD_SLASH) {
2510
+ backslashes = token.backslashes = !0, code = advance();
2511
+ continue;
2512
+ }
2513
+ if (code === CHAR_RIGHT_PARENTHESES) {
2514
+ isGlob = token.isGlob = !0, finished = !0;
2515
+ break;
2516
+ }
2517
+ }
2518
+ continue;
2519
+ }
2520
+ break;
2521
+ }
2522
+ if (code === CHAR_ASTERISK) {
2523
+ if (prev === CHAR_ASTERISK && (isGlobstar = token.isGlobstar = !0), isGlob = token.isGlob = !0, finished = !0, !0 === scanToEnd) continue;
2524
+ break;
2525
+ }
2526
+ if (code === CHAR_QUESTION_MARK) {
2527
+ if (isGlob = token.isGlob = !0, finished = !0, !0 === scanToEnd) continue;
2528
+ break;
2529
+ }
2530
+ if (code === CHAR_LEFT_SQUARE_BRACKET) {
2531
+ for(; !0 !== eos() && (next = advance());){
2532
+ if (next === CHAR_BACKWARD_SLASH) {
2533
+ backslashes = token.backslashes = !0, advance();
2534
+ continue;
2535
+ }
2536
+ if (next === CHAR_RIGHT_SQUARE_BRACKET) {
2537
+ isBracket = token.isBracket = !0, isGlob = token.isGlob = !0, finished = !0;
2538
+ break;
2539
+ }
2540
+ }
2541
+ if (!0 === scanToEnd) continue;
2542
+ break;
2543
+ }
2544
+ if (!0 !== opts.nonegate && code === CHAR_EXCLAMATION_MARK && index === start) {
2545
+ negated = token.negated = !0, start++;
2546
+ continue;
2547
+ }
2548
+ if (!0 !== opts.noparen && code === CHAR_LEFT_PARENTHESES) {
2549
+ if (isGlob = token.isGlob = !0, !0 === scanToEnd) {
2550
+ for(; !0 !== eos() && (code = advance());){
2551
+ if (code === CHAR_LEFT_PARENTHESES) {
2552
+ backslashes = token.backslashes = !0, code = advance();
2553
+ continue;
2554
+ }
2555
+ if (code === CHAR_RIGHT_PARENTHESES) {
2556
+ finished = !0;
2557
+ break;
2558
+ }
2559
+ }
2560
+ continue;
2561
+ }
2562
+ break;
2563
+ }
2564
+ if (!0 === isGlob) {
2565
+ if (finished = !0, !0 === scanToEnd) continue;
2566
+ break;
2567
+ }
2568
+ }
2569
+ !0 === opts.noext && (isExtglob = !1, isGlob = !1);
2570
+ let base = str, prefix = '', glob = '';
2571
+ start > 0 && (prefix = str.slice(0, start), str = str.slice(start), lastIndex -= start), base && !0 === isGlob && lastIndex > 0 ? (base = str.slice(0, lastIndex), glob = str.slice(lastIndex)) : !0 === isGlob ? (base = '', glob = str) : base = str, base && '' !== base && '/' !== base && base !== str && isPathSeparator(base.charCodeAt(base.length - 1)) && (base = base.slice(0, -1)), !0 === opts.unescape && (glob && (glob = utils.removeBackslashes(glob)), base && !0 === backslashes && (base = utils.removeBackslashes(base)));
2572
+ let state = {
2573
+ prefix,
2574
+ input,
2575
+ start,
2576
+ base,
2577
+ glob,
2578
+ isBrace,
2579
+ isBracket,
2580
+ isGlob,
2581
+ isExtglob,
2582
+ isGlobstar,
2583
+ negated,
2584
+ negatedExtglob
2585
+ };
2586
+ if (!0 === opts.tokens && (state.maxDepth = 0, isPathSeparator(code) || tokens.push(token), state.tokens = tokens), !0 === opts.parts || !0 === opts.tokens) {
2587
+ let prevIndex;
2588
+ for(let idx = 0; idx < slashes.length; idx++){
2589
+ let n = prevIndex ? prevIndex + 1 : start, i = slashes[idx], value = input.slice(n, i);
2590
+ opts.tokens && (0 === idx && 0 !== start ? (tokens[idx].isPrefix = !0, tokens[idx].value = prefix) : tokens[idx].value = value, depth(tokens[idx]), state.maxDepth += tokens[idx].depth), (0 !== idx || '' !== value) && parts.push(value), prevIndex = i;
2591
+ }
2592
+ if (prevIndex && prevIndex + 1 < input.length) {
2593
+ let value = input.slice(prevIndex + 1);
2594
+ parts.push(value), opts.tokens && (tokens[tokens.length - 1].value = value, depth(tokens[tokens.length - 1]), state.maxDepth += tokens[tokens.length - 1].depth);
2595
+ }
2596
+ state.slashes = slashes, state.parts = parts;
2597
+ }
2598
+ return state;
2599
+ };
2600
+ },
2601
+ "../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/utils.js" (__unused_rspack_module, exports, __webpack_require__) {
2602
+ let path = __webpack_require__("path"), win32 = 'win32' === process.platform, { REGEX_BACKSLASH, REGEX_REMOVE_BACKSLASH, REGEX_SPECIAL_CHARS, REGEX_SPECIAL_CHARS_GLOBAL } = __webpack_require__("../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/constants.js");
2603
+ exports.isObject = (val)=>null !== val && 'object' == typeof val && !Array.isArray(val), exports.hasRegexChars = (str)=>REGEX_SPECIAL_CHARS.test(str), exports.isRegexChar = (str)=>1 === str.length && exports.hasRegexChars(str), exports.escapeRegex = (str)=>str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\$1'), exports.toPosixSlashes = (str)=>str.replace(REGEX_BACKSLASH, '/'), exports.removeBackslashes = (str)=>str.replace(REGEX_REMOVE_BACKSLASH, (match)=>'\\' === match ? '' : match), exports.supportsLookbehinds = ()=>{
2604
+ let segs = process.version.slice(1).split('.').map(Number);
2605
+ return 3 === segs.length && !!(segs[0] >= 9) || 8 === segs[0] && !!(segs[1] >= 10);
2606
+ }, exports.isWindows = (options)=>options && 'boolean' == typeof options.windows ? options.windows : !0 === win32 || '\\' === path.sep, exports.escapeLast = (input, char, lastIdx)=>{
2607
+ let idx = input.lastIndexOf(char, lastIdx);
2608
+ return -1 === idx ? input : '\\' === input[idx - 1] ? exports.escapeLast(input, char, idx - 1) : `${input.slice(0, idx)}\\${input.slice(idx)}`;
2609
+ }, exports.removePrefix = (input, state = {})=>{
2610
+ let output = input;
2611
+ return output.startsWith('./') && (output = output.slice(2), state.prefix = './'), output;
2612
+ }, exports.wrapOutput = (input, state = {}, options = {})=>{
2613
+ let prepend = options.contains ? '' : '^', append = options.contains ? '' : '$', output = `${prepend}(?:${input})${append}`;
2614
+ return !0 === state.negated && (output = `(?:^(?!${output}).*$)`), output;
2615
+ };
2616
+ },
2617
+ "../../node_modules/.pnpm/requires-port@1.0.0/node_modules/requires-port/index.js" (module) {
2618
+ module.exports = function required(port, protocol) {
2619
+ if (protocol = protocol.split(':')[0], !(port *= 1)) return !1;
2620
+ switch(protocol){
2621
+ case 'http':
2622
+ case 'ws':
2623
+ return 80 !== port;
2624
+ case 'https':
2625
+ case 'wss':
2626
+ return 443 !== port;
2627
+ case 'ftp':
2628
+ return 21 !== port;
2629
+ case 'gopher':
2630
+ return 70 !== port;
2631
+ case 'file':
2632
+ return !1;
2633
+ }
2634
+ return 0 !== port;
2635
+ };
2636
+ },
2637
+ "../../node_modules/.pnpm/to-regex-range@5.0.1/node_modules/to-regex-range/index.js" (module, __unused_rspack_exports, __webpack_require__) {
2638
+ let isNumber = __webpack_require__("../../node_modules/.pnpm/is-number@7.0.0/node_modules/is-number/index.js"), toRegexRange = (min, max, options)=>{
2639
+ if (!1 === isNumber(min)) throw TypeError('toRegexRange: expected the first argument to be a number');
2640
+ if (void 0 === max || min === max) return String(min);
2641
+ if (!1 === isNumber(max)) throw TypeError('toRegexRange: expected the second argument to be a number.');
2642
+ let opts = {
2643
+ relaxZeros: !0,
2644
+ ...options
2645
+ };
2646
+ 'boolean' == typeof opts.strictZeros && (opts.relaxZeros = !1 === opts.strictZeros);
2647
+ let cacheKey = min + ':' + max + '=' + String(opts.relaxZeros) + String(opts.shorthand) + String(opts.capture) + String(opts.wrap);
2648
+ if (toRegexRange.cache.hasOwnProperty(cacheKey)) return toRegexRange.cache[cacheKey].result;
2649
+ let a = Math.min(min, max), b = Math.max(min, max);
2650
+ if (1 === Math.abs(a - b)) {
2651
+ let result = min + '|' + max;
2652
+ return opts.capture ? `(${result})` : !1 === opts.wrap ? result : `(?:${result})`;
2653
+ }
2654
+ let isPadded = hasPadding(min) || hasPadding(max), state = {
2655
+ min,
2656
+ max,
2657
+ a,
2658
+ b
2659
+ }, positives = [], negatives = [];
2660
+ return isPadded && (state.isPadded = isPadded, state.maxLen = String(state.max).length), a < 0 && (negatives = splitToPatterns(b < 0 ? Math.abs(b) : 1, Math.abs(a), state, opts), a = state.a = 0), b >= 0 && (positives = splitToPatterns(a, b, state, opts)), state.negatives = negatives, state.positives = positives, state.result = collatePatterns(negatives, positives, opts), !0 === opts.capture ? state.result = `(${state.result})` : !1 !== opts.wrap && positives.length + negatives.length > 1 && (state.result = `(?:${state.result})`), toRegexRange.cache[cacheKey] = state, state.result;
2661
+ };
2662
+ function collatePatterns(neg, pos, options) {
2663
+ let onlyNegative = filterPatterns(neg, pos, '-', !1, options) || [], onlyPositive = filterPatterns(pos, neg, '', !1, options) || [], intersected = filterPatterns(neg, pos, '-?', !0, options) || [];
2664
+ return onlyNegative.concat(intersected).concat(onlyPositive).join('|');
2665
+ }
2666
+ function splitToRanges(min, max) {
2667
+ let nines = 1, zeros = 1, stop = countNines(min, 1), stops = new Set([
2668
+ max
2669
+ ]);
2670
+ for(; min <= stop && stop <= max;)stops.add(stop), nines += 1, stop = countNines(min, nines);
2671
+ for(stop = countZeros(max + 1, zeros) - 1; min < stop && stop <= max;)stops.add(stop), zeros += 1, stop = countZeros(max + 1, zeros) - 1;
2672
+ return (stops = [
2673
+ ...stops
2674
+ ]).sort(compare), stops;
2675
+ }
2676
+ function rangeToPattern(start, stop, options) {
2677
+ if (start === stop) return {
2678
+ pattern: start,
2679
+ count: [],
2680
+ digits: 0
2681
+ };
2682
+ let zipped = zip(start, stop), digits = zipped.length, pattern = '', count = 0;
2683
+ for(let i = 0; i < digits; i++){
2684
+ let [startDigit, stopDigit] = zipped[i];
2685
+ startDigit === stopDigit ? pattern += startDigit : '0' !== startDigit || '9' !== stopDigit ? pattern += toCharacterClass(startDigit, stopDigit, options) : count++;
2686
+ }
2687
+ return count && (pattern += !0 === options.shorthand ? '\\d' : '[0-9]'), {
2688
+ pattern,
2689
+ count: [
2690
+ count
2691
+ ],
2692
+ digits
2693
+ };
2694
+ }
2695
+ function splitToPatterns(min, max, tok, options) {
2696
+ let prev, ranges = splitToRanges(min, max), tokens = [], start = min;
2697
+ for(let i = 0; i < ranges.length; i++){
2698
+ let max = ranges[i], obj = rangeToPattern(String(start), String(max), options), zeros = '';
2699
+ if (!tok.isPadded && prev && prev.pattern === obj.pattern) {
2700
+ prev.count.length > 1 && prev.count.pop(), prev.count.push(obj.count[0]), prev.string = prev.pattern + toQuantifier(prev.count), start = max + 1;
2701
+ continue;
2702
+ }
2703
+ tok.isPadded && (zeros = padZeros(max, tok, options)), obj.string = zeros + obj.pattern + toQuantifier(obj.count), tokens.push(obj), start = max + 1, prev = obj;
2704
+ }
2705
+ return tokens;
2706
+ }
2707
+ function filterPatterns(arr, comparison, prefix, intersection, options) {
2708
+ let result = [];
2709
+ for (let ele of arr){
2710
+ let { string } = ele;
2711
+ intersection || contains(comparison, 'string', string) || result.push(prefix + string), intersection && contains(comparison, 'string', string) && result.push(prefix + string);
2712
+ }
2713
+ return result;
2714
+ }
2715
+ function zip(a, b) {
2716
+ let arr = [];
2717
+ for(let i = 0; i < a.length; i++)arr.push([
2718
+ a[i],
2719
+ b[i]
2720
+ ]);
2721
+ return arr;
2722
+ }
2723
+ function compare(a, b) {
2724
+ return a > b ? 1 : b > a ? -1 : 0;
2725
+ }
2726
+ function contains(arr, key, val) {
2727
+ return arr.some((ele)=>ele[key] === val);
2728
+ }
2729
+ function countNines(min, len) {
2730
+ return Number(String(min).slice(0, -len) + '9'.repeat(len));
2731
+ }
2732
+ function countZeros(integer, zeros) {
2733
+ return integer - integer % Math.pow(10, zeros);
2734
+ }
2735
+ function toQuantifier(digits) {
2736
+ let [start = 0, stop = ''] = digits;
2737
+ return stop || start > 1 ? `{${start + (stop ? ',' + stop : '')}}` : '';
2738
+ }
2739
+ function toCharacterClass(a, b, options) {
2740
+ return `[${a}${b - a == 1 ? '' : '-'}${b}]`;
2741
+ }
2742
+ function hasPadding(str) {
2743
+ return /^-?(0+)\d/.test(str);
2744
+ }
2745
+ function padZeros(value, tok, options) {
2746
+ if (!tok.isPadded) return value;
2747
+ let diff = Math.abs(tok.maxLen - String(value).length), relax = !1 !== options.relaxZeros;
2748
+ switch(diff){
2749
+ case 0:
2750
+ return '';
2751
+ case 1:
2752
+ return relax ? '0?' : '0';
2753
+ case 2:
2754
+ return relax ? '0{0,2}' : '00';
2755
+ default:
2756
+ return relax ? `0{0,${diff}}` : `0{${diff}}`;
2757
+ }
2758
+ }
2759
+ toRegexRange.cache = {}, toRegexRange.clearCache = ()=>toRegexRange.cache = {}, module.exports = toRegexRange;
2760
+ },
2761
+ assert (module) {
2762
+ module.exports = __rspack_external_assert;
2763
+ },
2764
+ https (module) {
2765
+ module.exports = __rspack_external_https;
2766
+ },
2767
+ querystring (module) {
2768
+ module.exports = __rspack_external_querystring;
2769
+ },
2770
+ stream (module) {
2771
+ module.exports = __rspack_external_stream;
2772
+ },
2773
+ zlib (module) {
2774
+ module.exports = __rspack_external_zlib;
2775
+ },
2776
+ "../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/configuration.js" (__unused_rspack_module, exports, __webpack_require__) {
2777
+ Object.defineProperty(exports, "__esModule", {
2778
+ value: !0
2779
+ }), exports.verifyConfig = verifyConfig;
2780
+ let errors_1 = __webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/errors.js");
2781
+ function verifyConfig(options) {
2782
+ if (!options.target && !options.router) throw Error(errors_1.ERRORS.ERR_CONFIG_FACTORY_TARGET_MISSING);
2783
+ }
2784
+ },
2785
+ "../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/debug.js" (__unused_rspack_module, exports, __webpack_require__) {
2786
+ Object.defineProperty(exports, "__esModule", {
2787
+ value: !0
2788
+ }), exports.Debug = void 0, exports.Debug = __webpack_require__("../../node_modules/.pnpm/debug@4.4.3_supports-color@10.2.2/node_modules/debug/src/index.js")('http-proxy-middleware');
2789
+ },
2790
+ "../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/errors.js" (__unused_rspack_module, exports) {
2791
+ var ERRORS, ERRORS1;
2792
+ Object.defineProperty(exports, "__esModule", {
2793
+ value: !0
2794
+ }), exports.ERRORS = void 0, (ERRORS1 = ERRORS || (exports.ERRORS = ERRORS = {})).ERR_CONFIG_FACTORY_TARGET_MISSING = "[HPM] Missing \"target\" option. Example: {target: \"http://www.example.org\"}", ERRORS1.ERR_CONTEXT_MATCHER_GENERIC = "[HPM] Invalid pathFilter. Expecting something like: \"/api\" or [\"/api\", \"/ajax\"]", ERRORS1.ERR_CONTEXT_MATCHER_INVALID_ARRAY = "[HPM] Invalid pathFilter. Plain paths (e.g. \"/api\") can not be mixed with globs (e.g. \"/api/**\"). Expecting something like: [\"/api\", \"/ajax\"] or [\"/api/**\", \"!**.html\"].", ERRORS1.ERR_PATH_REWRITER_CONFIG = "[HPM] Invalid pathRewrite config. Expecting object with pathRewrite config or a rewrite function";
2795
+ },
2796
+ "../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/factory.js" (__unused_rspack_module, exports, __webpack_require__) {
2797
+ Object.defineProperty(exports, "__esModule", {
2798
+ value: !0
2799
+ }), exports.createProxyMiddleware = createProxyMiddleware;
2800
+ let http_proxy_middleware_1 = __webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/http-proxy-middleware.js");
2801
+ function createProxyMiddleware(options) {
2802
+ let { middleware } = new http_proxy_middleware_1.HttpProxyMiddleware(options);
2803
+ return middleware;
2804
+ }
2805
+ },
2806
+ "../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/get-plugins.js" (__unused_rspack_module, exports, __webpack_require__) {
2807
+ Object.defineProperty(exports, "__esModule", {
2808
+ value: !0
2809
+ }), exports.getPlugins = getPlugins;
2810
+ let default_1 = __webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/plugins/default/index.js");
2811
+ function getPlugins(options) {
2812
+ let maybeErrorResponsePlugin = options.on?.error ? [] : [
2813
+ default_1.errorResponsePlugin
2814
+ ];
2815
+ return [
2816
+ ...options.ejectPlugins ? [] : [
2817
+ default_1.debugProxyErrorsPlugin,
2818
+ default_1.proxyEventsPlugin,
2819
+ default_1.loggerPlugin,
2820
+ ...maybeErrorResponsePlugin
2821
+ ],
2822
+ ...options.plugins ?? []
2823
+ ];
2824
+ }
2825
+ },
2826
+ "../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/handlers/fix-request-body.js" (__unused_rspack_module, exports, __webpack_require__) {
2827
+ Object.defineProperty(exports, "__esModule", {
2828
+ value: !0
2829
+ }), exports.fixRequestBody = fixRequestBody;
2830
+ let querystring = __webpack_require__("querystring");
2831
+ function fixRequestBody(proxyReq, req) {
2832
+ if (0 !== req.readableLength) return;
2833
+ let requestBody = req.body;
2834
+ if (!requestBody) return;
2835
+ let contentType = proxyReq.getHeader('Content-Type');
2836
+ if (!contentType) return;
2837
+ let writeBody = (bodyData)=>{
2838
+ proxyReq.setHeader('Content-Length', Buffer.byteLength(bodyData)), proxyReq.write(bodyData);
2839
+ };
2840
+ contentType.includes('application/json') || contentType.includes('+json') ? writeBody(JSON.stringify(requestBody)) : contentType.includes('application/x-www-form-urlencoded') ? writeBody(querystring.stringify(requestBody)) : contentType.includes('multipart/form-data') && writeBody(handlerFormDataBodyData(contentType, requestBody));
2841
+ }
2842
+ function handlerFormDataBodyData(contentType, data) {
2843
+ let boundary = contentType.replace(/^.*boundary=(.*)$/, '$1'), str = '';
2844
+ for (let [key, value] of Object.entries(data))str += `--${boundary}\r\nContent-Disposition: form-data; name="${key}"\r\n\r\n${value}\r\n`;
2845
+ return str;
2846
+ }
2847
+ },
2848
+ "../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/handlers/index.js" (__unused_rspack_module, exports, __webpack_require__) {
2849
+ var __createBinding = this && this.__createBinding || (Object.create ? function(o, m, k, k2) {
2850
+ void 0 === k2 && (k2 = k);
2851
+ var desc = Object.getOwnPropertyDescriptor(m, k);
2852
+ (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) && (desc = {
2853
+ enumerable: !0,
2854
+ get: function() {
2855
+ return m[k];
2856
+ }
2857
+ }), Object.defineProperty(o, k2, desc);
2858
+ } : function(o, m, k, k2) {
2859
+ void 0 === k2 && (k2 = k), o[k2] = m[k];
2860
+ }), __exportStar = this && this.__exportStar || function(m, exports) {
2861
+ for(var p in m)"default" === p || Object.prototype.hasOwnProperty.call(exports, p) || __createBinding(exports, m, p);
2862
+ };
2863
+ Object.defineProperty(exports, "__esModule", {
2864
+ value: !0
2865
+ }), __exportStar(__webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/handlers/public.js"), exports);
2866
+ },
2867
+ "../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/handlers/public.js" (__unused_rspack_module, exports, __webpack_require__) {
2868
+ Object.defineProperty(exports, "__esModule", {
2869
+ value: !0
2870
+ }), exports.fixRequestBody = exports.responseInterceptor = void 0;
2871
+ var response_interceptor_1 = __webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/handlers/response-interceptor.js");
2872
+ Object.defineProperty(exports, "responseInterceptor", {
2873
+ enumerable: !0,
2874
+ get: function() {
2875
+ return response_interceptor_1.responseInterceptor;
2876
+ }
2877
+ });
2878
+ var fix_request_body_1 = __webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/handlers/fix-request-body.js");
2879
+ Object.defineProperty(exports, "fixRequestBody", {
2880
+ enumerable: !0,
2881
+ get: function() {
2882
+ return fix_request_body_1.fixRequestBody;
2883
+ }
2884
+ });
2885
+ },
2886
+ "../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/handlers/response-interceptor.js" (__unused_rspack_module, exports, __webpack_require__) {
2887
+ Object.defineProperty(exports, "__esModule", {
2888
+ value: !0
2889
+ }), exports.responseInterceptor = responseInterceptor;
2890
+ let zlib = __webpack_require__("zlib"), debug_1 = __webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/debug.js"), function_1 = __webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/utils/function.js"), debug = debug_1.Debug.extend('response-interceptor');
2891
+ function responseInterceptor(interceptor) {
2892
+ return async function proxyResResponseInterceptor(proxyRes, req, res) {
2893
+ debug('intercept proxy response');
2894
+ let buffer = Buffer.from('', 'utf8'), _proxyRes = decompress(proxyRes, proxyRes.headers['content-encoding']);
2895
+ _proxyRes.on('data', (chunk)=>buffer = Buffer.concat([
2896
+ buffer,
2897
+ chunk
2898
+ ])), _proxyRes.on('end', async ()=>{
2899
+ copyHeaders(proxyRes, res), debug('call interceptor function: %s', (0, function_1.getFunctionName)(interceptor));
2900
+ let interceptedBuffer = Buffer.from(await interceptor(buffer, proxyRes, req, res));
2901
+ debug('set content-length: %s', Buffer.byteLength(interceptedBuffer, 'utf8')), res.setHeader('content-length', Buffer.byteLength(interceptedBuffer, 'utf8')), debug('write intercepted response'), res.write(interceptedBuffer), res.end();
2902
+ }), _proxyRes.on('error', (error)=>{
2903
+ res.end(`Error fetching proxied request: ${error.message}`);
2904
+ });
2905
+ };
2906
+ }
2907
+ function decompress(proxyRes, contentEncoding) {
2908
+ let decompress, _proxyRes = proxyRes;
2909
+ switch(contentEncoding){
2910
+ case 'gzip':
2911
+ decompress = zlib.createGunzip();
2912
+ break;
2913
+ case 'br':
2914
+ decompress = zlib.createBrotliDecompress();
2915
+ break;
2916
+ case 'deflate':
2917
+ decompress = zlib.createInflate();
2918
+ }
2919
+ return decompress && (debug("decompress proxy response with 'content-encoding': %s", contentEncoding), _proxyRes.pipe(decompress), _proxyRes = decompress), _proxyRes;
2920
+ }
2921
+ function copyHeaders(originalResponse, response) {
2922
+ if (debug('copy original response headers'), response.statusCode = originalResponse.statusCode, response.statusMessage = originalResponse.statusMessage, response.setHeader) {
2923
+ let keys = Object.keys(originalResponse.headers);
2924
+ (keys = keys.filter((key)=>![
2925
+ 'content-encoding',
2926
+ 'transfer-encoding'
2927
+ ].includes(key))).forEach((key)=>{
2928
+ let value = originalResponse.headers[key];
2929
+ 'set-cookie' === key && (value = (value = Array.isArray(value) ? value : [
2930
+ value
2931
+ ]).map((x)=>x.replace(/Domain=[^;]+?/i, ''))), response.setHeader(key, value);
2932
+ });
2933
+ } else response.headers = originalResponse.headers;
2934
+ }
2935
+ },
2936
+ "../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/http-proxy-middleware.js" (__unused_rspack_module, exports, __webpack_require__) {
2937
+ Object.defineProperty(exports, "__esModule", {
2938
+ value: !0
2939
+ }), exports.HttpProxyMiddleware = void 0;
2940
+ let httpProxy = __webpack_require__("../../node_modules/.pnpm/http-proxy@1.18.1_patch_hash=424b689da454f1f336d635615733f30568882789c1173f861c30f95ba8_7c4b684cae90eb7d05b3dfae37f0ceb4/node_modules/http-proxy/index.js"), configuration_1 = __webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/configuration.js"), get_plugins_1 = __webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/get-plugins.js"), path_filter_1 = __webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/path-filter.js"), PathRewriter = __webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/path-rewriter.js"), Router = __webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/router.js"), debug_1 = __webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/debug.js"), function_1 = __webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/utils/function.js"), logger_1 = __webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/logger.js");
2941
+ exports.HttpProxyMiddleware = class {
2942
+ constructor(options){
2943
+ this.wsInternalSubscribed = !1, this.serverOnCloseSubscribed = !1, this.middleware = async (req, res, next)=>{
2944
+ if (this.shouldProxy(this.proxyOptions.pathFilter, req)) try {
2945
+ let activeProxyOptions = await this.prepareProxyRequest(req);
2946
+ (0, debug_1.Debug)("proxy request to target: %O", activeProxyOptions.target), this.proxy.web(req, res, activeProxyOptions);
2947
+ } catch (err) {
2948
+ next?.(err);
2949
+ }
2950
+ else next?.();
2951
+ let server = (req.socket ?? req.connection)?.server;
2952
+ server && !this.serverOnCloseSubscribed && (server.on('close', ()=>{
2953
+ (0, debug_1.Debug)('server close signal received: closing proxy server'), this.proxy.close();
2954
+ }), this.serverOnCloseSubscribed = !0), !0 === this.proxyOptions.ws && this.catchUpgradeRequest(server);
2955
+ }, this.catchUpgradeRequest = (server)=>{
2956
+ this.wsInternalSubscribed || ((0, debug_1.Debug)('subscribing to server upgrade event'), server.on('upgrade', this.handleUpgrade), this.wsInternalSubscribed = !0);
2957
+ }, this.handleUpgrade = async (req, socket, head)=>{
2958
+ try {
2959
+ if (this.shouldProxy(this.proxyOptions.pathFilter, req)) {
2960
+ let activeProxyOptions = await this.prepareProxyRequest(req);
2961
+ this.proxy.ws(req, socket, head, activeProxyOptions), (0, debug_1.Debug)('server upgrade event received. Proxying WebSocket');
2962
+ }
2963
+ } catch (err) {
2964
+ this.proxy.emit('error', err, req, socket);
2965
+ }
2966
+ }, this.shouldProxy = (pathFilter, req)=>{
2967
+ try {
2968
+ return (0, path_filter_1.matchPathFilter)(pathFilter, req.url, req);
2969
+ } catch (err) {
2970
+ return (0, debug_1.Debug)('Error: matchPathFilter() called with request url: ', `"${req.url}"`), this.logger.error(err), !1;
2971
+ }
2972
+ }, this.prepareProxyRequest = async (req)=>{
2973
+ this.middleware.__LEGACY_HTTP_PROXY_MIDDLEWARE__ && (req.url = req.originalUrl || req.url);
2974
+ let newProxyOptions = Object.assign({}, this.proxyOptions);
2975
+ return await this.applyRouter(req, newProxyOptions), await this.applyPathRewrite(req, this.pathRewriter), newProxyOptions;
2976
+ }, this.applyRouter = async (req, options)=>{
2977
+ let newTarget;
2978
+ options.router && (newTarget = await Router.getTarget(req, options)) && ((0, debug_1.Debug)('router new target: "%s"', newTarget), options.target = newTarget);
2979
+ }, this.applyPathRewrite = async (req, pathRewriter)=>{
2980
+ if (pathRewriter) {
2981
+ let path = await pathRewriter(req.url, req);
2982
+ 'string' == typeof path ? ((0, debug_1.Debug)('pathRewrite new path: %s', req.url), req.url = path) : (0, debug_1.Debug)('pathRewrite: no rewritten path found: %s', req.url);
2983
+ }
2984
+ }, (0, configuration_1.verifyConfig)(options), this.proxyOptions = options, this.logger = (0, logger_1.getLogger)(options), (0, debug_1.Debug)("create proxy server"), this.proxy = httpProxy.createProxyServer({}), this.registerPlugins(this.proxy, this.proxyOptions), this.pathRewriter = PathRewriter.createPathRewriter(this.proxyOptions.pathRewrite), this.middleware.upgrade = (req, socket, head)=>{
2985
+ this.wsInternalSubscribed || this.handleUpgrade(req, socket, head);
2986
+ };
2987
+ }
2988
+ registerPlugins(proxy, options) {
2989
+ (0, get_plugins_1.getPlugins)(options).forEach((plugin)=>{
2990
+ (0, debug_1.Debug)(`register plugin: "${(0, function_1.getFunctionName)(plugin)}"`), plugin(proxy, options);
2991
+ });
2992
+ }
2993
+ };
2994
+ },
2995
+ "../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/index.js" (__unused_rspack_module, exports, __webpack_require__) {
2996
+ var __createBinding = this && this.__createBinding || (Object.create ? function(o, m, k, k2) {
2997
+ void 0 === k2 && (k2 = k);
2998
+ var desc = Object.getOwnPropertyDescriptor(m, k);
2999
+ (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) && (desc = {
3000
+ enumerable: !0,
3001
+ get: function() {
3002
+ return m[k];
3003
+ }
3004
+ }), Object.defineProperty(o, k2, desc);
3005
+ } : function(o, m, k, k2) {
3006
+ void 0 === k2 && (k2 = k), o[k2] = m[k];
3007
+ }), __exportStar = this && this.__exportStar || function(m, exports) {
3008
+ for(var p in m)"default" === p || Object.prototype.hasOwnProperty.call(exports, p) || __createBinding(exports, m, p);
3009
+ };
3010
+ Object.defineProperty(exports, "__esModule", {
3011
+ value: !0
3012
+ }), __exportStar(__webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/factory.js"), exports), __exportStar(__webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/handlers/index.js"), exports), __exportStar(__webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/plugins/default/index.js"), exports), __exportStar(__webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/legacy/index.js"), exports);
3013
+ },
3014
+ "../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/legacy/create-proxy-middleware.js" (__unused_rspack_module, exports, __webpack_require__) {
3015
+ Object.defineProperty(exports, "__esModule", {
3016
+ value: !0
3017
+ }), exports.legacyCreateProxyMiddleware = legacyCreateProxyMiddleware;
3018
+ let factory_1 = __webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/factory.js"), debug_1 = __webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/debug.js"), options_adapter_1 = __webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/legacy/options-adapter.js"), debug = debug_1.Debug.extend('legacy-create-proxy-middleware');
3019
+ function legacyCreateProxyMiddleware(legacyContext, legacyOptions) {
3020
+ debug('init');
3021
+ let options = (0, options_adapter_1.legacyOptionsAdapter)(legacyContext, legacyOptions), proxyMiddleware = (0, factory_1.createProxyMiddleware)(options);
3022
+ return debug('add marker for patching req.url (old behavior)'), proxyMiddleware.__LEGACY_HTTP_PROXY_MIDDLEWARE__ = !0, proxyMiddleware;
3023
+ }
3024
+ },
3025
+ "../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/legacy/index.js" (__unused_rspack_module, exports, __webpack_require__) {
3026
+ var __createBinding = this && this.__createBinding || (Object.create ? function(o, m, k, k2) {
3027
+ void 0 === k2 && (k2 = k);
3028
+ var desc = Object.getOwnPropertyDescriptor(m, k);
3029
+ (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) && (desc = {
3030
+ enumerable: !0,
3031
+ get: function() {
3032
+ return m[k];
3033
+ }
3034
+ }), Object.defineProperty(o, k2, desc);
3035
+ } : function(o, m, k, k2) {
3036
+ void 0 === k2 && (k2 = k), o[k2] = m[k];
3037
+ }), __exportStar = this && this.__exportStar || function(m, exports) {
3038
+ for(var p in m)"default" === p || Object.prototype.hasOwnProperty.call(exports, p) || __createBinding(exports, m, p);
3039
+ };
3040
+ Object.defineProperty(exports, "__esModule", {
3041
+ value: !0
3042
+ }), __exportStar(__webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/legacy/public.js"), exports);
3043
+ },
3044
+ "../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/legacy/options-adapter.js" (__unused_rspack_module, exports, __webpack_require__) {
3045
+ Object.defineProperty(exports, "__esModule", {
3046
+ value: !0
3047
+ }), exports.legacyOptionsAdapter = legacyOptionsAdapter;
3048
+ let url = __webpack_require__("url"), debug_1 = __webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/debug.js"), logger_1 = __webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/logger.js"), debug = debug_1.Debug.extend('legacy-options-adapter'), proxyEventMap = {
3049
+ onError: 'error',
3050
+ onProxyReq: 'proxyReq',
3051
+ onProxyRes: 'proxyRes',
3052
+ onProxyReqWs: 'proxyReqWs',
3053
+ onOpen: 'open',
3054
+ onClose: 'close'
3055
+ };
3056
+ function legacyOptionsAdapter(legacyContext, legacyOptions) {
3057
+ let logger, options = {};
3058
+ if ('string' == typeof legacyContext && url.parse(legacyContext).host) throw Error(`Shorthand syntax is removed from legacyCreateProxyMiddleware().
3059
+ Please use "legacyCreateProxyMiddleware({ target: 'http://www.example.org' })" instead.
3060
+
3061
+ More details: https://github.com/chimurai/http-proxy-middleware/blob/master/MIGRATION.md#removed-shorthand-usage
3062
+ `);
3063
+ legacyContext && legacyOptions ? (debug('map legacy context/filter to options.pathFilter'), (logger = getLegacyLogger(options = {
3064
+ ...legacyOptions,
3065
+ pathFilter: legacyContext
3066
+ })).warn(`[http-proxy-middleware] Legacy "context" argument is deprecated. Migrate your "context" to "options.pathFilter":
3067
+
3068
+ const options = {
3069
+ pathFilter: '${legacyContext}',
3070
+ }
3071
+
3072
+ More details: https://github.com/chimurai/http-proxy-middleware/blob/master/MIGRATION.md#removed-context-argument
3073
+ `)) : logger = legacyContext && !legacyOptions ? getLegacyLogger(options = {
3074
+ ...legacyContext
3075
+ }) : getLegacyLogger({}), Object.entries(proxyEventMap).forEach(([legacyEventName, proxyEventName])=>{
3076
+ options[legacyEventName] && (options.on = {
3077
+ ...options.on
3078
+ }, options.on[proxyEventName] = options[legacyEventName], debug('map legacy event "%s" to "on.%s"', legacyEventName, proxyEventName), logger.warn(`[http-proxy-middleware] Legacy "${legacyEventName}" is deprecated. Migrate to "options.on.${proxyEventName}":
3079
+
3080
+ const options = {
3081
+ on: {
3082
+ ${proxyEventName}: () => {},
3083
+ },
3084
+ }
3085
+
3086
+ More details: https://github.com/chimurai/http-proxy-middleware/blob/master/MIGRATION.md#refactored-proxy-events
3087
+ `));
3088
+ });
3089
+ let logProvider = options.logProvider && options.logProvider(), logLevel = options.logLevel;
3090
+ return debug('legacy logLevel', logLevel), debug('legacy logProvider: %O', logProvider), 'string' == typeof logLevel && 'silent' !== logLevel && (debug('map "logProvider" to "logger"'), logger.warn(`[http-proxy-middleware] Legacy "logLevel" and "logProvider" are deprecated. Migrate to "options.logger":
3091
+
3092
+ const options = {
3093
+ logger: console,
3094
+ }
3095
+
3096
+ More details: https://github.com/chimurai/http-proxy-middleware/blob/master/MIGRATION.md#removed-logprovider-and-loglevel-options
3097
+ `)), options;
3098
+ }
3099
+ function getLegacyLogger(options) {
3100
+ let legacyLogger = options.logProvider && options.logProvider();
3101
+ return legacyLogger && (options.logger = legacyLogger), (0, logger_1.getLogger)(options);
3102
+ }
3103
+ },
3104
+ "../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/legacy/public.js" (__unused_rspack_module, exports, __webpack_require__) {
3105
+ Object.defineProperty(exports, "__esModule", {
3106
+ value: !0
3107
+ }), exports.legacyCreateProxyMiddleware = void 0;
3108
+ var create_proxy_middleware_1 = __webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/legacy/create-proxy-middleware.js");
3109
+ Object.defineProperty(exports, "legacyCreateProxyMiddleware", {
3110
+ enumerable: !0,
3111
+ get: function() {
3112
+ return create_proxy_middleware_1.legacyCreateProxyMiddleware;
3113
+ }
3114
+ });
3115
+ },
3116
+ "../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/logger.js" (__unused_rspack_module, exports) {
3117
+ Object.defineProperty(exports, "__esModule", {
3118
+ value: !0
3119
+ }), exports.getLogger = getLogger;
3120
+ let noopLogger = {
3121
+ info: ()=>{},
3122
+ warn: ()=>{},
3123
+ error: ()=>{}
3124
+ };
3125
+ function getLogger(options) {
3126
+ return options.logger || noopLogger;
3127
+ }
3128
+ },
3129
+ "../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/path-filter.js" (__unused_rspack_module, exports, __webpack_require__) {
3130
+ Object.defineProperty(exports, "__esModule", {
3131
+ value: !0
3132
+ }), exports.matchPathFilter = matchPathFilter;
3133
+ let isGlob = __webpack_require__("../../node_modules/.pnpm/is-glob@4.0.3/node_modules/is-glob/index.js"), micromatch = __webpack_require__("../../node_modules/.pnpm/micromatch@4.0.8/node_modules/micromatch/index.js"), url = __webpack_require__("url"), errors_1 = __webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/errors.js");
3134
+ function matchPathFilter(pathFilter = '/', uri, req) {
3135
+ if (isStringPath(pathFilter)) return matchSingleStringPath(pathFilter, uri);
3136
+ if (isGlobPath(pathFilter)) return matchSingleGlobPath(pathFilter, uri);
3137
+ if (Array.isArray(pathFilter)) {
3138
+ if (pathFilter.every(isStringPath)) return matchMultiPath(pathFilter, uri);
3139
+ if (pathFilter.every(isGlobPath)) return matchMultiGlobPath(pathFilter, uri);
3140
+ throw Error(errors_1.ERRORS.ERR_CONTEXT_MATCHER_INVALID_ARRAY);
3141
+ }
3142
+ if ('function' == typeof pathFilter) return pathFilter(getUrlPathName(uri), req);
3143
+ throw Error(errors_1.ERRORS.ERR_CONTEXT_MATCHER_GENERIC);
3144
+ }
3145
+ function matchSingleStringPath(pathFilter, uri) {
3146
+ let pathname = getUrlPathName(uri);
3147
+ return pathname?.indexOf(pathFilter) === 0;
3148
+ }
3149
+ function matchSingleGlobPath(pattern, uri) {
3150
+ let matches = micromatch([
3151
+ getUrlPathName(uri)
3152
+ ], pattern);
3153
+ return matches && matches.length > 0;
3154
+ }
3155
+ function matchMultiGlobPath(patternList, uri) {
3156
+ return matchSingleGlobPath(patternList, uri);
3157
+ }
3158
+ function matchMultiPath(pathFilterList, uri) {
3159
+ let isMultiPath = !1;
3160
+ for (let context of pathFilterList)if (matchSingleStringPath(context, uri)) {
3161
+ isMultiPath = !0;
3162
+ break;
3163
+ }
3164
+ return isMultiPath;
3165
+ }
3166
+ function getUrlPathName(uri) {
3167
+ return uri && url.parse(uri).pathname;
3168
+ }
3169
+ function isStringPath(pathFilter) {
3170
+ return 'string' == typeof pathFilter && !isGlob(pathFilter);
3171
+ }
3172
+ function isGlobPath(pathFilter) {
3173
+ return isGlob(pathFilter);
3174
+ }
3175
+ },
3176
+ "../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/path-rewriter.js" (__unused_rspack_module, exports, __webpack_require__) {
3177
+ Object.defineProperty(exports, "__esModule", {
3178
+ value: !0
3179
+ }), exports.createPathRewriter = createPathRewriter;
3180
+ let is_plain_object_1 = __webpack_require__("../../node_modules/.pnpm/is-plain-object@5.0.0/node_modules/is-plain-object/dist/is-plain-object.js"), errors_1 = __webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/errors.js"), debug = __webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/debug.js").Debug.extend('path-rewriter');
3181
+ function createPathRewriter(rewriteConfig) {
3182
+ let rulesCache;
3183
+ if (isValidRewriteConfig(rewriteConfig)) if ('function' == typeof rewriteConfig) return rewriteConfig;
3184
+ else return rulesCache = parsePathRewriteRules(rewriteConfig), rewritePath;
3185
+ function rewritePath(path) {
3186
+ let result = path;
3187
+ for (let rule of rulesCache)if (rule.regex.test(path)) {
3188
+ debug('rewriting path from "%s" to "%s"', path, result = result.replace(rule.regex, rule.value));
3189
+ break;
3190
+ }
3191
+ return result;
3192
+ }
3193
+ }
3194
+ function isValidRewriteConfig(rewriteConfig) {
3195
+ if ('function' == typeof rewriteConfig) return !0;
3196
+ if ((0, is_plain_object_1.isPlainObject)(rewriteConfig)) return 0 !== Object.keys(rewriteConfig).length;
3197
+ if (null == rewriteConfig) return !1;
3198
+ throw Error(errors_1.ERRORS.ERR_PATH_REWRITER_CONFIG);
3199
+ }
3200
+ function parsePathRewriteRules(rewriteConfig) {
3201
+ let rules = [];
3202
+ if ((0, is_plain_object_1.isPlainObject)(rewriteConfig)) for (let [key, value] of Object.entries(rewriteConfig))rules.push({
3203
+ regex: new RegExp(key),
3204
+ value: value
3205
+ }), debug('rewrite rule created: "%s" ~> "%s"', key, value);
3206
+ return rules;
3207
+ }
3208
+ },
3209
+ "../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/plugins/default/debug-proxy-errors-plugin.js" (__unused_rspack_module, exports, __webpack_require__) {
3210
+ Object.defineProperty(exports, "__esModule", {
3211
+ value: !0
3212
+ }), exports.debugProxyErrorsPlugin = void 0;
3213
+ let debug = __webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/debug.js").Debug.extend('debug-proxy-errors-plugin');
3214
+ exports.debugProxyErrorsPlugin = (proxyServer)=>{
3215
+ proxyServer.on('error', (error, req, res, target)=>{
3216
+ debug(`http-proxy error event: \n%O`, error);
3217
+ }), proxyServer.on('proxyReq', (proxyReq, req, socket)=>{
3218
+ socket.on('error', (error)=>{
3219
+ debug('Socket error in proxyReq event: \n%O', error);
3220
+ });
3221
+ }), proxyServer.on('proxyRes', (proxyRes, req, res)=>{
3222
+ res.on('close', ()=>{
3223
+ res.writableEnded || (debug('Destroying proxyRes in proxyRes close event'), proxyRes.destroy());
3224
+ });
3225
+ }), proxyServer.on('proxyReqWs', (proxyReq, req, socket)=>{
3226
+ socket.on('error', (error)=>{
3227
+ debug('Socket error in proxyReqWs event: \n%O', error);
3228
+ });
3229
+ }), proxyServer.on('open', (proxySocket)=>{
3230
+ proxySocket.on('error', (error)=>{
3231
+ debug('Socket error in open event: \n%O', error);
3232
+ });
3233
+ }), proxyServer.on('close', (req, socket, head)=>{
3234
+ socket.on('error', (error)=>{
3235
+ debug('Socket error in close event: \n%O', error);
3236
+ });
3237
+ }), proxyServer.on('econnreset', (error, req, res, target)=>{
3238
+ debug(`http-proxy econnreset event: \n%O`, error);
3239
+ });
3240
+ };
3241
+ },
3242
+ "../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/plugins/default/error-response-plugin.js" (__unused_rspack_module, exports, __webpack_require__) {
3243
+ Object.defineProperty(exports, "__esModule", {
3244
+ value: !0
3245
+ }), exports.errorResponsePlugin = void 0;
3246
+ let status_code_1 = __webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/status-code.js");
3247
+ function isResponseLike(obj) {
3248
+ return obj && 'function' == typeof obj.writeHead;
3249
+ }
3250
+ function isSocketLike(obj) {
3251
+ return obj && 'function' == typeof obj.write && !('writeHead' in obj);
3252
+ }
3253
+ exports.errorResponsePlugin = (proxyServer, options)=>{
3254
+ proxyServer.on('error', (err, req, res, target)=>{
3255
+ if (!req && !res) throw err;
3256
+ if (isResponseLike(res)) {
3257
+ if (!res.headersSent) {
3258
+ let statusCode = (0, status_code_1.getStatusCode)(err.code);
3259
+ res.writeHead(statusCode);
3260
+ }
3261
+ let host = req.headers && req.headers.host;
3262
+ res.end(`Error occurred while trying to proxy: ${host}${req.url}`);
3263
+ } else isSocketLike(res) && res.destroy();
3264
+ });
3265
+ };
3266
+ },
3267
+ "../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/plugins/default/index.js" (__unused_rspack_module, exports, __webpack_require__) {
3268
+ var __createBinding = this && this.__createBinding || (Object.create ? function(o, m, k, k2) {
3269
+ void 0 === k2 && (k2 = k);
3270
+ var desc = Object.getOwnPropertyDescriptor(m, k);
3271
+ (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) && (desc = {
3272
+ enumerable: !0,
3273
+ get: function() {
3274
+ return m[k];
3275
+ }
3276
+ }), Object.defineProperty(o, k2, desc);
3277
+ } : function(o, m, k, k2) {
3278
+ void 0 === k2 && (k2 = k), o[k2] = m[k];
3279
+ }), __exportStar = this && this.__exportStar || function(m, exports) {
3280
+ for(var p in m)"default" === p || Object.prototype.hasOwnProperty.call(exports, p) || __createBinding(exports, m, p);
3281
+ };
3282
+ Object.defineProperty(exports, "__esModule", {
3283
+ value: !0
3284
+ }), __exportStar(__webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/plugins/default/debug-proxy-errors-plugin.js"), exports), __exportStar(__webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/plugins/default/error-response-plugin.js"), exports), __exportStar(__webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/plugins/default/logger-plugin.js"), exports), __exportStar(__webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/plugins/default/proxy-events.js"), exports);
3285
+ },
3286
+ "../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/plugins/default/logger-plugin.js" (__unused_rspack_module, exports, __webpack_require__) {
3287
+ Object.defineProperty(exports, "__esModule", {
3288
+ value: !0
3289
+ }), exports.loggerPlugin = void 0;
3290
+ let url_1 = __webpack_require__("url"), logger_1 = __webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/logger.js"), logger_plugin_1 = __webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/utils/logger-plugin.js");
3291
+ exports.loggerPlugin = (proxyServer, options)=>{
3292
+ let logger = (0, logger_1.getLogger)(options);
3293
+ proxyServer.on('error', (err, req, res, target)=>{
3294
+ let hostname = req?.headers?.host, requestHref = `${hostname}${req?.url}`, targetHref = `${target?.href}`;
3295
+ logger.error('[HPM] Error occurred while proxying request %s to %s [%s] (%s)', requestHref, targetHref, err.code || err, 'https://nodejs.org/api/errors.html#errors_common_system_errors');
3296
+ }), proxyServer.on('proxyRes', (proxyRes, req, res)=>{
3297
+ let target, originalUrl = req.originalUrl ?? `${req.baseUrl || ''}${req.url}`;
3298
+ try {
3299
+ let port = (0, logger_plugin_1.getPort)(proxyRes.req?.agent?.sockets), obj = {
3300
+ protocol: proxyRes.req.protocol,
3301
+ host: proxyRes.req.host,
3302
+ pathname: proxyRes.req.path
3303
+ };
3304
+ target = new url_1.URL(`${obj.protocol}//${obj.host}${obj.pathname}`), port && (target.port = port);
3305
+ } catch (err) {
3306
+ (target = new url_1.URL(options.target)).pathname = proxyRes.req.path;
3307
+ }
3308
+ let targetUrl = target.toString(), exchange = `[HPM] ${req.method} ${originalUrl} -> ${targetUrl} [${proxyRes.statusCode}]`;
3309
+ logger.info(exchange);
3310
+ }), proxyServer.on('open', (socket)=>{
3311
+ logger.info('[HPM] Client connected: %o', socket.address());
3312
+ }), proxyServer.on('close', (req, proxySocket, proxyHead)=>{
3313
+ logger.info('[HPM] Client disconnected: %o', proxySocket.address());
3314
+ });
3315
+ };
3316
+ },
3317
+ "../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/plugins/default/proxy-events.js" (__unused_rspack_module, exports, __webpack_require__) {
3318
+ Object.defineProperty(exports, "__esModule", {
3319
+ value: !0
3320
+ }), exports.proxyEventsPlugin = void 0;
3321
+ let debug_1 = __webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/debug.js"), function_1 = __webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/utils/function.js"), debug = debug_1.Debug.extend('proxy-events-plugin');
3322
+ exports.proxyEventsPlugin = (proxyServer, options)=>{
3323
+ Object.entries(options.on || {}).forEach(([eventName, handler])=>{
3324
+ debug(`register event handler: "${eventName}" -> "${(0, function_1.getFunctionName)(handler)}"`), proxyServer.on(eventName, handler);
3325
+ });
3326
+ };
3327
+ },
3328
+ "../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/router.js" (__unused_rspack_module, exports, __webpack_require__) {
3329
+ Object.defineProperty(exports, "__esModule", {
3330
+ value: !0
3331
+ }), exports.getTarget = getTarget;
3332
+ let is_plain_object_1 = __webpack_require__("../../node_modules/.pnpm/is-plain-object@5.0.0/node_modules/is-plain-object/dist/is-plain-object.js"), debug = __webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/debug.js").Debug.extend('router');
3333
+ async function getTarget(req, config) {
3334
+ let newTarget, router = config.router;
3335
+ return (0, is_plain_object_1.isPlainObject)(router) ? newTarget = getTargetFromProxyTable(req, router) : 'function' == typeof router && (newTarget = await router(req)), newTarget;
3336
+ }
3337
+ function getTargetFromProxyTable(req, table) {
3338
+ let result, host = req.headers.host, hostAndPath = host + req.url;
3339
+ for (let [key, value] of Object.entries(table))if (containsPath(key)) {
3340
+ if (hostAndPath.indexOf(key) > -1) {
3341
+ debug('match: "%s" -> "%s"', key, result = value);
3342
+ break;
3343
+ }
3344
+ } else if (key === host) {
3345
+ debug('match: "%s" -> "%s"', host, result = value);
3346
+ break;
3347
+ }
3348
+ return result;
3349
+ }
3350
+ function containsPath(v) {
3351
+ return v.indexOf('/') > -1;
3352
+ }
3353
+ },
3354
+ "../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/status-code.js" (__unused_rspack_module, exports) {
3355
+ function getStatusCode(errorCode) {
3356
+ let statusCode;
3357
+ if (/HPE_INVALID/.test(errorCode)) statusCode = 502;
3358
+ else switch(errorCode){
3359
+ case 'ECONNRESET':
3360
+ case 'ENOTFOUND':
3361
+ case 'ECONNREFUSED':
3362
+ case 'ETIMEDOUT':
3363
+ statusCode = 504;
3364
+ break;
3365
+ default:
3366
+ statusCode = 500;
3367
+ }
3368
+ return statusCode;
3369
+ }
3370
+ Object.defineProperty(exports, "__esModule", {
3371
+ value: !0
3372
+ }), exports.getStatusCode = getStatusCode;
3373
+ },
3374
+ "../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/utils/function.js" (__unused_rspack_module, exports) {
3375
+ function getFunctionName(fn) {
3376
+ return fn.name || '[anonymous Function]';
3377
+ }
3378
+ Object.defineProperty(exports, "__esModule", {
3379
+ value: !0
3380
+ }), exports.getFunctionName = getFunctionName;
3381
+ },
3382
+ "../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/utils/logger-plugin.js" (__unused_rspack_module, exports) {
3383
+ function getPort(sockets) {
3384
+ return Object.keys(sockets || {})?.[0]?.split(':')[1];
3385
+ }
3386
+ Object.defineProperty(exports, "__esModule", {
3387
+ value: !0
3388
+ }), exports.getPort = getPort;
3389
+ },
3390
+ "../../node_modules/.pnpm/supports-color@10.2.2/node_modules/supports-color/index.js" (__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
3391
+ let flagForceColor;
3392
+ __webpack_require__.r(__webpack_exports__), __webpack_require__.d(__webpack_exports__, {
3393
+ createSupportsColor: ()=>createSupportsColor,
3394
+ default: ()=>__rspack_default_export
3395
+ });
3396
+ var node_process__rspack_import_0 = __webpack_require__("node:process"), node_os__rspack_import_1 = __webpack_require__("node:os"), node_tty__rspack_import_2 = __webpack_require__("node:tty");
3397
+ function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : node_process__rspack_import_0.default.argv) {
3398
+ let prefix = flag.startsWith('-') ? '' : 1 === flag.length ? '-' : '--', position = argv.indexOf(prefix + flag), terminatorPosition = argv.indexOf('--');
3399
+ return -1 !== position && (-1 === terminatorPosition || position < terminatorPosition);
3400
+ }
3401
+ let { env } = node_process__rspack_import_0.default;
3402
+ function envForceColor() {
3403
+ if (!('FORCE_COLOR' in env)) return;
3404
+ if ('true' === env.FORCE_COLOR) return 1;
3405
+ if ('false' === env.FORCE_COLOR) return 0;
3406
+ if (0 === env.FORCE_COLOR.length) return 1;
3407
+ let level = Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
3408
+ if ([
3409
+ 0,
3410
+ 1,
3411
+ 2,
3412
+ 3
3413
+ ].includes(level)) return level;
3414
+ }
3415
+ function translateLevel(level) {
3416
+ return 0 !== level && {
3417
+ level,
3418
+ hasBasic: !0,
3419
+ has256: level >= 2,
3420
+ has16m: level >= 3
3421
+ };
3422
+ }
3423
+ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = !0 } = {}) {
3424
+ let noFlagForceColor = envForceColor();
3425
+ void 0 !== noFlagForceColor && (flagForceColor = noFlagForceColor);
3426
+ let forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
3427
+ if (0 === forceColor) return 0;
3428
+ if (sniffFlags) {
3429
+ if (hasFlag('color=16m') || hasFlag('color=full') || hasFlag('color=truecolor')) return 3;
3430
+ if (hasFlag('color=256')) return 2;
3431
+ }
3432
+ if ('TF_BUILD' in env && 'AGENT_NAME' in env) return 1;
3433
+ if (haveStream && !streamIsTTY && void 0 === forceColor) return 0;
3434
+ let min = forceColor || 0;
3435
+ if ('dumb' === env.TERM) return min;
3436
+ if ('win32' === node_process__rspack_import_0.default.platform) {
3437
+ let osRelease = node_os__rspack_import_1.default.release().split('.');
3438
+ return Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586 ? Number(osRelease[2]) >= 14931 ? 3 : 2 : 1;
3439
+ }
3440
+ if ('CI' in env) return [
3441
+ 'GITHUB_ACTIONS',
3442
+ 'GITEA_ACTIONS',
3443
+ 'CIRCLECI'
3444
+ ].some((key)=>key in env) ? 3 : [
3445
+ 'TRAVIS',
3446
+ 'APPVEYOR',
3447
+ 'GITLAB_CI',
3448
+ 'BUILDKITE',
3449
+ 'DRONE'
3450
+ ].some((sign)=>sign in env) || 'codeship' === env.CI_NAME ? 1 : min;
3451
+ if ('TEAMCITY_VERSION' in env) return +!!/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION);
3452
+ if ('truecolor' === env.COLORTERM || 'xterm-kitty' === env.TERM || 'xterm-ghostty' === env.TERM || 'wezterm' === env.TERM) return 3;
3453
+ if ('TERM_PROGRAM' in env) {
3454
+ let version = Number.parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);
3455
+ switch(env.TERM_PROGRAM){
3456
+ case 'iTerm.app':
3457
+ return version >= 3 ? 3 : 2;
3458
+ case 'Apple_Terminal':
3459
+ return 2;
3460
+ }
3461
+ }
3462
+ return /-256(color)?$/i.test(env.TERM) ? 2 : /^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM) || 'COLORTERM' in env ? 1 : min;
3463
+ }
3464
+ function createSupportsColor(stream, options = {}) {
3465
+ return translateLevel(_supportsColor(stream, {
3466
+ streamIsTTY: stream && stream.isTTY,
3467
+ ...options
3468
+ }));
3469
+ }
3470
+ hasFlag('no-color') || hasFlag('no-colors') || hasFlag('color=false') || hasFlag('color=never') ? flagForceColor = 0 : (hasFlag('color') || hasFlag('colors') || hasFlag('color=true') || hasFlag('color=always')) && (flagForceColor = 1);
3471
+ let __rspack_default_export = {
3472
+ stdout: createSupportsColor({
3473
+ isTTY: node_tty__rspack_import_2.default.isatty(1)
3474
+ }),
3475
+ stderr: createSupportsColor({
3476
+ isTTY: node_tty__rspack_import_2.default.isatty(2)
3477
+ })
3478
+ };
3479
+ }
3480
+ });