@jentic/arazzo-parser 1.0.0-alpha.30 → 1.0.0-alpha.31

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.
@@ -1674,13 +1674,14 @@ const dispatchPluginsSync = (element, plugins, options = {}) => {
1674
1674
  const mergedOptions = (0,ramda__WEBPACK_IMPORTED_MODULE_1__["default"])(defaultDispatchPluginsOptions, options);
1675
1675
  const {
1676
1676
  toolboxCreator,
1677
- visitorOptions
1677
+ visitorOptions,
1678
+ traverseOptions
1678
1679
  } = mergedOptions;
1679
1680
  const toolbox = toolboxCreator();
1680
1681
  const pluginsSpecs = plugins.map(plugin => plugin(toolbox));
1681
1682
  const mergedPluginsVisitor = (0,_speclynx_apidom_traverse__WEBPACK_IMPORTED_MODULE_0__.mergeVisitors)(pluginsSpecs.map((0,ramda__WEBPACK_IMPORTED_MODULE_2__["default"])({}, 'visitor')), visitorOptions);
1682
1683
  pluginsSpecs.forEach((0,ramda_adjunct__WEBPACK_IMPORTED_MODULE_3__["default"])(['pre'], []));
1683
- const newElement = (0,_speclynx_apidom_traverse__WEBPACK_IMPORTED_MODULE_0__.traverse)(element, mergedPluginsVisitor);
1684
+ const newElement = (0,_speclynx_apidom_traverse__WEBPACK_IMPORTED_MODULE_0__.traverse)(element, mergedPluginsVisitor, traverseOptions);
1684
1685
  pluginsSpecs.forEach((0,ramda_adjunct__WEBPACK_IMPORTED_MODULE_3__["default"])(['post'], []));
1685
1686
  return newElement;
1686
1687
  };
@@ -1689,13 +1690,14 @@ const dispatchPluginsAsync = async (element, plugins, options = {}) => {
1689
1690
  const mergedOptions = (0,ramda__WEBPACK_IMPORTED_MODULE_1__["default"])(defaultDispatchPluginsOptions, options);
1690
1691
  const {
1691
1692
  toolboxCreator,
1692
- visitorOptions
1693
+ visitorOptions,
1694
+ traverseOptions
1693
1695
  } = mergedOptions;
1694
1696
  const toolbox = toolboxCreator();
1695
1697
  const pluginsSpecs = plugins.map(plugin => plugin(toolbox));
1696
1698
  const mergedPluginsVisitor = (0,_speclynx_apidom_traverse__WEBPACK_IMPORTED_MODULE_0__.mergeVisitorsAsync)(pluginsSpecs.map((0,ramda__WEBPACK_IMPORTED_MODULE_2__["default"])({}, 'visitor')), visitorOptions);
1697
1699
  await Promise.allSettled(pluginsSpecs.map((0,ramda_adjunct__WEBPACK_IMPORTED_MODULE_3__["default"])(['pre'], [])));
1698
- const newElement = await (0,_speclynx_apidom_traverse__WEBPACK_IMPORTED_MODULE_0__.traverseAsync)(element, mergedPluginsVisitor);
1700
+ const newElement = await (0,_speclynx_apidom_traverse__WEBPACK_IMPORTED_MODULE_0__.traverseAsync)(element, mergedPluginsVisitor, traverseOptions);
1699
1701
  await Promise.allSettled(pluginsSpecs.map((0,ramda_adjunct__WEBPACK_IMPORTED_MODULE_3__["default"])(['post'], [])));
1700
1702
  return newElement;
1701
1703
  };
@@ -38696,10 +38698,12 @@ function* traverseGenerator(root, visitor, options) {
38696
38698
  nodePredicate,
38697
38699
  nodeCloneFn,
38698
38700
  detectCycles,
38701
+ skipVisited,
38699
38702
  mutable,
38700
38703
  mutationFn
38701
38704
  } = options;
38702
38705
  const keyMapIsFunction = typeof keyMap === 'function';
38706
+ const visitedNodes = skipVisited ? new WeakSet() : null;
38703
38707
  let stack;
38704
38708
  let inArray = Array.isArray(root);
38705
38709
  let keys = [root];
@@ -38785,6 +38789,14 @@ function* traverseGenerator(root, visitor, options) {
38785
38789
  continue;
38786
38790
  }
38787
38791
 
38792
+ // Skip already-visited nodes (handles DAG structures from cloneShallow)
38793
+ if (skipVisited && !isLeaving) {
38794
+ if (visitedNodes.has(node)) {
38795
+ continue;
38796
+ }
38797
+ visitedNodes.add(node);
38798
+ }
38799
+
38788
38800
  // Always create Path for the current node (needed for parentPath chain)
38789
38801
  currentPath = new _Path_mjs__WEBPACK_IMPORTED_MODULE_2__.Path(node, parent, parentPath, key, inArray);
38790
38802
  const visitFn = (0,_visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.getVisitFn)(visitor, nodeTypeGetter(node), isLeaving);
