@speclynx/apidom-reference 4.11.1 → 4.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/README.md +215 -3
  3. package/dist/apidom-reference.browser.js +1346 -157
  4. package/dist/apidom-reference.browser.min.js +1 -1
  5. package/package.json +35 -30
  6. package/src/File.cjs +3 -1
  7. package/src/Reference.cjs +3 -1
  8. package/src/ReferenceSet.cjs +3 -1
  9. package/src/bundle/index.cjs +9 -1
  10. package/src/bundle/index.mjs +6 -0
  11. package/src/bundle/strategies/BundleStrategy.cjs +3 -1
  12. package/src/bundle/strategies/openapi-3-0/index.cjs +94 -0
  13. package/src/bundle/strategies/openapi-3-0/index.mjs +81 -0
  14. package/src/bundle/strategies/openapi-3-0/visitor.cjs +650 -0
  15. package/src/bundle/strategies/openapi-3-0/visitor.mjs +642 -0
  16. package/src/bundle/strategies/openapi-3-1/index.cjs +3 -1
  17. package/src/bundle/util.cjs +42 -0
  18. package/src/bundle/util.mjs +33 -0
  19. package/src/configuration/empty.cjs +9 -2
  20. package/src/configuration/saturated.cjs +19 -11
  21. package/src/configuration/saturated.mjs +2 -1
  22. package/src/dereference/index.cjs +3 -1
  23. package/src/dereference/strategies/DereferenceStrategy.cjs +3 -1
  24. package/src/dereference/strategies/apidom/index.cjs +9 -2
  25. package/src/dereference/strategies/apidom/selectors/element-id.cjs +9 -2
  26. package/src/dereference/strategies/apidom/visitor.cjs +3 -1
  27. package/src/dereference/strategies/arazzo-1/index.cjs +34 -7
  28. package/src/dereference/strategies/arazzo-1/selectors/$anchor.cjs +46 -10
  29. package/src/dereference/strategies/arazzo-1/selectors/uri.cjs +22 -6
  30. package/src/dereference/strategies/arazzo-1/source-descriptions.cjs +3 -1
  31. package/src/dereference/strategies/arazzo-1/util.cjs +16 -4
  32. package/src/dereference/strategies/arazzo-1/visitor.cjs +3 -1
  33. package/src/dereference/strategies/asyncapi-2/index.cjs +9 -2
  34. package/src/dereference/strategies/asyncapi-2/visitor.cjs +3 -1
  35. package/src/dereference/strategies/openapi-2/index.cjs +9 -2
  36. package/src/dereference/strategies/openapi-2/visitor.cjs +3 -1
  37. package/src/dereference/strategies/openapi-3-0/index.cjs +9 -2
  38. package/src/dereference/strategies/openapi-3-0/visitor.cjs +3 -1
  39. package/src/dereference/strategies/openapi-3-1/index.cjs +28 -6
  40. package/src/dereference/strategies/openapi-3-1/selectors/$anchor.cjs +22 -5
  41. package/src/dereference/strategies/openapi-3-1/selectors/uri.cjs +16 -4
  42. package/src/dereference/strategies/openapi-3-1/util.cjs +3 -1
  43. package/src/dereference/strategies/openapi-3-1/visitor.cjs +3 -1
  44. package/src/dereference/strategies/overlay-1/extends.cjs +3 -1
  45. package/src/dereference/strategies/overlay-1/index.cjs +9 -2
  46. package/src/dereference/util.cjs +3 -1
  47. package/src/errors/BundleError.cjs +4 -2
  48. package/src/errors/BundleError.mjs +2 -2
  49. package/src/errors/DereferenceError.cjs +3 -1
  50. package/src/errors/EvaluationElementIdError.cjs +3 -1
  51. package/src/errors/EvaluationJsonSchema$anchorError.cjs +3 -1
  52. package/src/errors/EvaluationJsonSchemaUriError.cjs +3 -1
  53. package/src/errors/InvalidJsonSchema$anchorError.cjs +3 -1
  54. package/src/errors/JsonSchema$anchorError.cjs +3 -1
  55. package/src/errors/JsonSchemaUriError.cjs +3 -1
  56. package/src/errors/MaximumBundleDepthError.cjs +3 -1
  57. package/src/errors/MaximumDereferenceDepthError.cjs +3 -1
  58. package/src/errors/MaximumResolveDepthError.cjs +3 -1
  59. package/src/errors/ParseError.cjs +3 -1
  60. package/src/errors/ParserError.cjs +3 -1
  61. package/src/errors/PluginError.cjs +3 -1
  62. package/src/errors/ResolveError.cjs +3 -1
  63. package/src/errors/ResolverError.cjs +3 -1
  64. package/src/errors/UnmatchedBundleStrategyError.cjs +3 -1
  65. package/src/errors/UnmatchedDereferenceStrategyError.cjs +3 -1
  66. package/src/errors/UnmatchedParserError.cjs +3 -1
  67. package/src/errors/UnmatchedResolveStrategyError.cjs +3 -1
  68. package/src/errors/UnmatchedResolverError.cjs +3 -1
  69. package/src/errors/UnresolvableReferenceError.cjs +8 -3
  70. package/src/errors/UnresolvableReferenceError.mjs +5 -2
  71. package/src/index.cjs +209 -36
  72. package/src/options/index.cjs +71 -2
  73. package/src/options/index.mjs +68 -1
  74. package/src/options/util.cjs +3 -1
  75. package/src/parse/index.cjs +3 -1
  76. package/src/parse/parsers/Parser.cjs +3 -1
  77. package/src/parse/parsers/apidom-json/index.cjs +3 -1
  78. package/src/parse/parsers/arazzo-json-1/index.cjs +9 -2
  79. package/src/parse/parsers/arazzo-json-1/source-descriptions.cjs +3 -1
  80. package/src/parse/parsers/arazzo-yaml-1/index.cjs +9 -2
  81. package/src/parse/parsers/arazzo-yaml-1/source-descriptions.cjs +3 -1
  82. package/src/parse/parsers/asyncapi-json-2/index.cjs +3 -1
  83. package/src/parse/parsers/asyncapi-yaml-2/index.cjs +3 -1
  84. package/src/parse/parsers/binary/index-browser.cjs +3 -1
  85. package/src/parse/parsers/binary/index-node.cjs +3 -1
  86. package/src/parse/parsers/json/index.cjs +3 -1
  87. package/src/parse/parsers/openapi-json-2/index.cjs +3 -1
  88. package/src/parse/parsers/openapi-json-3-0/index.cjs +3 -1
  89. package/src/parse/parsers/openapi-json-3-1/index.cjs +3 -1
  90. package/src/parse/parsers/openapi-yaml-2/index.cjs +3 -1
  91. package/src/parse/parsers/openapi-yaml-3-0/index.cjs +3 -1
  92. package/src/parse/parsers/openapi-yaml-3-1/index.cjs +3 -1
  93. package/src/parse/parsers/overlay-json-1/extends.cjs +3 -1
  94. package/src/parse/parsers/overlay-json-1/index.cjs +9 -2
  95. package/src/parse/parsers/overlay-yaml-1/extends.cjs +10 -4
  96. package/src/parse/parsers/overlay-yaml-1/index.cjs +9 -2
  97. package/src/parse/parsers/yaml-1-2/index.cjs +3 -1
  98. package/src/resolve/index.cjs +3 -1
  99. package/src/resolve/resolvers/HTTPResolver.cjs +3 -1
  100. package/src/resolve/resolvers/Resolver.cjs +3 -1
  101. package/src/resolve/resolvers/file/index-browser.cjs +3 -1
  102. package/src/resolve/resolvers/file/index-node.cjs +3 -1
  103. package/src/resolve/resolvers/http-axios/cache/MemoryCache.cjs +3 -1
  104. package/src/resolve/resolvers/http-axios/index.cjs +3 -1
  105. package/src/resolve/strategies/ResolveStrategy.cjs +3 -1
  106. package/src/resolve/strategies/apidom/index.cjs +3 -1
  107. package/src/resolve/strategies/arazzo-1/index.cjs +3 -1
  108. package/src/resolve/strategies/asyncapi-2/index.cjs +3 -1
  109. package/src/resolve/strategies/openapi-2/index.cjs +3 -1
  110. package/src/resolve/strategies/openapi-3-0/index.cjs +3 -1
  111. package/src/resolve/strategies/openapi-3-1/index.cjs +3 -1
  112. package/src/resolve/strategies/overlay-1/index.cjs +3 -1
  113. package/src/resolve/util.cjs +3 -1
  114. package/src/util/plugins.cjs +3 -1
  115. package/src/util/url.cjs +3 -1
  116. package/types/apidom-reference.d.ts +41 -2
  117. package/types/bundle/strategies/openapi-3-0/index.d.ts +31 -0
  118. package/types/bundle/strategies/openapi-3-0/visitor.d.ts +131 -0
  119. package/types/bundle/util.d.ts +22 -0
  120. package/types/errors/BundleError.d.ts +2 -2
  121. package/types/errors/UnresolvableReferenceError.d.ts +5 -2
  122. package/types/index.d.ts +1 -0
  123. package/types/options/index.d.ts +33 -1
@@ -193,9 +193,11 @@ __webpack_require__.r(__webpack_exports__);
193
193
  /* harmony import */ var _util_plugins_ts__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(47427);
194
194
  /* harmony import */ var _errors_UnmatchedBundleStrategyError_ts__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(56940);
195
195
  /* harmony import */ var _errors_BundleError_ts__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(81002);
196
- /* harmony import */ var _parse_index_ts__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(35014);
197
- /* harmony import */ var _options_util_ts__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(86547);
198
- /* harmony import */ var _util_url_ts__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(30658);
196
+ /* harmony import */ var _errors_UnresolvableReferenceError_ts__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(8853);
197
+ /* harmony import */ var _parse_index_ts__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(35014);
198
+ /* harmony import */ var _options_util_ts__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(86547);
199
+ /* harmony import */ var _util_url_ts__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(30658);
200
+
199
201
 
200
202
 
201
203
 
