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

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