@@ -38805,11 +38817,6 @@ function* traverseGenerator(root, visitor, options) {
38805
38817
  if (currentPath.shouldStop) {
38806
38818
  break;
38807
38819
  }
38808
- if (currentPath.shouldSkip) {
38809
- if (!isLeaving) {
38810
- continue;
38811
- }
38812
- }
38813
38820
  if (currentPath.removed) {
38814
38821
  edits.push([key, null]);
38815
38822
  if (!isLeaving) {
@@ -38819,12 +38826,19 @@ function* traverseGenerator(root, visitor, options) {
38819
38826
  const replacement = currentPath._getReplacementNode();
38820
38827
  edits.push([key, replacement]);
38821
38828
  if (!isLeaving) {
38829
+ if (currentPath.shouldSkip) {
38830
+ continue;
38831
+ }
38822
38832
  if (nodePredicate(replacement)) {
38823
38833
  node = replacement;
38824
38834
  } else {
38825
38835
  continue;
38826
38836
  }
38827
38837
  }
38838
+ } else if (currentPath.shouldSkip) {
38839
+ if (!isLeaving) {
38840
+ continue;
38841
+ }
38828
38842
  } else if (result !== undefined) {
38829
38843
  // Support return value replacement for backwards compatibility
38830
38844
  edits.push([key, result]);
@@ -38926,6 +38940,7 @@ const traverse = (root, visitor, options = {}) => {
38926
38940
  nodePredicate: options.nodePredicate ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.isNode,
38927
38941
  nodeCloneFn: options.nodeCloneFn ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.cloneNode,
38928
38942
  detectCycles: options.detectCycles ?? true,
38943
+ skipVisited: options.skipVisited ?? false,
38929
38944
  mutable: options.mutable ?? false,
38930
38945
  mutationFn: options.mutationFn ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.mutateNode
38931
38946
  };
@@ -38957,6 +38972,7 @@ const traverseAsync = async (root, visitor, options = {}) => {
38957
38972
  nodePredicate: options.nodePredicate ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.isNode,
38958
38973
  nodeCloneFn: options.nodeCloneFn ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.cloneNode,
38959
38974
  detectCycles: options.detectCycles ?? true,
38975
+ skipVisited: options.skipVisited ?? false,
38960
38976
  mutable: options.mutable ?? false,
38961
38977
  mutationFn: options.mutationFn ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.mutateNode
38962
38978
  };
@@ -48706,11 +48722,13 @@ const knownAdapters = {
48706
48722
  _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(knownAdapters, (fn, value) => {
48707
48723
  if (fn) {
48708
48724
  try {
48709
- Object.defineProperty(fn, 'name', { value });
48725
+ // Null-proto descriptors so a polluted Object.prototype.get cannot turn
48726
+ // these data descriptors into accessor descriptors on the way in.
48727
+ Object.defineProperty(fn, 'name', { __proto__: null, value });
48710
48728
  } catch (e) {
48711
48729
  // eslint-disable-next-line no-empty
48712
48730
  }
48713
- Object.defineProperty(fn, 'adapterName', { value });
48731
+ Object.defineProperty(fn, 'adapterName', { __proto__: null, value });
48714
48732
  }
48715
48733
  });
48716
48734
 
@@ -48831,6 +48849,9 @@ __webpack_require__.r(__webpack_exports__);
48831
48849
  /* harmony import */ var _helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(79194);
48832
48850
  /* harmony import */ var _helpers_resolveConfig_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(28451);
48833
48851
  /* harmony import */ var _core_settle_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(40788);
48852
+ /* harmony import */ var _helpers_estimateDataURLDecodedBytes_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(879);
48853
+ /* harmony import */ var _env_data_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(18679);
48854
+ /* harmony import */ var _helpers_sanitizeHeaderValue_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(51306);
48834
48855
 
48835
48856
 
48836
48857
 
@@ -48841,16 +48862,12 @@ __webpack_require__.r(__webpack_exports__);
48841
48862
 
48842
48863
 
48843
48864
 
48844
- const DEFAULT_CHUNK_SIZE = 64 * 1024;
48845
48865
 
48846
- const { isFunction } = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"];
48847
48866
 
48848
- const globalFetchAPI = (({ Request, Response }) => ({
48849
- Request,
48850
- Response,
48851
- }))(_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].global);
48852
48867
 
48853
- const { ReadableStream, TextEncoder } = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].global;
48868
+ const DEFAULT_CHUNK_SIZE = 64 * 1024;
48869
+
48870
+ const { isFunction } = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"];
48854
48871
 
48855
48872
  const test = (fn, ...args) => {
48856
48873
  try {
@@ -48861,11 +48878,20 @@ const test = (fn, ...args) => {
48861
48878
  };
48862
48879
 
48863
48880
  const factory = (env) => {
48881
+ const globalObject =
48882
+ _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].global !== undefined && _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].global !== null
48883
+ ? _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].global
48884
+ : globalThis;
48885
+ const { ReadableStream, TextEncoder } = globalObject;
48886
+
48864
48887
  env = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].merge.call(
48865
48888
  {
48866
48889
  skipUndefined: true,
48867
48890
  },
48868
- globalFetchAPI,
48891
+ {
48892
+ Request: globalObject.Request,
48893
+ Response: globalObject.Response,
48894
+ },
48869
48895
  env
48870
48896
  );
48871
48897
 
@@ -48895,18 +48921,20 @@ const factory = (env) => {
48895
48921
  test(() => {
48896
48922
  let duplexAccessed = false;
48897
48923
 
48898
- const body = new ReadableStream();
48899
-
48900
- const hasContentType = new Request(_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].origin, {
48901
- body,
48924
+ const request = new Request(_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].origin, {
48925
+ body: new ReadableStream(),
48902
48926
  method: 'POST',
48903
48927
  get duplex() {
48904
48928
  duplexAccessed = true;
48905
48929
  return 'half';
48906
48930
  },
48907
- }).headers.has('Content-Type');
48931
+ });
48908
48932
 
48909
- body.cancel();
48933
+ const hasContentType = request.headers.has('Content-Type');
48934
+
48935
+ if (request.body != null) {
48936
+ request.body.cancel();
48937
+ }
48910
48938
 
48911
48939
  return duplexAccessed && !hasContentType;
48912
48940
  });
@@ -48990,8 +49018,13 @@ const factory = (env) => {
48990
49018
  headers,
48991
49019
  withCredentials = 'same-origin',
48992
49020
  fetchOptions,
49021
+ maxContentLength,
49022
+ maxBodyLength,
48993
49023
  } = (0,_helpers_resolveConfig_js__WEBPACK_IMPORTED_MODULE_7__["default"])(config);
48994
49024
 
49025
+ const hasMaxContentLength = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isNumber(maxContentLength) && maxContentLength > -1;
49026
+ const hasMaxBodyLength = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isNumber(maxBodyLength) && maxBodyLength > -1;
49027
+
48995
49028
  let _fetch = envFetch || fetch;
48996
49029
 
48997
49030
  responseType = responseType ? (responseType + '').toLowerCase() : 'text';
@@ -49013,6 +49046,41 @@ const factory = (env) => {
49013
49046
  let requestContentLength;
49014
49047
 
49015
49048
  try {
49049
+ // Enforce maxContentLength for data: URLs up-front so we never materialize
49050
+ // an oversized payload. The HTTP adapter applies the same check (see http.js
49051
+ // "if (protocol === 'data:')" branch).
49052
+ if (hasMaxContentLength && typeof url === 'string' && url.startsWith('data:')) {
49053
+ const estimated = (0,_helpers_estimateDataURLDecodedBytes_js__WEBPACK_IMPORTED_MODULE_9__["default"])(url);
49054
+ if (estimated > maxContentLength) {
49055
+ throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"](
49056
+ 'maxContentLength size of ' + maxContentLength + ' exceeded',
49057
+ _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"].ERR_BAD_RESPONSE,
49058
+ config,
49059
+ request
49060
+ );
49061
+ }
49062
+ }
49063
+
49064
+ // Enforce maxBodyLength against the outbound request body before dispatch.
49065
+ // Mirrors http.js behavior (ERR_BAD_REQUEST / 'Request body larger than
49066
+ // maxBodyLength limit'). Skip when the body length cannot be determined
49067
+ // (e.g. a live ReadableStream supplied by the caller).
49068
+ if (hasMaxBodyLength && method !== 'get' && method !== 'head') {
49069
+ const outboundLength = await resolveBodyLength(headers, data);
49070
+ if (
49071
+ typeof outboundLength === 'number' &&
49072
+ isFinite(outboundLength) &&
49073
+ outboundLength > maxBodyLength
49074
+ ) {
49075
+ throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"](
49076
+ 'Request body larger than maxBodyLength limit',
49077
+ _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"].ERR_BAD_REQUEST,
49078
+ config,
49079
+ request
49080
+ );
49081
+ }
49082
+ }
49083
+
49016
49084
  if (
49017
49085
  onUploadProgress &&
49018
49086
  supportsRequestStream &&
@@ -49050,11 +49118,27 @@ const factory = (env) => {
49050
49118
  // see https://github.com/cloudflare/workerd/issues/902
49051
49119
  const isCredentialsSupported = isRequestSupported && 'credentials' in Request.prototype;
49052
49120
 
49121
+ // If data is FormData and Content-Type is multipart/form-data without boundary,
49122
+ // delete it so fetch can set it correctly with the boundary
49123
+ if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isFormData(data)) {
49124
+ const contentType = headers.getContentType();
49125
+ if (
49126
+ contentType &&
49127
+ /^multipart\/form-data/i.test(contentType) &&
49128
+ !/boundary=/i.test(contentType)
49129
+ ) {
49130
+ headers.delete('content-type');
49131
+ }
49132
+ }
49133
+
49134
+ // Set User-Agent header if not already set (fetch defaults to 'node' in Node.js)
49135
+ headers.set('User-Agent', 'axios/' + _env_data_js__WEBPACK_IMPORTED_MODULE_10__.VERSION, false);
49136
+
49053
49137
  const resolvedOptions = {
49054
49138
  ...fetchOptions,
49055
49139
  signal: composedSignal,
49056
49140
  method: method.toUpperCase(),
49057
- headers: headers.normalize().toJSON(),
49141
+ headers: (0,_helpers_sanitizeHeaderValue_js__WEBPACK_IMPORTED_MODULE_11__.toByteStringHeaderObject)(headers.normalize()),
49058
49142
  body: data,
49059
49143
  duplex: 'half',
49060
49144
  credentials: isCredentialsSupported ? withCredentials : undefined,
@@ -49066,10 +49150,28 @@ const factory = (env) => {
49066
49150
  ? _fetch(request, fetchOptions)
49067
49151
  : _fetch(url, resolvedOptions));
49068
49152
 
49153
+ // Cheap pre-check: if the server honestly declares a content-length that
49154
+ // already exceeds the cap, reject before we start streaming.
49155
+ if (hasMaxContentLength) {
49156
+ const declaredLength = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].toFiniteNumber(response.headers.get('content-length'));
49157
+ if (declaredLength != null && declaredLength > maxContentLength) {
49158
+ throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"](
49159
+ 'maxContentLength size of ' + maxContentLength + ' exceeded',
49160
+ _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"].ERR_BAD_RESPONSE,
49161
+ config,
49162
+ request
49163
+ );
49164
+ }
49165
+ }
49166
+
49069
49167
  const isStreamResponse =
49070
49168
  supportsResponseStream && (responseType === 'stream' || responseType === 'response');
49071
49169
 
49072
- if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) {
49170
+ if (
49171
+ supportsResponseStream &&
49172
+ response.body &&
49173
+ (onDownloadProgress || hasMaxContentLength || (isStreamResponse && unsubscribe))
49174
+ ) {
49073
49175
  const options = {};
49074
49176
 
49075
49177
  ['status', 'statusText', 'headers'].forEach((prop) => {
@@ -49086,8 +49188,24 @@ const factory = (env) => {
49086
49188
  )) ||
49087
49189
  [];
49088
49190
 
49191
+ let bytesRead = 0;
49192
+ const onChunkProgress = (loadedBytes) => {
49193
+ if (hasMaxContentLength) {
49194
+ bytesRead = loadedBytes;
49195
+ if (bytesRead > maxContentLength) {
49196
+ throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"](
49197
+ 'maxContentLength size of ' + maxContentLength + ' exceeded',
49198
+ _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"].ERR_BAD_RESPONSE,
49199
+ config,
49200
+ request
49201
+ );
49202
+ }
49203
+ }
49204
+ onProgress && onProgress(loadedBytes);
49205
+ };
49206
+
49089
49207
  response = new Response(
49090
- (0,_helpers_trackStream_js__WEBPACK_IMPORTED_MODULE_4__.trackStream)(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
49208
+ (0,_helpers_trackStream_js__WEBPACK_IMPORTED_MODULE_4__.trackStream)(response.body, DEFAULT_CHUNK_SIZE, onChunkProgress, () => {
49091
49209
  flush && flush();
49092
49210
  unsubscribe && unsubscribe();
49093
49211
  }),
@@ -49102,6 +49220,33 @@ const factory = (env) => {
49102
49220
  config
49103
49221
  );
49104
49222
 
49223
+ // Fallback enforcement for environments without ReadableStream support
49224
+ // (legacy runtimes). Detect materialized size from typed output; skip
49225
+ // streams/Response passthrough since the user will read those themselves.
49226
+ if (hasMaxContentLength && !supportsResponseStream && !isStreamResponse) {
49227
+ let materializedSize;
49228
+ if (responseData != null) {
49229
+ if (typeof responseData.byteLength === 'number') {
49230
+ materializedSize = responseData.byteLength;
49231
+ } else if (typeof responseData.size === 'number') {
49232
+ materializedSize = responseData.size;
49233
+ } else if (typeof responseData === 'string') {
49234
+ materializedSize =
49235
+ typeof TextEncoder === 'function'
49236
+ ? new TextEncoder().encode(responseData).byteLength
49237
+ : responseData.length;
49238
+ }
49239
+ }
49240
+ if (typeof materializedSize === 'number' && materializedSize > maxContentLength) {
49241
+ throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"](
49242
+ 'maxContentLength size of ' + maxContentLength + ' exceeded',
49243
+ _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"].ERR_BAD_RESPONSE,
49244
+ config,
49245
+ request
49246
+ );
49247
+ }
49248
+ }
49249
+
49105
49250
  !isStreamResponse && unsubscribe && unsubscribe();
49106
49251
 
49107
49252
  return await new Promise((resolve, reject) => {
@@ -49117,6 +49262,17 @@ const factory = (env) => {
49117
49262
  } catch (err) {
49118
49263
  unsubscribe && unsubscribe();
49119
49264
 
49265
+ // Safari can surface fetch aborts as a DOMException-like object whose
49266
+ // branded getters throw. Prefer our composed signal reason before reading
49267
+ // the caught error, preserving timeout vs cancellation semantics.
49268
+ if (composedSignal && composedSignal.aborted && composedSignal.reason instanceof _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"]) {
49269
+ const canceledError = composedSignal.reason;
49270
+ canceledError.config = config;
49271
+ request && (canceledError.request = request);
49272
+ err !== canceledError && (canceledError.cause = err);
49273
+ throw canceledError;
49274
+ }
49275
+
49120
49276
  if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) {
49121
49277
  throw Object.assign(
49122
49278
  new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"](
@@ -49187,6 +49343,8 @@ __webpack_require__.r(__webpack_exports__);
49187
49343
  /* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(76487);
49188
49344
  /* harmony import */ var _helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(79194);
49189
49345
  /* harmony import */ var _helpers_resolveConfig_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(28451);
49346
+ /* harmony import */ var _helpers_sanitizeHeaderValue_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(51306);
49347
+
49190
49348
 
49191
49349
 
49192
49350
 
@@ -49280,7 +49438,7 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
49280
49438
  // will return status as 0 even though it's a successful request
49281
49439
  if (
49282
49440
  request.status === 0 &&
49283
- !(request.responseURL && request.responseURL.indexOf('file:') === 0)
49441
+ !(request.responseURL && request.responseURL.startsWith('file:'))
49284
49442
  ) {
49285
49443
  return;
49286
49444
  }
@@ -49297,6 +49455,7 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
49297
49455
  }
49298
49456
 
49299
49457
  reject(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"]('Request aborted', _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"].ECONNABORTED, config, request));
49458
+ done();
49300
49459
 
49301
49460
  // Clean up request
49302
49461
  request = null;
@@ -49312,6 +49471,7 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
49312
49471
  // attach the underlying event for consumers who want details
49313
49472
  err.event = event || null;
49314
49473
  reject(err);
49474
+ done();
49315
49475
  request = null;
49316
49476
  };
49317
49477
 
@@ -49332,6 +49492,7 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
49332
49492
  request
49333
49493
  )
49334
49494
  );
49495
+ done();
49335
49496
 
49336
49497
  // Clean up request
49337
49498
  request = null;
@@ -49342,7 +49503,7 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
49342
49503
 
49343
49504
  // Add headers to the request
49344
49505
  if ('setRequestHeader' in request) {
49345
- _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
49506
+ _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach((0,_helpers_sanitizeHeaderValue_js__WEBPACK_IMPORTED_MODULE_10__.toByteStringHeaderObject)(requestHeaders), function setRequestHeader(val, key) {
49346
49507
  request.setRequestHeader(key, val);
49347
49508
  });
49348
49509
  }
@@ -49381,6 +49542,7 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
49381
49542
  }
49382
49543
  reject(!cancel || cancel.type ? new _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_4__["default"](null, config, request) : cancel);
49383
49544
  request.abort();