@@ -211,8 +213,8 @@ const bundle = async (uri, options) => {
211
213
  const {
212
214
  refSet
213
215
  } = options.bundle;
214
- const sanitizedURI = _util_url_ts__WEBPACK_IMPORTED_MODULE_8__.sanitize(uri);
215
- const mergedOptions = (0,_options_util_ts__WEBPACK_IMPORTED_MODULE_7__.merge)(options, {
216
+ const sanitizedURI = _util_url_ts__WEBPACK_IMPORTED_MODULE_9__.sanitize(uri);
217
+ const mergedOptions = (0,_options_util_ts__WEBPACK_IMPORTED_MODULE_8__.merge)(options, {
216
218
  resolve: {
217
219
  baseURI: sanitizedURI
218
220
  }
@@ -226,7 +228,7 @@ const bundle = async (uri, options) => {
226
228
  value: parseResult
227
229
  } = refSet.find((0,ramda__WEBPACK_IMPORTED_MODULE_1__["default"])(sanitizedURI, 'uri')));
228
230
  } else {
229
- parseResult = await (0,_parse_index_ts__WEBPACK_IMPORTED_MODULE_6__["default"])(uri, mergedOptions);
231
+ parseResult = await (0,_parse_index_ts__WEBPACK_IMPORTED_MODULE_7__["default"])(uri, mergedOptions);
230
232
  }
231
233
  const file = new _File_ts__WEBPACK_IMPORTED_MODULE_2__["default"]({
232
234
  uri: mergedOptions.resolve.baseURI,
@@ -245,6 +247,11 @@ const bundle = async (uri, options) => {
245
247
  } = await _util_plugins_ts__WEBPACK_IMPORTED_MODULE_3__.run('bundle', [file, mergedOptions], bundleStrategies);
246
248
  return result;
247
249
  } catch (error) {
250
+ // pass through errors that are already part of the bundle/resolution
251
+ // taxonomy rather than nesting them inside another BundleError
252
+ if (error instanceof _errors_BundleError_ts__WEBPACK_IMPORTED_MODULE_5__["default"] || error instanceof _errors_UnresolvableReferenceError_ts__WEBPACK_IMPORTED_MODULE_6__["default"]) {
253
+ throw error;
254
+ }
248
255
  throw new _errors_BundleError_ts__WEBPACK_IMPORTED_MODULE_5__["default"](`Error while bundling file "${file.uri}"`, {
249
256
  cause: error
250
257
  });
@@ -281,6 +288,795 @@ class BundleStrategy {
281
288
 
282
289
  /***/ },
283
290
 
291
+ /***/ 12087
292
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
293
+
294
+ "use strict";
295
+ __webpack_require__.r(__webpack_exports__);
296
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
297
+ /* harmony export */ OpenAPI3_0BundleVisitor: () => (/* reexport safe */ _visitor_ts__WEBPACK_IMPORTED_MODULE_7__["default"]),
298
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
299
+ /* harmony export */ });
300
+ /* harmony import */ var _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12111);
301
+ /* harmony import */ var _speclynx_apidom_traverse__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(80796);
302
+ /* harmony import */ var _speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(43151);
303
+ /* harmony import */ var _speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(32131);
304
+ /* harmony import */ var _Reference_ts__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(98979);
305
+ /* harmony import */ var _ReferenceSet_ts__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(24131);
306
+ /* harmony import */ var _BundleStrategy_ts__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(75508);
307
+ /* harmony import */ var _visitor_ts__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(74985);
308
+
309
+
310
+
311
+
312
+
313
+
314
+
315
+
316
+ /**
317
+ * @public
318
+ */
319
+
320
+ /**
321
+ * @public
322
+ */
323
+ class OpenAPI3_0BundleStrategy extends _BundleStrategy_ts__WEBPACK_IMPORTED_MODULE_6__["default"] {
324
+ constructor(options) {
325
+ super({
326
+ ...(options ?? {}),
327
+ name: 'openapi-3-0'
328
+ });
329
+ }
330
+ canBundle(file) {
331
+ // assert by media type
332
+ if (file.mediaType !== 'text/plain') {
333
+ return _speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_2__["default"].includes(file.mediaType);
334
+ }
335
+
336
+ // assert by inspecting ApiDOM
337
+ return (0,_speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_3__.isOpenApi3_0Element)(file.parseResult?.result);
338
+ }
339
+ async bundle(file, options) {
340
+ const immutableRefSet = options.bundle.refSet ?? new _ReferenceSet_ts__WEBPACK_IMPORTED_MODULE_5__["default"]();
341
+ const mutableRefSet = new _ReferenceSet_ts__WEBPACK_IMPORTED_MODULE_5__["default"]();
342
+ let refSet = immutableRefSet;
343
+ let reference;
344
+
345
+ // determine the initial reference
346
+ if (!immutableRefSet.has(file.uri)) {
347
+ reference = new _Reference_ts__WEBPACK_IMPORTED_MODULE_4__["default"]({
348
+ uri: file.uri,
349
+ value: file.parseResult
350
+ });
351
+ immutableRefSet.add(reference);
352
+ } else {
353
+ // pre-computed refSet was provided as configuration option
354
+ reference = immutableRefSet.find(ref => ref.uri === file.uri);
355
+ }
356
+
357
+ /**
358
+ * Clone refSet due the bundling process being mutable.
359
+ * We don't want to mutate the original refSet and the references.
360
+ */
361
+ if (options.bundle.immutable) {
362
+ immutableRefSet.refs.map(ref => new _Reference_ts__WEBPACK_IMPORTED_MODULE_4__["default"]({
363
+ ...ref,
364
+ value: (0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__.cloneDeep)(ref.value)
365
+ })).forEach(ref => mutableRefSet.add(ref));
366
+ reference = mutableRefSet.find(ref => ref.uri === file.uri);
367
+ refSet = mutableRefSet;
368
+ }
369
+ const visitor = new _visitor_ts__WEBPACK_IMPORTED_MODULE_7__["default"]({
370
+ reference: reference,
371
+ options
372
+ });
373
+ await (0,_speclynx_apidom_traverse__WEBPACK_IMPORTED_MODULE_1__.traverseAsync)(refSet.rootRef.value, visitor, {
374
+ mutable: true
375
+ });
376
+ const parseResult = reference.value;
377
+
378
+ /**
379
+ * Release all memory if this refSet was not provided as a configuration option.
380
+ * If provided as configuration option, then provider is responsible for cleanup.
381
+ */
382
+ if (options.bundle.refSet === null) {
383
+ immutableRefSet.clean();
384
+ }
385
+ mutableRefSet.clean();
386
+ return parseResult;
387
+ }
388
+ }
389
+
390
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (OpenAPI3_0BundleStrategy);
391
+
392
+ /***/ },
393
+
394
+ /***/ 74985
395
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
396
+
397
+ "use strict";
398
+ __webpack_require__.r(__webpack_exports__);
399
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
400
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
401
+ /* harmony export */ });
402
+ /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6352);
403
+ /* harmony import */ var _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(25162);
404
+ /* harmony import */ var _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(12111);
405
+ /* harmony import */ var _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(97071);
406
+ /* harmony import */ var _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(84660);
407
+ /* harmony import */ var _speclynx_apidom_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(37205);
408
+ /* harmony import */ var _speclynx_apidom_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(44673);
409
+ /* harmony import */ var _speclynx_apidom_core__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(16280);
410
+ /* harmony import */ var _speclynx_apidom_error__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(44641);
411
+ /* harmony import */ var _speclynx_apidom_traverse__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(80796);
412
+ /* harmony import */ var _speclynx_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(12020);
413
+ /* harmony import */ var _speclynx_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(61198);
414
+ /* harmony import */ var _speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(30609);
415
+ /* harmony import */ var _speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(64708);
416
+ /* harmony import */ var _speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(32131);
417
+ /* harmony import */ var _speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(21314);
418
+ /* harmony import */ var _speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(29881);
419
+ /* harmony import */ var _speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(23806);
420
+ /* harmony import */ var _speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(23031);
421
+ /* harmony import */ var _speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(63842);
422
+ /* harmony import */ var _speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(87455);
423
+ /* harmony import */ var _speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(55122);
424
+ /* harmony import */ var _speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(71117);
425
+ /* harmony import */ var _speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(72257);
426
+ /* harmony import */ var _speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(69511);
427
+ /* harmony import */ var _errors_BundleError_ts__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(81002);
428
+ /* harmony import */ var _errors_UnresolvableReferenceError_ts__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(8853);
429
+ /* harmony import */ var _errors_MaximumBundleDepthError_ts__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(16843);
430
+ /* harmony import */ var _errors_MaximumResolveDepthError_ts__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(51325);
431
+ /* harmony import */ var _util_url_ts__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(30658);
432
+ /* harmony import */ var _parse_index_ts__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(35014);
433
+ /* harmony import */ var _Reference_ts__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(98979);
434
+ /* harmony import */ var _util_ts__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(25939);
435
+
436
+
437
+
438
+
439
+
440
+
441
+
442
+
443
+
444
+
445
+
446
+
447
+
448
+
449
+
450
+ /**
451
+ * Maps the `referenced-element` meta value (set during refraction) to the
452
+ * Components Object field where the referenced element should be hoisted.
453
+ * Field names are sourced from the Components Object fixed fields so they
454
+ * cannot drift from the namespace definition.
455
+ */
456
+ const cf = (0,_speclynx_apidom_core__WEBPACK_IMPORTED_MODULE_5__.fixedFields)(_speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_12__["default"], {
457
+ indexed: true
458
+ });
459
+ const componentFieldByReferencedElement = {
460
+ schema: cf.schemas.name,
461
+ response: cf.responses.name,
462
+ parameter: cf.parameters.name,
463
+ example: cf.examples.name,
464
+ requestBody: cf.requestBodies.name,
465
+ header: cf.headers.name,
466
+ securityScheme: cf.securitySchemes.name,
467
+ link: cf.links.name,
468
+ callback: cf.callbacks.name
469
+ };
470
+
471
+ /**
472
+ * Maps a Components Object field to the named-content element the namespace
473
+ * uses for it, so a bundle-created field matches a parsed/refracted one
474
+ * (e.g. carries the `components-schemas` class) rather than being a generic
475
+ * object.
476
+ */
477
+ const componentFieldElementByField = {
478
+ [cf.schemas.name]: _speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_23__["default"],
479
+ [cf.responses.name]: _speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_22__["default"],
480
+ [cf.parameters.name]: _speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_20__["default"],
481
+ [cf.examples.name]: _speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_17__["default"],
482
+ [cf.requestBodies.name]: _speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_21__["default"],
483
+ [cf.headers.name]: _speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_18__["default"],
484
+ [cf.securitySchemes.name]: _speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_24__["default"],
485
+ [cf.links.name]: _speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_19__["default"],
486
+ [cf.callbacks.name]: _speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_16__["default"]
487
+ };
488
+
489
+ /**
490
+ * @public
491
+ */
492
+
493
+ /**
494
+ * @public
495
+ */
496
+ class OpenAPI3_0BundleVisitor {
497
+ reference;
498
+ options;
499
+
500
+ /**
501
+ * The base URI (without hash) of the entry document. A reference is
502
+ * considered internal when it resolves to this URI and external otherwise.
503
+ * Derived from the shared refSet's root reference.
504
+ */
505
+ get entryURI() {
506
+ return _util_url_ts__WEBPACK_IMPORTED_MODULE_29__.stripHash(this.reference.refSet?.rootRef?.uri ?? '');
507
+ }
508
+
509
+ /**
510
+ * The entry parse result. Derived from the shared refSet's root reference.
511
+ */
512
+ get entryParseResult() {
513
+ return this.reference.refSet.rootRef.value;
514
+ }
515
+
516
+ /**
517
+ * The entry document element. Hoisted external fragments are placed into its
518
+ * `components` object. The `canBundle` guard guarantees it is an
519
+ * OpenApi3_0Element.
520
+ */
521
+ get entryResult() {
522
+ return this.entryParseResult.result;
523
+ }
524
+
525
+ /**
526
+ * Shared across the entry document and every external document visitor.
527
+ * Guarantees each external fragment is hoisted exactly once and gives us a
528
+ * stable internal pointer to rewrite every referencing element to.
529
+ */
530
+ assignments;
531
+
532
+ /**
533
+ * Component names already reserved per Components Object field. Reserved
534
+ * before recursion so collision suffixing (`Pet`, `Pet-2`, ...) accounts for
535
+ * components that are still being bundled.
536
+ */
537
+ reservedNames;
538
+
539
+ /**
540
+ * Caches refracted fragments keyed by source element and target element type.
541
+ * The type is part of the key because the same source can be refracted into
542
+ * different semantic elements depending on the referencing context (e.g. a
543
+ * generic object referenced once as a Parameter and once as a Response).
544
+ */
545
+ refractCache;
546
+
547
+ /**
548
+ * Canonical URIs of Path Item Objects currently being inlined. Path Items
549
+ * are not hoisted into Components Object (no `components.pathItems` in
550
+ * OpenAPI 3.0), so the `assignments` map can't break their cycles. This
551
+ * stack guards against circular external Path Item references.
552
+ */
553
+ inlineStack;
554
+ constructor({
555
+ reference,
556
+ options,
557
+ assignments = new Map(),
558
+ reservedNames = new Map(),
559
+ refractCache = new WeakMap(),
560
+ inlineStack = new Set()
561
+ }) {
562
+ this.reference = reference;
563
+ this.options = options;
564
+ this.inlineStack = inlineStack;
565
+ this.assignments = assignments;
566
+ this.reservedNames = reservedNames;
567
+ this.refractCache = refractCache;
568
+ }
569
+ getRefracted(source, type) {
570
+ return this.refractCache.get(source)?.get(type);
571
+ }
572
+ setRefracted(source, type, refracted) {
573
+ let byType = this.refractCache.get(source);
574
+ if (byType === undefined) {
575
+ byType = new Map();
576
+ this.refractCache.set(source, byType);
577
+ }
578
+ byType.set(type, refracted);
579
+ }
580
+ toBaseURI(uri) {
581
+ return _util_url_ts__WEBPACK_IMPORTED_MODULE_29__.resolve(this.reference.uri, _util_url_ts__WEBPACK_IMPORTED_MODULE_29__.sanitize(_util_url_ts__WEBPACK_IMPORTED_MODULE_29__.stripHash(uri)));
582
+ }
583
+ async toReference(uri) {
584
+ // detect maximum depth of resolution
585
+ if (this.reference.depth >= this.options.resolve.maxDepth) {
586
+ throw new _errors_MaximumResolveDepthError_ts__WEBPACK_IMPORTED_MODULE_28__["default"](`Maximum resolution depth of ${this.options.resolve.maxDepth} has been exceeded by file "${this.reference.uri}"`, {
587
+ maxDepth: this.options.resolve.maxDepth,
588
+ uri: this.reference.uri
589
+ });
590
+ }
591
+ const baseURI = this.toBaseURI(uri);
592
+ const {
593
+ refSet
594
+ } = this.reference;
595
+
596
+ // we've already processed this Reference in past
597
+ if (refSet.has(baseURI)) {
598
+ return refSet.find((0,ramda__WEBPACK_IMPORTED_MODULE_0__["default"])(baseURI, 'uri'));
599
+ }
600
+ const parseResult = await (0,_parse_index_ts__WEBPACK_IMPORTED_MODULE_30__["default"])(_util_url_ts__WEBPACK_IMPORTED_MODULE_29__.unsanitize(baseURI), {
601
+ ...this.options,
602
+ parse: {
603
+ ...this.options.parse,
604
+ mediaType: 'text/plain'
605
+ }
606
+ });
607
+ const reference = new _Reference_ts__WEBPACK_IMPORTED_MODULE_31__["default"]({
608
+ uri: baseURI,
609
+ value: parseResult,
610
+ depth: this.reference.depth + 1
611
+ });
612
+ refSet.add(reference);
613
+ return reference;
614
+ }
615
+
616
+ /**
617
+ * Normalizes a self-file reference (e.g. `./root.json#/components/schemas/Pet`)
618
+ * to a bare fragment (`#/components/schemas/Pet`) so the bundled document stays
619
+ * transferable. Bare fragments are returned unchanged.
620
+ */
621
+ normalizeSelfFileRef(ref) {
622
+ return ref.startsWith('#') ? ref : _util_url_ts__WEBPACK_IMPORTED_MODULE_29__.getHash(ref);
623
+ }
624
+
625
+ /**
626
+ * Handles an error according to the `bundle.continueOnError` option.
627
+ *
628
+ * For new errors: wraps in UnresolvableReferenceError with structured
629
+ * context. For errors already wrapped by a nested visitor: prepends the
630
+ * current hop to the trace.
631
+ *
632
+ * Inner/intermediate visitors always throw to let the trace accumulate. Only
633
+ * the entry document visitor respects continueOnError (callback/swallow/throw).
634
+ */
635
+ handleError(message, error, referencingElement, refFieldName, refFieldValue, visitorPath) {
636
+ // a collision reported as `error` is a deliberate hard stop with no
637
+ // resolution-failure analog, so pass it through unchanged. A maxDepth
638
+ // breach (MaximumBundleDepthError, which also extends BundleError) is a
639
+ // resolution failure and flows through below — wrapped and subject to
640
+ // continueOnError, like dereferencing.
641
+ if (error instanceof _errors_BundleError_ts__WEBPACK_IMPORTED_MODULE_25__["default"] && !(error instanceof _errors_MaximumBundleDepthError_ts__WEBPACK_IMPORTED_MODULE_27__["default"])) {
642
+ throw error;
643
+ }
644
+ const {
645
+ continueOnError
646
+ } = this.options.bundle;
647
+ const isEntryDocument = _util_url_ts__WEBPACK_IMPORTED_MODULE_29__.stripHash(this.reference.refSet?.rootRef?.uri ?? '') === this.reference.uri;
648
+ const uri = this.reference.uri;
649
+ const type = referencingElement.element;
650
+ const codeFrame = (0,_speclynx_apidom_core__WEBPACK_IMPORTED_MODULE_7__["default"])(referencingElement);
651
+ const location = visitorPath.formatPath();
652
+ const hop = {
653
+ uri,
654
+ type,
655
+ refFieldName,
656
+ refFieldValue,
657
+ location,
658
+ codeFrame
659
+ };
660
+ let unresolvedError;
661
+ if (error instanceof _errors_UnresolvableReferenceError_ts__WEBPACK_IMPORTED_MODULE_26__["default"]) {
662
+ // @ts-ignore
663
+ error.trace = [hop, ...error.trace];
664
+ unresolvedError = error;
665
+ } else {
666
+ unresolvedError = new _errors_UnresolvableReferenceError_ts__WEBPACK_IMPORTED_MODULE_26__["default"](message, {
667
+ cause: error,
668
+ type,
669
+ uri,
670
+ location,
671
+ codeFrame,
672
+ refFieldName,
673
+ refFieldValue,
674
+ trace: []
675
+ });
676
+ }
677
+ if (!isEntryDocument || continueOnError === false) throw unresolvedError;
678
+ if (typeof continueOnError === 'function') continueOnError(unresolvedError);
679
+ }
680
+
681
+ /**
682
+ * Lazily creates the Components Object (and the requested field within it)
683
+ * on the entry document, returning the field where a fragment is hoisted.
684
+ */
685
+ ensureComponentsField(field) {
686
+ const entryResult = this.entryResult;
687
+ let components = entryResult.components;
688
+ if (!(0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_1__.isObjectElement)(components)) {
689
+ components = new _speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_12__["default"]();
690
+ entryResult.components = components;
691
+ }
692
+ let fieldElement = components.get(field);
693
+ if (!(0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_1__.isObjectElement)(fieldElement)) {
694
+ const FieldElement = componentFieldElementByField[field] ?? _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_3__["default"];
695
+ fieldElement = new FieldElement();
696
+ components.set(field, fieldElement);
697
+ }
698
+ return fieldElement;
699
+ }
700
+
701
+ /**
702
+ * Derives a component name from the referenced JSON Pointer's last token,
703
+ * falling back to the referenced file's basename.
704
+ */
705
+ basenameOf(jsonPointer, baseURI) {
706
+ const tokens = (0,_speclynx_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_11__.parse)(jsonPointer).tree;
707
+ let candidate = tokens.length > 0 ? tokens[tokens.length - 1] : '';
708
+ if (candidate === '') {
709
+ const lastSlash = baseURI.lastIndexOf('/');
710
+ const lastDot = baseURI.lastIndexOf('.');
711
+ const fileName = baseURI.slice(lastSlash + 1);
712
+ // strip the extension only when the last dot belongs to the file name
713
+ candidate = lastDot > lastSlash ? baseURI.slice(lastSlash + 1, lastDot) : fileName;
714
+ }
715
+ if (candidate === '') candidate = 'Schema';
716
+ return candidate;
717
+ }
718
+
719
+ /**
720
+ * Computes the base component name (before collision suffixing) according to
721
+ * the configured naming strategy.
722
+ */
723
+ baseName(element, field, jsonPointer, baseURI) {
724
+ // strategy specific options take precedence over the top-level bundle options
725
+ const componentNamesStrategy = this.options.bundle.strategyOpts['openapi-3-0']?.componentNamesStrategy ?? this.options.bundle.componentNamesStrategy;
726
+ if (typeof componentNamesStrategy === 'function') {
727
+ const resolved = componentNamesStrategy({
728
+ element,
729
+ field,
730
+ jsonPointer,
731
+ baseURI
732
+ });
733
+ if (typeof resolved === 'string' && resolved !== '') {
734
+ return resolved;
735
+ }
736
+ return this.basenameOf(jsonPointer, baseURI);
737
+ }
738
+ if (componentNamesStrategy === 'title') {
739
+ const title = (0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_1__.isObjectElement)(element) ? (0,_speclynx_apidom_core__WEBPACK_IMPORTED_MODULE_6__["default"])(element.get('title')) : undefined;
740
+ if (typeof title === 'string' && title.trim() !== '') {
741
+ const name = (0,_util_ts__WEBPACK_IMPORTED_MODULE_32__.sanitizeComponentName)((0,_util_ts__WEBPACK_IMPORTED_MODULE_32__.toPascalCase)(title));
742
+ if (name !== '') return name;
743
+ }
744
+ // fall back to basename when no usable title is present
745
+ }
746
+ return this.basenameOf(jsonPointer, baseURI);
747
+ }
748
+
749
+ /**
750
+ * Computes a collision-free component name within the target field. A name is
751
+ * taken if it's already placed in components or reserved by a component that
752
+ * is still being bundled (reserved before recursion).
753
+ */
754
+ uniqueName(candidate, field) {
755
+ const fieldElement = this.ensureComponentsField(field);
756
+ const reserved = this.reservedNames.get(field) ?? new Set();
757
+ return (0,_util_ts__WEBPACK_IMPORTED_MODULE_32__.uniqueName)(candidate, name => fieldElement.hasKey(name) || reserved.has(name));
758
+ }
759
+ async ReferenceElement(path) {
760
+ const referencingElement = path.node;
761
+ const $ref = (0,_speclynx_apidom_core__WEBPACK_IMPORTED_MODULE_6__["default"])(referencingElement.$ref);
762
+ const retrievalURI = this.toBaseURI($ref);
763
+ const isInternalReference = this.entryURI === retrievalURI;
764
+ const isExternalReference = !isInternalReference;
765
+ if (isInternalReference) {
766
+ // normalize self-file references to a bare fragment so the bundled
767
+ // document stays transferable; bare fragments are left untouched
768
+ referencingElement.set('$ref', this.normalizeSelfFileRef($ref));
769
+ path.skip();
770
+ return;
771
+ }
772
+
773
+ // honor the resolve.external switch
774
+ if (!this.options.resolve.external && isExternalReference) {
775
+ path.skip();
776
+ return;
777
+ }
778
+ const $refBaseURI = _util_url_ts__WEBPACK_IMPORTED_MODULE_29__.resolve(retrievalURI, $ref);
779
+ const jsonPointer = _speclynx_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_11__.URIFragmentIdentifier.fromURIReference($refBaseURI);
780
+
781
+ // the target bucket depends on the referencing context, so it's part of the
782
+ // identity: the same external target referenced as e.g. both a parameter and
783
+ // a response must be hoisted into both components fields. The refractor sets
784
+ // `referenced-element` for every Reference Object position; the `schemas`
785
+ // fallback is a defensive default for the (unexpected) untagged case.
786
+ const referencedElementType = referencingElement.meta.get('referenced-element');
787
+ const field = componentFieldByReferencedElement[referencedElementType] ?? componentFieldByReferencedElement.schema;
788
+ const canonicalKey = `${field}\t${retrievalURI}#${jsonPointer}`;
789
+
790
+ // already hoisted (or being hoisted) — just rewrite the pointer.
791
+ //
792
+ // this is also how circular references terminate: the assignment is
793
+ // reserved BEFORE recursing into the fragment (see below), so a reference
794
+ // that cycles back (directly or indirectly) finds its pointer already
795
+ // reserved here and is rewritten without recursing. Cycles are deliberately
796
+ // preserved as internal `$ref`s pointing at each other — that is valid,
797
+ // serializable output; resolving the cycle (if desired) is dereferencing's
798
+ // job, not bundling's.
799
+ if (this.assignments.has(canonicalKey)) {
800
+ referencingElement.set('$ref', this.assignments.get(canonicalKey));
801
+ path.skip();
802
+ return;
803
+ }
804
+ try {
805
+ // detect maximum depth of bundling
806
+ if (this.reference.depth >= this.options.bundle.maxDepth) {
807
+ throw new _errors_MaximumBundleDepthError_ts__WEBPACK_IMPORTED_MODULE_27__["default"](`Maximum bundle depth of "${this.options.bundle.maxDepth}" has been exceeded in file "${this.reference.uri}"`, {
808
+ maxDepth: this.options.bundle.maxDepth,
809
+ uri: this.reference.uri
810
+ });
811
+ }
812
+ const reference = await this.toReference($ref);
813
+
814
+ // possibly non-semantic fragment
815
+ let referencedElement = (0,_speclynx_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_10__.evaluate)(reference.value.result, jsonPointer);
816
+
817
+ // apply semantics to the fragment so nested references become Reference Objects
818
+ if (referencedElement.element !== referencedElementType && !(0,_speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_14__.isReferenceElement)(referencedElement)) {
819
+ const cached = this.getRefracted(referencedElement, referencedElementType);
820
+ if (cached !== undefined) {
821
+ referencedElement = cached;
822
+ } else if ((0,_speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_15__.isReferenceLikeElement)(referencedElement)) {
823
+ const sourceElement = referencedElement;
824
+ referencedElement = (0,_speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_13__.refractReference)(referencedElement);
825
+ referencedElement.meta.set('referenced-element', referencedElementType);
826
+ this.setRefracted(sourceElement, referencedElementType, referencedElement);
827
+ } else {
828
+ const sourceElement = referencedElement;
829
+ referencedElement = (0,_speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_13__["default"])(referencedElement, {
830
+ element: referencedElementType
831
+ });
832
+ this.setRefracted(sourceElement, referencedElementType, referencedElement);
833
+ }
834
+ }
835
+ const preferredName = this.baseName(referencedElement, field, jsonPointer, retrievalURI);
836
+ const componentName = this.uniqueName(preferredName, field);
837
+ const internalPointer = `#/components/${field}/${(0,_speclynx_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_11__.escape)(componentName)}`;
838
+
839
+ // a rename means two distinct targets resolved to the same name; each
840
+ // keeps its own component (and origin), so report the rename per severity.
841
+ // strategy specific options take precedence over the top-level bundle options
842
+ const onComponentNameCollision = this.options.bundle.strategyOpts['openapi-3-0']?.onComponentNameCollision ?? this.options.bundle.onComponentNameCollision;
843
+ if (componentName !== preferredName && onComponentNameCollision !== 'off') {
844
+ const message = `Component "${preferredName}" in components/${field} is referenced with the same name but different content. Renamed to "${componentName}".`;
845
+ if (onComponentNameCollision === 'error') {
846
+ throw new _errors_BundleError_ts__WEBPACK_IMPORTED_MODULE_25__["default"](message);
847
+ }
848
+ const annotation = new _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_4__["default"](message);
849
+ annotation.classes.push('warning');
850
+ annotation.code = 'bundle-component-name-collision';
851
+ // append (never prepend) so the result element stays ahead of annotations
852
+ this.entryParseResult.content.push(annotation);
853
+ }
854
+
855
+ // reserve the assignment and component name before recursing so cyclic
856
+ // references terminate
857
+ this.assignments.set(canonicalKey, internalPointer);
858
+ if (!this.reservedNames.has(field)) this.reservedNames.set(field, new Set());
859
+ this.reservedNames.get(field).add(componentName);
860
+
861
+ // own a copy of the fragment and bundle its own external references
862
+ const hoistedElement = (0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_2__.cloneDeep)(referencedElement);
863
+ const visitor = new OpenAPI3_0BundleVisitor({
864
+ reference,
865
+ options: this.options,
866
+ assignments: this.assignments,
867
+ reservedNames: this.reservedNames,
868
+ refractCache: this.refractCache,
869
+ inlineStack: this.inlineStack
870
+ });
871
+ const bundledElement = await (0,_speclynx_apidom_traverse__WEBPACK_IMPORTED_MODULE_9__.traverseAsync)(hoistedElement, visitor, {
872
+ mutable: true
873
+ });
874
+
875
+ // annotate the hoisted fragment with info about its origin
876
+ if ((0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_1__.isElement)(bundledElement)) {
877
+ bundledElement.meta.set('ref-origin', reference.uri);
878
+ }
879
+
880
+ // place the bundled fragment into the entry document's components
881
+ this.ensureComponentsField(field).set(componentName, bundledElement);
882
+
883
+ // rewrite the referencing element to point at the hoisted fragment
884
+ referencingElement.set('$ref', internalPointer);
885
+ path.skip();
886
+ } catch (error) {
887
+ this.handleError(`Error while bundling Reference Object. Cannot resolve $ref "${$ref}": ${error.message}`, error, referencingElement, '$ref', $ref, path);
888
+ path.skip();
889
+ }
890
+ }
891
+
892
+ /**
893
+ * Path Item Object is not a Components Object field in OpenAPI 3.0
894
+ * (unlike 3.1 which has `components.pathItems`). An external Path Item
895
+ * reference therefore cannot be hoisted; it is inlined in place instead,
896
+ * after bundling its own external references.
897
+ */
898
+ async PathItemElement(path) {
899
+ const pathItemElement = path.node;
900
+
901
+ // ignore Path Item Objects without a $ref field
902
+ if (!(0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_1__.isStringElement)(pathItemElement.$ref)) {
903
+ return;
904
+ }
905
+ const $ref = (0,_speclynx_apidom_core__WEBPACK_IMPORTED_MODULE_6__["default"])(pathItemElement.$ref);
906
+ const retrievalURI = this.toBaseURI($ref);
907
+ const isInternalReference = this.entryURI === retrievalURI;
908
+ const isExternalReference = !isInternalReference;
909
+ if (isInternalReference) {
910
+ // normalize self-file references to a bare fragment so the bundled
911
+ // document stays transferable; bare fragments are left untouched
912
+ pathItemElement.set('$ref', this.normalizeSelfFileRef($ref));
913
+ return;
914
+ }
915
+
916
+ // honor the resolve.external switch
917
+ if (!this.options.resolve.external && isExternalReference) {
918
+ return;
919
+ }
920
+ const $refBaseURI = _util_url_ts__WEBPACK_IMPORTED_MODULE_29__.resolve(retrievalURI, $ref);
921
+ const jsonPointer = _speclynx_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_11__.URIFragmentIdentifier.fromURIReference($refBaseURI);
922
+ const canonicalKey = `${retrievalURI}#${jsonPointer}`;
923
+
924
+ // a circular external Path Item reference cannot be inlined without
925
+ // recursing forever; leave the $ref in place to break the cycle
926
+ if (this.inlineStack.has(canonicalKey)) {
927
+ return;
928
+ }
929
+ try {
930
+ // detect maximum depth of bundling
931
+ if (this.reference.depth >= this.options.bundle.maxDepth) {
932
+ throw new _errors_MaximumBundleDepthError_ts__WEBPACK_IMPORTED_MODULE_27__["default"](`Maximum bundle depth of "${this.options.bundle.maxDepth}" has been exceeded in file "${this.reference.uri}"`, {
933
+ maxDepth: this.options.bundle.maxDepth,
934
+ uri: this.reference.uri
935
+ });
936
+ }
937
+ const reference = await this.toReference($ref);
938
+ let referencedElement = (0,_speclynx_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_10__.evaluate)(reference.value.result, jsonPointer);
939
+
940
+ // apply Path Item semantics to the referenced fragment
941
+ if (!(0,_speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_14__.isPathItemElement)(referencedElement)) {
942
+ const cached = this.getRefracted(referencedElement, 'pathItem');
943
+ if (cached !== undefined) {
944
+ referencedElement = cached;
945
+ } else {
946
+ const sourceElement = referencedElement;
947
+ referencedElement = (0,_speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_13__.refractPathItem)(referencedElement);
948
+ this.setRefracted(sourceElement, 'pathItem', referencedElement);
949
+ }
950
+ }
951
+
952
+ // own a copy and bundle the external references it contains
953
+ const inlinedElement = (0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_2__.cloneDeep)(referencedElement);
954
+ this.inlineStack.add(canonicalKey);
955
+ const visitor = new OpenAPI3_0BundleVisitor({
956
+ reference,
957
+ options: this.options,
958
+ assignments: this.assignments,
959
+ reservedNames: this.reservedNames,
960
+ refractCache: this.refractCache,
961
+ inlineStack: this.inlineStack
962
+ });
963
+ let bundledElement;
964
+ try {
965
+ bundledElement = await (0,_speclynx_apidom_traverse__WEBPACK_IMPORTED_MODULE_9__.traverseAsync)(inlinedElement, visitor, {
966
+ mutable: true
967
+ });
968
+ } finally {
969
+ this.inlineStack.delete(canonicalKey);
970
+ }
971
+
972
+ // merge sibling fields from the referencing Path Item over the referenced
973
+ // one. The referencing `$ref` is being resolved away and is skipped; the
974
+ // referenced element keeps its own `$ref` if one survived (i.e. it was
975
+ // left in place to break a circular external Path Item chain).
976
+ pathItemElement.forEach((_value, keyElement, item) => {
977
+ const key = (0,_speclynx_apidom_core__WEBPACK_IMPORTED_MODULE_6__["default"])(keyElement);
978
+ if (key === '$ref') return;
979
+ bundledElement.remove(key);
980
+ bundledElement.content.push(item);
981
+ });
982
+ bundledElement.meta.set('ref-origin', reference.uri);
983
+ path.replaceWith(bundledElement);
984
+ } catch (error) {
985
+ this.handleError(`Error while bundling Path Item Object. Cannot resolve $ref "${$ref}": ${error.message}`, error, pathItemElement, '$ref', $ref, path);
986
+ }
987
+ }
988
+
989
+ /**
990
+ * Example Object `externalValue` points at arbitrary external content that
991
+ * has no place in the Components Object. The referenced value is inlined into
992
+ * the Example's `value` field.
993
+ */
994
+ async ExampleElement(path) {
995
+ const exampleElement = path.node;
996
+
997
+ // ignore Example Objects without an externalValue field
998
+ if (!(0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_1__.isStringElement)(exampleElement.externalValue)) {
999
+ return;
1000
+ }
1001
+
1002
+ // value and externalValue fields are mutually exclusive
1003
+ if (exampleElement.hasKey('value') && (0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_1__.isStringElement)(exampleElement.externalValue)) {
1004
+ throw new _speclynx_apidom_error__WEBPACK_IMPORTED_MODULE_8__["default"]('ExampleElement value and externalValue fields are mutually exclusive', {
1005
+ value: (0,_speclynx_apidom_core__WEBPACK_IMPORTED_MODULE_6__["default"])(exampleElement.value),
1006
+ externalValue: (0,_speclynx_apidom_core__WEBPACK_IMPORTED_MODULE_6__["default"])(exampleElement.externalValue)
1007
+ });
1008
+ }
1009
+ const externalValue = (0,_speclynx_apidom_core__WEBPACK_IMPORTED_MODULE_6__["default"])(exampleElement.externalValue);
1010
+ const retrievalURI = this.toBaseURI(externalValue);
1011
+ const isInternalReference = this.entryURI === retrievalURI;
1012
+ const isExternalReference = !isInternalReference;
1013
+
1014
+ // honor the resolve.external switch
1015
+ if (!this.options.resolve.external && isExternalReference) {
1016
+ return;
1017
+ }
1018
+ try {
1019
+ const reference = await this.toReference(externalValue);
1020
+ const valueElement = (0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_2__.cloneShallow)(reference.value.result);
1021
+ valueElement.meta.set('ref-origin', reference.uri);
1022
+ const exampleElementCopy = (0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_2__.cloneShallow)(exampleElement);
1023
+ exampleElementCopy.value = valueElement;
1024
+ exampleElementCopy.remove('externalValue');
1025
+ path.replaceWith(exampleElementCopy);
1026
+ } catch (error) {
1027
+ this.handleError(`Error while bundling Example Object. Cannot resolve externalValue "${externalValue}": ${error.message}`, error, exampleElement, 'externalValue', externalValue, path);
1028
+ }
1029
+ }
1030
+
1031
+ /**
1032
+ * Link Object `operationRef` points at an Operation Object, which has no
1033
+ * Components Object field in OpenAPI 3.0 and therefore cannot be hoisted or
1034
+ * inlined. To keep the link resolvable from the bundled document, an external
1035
+ * `operationRef` is rewritten to its absolute URI. Internal `operationRef`
1036
+ * values and `operationId` links are left untouched.
1037
+ */
1038
+ async LinkElement(path) {
1039
+ const linkElement = path.node;
1040
+
1041
+ // operationRef and operationId fields are mutually exclusive
1042
+ if ((0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_1__.isStringElement)(linkElement.operationRef) && (0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_1__.isStringElement)(linkElement.operationId)) {
1043
+ throw new _speclynx_apidom_error__WEBPACK_IMPORTED_MODULE_8__["default"]('LinkElement operationRef and operationId fields are mutually exclusive', {
1044
+ operationRef: (0,_speclynx_apidom_core__WEBPACK_IMPORTED_MODULE_6__["default"])(linkElement.operationRef),
1045
+ operationId: (0,_speclynx_apidom_core__WEBPACK_IMPORTED_MODULE_6__["default"])(linkElement.operationId)
1046
+ });
1047
+ }
1048
+
1049
+ // only external operationRef links need adjusting
1050
+ if (!(0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_1__.isStringElement)(linkElement.operationRef)) {
1051
+ return;
1052
+ }
1053
+ const operationRef = (0,_speclynx_apidom_core__WEBPACK_IMPORTED_MODULE_6__["default"])(linkElement.operationRef);
1054
+ const retrievalURI = this.toBaseURI(operationRef);
1055
+ const isInternalReference = this.entryURI === retrievalURI;
1056
+ if (isInternalReference) {
1057
+ // normalize self-file operationRef to a bare fragment so the bundled
1058
+ // document stays transferable; bare fragments are left untouched
1059
+ linkElement.set('operationRef', this.normalizeSelfFileRef(operationRef));
1060
+ return;
1061
+ }
1062
+
1063
+ // honor the resolve.external switch
1064
+ if (!this.options.resolve.external) {
1065
+ return;
1066
+ }
1067
+
1068
+ // rewrite to an absolute URI so the link keeps resolving once the document
1069
+ // is treated as self-contained
1070
+ const absoluteURI = _util_url_ts__WEBPACK_IMPORTED_MODULE_29__.resolve(this.reference.uri, operationRef);
1071
+ if (absoluteURI !== operationRef) {
1072
+ linkElement.set('operationRef', absoluteURI);
1073
+ }
1074
+ }
1075
+ }
1076
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (OpenAPI3_0BundleVisitor);
1077
+
1078
+ /***/ },
1079
+
284
1080
  /***/ 16432
