@rsbuild/core 1.0.0-alpha.2 → 1.0.0-alpha.4

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 (98) hide show
  1. package/compiled/autoprefixer/index.d.ts +95 -0
  2. package/compiled/autoprefixer/index.js +10217 -0
  3. package/compiled/autoprefixer/license +20 -0
  4. package/compiled/autoprefixer/package.json +1 -0
  5. package/compiled/browserslist/index.d.ts +201 -0
  6. package/compiled/browserslist/index.js +2017 -0
  7. package/compiled/browserslist/license +20 -0
  8. package/compiled/browserslist/package.json +1 -0
  9. package/compiled/chokidar/index.d.ts +198 -0
  10. package/compiled/chokidar/index.js +6692 -0
  11. package/compiled/chokidar/license +21 -0
  12. package/compiled/chokidar/package.json +1 -0
  13. package/compiled/css-loader/index.js +20 -20
  14. package/compiled/gzip-size/index.d.ts +1 -0
  15. package/compiled/gzip-size/index.js +242 -0
  16. package/compiled/gzip-size/package.json +1 -0
  17. package/compiled/http-proxy-middleware/index.d.ts +315 -0
  18. package/compiled/http-proxy-middleware/index.js +7503 -0
  19. package/compiled/http-proxy-middleware/license +22 -0
  20. package/compiled/http-proxy-middleware/package.json +1 -0
  21. package/compiled/launch-editor-middleware/index.js +9 -9
  22. package/compiled/postcss-loader/index.js +8 -8
  23. package/compiled/rspack-chain/index.d.ts +600 -0
  24. package/compiled/rspack-chain/index.js +2192 -0
  25. package/compiled/rspack-chain/license +373 -0
  26. package/compiled/rspack-chain/package.json +1 -0
  27. package/compiled/rspack-manifest-plugin/index.js +4 -4
  28. package/compiled/webpack-bundle-analyzer/index.d.ts +160 -0
  29. package/compiled/webpack-bundle-analyzer/index.js +14968 -0
  30. package/compiled/webpack-bundle-analyzer/license +20 -0
  31. package/compiled/webpack-bundle-analyzer/package.json +1 -0
  32. package/compiled/webpack-bundle-analyzer/public/viewer.js +16 -0
  33. package/compiled/webpack-bundle-analyzer/public/viewer.js.LICENSE.txt +10 -0
  34. package/compiled/webpack-merge/index.d.ts +31 -0
  35. package/compiled/webpack-merge/index.js +1239 -0
  36. package/compiled/webpack-merge/license +20 -0
  37. package/compiled/webpack-merge/package.json +1 -0
  38. package/compiled/ws/index.js +295 -110
  39. package/compiled/ws/package.json +1 -1
  40. package/dist/index.cjs +915 -2539
  41. package/dist/index.js +1033 -2701
  42. package/dist-types/cli/commands.d.ts +1 -1
  43. package/dist-types/config.d.ts +1 -1
  44. package/dist-types/configChain.d.ts +158 -2
  45. package/dist-types/constants.d.ts +1 -0
  46. package/dist-types/createContext.d.ts +1 -2
  47. package/dist-types/helpers.d.ts +7 -4
  48. package/dist-types/index.d.ts +2 -2
  49. package/dist-types/initHooks.d.ts +1 -1
  50. package/dist-types/initPlugins.d.ts +1 -2
  51. package/dist-types/internal.d.ts +1 -1
  52. package/dist-types/loader/transformLoader.d.ts +1 -1
  53. package/dist-types/mergeConfig.d.ts +1 -1
  54. package/dist-types/pluginManager.d.ts +1 -1
  55. package/dist-types/plugins/css.d.ts +1 -2
  56. package/dist-types/plugins/html.d.ts +1 -2
  57. package/dist-types/plugins/minimize.d.ts +1 -2
  58. package/dist-types/provider/build.d.ts +1 -1
  59. package/dist-types/provider/createCompiler.d.ts +1 -2
  60. package/dist-types/provider/initConfigs.d.ts +1 -2
  61. package/dist-types/provider/inspectConfig.d.ts +1 -1
  62. package/dist-types/provider/rspackConfig.d.ts +2 -2
  63. package/dist-types/rspack/HtmlBasicPlugin.d.ts +1 -1
  64. package/dist-types/rspack/InlineChunkHtmlPlugin.d.ts +1 -1
  65. package/dist-types/rspack/preload/HtmlPreloadOrPrefetchPlugin.d.ts +1 -1
  66. package/dist-types/rspack/preload/helpers/doesChunkBelongToHtml.d.ts +1 -1
  67. package/dist-types/rspack/preload/helpers/extractChunks.d.ts +1 -1
  68. package/dist-types/server/compilerDevMiddleware.d.ts +1 -1
  69. package/dist-types/server/devMiddleware.d.ts +4 -1
  70. package/dist-types/server/devServer.d.ts +1 -2
  71. package/dist-types/server/environment.d.ts +1 -1
  72. package/dist-types/server/getDevMiddlewares.d.ts +1 -1
  73. package/dist-types/server/helper.d.ts +1 -2
  74. package/dist-types/server/httpServer.d.ts +1 -1
  75. package/dist-types/server/middlewares.d.ts +1 -1
  76. package/dist-types/server/prodServer.d.ts +1 -2
  77. package/dist-types/server/proxy.d.ts +3 -3
  78. package/dist-types/server/socketServer.d.ts +1 -1
  79. package/dist-types/server/watchFiles.d.ts +1 -1
  80. package/dist-types/types/config/dev.d.ts +85 -0
  81. package/dist-types/types/config/html.d.ts +107 -0
  82. package/dist-types/types/config/index.d.ts +134 -0
  83. package/dist-types/types/config/output.d.ts +301 -0
  84. package/dist-types/types/config/performance.d.ts +122 -0
  85. package/dist-types/types/config/security.d.ts +18 -0
  86. package/dist-types/types/config/server.d.ts +106 -0
  87. package/dist-types/types/config/source.d.ts +79 -0
  88. package/dist-types/types/config/tools.d.ts +86 -0
  89. package/dist-types/types/context.d.ts +38 -0
  90. package/dist-types/types/hooks.d.ts +125 -0
  91. package/dist-types/types/index.d.ts +9 -0
  92. package/dist-types/types/plugin.d.ts +194 -0
  93. package/dist-types/{types.d.ts → types/rsbuild.d.ts} +56 -33
  94. package/dist-types/types/rspack.d.ts +28 -0
  95. package/dist-types/types/stats.d.ts +17 -0
  96. package/dist-types/types/thirdParty.d.ts +169 -0
  97. package/dist-types/types/utils.d.ts +14 -0
  98. package/package.json +20 -5