49545
+ done();
49384
49546
  request = null;
49385
49547
  };
49386
49548
 
@@ -49394,7 +49556,7 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
49394
49556
 
49395
49557
  const protocol = (0,_helpers_parseProtocol_js__WEBPACK_IMPORTED_MODULE_5__["default"])(_config.url);
49396
49558
 
49397
- if (protocol && _platform_index_js__WEBPACK_IMPORTED_MODULE_6__["default"].protocols.indexOf(protocol) === -1) {
49559
+ if (protocol && !_platform_index_js__WEBPACK_IMPORTED_MODULE_6__["default"].protocols.includes(protocol)) {
49398
49560
  reject(
49399
49561
  new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"](
49400
49562
  'Unsupported protocol ' + protocol + ':',
@@ -49796,13 +49958,29 @@ class Axios {
49796
49958
  Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error());
49797
49959
 
49798
49960
  // slice off the Error: ... line
49799
- const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, '') : '';
49961
+ const stack = (() => {
49962
+ if (!dummy.stack) {
49963
+ return '';
49964
+ }
49965
+
49966
+ const firstNewlineIndex = dummy.stack.indexOf('\n');
49967
+
49968
+ return firstNewlineIndex === -1 ? '' : dummy.stack.slice(firstNewlineIndex + 1);
49969
+ })();
49800
49970
  try {
49801
49971
  if (!err.stack) {
49802
49972
  err.stack = stack;
49803
49973
  // match without the 2 top stack lines
49804
- } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ''))) {
49805
- err.stack += '\n' + stack;
49974
+ } else if (stack) {
49975
+ const firstNewlineIndex = stack.indexOf('\n');
49976
+ const secondNewlineIndex =
49977
+ firstNewlineIndex === -1 ? -1 : stack.indexOf('\n', firstNewlineIndex + 1);
49978
+ const stackWithoutTwoTopLines =
49979
+ secondNewlineIndex === -1 ? '' : stack.slice(secondNewlineIndex + 1);
49980
+
49981
+ if (!String(err.stack).endsWith(stackWithoutTwoTopLines)) {
49982
+ err.stack += '\n' + stack;
49983
+ }
49806
49984
  }
49807
49985
  } catch (e) {
49808
49986
  // ignore the case where "stack" is an un-writable property
@@ -49882,7 +50060,7 @@ class Axios {
49882
50060
  let contextHeaders = headers && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].merge(headers.common, headers[config.method]);
49883
50061
 
49884
50062
  headers &&
49885
- _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], (method) => {
50063
+ _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'query', 'common'], (method) => {
49886
50064
  delete headers[method];
49887
50065
  });
49888
50066
 
@@ -49985,7 +50163,7 @@ _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(['delete', 'get', 'hea
49985
50163
  };
49986
50164
  });
49987
50165
 
49988
- _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
50166
+ _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(['post', 'put', 'patch', 'query'], function forEachMethodWithData(method) {
49989
50167
  function generateHTTPMethod(isForm) {
49990
50168
  return function httpMethod(url, data, config) {
49991
50169
  return this.request(
@@ -50005,7 +50183,11 @@ _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(['post', 'put', 'patch
50005
50183
 
50006
50184
  Axios.prototype[method] = generateHTTPMethod();
50007
50185
 
50008
- Axios.prototype[method + 'Form'] = generateHTTPMethod(true);
50186
+ // QUERY is a safe/idempotent read method; multipart form bodies don't fit
50187
+ // its semantics, so no queryForm shorthand is generated.
50188
+ if (method !== 'query') {
50189
+ Axios.prototype[method + 'Form'] = generateHTTPMethod(true);
50190
+ }
50009
50191
  });
50010
50192
 
50011
50193
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Axios);
@@ -50022,9 +50204,80 @@ __webpack_require__.r(__webpack_exports__);
50022
50204
  /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
50023
50205
  /* harmony export */ });
50024
50206
  /* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(68750);
50207
+ /* harmony import */ var _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(76487);
50208
+
50209
+
50025
50210
 
50026
50211
 
50027
50212
 
50213
+ const REDACTED = '[REDACTED ****]';
50214
+
50215
+ function hasOwnOrPrototypeToJSON(source) {
50216
+ if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(source, 'toJSON')) {
50217
+ return true;
50218
+ }
50219
+
50220
+ let prototype = Object.getPrototypeOf(source);
50221
+
50222
+ while (prototype && prototype !== Object.prototype) {
50223
+ if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(prototype, 'toJSON')) {
50224
+ return true;
50225
+ }
50226
+
50227
+ prototype = Object.getPrototypeOf(prototype);
50228
+ }
50229
+
50230
+ return false;
50231
+ }
50232
+
50233
+ // Build a plain-object snapshot of `config` and replace the value of any key
50234
+ // (case-insensitive) listed in `redactKeys` with REDACTED. Walks through arrays
50235
+ // and AxiosHeaders, and short-circuits on circular references.
50236
+ function redactConfig(config, redactKeys) {
50237
+ const lowerKeys = new Set(redactKeys.map((k) => String(k).toLowerCase()));
50238
+ const seen = [];
50239
+
50240
+ const visit = (source) => {
50241
+ if (source === null || typeof source !== 'object') return source;
50242
+ if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isBuffer(source)) return source;
50243
+ if (seen.indexOf(source) !== -1) return undefined;
50244
+
50245
+ if (source instanceof _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"]) {
50246
+ source = source.toJSON();
50247
+ }
50248
+
50249
+ seen.push(source);
50250
+
50251
+ let result;
50252
+ if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(source)) {
50253
+ result = [];
50254
+ source.forEach((v, i) => {
50255
+ const reducedValue = visit(v);
50256
+ if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(reducedValue)) {
50257
+ result[i] = reducedValue;
50258
+ }
50259
+ });
50260
+ } else {
50261
+ if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(source) && hasOwnOrPrototypeToJSON(source)) {
50262
+ seen.pop();
50263
+ return source;
50264
+ }
50265
+
50266
+ result = Object.create(null);
50267
+ for (const [key, value] of Object.entries(source)) {
50268
+ const reducedValue = lowerKeys.has(key.toLowerCase()) ? REDACTED : visit(value);
50269
+ if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(reducedValue)) {
50270
+ result[key] = reducedValue;
50271
+ }
50272
+ }
50273
+ }
50274
+
50275
+ seen.pop();
50276
+ return result;
50277
+ };
50278
+
50279
+ return visit(config);
50280
+ }
50028
50281
 
50029
50282
  class AxiosError extends Error {
50030
50283
  static from(error, code, config, request, response, customProps) {
@@ -50041,42 +50294,56 @@ class AxiosError extends Error {
50041
50294
  return axiosError;
50042
50295
  }
50043
50296
 
50044
- /**
50045
- * Create an Error with the specified message, config, error code, request and response.
50046
- *
50047
- * @param {string} message The error message.
50048
- * @param {string} [code] The error code (for example, 'ECONNABORTED').
50049
- * @param {Object} [config] The config.
50050
- * @param {Object} [request] The request.
50051
- * @param {Object} [response] The response.
50052
- *
50053
- * @returns {Error} The created error.
50054
- */
50055
- constructor(message, code, config, request, response) {
50056
- super(message);
50057
-
50058
- // Make message enumerable to maintain backward compatibility
50059
- // The native Error constructor sets message as non-enumerable,
50060
- // but axios < v1.13.3 had it as enumerable
50061
- Object.defineProperty(this, 'message', {
50062
- value: message,
50063
- enumerable: true,
50064
- writable: true,
50065
- configurable: true
50066
- });
50067
-
50068
- this.name = 'AxiosError';
50069
- this.isAxiosError = true;
50070
- code && (this.code = code);
50071
- config && (this.config = config);
50072
- request && (this.request = request);
50073
- if (response) {
50074
- this.response = response;
50075
- this.status = response.status;
50076
- }
50297
+ /**
50298
+ * Create an Error with the specified message, config, error code, request and response.
50299
+ *
50300
+ * @param {string} message The error message.
50301
+ * @param {string} [code] The error code (for example, 'ECONNABORTED').
50302
+ * @param {Object} [config] The config.
50303
+ * @param {Object} [request] The request.
50304
+ * @param {Object} [response] The response.
50305
+ *
50306
+ * @returns {Error} The created error.
50307
+ */
50308
+ constructor(message, code, config, request, response) {
50309
+ super(message);
50310
+
50311
+ // Make message enumerable to maintain backward compatibility
50312
+ // The native Error constructor sets message as non-enumerable,
50313
+ // but axios < v1.13.3 had it as enumerable
50314
+ Object.defineProperty(this, 'message', {
50315
+ // Null-proto descriptor so a polluted Object.prototype.get cannot turn
50316
+ // this data descriptor into an accessor descriptor on the way in.
50317
+ __proto__: null,
50318
+ value: message,
50319
+ enumerable: true,
50320
+ writable: true,
50321
+ configurable: true,
50322
+ });
50323
+
50324
+ this.name = 'AxiosError';
50325
+ this.isAxiosError = true;
50326
+ code && (this.code = code);
50327
+ config && (this.config = config);
50328
+ request && (this.request = request);
50329
+ if (response) {
50330
+ this.response = response;
50331
+ this.status = response.status;
50077
50332
  }
50333
+ }
50078
50334
 
50079
50335
  toJSON() {
50336
+ // Opt-in redaction: when the request config carries a `redact` array, the
50337
+ // value of any matching key (case-insensitive, at any depth) is replaced
50338
+ // with REDACTED in the serialized snapshot. Undefined or empty leaves the
50339
+ // existing serialization behavior unchanged.
50340
+ const config = this.config;
50341
+ const redactKeys = config && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(config, 'redact') ? config.redact : undefined;
50342
+ const serializedConfig =
50343
+ _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(redactKeys) && redactKeys.length > 0
50344
+ ? redactConfig(config, redactKeys)
50345
+ : _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toJSONObject(config);
50346
+
50080
50347
  return {
50081
50348
  // Standard
50082
50349
  message: this.message,
@@ -50090,7 +50357,7 @@ class AxiosError extends Error {
50090
50357
  columnNumber: this.columnNumber,
50091
50358
  stack: this.stack,
50092
50359
  // Axios
50093
- config: _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toJSONObject(this.config),
50360
+ config: serializedConfig,
50094
50361
  code: this.code,
50095
50362
  status: this.status,
50096
50363
  };
@@ -50102,6 +50369,7 @@ AxiosError.ERR_BAD_OPTION_VALUE = 'ERR_BAD_OPTION_VALUE';
50102
50369
  AxiosError.ERR_BAD_OPTION = 'ERR_BAD_OPTION';
50103
50370
  AxiosError.ECONNABORTED = 'ECONNABORTED';
50104
50371
  AxiosError.ETIMEDOUT = 'ETIMEDOUT';
50372
+ AxiosError.ECONNREFUSED = 'ECONNREFUSED';
50105
50373
  AxiosError.ERR_NETWORK = 'ERR_NETWORK';
50106
50374
  AxiosError.ERR_FR_TOO_MANY_REDIRECTS = 'ERR_FR_TOO_MANY_REDIRECTS';
50107
50375
  AxiosError.ERR_DEPRECATED = 'ERR_DEPRECATED';
@@ -50110,6 +50378,7 @@ AxiosError.ERR_BAD_REQUEST = 'ERR_BAD_REQUEST';
50110
50378
  AxiosError.ERR_CANCELED = 'ERR_CANCELED';
50111
50379
  AxiosError.ERR_NOT_SUPPORT = 'ERR_NOT_SUPPORT';
50112
50380
  AxiosError.ERR_INVALID_URL = 'ERR_INVALID_URL';
50381
+ AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED = 'ERR_FORM_DATA_DEPTH_EXCEEDED';
50113
50382
 
50114
50383
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AxiosError);
50115
50384
 
@@ -50126,6 +50395,8 @@ __webpack_require__.r(__webpack_exports__);
50126
50395
  /* harmony export */ });
50127
50396
  /* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(68750);
50128
50397
  /* harmony import */ var _helpers_parseHeaders_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17026);
50398
+ /* harmony import */ var _helpers_sanitizeHeaderValue_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(51306);
50399
+
50129
50400
 
50130
50401
 
50131
50402
 
@@ -50142,9 +50413,7 @@ function normalizeValue(value) {
50142
50413
  return value;
50143
50414
  }
50144
50415
 
50145
- return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(value)
50146
- ? value.map(normalizeValue)
50147
- : String(value).replace(/[\r\n]+$/, '');
50416
+ return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(value) ? value.map(normalizeValue) : (0,_helpers_sanitizeHeaderValue_js__WEBPACK_IMPORTED_MODULE_2__.sanitizeHeaderValue)(String(value));
50148
50417
  }