285
1081
  (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
286
1082
 
@@ -326,6 +1122,52 @@ class OpenAPI3_1BundleStrategy extends _BundleStrategy_ts__WEBPACK_IMPORTED_MODU
326
1122
 
327
1123
  /***/ },
328
1124
 
1125
+ /***/ 25939
1126
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1127
+
1128
+ "use strict";
1129
+ __webpack_require__.r(__webpack_exports__);
1130
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1131
+ /* harmony export */ sanitizeComponentName: () => (/* binding */ sanitizeComponentName),
1132
+ /* harmony export */ toPascalCase: () => (/* binding */ toPascalCase),
1133
+ /* harmony export */ uniqueName: () => (/* binding */ uniqueName)
1134
+ /* harmony export */ });
1135
+ /**
1136
+ * Upper-cases the first letter of each whitespace-separated word and joins
1137
+ * them, e.g. `pet model` -> `PetModel`.
1138
+ *
1139
+ * @public
1140
+ */
1141
+ const toPascalCase = value => value.trim().split(/\s+/).map(word => word.replace(/^[a-z]/, char => char.toUpperCase())).join('');
1142
+
1143
+ /**
1144
+ * Replaces characters that are invalid in a Components Object name with `-`,
1145
+ * then collapses repeated separators and trims leading/trailing ones.
1146
+ *
1147
+ * @public
1148
+ */
1149
+ const sanitizeComponentName = value => value.replace(/[^a-zA-Z0-9.\-_]/g, '-').replace(/-+/g, '-').replace(/^-|-$/g, '');
1150
+
1151
+ /**
1152
+ * Returns a collision-free name by suffixing `-2`, `-3`, ... onto `candidate`
1153
+ * until `isTaken` reports it free. `isTaken` decides what counts as taken
1154
+ * (e.g. names already placed in or reserved for a Components Object field).
1155
+ *
1156
+ * @public
1157
+ */
1158
+ const uniqueName = (candidate, isTaken) => {
1159
+ if (!isTaken(candidate)) {
1160
+ return candidate;
1161
+ }
1162
+ let counter = 2;
1163
+ while (isTaken(`${candidate}-${counter}`)) {
1164
+ counter += 1;
1165
+ }
1166
+ return `${candidate}-${counter}`;
1167
+ };
1168
+
1169
+ /***/ },
1170
+
329
1171
  /***/ 42037