@@ -0,0 +1,2192 @@
1
+ /******/ (() => { // webpackBootstrap
2
+ /******/ var __webpack_modules__ = ({
3
+
4
+ /***/ 296:
5
+ /***/ (function(module) {
6
+
7
+ (function (global, factory) {
8
+ true ? module.exports = factory() :
9
+ 0;
10
+ }(this, (function () { 'use strict';
11
+
12
+ var isMergeableObject = function isMergeableObject(value) {
13
+ return isNonNullObject(value)
14
+ && !isSpecial(value)
15
+ };
16
+
17
+ function isNonNullObject(value) {
18
+ return !!value && typeof value === 'object'
19
+ }
20
+
21
+ function isSpecial(value) {
22
+ var stringValue = Object.prototype.toString.call(value);
23
+
24
+ return stringValue === '[object RegExp]'
25
+ || stringValue === '[object Date]'
26
+ || isReactElement(value)
27
+ }
28
+
29
+ // see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25
30
+ var canUseSymbol = typeof Symbol === 'function' && Symbol.for;
31
+ var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;
32
+
33
+ function isReactElement(value) {
34
+ return value.$$typeof === REACT_ELEMENT_TYPE
35
+ }
36
+
37
+ function emptyTarget(val) {
38
+ return Array.isArray(val) ? [] : {}
39
+ }
40
+
41
+ function cloneIfNecessary(value, optionsArgument) {
42
+ var clone = optionsArgument && optionsArgument.clone === true;
43
+ return (clone && isMergeableObject(value)) ? deepmerge(emptyTarget(value), value, optionsArgument) : value
44
+ }
45
+
46
+ function defaultArrayMerge(target, source, optionsArgument) {
47
+ var destination = target.slice();
48
+ source.forEach(function(e, i) {
49
+ if (typeof destination[i] === 'undefined') {
50
+ destination[i] = cloneIfNecessary(e, optionsArgument);
51
+ } else if (isMergeableObject(e)) {
52
+ destination[i] = deepmerge(target[i], e, optionsArgument);
53
+ } else if (target.indexOf(e) === -1) {
54
+ destination.push(cloneIfNecessary(e, optionsArgument));
55
+ }
56
+ });
57
+ return destination
58
+ }
59
+
60
+ function mergeObject(target, source, optionsArgument) {
61
+ var destination = {};
62
+ if (isMergeableObject(target)) {
63
+ Object.keys(target).forEach(function(key) {
64
+ destination[key] = cloneIfNecessary(target[key], optionsArgument);
65
+ });
66
+ }
67
+ Object.keys(source).forEach(function(key) {
68
+ if (!isMergeableObject(source[key]) || !target[key]) {
69
+ destination[key] = cloneIfNecessary(source[key], optionsArgument);
70
+ } else {
71
+ destination[key] = deepmerge(target[key], source[key], optionsArgument);
72
+ }
73
+ });
74
+ return destination
75
+ }
76
+
77
+ function deepmerge(target, source, optionsArgument) {
78
+ var sourceIsArray = Array.isArray(source);
79
+ var targetIsArray = Array.isArray(target);
80
+ var options = optionsArgument || { arrayMerge: defaultArrayMerge };
81
+ var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
82
+
83
+ if (!sourceAndTargetTypesMatch) {
84
+ return cloneIfNecessary(source, optionsArgument)
85
+ } else if (sourceIsArray) {
86
+ var arrayMerge = options.arrayMerge || defaultArrayMerge;
87
+ return arrayMerge(target, source, optionsArgument)
88
+ } else {
89
+ return mergeObject(target, source, optionsArgument)
90
+ }
91
+ }
92
+
93
+ deepmerge.all = function deepmergeAll(array, optionsArgument) {
94
+ if (!Array.isArray(array) || array.length < 2) {
95
+ throw new Error('first argument should be an array with at least two elements')
96
+ }
97
+
98
+ // we are sure there are at least 2 values, so it is safe to have no initial value
99
+ return array.reduce(function(prev, next) {
100
+ return deepmerge(prev, next, optionsArgument)
101
+ })
102
+ };
103
+
104
+ var deepmerge_1 = deepmerge;
105
+
106
+ return deepmerge_1;
107
+
108
+ })));
109
+
110
+
111
+ /***/ }),
112
+
113
+ /***/ 95:
114
+ /***/ ((__unused_webpack_module, exports) => {
115
+
116
+ "use strict";
117
+
118
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
119
+ exports.arrayToString = void 0;
120
+ /**
121
+ * Stringify an array of values.
122
+ */
123
+ const arrayToString = (array, space, next) => {
124
+ // Map array values to their stringified values with correct indentation.
125
+ const values = array
126
+ .map(function (value, index) {
127
+ const result = next(value, index);
128
+ if (result === undefined)
129
+ return String(result);
130
+ return space + result.split("\n").join(`\n${space}`);
131
+ })
132
+ .join(space ? ",\n" : ",");
133
+ const eol = space && values ? "\n" : "";
134
+ return `[${eol}${values}${eol}]`;
135
+ };
136
+ exports.arrayToString = arrayToString;
137
+ //# sourceMappingURL=array.js.map
138
+
139
+ /***/ }),
140
+
141
+ /***/ 869:
142
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
143
+
144
+ "use strict";
145
+
146
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
147
+ exports.FunctionParser = exports.dedentFunction = exports.functionToString = exports.USED_METHOD_KEY = void 0;
148
+ const quote_1 = __nccwpck_require__(309);
149
+ /**
150
+ * Used in function stringification.
151
+ */
152
+ /* istanbul ignore next */
153
+ const METHOD_NAMES_ARE_QUOTED = {
154
+ " "() {
155
+ /* Empty. */
156
+ },
157
+ }[" "]
158
+ .toString()
159
+ .charAt(0) === '"';
160
+ const FUNCTION_PREFIXES = {
161
+ Function: "function ",
162
+ GeneratorFunction: "function* ",
163
+ AsyncFunction: "async function ",
164
+ AsyncGeneratorFunction: "async function* ",
165
+ };
166
+ const METHOD_PREFIXES = {
167
+ Function: "",
168
+ GeneratorFunction: "*",
169
+ AsyncFunction: "async ",
170
+ AsyncGeneratorFunction: "async *",
171
+ };
172
+ const TOKENS_PRECEDING_REGEXPS = new Set(("case delete else in instanceof new return throw typeof void " +
173
+ ", ; : + - ! ~ & | ^ * / % < > ? =").split(" "));
174
+ /**
175
+ * Track function parser usage.
176
+ */
177
+ exports.USED_METHOD_KEY = new WeakSet();
178
+ /**
179
+ * Stringify a function.
180
+ */
181
+ const functionToString = (fn, space, next, key) => {
182
+ const name = typeof key === "string" ? key : undefined;
183
+ // Track in function parser for object stringify to avoid duplicate output.
184
+ if (name !== undefined)
185
+ exports.USED_METHOD_KEY.add(fn);
186
+ return new FunctionParser(fn, space, next, name).stringify();
187
+ };
188
+ exports.functionToString = functionToString;
189
+ /**
190
+ * Rewrite a stringified function to remove initial indentation.
191
+ */
192
+ function dedentFunction(fnString) {
193
+ let found;
194
+ for (const line of fnString.split("\n").slice(1)) {
195
+ const m = /^[\s\t]+/.exec(line);
196
+ if (!m)
197
+ return fnString; // Early exit without indent.
198
+ const [str] = m;
199
+ if (found === undefined)
200
+ found = str;
201
+ else if (str.length < found.length)
202
+ found = str;
203
+ }
204
+ return found ? fnString.split(`\n${found}`).join("\n") : fnString;
205
+ }
206
+ exports.dedentFunction = dedentFunction;
207
+ /**
208
+ * Function parser and stringify.
209
+ */
210
+ class FunctionParser {
211
+ constructor(fn, indent, next, key) {
212
+ this.fn = fn;
213
+ this.indent = indent;
214
+ this.next = next;
215
+ this.key = key;
216
+ this.pos = 0;
217
+ this.hadKeyword = false;
218
+ this.fnString = Function.prototype.toString.call(fn);
219
+ this.fnType = fn.constructor.name;
220
+ this.keyQuote = key === undefined ? "" : quote_1.quoteKey(key, next);
221
+ this.keyPrefix =
222
+ key === undefined ? "" : `${this.keyQuote}:${indent ? " " : ""}`;
223
+ this.isMethodCandidate =
224
+ key === undefined ? false : this.fn.name === "" || this.fn.name === key;
225
+ }
226
+ stringify() {
227
+ const value = this.tryParse();
228
+ // If we can't stringify this function, return a void expression; for
229
+ // bonus help with debugging, include the function as a string literal.
230
+ if (!value) {
231
+ return `${this.keyPrefix}void ${this.next(this.fnString)}`;
232
+ }
233
+ return dedentFunction(value);
234
+ }
235
+ getPrefix() {
236
+ if (this.isMethodCandidate && !this.hadKeyword) {
237
+ return METHOD_PREFIXES[this.fnType] + this.keyQuote;
238
+ }
239
+ return this.keyPrefix + FUNCTION_PREFIXES[this.fnType];
240
+ }
241
+ tryParse() {
242
+ if (this.fnString[this.fnString.length - 1] !== "}") {
243
+ // Must be an arrow function.
244
+ return this.keyPrefix + this.fnString;
245
+ }
246
+ // Attempt to remove function prefix.
247
+ if (this.fn.name) {
248
+ const result = this.tryStrippingName();
249
+ if (result)
250
+ return result;
251
+ }
252
+ // Support class expressions.
253
+ const prevPos = this.pos;
254
+ if (this.consumeSyntax() === "class")
255
+ return this.fnString;
256
+ this.pos = prevPos;
257
+ if (this.tryParsePrefixTokens()) {
258
+ const result = this.tryStrippingName();
259
+ if (result)
260
+ return result;
261
+ let offset = this.pos;
262
+ switch (this.consumeSyntax("WORD_LIKE")) {
263
+ case "WORD_LIKE":
264
+ if (this.isMethodCandidate && !this.hadKeyword) {
265
+ offset = this.pos;
266
+ }
267
+ case "()":
268
+ if (this.fnString.substr(this.pos, 2) === "=>") {
269
+ return this.keyPrefix + this.fnString;
270
+ }
271
+ this.pos = offset;
272
+ case '"':
273
+ case "'":
274
+ case "[]":
275
+ return this.getPrefix() + this.fnString.substr(this.pos);
276
+ }
277
+ }
278
+ }
279
+ /**
280
+ * Attempt to parse the function from the current position by first stripping
281
+ * the function's name from the front. This is not a fool-proof method on all
282
+ * JavaScript engines, but yields good results on Node.js 4 (and slightly
283
+ * less good results on Node.js 6 and 8).
284
+ */
285
+ tryStrippingName() {
286
+ if (METHOD_NAMES_ARE_QUOTED) {
287
+ // ... then this approach is unnecessary and yields false positives.
288
+ return;
289
+ }
290
+ let start = this.pos;
291
+ const prefix = this.fnString.substr(this.pos, this.fn.name.length);
292
+ if (prefix === this.fn.name) {
293
+ this.pos += prefix.length;
294
+ if (this.consumeSyntax() === "()" &&
295
+ this.consumeSyntax() === "{}" &&
296
+ this.pos === this.fnString.length) {
297
+ // Don't include the function's name if it will be included in the
298
+ // prefix, or if it's invalid as a name in a function expression.
299
+ if (this.isMethodCandidate || !quote_1.isValidVariableName(prefix)) {
300
+ start += prefix.length;
301
+ }
302
+ return this.getPrefix() + this.fnString.substr(start);
303
+ }
304
+ }
305
+ this.pos = start;
306
+ }
307
+ /**
308
+ * Attempt to advance the parser past the keywords expected to be at the
309
+ * start of this function's definition. This method sets `this.hadKeyword`
310
+ * based on whether or not a `function` keyword is consumed.
311
+ */
312
+ tryParsePrefixTokens() {
313
+ let posPrev = this.pos;
314
+ this.hadKeyword = false;
315
+ switch (this.fnType) {
316
+ case "AsyncFunction":
317
+ if (this.consumeSyntax() !== "async")
318
+ return false;
319
+ posPrev = this.pos;
320
+ case "Function":
321
+ if (this.consumeSyntax() === "function") {
322
+ this.hadKeyword = true;
323
+ }
324
+ else {
325
+ this.pos = posPrev;
326
+ }
327
+ return true;
328
+ case "AsyncGeneratorFunction":
329
+ if (this.consumeSyntax() !== "async")
330
+ return false;
331
+ case "GeneratorFunction":
332
+ let token = this.consumeSyntax();
333
+ if (token === "function") {
334
+ token = this.consumeSyntax();
335
+ this.hadKeyword = true;
336
+ }
337
+ return token === "*";
338
+ }
339
+ }
340
+ /**
341
+ * Advance the parser past one element of JavaScript syntax. This could be a
342
+ * matched pair of delimiters, like braces or parentheses, or an atomic unit
343
+ * like a keyword, variable, or operator. Return a normalized string
344
+ * representation of the element parsed--for example, returns '{}' for a
345
+ * matched pair of braces. Comments and whitespace are skipped.
346
+ *
347
+ * (This isn't a full parser, so the token scanning logic used here is as
348
+ * simple as it can be. As a consequence, some things that are one token in
349
+ * JavaScript, like decimal number literals or most multi-character operators
350
+ * like '&&', are split into more than one token here. However, awareness of
351
+ * some multi-character sequences like '=>' is necessary, so we match the few
352
+ * of them that we care about.)
353
+ */
354
+ consumeSyntax(wordLikeToken) {
355
+ const m = this.consumeMatch(/^(?:([A-Za-z_0-9$\xA0-\uFFFF]+)|=>|\+\+|\-\-|.)/);
356
+ if (!m)
357
+ return;
358
+ const [token, match] = m;
359
+ this.consumeWhitespace();
360
+ if (match)
361
+ return wordLikeToken || match;
362
+ switch (token) {
363
+ case "(":
364
+ return this.consumeSyntaxUntil("(", ")");
365
+ case "[":
366
+ return this.consumeSyntaxUntil("[", "]");
367
+ case "{":
368
+ return this.consumeSyntaxUntil("{", "}");
369
+ case "`":
370
+ return this.consumeTemplate();
371
+ case '"':
372
+ return this.consumeRegExp(/^(?:[^\\"]|\\.)*"/, '"');
373
+ case "'":
374
+ return this.consumeRegExp(/^(?:[^\\']|\\.)*'/, "'");
375
+ }
376
+ return token;
377
+ }
378
+ consumeSyntaxUntil(startToken, endToken) {
379
+ let isRegExpAllowed = true;
380
+ for (;;) {
381
+ const token = this.consumeSyntax();
382
+ if (token === endToken)
383
+ return startToken + endToken;
384
+ if (!token || token === ")" || token === "]" || token === "}")
385
+ return;
386
+ if (token === "/" &&
387
+ isRegExpAllowed &&
388
+ this.consumeMatch(/^(?:\\.|[^\\\/\n[]|\[(?:\\.|[^\]])*\])+\/[a-z]*/)) {
389
+ isRegExpAllowed = false;
390
+ this.consumeWhitespace();
391
+ }
392
+ else {
393
+ isRegExpAllowed = TOKENS_PRECEDING_REGEXPS.has(token);
394
+ }
395
+ }
396
+ }
397
+ consumeMatch(re) {
398
+ const m = re.exec(this.fnString.substr(this.pos));
399
+ if (m)
400
+ this.pos += m[0].length;
401
+ return m;
402
+ }
403
+ /**
404
+ * Advance the parser past an arbitrary regular expression. Return `token`,
405
+ * or the match object of the regexp.
406
+ */
407
+ consumeRegExp(re, token) {
408
+ const m = re.exec(this.fnString.substr(this.pos));
409
+ if (!m)
410
+ return;
411
+ this.pos += m[0].length;
412
+ this.consumeWhitespace();
413
+ return token;
414
+ }
415
+ /**
416
+ * Advance the parser past a template string.
417
+ */
418
+ consumeTemplate() {
419
+ for (;;) {
420
+ this.consumeMatch(/^(?:[^`$\\]|\\.|\$(?!{))*/);
421
+ if (this.fnString[this.pos] === "`") {
422
+ this.pos++;
423
+ this.consumeWhitespace();
424
+ return "`";
425
+ }
426
+ if (this.fnString.substr(this.pos, 2) === "${") {
427
+ this.pos += 2;
428
+ this.consumeWhitespace();
429
+ if (this.consumeSyntaxUntil("{", "}"))
430
+ continue;
431
+ }
432
+ return;
433
+ }
434
+ }
435
+ /**
436
+ * Advance the parser past any whitespace or comments.
437
+ */
438
+ consumeWhitespace() {
439
+ this.consumeMatch(/^(?:\s|\/\/.*|\/\*[^]*?\*\/)*/);
440
+ }
441
+ }
442
+ exports.FunctionParser = FunctionParser;
443
+ //# sourceMappingURL=function.js.map
444
+
445
+ /***/ }),
446
+
447
+ /***/ 277:
448
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
449
+
450
+ "use strict";
451
+
452
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
453
+ exports.stringify = void 0;
454
+ const stringify_1 = __nccwpck_require__(960);
455
+ const quote_1 = __nccwpck_require__(309);
456
+ /**
457
+ * Root path node.
458
+ */
459
+ const ROOT_SENTINEL = Symbol("root");
460
+ /**
461
+ * Stringify any JavaScript value.
462
+ */
463
+ function stringify(value, replacer, indent, options = {}) {
464
+ const space = typeof indent === "string" ? indent : " ".repeat(indent || 0);
465
+ const path = [];
466
+ const stack = new Set();
467
+ const tracking = new Map();
468
+ const unpack = new Map();
469
+ let valueCount = 0;
470
+ const { maxDepth = 100, references = false, skipUndefinedProperties = false, maxValues = 100000, } = options;
471
+ // Wrap replacer function to support falling back on supported stringify.
472
+ const valueToString = replacerToString(replacer);
473
+ // Every time you call `next(value)` execute this function.
474
+ const onNext = (value, key) => {
475
+ if (++valueCount > maxValues)
476
+ return;
477
+ if (skipUndefinedProperties && value === undefined)
478
+ return;
479
+ if (path.length > maxDepth)
480
+ return;
481
+ // An undefined key is treated as an out-of-band "value".
482
+ if (key === undefined)
483
+ return valueToString(value, space, onNext, key);
484
+ path.push(key);
485
+ const result = builder(value, key === ROOT_SENTINEL ? undefined : key);
486
+ path.pop();
487
+ return result;
488
+ };
489
+ const builder = references
490
+ ? (value, key) => {
491
+ if (value !== null &&
492
+ (typeof value === "object" ||
493
+ typeof value === "function" ||
494
+ typeof value === "symbol")) {
495
+ // Track nodes to restore later.
496
+ if (tracking.has(value)) {
497
+ unpack.set(path.slice(1), tracking.get(value));
498
+ // Use `undefined` as temporaray stand-in for referenced nodes
499
+ return valueToString(undefined, space, onNext, key);
500
+ }
501
+ // Track encountered nodes.
502
+ tracking.set(value, path.slice(1));
503
+ }
504
+ return valueToString(value, space, onNext, key);
505
+ }
506
+ : (value, key) => {
507
+ // Stop on recursion.
508
+ if (stack.has(value))
509
+ return;
510
+ stack.add(value);
511
+ const result = valueToString(value, space, onNext, key);
512
+ stack.delete(value);
513
+ return result;
514
+ };
515
+ const result = onNext(value, ROOT_SENTINEL);
516
+ // Attempt to restore circular references.
517
+ if (unpack.size) {
518
+ const sp = space ? " " : "";
519
+ const eol = space ? "\n" : "";
520
+ let wrapper = `var x${sp}=${sp}${result};${eol}`;
521
+ for (const [key, value] of unpack.entries()) {
522
+ const keyPath = quote_1.stringifyPath(key, onNext);
523
+ const valuePath = quote_1.stringifyPath(value, onNext);
524
+ wrapper += `x${keyPath}${sp}=${sp}x${valuePath};${eol}`;
525
+ }
526
+ return `(function${sp}()${sp}{${eol}${wrapper}return x;${eol}}())`;
527
+ }
528
+ return result;
529
+ }
530
+ exports.stringify = stringify;
531
+ /**
532
+ * Create `toString()` function from replacer.
533
+ */
534
+ function replacerToString(replacer) {
535
+ if (!replacer)
536
+ return stringify_1.toString;
537
+ return (value, space, next, key) => {
538
+ return replacer(value, space, (value) => stringify_1.toString(value, space, next, key), key);
539
+ };
540
+ }
541
+ //# sourceMappingURL=index.js.map
542
+
543
+ /***/ }),
544
+
545
+ /***/ 954:
546
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
547
+
548
+ "use strict";
549
+
550
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
551
+ exports.objectToString = void 0;
552
+ const quote_1 = __nccwpck_require__(309);
553
+ const function_1 = __nccwpck_require__(869);
554
+ const array_1 = __nccwpck_require__(95);
555
+ /**
556
+ * Transform an object into a string.
557
+ */
558
+ const objectToString = (value, space, next, key) => {
559
+ // Support buffer in all environments.
560
+ if (typeof Buffer === "function" && Buffer.isBuffer(value)) {
561
+ return `Buffer.from(${next(value.toString("base64"))}, 'base64')`;
562
+ }
563
+ // Support `global` under test environments that don't print `[object global]`.
564
+ if (typeof global === "object" && value === global) {
565
+ return globalToString(value, space, next, key);
566
+ }
567
+ // Use the internal object string to select stringify method.
568
+ const toString = OBJECT_TYPES[Object.prototype.toString.call(value)];
569
+ return toString ? toString(value, space, next, key) : undefined;
570
+ };
571
+ exports.objectToString = objectToString;
572
+ /**
573
+ * Stringify an object of keys and values.
574
+ */
575
+ const rawObjectToString = (obj, indent, next, key) => {
576
+ const eol = indent ? "\n" : "";
577
+ const space = indent ? " " : "";
578
+ // Iterate over object keys and concat string together.
579
+ const values = Object.keys(obj)
580
+ .reduce(function (values, key) {
581
+ const fn = obj[key];
582
+ const result = next(fn, key);
583
+ // Omit `undefined` object entries.
584
+ if (result === undefined)
585
+ return values;
586
+ // String format the value data.
587
+ const value = result.split("\n").join(`\n${indent}`);
588
+ // Skip `key` prefix for function parser.
589
+ if (function_1.USED_METHOD_KEY.has(fn)) {
590
+ values.push(`${indent}${value}`);
591
+ return values;
592
+ }
593
+ values.push(`${indent}${quote_1.quoteKey(key, next)}:${space}${value}`);
594
+ return values;
595
+ }, [])
596
+ .join(`,${eol}`);
597
+ // Avoid new lines in an empty object.
598
+ if (values === "")
599
+ return "{}";
600
+ return `{${eol}${values}${eol}}`;
601
+ };
602
+ /**
603
+ * Stringify global variable access.
604
+ */
605
+ const globalToString = (value, space, next) => {
606
+ return `Function(${next("return this")})()`;
607
+ };
608
+ /**
609
+ * Convert JavaScript objects into strings.
610
+ */
611
+ const OBJECT_TYPES = {
612
+ "[object Array]": array_1.arrayToString,
613
+ "[object Object]": rawObjectToString,
614
+ "[object Error]": (error, space, next) => {
615
+ return `new Error(${next(error.message)})`;
616
+ },
617
+ "[object Date]": (date) => {
618
+ return `new Date(${date.getTime()})`;
619
+ },
620
+ "[object String]": (str, space, next) => {
621
+ return `new String(${next(str.toString())})`;
622
+ },
623
+ "[object Number]": (num) => {
624
+ return `new Number(${num})`;
625
+ },
626
+ "[object Boolean]": (bool) => {
627
+ return `new Boolean(${bool})`;
628
+ },
629
+ "[object Set]": (set, space, next) => {
630
+ return `new Set(${next(Array.from(set))})`;
631
+ },
632
+ "[object Map]": (map, space, next) => {
633
+ return `new Map(${next(Array.from(map))})`;
634
+ },
635
+ "[object RegExp]": String,
636
+ "[object global]": globalToString,
637
+ "[object Window]": globalToString,
638
+ };
639
+ //# sourceMappingURL=object.js.map
640
+
641
+ /***/ }),
642
+
643
+ /***/ 309:
644
+ /***/ ((__unused_webpack_module, exports) => {
645
+
646
+ "use strict";
647
+
648
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
649
+ exports.stringifyPath = exports.quoteKey = exports.isValidVariableName = exports.IS_VALID_IDENTIFIER = exports.quoteString = void 0;
650
+ /**
651
+ * Match all characters that need to be escaped in a string. Modified from
652
+ * source to match single quotes instead of double.
653
+ *
654
+ * Source: https://github.com/douglascrockford/JSON-js/blob/master/json2.js
655
+ */
656
+ const ESCAPABLE = /[\\\'\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
657
+ /**
658
+ * Map of characters to escape characters.
659
+ */
660
+ const META_CHARS = new Map([
661
+ ["\b", "\\b"],
662
+ ["\t", "\\t"],
663
+ ["\n", "\\n"],
664
+ ["\f", "\\f"],
665
+ ["\r", "\\r"],
666
+ ["'", "\\'"],
667
+ ['"', '\\"'],
668
+ ["\\", "\\\\"],
669
+ ]);
670
+ /**
671
+ * Escape any character into its literal JavaScript string.
672
+ *
673
+ * @param {string} char
674
+ * @return {string}
675
+ */
676
+ function escapeChar(char) {
677
+ return (META_CHARS.get(char) ||
678
+ `\\u${`0000${char.charCodeAt(0).toString(16)}`.slice(-4)}`);
679
+ }
680
+ /**
681
+ * Quote a string.
682
+ */
683
+ function quoteString(str) {
684
+ return `'${str.replace(ESCAPABLE, escapeChar)}'`;
685
+ }
686
+ exports.quoteString = quoteString;
687
+ /**
688
+ * JavaScript reserved keywords.
689
+ */
690
+ const RESERVED_WORDS = new Set(("break else new var case finally return void catch for switch while " +
691
+ "continue function this with default if throw delete in try " +
692
+ "do instanceof typeof abstract enum int short boolean export " +
693
+ "interface static byte extends long super char final native synchronized " +
694
+ "class float package throws const goto private transient debugger " +
695
+ "implements protected volatile double import public let yield").split(" "));
696
+ /**
697
+ * Test for valid JavaScript identifier.
698
+ */
699
+ exports.IS_VALID_IDENTIFIER = /^[A-Za-z_$][A-Za-z0-9_$]*$/;
700
+ /**
701
+ * Check if a variable name is valid.
702
+ */
703
+ function isValidVariableName(name) {
704
+ return (typeof name === "string" &&
705
+ !RESERVED_WORDS.has(name) &&
706
+ exports.IS_VALID_IDENTIFIER.test(name));
707
+ }
708
+ exports.isValidVariableName = isValidVariableName;
709
+ /**
710
+ * Quote JavaScript key access.
711
+ */
712
+ function quoteKey(key, next) {
713
+ return isValidVariableName(key) ? key : next(key);
714
+ }
715
+ exports.quoteKey = quoteKey;
716
+ /**
717
+ * Serialize the path to a string.
718
+ */
719
+ function stringifyPath(path, next) {
720
+ let result = "";
721
+ for (const key of path) {
722
+ if (isValidVariableName(key)) {
723
+ result += `.${key}`;
724
+ }
725
+ else {
726
+ result += `[${next(key)}]`;
727
+ }
728
+ }
729
+ return result;
730
+ }
731
+ exports.stringifyPath = stringifyPath;
732
+ //# sourceMappingURL=quote.js.map
733
+
734
+ /***/ }),
735
+
736
+ /***/ 960:
737
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
738
+
739
+ "use strict";
740
+
741
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
742
+ exports.toString = void 0;
743
+ const quote_1 = __nccwpck_require__(309);
744
+ const object_1 = __nccwpck_require__(954);
745
+ const function_1 = __nccwpck_require__(869);
746
+ /**
747
+ * Stringify primitive values.
748
+ */
749
+ const PRIMITIVE_TYPES = {
750
+ string: quote_1.quoteString,
751
+ number: (value) => (Object.is(value, -0) ? "-0" : String(value)),
752
+ boolean: String,
753
+ symbol: (value, space, next) => {
754
+ const key = Symbol.keyFor(value);
755
+ if (key !== undefined)
756
+ return `Symbol.for(${next(key)})`;
757
+ // ES2018 `Symbol.description`.
758
+ return `Symbol(${next(value.description)})`;
759
+ },
760
+ bigint: (value, space, next) => {
761
+ return `BigInt(${next(String(value))})`;
762
+ },
763
+ undefined: String,
764
+ object: object_1.objectToString,
765
+ function: function_1.functionToString,
766
+ };
767
+ /**
768
+ * Stringify a value recursively.
769
+ */
770
+ const toString = (value, space, next, key) => {
771
+ if (value === null)
772
+ return "null";
773
+ return PRIMITIVE_TYPES[typeof value](value, space, next, key);
774
+ };
775
+ exports.toString = toString;
776
+ //# sourceMappingURL=stringify.js.map
777
+
778
+ /***/ }),
779
+
780
+ /***/ 345:
781
+ /***/ ((module) => {
782
+
783
+ module.exports = class extends Function {
784
+ constructor() {
785
+ super();
786
+ return new Proxy(this, {
787
+ apply: (target, thisArg, args) => target.classCall(...args),
788
+ });
789
+ }
790
+
791
+ classCall() {
792
+ throw new Error('not implemented');
793
+ }
794
+ };
795
+
796
+
797
+ /***/ }),
798
+
799
+ /***/ 958:
800
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
801
+
802
+ const createMap = __nccwpck_require__(219);
803
+ const createChainable = __nccwpck_require__(626);
804
+
805
+ module.exports = createMap(createChainable(Object));
806
+
807
+
808
+ /***/ }),
809
+
810
+ /***/ 657:
811
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
812
+
813
+ const createSet = __nccwpck_require__(422);
814
+ const createChainable = __nccwpck_require__(626);
815
+
816
+ module.exports = createSet(createChainable(Object));
817
+
818
+
819
+ /***/ }),
820
+
821
+ /***/ 579:
822
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
823
+
824
+ const Callable = __nccwpck_require__(345);
825
+ const createMap = __nccwpck_require__(219);
826
+ const createChainable = __nccwpck_require__(626);
827
+ const createValue = __nccwpck_require__(34);
828
+
829
+ module.exports = createValue(createMap(createChainable(Callable)));
830
+
831
+
832
+ /***/ }),
833
+
834
+ /***/ 633:
835
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
836
+
837
+ const ChainedMap = __nccwpck_require__(958);
838
+ const ChainedValueMap = __nccwpck_require__(579);
839
+ const ChainedSet = __nccwpck_require__(657);
840
+ const Resolve = __nccwpck_require__(292);
841
+ const ResolveLoader = __nccwpck_require__(208);
842
+ const Output = __nccwpck_require__(929);
843
+ const DevServer = __nccwpck_require__(492);
844
+ const Plugin = __nccwpck_require__(378);
845
+ const Module = __nccwpck_require__(621);
846
+ const Optimization = __nccwpck_require__(539);
847
+ const Performance = __nccwpck_require__(376);
848
+
849
+ module.exports = class extends ChainedMap {
850
+ constructor() {
851
+ super();
852
+ // https://webpack.js.org/configuration/entry-context/
853
+ this.entryPoints = new ChainedMap(this);
854
+ // https://webpack.js.org/configuration/output/
855
+ this.output = new Output(this);
856
+ // https://webpack.js.org/configuration/module/
857
+ this.module = new Module(this);
858
+ // https://webpack.js.org/configuration/resolve
859
+ this.resolve = new Resolve(this);
860
+ // https://webpack.js.org/configuration/resolve/#resolveloader
861
+ this.resolveLoader = new ResolveLoader(this);
862
+ // https://webpack.js.org/configuration/optimization/
863
+ this.optimization = new Optimization(this);
864
+ // https://webpack.js.org/configuration/plugins/
865
+ this.plugins = new ChainedMap(this);
866
+ // https://webpack.js.org/configuration/dev-server/
867
+ this.devServer = new DevServer(this);
868
+ // https://webpack.js.org/configuration/performance/
869
+ this.performance = new Performance(this);
870
+ // https://webpack.js.org/configuration/node/
871
+ this.node = new ChainedValueMap(this);
872
+ this.extend([
873
+ // https://webpack.js.org/configuration/entry-context/
874
+ 'context',
875
+ // https://webpack.js.org/configuration/mode/
876
+ 'mode',
877
+ // https://webpack.js.org/configuration/devtool/
878
+ 'devtool',
879
+ // https://webpack.js.org/configuration/target/
880
+ 'target',
881
+ // https://webpack.js.org/configuration/watch/
882
+ 'watch',
883
+ 'watchOptions',
884
+ // https://webpack.js.org/configuration/externals/
885
+ 'externals',
886
+ 'externalsType',
887
+ 'externalsPresets',
888
+ // https://webpack.js.org/configuration/stats/
889
+ 'stats',
890
+ // https://webpack.js.org/configuration/experiments
891
+ 'experiments',
892
+ // https://webpack.js.org/configuration/other-options
893
+ 'amd',
894
+ 'bail',
895
+ 'cache',
896
+ 'dependencies',
897
+ 'ignoreWarnings',
898
+ 'loader',
899
+ 'parallelism',
900
+ 'profile',
901
+ 'recordsPath',
902
+ 'recordsInputPath',
903
+ 'recordsOutputPath',
904
+ 'name',
905
+ 'infrastructureLogging',
906
+ 'snapshot',
907
+ ]);
908
+ }
909
+
910
+ static toString(config, { verbose = false, configPrefix = 'config' } = {}) {
911
+ const { stringify } = __nccwpck_require__(277);
912
+
913
+ return stringify(
914
+ config,
915
+ (value, indent, stringify) => {
916
+ // improve plugin output
917
+ if (value && value.__pluginName) {
918
+ const prefix = `/* ${configPrefix}.${value.__pluginType}('${value.__pluginName}') */\n`;
919
+ const constructorExpression = value.__pluginPath
920
+ ? // The path is stringified to ensure special characters are escaped
921
+ // (such as the backslashes in Windows-style paths).
922
+ `(require(${stringify(value.__pluginPath)}))`
923
+ : value.__pluginConstructorName;
924
+
925
+ if (constructorExpression) {
926
+ // get correct indentation for args by stringifying the args array and
927
+ // discarding the square brackets.
928
+ const args = stringify(value.__pluginArgs).slice(1, -1);
929
+ return `${prefix}new ${constructorExpression}(${args})`;
930
+ }
931
+ return (
932
+ prefix +
933
+ stringify(
934
+ value.__pluginArgs && value.__pluginArgs.length
935
+ ? { args: value.__pluginArgs }
936
+ : {},
937
+ )
938
+ );
939
+ }
940
+
941
+ // improve rule/use output
942
+ if (value && value.__ruleNames) {
943
+ const ruleTypes = value.__ruleTypes;
944
+ const prefix = `/* ${configPrefix}.module${value.__ruleNames
945
+ .map(
946
+ (r, index) => `.${ruleTypes ? ruleTypes[index] : 'rule'}('${r}')`,
947
+ )
948
+ .join('')}${
949
+ value.__useName ? `.use('${value.__useName}')` : ``
950
+ } */\n`;
951
+ return prefix + stringify(value);
952
+ }
953
+
954
+ if (value && value.__expression) {
955
+ return value.__expression;
956
+ }
957
+
958
+ // shorten long functions
959
+ if (typeof value === 'function') {
960
+ if (!verbose && value.toString().length > 100) {
961
+ return `function () { /* omitted long function */ }`;
962
+ }
963
+ }
964
+
965
+ return stringify(value);
966
+ },
967
+ 2,
968
+ );
969
+ }
970
+
971
+ entry(name) {
972
+ return this.entryPoints.getOrCompute(name, () => new ChainedSet(this));
973
+ }
974
+
975
+ plugin(name) {
976
+ return this.plugins.getOrCompute(name, () => new Plugin(this, name));
977
+ }
978
+
979
+ toConfig() {
980
+ const entryPoints = this.entryPoints.entries() || {};
981
+ const baseConfig = this.entries() || {};
982
+
983
+ return this.clean(
984
+ Object.assign(baseConfig, {
985
+ node: this.node.entries(),
986
+ output: this.output.entries(),
987
+ resolve: this.resolve.toConfig(),
988
+ resolveLoader: this.resolveLoader.toConfig(),
989
+ devServer: this.devServer.toConfig(),
990
+ module: this.module.toConfig(),
991
+ optimization: this.optimization.toConfig(),
992
+ plugins: this.plugins.values().map((plugin) => plugin.toConfig()),
993
+ performance: this.performance.entries(),
994
+ entry: Object.keys(entryPoints).reduce(
995
+ (acc, key) =>
996
+ Object.assign(acc, { [key]: entryPoints[key].values() }),
997
+ {},
998
+ ),
999
+ }),
1000
+ );
1001
+ }
1002
+
1003
+ toString(options) {
1004
+ return module.exports.toString(this.toConfig(), options);
1005
+ }
1006
+
1007
+ merge(obj = {}, omit = []) {
1008
+ const omissions = [
1009
+ 'node',
1010
+ 'output',
1011
+ 'resolve',
1012
+ 'resolveLoader',
1013
+ 'devServer',
1014
+ 'optimization',
1015
+ 'performance',
1016
+ 'module',
1017
+ ];
1018
+
1019
+ if (!omit.includes('entry') && 'entry' in obj) {
1020
+ Object.keys(obj.entry).forEach((name) =>
1021
+ this.entry(name).merge([].concat(obj.entry[name])),
1022
+ );
1023
+ }
1024
+
1025
+ if (!omit.includes('plugin') && 'plugin' in obj) {
1026
+ Object.keys(obj.plugin).forEach((name) =>
1027
+ this.plugin(name).merge(obj.plugin[name]),
1028
+ );
1029
+ }
1030
+
1031
+ omissions.forEach((key) => {
1032
+ if (!omit.includes(key) && key in obj) {
1033
+ this[key].merge(obj[key]);
1034
+ }
1035
+ });
1036
+
1037
+ return super.merge(obj, [...omit, ...omissions, 'entry', 'plugin']);
1038
+ }
1039
+ };
1040
+
1041
+
1042
+ /***/ }),
1043
+
1044
+ /***/ 492:
1045
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
1046
+
1047
+ const ChainedMap = __nccwpck_require__(958);
1048
+ const ChainedSet = __nccwpck_require__(657);
1049
+
1050
+ module.exports = class extends ChainedMap {
1051
+ constructor(parent) {
1052
+ super(parent);
1053
+
1054
+ this.allowedHosts = new ChainedSet(this);
1055
+
1056
+ this.extend([
1057
+ 'after',
1058
+ 'before',
1059
+ 'bonjour',
1060
+ 'clientLogLevel',
1061
+ 'compress',
1062
+ 'contentBase',
1063
+ 'contentBasePublicPath',
1064
+ 'disableHostCheck',
1065
+ 'filename',
1066
+ 'headers',
1067
+ 'historyApiFallback',
1068
+ 'host',
1069
+ 'hot',
1070
+ 'hotOnly',
1071
+ 'http2',
1072
+ 'https',
1073
+ 'index',
1074
+ 'injectClient',
1075
+ 'injectHot',
1076
+ 'inline',
1077
+ 'lazy',
1078
+ 'liveReload',
1079
+ 'mimeTypes',
1080
+ 'noInfo',
1081
+ 'onListening',
1082
+ 'open',
1083
+ 'openPage',
1084
+ 'overlay',
1085
+ 'pfx',
1086
+ 'pfxPassphrase',
1087
+ 'port',
1088
+ 'proxy',
1089
+ 'progress',
1090
+ 'public',
1091
+ 'publicPath',
1092
+ 'quiet',
1093
+ 'serveIndex',
1094
+ 'setup',
1095
+ 'socket',
1096
+ 'sockHost',
1097
+ 'sockPath',
1098
+ 'sockPort',
1099
+ 'staticOptions',
1100
+ 'stats',
1101
+ 'stdin',
1102
+ 'transportMode',
1103
+ 'useLocalIp',
1104
+ 'watchContentBase',
1105
+ 'watchOptions',
1106
+ 'writeToDisk',
1107
+ ]);
1108
+ }
1109
+
1110
+ toConfig() {
1111
+ return this.clean({
1112
+ allowedHosts: this.allowedHosts.values(),
1113
+ ...(this.entries() || {}),
1114
+ });
1115
+ }
1116
+
1117
+ merge(obj, omit = []) {
1118
+ if (!omit.includes('allowedHosts') && 'allowedHosts' in obj) {
1119
+ this.allowedHosts.merge(obj.allowedHosts);
1120
+ }
1121
+
1122
+ return super.merge(obj, ['allowedHosts']);
1123
+ }
1124
+ };
1125
+
1126
+
1127
+ /***/ }),
1128
+
1129
+ /***/ 621:
1130
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
1131
+
1132
+ const ChainedMap = __nccwpck_require__(958);
1133
+ const Rule = __nccwpck_require__(986);
1134
+
1135
+ module.exports = class extends ChainedMap {
1136
+ constructor(parent) {
1137
+ super(parent);
1138
+ this.rules = new ChainedMap(this);
1139
+ this.defaultRules = new ChainedMap(this);
1140
+ this.generator = new ChainedMap(this);
1141
+ this.parser = new ChainedMap(this);
1142
+ this.extend([
1143
+ 'noParse',
1144
+ 'unsafeCache',
1145
+ // https://webpack.js.org/configuration/module/#module-contexts
1146
+ // since they are document as deprecated and will soon be removed
1147
+ // only the parameters that the demo is provided in the documentation are supported
1148
+ 'wrappedContextCritical',
1149
+ 'exprContextRegExp',
1150
+ 'wrappedContextRecursive',
1151
+ 'strictExportPresence',
1152
+ 'wrappedContextRegExp',
1153
+ ]);
1154
+ }
1155
+
1156
+ defaultRule(name) {
1157
+ return this.defaultRules.getOrCompute(
1158
+ name,
1159
+ () => new Rule(this, name, 'defaultRule'),
1160
+ );
1161
+ }
1162
+
1163
+ rule(name) {
1164
+ return this.rules.getOrCompute(name, () => new Rule(this, name, 'rule'));
1165
+ }
1166
+
1167
+ toConfig() {
1168
+ return this.clean(
1169
+ Object.assign(this.entries() || {}, {
1170
+ defaultRules: this.defaultRules.values().map((r) => r.toConfig()),
1171
+ generator: this.generator.entries(),
1172
+ parser: this.parser.entries(),
1173
+ rules: this.rules.values().map((r) => r.toConfig()),
1174
+ }),
1175
+ );
1176
+ }
1177
+
1178
+ merge(obj, omit = []) {
1179
+ if (!omit.includes('rule') && 'rule' in obj) {
1180
+ Object.keys(obj.rule).forEach((name) =>
1181
+ this.rule(name).merge(obj.rule[name]),
1182
+ );
1183
+ }
1184
+
1185
+ if (!omit.includes('defaultRule') && 'defaultRule' in obj) {
1186
+ Object.keys(obj.defaultRule).forEach((name) =>
1187
+ this.defaultRule(name).merge(obj.defaultRule[name]),
1188
+ );
1189
+ }
1190
+
1191
+ return super.merge(obj, ['rule', 'defaultRule']);
1192
+ }
1193
+ };
1194
+
1195
+
1196
+ /***/ }),
1197
+
1198
+ /***/ 539:
1199
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
1200
+
1201
+ const ChainedMap = __nccwpck_require__(958);
1202
+ const ChainedValueMap = __nccwpck_require__(579);
1203
+ const Plugin = __nccwpck_require__(378);
1204
+
1205
+ module.exports = class extends ChainedMap {
1206
+ constructor(parent) {
1207
+ super(parent);
1208
+ this.minimizers = new ChainedMap(this);
1209
+ this.splitChunks = new ChainedValueMap(this);
1210
+ this.extend([
1211
+ 'minimize',
1212
+ 'runtimeChunk',
1213
+ 'emitOnErrors',
1214
+ 'moduleIds',
1215
+ 'chunkIds',
1216
+ 'nodeEnv',
1217
+ 'mangleWasmImports',
1218
+ 'removeAvailableModules',
1219
+ 'removeEmptyChunks',
1220
+ 'mergeDuplicateChunks',
1221
+ 'flagIncludedChunks',
1222
+ 'providedExports',
1223
+ 'usedExports',
1224
+ 'concatenateModules',
1225
+ 'sideEffects',
1226
+ 'portableRecords',
1227
+ 'mangleExports',
1228
+ 'innerGraph',
1229
+ 'realContentHash',
1230
+ ]);
1231
+ }
1232
+
1233
+ minimizer(name) {
1234
+ if (Array.isArray(name)) {
1235
+ throw new Error(
1236
+ 'optimization.minimizer() no longer supports being passed an array. ' +
1237
+ 'Either switch to the new syntax (https://github.com/neutrinojs/webpack-chain#config-optimization-minimizers-adding) or downgrade to webpack-chain 4. ' +
1238
+ 'If using Vue this likely means a Vue plugin has not yet been updated to support Vue CLI 4+.',
1239
+ );
1240
+ }
1241
+
1242
+ return this.minimizers.getOrCompute(
1243
+ name,
1244
+ () => new Plugin(this, name, 'optimization.minimizer'),
1245
+ );
1246
+ }
1247
+
1248
+ toConfig() {
1249
+ return this.clean(
1250
+ Object.assign(this.entries() || {}, {
1251
+ splitChunks: this.splitChunks.entries(),
1252
+ minimizer: this.minimizers.values().map((plugin) => plugin.toConfig()),
1253
+ }),
1254
+ );
1255
+ }
1256
+
1257
+ merge(obj, omit = []) {
1258
+ if (!omit.includes('minimizer') && 'minimizer' in obj) {
1259
+ Object.keys(obj.minimizer).forEach((name) =>
1260
+ this.minimizer(name).merge(obj.minimizer[name]),
1261
+ );
1262
+ }
1263
+
1264
+ return super.merge(obj, [...omit, 'minimizer']);
1265
+ }
1266
+ };
1267
+
1268
+
1269
+ /***/ }),
1270
+
1271
+ /***/ 734:
1272
+ /***/ ((module) => {
1273
+
1274
+ module.exports = (Class) =>
1275
+ class extends Class {
1276
+ before(name) {
1277
+ if (this.__after) {
1278
+ throw new Error(
1279
+ `Unable to set .before(${JSON.stringify(
1280
+ name,
1281
+ )}) with existing value for .after()`,
1282
+ );
1283
+ }
1284
+
1285
+ this.__before = name;
1286
+ return this;
1287
+ }
1288
+
1289
+ after(name) {
1290
+ if (this.__before) {
1291
+ throw new Error(
1292
+ `Unable to set .after(${JSON.stringify(
1293
+ name,
1294
+ )}) with existing value for .before()`,
1295
+ );
1296
+ }
1297
+
1298
+ this.__after = name;
1299
+ return this;
1300
+ }
1301
+
1302
+ merge(obj, omit = []) {
1303
+ if (obj.before) {
1304
+ this.before(obj.before);
1305
+ }
1306
+
1307
+ if (obj.after) {
1308
+ this.after(obj.after);
1309
+ }
1310
+
1311
+ return super.merge(obj, [...omit, 'before', 'after']);
1312
+ }
1313
+ };
1314
+
1315
+
1316
+ /***/ }),
1317
+
1318
+ /***/ 929:
1319
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
1320
+
1321
+ const ChainedMap = __nccwpck_require__(958);
1322
+
1323
+ module.exports = class extends ChainedMap {
1324
+ constructor(parent) {
1325
+ super(parent);
1326
+ this.extend([
1327
+ 'auxiliaryComment',
1328
+ 'charset',
1329
+ 'chunkFilename',
1330
+ 'chunkLoadTimeout',
1331
+ 'chunkLoadingGlobal',
1332
+ 'chunkLoading',
1333
+ 'chunkFormat',
1334
+ 'enabledChunkLoadingTypes',
1335
+ 'crossOriginLoading',
1336
+ 'devtoolFallbackModuleFilenameTemplate',
1337
+ 'devtoolModuleFilenameTemplate',
1338
+ 'devtoolNamespace',
1339
+ 'filename',
1340
+ 'assetModuleFilename',
1341
+ 'globalObject',
1342
+ 'uniqueName',
1343
+ 'hashDigest',
1344
+ 'hashDigestLength',
1345
+ 'hashFunction',
1346
+ 'hashSalt',
1347
+ 'hotUpdateChunkFilename',
1348
+ 'hotUpdateGlobal',
1349
+ 'hotUpdateMainFilename',
1350
+ 'library',
1351
+ 'libraryExport',
1352
+ 'libraryTarget',
1353
+ 'importFunctionName',
1354
+ 'path',
1355
+ 'pathinfo',
1356
+ 'publicPath',
1357
+ 'scriptType',
1358
+ 'sourceMapFilename',
1359
+ 'sourcePrefix',
1360
+ 'strictModuleErrorHandling',
1361
+ 'strictModuleExceptionHandling',
1362
+ 'umdNamedDefine',
1363
+ 'workerChunkLoading',
1364
+ 'enabledLibraryTypes',
1365
+ 'environment',
1366
+ 'compareBeforeEmit',
1367
+ 'wasmLoading',
1368
+ 'enabledWasmLoadingTypes',
1369
+ 'iife',
1370
+ 'module',
1371
+ 'clean',
1372
+ ]);
1373
+ }
1374
+ };
1375
+
1376
+
1377
+ /***/ }),
1378
+
1379
+ /***/ 376:
1380
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
1381
+
1382
+ const ChainedValueMap = __nccwpck_require__(579);
1383
+
1384
+ module.exports = class extends ChainedValueMap {
1385
+ constructor(parent) {
1386
+ super(parent);
1387
+ this.extend(['assetFilter', 'hints', 'maxAssetSize', 'maxEntrypointSize']);
1388
+ }
1389
+ };
1390
+
1391
+
1392
+ /***/ }),
1393
+
1394
+ /***/ 378:
1395
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
1396
+
1397
+ const ChainedMap = __nccwpck_require__(958);
1398
+ const Orderable = __nccwpck_require__(734);
1399
+
1400
+ module.exports = Orderable(
1401
+ class extends ChainedMap {
1402
+ constructor(parent, name, type = 'plugin') {
1403
+ super(parent);
1404
+ this.name = name;
1405
+ this.type = type;
1406
+ this.extend(['init']);
1407
+
1408
+ this.init((Plugin, args = []) => {
1409
+ if (typeof Plugin === 'function') {
1410
+ return new Plugin(...args);
1411
+ }
1412
+ return Plugin;
1413
+ });
1414
+ }
1415
+
1416
+ use(plugin, args = []) {
1417
+ return this.set('plugin', plugin).set('args', args);
1418
+ }
1419
+
1420
+ tap(f) {
1421
+ if (!this.has('plugin')) {
1422
+ throw new Error(
1423
+ `Cannot call .tap() on a plugin that has not yet been defined. Call ${this.type}('${this.name}').use(<Plugin>) first.`,
1424
+ );
1425
+ }
1426
+ this.set('args', f(this.get('args') || []));
1427
+ return this;
1428
+ }
1429
+
1430
+ set(key, value) {
1431
+ if (key === 'args' && !Array.isArray(value)) {
1432
+ throw new Error('args must be an array of arguments');
1433
+ }
1434
+ return super.set(key, value);
1435
+ }
1436
+
1437
+ merge(obj, omit = []) {
1438
+ if ('plugin' in obj) {
1439
+ this.set('plugin', obj.plugin);
1440
+ }
1441
+
1442
+ if ('args' in obj) {
1443
+ this.set('args', obj.args);
1444
+ }
1445
+
1446
+ return super.merge(obj, [...omit, 'args', 'plugin']);
1447
+ }
1448
+
1449
+ toConfig() {
1450
+ const init = this.get('init');
1451
+ let plugin = this.get('plugin');
1452
+ const args = this.get('args');
1453
+ let pluginPath = null;
1454
+
1455
+ if (plugin === undefined) {
1456
+ throw new Error(
1457
+ `Invalid ${this.type} configuration: ${this.type}('${this.name}').use(<Plugin>) was not called to specify the plugin`,
1458
+ );
1459
+ }
1460
+
1461
+ // Support using the path to a plugin rather than the plugin itself,
1462
+ // allowing expensive require()s to be skipped in cases where the plugin
1463
+ // or webpack configuration won't end up being used.
1464
+ if (typeof plugin === 'string') {
1465
+ pluginPath = plugin;
1466
+ plugin = __nccwpck_require__(469)(pluginPath);
1467
+ }
1468
+
1469
+ const constructorName = plugin.__expression
1470
+ ? `(${plugin.__expression})`
1471
+ : plugin.name;
1472
+
1473
+ const config = init(plugin, args);
1474
+
1475
+ Object.defineProperties(config, {
1476
+ __pluginName: { value: this.name },
1477
+ __pluginType: { value: this.type },
1478
+ __pluginArgs: { value: args },
1479
+ __pluginConstructorName: { value: constructorName },
1480
+ __pluginPath: { value: pluginPath },
1481
+ });
1482
+
1483
+ return config;
1484
+ }
1485
+ },
1486
+ );
1487
+
1488
+
1489
+ /***/ }),
1490
+
1491
+ /***/ 292:
1492
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
1493
+
1494
+ const ChainedMap = __nccwpck_require__(958);
1495
+ const ChainedSet = __nccwpck_require__(657);
1496
+ const Plugin = __nccwpck_require__(378);
1497
+
1498
+ const childMaps = ['alias', 'fallback', 'byDependency'];
1499
+ const childSets = [
1500
+ 'aliasFields',
1501
+ 'conditionNames',
1502
+ 'descriptionFiles',
1503
+ 'extensions',
1504
+ 'mainFields',
1505
+ 'mainFiles',
1506
+ 'exportsFields',
1507
+ 'importsFields',
1508
+ 'restrictions',
1509
+ 'roots',
1510
+ 'modules',
1511
+ ];
1512
+
1513
+ module.exports = class extends ChainedMap {
1514
+ constructor(parent) {
1515
+ super(parent);
1516
+
1517
+ childMaps.forEach((key) => {
1518
+ this[key] = new ChainedMap(this);
1519
+ });
1520
+ childSets.forEach((key) => {
1521
+ this[key] = new ChainedSet(this);
1522
+ });
1523
+
1524
+ this.plugins = new ChainedMap(this);
1525
+ this.extend([
1526
+ 'cachePredicate',
1527
+ 'cacheWithContext',
1528
+ 'enforceExtension',
1529
+ 'symlinks',
1530
+ 'unsafeCache',
1531
+ 'preferRelative',
1532
+ 'preferAbsolute',
1533
+ ]);
1534
+ }
1535
+
1536
+ plugin(name) {
1537
+ return this.plugins.getOrCompute(
1538
+ name,
1539
+ () => new Plugin(this, name, 'resolve.plugin'),
1540
+ );
1541
+ }
1542
+
1543
+ get(key) {
1544
+ if (childMaps.includes(key)) {
1545
+ return this[key].entries();
1546
+ }
1547
+ if (childSets.includes(key)) {
1548
+ return this[key].values();
1549
+ }
1550
+ return super.get(key);
1551
+ }
1552
+
1553
+ toConfig() {
1554
+ const config = Object.assign(this.entries() || {}, {
1555
+ plugins: this.plugins.values().map((plugin) => plugin.toConfig()),
1556
+ });
1557
+
1558
+ childMaps.forEach((key) => {
1559
+ config[key] = this[key].entries();
1560
+ });
1561
+ childSets.forEach((key) => {
1562
+ config[key] = this[key].values();
1563
+ });
1564
+
1565
+ return this.clean(config);
1566
+ }
1567
+
1568
+ merge(obj, omit = []) {
1569
+ if (!omit.includes('plugin') && 'plugin' in obj) {
1570
+ Object.keys(obj.plugin).forEach((name) =>
1571
+ this.plugin(name).merge(obj.plugin[name]),
1572
+ );
1573
+ }
1574
+
1575
+ const omissions = [...childMaps, ...childSets];
1576
+
1577
+ omissions.forEach((key) => {
1578
+ if (!omit.includes(key) && key in obj) {
1579
+ this[key].merge(obj[key]);
1580
+ }
1581
+ });
1582
+
1583
+ return super.merge(obj, [...omit, ...omissions, 'plugin']);
1584
+ }
1585
+ };
1586
+
1587
+
1588
+ /***/ }),
1589
+
1590
+ /***/ 208:
1591
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
1592
+
1593
+ const Resolve = __nccwpck_require__(292);
1594
+ const ChainedSet = __nccwpck_require__(657);
1595
+
1596
+ module.exports = class extends Resolve {
1597
+ constructor(parent) {
1598
+ super(parent);
1599
+ this.modules = new ChainedSet(this);
1600
+ this.moduleExtensions = new ChainedSet(this);
1601
+ this.packageMains = new ChainedSet(this);
1602
+ }
1603
+
1604
+ toConfig() {
1605
+ return this.clean({
1606
+ modules: this.modules.values(),
1607
+ moduleExtensions: this.moduleExtensions.values(),
1608
+ packageMains: this.packageMains.values(),
1609
+ ...super.toConfig(),
1610
+ });
1611
+ }
1612
+
1613
+ merge(obj, omit = []) {
1614
+ const omissions = ['modules', 'moduleExtensions', 'packageMains'];
1615
+
1616
+ omissions.forEach((key) => {
1617
+ if (!omit.includes(key) && key in obj) {
1618
+ this[key].merge(obj[key]);
1619
+ }
1620
+ });
1621
+
1622
+ return super.merge(obj, [...omit, ...omissions]);
1623
+ }
1624
+ };
1625
+
1626
+
1627
+ /***/ }),
1628
+
1629
+ /***/ 986:
1630
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
1631
+
1632
+ const ChainedMap = __nccwpck_require__(958);
1633
+ const ChainedSet = __nccwpck_require__(657);
1634
+ const Orderable = __nccwpck_require__(734);
1635
+ const Use = __nccwpck_require__(967);
1636
+ const Resolve = __nccwpck_require__(292);
1637
+
1638
+ function toArray(arr) {
1639
+ return Array.isArray(arr) ? arr : [arr];
1640
+ }
1641
+
1642
+ const Rule = Orderable(
1643
+ class extends ChainedMap {
1644
+ constructor(parent, name, ruleType = 'rule') {
1645
+ super(parent);
1646
+ this.ruleName = name;
1647
+ this.names = [];
1648
+ this.ruleType = ruleType;
1649
+ this.ruleTypes = [];
1650
+
1651
+ let rule = this;
1652
+ while (rule instanceof Rule) {
1653
+ this.names.unshift(rule.ruleName);
1654
+ this.ruleTypes.unshift(rule.ruleType);
1655
+ rule = rule.parent;
1656
+ }
1657
+
1658
+ this.uses = new ChainedMap(this);
1659
+ this.include = new ChainedSet(this);
1660
+ this.exclude = new ChainedSet(this);
1661
+ this.rules = new ChainedMap(this);
1662
+ this.oneOfs = new ChainedMap(this);
1663
+ this.resolve = new Resolve(this);
1664
+ this.resolve.extend(['fullySpecified']);
1665
+ this.extend([
1666
+ 'enforce',
1667
+ 'issuer',
1668
+ 'issuerLayer',
1669
+ 'layer',
1670
+ 'mimetype',
1671
+ 'parser',
1672
+ 'generator',
1673
+ 'resource',
1674
+ 'resourceQuery',
1675
+ 'sideEffects',
1676
+ 'test',
1677
+ 'type',
1678
+ ]);
1679
+ }
1680
+
1681
+ use(name) {
1682
+ return this.uses.getOrCompute(name, () => new Use(this, name));
1683
+ }
1684
+
1685
+ rule(name) {
1686
+ return this.rules.getOrCompute(name, () => new Rule(this, name, 'rule'));
1687
+ }
1688
+
1689
+ oneOf(name) {
1690
+ return this.oneOfs.getOrCompute(
1691
+ name,
1692
+ () => new Rule(this, name, 'oneOf'),
1693
+ );
1694
+ }
1695
+
1696
+ pre() {
1697
+ return this.enforce('pre');
1698
+ }
1699
+
1700
+ post() {
1701
+ return this.enforce('post');
1702
+ }
1703
+
1704
+ toConfig() {
1705
+ const config = this.clean(
1706
+ Object.assign(this.entries() || {}, {
1707
+ include: this.include.values(),
1708
+ exclude: this.exclude.values(),
1709
+ rules: this.rules.values().map((rule) => rule.toConfig()),
1710
+ oneOf: this.oneOfs.values().map((oneOf) => oneOf.toConfig()),
1711
+ use: this.uses.values().map((use) => use.toConfig()),
1712
+ resolve: this.resolve.toConfig(),
1713
+ }),
1714
+ );
1715
+
1716
+ Object.defineProperties(config, {
1717
+ __ruleNames: { value: this.names },
1718
+ __ruleTypes: { value: this.ruleTypes },
1719
+ });
1720
+
1721
+ return config;
1722
+ }
1723
+
1724
+ merge(obj, omit = []) {
1725
+ if (!omit.includes('include') && 'include' in obj) {
1726
+ this.include.merge(toArray(obj.include));
1727
+ }
1728
+
1729
+ if (!omit.includes('exclude') && 'exclude' in obj) {
1730
+ this.exclude.merge(toArray(obj.exclude));
1731
+ }
1732
+
1733
+ if (!omit.includes('use') && 'use' in obj) {
1734
+ Object.keys(obj.use).forEach((name) =>
1735
+ this.use(name).merge(obj.use[name]),
1736
+ );
1737
+ }
1738
+
1739
+ if (!omit.includes('rules') && 'rules' in obj) {
1740
+ Object.keys(obj.rules).forEach((name) =>
1741
+ this.rule(name).merge(obj.rules[name]),
1742
+ );
1743
+ }
1744
+
1745
+ if (!omit.includes('oneOf') && 'oneOf' in obj) {
1746
+ Object.keys(obj.oneOf).forEach((name) =>
1747
+ this.oneOf(name).merge(obj.oneOf[name]),
1748
+ );
1749
+ }
1750
+
1751
+ if (!omit.includes('resolve') && 'resolve' in obj) {
1752
+ this.resolve.merge(obj.resolve);
1753
+ }
1754
+
1755
+ if (!omit.includes('test') && 'test' in obj) {
1756
+ this.test(
1757
+ obj.test instanceof RegExp || typeof obj.test === 'function'
1758
+ ? obj.test
1759
+ : new RegExp(obj.test),
1760
+ );
1761
+ }
1762
+
1763
+ return super.merge(obj, [
1764
+ ...omit,
1765
+ 'include',
1766
+ 'exclude',
1767
+ 'use',
1768
+ 'rules',
1769
+ 'oneOf',
1770
+ 'resolve',
1771
+ 'test',
1772
+ ]);
1773
+ }
1774
+ },
1775
+ );
1776
+
1777
+ module.exports = Rule;
1778
+
1779
+
1780
+ /***/ }),
1781
+
1782
+ /***/ 967:
1783
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
1784
+
1785
+ const merge = __nccwpck_require__(296);
1786
+ const ChainedMap = __nccwpck_require__(958);
1787
+ const Orderable = __nccwpck_require__(734);
1788
+
1789
+ module.exports = Orderable(
1790
+ class extends ChainedMap {
1791
+ constructor(parent, name) {
1792
+ super(parent);
1793
+ this.name = name;
1794
+ this.extend(['loader', 'options']);
1795
+ }
1796
+
1797
+ tap(f) {
1798
+ this.options(f(this.get('options')));
1799
+ return this;
1800
+ }
1801
+
1802
+ merge(obj, omit = []) {
1803
+ if (!omit.includes('loader') && 'loader' in obj) {
1804
+ this.loader(obj.loader);
1805
+ }
1806
+
1807
+ if (!omit.includes('options') && 'options' in obj) {
1808
+ this.options(merge(this.store.get('options') || {}, obj.options));
1809
+ }
1810
+
1811
+ return super.merge(obj, [...omit, 'loader', 'options']);
1812
+ }
1813
+
1814
+ toConfig() {
1815
+ const config = this.clean(this.entries() || {});
1816
+
1817
+ Object.defineProperties(config, {
1818
+ __useName: { value: this.name },
1819
+ __ruleNames: { value: this.parent && this.parent.names },
1820
+ __ruleTypes: { value: this.parent && this.parent.ruleTypes },
1821
+ });
1822
+
1823
+ return config;
1824
+ }
1825
+ },
1826
+ );
1827
+
1828
+
1829
+ /***/ }),
1830
+
1831
+ /***/ 626:
1832
+ /***/ ((module) => {
1833
+
1834
+ module.exports = function createChainable(superClass) {
1835
+ return class extends superClass {
1836
+ constructor(parent) {
1837
+ super();
1838
+ this.parent = parent;
1839
+ }
1840
+
1841
+ batch(handler) {
1842
+ handler(this);
1843
+ return this;
1844
+ }
1845
+
1846
+ end() {
1847
+ return this.parent;
1848
+ }
1849
+ };
1850
+ };
1851
+
1852
+
1853
+ /***/ }),
1854
+
1855
+ /***/ 219:
1856
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
1857
+
1858
+ const merge = __nccwpck_require__(296);
1859
+
1860
+ module.exports = function createMap(superClass) {
1861
+ return class extends superClass {
1862
+ constructor(...args) {
1863
+ super(...args);
1864
+ this.store = new Map();
1865
+ }
1866
+
1867
+ extend(methods) {
1868
+ this.shorthands = methods;
1869
+ methods.forEach((method) => {
1870
+ this[method] = (value) => this.set(method, value);
1871
+ });
1872
+ return this;
1873
+ }
1874
+
1875
+ clear() {
1876
+ this.store.clear();
1877
+ return this;
1878
+ }
1879
+
1880
+ delete(key) {
1881
+ this.store.delete(key);
1882
+ return this;
1883
+ }
1884
+
1885
+ order() {
1886
+ const entries = [...this.store].reduce((acc, [key, value]) => {
1887
+ acc[key] = value;
1888
+ return acc;
1889
+ }, {});
1890
+ const names = Object.keys(entries);
1891
+ const order = [...names];
1892
+
1893
+ names.forEach((name) => {
1894
+ if (!entries[name]) {
1895
+ return;
1896
+ }
1897
+
1898
+ const { __before, __after } = entries[name];
1899
+
1900
+ if (__before && order.includes(__before)) {
1901
+ order.splice(order.indexOf(name), 1);
1902
+ order.splice(order.indexOf(__before), 0, name);
1903
+ } else if (__after && order.includes(__after)) {
1904
+ order.splice(order.indexOf(name), 1);
1905
+ order.splice(order.indexOf(__after) + 1, 0, name);
1906
+ }
1907
+ });
1908
+
1909
+ return { entries, order };
1910
+ }
1911
+
1912
+ entries() {
1913
+ const { entries, order } = this.order();
1914
+
1915
+ if (order.length) {
1916
+ return entries;
1917
+ }
1918
+
1919
+ return undefined;
1920
+ }
1921
+
1922
+ values() {
1923
+ const { entries, order } = this.order();
1924
+
1925
+ return order.map((name) => entries[name]);
1926
+ }
1927
+
1928
+ get(key) {
1929
+ return this.store.get(key);
1930
+ }
1931
+
1932
+ getOrCompute(key, fn) {
1933
+ if (!this.has(key)) {
1934
+ this.set(key, fn());
1935
+ }
1936
+ return this.get(key);
1937
+ }
1938
+
1939
+ has(key) {
1940
+ return this.store.has(key);
1941
+ }
1942
+
1943
+ set(key, value) {
1944
+ this.store.set(key, value);
1945
+ return this;
1946
+ }
1947
+
1948
+ merge(obj, omit = []) {
1949
+ Object.keys(obj).forEach((key) => {
1950
+ if (omit.includes(key)) {
1951
+ return;
1952
+ }
1953
+
1954
+ const value = obj[key];
1955
+
1956
+ if (
1957
+ (!Array.isArray(value) && typeof value !== 'object') ||
1958
+ value === null ||
1959
+ !this.has(key)
1960
+ ) {
1961
+ this.set(key, value);
1962
+ } else {
1963
+ this.set(key, merge(this.get(key), value));
1964
+ }
1965
+ });
1966
+
1967
+ return this;
1968
+ }
1969
+
1970
+ clean(obj) {
1971
+ return Object.keys(obj).reduce((acc, key) => {
1972
+ const value = obj[key];
1973
+
1974
+ if (value === undefined) {
1975
+ return acc;
1976
+ }
1977
+
1978
+ if (Array.isArray(value) && !value.length) {
1979
+ return acc;
1980
+ }
1981
+
1982
+ if (
1983
+ Object.prototype.toString.call(value) === '[object Object]' &&
1984
+ !Object.keys(value).length
1985
+ ) {
1986
+ return acc;
1987
+ }
1988
+
1989
+ acc[key] = value;
1990
+
1991
+ return acc;
1992
+ }, {});
1993
+ }
1994
+
1995
+ when(
1996
+ condition,
1997
+ whenTruthy = Function.prototype,
1998
+ whenFalsy = Function.prototype,
1999
+ ) {
2000
+ if (condition) {
2001
+ whenTruthy(this);
2002
+ } else {
2003
+ whenFalsy(this);
2004
+ }
2005
+
2006
+ return this;
2007
+ }
2008
+ };
2009
+ };
2010
+
2011
+
2012
+ /***/ }),
2013
+
2014
+ /***/ 422:
2015
+ /***/ ((module) => {
2016
+
2017
+ module.exports = function createSet(superClass) {
2018
+ return class extends superClass {
2019
+ constructor(...args) {
2020
+ super(...args);
2021
+ this.store = new Set();
2022
+ }
2023
+
2024
+ add(value) {
2025
+ this.store.add(value);
2026
+ return this;
2027
+ }
2028
+
2029
+ prepend(value) {
2030
+ this.store = new Set([value, ...this.store]);
2031
+ return this;
2032
+ }
2033
+
2034
+ clear() {
2035
+ this.store.clear();
2036
+ return this;
2037
+ }
2038
+
2039
+ delete(value) {
2040
+ this.store.delete(value);
2041
+ return this;
2042
+ }
2043
+
2044
+ values() {
2045
+ return [...this.store];
2046
+ }
2047
+
2048
+ has(value) {
2049
+ return this.store.has(value);
2050
+ }
2051
+
2052
+ merge(arr) {
2053
+ if (arr !== undefined) {
2054
+ this.store = new Set([...this.store, ...arr]);
2055
+ }
2056
+ return this;
2057
+ }
2058
+
2059
+ when(
2060
+ condition,
2061
+ whenTruthy = Function.prototype,
2062
+ whenFalsy = Function.prototype,
2063
+ ) {
2064
+ if (condition) {
2065
+ whenTruthy(this);
2066
+ } else {
2067
+ whenFalsy(this);
2068
+ }
2069
+
2070
+ return this;
2071
+ }
2072
+ };
2073
+ };
2074
+
2075
+
2076
+ /***/ }),
2077
+
2078
+ /***/ 34:
2079
+ /***/ ((module) => {
2080
+
2081
+ module.exports = function createValue(superClass) {
2082
+ return class extends superClass {
2083
+ constructor(...args) {
2084
+ super(...args);
2085
+ this.value = undefined;
2086
+ this.useMap = true;
2087
+ }
2088
+
2089
+ set(...args) {
2090
+ this.useMap = true;
2091
+ this.value = undefined;
2092
+ return super.set(...args);
2093
+ }
2094
+
2095
+ clear() {
2096
+ this.value = undefined;
2097
+ return super.clear();
2098
+ }
2099
+
2100
+ classCall(value) {
2101
+ this.clear();
2102
+ this.useMap = false;
2103
+ this.value = value;
2104
+ return this.parent;
2105
+ }
2106
+
2107
+ entries() {
2108
+ if (this.useMap) {
2109
+ return super.entries();
2110
+ }
2111
+ return this.value;
2112
+ }
2113
+
2114
+ values() {
2115
+ if (this.useMap) {
2116
+ return super.values();
2117
+ }
2118
+ return this.value;
2119
+ }
2120
+ };
2121
+ };
2122
+
2123
+
2124
+ /***/ }),
2125
+
2126
+ /***/ 469:
2127
+ /***/ ((module) => {
2128
+
2129
+ function webpackEmptyContext(req) {
2130
+ var e = new Error("Cannot find module '" + req + "'");
2131
+ e.code = 'MODULE_NOT_FOUND';
2132
+ throw e;
2133
+ }
2134
+ webpackEmptyContext.keys = () => ([]);
2135
+ webpackEmptyContext.resolve = webpackEmptyContext;
2136
+ webpackEmptyContext.id = 469;
2137
+ module.exports = webpackEmptyContext;
2138
+
2139
+ /***/ })
2140
+
2141
+ /******/ });
2142
+ /************************************************************************/
2143
+ /******/ // The module cache
2144
+ /******/ var __webpack_module_cache__ = {};
2145
+ /******/
2146
+ /******/ // The require function
2147
+ /******/ function __nccwpck_require__(moduleId) {
2148
+ /******/ // Check if module is in cache
2149
+ /******/ var cachedModule = __webpack_module_cache__[moduleId];
2150
+ /******/ if (cachedModule !== undefined) {
2151
+ /******/ return cachedModule.exports;
2152
+ /******/ }
2153
+ /******/ // Create a new module (and put it into the cache)
2154
+ /******/ var module = __webpack_module_cache__[moduleId] = {
2155
+ /******/ // no module.id needed
2156
+ /******/ // no module.loaded needed
2157
+ /******/ exports: {}
2158
+ /******/ };
2159
+ /******/
2160
+ /******/ // Execute the module function
2161
+ /******/ var threw = true;
2162
+ /******/ try {
2163
+ /******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __nccwpck_require__);
2164
+ /******/ threw = false;
2165
+ /******/ } finally {
2166
+ /******/ if(threw) delete __webpack_module_cache__[moduleId];
2167
+ /******/ }
2168
+ /******/
2169
+ /******/ // Return the exports of the module
2170
+ /******/ return module.exports;
2171
+ /******/ }
2172
+ /******/
2173
+ /************************************************************************/
2174
+ /******/ /* webpack/runtime/hasOwnProperty shorthand */
2175
+ /******/ (() => {
2176
+ /******/ __nccwpck_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
2177
+ /******/ })();
2178
+ /******/
2179
+ /******/ /* webpack/runtime/compat */
2180
+ /******/
2181
+ /******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = __dirname + "/";
2182
+ /******/
2183
+ /************************************************************************/
2184
+ /******/
2185
+ /******/ // startup
2186
+ /******/ // Load entry module and return exports
2187
+ /******/ // This entry module is referenced by other modules so it can't be inlined
2188
+ /******/ var __webpack_exports__ = __nccwpck_require__(633);
2189
+ /******/ module.exports = __webpack_exports__;
2190
+ /******/
2191
+ /******/ })()
2192
+ ;