50149
50418
 
50150
50419
  function parseTokens(str) {
@@ -50195,6 +50464,9 @@ function buildAccessors(obj, header) {
50195
50464
 
50196
50465
  ['get', 'set', 'has'].forEach((methodName) => {
50197
50466
  Object.defineProperty(obj, methodName + accessorName, {
50467
+ // Null-proto descriptor so a polluted Object.prototype.get cannot turn
50468
+ // this data descriptor into an accessor descriptor on the way in.
50469
+ __proto__: null,
50198
50470
  value: function (arg1, arg2, arg3) {
50199
50471
  return this[methodName].call(this, header, arg1, arg2, arg3);
50200
50472
  },
@@ -50588,7 +50860,7 @@ __webpack_require__.r(__webpack_exports__);
50588
50860
  */
50589
50861
  function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
50590
50862
  let isRelativeUrl = !(0,_helpers_isAbsoluteURL_js__WEBPACK_IMPORTED_MODULE_0__["default"])(requestedURL);
50591
- if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) {
50863
+ if (baseURL && (isRelativeUrl || allowAbsoluteUrls === false)) {
50592
50864
  return (0,_helpers_combineURLs_js__WEBPACK_IMPORTED_MODULE_1__["default"])(baseURL, requestedURL);
50593
50865
  }
50594
50866
  return requestedURL;
@@ -50662,8 +50934,15 @@ function dispatchRequest(config) {
50662
50934
  function onAdapterResolution(response) {
50663
50935
  throwIfCancellationRequested(config);
50664
50936
 
50665
- // Transform response data
50666
- response.data = _transformData_js__WEBPACK_IMPORTED_MODULE_0__["default"].call(config, config.transformResponse, response);
50937
+ // Expose the current response on config so that transformResponse can
50938
+ // attach it to any AxiosError it throws (e.g. on JSON parse failure).
50939
+ // We clean it up afterwards to avoid polluting the config object.
50940
+ config.response = response;
50941
+ try {
50942
+ response.data = _transformData_js__WEBPACK_IMPORTED_MODULE_0__["default"].call(config, config.transformResponse, response);
50943
+ } finally {
50944
+ delete config.response;
50945
+ }
50667
50946
 
50668
50947
  response.headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_4__["default"].from(response.headers);
50669
50948
 
@@ -50675,11 +50954,16 @@ function dispatchRequest(config) {
50675
50954
 
50676
50955
  // Transform response data
50677
50956
  if (reason && reason.response) {
50678
- reason.response.data = _transformData_js__WEBPACK_IMPORTED_MODULE_0__["default"].call(
50679
- config,
50680
- config.transformResponse,
50681
- reason.response
50682
- );
50957
+ config.response = reason.response;
50958
+ try {
50959
+ reason.response.data = _transformData_js__WEBPACK_IMPORTED_MODULE_0__["default"].call(
50960
+ config,
50961
+ config.transformResponse,
50962
+ reason.response
50963
+ );
50964
+ } finally {
50965
+ delete config.response;
50966
+ }
50683
50967
  reason.response.headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_4__["default"].from(reason.response.headers);
50684
50968
  }
50685
50969
  }
@@ -50721,7 +51005,21 @@ const headersToObject = (thing) => (thing instanceof _AxiosHeaders_js__WEBPACK_I
50721
51005
  function mergeConfig(config1, config2) {
50722
51006
  // eslint-disable-next-line no-param-reassign
50723
51007
  config2 = config2 || {};
50724
- const config = {};
51008
+
51009
+ // Use a null-prototype object so that downstream reads such as `config.auth`
51010
+ // or `config.baseURL` cannot inherit polluted values from Object.prototype.
51011
+ // `hasOwnProperty` is restored as a non-enumerable own slot to preserve
51012
+ // ergonomics for user code that relies on it.
51013
+ const config = Object.create(null);
51014
+ Object.defineProperty(config, 'hasOwnProperty', {
51015
+ // Null-proto descriptor so a polluted Object.prototype.get cannot turn
51016
+ // this data descriptor into an accessor descriptor on the way in.
51017
+ __proto__: null,
51018
+ value: Object.prototype.hasOwnProperty,
51019
+ enumerable: false,
51020
+ writable: true,
51021
+ configurable: true,
51022
+ });
50725
51023
 
50726
51024
  function getMergedValue(target, source, prop, caseless) {
50727
51025
  if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(target) && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(source)) {
@@ -50760,9 +51058,9 @@ function mergeConfig(config1, config2) {
50760
51058
 
50761
51059
  // eslint-disable-next-line consistent-return
50762
51060
  function mergeDirectKeys(a, b, prop) {
50763
- if (prop in config2) {
51061
+ if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(config2, prop)) {
50764
51062
  return getMergedValue(a, b);
50765
- } else if (prop in config1) {
51063
+ } else if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(config1, prop)) {
50766
51064
  return getMergedValue(undefined, a);
50767
51065
  }
50768
51066
  }
@@ -50794,6 +51092,7 @@ function mergeConfig(config1, config2) {
50794
51092
  httpsAgent: defaultToConfig2,
50795
51093
  cancelToken: defaultToConfig2,
50796
51094
  socketPath: defaultToConfig2,
51095
+ allowedSocketPaths: defaultToConfig2,
50797
51096
  responseEncoding: defaultToConfig2,
50798
51097
  validateStatus: mergeDirectKeys,
50799
51098
  headers: (a, b, prop) =>
@@ -50803,7 +51102,9 @@ function mergeConfig(config1, config2) {
50803
51102
  _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(Object.keys({ ...config1, ...config2 }), function computeConfigValue(prop) {
50804
51103
  if (prop === '__proto__' || prop === 'constructor' || prop === 'prototype') return;
50805
51104
  const merge = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;
50806
- const configValue = merge(config1[prop], config2[prop], prop);
51105
+ const a = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(config1, prop) ? config1[prop] : undefined;
51106
+ const b = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(config2, prop) ? config2[prop] : undefined;
51107
+ const configValue = merge(a, b, prop);
50807
51108
  (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
50808
51109
  });
50809
51110
 
@@ -50840,17 +51141,13 @@ function settle(resolve, reject, response) {
50840
51141
  if (!response.status || !validateStatus || validateStatus(response.status)) {
50841
51142
  resolve(response);
50842
51143
  } else {
50843
- reject(
50844
- new _AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"](
50845
- 'Request failed with status code ' + response.status,
50846
- [_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"].ERR_BAD_REQUEST, _AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"].ERR_BAD_RESPONSE][
50847
- Math.floor(response.status / 100) - 4
50848
- ],
50849
- response.config,
50850
- response.request,
50851
- response
50852
- )
50853
- );
51144
+ reject(new _AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"](
51145
+ 'Request failed with status code ' + response.status,
51146
+ response.status >= 400 && response.status < 500 ? _AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"].ERR_BAD_REQUEST : _AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"].ERR_BAD_RESPONSE,
51147
+ response.config,
51148
+ response.request,
51149
+ response
51150
+ ));
50854
51151
  }
50855
51152
  }
50856
51153
 
@@ -50925,6 +51222,8 @@ __webpack_require__.r(__webpack_exports__);
50925
51222
 
50926
51223
 
50927
51224
 
51225
+ const own = (obj, key) => (obj != null && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(obj, key) ? obj[key] : undefined);
51226
+
50928
51227
  /**
50929
51228
  * It takes a string, tries to parse it, and if it fails, it returns the stringified version
50930
51229
  * of the input
@@ -50992,20 +51291,22 @@ const defaults = {
50992
51291
  let isFileList;
50993
51292
 
50994
51293
  if (isObjectPayload) {
51294
+ const formSerializer = own(this, 'formSerializer');
50995
51295
  if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {
50996
- return (0,_helpers_toURLEncodedForm_js__WEBPACK_IMPORTED_MODULE_4__["default"])(data, this.formSerializer).toString();
51296
+ return (0,_helpers_toURLEncodedForm_js__WEBPACK_IMPORTED_MODULE_4__["default"])(data, formSerializer).toString();
50997
51297
  }
50998
51298
 
50999
51299
  if (
51000
51300
  (isFileList = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFileList(data)) ||
51001
51301
  contentType.indexOf('multipart/form-data') > -1
51002
51302
  ) {
51003
- const _FormData = this.env && this.env.FormData;
51303
+ const env = own(this, 'env');
51304
+ const _FormData = env && env.FormData;
51004
51305
 
51005
51306
  return (0,_helpers_toFormData_js__WEBPACK_IMPORTED_MODULE_3__["default"])(
51006
51307
  isFileList ? { 'files[]': data } : data,
51007
51308
  _FormData && new _FormData(),
51008
- this.formSerializer
51309
+ formSerializer
51009
51310
  );
51010
51311
  }
51011
51312
  }
@@ -51021,9 +51322,10 @@ const defaults = {
51021
51322
 
51022
51323
  transformResponse: [
51023
51324
  function transformResponse(data) {
51024
- const transitional = this.transitional || defaults.transitional;
51325
+ const transitional = own(this, 'transitional') || defaults.transitional;
51025
51326
  const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
51026
- const JSONRequested = this.responseType === 'json';
51327
+ const responseType = own(this, 'responseType');
51328
+ const JSONRequested = responseType === 'json';
51027
51329
 
51028
51330
  if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isResponse(data) || _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isReadableStream(data)) {
51029
51331
  return data;
@@ -51032,17 +51334,17 @@ const defaults = {
51032
51334
  if (
51033
51335
  data &&
51034
51336
  _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(data) &&
51035
- ((forcedJSONParsing && !this.responseType) || JSONRequested)
51337
+ ((forcedJSONParsing && !responseType) || JSONRequested)
51036
51338
  ) {
51037
51339
  const silentJSONParsing = transitional && transitional.silentJSONParsing;
51038
51340
  const strictJSONParsing = !silentJSONParsing && JSONRequested;
51039
51341
 
51040
51342
  try {
51041
- return JSON.parse(data, this.parseReviver);
51343
+ return JSON.parse(data, own(this, 'parseReviver'));
51042
51344
  } catch (e) {
51043
51345
  if (strictJSONParsing) {
51044
51346
  if (e.name === 'SyntaxError') {
51045
- throw _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].from(e, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].ERR_BAD_RESPONSE, this, null, this.response);
51347
+ throw _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].from(e, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].ERR_BAD_RESPONSE, this, null, own(this, 'response'));
51046
51348
  }
51047
51349
  throw e;
51048
51350
  }
@@ -51082,7 +51384,7 @@ const defaults = {
51082
51384
  },
51083
51385
  };
51084
51386
 
51085
- _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {
51387
+ _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'query'], (method) => {
51086
51388
  defaults.headers[method] = {};
51087
51389
  });
51088
51390
 
@@ -51119,7 +51421,7 @@ __webpack_require__.r(__webpack_exports__);
51119
51421
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
51120
51422
  /* harmony export */ VERSION: () => (/* binding */ VERSION)
51121
51423
  /* harmony export */ });
51122
- const VERSION = "1.14.0";
51424
+ const VERSION = "1.16.1";
51123
51425
 
51124
51426
  /***/ },
51125
51427
 
@@ -51152,9 +51454,8 @@ function encode(str) {
51152
51454
  ')': '%29',
51153
51455
  '~': '%7E',
51154
51456
  '%20': '+',
51155
- '%00': '\x00',
51156
51457
  };
51157
- return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {
51458
+ return encodeURIComponent(str).replace(/[!'()~]|%20/g, function replacer(match) {
51158
51459
  return charMap[match];
51159
51460
  });
51160
51461
  }
@@ -51319,7 +51620,8 @@ function bind(fn, thisArg) {
51319
51620
  "use strict";
51320
51621
  __webpack_require__.r(__webpack_exports__);
51321
51622
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
51322
- /* harmony export */ "default": () => (/* binding */ buildURL)
51623
+ /* harmony export */ "default": () => (/* binding */ buildURL),
51624
+ /* harmony export */ encode: () => (/* binding */ encode)
51323
51625
  /* harmony export */ });
51324
51626
  /* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(68750);
51325
51627
  /* harmony import */ var _helpers_AxiosURLSearchParams_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(15720);
@@ -51436,54 +51738,55 @@ __webpack_require__.r(__webpack_exports__);
51436
51738
 
51437
51739
 
51438
51740
  const composeSignals = (signals, timeout) => {
51439
- const { length } = (signals = signals ? signals.filter(Boolean) : []);
51440
-
51441
- if (timeout || length) {
51442
- let controller = new AbortController();
51443
-
51444
- let aborted;
51445
-
51446
- const onabort = function (reason) {
51447
- if (!aborted) {
51448
- aborted = true;
51449
- unsubscribe();
51450
- const err = reason instanceof Error ? reason : this.reason;
51451
- controller.abort(
51452
- err instanceof _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"]
51453
- ? err
51454
- : new _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_0__["default"](err instanceof Error ? err.message : err)
51455
- );
51456
- }
51457
- };
51741
+ signals = signals ? signals.filter(Boolean) : [];
51458
51742
 
51459
- let timer =
51460
- timeout &&
51461
- setTimeout(() => {
51462
- timer = null;
51463
- onabort(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"](`timeout of ${timeout}ms exceeded`, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].ETIMEDOUT));
51464
- }, timeout);
51465
-
51466
- const unsubscribe = () => {
51467
- if (signals) {
51468
- timer && clearTimeout(timer);
51469
- timer = null;
51470
- signals.forEach((signal) => {
51471
- signal.unsubscribe
51472
- ? signal.unsubscribe(onabort)
51473
- : signal.removeEventListener('abort', onabort);
51474
- });
51475
- signals = null;
51476
- }
51477
- };
51743
+ if (!timeout && !signals.length) {
51744
+ return;
51745
+ }
51478
51746
 
51479
- signals.forEach((signal) => signal.addEventListener('abort', onabort));
51747
+ const controller = new AbortController();
51480
51748
 
51481
- const { signal } = controller;
51749
+ let aborted = false;
51482
51750
 
51483
- signal.unsubscribe = () => _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].asap(unsubscribe);
51751
+ const onabort = function (reason) {
51752
+ if (!aborted) {
51753
+ aborted = true;
51754
+ unsubscribe();
51755
+ const err = reason instanceof Error ? reason : this.reason;
51756
+ controller.abort(
51757
+ err instanceof _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"]
51758
+ ? err
51759
+ : new _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_0__["default"](err instanceof Error ? err.message : err)
51760
+ );
51761
+ }
51762
+ };
51484
51763
 
51485
- return signal;
51486
- }
51764
+ let timer =
51765
+ timeout &&
51766
+ setTimeout(() => {
51767
+ timer = null;
51768
+ onabort(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"](`timeout of ${timeout}ms exceeded`, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].ETIMEDOUT));
51769
+ }, timeout);
51770
+
51771
+ const unsubscribe = () => {
51772
+ if (!signals) { return; }
51773
+ timer && clearTimeout(timer);
51774
+ timer = null;
51775
+ signals.forEach((signal) => {
51776
+ signal.unsubscribe
51777
+ ? signal.unsubscribe(onabort)
51778
+ : signal.removeEventListener('abort', onabort);
51779
+ });
51780
+ signals = null;
51781
+ };
51782
+
51783
+ signals.forEach((signal) => signal.addEventListener('abort', onabort));
51784
+
51785
+ const { signal } = controller;
51786
+
51787
+ signal.unsubscribe = () => _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].asap(unsubscribe);
51788
+
51789
+ return signal;
51487
51790
  };
51488
51791
 
51489
51792
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (composeSignals);
@@ -51533,8 +51836,20 @@ __webpack_require__.r(__webpack_exports__);
51533
51836
 
51534
51837
  read(name) {
51535
51838
  if (typeof document === 'undefined') return null;
51536
- const match = document.cookie.match(new RegExp('(?:^|; )' + name + '=([^;]*)'));
51537
- return match ? decodeURIComponent(match[1]) : null;
51839
+ // Match name=value by splitting on the semicolon separator instead of building a
51840
+ // RegExp from `name` interpolating an unescaped string into a RegExp would let
51841
+ // metacharacters (e.g. `.+?` in an attacker-influenced cookie name) cause ReDoS or
51842
+ // match the wrong cookie. Browsers may serialize cookie pairs as either ";" or
51843
+ // "; ", so ignore optional whitespace before each cookie name.
51844
+ const cookies = document.cookie.split(';');
51845
+ for (let i = 0; i < cookies.length; i++) {
51846
+ const cookie = cookies[i].replace(/^\s+/, '');
51847
+ const eq = cookie.indexOf('=');
51848
+ if (eq !== -1 && cookie.slice(0, eq) === name) {
51849
+ return decodeURIComponent(cookie.slice(eq + 1));
51850
+ }
51851
+ }
51852
+ return null;
51538
51853
  },
51539
51854
 
51540
51855
  remove(name) {
@@ -51551,6 +51866,118 @@ __webpack_require__.r(__webpack_exports__);
51551
51866
  });
51552
51867
 
51553
51868
 
51869
+ /***/ },
51870
+
51871
+ /***/ 879
51872
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
51873
+
51874
+ "use strict";
51875
+ __webpack_require__.r(__webpack_exports__);
51876
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
51877
+ /* harmony export */ "default": () => (/* binding */ estimateDataURLDecodedBytes)
51878
+ /* harmony export */ });
51879
+ /**
51880
+ * Estimate decoded byte length of a data:// URL *without* allocating large buffers.
51881
+ * - For base64: compute exact decoded size using length and padding;
51882
+ * handle %XX at the character-count level (no string allocation).
51883
+ * - For non-base64: use UTF-8 byteLength of the encoded body as a safe upper bound.
51884
+ *
51885
+ * @param {string} url
51886
+ * @returns {number}
51887
+ */
51888
+ function estimateDataURLDecodedBytes(url) {
51889
+ if (!url || typeof url !== 'string') return 0;
51890
+ if (!url.startsWith('data:')) return 0;
51891
+
51892
+ const comma = url.indexOf(',');
51893
+ if (comma < 0) return 0;
51894
+
51895
+ const meta = url.slice(5, comma);
51896
+ const body = url.slice(comma + 1);
51897
+ const isBase64 = /;base64/i.test(meta);
51898
+
51899
+ if (isBase64) {
51900
+ let effectiveLen = body.length;
51901
+ const len = body.length; // cache length
51902
+
51903
+ for (let i = 0; i < len; i++) {
51904
+ if (body.charCodeAt(i) === 37 /* '%' */ && i + 2 < len) {
51905
+ const a = body.charCodeAt(i + 1);
51906
+ const b = body.charCodeAt(i + 2);
51907
+ const isHex =
51908
+ ((a >= 48 && a <= 57) || (a >= 65 && a <= 70) || (a >= 97 && a <= 102)) &&
51909
+ ((b >= 48 && b <= 57) || (b >= 65 && b <= 70) || (b >= 97 && b <= 102));
51910
+
51911
+ if (isHex) {
51912
+ effectiveLen -= 2;
51913
+ i += 2;
51914
+ }
51915
+ }
51916
+ }
51917
+
51918
+ let pad = 0;
51919
+ let idx = len - 1;
51920
+
51921
+ const tailIsPct3D = (j) =>
51922
+ j >= 2 &&
51923
+ body.charCodeAt(j - 2) === 37 && // '%'
51924
+ body.charCodeAt(j - 1) === 51 && // '3'
51925
+ (body.charCodeAt(j) === 68 || body.charCodeAt(j) === 100); // 'D' or 'd'
51926
+
51927
+ if (idx >= 0) {
51928
+ if (body.charCodeAt(idx) === 61 /* '=' */) {
51929
+ pad++;
51930
+ idx--;
51931
+ } else if (tailIsPct3D(idx)) {
51932
+ pad++;
51933
+ idx -= 3;
51934
+ }
51935
+ }
51936
+
51937
+ if (pad === 1 && idx >= 0) {
51938
+ if (body.charCodeAt(idx) === 61 /* '=' */) {
51939
+ pad++;
51940
+ } else if (tailIsPct3D(idx)) {
51941
+ pad++;
51942
+ }
51943
+ }
51944
+
51945
+ const groups = Math.floor(effectiveLen / 4);
51946
+ const bytes = groups * 3 - (pad || 0);
51947
+ return bytes > 0 ? bytes : 0;
51948
+ }
51949
+
51950
+ if (typeof Buffer !== 'undefined' && typeof Buffer.byteLength === 'function') {
51951
+ return Buffer.byteLength(body, 'utf8');
51952
+ }
51953
+
51954
+ // Compute UTF-8 byte length directly from UTF-16 code units without allocating
51955
+ // a byte buffer (TextEncoder.encode would defeat the DoS guard on large bodies).
51956
+ // Using body.length here would undercount non-ASCII (e.g. '€' is 1 code unit
51957
+ // but 3 UTF-8 bytes).
51958
+ let bytes = 0;
51959
+ for (let i = 0, len = body.length; i < len; i++) {
51960
+ const c = body.charCodeAt(i);
51961
+ if (c < 0x80) {
51962
+ bytes += 1;
51963
+ } else if (c < 0x800) {
51964
+ bytes += 2;
51965
+ } else if (c >= 0xd800 && c <= 0xdbff && i + 1 < len) {
51966
+ const next = body.charCodeAt(i + 1);
51967
+ if (next >= 0xdc00 && next <= 0xdfff) {
51968
+ bytes += 4;
51969
+ i++;
51970
+ } else {
51971
+ bytes += 3;
51972
+ }
51973
+ } else {
51974
+ bytes += 3;
51975
+ }
51976
+ }
51977
+ return bytes;
51978
+ }
51979
+
51980
+
51554
51981
  /***/ },
51555
51982
 
51556
51983
  /***/ 66256
@@ -51622,7 +52049,9 @@ function formDataToJSON(formData) {
51622
52049
 
51623
52050
  if (isLast) {
51624
52051
  if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(target, name)) {
51625
- target[name] = [target[name], value];
52052
+ target[name] = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(target[name])
52053
+ ? target[name].concat(value)
52054
+ : [target[name], value];
51626
52055
  } else {
51627
52056
  target[name] = value;
51628
52057
  }
@@ -51630,7 +52059,7 @@ function formDataToJSON(formData) {
51630
52059
  return !isNumericKey;
51631
52060
  }
51632
52061
 
51633
- if (!target[name] || !_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isObject(target[name])) {
52062
+ if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(target, name) || !_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isObject(target[name])) {
51634
52063
  target[name] = [];
51635
52064
  }
51636
52065
 
@@ -51855,7 +52284,7 @@ __webpack_require__.r(__webpack_exports__);
51855
52284
 
51856
52285
 
51857
52286
  function parseProtocol(url) {
51858
- const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
52287
+ const match = /^([-+\w]{1,25}):(?:\/\/)?/.exec(url);
51859
52288
  return (match && match[1]) || '';
51860
52289
  }
51861
52290
 
@@ -51884,13 +52313,16 @@ const progressEventReducer = (listener, isDownloadStream, freq = 3) => {
51884
52313
  const _speedometer = (0,_speedometer_js__WEBPACK_IMPORTED_MODULE_0__["default"])(50, 250);
51885
52314
 
51886
52315
  return (0,_throttle_js__WEBPACK_IMPORTED_MODULE_1__["default"])((e) => {
51887
- const loaded = e.loaded;
52316
+ if (!e || typeof e.loaded !== 'number') {
52317
+ return;
52318
+ }
52319
+ const rawLoaded = e.loaded;
51888
52320
  const total = e.lengthComputable ? e.total : undefined;
51889
- const progressBytes = loaded - bytesNotified;
52321
+ const loaded = total != null ? Math.min(rawLoaded, total) : rawLoaded;
52322
+ const progressBytes = Math.max(0, loaded - bytesNotified);
51890
52323
  const rate = _speedometer(progressBytes);
51891
- const inRange = loaded <= total;
51892
52324
 
51893
- bytesNotified = loaded;
52325
+ bytesNotified = Math.max(bytesNotified, loaded);
51894
52326
 
51895
52327
  const data = {
51896
52328
  loaded,
@@ -51898,7 +52330,7 @@ const progressEventReducer = (listener, isDownloadStream, freq = 3) => {
51898
52330
  progress: total ? loaded / total : undefined,
51899
52331
  bytes: progressBytes,
51900
52332
  rate: rate ? rate : undefined,
51901
- estimated: rate && total && inRange ? (total - loaded) / rate : undefined,
52333
+ estimated: rate && total ? (total - loaded) / rate : undefined,
51902
52334
  event: e,
51903
52335
  lengthComputable: total != null,
51904
52336
  [isDownloadStream ? 'download' : 'upload']: true,
@@ -51955,15 +52387,55 @@ __webpack_require__.r(__webpack_exports__);
51955
52387
 
51956
52388
 
51957
52389
 
52390
+ const FORM_DATA_CONTENT_HEADERS = ['content-type', 'content-length'];
52391
+
52392
+ function setFormDataHeaders(headers, formHeaders, policy) {
52393
+ if (policy !== 'content-only') {
52394
+ headers.set(formHeaders);
52395
+ return;
52396
+ }
52397
+
52398
+ Object.entries(formHeaders).forEach(([key, val]) => {
52399
+ if (FORM_DATA_CONTENT_HEADERS.includes(key.toLowerCase())) {
52400
+ headers.set(key, val);
52401
+ }
52402
+ });
52403
+ }
52404
+
52405
+ /**
52406
+ * Encode a UTF-8 string to a Latin-1 byte string for use with btoa().
52407
+ * This is a modern replacement for the deprecated unescape(encodeURIComponent(str)) pattern.
52408
+ *
52409
+ * @param {string} str The string to encode
52410
+ *
52411
+ * @returns {string} UTF-8 bytes as a Latin-1 string
52412
+ */
52413
+ const encodeUTF8 = (str) =>
52414
+ encodeURIComponent(str).replace(/%([0-9A-F]{2})/gi, (_, hex) =>
52415
+ String.fromCharCode(parseInt(hex, 16))
52416
+ );
52417
+
51958
52418
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((config) => {
51959
52419
  const newConfig = (0,_core_mergeConfig_js__WEBPACK_IMPORTED_MODULE_5__["default"])({}, config);
51960
52420
 
51961
- let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig;
52421
+ // Read only own properties to prevent prototype pollution gadgets
52422
+ // (e.g. Object.prototype.baseURL = 'https://evil.com').
52423
+ const own = (key) => (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].hasOwnProp(newConfig, key) ? newConfig[key] : undefined);
52424
+
52425
+ const data = own('data');
52426
+ let withXSRFToken = own('withXSRFToken');
52427
+ const xsrfHeaderName = own('xsrfHeaderName');
52428
+ const xsrfCookieName = own('xsrfCookieName');
52429
+ let headers = own('headers');
52430
+ const auth = own('auth');
52431
+ const baseURL = own('baseURL');
52432
+ const allowAbsoluteUrls = own('allowAbsoluteUrls');
52433
+ const url = own('url');
51962
52434
 
51963
52435
  newConfig.headers = headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_6__["default"].from(headers);
51964
52436
 
51965
52437
  newConfig.url = (0,_buildURL_js__WEBPACK_IMPORTED_MODULE_7__["default"])(
51966
- (0,_core_buildFullPath_js__WEBPACK_IMPORTED_MODULE_4__["default"])(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls),
52438
+ (0,_core_buildFullPath_js__WEBPACK_IMPORTED_MODULE_4__["default"])(baseURL, url, allowAbsoluteUrls),
51967
52439
  config.params,
51968
52440
  config.paramsSerializer
51969
52441
  );
@@ -51973,11 +52445,7 @@ __webpack_require__.r(__webpack_exports__);
51973
52445
  headers.set(
51974
52446
  'Authorization',
51975
52447
  'Basic ' +
51976
- btoa(
51977
- (auth.username || '') +
51978
- ':' +
51979
- (auth.password ? unescape(encodeURIComponent(auth.password)) : '')
51980
- )
52448
+ btoa((auth.username || '') + ':' + (auth.password ? encodeUTF8(auth.password) : ''))
51981
52449
  );
51982
52450
  }
51983
52451
 
@@ -51986,14 +52454,7 @@ __webpack_require__.r(__webpack_exports__);
51986
52454
  headers.setContentType(undefined); // browser handles it
51987
52455
  } else if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isFunction(data.getHeaders)) {
51988
52456
  // Node.js FormData (like form-data package)
51989
- const formHeaders = data.getHeaders();
51990
- // Only set safe headers to avoid overwriting security headers
51991
- const allowedHeaders = ['content-type', 'content-length'];
51992
- Object.entries(formHeaders).forEach(([key, val]) => {
51993
- if (allowedHeaders.includes(key.toLowerCase())) {
51994
- headers.set(key, val);
51995
- }
51996
- });
52457
+ setFormDataHeaders(headers, data.getHeaders(), own('formDataHeaderPolicy'));
51997
52458
  }
51998
52459
  }
51999
52460
 
@@ -52002,10 +52463,17 @@ __webpack_require__.r(__webpack_exports__);
52002
52463
  // Specifically not if we're in a web worker, or react-native.
52003
52464
 
52004
52465
  if (_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasStandardBrowserEnv) {
52005
- withXSRFToken && _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));
52466
+ if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isFunction(withXSRFToken)) {
52467
+ withXSRFToken = withXSRFToken(newConfig);
52468
+ }
52469
+
52470
+ // Strict boolean check — prevents proto-pollution gadgets (e.g. Object.prototype.withXSRFToken = 1)
52471
+ // and misconfigurations (e.g. "false") from short-circuiting the same-origin check and leaking
52472
+ // the XSRF token cross-origin.
52473
+ const shouldSendXSRF =
52474
+ withXSRFToken === true || (withXSRFToken == null && (0,_isURLSameOrigin_js__WEBPACK_IMPORTED_MODULE_2__["default"])(newConfig.url));
52006
52475
 
52007
- if (withXSRFToken || (withXSRFToken !== false && (0,_isURLSameOrigin_js__WEBPACK_IMPORTED_MODULE_2__["default"])(newConfig.url))) {
52008
- // Add xsrf header
52476
+ if (shouldSendXSRF) {
52009
52477
  const xsrfValue = xsrfHeaderName && xsrfCookieName && _cookies_js__WEBPACK_IMPORTED_MODULE_3__["default"].read(xsrfCookieName);
52010
52478
 
52011
52479
  if (xsrfValue) {
@@ -52018,6 +52486,81 @@ __webpack_require__.r(__webpack_exports__);
52018
52486
  });
52019
52487
 
52020
52488
 
52489
+ /***/ },
52490
+
52491
+ /***/ 51306
52492
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
52493
+
52494
+ "use strict";
52495
+ __webpack_require__.r(__webpack_exports__);
52496
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
52497
+ /* harmony export */ sanitizeByteStringHeaderValue: () => (/* binding */ sanitizeByteStringHeaderValue),
52498
+ /* harmony export */ sanitizeHeaderValue: () => (/* binding */ sanitizeHeaderValue),
52499
+ /* harmony export */ toByteStringHeaderObject: () => (/* binding */ toByteStringHeaderObject)
52500
+ /* harmony export */ });
52501
+ /* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(68750);
52502
+
52503
+
52504
+
52505
+
52506
+ function trimSPorHTAB(str) {
52507
+ let start = 0;
52508
+ let end = str.length;
52509
+
52510
+ while (start < end) {
52511
+ const code = str.charCodeAt(start);
52512
+
52513
+ if (code !== 0x09 && code !== 0x20) {
52514
+ break;
52515
+ }
52516
+
52517
+ start += 1;
52518
+ }
52519
+
52520
+ while (end > start) {
52521
+ const code = str.charCodeAt(end - 1);
52522
+
52523
+ if (code !== 0x09 && code !== 0x20) {
52524
+ break;
52525
+ }
52526
+
52527
+ end -= 1;
52528
+ }
52529
+
52530
+ return start === 0 && end === str.length ? str : str.slice(start, end);
52531
+ }
52532
+
52533
+ // The control-code ranges are intentional: header sanitization strips C0/DEL bytes.
52534
+ // eslint-disable-next-line no-control-regex
52535
+ const INVALID_UNICODE_HEADER_VALUE_CHARS = new RegExp('[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+', 'g');
52536
+ // eslint-disable-next-line no-control-regex
52537
+ const INVALID_BYTE_STRING_HEADER_VALUE_CHARS = new RegExp('[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+', 'g');
52538
+
52539
+ function sanitizeValue(value, invalidChars) {
52540
+ if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(value)) {
52541
+ return value.map((item) => sanitizeValue(item, invalidChars));
52542
+ }
52543
+
52544
+ return trimSPorHTAB(String(value).replace(invalidChars, ''));
52545
+ }
52546
+
52547
+ const sanitizeHeaderValue = (value) =>
52548
+ sanitizeValue(value, INVALID_UNICODE_HEADER_VALUE_CHARS);
52549
+
52550
+ const sanitizeByteStringHeaderValue = (value) =>
52551
+ sanitizeValue(value, INVALID_BYTE_STRING_HEADER_VALUE_CHARS);
52552
+
52553
+ function toByteStringHeaderObject(headers) {
52554
+ const byteStringHeaders = Object.create(null);
52555
+
52556
+ _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(headers.toJSON(), (value, header) => {
52557
+ byteStringHeaders[header] = sanitizeByteStringHeaderValue(value);
52558
+ });
52559
+
52560
+ return byteStringHeaders;
52561
+ }
52562
+
52563
+
52021
52564
  /***/ },