330
1172
  (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
331
1173
 
@@ -5703,7 +6545,7 @@ __webpack_require__.r(__webpack_exports__);
5703
6545
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
5704
6546
  /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
5705
6547
  /* harmony export */ });
5706
- /* harmony import */ var _speclynx_apidom_error__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16126);
6548
+ /* harmony import */ var _speclynx_apidom_error__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(44641);
5707
6549
 
5708
6550
 
5709
6551
  /**
@@ -6114,13 +6956,16 @@ __webpack_require__.r(__webpack_exports__);
6114
6956
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
6115
6957
  /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
6116
6958
  /* harmony export */ });
6117
- /* harmony import */ var _DereferenceError_ts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(456);
6959
+ /* harmony import */ var _ResolveError_ts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(94312);
6118
6960
 
6119
6961
 
6120
6962
  /**
6963
+ * Thrown when a reference cannot be resolved. Resolution is shared by the
6964
+ * dereference and bundle components, so this error lives under `ResolveError`.
6965
+ *
6121
6966
  * @public
6122
6967
  */
6123
- class UnresolvableReferenceError extends _DereferenceError_ts__WEBPACK_IMPORTED_MODULE_0__["default"] {}
6968
+ class UnresolvableReferenceError extends _ResolveError_ts__WEBPACK_IMPORTED_MODULE_0__["default"] {}
6124
6969
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (UnresolvableReferenceError);
6125
6970
 
6126
6971
  /***/ },
@@ -6332,6 +7177,24 @@ __webpack_require__.r(__webpack_exports__);
6332
7177
  /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(57457);
6333
7178
 
6334
7179
 
7180
+ /**
7181
+ * @public
7182
+ */
7183
+
7184
+ /**
7185
+ * @public
7186
+ */
7187
+
7188
+ /**
7189
+ * @public
7190
+ */
7191
+
7192
+ /**
7193
+ * Context passed to a custom component-name resolver.
7194
+ *
7195
+ * @public
7196
+ */
7197
+
6335
7198
  /**
6336
7199
  * @public
6337
7200
  */
@@ -6499,6 +7362,13 @@ const defaultOptions = {
6499
7362
  * your own implementation, or remove any bundle strategy by removing it from the list.
6500
7363
  */
6501
7364
  strategies: [],
7365
+ /**
7366
+ * Determines strategy specific options. The key is the name of the strategy
7367
+ * (e.g. `openapi-3-0`) and the value is an object of options specific to
7368
+ * that strategy. Strategy specific options take precedence over the
7369
+ * top-level bundle options.
7370
+ */
7371
+ strategyOpts: {},
6502
7372
  /**
6503
7373
  * This option accepts an instance of pre-computed ReferenceSet.
6504
7374
  * If provided it will speed up the bundling significantly as the external
@@ -6517,7 +7387,49 @@ const defaultOptions = {
6517
7387
  * The bundling should throw MaximumBundleDepthError if bundling depth
6518
7388
  * is exceeded by this option.
6519
7389
  */
6520
- maxDepth: +Infinity
7390
+ maxDepth: +Infinity,
7391
+ /**
7392
+ * Determines whether the bundling process will be immutable.
7393
+ * By default, the bundling process is immutable, which means that the original
7394
+ * ApiDOM (and any pre-computed refSet) is not mutated and a deep clone is bundled.
7395
+ *
7396
+ * true - the bundling process is immutable (deep cloning of ApiDOM is involved)
7397
+ * false - the bundling process is mutable (no deep cloning, faster, mutates input)
7398
+ */
7399
+ immutable: true,
7400
+ /**
7401
+ * Determines how hoisted components are named.
7402
+ *
7403
+ * `basename` (default) - derive the name from the referenced JSON Pointer
7404
+ * (its last token), falling back to the referenced file's basename.
7405
+ * `title` - derive Schema Object names from their `title` field, falling
7406
+ * back to `basename` when no usable title is present.
7407
+ * A custom resolver function - receives the referenced element and reference
7408
+ * context and returns the base name; collision suffixing is still applied.
7409
+ */
7410
+ componentNamesStrategy: 'basename',
7411
+ /**
7412
+ * Determines how a component rename forced by a name collision with
7413
+ * different content is reported.
7414
+ *
7415
+ * `warn` (default) - append a warning annotation to the parse result.
7416
+ * `off` - rename silently.
7417
+ * `error` - throw a BundleError instead of renaming.
7418
+ */
7419
+ onComponentNameCollision: 'warn',
7420
+ /**
7421
+ * Determines how the bundling process behaves when a reference cannot be
7422
+ * resolved.
7423
+ *
7424
+ * Unlike dereferencing, a swallowed reference is left in place — so the
7425
+ * bundled document may still contain unresolved external references.
7426
+ *
7427
+ * false - fail fast, throw on first error (default)
7428
+ * true - skip unresolvable references silently, continue bundling
7429
+ * (error) => void - callback invoked for each error; if the callback
7430
+ * itself throws, bundling stops with that error
7431
+ */
7432
+ continueOnError: false
6521
7433
  }
6522
7434
  };
6523
7435
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (defaultOptions);
@@ -43894,8 +44806,11 @@ __webpack_require__.r(__webpack_exports__);
43894
44806
  /* harmony import */ var _registration_mjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(97071);
43895
44807
  /* harmony import */ var _registration_mjs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(23321);
43896
44808
  /* harmony import */ var _registration_mjs__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(78894);
43897
- /* harmony import */ var _registration_mjs__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(25810);
43898
- /* harmony import */ var _registration_mjs__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(36663);
44809
+ /* harmony import */ var _registration_mjs__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(84660);
44810
+ /* harmony import */ var _registration_mjs__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(40094);
44811
+ /* harmony import */ var _registration_mjs__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(4823);
44812
+ /* harmony import */ var _registration_mjs__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(25810);
44813
+ /* harmony import */ var _registration_mjs__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(36663);
43899
44814
 
43900
44815
 
43901
44816
  const isNull = value => value === null;
@@ -43955,7 +44870,7 @@ class Namespace {
43955
44870
  _attributeElementArrayKeys = [];
43956
44871
  constructor(options) {
43957
44872
  this.Element = _registration_mjs__WEBPACK_IMPORTED_MODULE_1__["default"];
43958
- this.KeyValuePair = _registration_mjs__WEBPACK_IMPORTED_MODULE_12__["default"];
44873
+ this.KeyValuePair = _registration_mjs__WEBPACK_IMPORTED_MODULE_15__["default"];
43959
44874
  if (!options || !options.noDefault) {
43960
44875
  this.useDefault();
43961
44876
  }
@@ -43984,7 +44899,7 @@ class Namespace {
43984
44899
  */
43985
44900
  useDefault() {
43986
44901
  // Set up classes for default elements
43987
- this.register('null', _registration_mjs__WEBPACK_IMPORTED_MODULE_2__["default"]).register('string', _registration_mjs__WEBPACK_IMPORTED_MODULE_3__["default"]).register('number', _registration_mjs__WEBPACK_IMPORTED_MODULE_4__["default"]).register('boolean', _registration_mjs__WEBPACK_IMPORTED_MODULE_5__["default"]).register('array', _registration_mjs__WEBPACK_IMPORTED_MODULE_6__["default"]).register('object', _registration_mjs__WEBPACK_IMPORTED_MODULE_8__["default"]).register('member', _registration_mjs__WEBPACK_IMPORTED_MODULE_7__["default"]).register('ref', _registration_mjs__WEBPACK_IMPORTED_MODULE_10__["default"]).register('link', _registration_mjs__WEBPACK_IMPORTED_MODULE_9__["default"]).register('sourceMap', _registration_mjs__WEBPACK_IMPORTED_MODULE_11__["default"]);
44902
+ this.register('null', _registration_mjs__WEBPACK_IMPORTED_MODULE_2__["default"]).register('string', _registration_mjs__WEBPACK_IMPORTED_MODULE_3__["default"]).register('number', _registration_mjs__WEBPACK_IMPORTED_MODULE_4__["default"]).register('boolean', _registration_mjs__WEBPACK_IMPORTED_MODULE_5__["default"]).register('array', _registration_mjs__WEBPACK_IMPORTED_MODULE_6__["default"]).register('object', _registration_mjs__WEBPACK_IMPORTED_MODULE_8__["default"]).register('member', _registration_mjs__WEBPACK_IMPORTED_MODULE_7__["default"]).register('ref', _registration_mjs__WEBPACK_IMPORTED_MODULE_10__["default"]).register('link', _registration_mjs__WEBPACK_IMPORTED_MODULE_9__["default"]).register('sourceMap', _registration_mjs__WEBPACK_IMPORTED_MODULE_14__["default"]).register('annotation', _registration_mjs__WEBPACK_IMPORTED_MODULE_11__["default"]).register('comment', _registration_mjs__WEBPACK_IMPORTED_MODULE_12__["default"]).register('parseResult', _registration_mjs__WEBPACK_IMPORTED_MODULE_13__["default"]);
43988
44903
 
43989
44904
  // Add instance detection functions to convert existing objects into
43990
44905
  // the corresponding refract elements.
@@ -95370,14 +96285,28 @@ const factory = (env) => {
95370
96285
 
95371
96286
  let requestContentLength;
95372
96287
 
96288
+ // AxiosError we raise while the request body is being streamed. Captured
96289
+ // by identity so the catch block can surface it directly, regardless of
96290
+ // how the runtime wraps the resulting fetch rejection (undici exposes it
96291
+ // as `err.cause`; some browsers drop the original error entirely).
96292
+ let pendingBodyError = null;
96293
+
96294
+ const maxBodyLengthError = () =>
96295
+ new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"](
96296
+ 'Request body larger than maxBodyLength limit',
96297
+ _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"].ERR_BAD_REQUEST,
96298
+ config,
96299
+ request
96300
+ );
96301
+
95373
96302
  try {
95374
96303
  // HTTP basic authentication
95375
96304
  let auth = undefined;
95376
96305
  const configAuth = own('auth');
95377
96306
 
95378
96307
  if (configAuth) {
95379
- const username = configAuth.username || '';
95380
- const password = configAuth.password || '';
96308
+ const username = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].getSafeProp(configAuth, 'username') || '';
96309
+ const password = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].getSafeProp(configAuth, 'password') || '';
95381
96310
  auth = {
95382
96311
  username,
95383
96312
  password
@@ -95426,53 +96355,96 @@ const factory = (env) => {
95426
96355
  }
95427
96356
  }
95428
96357
 
95429
- // Enforce maxBodyLength against the outbound request body before dispatch.
95430
- // Mirrors http.js behavior (ERR_BAD_REQUEST / 'Request body larger than
95431
- // maxBodyLength limit'). Skip when the body length cannot be determined
95432
- // (e.g. a live ReadableStream supplied by the caller).
96358
+ // Enforce maxBodyLength against known-size bodies before dispatch using
96359
+ // the body's *actual* size — never a caller-declared Content-Length,
96360
+ // which could under-report to slip an oversized body past the check.
96361
+ // Unknown-size streams return undefined here and are counted per-chunk
96362
+ // below as fetch consumes them.
95433
96363
  if (hasMaxBodyLength && method !== 'get' && method !== 'head') {
95434
- const outboundLength = await resolveBodyLength(headers, data);
95435
- if (
95436
- typeof outboundLength === 'number' &&
95437
- isFinite(outboundLength) &&
95438
- outboundLength > maxBodyLength
95439
- ) {
95440
- throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"](
95441
- 'Request body larger than maxBodyLength limit',
95442
- _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"].ERR_BAD_REQUEST,
95443
- config,
95444
- request
95445
- );
96364
+ const outboundLength = await getBodyLength(data);
96365
+ if (typeof outboundLength === 'number' && isFinite(outboundLength)) {
96366
+ requestContentLength = outboundLength;
96367
+ if (outboundLength > maxBodyLength) {
96368
+ throw maxBodyLengthError();
96369
+ }
95446
96370
  }
95447
96371
  }
95448
96372
 
96373
+ // A streamed body under maxBodyLength must be counted as fetch consumes
96374
+ // it; its size is never trusted from a caller-declared Content-Length.
96375
+ const mustEnforceStreamBody =
96376
+ hasMaxBodyLength && (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isReadableStream(data) || _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isStream(data));
96377
+
96378
+ const trackRequestStream = (stream, onProgress, flush) =>
96379
+ (0,_helpers_trackStream_js__WEBPACK_IMPORTED_MODULE_4__.trackStream)(
96380
+ stream,
96381
+ DEFAULT_CHUNK_SIZE,
96382
+ (loadedBytes) => {
96383
+ if (hasMaxBodyLength && loadedBytes > maxBodyLength) {
96384
+ throw (pendingBodyError = maxBodyLengthError());
96385
+ }
96386
+ onProgress && onProgress(loadedBytes);
96387
+ },
96388
+ flush
96389
+ );
96390
+
95449
96391
  if (
95450
- onUploadProgress &&
95451
96392
  supportsRequestStream &&
95452
96393
  method !== 'get' &&
95453
96394
  method !== 'head' &&
95454
- (requestContentLength = await resolveBodyLength(headers, data)) !== 0
96395
+ (onUploadProgress || mustEnforceStreamBody)
95455
96396
  ) {
95456
- let _request = new Request(url, {
95457
- method: 'POST',
95458
- body: data,
95459
- duplex: 'half',
95460
- });
96397
+ requestContentLength =
96398
+ requestContentLength == null ? await resolveBodyLength(headers, data) : requestContentLength;
96399
+
96400
+ // A declared length of 0 is only trusted to skip the wrap when we are
96401
+ // not enforcing a stream limit (which must not rely on that header).
96402
+ if (requestContentLength !== 0 || mustEnforceStreamBody) {
96403
+ let _request = new Request(url, {
96404
+ method: 'POST',
96405
+ body: data,
96406
+ duplex: 'half',
96407
+ });
95461
96408
 
95462
- let contentTypeHeader;
96409
+ let contentTypeHeader;
95463
96410
 
95464
- if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {
95465
- headers.setContentType(contentTypeHeader);
95466
- }
96411
+ if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {
96412
+ headers.setContentType(contentTypeHeader);
96413
+ }
95467
96414
 
95468
- if (_request.body) {
95469
- const [onProgress, flush] = (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_6__.progressEventDecorator)(
95470
- requestContentLength,
95471
- (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_6__.progressEventReducer)((0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_6__.asyncDecorator)(onUploadProgress))
95472
- );
96415
+ if (_request.body) {
96416
+ const [onProgress, flush] =
96417
+ (onUploadProgress &&
96418
+ (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_6__.progressEventDecorator)(
96419
+ requestContentLength,
96420
+ (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_6__.progressEventReducer)((0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_6__.asyncDecorator)(onUploadProgress))
96421
+ )) ||
96422
+ [];
95473
96423
 
95474
- data = (0,_helpers_trackStream_js__WEBPACK_IMPORTED_MODULE_4__.trackStream)(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
96424
+ data = trackRequestStream(_request.body, onProgress, flush);
96425
+ }
95475
96426
  }
96427
+ } else if (
96428
+ mustEnforceStreamBody &&
96429
+ !isRequestSupported &&
96430
+ isReadableStreamSupported &&
96431
+ method !== 'get' &&
96432
+ method !== 'head'
96433
+ ) {
96434
+ data = trackRequestStream(data);
96435
+ } else if (
96436
+ mustEnforceStreamBody &&
96437
+ isRequestSupported &&
96438
+ !supportsRequestStream &&
96439
+ method !== 'get' &&
96440
+ method !== 'head'
96441
+ ) {
96442
+ throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"](
96443
+ 'Stream request bodies are not supported by the current fetch implementation',
96444
+ _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"].ERR_NOT_SUPPORT,
96445
+ config,
96446
+ request
96447
+ );
95476
96448
  }
95477
96449
 
95478
96450
  if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isString(withCredentials)) {
@@ -95515,10 +96487,12 @@ const factory = (env) => {
95515
96487
  ? _fetch(request, fetchOptions)
95516
96488
  : _fetch(url, resolvedOptions));
95517
96489
 
96490
+ const responseHeaders = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_5__["default"].from(response.headers);
96491
+
95518
96492
  // Cheap pre-check: if the server honestly declares a content-length that
95519
96493
  // already exceeds the cap, reject before we start streaming.
95520
96494
  if (hasMaxContentLength) {
95521
- const declaredLength = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].toFiniteNumber(response.headers.get('content-length'));
96495
+ const declaredLength = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].toFiniteNumber(responseHeaders.getContentLength());
95522
96496
  if (declaredLength != null && declaredLength > maxContentLength) {
95523
96497
  throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"](
95524
96498
  'maxContentLength size of ' + maxContentLength + ' exceeded',
@@ -95543,7 +96517,7 @@ const factory = (env) => {
95543
96517
  options[prop] = response[prop];
95544
96518
  });
95545
96519
 
95546
- const responseContentLength = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].toFiniteNumber(response.headers.get('content-length'));
96520
+ const responseContentLength = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].toFiniteNumber(responseHeaders.getContentLength());
95547
96521
 
95548
96522
  const [onProgress, flush] =
95549
96523
  (onDownloadProgress &&
@@ -95638,6 +96612,23 @@ const factory = (env) => {
95638
96612
  throw canceledError;
95639
96613
  }
95640
96614
 
96615
+ // Surface a maxBodyLength violation we raised while the request body was
96616
+ // being streamed. Matching by identity (rather than reading
96617
+ // `err.cause.isAxiosError`) keeps the error deterministic across runtimes
96618
+ // and avoids both prototype-pollution reads and mis-attributing a foreign
96619
+ // AxiosError that merely happened to land in `err.cause`.
96620
+ if (pendingBodyError) {
96621
+ request && !pendingBodyError.request && (pendingBodyError.request = request);
96622
+ throw pendingBodyError;
96623
+ }
96624
+
96625
+ // Re-throw AxiosErrors we raised synchronously (data: URL / content-length
96626
+ // pre-checks, response size enforcement) without re-wrapping them.
96627
+ if (err instanceof _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"]) {
96628
+ request && !err.request && (err.request = request);
96629
+ throw err;
96630
+ }
96631
+
95641
96632
  if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) {
95642
96633
  throw Object.assign(
95643
96634
  new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"](
@@ -96379,6 +97370,7 @@ class Axios {
96379
97370
  clarifyTimeoutError: validators.transitional(validators.boolean),
96380
97371
  legacyInterceptorReqResOrdering: validators.transitional(validators.boolean),
96381
97372
  advertiseZstdAcceptEncoding: validators.transitional(validators.boolean),
97373
+ validateStatusUndefinedResolves: validators.transitional(validators.boolean),
96382
97374
  },
96383
97375
  false
96384
97376
  );
@@ -96510,7 +97502,7 @@ class Axios {
96510
97502
 
96511
97503
  getUri(config) {
96512
97504
  config = (0,_mergeConfig_js__WEBPACK_IMPORTED_MODULE_4__["default"])(this.defaults, config);
96513
- const fullPath = (0,_buildFullPath_js__WEBPACK_IMPORTED_MODULE_5__["default"])(config.baseURL, config.url, config.allowAbsoluteUrls);
97505
+ const fullPath = (0,_buildFullPath_js__WEBPACK_IMPORTED_MODULE_5__["default"])(config.baseURL, config.url, config.allowAbsoluteUrls, config);
96514
97506
  return (0,_helpers_buildURL_js__WEBPACK_IMPORTED_MODULE_1__["default"])(fullPath, config.params, config.paramsSerializer);
96515
97507
  }
96516
97508
  }
@@ -96523,7 +97515,7 @@ _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(['delete', 'get', 'hea
96523
97515
  (0,_mergeConfig_js__WEBPACK_IMPORTED_MODULE_4__["default"])(config || {}, {
96524
97516
  method,
96525
97517
  url,
96526
- data: (config || {}).data,
97518
+ data: config && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(config, 'data') ? config.data : undefined,
96527
97519
  })
96528
97520
  );
96529
97521
  };
@@ -96875,8 +97867,8 @@ class AxiosHeaders {
96875
97867
  setHeaders(header, valueOrRewrite);
96876
97868
  } else if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
96877
97869
  setHeaders((0,_helpers_parseHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"])(header), valueOrRewrite);
96878
- } else if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isObject(header) && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isIterable(header)) {
96879
- let obj = {},
97870
+ } else if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isObject(header) && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isSafeIterable(header)) {
97871
+ let obj = Object.create(null),
96880
97872
  dest,
96881
97873
  key;
96882
97874
  for (const entry of header) {
@@ -96884,11 +97876,14 @@ class AxiosHeaders {
96884
97876
  throw new TypeError('Object iterator must return a key-value pair');
96885
97877
  }
96886
97878
 
96887
- obj[(key = entry[0])] = (dest = obj[key])
96888
- ? _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(dest)
96889
- ? [...dest, entry[1]]
96890
- : [dest, entry[1]]
96891
- : entry[1];
97879
+ key = entry[0];
97880
+
97881
+ if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(obj, key)) {
97882
+ dest = obj[key];
97883
+ obj[key] = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]];
97884
+ } else {
97885
+ obj[key] = entry[1];
97886
+ }
96892
97887
  }