52022
52565
 
52023
52566
  /***/ 87884
@@ -52311,6 +52854,7 @@ function toFormData(obj, formData, options) {
52311
52854
  const dots = options.dots;
52312
52855
  const indexes = options.indexes;
52313
52856
  const _Blob = options.Blob || (typeof Blob !== 'undefined' && Blob);
52857
+ const maxDepth = options.maxDepth === undefined ? 100 : options.maxDepth;
52314
52858
  const useBlob = _Blob && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isSpecCompliantForm(formData);
52315
52859
 
52316
52860
  if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(visitor)) {
@@ -52403,9 +52947,16 @@ function toFormData(obj, formData, options) {
52403
52947
  isVisitable,
52404
52948
  });
52405
52949
 
52406
- function build(value, path) {
52950
+ function build(value, path, depth = 0) {
52407
52951
  if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(value)) return;
52408
52952
 
52953
+ if (depth > maxDepth) {
52954
+ throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"](
52955
+ 'Object is too deeply nested (' + depth + ' levels). Max depth: ' + maxDepth,
52956
+ _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].ERR_FORM_DATA_DEPTH_EXCEEDED
52957
+ );
52958
+ }
52959
+
52409
52960
  if (stack.indexOf(value) !== -1) {
52410
52961
  throw Error('Circular reference detected in ' + path.join('.'));
52411
52962
  }