96893
97888
 
96894
97889
  setHeaders(obj, valueOrRewrite);
@@ -97207,12 +98202,39 @@ __webpack_require__.r(__webpack_exports__);
97207
98202
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
97208
98203
  /* harmony export */ "default": () => (/* binding */ buildFullPath)
97209
98204
  /* harmony export */ });
97210
- /* harmony import */ var _helpers_isAbsoluteURL_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(99034);
97211
- /* harmony import */ var _helpers_combineURLs_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(76787);
98205
+ /* harmony import */ var _AxiosError_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(74062);
98206
+ /* harmony import */ var _helpers_isAbsoluteURL_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(99034);
98207
+ /* harmony import */ var _helpers_combineURLs_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(76787);
98208
+
98209
+
97212
98210
 
97213
98211
 
97214
98212
 
97215
98213
 
98214
+ const malformedHttpProtocol = /^https?:(?!\/\/)/i;
98215
+ const httpProtocolControlCharacters = /[\t\n\r]/g;
98216
+
98217
+ function stripLeadingC0ControlOrSpace(url) {
98218
+ let i = 0;
98219
+ while (i < url.length && url.charCodeAt(i) <= 0x20) {
98220
+ i++;
98221
+ }
98222
+ return url.slice(i);
98223
+ }
98224
+
98225
+ function normalizeURLForProtocolCheck(url) {
98226
+ return stripLeadingC0ControlOrSpace(url).replace(httpProtocolControlCharacters, '');
98227
+ }
98228
+
98229
+ function assertValidHttpProtocolURL(url, config) {
98230
+ if (typeof url === 'string' && malformedHttpProtocol.test(normalizeURLForProtocolCheck(url))) {
98231
+ throw new _AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"](
98232
+ 'Invalid URL: missing "//" after protocol',
98233
+ _AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"].ERR_INVALID_URL,
98234
+ config
98235
+ );
98236
+ }
98237
+ }
97216
98238
 
97217
98239
  /**
97218
98240
  * Creates a new URL by combining the baseURL with the requestedURL,
@@ -97224,10 +98246,12 @@ __webpack_require__.r(__webpack_exports__);
97224
98246
  *
97225
98247
  * @returns {string} The combined full path
97226
98248
  */
97227
- function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
97228
- let isRelativeUrl = !(0,_helpers_isAbsoluteURL_js__WEBPACK_IMPORTED_MODULE_0__["default"])(requestedURL);
98249
+ function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls, config) {
98250
+ assertValidHttpProtocolURL(requestedURL, config);
98251
+ let isRelativeUrl = !(0,_helpers_isAbsoluteURL_js__WEBPACK_IMPORTED_MODULE_1__["default"])(requestedURL);
97229
98252
  if (baseURL && (isRelativeUrl || allowAbsoluteUrls === false)) {
97230
- return (0,_helpers_combineURLs_js__WEBPACK_IMPORTED_MODULE_1__["default"])(baseURL, requestedURL);
98253
+ assertValidHttpProtocolURL(baseURL, config);
98254
+ return (0,_helpers_combineURLs_js__WEBPACK_IMPORTED_MODULE_2__["default"])(baseURL, requestedURL);
97231
98255
  }
97232
98256
  return requestedURL;
97233
98257
  }
@@ -97422,6 +98446,28 @@ function mergeConfig(config1, config2) {
97422
98446
  }
97423
98447
  }
97424
98448
 
98449
+ function getMergedTransitionalOption(prop) {
98450
+ const transitional2 = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(config2, 'transitional') ? config2.transitional : undefined;
98451
+
98452
+ if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(transitional2)) {
98453
+ if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(transitional2)) {
98454
+ if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(transitional2, prop)) {
98455
+ return transitional2[prop];
98456
+ }
98457
+ } else {
98458
+ return undefined;
98459
+ }
98460
+ }
98461
+
98462
+ const transitional1 = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(config1, 'transitional') ? config1.transitional : undefined;
98463
+
98464
+ if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(transitional1) && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(transitional1, prop)) {
98465
+ return transitional1[prop];
98466
+ }
98467
+
98468
+ return undefined;
98469
+ }
98470
+
97425
98471
  // eslint-disable-next-line consistent-return
97426
98472
  function mergeDirectKeys(a, b, prop) {
97427
98473
  if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(config2, prop)) {
@@ -97474,6 +98520,18 @@ function mergeConfig(config1, config2) {
97474
98520
  (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
97475
98521
  });
97476
98522
 
98523
+ if (
98524
+ _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(config2, 'validateStatus') &&
98525
+ _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(config2.validateStatus) &&
98526
+ getMergedTransitionalOption('validateStatusUndefinedResolves') === false
98527
+ ) {
98528
+ if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(config1, 'validateStatus')) {
98529
+ config.validateStatus = getMergedValue(undefined, config1.validateStatus);
98530
+ } else {
98531
+ delete config.validateStatus;
98532
+ }
98533
+ }
98534
+
97477
98535
  return config;
97478
98536
  }
97479
98537
 
@@ -97775,6 +98833,7 @@ __webpack_require__.r(__webpack_exports__);
97775
98833
  clarifyTimeoutError: false,
97776
98834
  legacyInterceptorReqResOrdering: true,
97777
98835
  advertiseZstdAcceptEncoding: false,
98836
+ validateStatusUndefinedResolves: true,
97778
98837
  });
97779
98838
 
97780
98839
 
@@ -97788,7 +98847,7 @@ __webpack_require__.r(__webpack_exports__);
97788
98847
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
97789
98848
  /* harmony export */ VERSION: () => (/* binding */ VERSION)
97790
98849
  /* harmony export */ });
97791
- const VERSION = "1.17.0";
98850
+ const VERSION = "1.18.0";
97792
98851
 
97793
98852
  /***/ },
97794
98853
 
@@ -98027,15 +99086,17 @@ function buildURL(url, params, options) {
98027
99086
  return url;
98028
99087
  }
98029
99088
 
98030
- const _encode = (options && options.encode) || encode;
98031
-
98032
99089
  const _options = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(options)
98033
99090
  ? {
98034
99091
  serialize: options,
98035
99092
  }
98036
99093
  : options;
98037
99094
 
98038
- const serializeFn = _options && _options.serialize;
99095
+ // Read serializer options pollution-safely: own properties and methods on a
99096
+ // class/template prototype are honored, but values injected onto a polluted
99097
+ // Object.prototype are ignored.
99098
+ const _encode = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].getSafeProp(_options, 'encode') || encode;
99099
+ const serializeFn = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].getSafeProp(_options, 'serialize');
98039
99100
 
98040
99101
  let serializedParams;
98041
99102
 
@@ -98247,11 +99308,19 @@ __webpack_require__.r(__webpack_exports__);
98247
99308
  * Estimate decoded byte length of a data:// URL *without* allocating large buffers.
98248
99309
  * - For base64: compute exact decoded size using length and padding;
98249
99310
  * handle %XX at the character-count level (no string allocation).
98250
- * - For non-base64: use UTF-8 byteLength of the encoded body as a safe upper bound.
99311
+ * - For non-base64: compute the exact percent-decoded UTF-8 byte length.
98251
99312
  *
98252
99313
  * @param {string} url
98253
99314
  * @returns {number}
98254
99315
  */
99316
+ const isHexDigit = (charCode) =>
99317
+ (charCode >= 48 && charCode <= 57) ||
99318
+ (charCode >= 65 && charCode <= 70) ||
99319
+ (charCode >= 97 && charCode <= 102);
99320
+
99321
+ const isPercentEncodedByte = (str, i, len) =>
99322
+ i + 2 < len && isHexDigit(str.charCodeAt(i + 1)) && isHexDigit(str.charCodeAt(i + 2));
99323
+
98255
99324
  function estimateDataURLDecodedBytes(url) {
98256
99325
  if (!url || typeof url !== 'string') return 0;
98257
99326
  if (!url.startsWith('data:')) return 0;
@@ -98271,9 +99340,7 @@ function estimateDataURLDecodedBytes(url) {
98271
99340
  if (body.charCodeAt(i) === 37 /* '%' */ && i + 2 < len) {
98272
99341
  const a = body.charCodeAt(i + 1);
98273
99342
  const b = body.charCodeAt(i + 2);
98274
- const isHex =
98275
- ((a >= 48 && a <= 57) || (a >= 65 && a <= 70) || (a >= 97 && a <= 102)) &&
98276
- ((b >= 48 && b <= 57) || (b >= 65 && b <= 70) || (b >= 97 && b <= 102));
99343
+ const isHex = isHexDigit(a) && isHexDigit(b);
98277
99344
 
98278
99345
  if (isHex) {
98279
99346
  effectiveLen -= 2;
@@ -98314,18 +99381,17 @@ function estimateDataURLDecodedBytes(url) {
98314
99381
  return bytes > 0 ? bytes : 0;
98315
99382
  }
98316
99383
 
98317
- if (typeof Buffer !== 'undefined' && typeof Buffer.byteLength === 'function') {
98318
- return Buffer.byteLength(body, 'utf8');
98319
- }
98320
-
98321
99384
  // Compute UTF-8 byte length directly from UTF-16 code units without allocating
98322
99385
  // a byte buffer (TextEncoder.encode would defeat the DoS guard on large bodies).
98323
- // Using body.length here would undercount non-ASCII (e.g. '€' is 1 code unit
98324
- // but 3 UTF-8 bytes).
99386
+ // Valid %XX triplets count as one decoded byte; this matches the bytes that
99387
+ // decodeURIComponent(body) would produce before Buffer re-encodes the string.
98325
99388
  let bytes = 0;
98326
99389
  for (let i = 0, len = body.length; i < len; i++) {
98327
99390
  const c = body.charCodeAt(i);
98328
- if (c < 0x80) {
99391
+ if (c === 37 /* '%' */ && isPercentEncodedByte(body, i, len)) {
99392
+ bytes += 1;
99393
+ i += 2;
99394
+ } else if (c < 0x80) {
98329
99395
  bytes += 1;
98330
99396
  } else if (c < 0x800) {
98331
99397
  bytes += 2;
@@ -98356,10 +99422,25 @@ __webpack_require__.r(__webpack_exports__);
98356
99422
  /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
98357
99423
  /* harmony export */ });
98358
99424
  /* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17275);
99425
+ /* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(74062);
99426
+ /* harmony import */ var _toFormData_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(70665);
99427
+
99428
+
98359
99429
 
98360
99430
 
98361
99431
 
98362
99432
 
99433
+ const MAX_DEPTH = _toFormData_js__WEBPACK_IMPORTED_MODULE_2__.DEFAULT_FORM_DATA_MAX_DEPTH;
99434
+
99435
+ function throwIfDepthExceeded(index) {
99436
+ if (index > MAX_DEPTH) {
99437
+ throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"](
99438
+ 'FormData field is too deeply nested (' + index + ' levels). Max depth: ' + MAX_DEPTH,
99439
+ _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].ERR_FORM_DATA_DEPTH_EXCEEDED
99440
+ );
99441
+ }
99442
+ }
99443
+
98363
99444
  /**
98364
99445
  * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']
98365
99446
  *
@@ -98372,9 +99453,16 @@ function parsePropPath(name) {
98372
99453
  // foo.x.y.z
98373
99454
  // foo-x-y-z
98374
99455
  // foo x y z
98375
- return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].matchAll(/\w+|\[(\w*)]/g, name).map((match) => {
98376
- return match[0] === '[]' ? '' : match[1] || match[0];
98377
- });
99456
+ const path = [];
99457
+ const pattern = /\w+|\[(\w*)]/g;
99458
+ let match;
99459
+
99460
+ while ((match = pattern.exec(name)) !== null) {
99461
+ throwIfDepthExceeded(path.length);
99462
+ path.push(match[0] === '[]' ? '' : match[1] || match[0]);
99463
+ }
99464
+
99465
+ return path;
98378
99466
  }
98379
99467
 
98380
99468
  /**
@@ -98406,6 +99494,8 @@ function arrayToObject(arr) {
98406
99494
  */
98407
99495
  function formDataToJSON(formData) {
98408
99496
  function buildPath(path, value, target, index) {
99497
+ throwIfDepthExceeded(index);
99498
+
98409
99499
  let name = path[index++];
98410
99500
 
98411
99501
  if (name === '__proto__') return true;
@@ -98802,17 +99892,19 @@ function resolveConfig(config) {
98802
99892
  newConfig.headers = headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_6__["default"].from(headers);
98803
99893
 
98804
99894
  newConfig.url = (0,_buildURL_js__WEBPACK_IMPORTED_MODULE_7__["default"])(
98805
- (0,_core_buildFullPath_js__WEBPACK_IMPORTED_MODULE_4__["default"])(baseURL, url, allowAbsoluteUrls),
99895
+ (0,_core_buildFullPath_js__WEBPACK_IMPORTED_MODULE_4__["default"])(baseURL, url, allowAbsoluteUrls, newConfig),
98806
99896
  own('params'),
98807
99897
  own('paramsSerializer')
98808
99898
  );
98809
99899
 
98810
99900
  // HTTP basic authentication
98811
99901
  if (auth) {
99902
+ const username = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].getSafeProp(auth, 'username') || '';
99903
+ const password = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].getSafeProp(auth, 'password') || '';
99904
+
98812
99905
  headers.set(
98813
99906
  'Authorization',
98814
- 'Basic ' +
98815
- btoa((auth.username || '') + ':' + (auth.password ? encodeUTF8(auth.password) : ''))
99907
+ 'Basic ' + btoa(username + ':' + (password ? encodeUTF8(password) : ''))
98816
99908
  );
98817
99909
  }
98818
99910
 
@@ -99105,6 +100197,7 @@ function throttle(fn, freq) {
99105
100197
  "use strict";
99106
100198
  __webpack_require__.r(__webpack_exports__);
99107
100199
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
100200
+ /* harmony export */ DEFAULT_FORM_DATA_MAX_DEPTH: () => (/* binding */ DEFAULT_FORM_DATA_MAX_DEPTH),
99108
100201
  /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
99109
100202
  /* harmony export */ });
99110
100203
  /* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17275);
@@ -99117,6 +100210,10 @@ __webpack_require__.r(__webpack_exports__);
99117
100210
  // temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored
99118
100211
 
99119
100212
 
100213
+ // Default nesting limit shared with the inverse transform (formDataToJSON) so
100214
+ // the FormData <-> JSON round-trip stays symmetric.
100215
+ const DEFAULT_FORM_DATA_MAX_DEPTH = 100;
100216
+
99120
100217
  /**
99121
100218
  * Determines if the given thing is a array or js object.
99122
100219
  *
@@ -99227,8 +100324,9 @@ function toFormData(obj, formData, options) {
99227
100324
  const dots = options.dots;
99228
100325
  const indexes = options.indexes;
99229
100326
  const _Blob = options.Blob || (typeof Blob !== 'undefined' && Blob);
99230
- const maxDepth = options.maxDepth === undefined ? 100 : options.maxDepth;
100327
+ const maxDepth = options.maxDepth === undefined ? DEFAULT_FORM_DATA_MAX_DEPTH : options.maxDepth;
99231
100328
  const useBlob = _Blob && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isSpecCompliantForm(formData);
100329
+ const stack = [];
99232
100330
 
99233
100331
  if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(visitor)) {
99234
100332
  throw new TypeError('visitor must be a function');
@@ -99256,6 +100354,38 @@ function toFormData(obj, formData, options) {
99256
100354
  return value;
99257
100355
  }
99258
100356
 
100357
+ function throwIfMaxDepthExceeded(depth) {
100358
+ if (depth > maxDepth) {
100359
+ throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"](
100360
+ 'Object is too deeply nested (' + depth + ' levels). Max depth: ' + maxDepth,
100361
+ _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].ERR_FORM_DATA_DEPTH_EXCEEDED
100362
+ );
100363
+ }
100364
+ }
100365
+
100366
+ function stringifyWithDepthLimit(value, depth) {
100367
+ if (maxDepth === Infinity) {
100368
+ return JSON.stringify(value);
100369
+ }
100370
+
100371
+ const ancestors = [];
100372
+
100373
+ return JSON.stringify(value, function limitDepth(_key, currentValue) {
100374
+ if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isObject(currentValue)) {
100375
+ return currentValue;
100376
+ }
100377
+
100378
+ while (ancestors.length && ancestors[ancestors.length - 1] !== this) {
100379
+ ancestors.pop();
100380
+ }
100381
+
100382
+ ancestors.push(currentValue);
100383
+ throwIfMaxDepthExceeded(depth + ancestors.length - 1);
100384
+
100385
+ return currentValue;
100386
+ });
100387
+ }
100388
+
99259
100389
  /**
99260
100390
  * Default visitor.
99261
100391
  *
@@ -99279,7 +100409,7 @@ function toFormData(obj, formData, options) {
99279
100409
  // eslint-disable-next-line no-param-reassign
99280
100410
  key = metaTokens ? key : key.slice(0, -2);
99281
100411
  // eslint-disable-next-line no-param-reassign
99282
- value = JSON.stringify(value);
100412
+ value = stringifyWithDepthLimit(value, 1);
99283
100413
  } else if (
99284
100414
  (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(value) && isFlatArray(value)) ||
99285
100415
  ((_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFileList(value) || _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].endsWith(key, '[]')) && (arr = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toArray(value)))
@@ -99312,8 +100442,6 @@ function toFormData(obj, formData, options) {
99312
100442
  return false;
99313
100443
  }
99314
100444
 
99315
- const stack = [];
99316
-
99317
100445
  const exposedHelpers = Object.assign(predicates, {
99318
100446
  defaultVisitor,
99319
100447
  convertValue,
@@ -99323,12 +100451,7 @@ function toFormData(obj, formData, options) {
99323
100451
  function build(value, path, depth = 0) {
99324
100452
  if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(value)) return;
99325
100453
 
99326
- if (depth > maxDepth) {
99327
- throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"](
99328
- 'Object is too deeply nested (' + depth + ' levels). Max depth: ' + maxDepth,
99329
- _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].ERR_FORM_DATA_DEPTH_EXCEEDED
99330
- );
99331
- }
100454
+ throwIfMaxDepthExceeded(depth);
99332
100455
 
99333
100456
  if (stack.indexOf(value) !== -1) {
99334
100457
  throw new Error('Circular reference detected in ' + path.join('.'));
@@ -99803,6 +100926,57 @@ const { toString } = Object.prototype;
99803
100926
  const { getPrototypeOf } = Object;
99804
100927
  const { iterator, toStringTag } = Symbol;
99805
100928
 
100929
+ /* Creating a function that will check if an object has a property. */
100930
+ const hasOwnProperty = (
100931
+ ({ hasOwnProperty }) =>
100932
+ (obj, prop) =>
100933
+ hasOwnProperty.call(obj, prop)
100934
+ )(Object.prototype);
100935
+
100936
+ /**
100937
+ * Walk the prototype chain (excluding the shared Object.prototype) looking for
100938
+ * an own `prop`. This distinguishes genuine own/inherited members — including
100939
+ * class accessors and template prototypes — from members injected via
100940
+ * Object.prototype pollution (e.g. `Object.prototype.username = '...'`), which
100941
+ * live on Object.prototype itself and are therefore never matched.
100942
+ *
100943
+ * @param {*} thing The value whose chain to inspect
100944
+ * @param {string|symbol} prop The property key to look for
100945
+ *
100946
+ * @returns {boolean} True when `prop` is owned below Object.prototype
100947
+ */
100948
+ const hasOwnInPrototypeChain = (thing, prop) => {
100949
+ let obj = thing;
100950
+ const seen = [];
100951
+
100952
+ while (obj != null && obj !== Object.prototype) {
100953
+ if (seen.indexOf(obj) !== -1) {
100954
+ return false;
100955
+ }
100956
+ seen.push(obj);
100957
+
100958
+ if (hasOwnProperty(obj, prop)) {
100959
+ return true;
100960
+ }
100961
+ obj = getPrototypeOf(obj);
100962
+ }
100963
+ return false;
100964
+ };
100965
+
100966
+ /**
100967
+ * Read `obj[prop]` only when it is safe from Object.prototype pollution. Own
100968
+ * properties and members inherited from a non-Object.prototype source (a class
100969
+ * instance or template object) are honored; a value reachable only through a
100970
+ * polluted Object.prototype is ignored and `undefined` is returned.
100971
+ *
100972
+ * @param {*} obj The source object
100973
+ * @param {string|symbol} prop The property key to read
100974
+ *
100975
+ * @returns {*} The resolved value, or undefined when unsafe/absent
100976
+ */
100977
+ const getSafeProp = (obj, prop) =>
100978
+ obj != null && hasOwnInPrototypeChain(obj, prop) ? obj[prop] : undefined;
100979
+
99806
100980
  const kindOf = ((cache) => (thing) => {
99807
100981
  const str = toString.call(thing);
99808
100982
  return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
@@ -99928,7 +101102,7 @@ const isBoolean = (thing) => thing === true || thing === false;
99928
101102
  * @returns {boolean} True if value is a plain Object, otherwise false
99929
101103
  */
99930
101104
  const isPlainObject = (val) => {
99931
- if (kindOf(val) !== 'object') {
101105
+ if (!isObject(val)) {
99932
101106
  return false;
99933
101107
  }
99934
101108
 
@@ -99936,9 +101110,12 @@ const isPlainObject = (val) => {
99936
101110
  return (
99937
101111
  (prototype === null ||
99938
101112
  prototype === Object.prototype ||
99939
- Object.getPrototypeOf(prototype) === null) &&
99940
- !(toStringTag in val) &&
99941
- !(iterator in val)
101113
+ getPrototypeOf(prototype) === null) &&
101114
+ // Treat any genuine (non-Object.prototype-polluted) Symbol.toStringTag or
101115
+ // Symbol.iterator as evidence the value is a tagged/iterable type rather
101116
+ // than a plain object, while ignoring keys injected onto Object.prototype.
101117
+ !hasOwnInPrototypeChain(val, toStringTag) &&
101118
+ !hasOwnInPrototypeChain(val, iterator)
99942
101119
  );
99943
101120
  };
99944
101121
 
@@ -100465,13 +101642,6 @@ const toCamelCase = (str) => {
100465
101642
  });
100466
101643
  };
100467
101644
 
100468
- /* Creating a function that will check if an object has a property. */
100469
- const hasOwnProperty = (
100470
- ({ hasOwnProperty }) =>
100471
- (obj, prop) =>
100472
- hasOwnProperty.call(obj, prop)
100473
- )(Object.prototype);
100474
-
100475
101645
  const { propertyIsEnumerable } = Object.prototype;
100476
101646
 
100477
101647
  /**
@@ -100685,6 +101855,20 @@ const asap =
100685
101855
 
100686
101856
  const isIterable = (thing) => thing != null && isFunction(thing[iterator]);
100687
101857
 
101858
+ /**
101859
+ * Determine if a value is iterable via an iterator that is NOT sourced solely
101860
+ * from a polluted Object.prototype. Use this instead of `isIterable` whenever
101861
+ * the iterable comes from untrusted input (e.g. user-supplied header sources),
101862
+ * so `Object.prototype[Symbol.iterator] = ...` cannot turn an ordinary object
101863
+ * into an attacker-controlled entries iterator.
101864
+ *
101865
+ * @param {*} thing The value to test
101866
+ *
101867
+ * @returns {boolean} True if value has a non-polluted iterator
101868
+ */
101869
+ const isSafeIterable = (thing) =>
101870
+ thing != null && hasOwnInPrototypeChain(thing, iterator) && isIterable(thing);
101871
+
100688
101872
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
100689
101873
  isArray,
100690
101874
  isArrayBuffer,
@@ -100729,6 +101913,8 @@ const isIterable = (thing) => thing != null && isFunction(thing[iterator]);
100729
101913
  isHTMLForm,
100730
101914
  hasOwnProperty,
100731
101915
  hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection
101916
+ hasOwnInPrototypeChain,
101917
+ getSafeProp,
100732
101918
  reduceDescriptors,
100733
101919
  freezeMethods,
100734
101920
  toObjectSet,
@@ -100745,6 +101931,7 @@ const isIterable = (thing) => thing != null && isFunction(thing[iterator]);
100745
101931
  setImmediate: _setImmediate,
100746
101932
  asap,
100747
101933
  isIterable,
101934
+ isSafeIterable,
100748
101935
  });
100749
101936
 
100750
101937
 
@@ -100895,48 +102082,48 @@ var __webpack_exports__ = {};
100895
102082
  "use strict";
100896
102083
  __webpack_require__.r(__webpack_exports__);
100897
102084
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
100898
- /* harmony export */ BundleError: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_34__.BundleError),
100899
- /* harmony export */ BundleStrategy: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_34__.BundleStrategy),
100900
- /* harmony export */ DereferenceAncestorLineage: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_34__.DereferenceAncestorLineage),
100901
- /* harmony export */ DereferenceError: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_34__.DereferenceError),
100902
- /* harmony export */ DereferenceStrategy: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_34__.DereferenceStrategy),
100903
- /* harmony export */ EvaluationElementIdError: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_34__.EvaluationElementIdError),
100904
- /* harmony export */ EvaluationJsonSchema$anchorError: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_34__.EvaluationJsonSchema$anchorError),
100905
- /* harmony export */ EvaluationJsonSchemaUriError: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_34__.EvaluationJsonSchemaUriError),
100906
- /* harmony export */ File: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_34__.File),
100907
- /* harmony export */ HTTPResolver: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_34__.HTTPResolver),
100908
- /* harmony export */ InvalidJsonSchema$anchorError: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_34__.InvalidJsonSchema$anchorError),
100909
- /* harmony export */ JsonSchema$anchorError: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_34__.JsonSchema$anchorError),
100910
- /* harmony export */ JsonSchemaURIError: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_34__.JsonSchemaURIError),
100911
- /* harmony export */ MaximumBundleDepthError: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_34__.MaximumBundleDepthError),
100912
- /* harmony export */ MaximumDereferenceDepthError: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_34__.MaximumDereferenceDepthError),
100913
- /* harmony export */ MaximumResolveDepthError: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_34__.MaximumResolveDepthError),
100914
- /* harmony export */ ParseError: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_34__.ParseError),
100915
- /* harmony export */ Parser: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_34__.Parser),
100916
- /* harmony export */ ParserError: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_34__.ParserError),
100917
- /* harmony export */ PluginError: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_34__.PluginError),
100918
- /* harmony export */ Reference: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_34__.Reference),
100919
- /* harmony export */ ReferenceSet: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_34__.ReferenceSet),
100920
- /* harmony export */ ResolveError: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_34__.ResolveError),
100921
- /* harmony export */ ResolveStrategy: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_34__.ResolveStrategy),
100922
- /* harmony export */ Resolver: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_34__.Resolver),
100923
- /* harmony export */ ResolverError: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_34__.ResolverError),
100924
- /* harmony export */ UnmatchedBundleStrategyError: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_34__.UnmatchedBundleStrategyError),
100925
- /* harmony export */ UnmatchedDereferenceStrategyError: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_34__.UnmatchedDereferenceStrategyError),
100926
- /* harmony export */ UnmatchedParserError: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_34__.UnmatchedParserError),
100927
- /* harmony export */ UnmatchedResolveStrategyError: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_34__.UnmatchedResolveStrategyError),
100928
- /* harmony export */ UnmatchedResolverError: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_34__.UnmatchedResolverError),
100929
- /* harmony export */ UnresolvableReferenceError: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_34__.UnresolvableReferenceError),
100930
- /* harmony export */ bundle: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_34__.bundle),
100931
- /* harmony export */ dereference: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_34__.dereference),
100932
- /* harmony export */ dereferenceApiDOM: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_34__.dereferenceApiDOM),
100933
- /* harmony export */ mergeOptions: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_34__.mergeOptions),
100934
- /* harmony export */ options: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_34__.options),
100935
- /* harmony export */ parse: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_34__.parse),
100936
- /* harmony export */ readFile: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_34__.readFile),
100937
- /* harmony export */ resolve: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_34__.resolve),
100938
- /* harmony export */ resolveApiDOM: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_34__.resolveApiDOM),
100939
- /* harmony export */ url: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_34__.url)
102085
+ /* harmony export */ BundleError: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_35__.BundleError),
102086
+ /* harmony export */ BundleStrategy: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_35__.BundleStrategy),
102087
+ /* harmony export */ DereferenceAncestorLineage: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_35__.DereferenceAncestorLineage),
102088
+ /* harmony export */ DereferenceError: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_35__.DereferenceError),
102089
+ /* harmony export */ DereferenceStrategy: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_35__.DereferenceStrategy),
102090
+ /* harmony export */ EvaluationElementIdError: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_35__.EvaluationElementIdError),
102091
+ /* harmony export */ EvaluationJsonSchema$anchorError: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_35__.EvaluationJsonSchema$anchorError),
102092
+ /* harmony export */ EvaluationJsonSchemaUriError: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_35__.EvaluationJsonSchemaUriError),
102093
+ /* harmony export */ File: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_35__.File),
102094
+ /* harmony export */ HTTPResolver: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_35__.HTTPResolver),
102095
+ /* harmony export */ InvalidJsonSchema$anchorError: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_35__.InvalidJsonSchema$anchorError),
102096
+ /* harmony export */ JsonSchema$anchorError: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_35__.JsonSchema$anchorError),
102097
+ /* harmony export */ JsonSchemaURIError: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_35__.JsonSchemaURIError),
102098
+ /* harmony export */ MaximumBundleDepthError: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_35__.MaximumBundleDepthError),
102099
+ /* harmony export */ MaximumDereferenceDepthError: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_35__.MaximumDereferenceDepthError),
102100
+ /* harmony export */ MaximumResolveDepthError: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_35__.MaximumResolveDepthError),
102101
+ /* harmony export */ ParseError: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_35__.ParseError),
102102
+ /* harmony export */ Parser: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_35__.Parser),
102103
+ /* harmony export */ ParserError: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_35__.ParserError),
102104
+ /* harmony export */ PluginError: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_35__.PluginError),
102105
+ /* harmony export */ Reference: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_35__.Reference),
102106
+ /* harmony export */ ReferenceSet: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_35__.ReferenceSet),
102107
+ /* harmony export */ ResolveError: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_35__.ResolveError),
102108
+ /* harmony export */ ResolveStrategy: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_35__.ResolveStrategy),
102109
+ /* harmony export */ Resolver: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_35__.Resolver),
102110
+ /* harmony export */ ResolverError: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_35__.ResolverError),
102111
+ /* harmony export */ UnmatchedBundleStrategyError: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_35__.UnmatchedBundleStrategyError),
102112
+ /* harmony export */ UnmatchedDereferenceStrategyError: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_35__.UnmatchedDereferenceStrategyError),
102113
+ /* harmony export */ UnmatchedParserError: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_35__.UnmatchedParserError),
102114
+ /* harmony export */ UnmatchedResolveStrategyError: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_35__.UnmatchedResolveStrategyError),
102115
+ /* harmony export */ UnmatchedResolverError: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_35__.UnmatchedResolverError),
102116
+ /* harmony export */ UnresolvableReferenceError: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_35__.UnresolvableReferenceError),
102117
+ /* harmony export */ bundle: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_35__.bundle),
102118
+ /* harmony export */ dereference: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_35__.dereference),
102119
+ /* harmony export */ dereferenceApiDOM: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_35__.dereferenceApiDOM),
102120
+ /* harmony export */ mergeOptions: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_35__.mergeOptions),
102121
+ /* harmony export */ options: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_35__.options),
102122
+ /* harmony export */ parse: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_35__.parse),
102123
+ /* harmony export */ readFile: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_35__.readFile),
102124
+ /* harmony export */ resolve: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_35__.resolve),
102125
+ /* harmony export */ resolveApiDOM: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_35__.resolveApiDOM),
102126
+ /* harmony export */ url: () => (/* reexport safe */ _index_ts__WEBPACK_IMPORTED_MODULE_35__.url)
100940
102127
  /* harmony export */ });