@@ -52418,7 +52969,7 @@ function toFormData(obj, formData, options) {
52418
52969
  visitor.call(formData, el, _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(key) ? key.trim() : key, path, exposedHelpers);
52419
52970
 
52420
52971
  if (result === true) {
52421
- build(el, path ? path.concat(key) : [key]);
52972
+ build(el, path ? path.concat(key) : [key], depth + 1);
52422
52973
  }
52423
52974
  });
52424
52975
 
@@ -52674,7 +53225,9 @@ function assertOptions(options, schema, allowUnknown) {
52674
53225
  let i = keys.length;
52675
53226
  while (i-- > 0) {
52676
53227
  const opt = keys[i];
52677
- const validator = schema[opt];
53228
+ // Use hasOwnProperty so a polluted Object.prototype.<opt> cannot supply
53229
+ // a non-function validator and cause a TypeError.
53230
+ const validator = Object.prototype.hasOwnProperty.call(schema, opt) ? schema[opt] : undefined;
52678
53231
  if (validator) {
52679
53232
  const value = options[opt];
52680
53233
  const result = value === undefined || validator(value, opt, options);
@@ -53061,21 +53614,21 @@ const isFile = kindOfTest('File');
53061
53614
  * also have a `name` and `type` attribute to specify filename and content type
53062
53615
  *
53063
53616
  * @see https://github.com/facebook/react-native/blob/26684cf3adf4094eb6c405d345a75bf8c7c0bf88/Libraries/Network/FormData.js#L68-L71
53064
- *
53617
+ *
53065
53618
  * @param {*} value The value to test
53066
- *
53619
+ *
53067
53620
  * @returns {boolean} True if value is a React Native Blob, otherwise false
53068
53621
  */
53069
53622
  const isReactNativeBlob = (value) => {
53070
53623
  return !!(value && typeof value.uri !== 'undefined');
53071
- }
53624
+ };
53072
53625
 
53073
53626
  /**
53074
53627
  * Determine if environment is React Native
53075
53628
  * ReactNative `FormData` has a non-standard `getParts()` method
53076
- *
53629
+ *
53077
53630
  * @param {*} formData The formData to test
53078
- *
53631
+ *
53079
53632
  * @returns {boolean} True if environment is React Native, otherwise false
53080
53633
  */
53081
53634
  const isReactNative = (formData) => formData && typeof formData.getParts !== 'undefined';
@@ -53094,7 +53647,7 @@ const isBlob = kindOfTest('Blob');
53094
53647
  *
53095
53648
  * @param {*} val The value to test
53096
53649
  *
53097
- * @returns {boolean} True if value is a File, otherwise false
53650
+ * @returns {boolean} True if value is a FileList, otherwise false
53098
53651
  */
53099
53652
  const isFileList = kindOfTest('FileList');
53100
53653
 
@@ -53126,15 +53679,17 @@ const G = getGlobal();
53126
53679
  const FormDataCtor = typeof G.FormData !== 'undefined' ? G.FormData : undefined;
53127
53680
 
53128
53681
  const isFormData = (thing) => {
53129
- let kind;
53130
- return thing && (
53131
- (FormDataCtor && thing instanceof FormDataCtor) || (
53132
- isFunction(thing.append) && (
53133
- (kind = kindOf(thing)) === 'formdata' ||
53134
- // detect form-data instance
53135
- (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')
53136
- )
53137
- )
53682
+ if (!thing) return false;
53683
+ if (FormDataCtor && thing instanceof FormDataCtor) return true;
53684
+ // Reject plain objects inheriting directly from Object.prototype so prototype-pollution gadgets can't spoof FormData.
53685
+ const proto = getPrototypeOf(thing);
53686
+ if (!proto || proto === Object.prototype) return false;
53687
+ if (!isFunction(thing.append)) return false;
53688
+ const kind = kindOf(thing);
53689
+ return (
53690
+ kind === 'formdata' ||
53691
+ // detect form-data instance
53692
+ (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')
53138
53693
  );
53139
53694
  };
53140
53695
 
@@ -53270,7 +53825,7 @@ const isContextDefined = (context) => !isUndefined(context) && context !== _glob
53270
53825
  *
53271
53826
  * @returns {Object} Result of all merge properties
53272
53827
  */
53273
- function merge(/* obj1, obj2, obj3, ... */) {
53828
+ function merge(...objs) {
53274
53829
  const { caseless, skipUndefined } = (isContextDefined(this) && this) || {};
53275
53830
  const result = {};
53276
53831
  const assignValue = (val, key) => {
@@ -53280,8 +53835,12 @@ function merge(/* obj1, obj2, obj3, ... */) {
53280
53835
  }
53281
53836
 
53282
53837
  const targetKey = (caseless && findKey(result, key)) || key;
53283
- if (isPlainObject(result[targetKey]) && isPlainObject(val)) {
53284
- result[targetKey] = merge(result[targetKey], val);
53838
+ // Read via own-prop only — a bare `result[targetKey]` walks the prototype
53839
+ // chain, so a polluted Object.prototype value could surface here and get
53840
+ // copied into the merged result.
53841
+ const existing = hasOwnProperty(result, targetKey) ? result[targetKey] : undefined;
53842
+ if (isPlainObject(existing) && isPlainObject(val)) {
53843
+ result[targetKey] = merge(existing, val);
53285
53844
  } else if (isPlainObject(val)) {
53286
53845
  result[targetKey] = merge({}, val);
53287
53846
  } else if (isArray(val)) {
@@ -53291,8 +53850,8 @@ function merge(/* obj1, obj2, obj3, ... */) {
53291
53850
  }
53292
53851
  };
53293
53852
 
53294
- for (let i = 0, l = arguments.length; i < l; i++) {
53295
- arguments[i] && forEach(arguments[i], assignValue);
53853
+ for (let i = 0, l = objs.length; i < l; i++) {
53854
+ objs[i] && forEach(objs[i], assignValue);
53296
53855
  }
53297
53856
  return result;
53298
53857
  }
@@ -53314,6 +53873,9 @@ const extend = (a, b, thisArg, { allOwnKeys } = {}) => {
53314
53873
  (val, key) => {
53315
53874
  if (thisArg && isFunction(val)) {
53316
53875
  Object.defineProperty(a, key, {
53876
+ // Null-proto descriptor so a polluted Object.prototype.get cannot
53877
+ // hijack defineProperty's accessor-vs-data resolution.
53878
+ __proto__: null,
53317
53879
  value: (0,_helpers_bind_js__WEBPACK_IMPORTED_MODULE_0__["default"])(val, thisArg),
53318
53880
  writable: true,
53319
53881
  enumerable: true,
@@ -53321,6 +53883,7 @@ const extend = (a, b, thisArg, { allOwnKeys } = {}) => {
53321
53883
  });
53322
53884
  } else {
53323
53885
  Object.defineProperty(a, key, {
53886
+ __proto__: null,
53324
53887
  value: val,
53325
53888
  writable: true,
53326
53889
  enumerable: true,
@@ -53359,12 +53922,14 @@ const stripBOM = (content) => {
53359
53922
  const inherits = (constructor, superConstructor, props, descriptors) => {
53360
53923
  constructor.prototype = Object.create(superConstructor.prototype, descriptors);
53361
53924
  Object.defineProperty(constructor.prototype, 'constructor', {
53925
+ __proto__: null,
53362
53926
  value: constructor,
53363
53927
  writable: true,
53364
53928
  enumerable: false,
53365
53929
  configurable: true,
53366
53930
  });
53367
53931
  Object.defineProperty(constructor, 'super', {
53932
+ __proto__: null,
53368
53933
  value: superConstructor.prototype,
53369
53934
  });
53370
53935
  props && Object.assign(constructor.prototype, props);
@@ -53546,7 +54111,7 @@ const reduceDescriptors = (obj, reducer) => {
53546
54111
  const freezeMethods = (obj) => {
53547
54112
  reduceDescriptors(obj, (descriptor, name) => {
53548
54113
  // skip restricted props in strict mode
53549
- if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {
54114
+ if (isFunction(obj) && ['arguments', 'caller', 'callee'].includes(name)) {
53550
54115
  return false;
53551
54116
  }
53552
54117
 
@@ -53620,11 +54185,11 @@ function isSpecCompliantForm(thing) {
53620
54185
  * @returns {Object} The JSON-compatible object.
53621
54186
  */
53622
54187
  const toJSONObject = (obj) => {
53623
- const stack = new Array(10);
54188
+ const visited = new WeakSet();
53624
54189
 
53625
- const visit = (source, i) => {
54190
+ const visit = (source) => {
53626
54191
  if (isObject(source)) {
53627
- if (stack.indexOf(source) >= 0) {
54192
+ if (visited.has(source)) {
53628
54193
  return;
53629
54194
  }
53630
54195
 
@@ -53634,15 +54199,16 @@ const toJSONObject = (obj) => {
53634
54199
  }
53635
54200
 
53636
54201
  if (!('toJSON' in source)) {
53637
- stack[i] = source;
54202
+ // add-on descent / delete-on-ascent: preserves path semantics, so DAG nodes serialise at every occurrence (see #7230).
54203
+ visited.add(source);
53638
54204
  const target = isArray(source) ? [] : {};
53639
54205
 
53640
54206
  forEach(source, (value, key) => {
53641
- const reducedValue = visit(value, i + 1);
54207
+ const reducedValue = visit(value);
53642
54208
  !isUndefined(reducedValue) && (target[key] = reducedValue);
53643
54209
  });
53644
54210
 
53645
- stack[i] = undefined;
54211
+ visited.delete(source);
53646
54212
 
53647
54213
  return target;
53648
54214
  }
@@ -53651,7 +54217,7 @@ const toJSONObject = (obj) => {
53651
54217
  return source;
53652
54218
  };
53653
54219
 
53654
- return visit(obj, 0);
54220
+ return visit(obj);
53655
54221
  };
53656
54222
 
53657
54223
  /**
@@ -66684,8 +67250,10 @@ class Composer {
66684
67250
  }
66685
67251
  }
66686
67252
  if (afterDoc) {
66687
- Array.prototype.push.apply(doc.errors, this.errors);
66688
- Array.prototype.push.apply(doc.warnings, this.warnings);
67253
+ for (let i = 0; i < this.errors.length; ++i)
67254
+ doc.errors.push(this.errors[i]);
67255
+ for (let i = 0; i < this.warnings.length; ++i)
67256
+ doc.warnings.push(this.warnings[i]);
66689
67257
  }
66690
67258
  else {
66691
67259
  doc.errors = this.errors;
@@ -67647,7 +68215,7 @@ function doubleQuotedValue(source, onError) {
67647
68215
  next = source[++i + 1];
67648
68216
  }
67649
68217
  else if (next === 'x' || next === 'u' || next === 'U') {
67650
- const length = { x: 2, u: 4, U: 8 }[next];
68218
+ const length = next === 'x' ? 2 : next === 'u' ? 4 : 8;
67651
68219
  res += parseCharCode(source, i + 1, length, onError);
67652
68220
  i += length;
67653
68221
  }
@@ -67717,12 +68285,14 @@ function parseCharCode(source, offset, length, onError) {
67717
68285
  const cc = source.substr(offset, length);
67718
68286
  const ok = cc.length === length && /^[0-9a-fA-F]+$/.test(cc);
67719
68287
  const code = ok ? parseInt(cc, 16) : NaN;
67720
- if (isNaN(code)) {
68288
+ try {
68289
+ return String.fromCodePoint(code);
68290
+ }
68291
+ catch {
67721
68292
  const raw = source.substr(offset - 2, length + 2);
67722
68293
  onError(offset - 2, 'BAD_DQ_ESCAPE', `Invalid escape sequence ${raw}`);
67723
68294
  return raw;
67724
68295
  }
67725
- return String.fromCodePoint(code);
67726
68296
  }
67727
68297
 
67728
68298
 
@@ -69035,6 +69605,8 @@ class Alias extends _Node_js__WEBPACK_IMPORTED_MODULE_3__.NodeBase {
69035
69605
  * instance of the `source` anchor before this node.
69036
69606
  */
69037
69607
  resolve(doc, ctx) {
69608
+ if (ctx?.maxAliasCount === 0)
69609
+ throw new ReferenceError('Alias resolution is disabled');
69038
69610
  let nodes;
69039
69611
  if (ctx?.aliasResolveCache) {
69040
69612
  nodes = ctx.aliasResolveCache;
@@ -70789,7 +71361,7 @@ class Lexer {
70789
71361
  const n = (yield* this.pushCount(1)) + (yield* this.pushSpaces(true));
70790
71362
  this.indentNext = this.indentValue + 1;
70791
71363
  this.indentValue += n;
70792
- return yield* this.parseBlockStart();
71364
+ return 'block-start';
70793
71365
  }
70794
71366
  return 'doc';
70795
71367
  }
@@ -71110,32 +71682,36 @@ class Lexer {
71110
71682
  return 0;
71111
71683
  }
71112
71684
  *pushIndicators() {
71113
- switch (this.charAt(0)) {
71114
- case '!':
71115
- return ((yield* this.pushTag()) +
71116
- (yield* this.pushSpaces(true)) +
71117
- (yield* this.pushIndicators()));
71118
- case '&':
71119
- return ((yield* this.pushUntil(isNotAnchorChar)) +
71120
- (yield* this.pushSpaces(true)) +
71121
- (yield* this.pushIndicators()));
71122
- case '-': // this is an error
71123
- case '?': // this is an error outside flow collections
71124
- case ':': {
71125
- const inFlow = this.flowLevel > 0;
71126
- const ch1 = this.charAt(1);
71127
- if (isEmpty(ch1) || (inFlow && flowIndicatorChars.has(ch1))) {
71128
- if (!inFlow)
71129
- this.indentNext = this.indentValue + 1;
71130
- else if (this.flowKey)
71131
- this.flowKey = false;
71132
- return ((yield* this.pushCount(1)) +
71133
- (yield* this.pushSpaces(true)) +
71134
- (yield* this.pushIndicators()));
71685
+ let n = 0;
71686
+ loop: while (true) {
71687
+ switch (this.charAt(0)) {
71688
+ case '!':
71689
+ n += yield* this.pushTag();
71690
+ n += yield* this.pushSpaces(true);
71691
+ continue loop;
71692
+ case '&':
71693
+ n += yield* this.pushUntil(isNotAnchorChar);
71694
+ n += yield* this.pushSpaces(true);
71695
+ continue loop;
71696
+ case '-': // this is an error
71697
+ case '?': // this is an error outside flow collections
71698
+ case ':': {
71699
+ const inFlow = this.flowLevel > 0;
71700
+ const ch1 = this.charAt(1);
71701
+ if (isEmpty(ch1) || (inFlow && flowIndicatorChars.has(ch1))) {
71702
+ if (!inFlow)
71703
+ this.indentNext = this.indentValue + 1;
71704
+ else if (this.flowKey)
71705
+ this.flowKey = false;
71706
+ n += yield* this.pushCount(1);
71707
+ n += yield* this.pushSpaces(true);
71708
+ continue loop;
71709
+ }
71135
71710
  }
71136
71711
  }
71712
+ break loop;
71137
71713
  }
71138
- return 0;
71714
+ return n;
71139
71715
  }
71140
71716
  *pushTag() {
71141
71717
  if (this.charAt(1) === '<') {
@@ -71328,6 +71904,14 @@ function getFirstKeyStartProps(prev) {
71328
71904
  }
71329
71905
  return prev.splice(i, prev.length);
71330
71906
  }
71907
+ function arrayPushArray(target, source) {
71908
+ // May exhaust call stack with large `source` array
71909
+ if (source.length < 1e5)
71910
+ Array.prototype.push.apply(target, source);
71911
+ else
71912
+ for (let i = 0; i < source.length; ++i)
71913
+ target.push(source[i]);
71914
+ }
71331
71915
  function fixFlowSeqItems(fc) {
71332
71916
  if (fc.start.type === 'flow-seq-start') {
71333
71917
  for (const it of fc.items) {
@@ -71340,12 +71924,12 @@ function fixFlowSeqItems(fc) {
71340
71924
  delete it.key;
71341
71925
  if (isFlowToken(it.value)) {
71342
71926
  if (it.value.end)
71343
- Array.prototype.push.apply(it.value.end, it.sep);
71927
+ arrayPushArray(it.value.end, it.sep);
71344
71928
  else
71345
71929
  it.value.end = it.sep;
71346
71930
  }
71347
71931
  else
71348
- Array.prototype.push.apply(it.start, it.sep);
71932
+ arrayPushArray(it.start, it.sep);
71349
71933
  delete it.sep;
71350
71934
  }
71351
71935
  }
@@ -71763,7 +72347,7 @@ class Parser {
71763
72347
  const prev = map.items[map.items.length - 2];
71764
72348
  const end = prev?.value?.end;
71765
72349
  if (Array.isArray(end)) {
71766
- Array.prototype.push.apply(end, it.start);
72350
+ arrayPushArray(end, it.start);
71767
72351
  end.push(this.sourceToken);
71768
72352
  map.items.pop();
71769
72353
  return;
@@ -71978,7 +72562,7 @@ class Parser {
71978
72562
  const prev = seq.items[seq.items.length - 2];
71979
72563
  const end = prev?.value?.end;
71980
72564
  if (Array.isArray(end)) {
71981
- Array.prototype.push.apply(end, it.start);
72565
+ arrayPushArray(end, it.start);
71982
72566
  end.push(this.sourceToken);
71983
72567
  seq.items.pop();
71984
72568
  return;
@@ -73214,18 +73798,18 @@ const isMergeKey = (ctx, key) => (merge.identify(key) ||
73214
73798
  merge.identify(key.value))) &&
73215
73799
  ctx?.doc.schema.tags.some(tag => tag.tag === merge.tag && tag.default);
73216
73800
  function addMergeToJSMap(ctx, map, value) {
73217
- value = ctx && (0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isAlias)(value) ? value.resolve(ctx.doc) : value;
73218
- if ((0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isSeq)(value))
73219
- for (const it of value.items)
73801
+ const source = resolveAliasValue(ctx, value);
73802
+ if ((0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isSeq)(source))
73803
+ for (const it of source.items)
73220
73804
  mergeValue(ctx, map, it);
73221
- else if (Array.isArray(value))
73222
- for (const it of value)
73805
+ else if (Array.isArray(source))
73806
+ for (const it of source)
73223
73807
  mergeValue(ctx, map, it);
73224
73808
  else
73225
- mergeValue(ctx, map, value);
73809
+ mergeValue(ctx, map, source);
73226
73810
  }
73227
73811
  function mergeValue(ctx, map, value) {
73228
- const source = ctx && (0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isAlias)(value) ? value.resolve(ctx.doc) : value;
73812
+ const source = resolveAliasValue(ctx, value);
73229
73813
  if (!(0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isMap)(source))
73230
73814
  throw new Error('Merge sources must be maps or map aliases');
73231
73815
  const srcMap = source.toJSON(null, ctx, Map);
@@ -73248,6 +73832,9 @@ function mergeValue(ctx, map, value) {
73248
73832
  }
73249
73833
  return map;
73250
73834
  }
73835
+ function resolveAliasValue(ctx, value) {
73836
+ return ctx && (0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isAlias)(value) ? value.resolve(ctx.doc, ctx) : value;
73837
+ }
73251
73838
 
73252
73839
 
73253
73840
 
@@ -74358,7 +74945,8 @@ function stringifyNumber({ format, minFractionDigits, tag, value }) {
74358
74945
  if (!format &&
74359
74946
  minFractionDigits &&
74360
74947
  (!tag || tag === 'tag:yaml.org,2002:float') &&
74361
- /^\d/.test(n)) {
74948
+ /^-?\d/.test(n) &&
74949
+ !n.includes('e')) {
74362
74950
  let i = n.indexOf('.');
74363
74951
  if (i < 0) {
74364
74952
  i = n.length;