100941
102128
  /* harmony import */ var _resolve_resolvers_file_index_node_ts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(50365);
100942
102129
  /* harmony import */ var _resolve_resolvers_http_axios_index_ts__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(16341);
@@ -100970,9 +102157,11 @@ __webpack_require__.r(__webpack_exports__);
100970
102157
  /* harmony import */ var _dereference_strategies_asyncapi_2_index_ts__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(12683);
100971
102158
  /* harmony import */ var _dereference_strategies_arazzo_1_index_ts__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(82941);
100972
102159
  /* harmony import */ var _dereference_strategies_overlay_1_index_ts__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(39782);
100973
- /* harmony import */ var _bundle_strategies_openapi_3_1_index_ts__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(16432);
100974
- /* harmony import */ var _index_ts__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(98363);
100975
- /* harmony import */ var _index_ts__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(33906);
102160
+ /* harmony import */ var _bundle_strategies_openapi_3_0_index_ts__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(12087);
102161
+ /* harmony import */ var _bundle_strategies_openapi_3_1_index_ts__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(16432);
102162
+ /* harmony import */ var _index_ts__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(98363);
102163
+ /* harmony import */ var _index_ts__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(33906);
102164
+
100976
102165
 
100977
102166
 
100978
102167
 
@@ -101007,7 +102196,7 @@ __webpack_require__.r(__webpack_exports__);
101007
102196
 
101008
102197
 
101009
102198
 
101010
- _index_ts__WEBPACK_IMPORTED_MODULE_33__["default"].parse.parsers = [new _parse_parsers_openapi_json_2_index_ts__WEBPACK_IMPORTED_MODULE_9__["default"]({
102199
+ _index_ts__WEBPACK_IMPORTED_MODULE_34__["default"].parse.parsers = [new _parse_parsers_openapi_json_2_index_ts__WEBPACK_IMPORTED_MODULE_9__["default"]({
101011
102200
  allowEmpty: true,
101012
102201
  sourceMap: false
101013
102202
  }), new _parse_parsers_openapi_yaml_2_index_ts__WEBPACK_IMPORTED_MODULE_10__["default"]({
@@ -101055,14 +102244,14 @@ _index_ts__WEBPACK_IMPORTED_MODULE_33__["default"].parse.parsers = [new _parse_p
101055
102244
  }), new _parse_parsers_binary_index_node_ts__WEBPACK_IMPORTED_MODULE_24__["default"]({
101056
102245
  allowEmpty: true
101057
102246
  })];
101058
- _index_ts__WEBPACK_IMPORTED_MODULE_33__["default"].resolve.resolvers = [new _resolve_resolvers_file_index_node_ts__WEBPACK_IMPORTED_MODULE_0__["default"](), new _resolve_resolvers_http_axios_index_ts__WEBPACK_IMPORTED_MODULE_1__["default"]({
102247
+ _index_ts__WEBPACK_IMPORTED_MODULE_34__["default"].resolve.resolvers = [new _resolve_resolvers_file_index_node_ts__WEBPACK_IMPORTED_MODULE_0__["default"](), new _resolve_resolvers_http_axios_index_ts__WEBPACK_IMPORTED_MODULE_1__["default"]({
101059
102248
  timeout: 5000,
101060
102249
  redirects: 5,
101061
102250
  withCredentials: false
101062
102251
  })];
101063
- _index_ts__WEBPACK_IMPORTED_MODULE_33__["default"].resolve.strategies = [new _resolve_strategies_openapi_2_index_ts__WEBPACK_IMPORTED_MODULE_2__["default"](), new _resolve_strategies_openapi_3_0_index_ts__WEBPACK_IMPORTED_MODULE_3__["default"](), new _resolve_strategies_openapi_3_1_index_ts__WEBPACK_IMPORTED_MODULE_4__["default"](), new _resolve_strategies_asyncapi_2_index_ts__WEBPACK_IMPORTED_MODULE_5__["default"](), new _resolve_strategies_arazzo_1_index_ts__WEBPACK_IMPORTED_MODULE_6__["default"](), new _resolve_strategies_overlay_1_index_ts__WEBPACK_IMPORTED_MODULE_7__["default"](), new _resolve_strategies_apidom_index_ts__WEBPACK_IMPORTED_MODULE_8__["default"]()];
101064
- _index_ts__WEBPACK_IMPORTED_MODULE_33__["default"].dereference.strategies = [new _dereference_strategies_openapi_2_index_ts__WEBPACK_IMPORTED_MODULE_26__["default"](), new _dereference_strategies_openapi_3_0_index_ts__WEBPACK_IMPORTED_MODULE_27__["default"](), new _dereference_strategies_openapi_3_1_index_ts__WEBPACK_IMPORTED_MODULE_28__["default"](), new _dereference_strategies_asyncapi_2_index_ts__WEBPACK_IMPORTED_MODULE_29__["default"](), new _dereference_strategies_arazzo_1_index_ts__WEBPACK_IMPORTED_MODULE_30__["default"](), new _dereference_strategies_overlay_1_index_ts__WEBPACK_IMPORTED_MODULE_31__["default"](), new _dereference_strategies_apidom_index_ts__WEBPACK_IMPORTED_MODULE_25__["default"]()];
101065
- _index_ts__WEBPACK_IMPORTED_MODULE_33__["default"].bundle.strategies = [new _bundle_strategies_openapi_3_1_index_ts__WEBPACK_IMPORTED_MODULE_32__["default"]()];
102252
+ _index_ts__WEBPACK_IMPORTED_MODULE_34__["default"].resolve.strategies = [new _resolve_strategies_openapi_2_index_ts__WEBPACK_IMPORTED_MODULE_2__["default"](), new _resolve_strategies_openapi_3_0_index_ts__WEBPACK_IMPORTED_MODULE_3__["default"](), new _resolve_strategies_openapi_3_1_index_ts__WEBPACK_IMPORTED_MODULE_4__["default"](), new _resolve_strategies_asyncapi_2_index_ts__WEBPACK_IMPORTED_MODULE_5__["default"](), new _resolve_strategies_arazzo_1_index_ts__WEBPACK_IMPORTED_MODULE_6__["default"](), new _resolve_strategies_overlay_1_index_ts__WEBPACK_IMPORTED_MODULE_7__["default"](), new _resolve_strategies_apidom_index_ts__WEBPACK_IMPORTED_MODULE_8__["default"]()];
102253
+ _index_ts__WEBPACK_IMPORTED_MODULE_34__["default"].dereference.strategies = [new _dereference_strategies_openapi_2_index_ts__WEBPACK_IMPORTED_MODULE_26__["default"](), new _dereference_strategies_openapi_3_0_index_ts__WEBPACK_IMPORTED_MODULE_27__["default"](), new _dereference_strategies_openapi_3_1_index_ts__WEBPACK_IMPORTED_MODULE_28__["default"](), new _dereference_strategies_asyncapi_2_index_ts__WEBPACK_IMPORTED_MODULE_29__["default"](), new _dereference_strategies_arazzo_1_index_ts__WEBPACK_IMPORTED_MODULE_30__["default"](), new _dereference_strategies_overlay_1_index_ts__WEBPACK_IMPORTED_MODULE_31__["default"](), new _dereference_strategies_apidom_index_ts__WEBPACK_IMPORTED_MODULE_25__["default"]()];
102254
+ _index_ts__WEBPACK_IMPORTED_MODULE_34__["default"].bundle.strategies = [new _bundle_strategies_openapi_3_0_index_ts__WEBPACK_IMPORTED_MODULE_32__["default"](), new _bundle_strategies_openapi_3_1_index_ts__WEBPACK_IMPORTED_MODULE_33__["default"]()];
101066
102255
 
101067
102256
  })();
101068
102257