@speclynx/apidom-overlay 6.1.2 → 6.2.0

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.
@@ -13970,13 +13970,15 @@ __webpack_require__.r(__webpack_exports__);
13970
13970
  /* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(19011);
13971
13971
  /* harmony import */ var _helpers_composeSignals_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(35144);
13972
13972
  /* harmony import */ var _helpers_trackStream_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(24426);
13973
- /* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(76487);
13974
- /* harmony import */ var _helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(79194);
13975
- /* harmony import */ var _helpers_resolveConfig_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(28451);
13976
- /* harmony import */ var _core_settle_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(40788);
13977
- /* harmony import */ var _helpers_estimateDataURLDecodedBytes_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(879);
13978
- /* harmony import */ var _env_data_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(18679);
13979
- /* harmony import */ var _helpers_sanitizeHeaderValue_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(51306);
13973
+ /* harmony import */ var _core_createMultipartBody_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(82531);
13974
+ /* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(76487);
13975
+ /* harmony import */ var _helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(79194);
13976
+ /* harmony import */ var _helpers_resolveConfig_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(28451);
13977
+ /* harmony import */ var _core_settle_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(40788);
13978
+ /* harmony import */ var _helpers_estimateDataURLDecodedBytes_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(879);
13979
+ /* harmony import */ var _env_data_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(18679);
13980
+ /* harmony import */ var _helpers_sanitizeHeaderValue_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(51306);
13981
+
13980
13982
 
13981
13983
 
13982
13984
 
@@ -14064,11 +14066,13 @@ const factory = (env) => {
14064
14066
  {
14065
14067
  Request: globalObject.Request,
14066
14068
  Response: globalObject.Response,
14069
+ Blob: globalObject.Blob,
14067
14070
  },
14068
14071
  env
14069
14072
  );
14070
14073
 
14071
- const { fetch: envFetch, Request, Response } = env;
14074
+ const envFetch = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].hasOwnProp(env, 'fetch') ? env.fetch : undefined;
14075
+ const { Request, Response, Blob } = env;
14072
14076
  const isFetchSupported = envFetch ? isFunction(envFetch) : typeof fetch === 'function';
14073
14077
  const isRequestSupported = isFunction(Request);
14074
14078
  const isResponseSupported = isFunction(Response);
@@ -14117,6 +14121,20 @@ const factory = (env) => {
14117
14121
  isReadableStreamSupported &&
14118
14122
  test(() => _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isReadableStream(new Response('').body));
14119
14123
 
14124
+ // Some runtimes reject every explicit cache mode. Use own defaults for both
14125
+ // probes so unrelated polluted options cannot affect cache-mode detection.
14126
+ const requestDefaults = Object.assign(Object.create(null), DEFAULT_REQUEST_OPTIONS);
14127
+
14128
+ if (isRequestSupported && !test(() => new Request(_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].origin, requestDefaults))) {
14129
+ delete requestDefaults.cache;
14130
+
14131
+ // Only omit cache when that makes Request construction succeed. Otherwise
14132
+ // retain the explicit default that protects supporting runtimes from pollution.
14133
+ if (!test(() => new Request(_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].origin, requestDefaults))) {
14134
+ requestDefaults.cache = DEFAULT_REQUEST_OPTIONS.cache;
14135
+ }
14136
+ }
14137
+
14120
14138
  const resolvers = {
14121
14139
  stream: supportsResponseStream && ((res) => res.body),
14122
14140
  };
@@ -14150,14 +14168,6 @@ const factory = (env) => {
14150
14168
  return body.size;
14151
14169
  }
14152
14170
 
14153
- if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isSpecCompliantForm(body)) {
14154
- const _request = new Request(_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].origin, {
14155
- method: 'POST',
14156
- body,
14157
- });
14158
- return (await _request.arrayBuffer()).byteLength;
14159
- }
14160
-
14161
14171
  if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isArrayBufferView(body) || _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isArrayBuffer(body)) {
14162
14172
  return body.byteLength;
14163
14173
  }
@@ -14194,7 +14204,7 @@ const factory = (env) => {
14194
14204
  maxContentLength,
14195
14205
  maxBodyLength,
14196
14206
  maxRedirects,
14197
- } = (0,_helpers_resolveConfig_js__WEBPACK_IMPORTED_MODULE_7__["default"])(config);
14207
+ } = (0,_helpers_resolveConfig_js__WEBPACK_IMPORTED_MODULE_8__["default"])(config);
14198
14208
 
14199
14209
  const hasMaxContentLength = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isNumber(maxContentLength) && maxContentLength > -1;
14200
14210
  const hasMaxBodyLength = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isNumber(maxBodyLength) && maxBodyLength > -1;
@@ -14220,11 +14230,12 @@ const factory = (env) => {
14220
14230
 
14221
14231
  let requestContentLength;
14222
14232
 
14223
- // AxiosError we raise while the request body is being streamed. Captured
14233
+ // AxiosErrors we raise while request or response bodies are being streamed. Captured
14224
14234
  // by identity so the catch block can surface it directly, regardless of
14225
14235
  // how the runtime wraps the resulting fetch rejection (undici exposes it
14226
14236
  // as `err.cause`; some browsers drop the original error entirely).
14227
14237
  let pendingBodyError = null;
14238
+ let pendingResponseError = null;
14228
14239
 
14229
14240
  const maxBodyLengthError = () =>
14230
14241
  new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"](
@@ -14248,8 +14259,9 @@ const factory = (env) => {
14248
14259
  };
14249
14260
  }
14250
14261
 
14262
+ let parsedURL;
14251
14263
  if (maybeWithAuthCredentials(url)) {
14252
- const parsedURL = new URL(url, _platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].origin);
14264
+ parsedURL = new URL(url, _platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].origin);
14253
14265
 
14254
14266
  if (!auth && (parsedURL.username || parsedURL.password)) {
14255
14267
  const urlUsername = decodeURIComponentSafe(parsedURL.username);
@@ -14278,8 +14290,8 @@ const factory = (env) => {
14278
14290
  // Enforce maxContentLength for data: URLs up-front so we never materialize
14279
14291
  // an oversized payload. The HTTP adapter applies the same check (see http.js
14280
14292
  // "if (protocol === 'data:')" branch).
14281
- if (hasMaxContentLength && typeof url === 'string' && url.startsWith('data:')) {
14282
- const estimated = (0,_helpers_estimateDataURLDecodedBytes_js__WEBPACK_IMPORTED_MODULE_9__["default"])(url);
14293
+ if (hasMaxContentLength && parsedURL && parsedURL.protocol === 'data:') {
14294
+ const estimated = (0,_helpers_estimateDataURLDecodedBytes_js__WEBPACK_IMPORTED_MODULE_10__["default"])(parsedURL.href);
14283
14295
  if (estimated > maxContentLength) {
14284
14296
  throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"](
14285
14297
  'maxContentLength size of ' + maxContentLength + ' exceeded',
@@ -14290,6 +14302,38 @@ const factory = (env) => {
14290
14302
  }
14291
14303
  }
14292
14304
 
14305
+ const formContentType =
14306
+ _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isSpecCompliantForm(data) && _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_6__["default"].from(own('headers')).getContentType();
14307
+ let formBoundary;
14308
+ if (
14309
+ _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isString(formContentType) &&
14310
+ /^multipart\/form-data(?:\s*;|$)/i.test(formContentType.trim())
14311
+ ) {
14312
+ const parameters = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_6__["default"].parseParameters(formContentType);
14313
+ if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].hasOwnProp(parameters, 'boundary')) formBoundary = parameters.boundary;
14314
+ }
14315
+
14316
+ if (
14317
+ _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isSpecCompliantForm(data) &&
14318
+ method !== 'get' &&
14319
+ method !== 'head' &&
14320
+ (hasMaxBodyLength ||
14321
+ (onUploadProgress && supportsRequestStream) ||
14322
+ formBoundary !== undefined)
14323
+ ) {
14324
+ data = (0,_core_createMultipartBody_js__WEBPACK_IMPORTED_MODULE_5__["default"])(
14325
+ data,
14326
+ Blob,
14327
+ hasMaxBodyLength ? maxBodyLength : Infinity,
14328
+ maxBodyLengthError,
14329
+ formBoundary
14330
+ );
14331
+ // Blob.type lowercases its value, including a case-sensitive boundary.
14332
+ // Retain the caller's header when an explicit boundary was serialized.
14333
+ headers.setContentType(formBoundary === undefined ? data.type : formContentType);
14334
+ requestContentLength = data.size;
14335
+ }
14336
+
14293
14337
  // Enforce maxBodyLength against known-size bodies before dispatch using
14294
14338
  // the body's *actual* size — never a caller-declared Content-Length,
14295
14339
  // which could under-report to slip an oversized body past the check.
@@ -14355,9 +14399,9 @@ const factory = (env) => {
14355
14399
  if (_request.body) {
14356
14400
  const [onProgress, flush] =
14357
14401
  (onUploadProgress &&
14358
- (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_6__.progressEventDecorator)(
14402
+ (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_7__.progressEventDecorator)(
14359
14403
  requestContentLength,
14360
- (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_6__.progressEventReducer)((0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_6__.asyncDecorator)(onUploadProgress))
14404
+ (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_7__.progressEventReducer)((0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_7__.asyncDecorator)(onUploadProgress))
14361
14405
  )) ||
14362
14406
  [];
14363
14407
 
@@ -14409,7 +14453,7 @@ const factory = (env) => {
14409
14453
  }
14410
14454
 
14411
14455
  // Set User-Agent header if not already set (fetch defaults to 'node' in Node.js)
14412
- headers.set('User-Agent', 'axios/' + _env_data_js__WEBPACK_IMPORTED_MODULE_10__.VERSION, false);
14456
+ headers.set('User-Agent', 'axios/' + _env_data_js__WEBPACK_IMPORTED_MODULE_11__.VERSION, false);
14413
14457
 
14414
14458
  const safeFetchOptions =
14415
14459
  fetchOptions == null ? fetchOptions : Object.assign(Object.create(null), fetchOptions);
@@ -14428,14 +14472,14 @@ const factory = (env) => {
14428
14472
  const resolvedOptions = Object.assign(Object.create(null), safeFetchOptions, {
14429
14473
  signal: composedSignal,
14430
14474
  method: method.toUpperCase(),
14431
- headers: (0,_helpers_sanitizeHeaderValue_js__WEBPACK_IMPORTED_MODULE_11__.toByteStringHeaderObject)(headers.normalize()),
14475
+ headers: (0,_helpers_sanitizeHeaderValue_js__WEBPACK_IMPORTED_MODULE_12__.toByteStringHeaderObject)(headers.normalize()),
14432
14476
  body: data,
14433
14477
  duplex: 'half',
14434
14478
  credentials: isCredentialsSupported ? withCredentials : undefined,
14435
14479
  });
14436
14480
 
14437
14481
  if (isRequestSupported) {
14438
- _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].forEach(DEFAULT_REQUEST_OPTIONS, (value, key) => {
14482
+ _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].forEach(requestDefaults, (value, key) => {
14439
14483
  if (resolvedOptions[key] === undefined) {
14440
14484
  resolvedOptions[key] = value;
14441
14485
  }
@@ -14464,7 +14508,7 @@ const factory = (env) => {
14464
14508
  ? _fetch(request, safeFetchOptions)
14465
14509
  : _fetch(url, resolvedOptions));
14466
14510
 
14467
- const responseHeaders = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_5__["default"].from(response.headers);
14511
+ const responseHeaders = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_6__["default"].from(response.headers);
14468
14512
 
14469
14513
  // Cheap pre-check: if the server honestly declares a content-length that
14470
14514
  // already exceeds the cap, reject before we start streaming.
@@ -14498,9 +14542,9 @@ const factory = (env) => {
14498
14542
 
14499
14543
  const [onProgress, flush] =
14500
14544
  (onDownloadProgress &&
14501
- (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_6__.progressEventDecorator)(
14545
+ (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_7__.progressEventDecorator)(
14502
14546
  responseContentLength,
14503
- (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_6__.progressEventReducer)((0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_6__.asyncDecorator)(onDownloadProgress), true)
14547
+ (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_7__.progressEventReducer)((0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_7__.asyncDecorator)(onDownloadProgress), true)
14504
14548
  )) ||
14505
14549
  [];
14506
14550
 
@@ -14509,12 +14553,12 @@ const factory = (env) => {
14509
14553
  if (hasMaxContentLength) {
14510
14554
  bytesRead = loadedBytes;
14511
14555
  if (bytesRead > maxContentLength) {
14512
- throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"](
14556
+ throw (pendingResponseError = new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"](
14513
14557
  'maxContentLength size of ' + maxContentLength + ' exceeded',
14514
14558
  _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"].ERR_BAD_RESPONSE,
14515
14559
  config,
14516
14560
  request
14517
- );
14561
+ ));
14518
14562
  }
14519
14563
  }
14520
14564
  onProgress && onProgress(loadedBytes);
@@ -14566,9 +14610,9 @@ const factory = (env) => {
14566
14610
  !isStreamResponse && unsubscribe && unsubscribe();
14567
14611
 
14568
14612
  return await new Promise((resolve, reject) => {
14569
- (0,_core_settle_js__WEBPACK_IMPORTED_MODULE_8__["default"])(resolve, reject, {
14613
+ (0,_core_settle_js__WEBPACK_IMPORTED_MODULE_9__["default"])(resolve, reject, {
14570
14614
  data: responseData,
14571
- headers: _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_5__["default"].from(response.headers),
14615
+ headers: _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_6__["default"].from(response.headers),
14572
14616
  status: response.status,
14573
14617
  statusText: response.statusText,
14574
14618
  config,
@@ -14600,7 +14644,7 @@ const factory = (env) => {
14600
14644
  }
14601
14645
 
14602
14646
  // Surface a maxBodyLength violation we raised while the request body was
14603
- // being streamed. Matching by identity (rather than reading
14647
+ // being streamed. Keeping the original error (rather than reading
14604
14648
  // `err.cause.isAxiosError`) keeps the error deterministic across runtimes
14605
14649
  // and avoids both prototype-pollution reads and mis-attributing a foreign
14606
14650
  // AxiosError that merely happened to land in `err.cause`.
@@ -14609,6 +14653,10 @@ const factory = (env) => {
14609
14653
  throw pendingBodyError;
14610
14654
  }
14611
14655
 
14656
+ if (pendingResponseError) {
14657
+ throw pendingResponseError;
14658
+ }
14659
+
14612
14660
  // Re-throw AxiosErrors we raised synchronously (data: URL / content-length
14613
14661
  // pre-checks, response size enforcement) without re-wrapping them.
14614
14662
  if (err instanceof _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"]) {
@@ -14644,9 +14692,15 @@ const factory = (env) => {
14644
14692
  const seedCache = new Map();
14645
14693
 
14646
14694
  const getFetch = (config) => {
14647
- let env = (config && config.env) || {};
14648
- const { fetch, Request, Response } = env;
14649
- const seeds = [Request, Response, fetch];
14695
+ const env = Object.create(null);
14696
+ const configuredEnv = config && _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].hasOwnProp(config, 'env') && config.env;
14697
+ ['fetch', 'Request', 'Response', 'Blob'].forEach((key) => {
14698
+ if (configuredEnv && _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].hasOwnProp(configuredEnv, key)) {
14699
+ env[key] = configuredEnv[key];
14700
+ }
14701
+ });
14702
+ const { fetch, Request, Response, Blob } = env;
14703
+ const seeds = [Request, Response, fetch, Blob];
14650
14704
 
14651
14705
  let len = seeds.length,
14652
14706
  i = len,
@@ -14692,9 +14746,11 @@ __webpack_require__.r(__webpack_exports__);
14692
14746
  /* harmony import */ var _helpers_parseProtocol_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(43406);
14693
14747
  /* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(79455);
14694
14748
  /* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(76487);
14695
- /* harmony import */ var _helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(79194);
14696
- /* harmony import */ var _helpers_resolveConfig_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(28451);
14697
- /* harmony import */ var _helpers_sanitizeHeaderValue_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(51306);
14749
+ /* harmony import */ var _helpers_cookies_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(65986);
14750
+ /* harmony import */ var _helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(79194);
14751
+ /* harmony import */ var _helpers_resolveConfig_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(28451);
14752
+ /* harmony import */ var _helpers_sanitizeHeaderValue_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(51306);
14753
+
14698
14754
 
14699
14755
 
14700
14756
 
@@ -14713,17 +14769,60 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
14713
14769
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isXHRAdapterSupported &&
14714
14770
  function (config) {
14715
14771
  return new Promise(function dispatchXhrRequest(resolve, reject) {
14716
- const _config = (0,_helpers_resolveConfig_js__WEBPACK_IMPORTED_MODULE_10__["default"])(config);
14772
+ let useAsyncXsrf;
14773
+ try {
14774
+ const store =
14775
+ _platform_index_js__WEBPACK_IMPORTED_MODULE_7__["default"].hasStandardBrowserEnv && typeof window !== 'undefined' && window.cookieStore;
14776
+ useAsyncXsrf = store && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(store.get);
14777
+ } catch (e) {
14778
+ // A restricted Cookie Store getter must retain the synchronous fallback.
14779
+ }
14780
+ let xsrfCookieName;
14781
+ const _config = (0,_helpers_resolveConfig_js__WEBPACK_IMPORTED_MODULE_11__["default"])(
14782
+ config,
14783
+ useAsyncXsrf
14784
+ ? (name) => {
14785
+ xsrfCookieName = name;
14786
+ return null;
14787
+ }
14788
+ : undefined
14789
+ );
14717
14790
  let requestData = _config.data;
14718
14791
  const requestHeaders = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_8__["default"].from(_config.headers).normalize();
14719
14792
  let { responseType, onUploadProgress, onDownloadProgress } = _config;
14720
14793
  let onCanceled;
14794
+ let timeoutId;
14721
14795
  let uploadThrottled, downloadThrottled;
14722
14796
  let flushUpload, flushDownload, flushDownloadWithEvent;
14723
14797
 
14724
14798
  function done() {
14725
- flushUpload && flushUpload(); // flush events
14726
- flushDownload && flushDownload(); // flush events
14799
+ clearTimeout(timeoutId);
14800
+ // A final progress callback must not prevent the remaining cleanup.
14801
+ // Report errors asynchronously, as onloadend and the throttle timer do.
14802
+ try {
14803
+ flushUpload && flushUpload(); // flush events
14804
+ } catch (err) {
14805
+ setTimeout(() => {
14806
+ throw err;
14807
+ });
14808
+ }
14809
+ try {
14810
+ flushDownload && flushDownload(); // flush events
14811
+ } catch (err) {
14812
+ setTimeout(() => {
14813
+ throw err;
14814
+ });
14815
+ }
14816
+
14817
+ // A flush can synchronously cancel the request and reenter done().
14818
+ // In that case the inner call has already detached these listeners.
14819
+ if (request) {
14820
+ downloadThrottled && request.removeEventListener('progress', downloadThrottled);
14821
+ if (request.upload) {
14822
+ uploadThrottled && request.upload.removeEventListener('progress', uploadThrottled);
14823
+ flushUpload && request.upload.removeEventListener('loadend', flushUpload);
14824
+ }
14825
+ }
14727
14826
 
14728
14827
  _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);
14729
14828
 
@@ -14874,6 +14973,7 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
14874
14973
 
14875
14974
  // Handle timeout
14876
14975
  request.ontimeout = function handleTimeout() {
14976
+ if (!request) return;
14877
14977
  let timeoutErrorMessage = _config.timeout
14878
14978
  ? 'timeout of ' + _config.timeout + 'ms exceeded'
14879
14979
  : 'timeout exceeded';
@@ -14898,13 +14998,6 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
14898
14998
  // Remove Content-Type if data is undefined
14899
14999
  requestData === undefined && requestHeaders.setContentType(null);
14900
15000
 
14901
- // Add headers to the request
14902
- if ('setRequestHeader' in request) {
14903
- _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach((0,_helpers_sanitizeHeaderValue_js__WEBPACK_IMPORTED_MODULE_11__.toByteStringHeaderObject)(requestHeaders), function setRequestHeader(val, key) {
14904
- request.setRequestHeader(key, val);
14905
- });
14906
- }
14907
-
14908
15001
  // Add withCredentials to request if needed
14909
15002
  if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(_config.withCredentials)) {
14910
15003
  request.withCredentials = !!_config.withCredentials;
@@ -14917,7 +15010,7 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
14917
15010
 
14918
15011
  // Handle progress if needed
14919
15012
  if (onDownloadProgress) {
14920
- [downloadThrottled, flushDownload, flushDownloadWithEvent] = (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_9__.progressEventReducer)(
15013
+ [downloadThrottled, flushDownload, flushDownloadWithEvent] = (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_10__.progressEventReducer)(
14921
15014
  onDownloadProgress,
14922
15015
  true
14923
15016
  );
@@ -14926,7 +15019,7 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
14926
15019
 
14927
15020
  // Not all browsers support upload events
14928
15021
  if (onUploadProgress && request.upload) {
14929
- [uploadThrottled, flushUpload] = (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_9__.progressEventReducer)(onUploadProgress);
15022
+ [uploadThrottled, flushUpload] = (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_10__.progressEventReducer)(onUploadProgress);
14930
15023
 
14931
15024
  request.upload.addEventListener('progress', uploadThrottled);
14932
15025
 
@@ -14941,12 +15034,14 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
14941
15034
  return;
14942
15035
  }
14943
15036
  reject(!cancel || cancel.type ? new _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_4__["default"](null, config, request) : cancel);
14944
- request.abort();
15037
+ const xhr = request;
14945
15038
  done();
14946
15039
  request = null;
15040
+ xhr.abort();
14947
15041
  };
14948
15042
 
14949
15043
  _config.cancelToken && _config.cancelToken.subscribe(onCanceled);
15044
+ if (!request) return;
14950
15045
  if (_config.signal) {
14951
15046
  _config.signal.aborted
14952
15047
  ? onCanceled()
@@ -14954,6 +15049,8 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
14954
15049
  }
14955
15050
  }
14956
15051
 
15052
+ if (!request) return;
15053
+
14957
15054
  const protocol = (0,_helpers_parseProtocol_js__WEBPACK_IMPORTED_MODULE_6__["default"])(_config.url);
14958
15055
 
14959
15056
  if (protocol && !_platform_index_js__WEBPACK_IMPORTED_MODULE_7__["default"].protocols.includes(protocol)) {
@@ -14968,8 +15065,73 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
14968
15065
  return;
14969
15066
  }
14970
15067
 
14971
- // Send the request
14972
- request.send(requestData || null);
15068
+ const sendRequest = () => {
15069
+ if (!request) return;
15070
+ // Apply headers after an asynchronous XSRF read so existing headers are
15071
+ // replaced through AxiosHeaders rather than appended by the native XHR.
15072
+ if ('setRequestHeader' in request) {
15073
+ _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(
15074
+ (0,_helpers_sanitizeHeaderValue_js__WEBPACK_IMPORTED_MODULE_12__.toByteStringHeaderObject)(requestHeaders),
15075
+ function setRequestHeader(val, key) {
15076
+ request.setRequestHeader(key, val);
15077
+ }
15078
+ );
15079
+ }
15080
+ request.send(requestData || null);
15081
+ };
15082
+
15083
+ if (xsrfCookieName) {
15084
+ // Native XHR timeout starts at send(). Cover cookie preparation and the
15085
+ // subsequent request with the same budget and existing timeout handler.
15086
+ const now =
15087
+ typeof performance !== 'undefined' && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(performance.now)
15088
+ ? () => performance.now()
15089
+ : Date.now;
15090
+ const deadline = request.timeout > 0 ? now() + Number(request.timeout) : undefined;
15091
+ const abortOnTimeout = () => {
15092
+ if (!request) return;
15093
+ const xhr = request;
15094
+ xhr.ontimeout();
15095
+ xhr.abort();
15096
+ };
15097
+ if (deadline !== undefined) {
15098
+ const scheduleTimeout = () => {
15099
+ const remaining = deadline - now();
15100
+ if (remaining > 0) {
15101
+ // Browser timers overflow above the signed 32-bit delay limit.
15102
+ timeoutId = setTimeout(scheduleTimeout, Math.min(remaining, 0x7fffffff));
15103
+ } else {
15104
+ abortOnTimeout();
15105
+ }
15106
+ };
15107
+ scheduleTimeout();
15108
+ }
15109
+
15110
+ _helpers_cookies_js__WEBPACK_IMPORTED_MODULE_9__["default"]
15111
+ .readAsync(xsrfCookieName)
15112
+ .then((value) => {
15113
+ if (!request) return;
15114
+ // Promise callbacks may run before an overdue timer after a busy task.
15115
+ if (deadline !== undefined && now() >= deadline) {
15116
+ abortOnTimeout();
15117
+ return;
15118
+ }
15119
+ if (value) {
15120
+ const headerName =
15121
+ _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(_config, 'xsrfHeaderName') && _config.xsrfHeaderName;
15122
+ requestHeaders.set(headerName, value);
15123
+ }
15124
+ sendRequest();
15125
+ })
15126
+ .catch((error) => {
15127
+ if (!request) return;
15128
+ reject(_core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"].from(error, null, config, request));
15129
+ done();
15130
+ request = null;
15131
+ });
15132
+ } else {
15133
+ sendRequest();
15134
+ }
14973
15135
  });
14974
15136
  });
14975
15137
 
@@ -15316,6 +15478,8 @@ __webpack_require__.r(__webpack_exports__);
15316
15478
  /* harmony import */ var _helpers_validator_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(62215);
15317
15479
  /* harmony import */ var _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(76487);
15318
15480
  /* harmony import */ var _defaults_transitional_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(69006);
15481
+ /* harmony import */ var _AxiosError_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(19011);
15482
+
15319
15483
 
15320
15484
 
15321
15485
 
@@ -15331,6 +15495,37 @@ __webpack_require__.r(__webpack_exports__);
15331
15495
 
15332
15496
  const validators = _helpers_validator_js__WEBPACK_IMPORTED_MODULE_7__["default"].validators;
15333
15497
 
15498
+ // Recognize header maps without consuming objects intended as literal values.
15499
+ // AxiosHeaders from other builds share a brand and header-container interface,
15500
+ // but not constructor identity. A tag and toJSON alone can describe a literal.
15501
+ const isHeadersBucket = (value) => {
15502
+ if (value == null || _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(value) || value instanceof _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_8__["default"]) {
15503
+ return true;
15504
+ }
15505
+
15506
+ try {
15507
+ return (
15508
+ _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isObject(value) &&
15509
+ _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].getSafeProp(value, Symbol.toStringTag) === 'AxiosHeaders' &&
15510
+ [
15511
+ 'toJSON',
15512
+ 'set',
15513
+ 'get',
15514
+ 'has',
15515
+ 'delete',
15516
+ 'clear',
15517
+ 'normalize',
15518
+ 'concat',
15519
+ 'toString',
15520
+ Symbol.iterator,
15521
+ ].every((method) => _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].getSafeProp(value, method)))
15522
+ );
15523
+ } catch (e) {
15524
+ // A failed optional brand probe must not prevent literal header serialization.
15525
+ return false;
15526
+ }
15527
+ };
15528
+
15334
15529
  /**
15335
15530
  * Create a new instance of Axios
15336
15531
  *
@@ -15377,16 +15572,26 @@ class Axios {
15377
15572
 
15378
15573
  if (!err.stack) {
15379
15574
  err.stack = stack;
15380
- // match without the 2 top stack lines
15381
15575
  } else if (stack) {
15576
+ // Match a common suffix after the 2 top frames when available,
15577
+ // otherwise compare the full reconstructed stack.
15382
15578
  const firstNewlineIndex = stack.indexOf('\n');
15383
15579
  const secondNewlineIndex =
15384
15580
  firstNewlineIndex === -1 ? -1 : stack.indexOf('\n', firstNewlineIndex + 1);
15385
- const stackWithoutTwoTopLines =
15386
- secondNewlineIndex === -1 ? '' : stack.slice(secondNewlineIndex + 1);
15387
-
15388
- if (!String(err.stack).endsWith(stackWithoutTwoTopLines)) {
15389
- err.stack += '\n' + stack;
15581
+ const duplicateCheckSuffix =
15582
+ secondNewlineIndex === -1 ? stack : stack.slice(secondNewlineIndex + 1);
15583
+
15584
+ // `AxiosError.from()` may have already inlined the wrapped error's
15585
+ // stack under a `Caused by:` marker. Keep the reconstructed caller
15586
+ // frames ahead of that marker so stack-only reporters do not read
15587
+ // them as part of the low-level cause.
15588
+ const currentStack = String(err.stack);
15589
+ const causeIndex = (0,_AxiosError_js__WEBPACK_IMPORTED_MODULE_10__.getCauseStackIndex)(err, currentStack);
15590
+ const stackHead = causeIndex === -1 ? currentStack : currentStack.slice(0, causeIndex);
15591
+ const causeSection = causeIndex === -1 ? '' : currentStack.slice(causeIndex);
15592
+
15593
+ if (!stackHead.endsWith(duplicateCheckSuffix)) {
15594
+ err.stack = stackHead + '\n' + stack + causeSection;
15390
15595
  }
15391
15596
  }
15392
15597
  } catch (e) {
@@ -15422,6 +15627,7 @@ class Axios {
15422
15627
  legacyInterceptorReqResOrdering: validators.transitional(validators.boolean),
15423
15628
  advertiseZstdAcceptEncoding: validators.transitional(validators.boolean),
15424
15629
  validateStatusUndefinedResolves: validators.transitional(validators.boolean),
15630
+ encodeBasicAuthUsername: validators.transitional(validators.boolean),
15425
15631
  },
15426
15632
  false
15427
15633
  );
@@ -15447,7 +15653,10 @@ class Axios {
15447
15653
  // Set config.allowAbsoluteUrls
15448
15654
  if (config.allowAbsoluteUrls !== undefined) {
15449
15655
  // do nothing
15450
- } else if (this.defaults.allowAbsoluteUrls !== undefined) {
15656
+ } else if (
15657
+ _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(this.defaults, 'allowAbsoluteUrls') &&
15658
+ this.defaults.allowAbsoluteUrls !== undefined
15659
+ ) {
15451
15660
  config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;
15452
15661
  } else {
15453
15662
  config.allowAbsoluteUrls = true;
@@ -15469,12 +15678,21 @@ class Axios {
15469
15678
  'get'
15470
15679
  ).toLowerCase();
15471
15680
 
15472
- // Flatten headers
15473
- let contextHeaders = headers && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].merge(headers.common, headers[config.method]);
15681
+ // Flatten header defaults without consuming literal method-named headers.
15682
+ const commonHeaders = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].getSafeProp(headers, 'common');
15683
+ const methodHeaders = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].getSafeProp(headers, config.method);
15684
+ const contextHeaders =
15685
+ headers &&
15686
+ _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].merge(
15687
+ isHeadersBucket(commonHeaders) ? commonHeaders : undefined,
15688
+ isHeadersBucket(methodHeaders) ? methodHeaders : undefined
15689
+ );
15474
15690
 
15475
15691
  headers &&
15476
15692
  _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(_methodList_js__WEBPACK_IMPORTED_MODULE_6__["default"].concat('common'), (method) => {
15477
- delete headers[method];
15693
+ if (isHeadersBucket(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].getSafeProp(headers, method))) {
15694
+ delete headers[method];
15695
+ }
15478
15696
  });
15479
15697
 
15480
15698
  config.headers = _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_8__["default"].concat(contextHeaders, headers);
@@ -15583,7 +15801,7 @@ class Axios {
15583
15801
  // Provide aliases for supported request methods
15584
15802
  _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
15585
15803
  /*eslint func-names:0*/
15586
- Axios.prototype[method] = function (url, config) {
15804
+ Axios.prototype[method] = async function (url, config) {
15587
15805
  return this.request(
15588
15806
  (0,_mergeConfig_js__WEBPACK_IMPORTED_MODULE_4__["default"])(config || {}, {
15589
15807
  method,
@@ -15596,7 +15814,7 @@ _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(['delete', 'get', 'hea
15596
15814
 
15597
15815
  _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(['post', 'put', 'patch', 'query'], function forEachMethodWithData(method) {
15598
15816
  function generateHTTPMethod(isForm) {
15599
- return function httpMethod(url, data, config) {
15817
+ return async function httpMethod(url, data, config) {
15600
15818
  return this.request(
15601
15819
  (0,_mergeConfig_js__WEBPACK_IMPORTED_MODULE_4__["default"])(config || {}, {
15602
15820
  method,
@@ -15635,6 +15853,9 @@ _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(['post', 'put', 'patch
15635
15853
 
15636
15854
  "use strict";
15637
15855
  __webpack_require__.r(__webpack_exports__);
15856
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
15857
+ /* harmony export */ getCauseStackIndex: () => (/* binding */ getCauseStackIndex)
15858
+ /* harmony export */ });
15638
15859
  /* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(68750);
15639
15860
  /* harmony import */ var _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(76487);
15640
15861
 
@@ -15734,6 +15955,61 @@ function aggregateErrorMessage(error) {
15734
15955
  return message || error.name || 'AggregateError';
15735
15956
  }
15736
15957
 
15958
+ // Shared with `Axios.prototype.request`, which splices the reconstructed
15959
+ // caller frames in ahead of this marker.
15960
+ const CAUSED_BY_SEPARATOR = '\nCaused by: ';
15961
+ const $causeStack = Symbol('causeStack');
15962
+
15963
+ // Match the section we appended, not marker-like text in an error message or
15964
+ // a replacement stack supplied by the caller. Do not re-read the cause's stack.
15965
+ function getCauseStackIndex(error, stack) {
15966
+ const causeStack = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(error, $causeStack) && error[$causeStack];
15967
+
15968
+ return causeStack && stack.endsWith(causeStack) ? stack.length - causeStack.length : -1;
15969
+ }
15970
+
15971
+ /**
15972
+ * Append the stack of a wrapped error to `target.stack`.
15973
+ *
15974
+ * `cause` already exposes the original error for tooling that walks the standard
15975
+ * cause chain, but many error reporters read `stack` and nothing else. Inlining
15976
+ * the wrapped stack there means those reporters surface the underlying failure
15977
+ * instead of the axios frames that normalized it (see #6670).
15978
+ *
15979
+ * Every read is defensive: a custom `Error.prepareStackTrace` hook, a runtime
15980
+ * without stack support, or a replaced `stack` property can leave the value
15981
+ * missing, non-string, or read-only, and normalizing an error must not throw
15982
+ * because of that.
15983
+ *
15984
+ * @param {Error} target The AxiosError being built.
15985
+ * @param {Error} source The error being wrapped.
15986
+ *
15987
+ * @returns {void}
15988
+ */
15989
+ function appendCauseStack(target, source) {
15990
+ try {
15991
+ const sourceStack = source && source.stack;
15992
+
15993
+ if (typeof sourceStack !== 'string' || !sourceStack) {
15994
+ return;
15995
+ }
15996
+
15997
+ const targetStack = target.stack;
15998
+
15999
+ if (typeof targetStack !== 'string' || !targetStack) {
16000
+ return;
16001
+ }
16002
+
16003
+ // Each call to `from()` creates a fresh target. Re-wrapping includes the
16004
+ // previous stack verbatim, adding one cause section per wrap.
16005
+ const causeStack = CAUSED_BY_SEPARATOR + sourceStack;
16006
+ target.stack = targetStack + causeStack;
16007
+ Object.defineProperty(target, $causeStack, { __proto__: null, value: causeStack });
16008
+ } catch (e) {
16009
+ // Ignore failures from custom stack hooks or un-writable stack properties.
16010
+ }
16011
+ }
16012
+
15737
16013
  class AxiosError extends Error {
15738
16014
  static from(error, code, config, request, response, customProps) {
15739
16015
  // `AggregateError` (thrown by Node on dual-stack/Happy-Eyeballs connection
@@ -15760,6 +16036,10 @@ class AxiosError extends Error {
15760
16036
  });
15761
16037
  axiosError.name = error.name;
15762
16038
 
16039
+ // Inline the wrapped stack for reporters that read only `stack`; the `cause`
16040
+ // property above already covers cause-aware tooling.
16041
+ appendCauseStack(axiosError, error);
16042
+
15763
16043
  // Preserve status from the original error if not already set from response
15764
16044
  if (error.status != null && axiosError.status == null) {
15765
16045
  axiosError.status = error.status;
@@ -15858,6 +16138,7 @@ AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED = 'ERR_FORM_DATA_DEPTH_EXCEEDED';
15858
16138
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AxiosError);
15859
16139
 
15860
16140
  /* harmony export */ __webpack_require__.d(__webpack_exports__, [
16141
+ /* harmony export */ "CAUSED_BY_SEPARATOR", 0, /* binding */ CAUSED_BY_SEPARATOR,
15861
16142
  /* harmony export */ "REDACTED", 0, /* binding */ REDACTED,
15862
16143
  /* harmony export */ "default", 0, __WEBPACK_DEFAULT_EXPORT__
15863
16144
  /* harmony export */ ]);
@@ -16025,9 +16306,22 @@ function parseParameters(value) {
16025
16306
 
16026
16307
  const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
16027
16308
 
16309
+ // `__proto__` is a valid field name, and the one name the uppercase mapping at
16310
+ // the bottom of this file cannot reach: it is inherited from Object.prototype
16311
+ // instead of being declared on AxiosHeaders.prototype, so `self.__proto__ = v`
16312
+ // runs the inherited setter. That silently discards the header, and an array
16313
+ // value replaces the instance prototype, taking every method with it.
16314
+ // Store it under the same kind of case variant that mapping uses for `set` and
16315
+ // `constructor`. Header lookup is caseless, so it reads back under either
16316
+ // spelling, and no own `__proto__` slot is ever created for a later
16317
+ // `Object.assign` to copy onto a plain object through the same setter.
16318
+ const PROTO_HEADER_SLOT = '__Proto__';
16319
+
16320
+ const headerSlot = (name) => (name === '__proto__' ? PROTO_HEADER_SLOT : name);
16321
+
16028
16322
  function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
16029
16323
  if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(filter)) {
16030
- return filter.call(this, value, header);
16324
+ return filter.call(context, value, header);
16031
16325
  }
16032
16326
 
16033
16327
  if (isHeaderNameFilter) {
@@ -16093,7 +16387,7 @@ class AxiosHeaders {
16093
16387
  _rewrite === true ||
16094
16388
  (_rewrite === undefined && self[key] !== false)
16095
16389
  ) {
16096
- self[key || _header] = normalizeValue(_value);
16390
+ self[headerSlot(key || _header)] = normalizeValue(_value);
16097
16391
  }
16098
16392
  }
16099
16393
 
@@ -16222,7 +16516,7 @@ class AxiosHeaders {
16222
16516
 
16223
16517
  normalize(format) {
16224
16518
  const self = this;
16225
- const headers = {};
16519
+ const headers = Object.create(null);
16226
16520
 
16227
16521
  _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(this, (value, header) => {
16228
16522
  const key = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].findKey(headers, header);
@@ -16233,7 +16527,7 @@ class AxiosHeaders {
16233
16527
  return;
16234
16528
  }
16235
16529
 
16236
- const normalized = format ? formatHeader(header) : String(header).trim();
16530
+ const normalized = headerSlot(format ? formatHeader(header) : String(header).trim());
16237
16531
 
16238
16532
  if (normalized !== header) {
16239
16533
  delete self[header];
@@ -16384,6 +16678,16 @@ function trimHandlers(handlers) {
16384
16678
  }
16385
16679
  }
16386
16680
 
16681
+ // Preserve the array-key coercion used before IDs were stored in a Map, without
16682
+ // treating null, empty strings, or noncanonical numeric strings as ID zero.
16683
+ function normalizeHandlerId(id) {
16684
+ if (typeof id === 'string' && id !== '' && String(Number(id)) === id) {
16685
+ return Number(id);
16686
+ }
16687
+
16688
+ return id;
16689
+ }
16690
+
16387
16691
  function syncHandlerEntries(manager, internals) {
16388
16692
  const handlers = manager.handlers;
16389
16693
  const length = countHandlers(handlers);
@@ -16466,10 +16770,11 @@ class InterceptorManager {
16466
16770
 
16467
16771
  syncHandlerEntries(this, internals);
16468
16772
 
16469
- const entry = internals.handlerEntries.get(id);
16773
+ const handlerId = normalizeHandlerId(id);
16774
+ const entry = internals.handlerEntries.get(handlerId);
16470
16775
 
16471
16776
  if (entry) {
16472
- internals.handlerEntries.delete(id);
16777
+ internals.handlerEntries.delete(handlerId);
16473
16778
 
16474
16779
  // Ignore IDs invalidated by clear or direct replacement of handlers.
16475
16780
  if (this.handlers[entry.index] !== entry.handler) {
@@ -16538,6 +16843,69 @@ class InterceptorManager {
16538
16843
  /* harmony export */ ]);
16539
16844
 
16540
16845
 
16846
+ /***/ },
16847
+
16848
+ /***/ 30035
16849
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
16850
+
16851
+ "use strict";
16852
+ __webpack_require__.r(__webpack_exports__);
16853
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
16854
+ /* harmony export */ "default": () => (/* binding */ assertParamsAcyclic)
16855
+ /* harmony export */ });
16856
+ /* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(68750);
16857
+ /* harmony import */ var _AxiosError_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(19011);
16858
+
16859
+
16860
+
16861
+
16862
+
16863
+ function assertParamsAcyclic(params) {
16864
+ const pending = [{ value: params }];
16865
+ const active = new WeakSet();
16866
+ const visited = new WeakSet();
16867
+
16868
+ while (pending.length) {
16869
+ const { value, done } = pending.pop();
16870
+ if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(value) && !_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(value)) continue;
16871
+ if (done) {
16872
+ active.delete(value);
16873
+ continue;
16874
+ }
16875
+ if (active.has(value)) {
16876
+ throw new _AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"](
16877
+ 'Circular reference detected in params',
16878
+ _AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].ERR_BAD_OPTION_VALUE
16879
+ );
16880
+ }
16881
+ if (visited.has(value)) continue;
16882
+ visited.add(value);
16883
+ active.add(value);
16884
+ pending.push({ value, done: true });
16885
+
16886
+ const keys = Object.keys(value);
16887
+ if (Object.getOwnPropertySymbols && Object.getOwnPropertyDescriptor) {
16888
+ Object.getOwnPropertySymbols(value).forEach((key) => {
16889
+ const descriptor = Object.getOwnPropertyDescriptor(value, key);
16890
+ if (descriptor && descriptor.enumerable) keys.push(key);
16891
+ });
16892
+ }
16893
+ // Shallow array elements retain fields filtered during plain-object merges.
16894
+ // Inspect reserved data properties without evaluating their accessors.
16895
+ keys.forEach((key) => {
16896
+ if (key === '__proto__' || key === 'constructor' || key === 'prototype') {
16897
+ const descriptor = Object.getOwnPropertyDescriptor(value, key);
16898
+ if (descriptor && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(descriptor, 'value')) {
16899
+ pending.push({ value: descriptor.value });
16900
+ }
16901
+ } else {
16902
+ pending.push({ value: value[key] });
16903
+ }
16904
+ });
16905
+ }
16906
+ }
16907
+
16908
+
16541
16909
  /***/ },
16542
16910
 
16543
16911
  /***/ 22921
@@ -16630,6 +16998,59 @@ function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls, config) {
16630
16998
  }
16631
16999
 
16632
17000
 
17001
+ /***/ },
17002
+
17003
+ /***/ 82531
17004
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
17005
+
17006
+ "use strict";
17007
+ __webpack_require__.r(__webpack_exports__);
17008
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
17009
+ /* harmony export */ "default": () => (/* binding */ createMultipartBody)
17010
+ /* harmony export */ });
17011
+ /* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(68750);
17012
+ /* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(79455);
17013
+ /* harmony import */ var _AxiosError_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(19011);
17014
+ /* harmony import */ var _helpers_formDataToBlob_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(59893);
17015
+
17016
+
17017
+
17018
+
17019
+
17020
+ function createMultipartBody(form, Blob, limit, limitError, boundary) {
17021
+ // Report missing Blob support before trying to select a random source.
17022
+ if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(Blob)) {
17023
+ throw new _AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"]('Blob is not supported', _AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"].ERR_NOT_SUPPORT);
17024
+ }
17025
+
17026
+ if (boundary === undefined) {
17027
+ if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(_platform_index_js__WEBPACK_IMPORTED_MODULE_1__["default"].generateString)) {
17028
+ boundary = 'axios-' + _platform_index_js__WEBPACK_IMPORTED_MODULE_1__["default"].generateString(36, '0123456789abcdef');
17029
+ } else {
17030
+ const crypto = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].global.crypto;
17031
+ if (!crypto || !_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(crypto.getRandomValues)) {
17032
+ throw new _AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"]('Random byte generation is not supported', _AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"].ERR_NOT_SUPPORT);
17033
+ }
17034
+ const random = new Uint8Array(18);
17035
+ crypto.getRandomValues(random);
17036
+ boundary =
17037
+ 'axios-' + Array.from(random, (value) => ('0' + value.toString(16)).slice(-2)).join('');
17038
+ }
17039
+ }
17040
+
17041
+ try {
17042
+ return (0,_helpers_formDataToBlob_js__WEBPACK_IMPORTED_MODULE_3__["default"])(form, Blob, limit, limitError, boundary);
17043
+ } catch (error) {
17044
+ if (error instanceof _helpers_formDataToBlob_js__WEBPACK_IMPORTED_MODULE_3__.FormDataError) {
17045
+ const code =
17046
+ error.reason === 'boundary' ? _AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"].ERR_BAD_OPTION_VALUE : _AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"].ERR_BAD_REQUEST;
17047
+ throw new _AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"](error.message, code);
17048
+ }
17049
+ throw error;
17050
+ }
17051
+ }
17052
+
17053
+
16633
17054
  /***/ },
16634
17055
 
16635
17056
  /***/ 97844
@@ -16674,6 +17095,21 @@ function throwIfCancellationRequested(config) {
16674
17095
  }
16675
17096
  }
16676
17097
 
17098
+ /**
17099
+ * Milliseconds elapsed since `start`, floored at zero.
17100
+ *
17101
+ * Wall-clock, to match the rest of the codebase (speedometer, throttle,
17102
+ * AxiosTransformStream). A backwards clock adjustment mid-request would
17103
+ * otherwise produce a negative duration, so the result is clamped.
17104
+ *
17105
+ * @param {number} start Timestamp from `Date.now()`
17106
+ *
17107
+ * @returns {number} Non-negative elapsed milliseconds
17108
+ */
17109
+ function elapsedSince(start) {
17110
+ return Math.max(0, Date.now() - start);
17111
+ }
17112
+
16677
17113
  /**
16678
17114
  * Dispatch a request to the server using the configured adapter.
16679
17115
  *
@@ -16700,10 +17136,14 @@ function dispatchRequest(_config) {
16700
17136
 
16701
17137
  const adapter = _adapters_adapters_js__WEBPACK_IMPORTED_MODULE_5__["default"].getAdapter(config.adapter || _defaults_index_js__WEBPACK_IMPORTED_MODULE_2__["default"].adapter, config);
16702
17138
 
17139
+ const start = Date.now();
17140
+
16703
17141
  return adapter(config).then(
16704
17142
  function onAdapterResolution(response) {
16705
17143
  throwIfCancellationRequested(config);
16706
17144
 
17145
+ response.duration = elapsedSince(start);
17146
+
16707
17147
  // Expose the current response on config so that transformResponse can
16708
17148
  // attach it to any AxiosError it throws (e.g. on JSON parse failure).
16709
17149
  // We clean it up afterwards to avoid polluting the config object.
@@ -16724,6 +17164,7 @@ function dispatchRequest(_config) {
16724
17164
 
16725
17165
  // Transform response data
16726
17166
  if (reason && reason.response) {
17167
+ reason.response.duration = elapsedSince(start);
16727
17168
  config.response = reason.response;
16728
17169
  try {
16729
17170
  reason.response.data = _transformData_js__WEBPACK_IMPORTED_MODULE_0__["default"].call(
@@ -16756,6 +17197,8 @@ __webpack_require__.r(__webpack_exports__);
16756
17197
  /* harmony export */ });
16757
17198
  /* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(68750);
16758
17199
  /* harmony import */ var _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(76487);
17200
+ /* harmony import */ var _assertParamsAcyclic_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(30035);
17201
+
16759
17202
 
16760
17203
 
16761
17204
 
@@ -16766,14 +17209,184 @@ const headersToObject = (thing) => (thing instanceof _AxiosHeaders_js__WEBPACK_I
16766
17209
  const ownEnumerableKeys = (thing) => {
16767
17210
  if (Object.getOwnPropertySymbols && Object.getOwnPropertyDescriptor) {
16768
17211
  return Object.keys(thing).concat(
16769
- Object.getOwnPropertySymbols(thing).filter(
16770
- (symbol) => Object.getOwnPropertyDescriptor(thing, symbol).enumerable
16771
- )
17212
+ Object.getOwnPropertySymbols(thing).filter((symbol) => {
17213
+ const descriptor = Object.getOwnPropertyDescriptor(thing, symbol);
17214
+ return descriptor && descriptor.enumerable;
17215
+ })
16772
17216
  );
16773
17217
  }
16774
17218
  return Object.keys(thing);
16775
17219
  };
16776
17220
 
17221
+ // Copy params without recursive merges so the serializer remains responsible
17222
+ // for its depth policy. Only visit defaults that contribute to the result.
17223
+ function mergeParams(a, b) {
17224
+ const pending = [];
17225
+ const copies = new WeakMap();
17226
+ const empty = {};
17227
+
17228
+ function copy(target, source) {
17229
+ if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(source)) {
17230
+ return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(source) ? source.slice() : source;
17231
+ }
17232
+
17233
+ const base = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(target) ? target : empty;
17234
+ let bases = copies.get(source);
17235
+ if (!bases) {
17236
+ bases = new WeakMap();
17237
+ copies.set(source, bases);
17238
+ }
17239
+ if (bases.has(base)) return bases.get(base);
17240
+
17241
+ const result = {};
17242
+ bases.set(base, result);
17243
+ pending.push({ base, source, result });
17244
+ return result;
17245
+ }
17246
+
17247
+ const result = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(b) ? copy(undefined, a) : copy(a, b);
17248
+ while (pending.length) {
17249
+ const { base, source, result: target } = pending.pop();
17250
+ const baseKeys = new Set(ownEnumerableKeys(base));
17251
+ const sourceKeys = new Set(ownEnumerableKeys(source));
17252
+ const keys = new Set([...baseKeys, ...sourceKeys]);
17253
+
17254
+ keys.forEach((key) => {
17255
+ if (key === '__proto__' || key === 'constructor' || key === 'prototype') return;
17256
+ const hasSource = sourceKeys.has(key);
17257
+ const value = hasSource ? source[key] : undefined;
17258
+ const previous =
17259
+ (!hasSource || _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(value)) && baseKeys.has(key) ? base[key] : undefined;
17260
+ target[key] = hasSource ? copy(previous, value) : copy(undefined, previous);
17261
+ });
17262
+ }
17263
+
17264
+ ;(0,_assertParamsAcyclic_js__WEBPACK_IMPORTED_MODULE_2__["default"])(result);
17265
+ return result;
17266
+ }
17267
+
17268
+ function getMergedValue(target, source, prop, caseless) {
17269
+ if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(target) && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(source)) {
17270
+ return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].merge.call({ caseless }, target, source);
17271
+ } else if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(source)) {
17272
+ return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].merge({}, source);
17273
+ } else if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(source)) {
17274
+ return source.slice();
17275
+ }
17276
+ return source;
17277
+ }
17278
+
17279
+ function mergeDeepProperties(a, b, prop, caseless) {
17280
+ if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(b)) {
17281
+ return getMergedValue(a, b, prop, caseless);
17282
+ } else if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(a)) {
17283
+ return getMergedValue(undefined, a, prop, caseless);
17284
+ }
17285
+ }
17286
+
17287
+ // eslint-disable-next-line consistent-return
17288
+ function valueFromConfig2(a, b) {
17289
+ if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(b)) {
17290
+ return getMergedValue(undefined, b);
17291
+ }
17292
+ }
17293
+
17294
+ // eslint-disable-next-line consistent-return
17295
+ function defaultToConfig2(a, b) {
17296
+ if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(b)) {
17297
+ return getMergedValue(undefined, b);
17298
+ } else if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(a)) {
17299
+ return getMergedValue(undefined, a);
17300
+ }
17301
+ }
17302
+
17303
+ function getMergedTransitionalOption(config1, config2, prop) {
17304
+ const transitional2 = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(config2, 'transitional')
17305
+ ? config2.transitional
17306
+ : undefined;
17307
+
17308
+ if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(transitional2)) {
17309
+ if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(transitional2)) {
17310
+ if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(transitional2, prop)) {
17311
+ return transitional2[prop];
17312
+ }
17313
+ } else {
17314
+ return undefined;
17315
+ }
17316
+ }
17317
+
17318
+ const transitional1 = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(config1, 'transitional')
17319
+ ? config1.transitional
17320
+ : undefined;
17321
+
17322
+ if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(transitional1) && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(transitional1, prop)) {
17323
+ return transitional1[prop];
17324
+ }
17325
+
17326
+ return undefined;
17327
+ }
17328
+
17329
+ // eslint-disable-next-line consistent-return
17330
+ function mergeDirectKeys(a, b, prop, config1, config2) {
17331
+ if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(config2, prop)) {
17332
+ return getMergedValue(a, b);
17333
+ } else if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(config1, prop)) {
17334
+ return getMergedValue(undefined, a);
17335
+ }
17336
+ }
17337
+
17338
+ function mergeHeaders(a, b, prop) {
17339
+ return mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true);
17340
+ }
17341
+
17342
+ // Null-proto, frozen descriptor so a polluted Object.prototype.get cannot turn
17343
+ // this data descriptor into an accessor descriptor on the way in.
17344
+ // defineProperty only reads it, so one shared instance serves every call.
17345
+ const hasOwnPropertyDescriptor = Object.freeze({
17346
+ __proto__: null,
17347
+ value: Object.prototype.hasOwnProperty,
17348
+ enumerable: false,
17349
+ writable: true,
17350
+ configurable: true,
17351
+ });
17352
+
17353
+ // The strategy table and the strategies above are stateless, so they are
17354
+ // built once at module load instead of on every call: mergeConfig runs at
17355
+ // most twice per request (once from a method alias, once from `_request`).
17356
+ const mergeMap = {
17357
+ url: valueFromConfig2,
17358
+ method: valueFromConfig2,
17359
+ data: valueFromConfig2,
17360
+ baseURL: defaultToConfig2,
17361
+ transformRequest: defaultToConfig2,
17362
+ transformResponse: defaultToConfig2,
17363
+ params: mergeParams,
17364
+ paramsSerializer: defaultToConfig2,
17365
+ timeout: defaultToConfig2,
17366
+ timeoutErrorMessage: defaultToConfig2,
17367
+ withCredentials: defaultToConfig2,
17368
+ withXSRFToken: defaultToConfig2,
17369
+ adapter: defaultToConfig2,
17370
+ responseType: defaultToConfig2,
17371
+ xsrfCookieName: defaultToConfig2,
17372
+ xsrfHeaderName: defaultToConfig2,
17373
+ onUploadProgress: defaultToConfig2,
17374
+ onDownloadProgress: defaultToConfig2,
17375
+ decompress: defaultToConfig2,
17376
+ maxContentLength: defaultToConfig2,
17377
+ maxBodyLength: defaultToConfig2,
17378
+ beforeRedirect: defaultToConfig2,
17379
+ transport: defaultToConfig2,
17380
+ httpAgent: defaultToConfig2,
17381
+ httpsAgent: defaultToConfig2,
17382
+ cancelToken: defaultToConfig2,
17383
+ socketPath: defaultToConfig2,
17384
+ allowedSocketPaths: defaultToConfig2,
17385
+ responseEncoding: defaultToConfig2,
17386
+ validateStatus: mergeDirectKeys,
17387
+ headers: mergeHeaders,
17388
+ };
17389
+
16777
17390
  /**
16778
17391
  * Config-specific merge-function which creates a new config-object
16779
17392
  * by merging two configuration objects together.
@@ -16793,133 +17406,25 @@ function mergeConfig(config1, config2) {
16793
17406
  // `hasOwnProperty` is restored as a non-enumerable own slot to preserve
16794
17407
  // ergonomics for user code that relies on it.
16795
17408
  const config = Object.create(null);
16796
- Object.defineProperty(config, 'hasOwnProperty', {
16797
- // Null-proto descriptor so a polluted Object.prototype.get cannot turn
16798
- // this data descriptor into an accessor descriptor on the way in.
16799
- __proto__: null,
16800
- value: Object.prototype.hasOwnProperty,
16801
- enumerable: false,
16802
- writable: true,
16803
- configurable: true,
16804
- });
17409
+ Object.defineProperty(config, 'hasOwnProperty', hasOwnPropertyDescriptor);
16805
17410
 
16806
- function getMergedValue(target, source, prop, caseless) {
16807
- if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(target) && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(source)) {
16808
- return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].merge.call({ caseless }, target, source);
16809
- } else if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(source)) {
16810
- return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].merge({}, source);
16811
- } else if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(source)) {
16812
- return source.slice();
16813
- }
16814
- return source;
16815
- }
16816
-
16817
- function mergeDeepProperties(a, b, prop, caseless) {
16818
- if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(b)) {
16819
- return getMergedValue(a, b, prop, caseless);
16820
- } else if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(a)) {
16821
- return getMergedValue(undefined, a, prop, caseless);
16822
- }
16823
- }
16824
-
16825
- // eslint-disable-next-line consistent-return
16826
- function valueFromConfig2(a, b) {
16827
- if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(b)) {
16828
- return getMergedValue(undefined, b);
16829
- }
16830
- }
16831
-
16832
- // eslint-disable-next-line consistent-return
16833
- function defaultToConfig2(a, b) {
16834
- if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(b)) {
16835
- return getMergedValue(undefined, b);
16836
- } else if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(a)) {
16837
- return getMergedValue(undefined, a);
16838
- }
16839
- }
16840
-
16841
- function getMergedTransitionalOption(prop) {
16842
- const transitional2 = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(config2, 'transitional')
16843
- ? config2.transitional
16844
- : undefined;
16845
-
16846
- if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(transitional2)) {
16847
- if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(transitional2)) {
16848
- if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(transitional2, prop)) {
16849
- return transitional2[prop];
16850
- }
16851
- } else {
16852
- return undefined;
16853
- }
16854
- }
16855
-
16856
- const transitional1 = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(config1, 'transitional')
16857
- ? config1.transitional
16858
- : undefined;
16859
-
16860
- if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(transitional1) && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(transitional1, prop)) {
16861
- return transitional1[prop];
16862
- }
16863
-
16864
- return undefined;
16865
- }
16866
-
16867
- // eslint-disable-next-line consistent-return
16868
- function mergeDirectKeys(a, b, prop) {
16869
- if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(config2, prop)) {
16870
- return getMergedValue(a, b);
16871
- } else if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(config1, prop)) {
16872
- return getMergedValue(undefined, a);
16873
- }
16874
- }
16875
-
16876
- const mergeMap = {
16877
- url: valueFromConfig2,
16878
- method: valueFromConfig2,
16879
- data: valueFromConfig2,
16880
- baseURL: defaultToConfig2,
16881
- transformRequest: defaultToConfig2,
16882
- transformResponse: defaultToConfig2,
16883
- paramsSerializer: defaultToConfig2,
16884
- timeout: defaultToConfig2,
16885
- timeoutErrorMessage: defaultToConfig2,
16886
- withCredentials: defaultToConfig2,
16887
- withXSRFToken: defaultToConfig2,
16888
- adapter: defaultToConfig2,
16889
- responseType: defaultToConfig2,
16890
- xsrfCookieName: defaultToConfig2,
16891
- xsrfHeaderName: defaultToConfig2,
16892
- onUploadProgress: defaultToConfig2,
16893
- onDownloadProgress: defaultToConfig2,
16894
- decompress: defaultToConfig2,
16895
- maxContentLength: defaultToConfig2,
16896
- maxBodyLength: defaultToConfig2,
16897
- beforeRedirect: defaultToConfig2,
16898
- transport: defaultToConfig2,
16899
- httpAgent: defaultToConfig2,
16900
- httpsAgent: defaultToConfig2,
16901
- cancelToken: defaultToConfig2,
16902
- socketPath: defaultToConfig2,
16903
- allowedSocketPaths: defaultToConfig2,
16904
- responseEncoding: defaultToConfig2,
16905
- validateStatus: mergeDirectKeys,
16906
- headers: (a, b, prop) =>
16907
- mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true),
16908
- };
17411
+ const keys = ownEnumerableKeys({ ...config1, ...config2 });
16909
17412
 
16910
- _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(ownEnumerableKeys({ ...config1, ...config2 }), function computeConfigValue(prop) {
16911
- if (prop === '__proto__' || prop === 'constructor' || prop === 'prototype') return;
17413
+ for (let i = 0, len = keys.length; i < len; i++) {
17414
+ const prop = keys[i];
17415
+ if (prop === '__proto__' || prop === 'constructor' || prop === 'prototype') continue;
16912
17416
  const merge = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;
16913
17417
  const a = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(config1, prop) ? config1[prop] : undefined;
16914
17418
  const b = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(config2, prop) ? config2[prop] : undefined;
16915
- const configValue = merge(a, b, prop);
17419
+ const configValue =
17420
+ merge === mergeDirectKeys ? merge(a, b, prop, config1, config2) : merge(a, b, prop);
16916
17421
  (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
16917
- });
17422
+ }
16918
17423
 
16919
17424
  if (
16920
17425
  _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(config2, 'validateStatus') &&
16921
17426
  _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(config2.validateStatus) &&
16922
- getMergedTransitionalOption('validateStatusUndefinedResolves') === false
17427
+ getMergedTransitionalOption(config1, config2, 'validateStatusUndefinedResolves') === false
16923
17428
  ) {
16924
17429
  if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(config1, 'validateStatus')) {
16925
17430
  config.validateStatus = getMergedValue(undefined, config1.validateStatus);
@@ -17299,6 +17804,7 @@ __webpack_require__.r(__webpack_exports__);
17299
17804
  legacyInterceptorReqResOrdering: true,
17300
17805
  advertiseZstdAcceptEncoding: false,
17301
17806
  validateStatusUndefinedResolves: true,
17807
+ encodeBasicAuthUsername: false,
17302
17808
  });
17303
17809
 
17304
17810
  /* harmony export */ __webpack_require__.d(__webpack_exports__, [
@@ -17313,7 +17819,7 @@ __webpack_require__.r(__webpack_exports__);
17313
17819
 
17314
17820
  "use strict";
17315
17821
  __webpack_require__.r(__webpack_exports__);
17316
- const VERSION = "1.20.0";
17822
+ const VERSION = "1.21.0";
17317
17823
  /* harmony export */ __webpack_require__.d(__webpack_exports__, [
17318
17824
  /* harmony export */ "VERSION", 0, /* binding */ VERSION
17319
17825
  /* harmony export */ ]);
@@ -17684,12 +18190,15 @@ const composeSignals = (signals, timeout) => {
17684
18190
  }, timeout);
17685
18191
 
17686
18192
  const unsubscribe = () => {
17687
- if (!signals) { return; }
18193
+ if (!signals) {
18194
+ return;
18195
+ }
17688
18196
  timer && clearTimeout(timer);
17689
18197
  timer = null;
17690
18198
  signals.forEach((signal) => {
17691
- signal.unsubscribe
17692
- ? signal.unsubscribe(onabort)
18199
+ const unsubscribeSignal = _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].getSafeProp(signal, 'unsubscribe');
18200
+ _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].isFunction(unsubscribeSignal)
18201
+ ? unsubscribeSignal.call(signal, onabort)
17693
18202
  : signal.removeEventListener('abort', onabort);
17694
18203
  });
17695
18204
  signals = null;
@@ -17734,6 +18243,14 @@ __webpack_require__.r(__webpack_exports__);
17734
18243
 
17735
18244
 
17736
18245
 
18246
+ const decodeCookieValue = (value) => {
18247
+ try {
18248
+ return decodeURIComponent(value);
18249
+ } catch (e) {
18250
+ return value;
18251
+ }
18252
+ };
18253
+
17737
18254
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_platform_index_js__WEBPACK_IMPORTED_MODULE_1__["default"].hasStandardBrowserEnv
17738
18255
  ? // Standard browser envs support document.cookie
17739
18256
  {
@@ -17763,26 +18280,39 @@ __webpack_require__.r(__webpack_exports__);
17763
18280
 
17764
18281
  read(name) {
17765
18282
  if (typeof document === 'undefined') return null;
18283
+ const cookieString = document.cookie;
18284
+ if (!cookieString) return null;
17766
18285
  // Match name=value by splitting on the semicolon separator instead of building a
17767
18286
  // RegExp from `name` — interpolating an unescaped string into a RegExp would let
17768
18287
  // metacharacters (e.g. `.+?` in an attacker-influenced cookie name) cause ReDoS or
17769
18288
  // match the wrong cookie. Browsers may serialize cookie pairs as either ";" or
17770
18289
  // "; ", so ignore optional whitespace before each cookie name.
17771
- const cookies = document.cookie.split(';');
18290
+ const cookies = cookieString.split(';');
17772
18291
  for (let i = 0; i < cookies.length; i++) {
17773
18292
  const cookie = cookies[i].replace(/^\s+/, '');
17774
18293
  const eq = cookie.indexOf('=');
17775
18294
  if (eq !== -1 && cookie.slice(0, eq) === name) {
17776
- try {
17777
- return decodeURIComponent(cookie.slice(eq + 1));
17778
- } catch (e) {
17779
- return cookie.slice(eq + 1);
17780
- }
18295
+ return decodeCookieValue(cookie.slice(eq + 1));
17781
18296
  }
17782
18297
  }
17783
18298
  return null;
17784
18299
  },
17785
18300
 
18301
+ async readAsync(name) {
18302
+ try {
18303
+ const store = typeof window !== 'undefined' && window.cookieStore;
18304
+ if (store && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(store.get)) {
18305
+ const cookie = await store.get(name);
18306
+ // Both APIs expose stored bytes; preserve Axios's existing URI decoding.
18307
+ return cookie ? decodeCookieValue(cookie.value) : null;
18308
+ }
18309
+ } catch (e) {
18310
+ // Restricted or unavailable storage retains the synchronous fallback.
18311
+ }
18312
+
18313
+ return this.read(name);
18314
+ },
18315
+
17786
18316
  remove(name) {
17787
18317
  this.write(name, '', Date.now() - 86400000, '/');
17788
18318
  },
@@ -17793,6 +18323,9 @@ __webpack_require__.r(__webpack_exports__);
17793
18323
  read() {
17794
18324
  return null;
17795
18325
  },
18326
+ async readAsync() {
18327
+ return null;
18328
+ },
17796
18329
  remove() {},
17797
18330
  });
17798
18331
 
@@ -17816,7 +18349,7 @@ __webpack_require__.r(__webpack_exports__);
17816
18349
  * Estimate data: URL byte lengths *without* allocating large buffers.
17817
18350
  * - Fetch percent-decodes a base64 body before decoding it.
17818
18351
  * - Node's Buffer.from(body, 'base64') sizes its backing allocation from the
17819
- * raw body, including ignored characters and content after padding.
18352
+ * percent-decoded body, including ignored characters and content after padding.
17820
18353
  * - Non-base64 data is percent-decoded and then encoded as UTF-8.
17821
18354
  */
17822
18355
  const isHexDigit = (charCode) =>
@@ -17864,6 +18397,31 @@ const estimateBase64BufferAllocation = (body) => {
17864
18397
  return Math.floor(((len - padding) * 3) / 4);
17865
18398
  };
17866
18399
 
18400
+ const estimatePercentDecodedBase64BufferAllocation = (body) => {
18401
+ // Ordinary Base64 needs only its length and trailing padding.
18402
+ if (body.indexOf('%') === -1) {
18403
+ return estimateBase64BufferAllocation(body);
18404
+ }
18405
+
18406
+ let length = 0;
18407
+ let previous = 0;
18408
+ let last = 0;
18409
+
18410
+ for (let i = 0, len = body.length; i < len; i++) {
18411
+ let code = body.charCodeAt(i);
18412
+ if (code === 37 /* '%' */ && isPercentEncodedByte(body, i, len)) {
18413
+ code = hexValue(body.charCodeAt(i + 1)) * 16 + hexValue(body.charCodeAt(i + 2));
18414
+ i += 2;
18415
+ }
18416
+ length++;
18417
+ previous = last;
18418
+ last = code;
18419
+ }
18420
+
18421
+ const padding = last === 61 ? (previous === 61 ? 2 : 1) : 0;
18422
+ return Math.floor(((length - padding) * 3) / 4);
18423
+ };
18424
+
17867
18425
  const estimatePercentDecodedBase64Bytes = (body) => {
17868
18426
  const len = body.length;
17869
18427
  let significant = 0;
@@ -17909,16 +18467,16 @@ const estimatePercentDecodedBase64Bytes = (body) => {
17909
18467
  return base64Bytes(significant);
17910
18468
  };
17911
18469
 
17912
- const estimateDataURLBytes = (url, estimateBase64) => {
18470
+ const estimateDataURLBytes = (url, estimateBase64, base64Pattern) => {
17913
18471
  if (!url || typeof url !== 'string') return 0;
17914
- if (!url.startsWith('data:')) return 0;
18472
+ if (!/^data:/i.test(url)) return 0;
17915
18473
 
17916
18474
  const comma = url.indexOf(',');
17917
18475
  if (comma < 0) return 0;
17918
18476
 
17919
18477
  const meta = url.slice(5, comma);
17920
18478
  const body = url.slice(comma + 1);
17921
- const isBase64 = /;base64/i.test(meta);
18479
+ const isBase64 = base64Pattern.test(meta);
17922
18480
 
17923
18481
  if (isBase64) {
17924
18482
  return estimateBase64(body);
@@ -17965,18 +18523,147 @@ function estimateDataURLDecodedBytes(url) {
17965
18523
 
17966
18524
  return estimateDataURLBytes(
17967
18525
  fragmentIndex === -1 ? url : url.slice(0, fragmentIndex),
17968
- estimatePercentDecodedBase64Bytes
18526
+ estimatePercentDecodedBase64Bytes,
18527
+ /; *base64[\t\n\f\r ]*$/i
17969
18528
  );
17970
18529
  }
17971
18530
 
17972
18531
  /**
17973
- * Estimate the Buffer backing allocation used by Node's raw base64 decoder.
18532
+ * Estimate the Buffer backing allocation used after Node's percent-decoding step.
17974
18533
  *
17975
18534
  * @param {string} url
17976
18535
  * @returns {number}
17977
18536
  */
17978
18537
  function estimateDataURLBufferAllocation(url) {
17979
- return estimateDataURLBytes(url, estimateBase64BufferAllocation);
18538
+ // Match fromDataURI's case-insensitive protocol and encoding suffix.
18539
+ return estimateDataURLBytes(url, estimatePercentDecodedBase64BufferAllocation, /;base64$/i);
18540
+ }
18541
+
18542
+
18543
+ /***/ },
18544
+
18545
+ /***/ 59893
18546
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
18547
+
18548
+ "use strict";
18549
+ __webpack_require__.r(__webpack_exports__);
18550
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
18551
+ /* harmony export */ FormDataError: () => (/* binding */ FormDataError),
18552
+ /* harmony export */ "default": () => (/* binding */ formDataToBlob)
18553
+ /* harmony export */ });
18554
+ /* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(68750);
18555
+
18556
+
18557
+ const CRLF = '\r\n';
18558
+ const normalizeLines = (value) => String(value).replace(/\r\n|\r|\n/g, CRLF);
18559
+ const escapeName = (value) =>
18560
+ String(value).replace(/[\r\n"]/g, (char) =>
18561
+ char === '\r' ? '%0D' : char === '\n' ? '%0A' : '%22'
18562
+ );
18563
+
18564
+ // Count UTF-8 bytes without allocating an encoded copy of a field. FormData
18565
+ // string values normalize line endings; Blob/File contents remain unchanged.
18566
+ const stringBytes = (value, normalize) => {
18567
+ let length = 0;
18568
+ for (let i = 0; i < value.length; i++) {
18569
+ const code = value.charCodeAt(i);
18570
+ if (normalize && (code === 13 || code === 10)) {
18571
+ if (code === 13 && value.charCodeAt(i + 1) === 10) i++;
18572
+ length += 2;
18573
+ } else if (code < 0x80) {
18574
+ length++;
18575
+ } else if (code < 0x800) {
18576
+ length += 2;
18577
+ } else if (
18578
+ code >= 0xd800 &&
18579
+ code <= 0xdbff &&
18580
+ value.charCodeAt(i + 1) >= 0xdc00 &&
18581
+ value.charCodeAt(i + 1) <= 0xdfff
18582
+ ) {
18583
+ length += 4;
18584
+ i++;
18585
+ } else {
18586
+ length += 3;
18587
+ }
18588
+ }
18589
+ return length;
18590
+ };
18591
+
18592
+ // Describe serialization failures independently of any request library.
18593
+ class FormDataError extends TypeError {
18594
+ constructor(message, reason) {
18595
+ super(message);
18596
+ this.name = 'FormDataError';
18597
+ this.reason = reason;
18598
+ }
18599
+ }
18600
+
18601
+ // The caller supplies the boundary, Blob implementation, and limit error.
18602
+ function formDataToBlob(form, Blob, limit, limitError, boundary) {
18603
+ if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(Blob)) {
18604
+ throw new FormDataError('Blob is not supported', 'blob');
18605
+ }
18606
+
18607
+ if (
18608
+ !_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(boundary) ||
18609
+ !/^[A-Za-z0-9'()+_,./:=? -]{1,70}$/.test(boundary) ||
18610
+ / $/.test(boundary)
18611
+ ) {
18612
+ throw new FormDataError('Invalid multipart boundary', 'boundary');
18613
+ }
18614
+ const footer = '--' + boundary + '--' + CRLF;
18615
+ let length = footer.length;
18616
+ const parts = [];
18617
+ const checkLength = (extra) => {
18618
+ if (length + extra > limit) throw limitError();
18619
+ };
18620
+ checkLength(0);
18621
+
18622
+ for (const [name, value] of form) {
18623
+ const isString = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(value);
18624
+ const valueLength = isString ? stringBytes(value, true) : value.size;
18625
+ if (!Number.isFinite(valueLength) || valueLength < 0) {
18626
+ throw new FormDataError('Unsupported FormData part size', 'part');
18627
+ }
18628
+ // Reject large values and names before building normalized header strings.
18629
+ checkLength(
18630
+ valueLength +
18631
+ stringBytes(name, true) +
18632
+ (!isString && value.name ? stringBytes(value.name, false) : 0) +
18633
+ (!isString && value.type ? stringBytes(value.type, false) : 0)
18634
+ );
18635
+
18636
+ let header =
18637
+ '--' +
18638
+ boundary +
18639
+ CRLF +
18640
+ 'Content-Disposition: form-data; name="' +
18641
+ escapeName(normalizeLines(name)) +
18642
+ '"';
18643
+ if (!isString) {
18644
+ header +=
18645
+ '; filename="' +
18646
+ escapeName(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(value.name) ? value.name : 'blob') +
18647
+ '"' +
18648
+ CRLF +
18649
+ 'Content-Type: ' +
18650
+ String(value.type || 'application/octet-stream').replace(/[\r\n]/g, '');
18651
+ }
18652
+ header += CRLF + CRLF;
18653
+ const partLength = stringBytes(header, false) + valueLength + CRLF.length;
18654
+ checkLength(partLength);
18655
+ length += partLength;
18656
+ parts.push({ header, value, isString });
18657
+ }
18658
+
18659
+ // Native Blob composition retains existing Blob/File data. No file is read
18660
+ // and no complete multipart ArrayBuffer is created to determine its length.
18661
+ const blobParts = [];
18662
+ for (const part of parts) {
18663
+ blobParts.push(part.header, part.isString ? normalizeLines(part.value) : part.value, CRLF);
18664
+ }
18665
+ blobParts.push(footer);
18666
+ return new Blob(blobParts, { type: 'multipart/form-data; boundary=' + boundary });
17980
18667
  }
17981
18668
 
17982
18669
 
@@ -18057,6 +18744,29 @@ function arrayToObject(arr) {
18057
18744
  return obj;
18058
18745
  }
18059
18746
 
18747
+ function normalizeArray(value) {
18748
+ if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(value)) return value;
18749
+
18750
+ const keys = Object.keys(value);
18751
+ return keys.length !== value.length || keys.some((key, index) => key !== String(index))
18752
+ ? arrayToObject(value)
18753
+ : value;
18754
+ }
18755
+
18756
+ function normalizeArrays(obj) {
18757
+ const pending = [obj];
18758
+ while (pending.length) {
18759
+ const target = pending.pop();
18760
+ Object.keys(target).forEach((key) => {
18761
+ const value = (target[key] = normalizeArray(target[key]));
18762
+ if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(value) || _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(value)) {
18763
+ pending.push(value);
18764
+ }
18765
+ });
18766
+ }
18767
+ return obj;
18768
+ }
18769
+
18060
18770
  /**
18061
18771
  * It takes a FormData object and returns a JavaScript object
18062
18772
  *
@@ -18078,6 +18788,7 @@ function formDataToJSON(formData) {
18078
18788
 
18079
18789
  if (isLast) {
18080
18790
  if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(target, name)) {
18791
+ target[name] = normalizeArray(target[name]);
18081
18792
  target[name] = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(target[name])
18082
18793
  ? target[name].concat(value)
18083
18794
  : [target[name], value];
@@ -18108,7 +18819,7 @@ function formDataToJSON(formData) {
18108
18819
  buildPath(parsePropPath(name), value, obj, 0);
18109
18820
  });
18110
18821
 
18111
- return obj;
18822
+ return normalizeArrays(obj);
18112
18823
  }
18113
18824
 
18114
18825
  return null;
@@ -18190,18 +18901,13 @@ __webpack_require__.r(__webpack_exports__);
18190
18901
 
18191
18902
 
18192
18903
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasStandardBrowserEnv
18193
- ? ((origin, isMSIE) => (url) => {
18194
- url = new URL(url, _platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].origin);
18904
+ ? ((origin) => (url) => {
18905
+ url = new URL(url, document.baseURI || _platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].origin);
18195
18906
 
18196
18907
  return (
18197
- origin.protocol === url.protocol &&
18198
- origin.host === url.host &&
18199
- (isMSIE || origin.port === url.port)
18908
+ origin.protocol === url.protocol && origin.host === url.host && origin.port === url.port
18200
18909
  );
18201
- })(
18202
- new URL(_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].origin),
18203
- _platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].navigator && /(msie|trident)/i.test(_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].navigator.userAgent)
18204
- )
18910
+ })(new URL(_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].origin))
18205
18911
  : () => true);
18206
18912
 
18207
18913
  /* harmony export */ __webpack_require__.d(__webpack_exports__, [
@@ -18309,7 +19015,8 @@ const ignoreDuplicateOf = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toOb
18309
19015
  * @returns {Object} Headers parsed into an object
18310
19016
  */
18311
19017
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((rawHeaders) => {
18312
- const parsed = {};
19018
+ // Header names are data, including __proto__; avoid inherited setters.
19019
+ const parsed = Object.create(null);
18313
19020
  let key;
18314
19021
  let val;
18315
19022
  let i;
@@ -18359,7 +19066,7 @@ __webpack_require__.r(__webpack_exports__);
18359
19066
 
18360
19067
  function parseProtocol(url) {
18361
19068
  const match = /^([-+\w]{1,25}):(?:\/\/)?/.exec(url);
18362
- return (match && match[1]) || '';
19069
+ return (match && match[1].toLowerCase()) || '';
18363
19070
  }
18364
19071
 
18365
19072
 
@@ -18476,7 +19183,9 @@ const encodeUTF8 = (str) =>
18476
19183
  String.fromCharCode(parseInt(hex, 16))
18477
19184
  );
18478
19185
 
18479
- function resolveConfig(config) {
19186
+ const readCookie = (name) => _cookies_js__WEBPACK_IMPORTED_MODULE_4__["default"].read(name);
19187
+
19188
+ function resolveConfig(config, readXsrfCookie = readCookie) {
18480
19189
  const newConfig = (0,_core_mergeConfig_js__WEBPACK_IMPORTED_MODULE_6__["default"])({}, config);
18481
19190
 
18482
19191
  // Read only own properties to prevent prototype pollution gadgets
@@ -18505,11 +19214,22 @@ function resolveConfig(config) {
18505
19214
  if (auth) {
18506
19215
  const username = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].getSafeProp(auth, 'username') || '';
18507
19216
  const password = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].getSafeProp(auth, 'password') || '';
19217
+ const transitional = own('transitional');
19218
+ const encodeUsername =
19219
+ transitional &&
19220
+ _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].hasOwnProp(transitional, 'encodeBasicAuthUsername') &&
19221
+ transitional.encodeBasicAuthUsername === true;
18508
19222
 
18509
19223
  try {
18510
19224
  headers.set(
18511
19225
  'Authorization',
18512
- 'Basic ' + btoa(username + ':' + (password ? encodeUTF8(password) : ''))
19226
+ // Preserve legacy username bytes unless the caller opts in to UTF-8.
19227
+ 'Basic ' +
19228
+ btoa(
19229
+ (encodeUsername ? encodeUTF8(username) : username) +
19230
+ ':' +
19231
+ (password ? encodeUTF8(password) : '')
19232
+ )
18513
19233
  );
18514
19234
  } catch (e) {
18515
19235
  throw _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"].from(e, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"].ERR_BAD_OPTION_VALUE, config);
@@ -18547,7 +19267,7 @@ function resolveConfig(config) {
18547
19267
  withXSRFToken === true || (withXSRFToken == null && (0,_isURLSameOrigin_js__WEBPACK_IMPORTED_MODULE_3__["default"])(newConfig.url));
18548
19268
 
18549
19269
  if (shouldSendXSRF) {
18550
- const xsrfValue = xsrfHeaderName && xsrfCookieName && _cookies_js__WEBPACK_IMPORTED_MODULE_4__["default"].read(xsrfCookieName);
19270
+ const xsrfValue = xsrfHeaderName && xsrfCookieName && readXsrfCookie(xsrfCookieName);
18551
19271
 
18552
19272
  if (xsrfValue) {
18553
19273
  headers.set(xsrfHeaderName, xsrfValue);
@@ -19857,11 +20577,17 @@ const isPlainObject = (val) => {
19857
20577
  const prototype = getPrototypeOf(val);
19858
20578
  return (
19859
20579
  (prototype === null || prototype === Object.prototype || getPrototypeOf(prototype) === null) &&
19860
- // Treat safe own/inherited Symbol.toStringTag or Symbol.iterator members as
19861
- // evidence the value is tagged/iterable, while ignoring members reachable
19862
- // only through shared or terminal prototype boundaries.
19863
- !hasOwnInPrototypeChain(val, toStringTag) &&
19864
- !hasOwnInPrototypeChain(val, iterator)
20580
+ // Treat own Symbol.toStringTag or Symbol.iterator members as evidence the
20581
+ // value is tagged/iterable, ignoring members reachable only through shared
20582
+ // or terminal prototype boundaries. This is exactly what
20583
+ // hasOwnInPrototypeChain(val, prop) computes here: every prototype admitted
20584
+ // above (null, Object.prototype, or a terminal null-prototype template) is
20585
+ // a boundary, so the walk never inspects anything but `val`'s own members,
20586
+ // and stops before even those when `val` is itself the boundary
20587
+ // Object.prototype. Checking that inline avoids allocating the walker's
20588
+ // `seen` list twice per call on the mergeConfig / merge hot path.
20589
+ (isPrototypeBoundary(val, prototype, true) ||
20590
+ (!hasOwnProperty(val, toStringTag) && !hasOwnProperty(val, iterator)))
19865
20591
  );
19866
20592
  };
19867
20593
 
@@ -20125,15 +20851,30 @@ const isContextDefined = (context) => !isUndefined(context) && context !== _glob
20125
20851
  function merge(...objs) {
20126
20852
  const { caseless, skipUndefined } = (isContextDefined(this) && this) || {};
20127
20853
  const result = {};
20854
+ // Caseless lookup only applies to string keys — symbol keys are
20855
+ // identity-matched. Every string key that reaches `result` passes through
20856
+ // this index first, so it can never hold two case variants of one key and a
20857
+ // lowercase -> key map is exactly what findKey(result, key) would rescan
20858
+ // Object.keys(result) for on each assignment.
20859
+ const lowerCaseKeys = caseless ? Object.create(null) : null;
20128
20860
  const assignValue = (val, key) => {
20129
20861
  // Skip dangerous property names to prevent prototype pollution
20130
20862
  if (key === '__proto__' || key === 'constructor' || key === 'prototype') {
20131
20863
  return;
20132
20864
  }
20133
20865
 
20134
- // findKey lowercases the key, so caseless lookup only applies to strings —
20135
- // symbol keys are identity-matched.
20136
- const targetKey = (caseless && typeof key === 'string' && findKey(result, key)) || key;
20866
+ let targetKey = key;
20867
+ if (lowerCaseKeys && typeof key === 'string') {
20868
+ const lowerKey = key.toLowerCase();
20869
+ const knownKey = lowerCaseKeys[lowerKey];
20870
+ // A key recorded but absent from `result` was skipped by skipUndefined;
20871
+ // the later spelling wins then, as it does for findKey.
20872
+ if (knownKey !== undefined && hasOwnProperty(result, knownKey)) {
20873
+ targetKey = knownKey;
20874
+ } else {
20875
+ lowerCaseKeys[lowerKey] = key;
20876
+ }
20877
+ }
20137
20878
  // Read via own-prop only — a bare `result[targetKey]` walks the prototype
20138
20879
  // chain, so a polluted Object.prototype value could surface here and get
20139
20880
  // copied into the merged result.
@@ -20157,7 +20898,7 @@ function merge(...objs) {
20157
20898
 
20158
20899
  forEach(source, assignValue);
20159
20900
 
20160
- if (typeof source !== 'object' || isArray(source)) {
20901
+ if (typeof source !== 'object' || isArray(source) || !Object.getOwnPropertySymbols) {
20161
20902
  continue;
20162
20903
  }
20163
20904
 
@@ -20316,7 +21057,37 @@ const toArray = (thing) => {
20316
21057
  if (!thing) return null;
20317
21058
  if (isArray(thing)) return thing;
20318
21059
  let i = thing.length;
20319
- if (!isNumber(i)) return null;
21060
+ if (!Number.isSafeInteger(i) || i < 0 || i > 0xffffffff) return null;
21061
+
21062
+ // Bound the copy by actual indexed properties, including hidden and inherited
21063
+ // members of array-like collections, rather than by the declared length alone.
21064
+ const indexes = new Set();
21065
+ const seen = new Set();
21066
+ let source = thing;
21067
+
21068
+ while (source != null && indexes.size < i) {
21069
+ if (seen.has(source)) return null;
21070
+ seen.add(source);
21071
+
21072
+ const prototype = getPrototypeOf(source);
21073
+ if (isPrototypeBoundary(source, prototype, source === thing)) break;
21074
+
21075
+ Object.getOwnPropertyNames(source).forEach((key) => {
21076
+ const index = +key;
21077
+ if (
21078
+ Number.isInteger(index) &&
21079
+ index >= 0 &&
21080
+ index < i &&
21081
+ String(index) === key &&
21082
+ hasOwnProperty(source, key)
21083
+ ) {
21084
+ indexes.add(index);
21085
+ }
21086
+ });
21087
+ source = prototype;
21088
+ }
21089
+
21090
+ if (indexes.size !== i) return null;
20320
21091
  const arr = new Array(i);
20321
21092
  while (i-- > 0) {
20322
21093
  arr[i] = thing[i];
@@ -97864,20 +98635,22 @@ const bundle = async (uri, options) => {
97864
98635
  const {
97865
98636
  refSet
97866
98637
  } = options.bundle;
97867
- const sanitizedURI = _util_url_mjs__WEBPACK_IMPORTED_MODULE_9__.sanitize(uri);
98638
+ // strategies look up same-document references by a resolved, hence normalized, URI;
98639
+ // the file is parsed as a whole document, so its URI has no fragment
98640
+ const baseURI = _util_url_mjs__WEBPACK_IMPORTED_MODULE_9__.normalize(_util_url_mjs__WEBPACK_IMPORTED_MODULE_9__.stripHash(uri));
97868
98641
  const mergedOptions = (0,_options_util_mjs__WEBPACK_IMPORTED_MODULE_8__.merge)(options, {
97869
98642
  resolve: {
97870
- baseURI: sanitizedURI
98643
+ baseURI
97871
98644
  }
97872
98645
  });
97873
98646
  let parseResult;
97874
98647
 
97875
98648
  // if refSet was provided, use it to avoid unnecessary parsing
97876
- if (refSet !== null && refSet.has(sanitizedURI)) {
98649
+ if (refSet !== null && refSet.has(baseURI)) {
97877
98650
  // @ts-ignore
97878
98651
  ({
97879
98652
  value: parseResult
97880
- } = refSet.find((0,ramda__WEBPACK_IMPORTED_MODULE_1__["default"])(sanitizedURI, 'uri')));
98653
+ } = refSet.find((0,ramda__WEBPACK_IMPORTED_MODULE_1__["default"])(baseURI, 'uri')));
97881
98654
  } else {
97882
98655
  parseResult = await (0,_parse_index_mjs__WEBPACK_IMPORTED_MODULE_7__["default"])(uri, mergedOptions);
97883
98656
  }
@@ -102241,8 +103014,10 @@ const dereferenceApiDOM = async (element, options) => {
102241
103014
  parseResult = new _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_4__["default"]([elementClone]);
102242
103015
  surrogateWrapping = true;
102243
103016
  }
103017
+
103018
+ // strategies look up same-document references by a resolved, hence normalized, URI
102244
103019
  const file = new _File_mjs__WEBPACK_IMPORTED_MODULE_5__["default"]({
102245
- uri: options.resolve.baseURI,
103020
+ uri: _util_url_mjs__WEBPACK_IMPORTED_MODULE_12__.normalize(options.resolve.baseURI),
102246
103021
  parseResult,
102247
103022
  mediaType: options.parse.mediaType
102248
103023
  });
@@ -102275,21 +103050,22 @@ const dereference = async (uri, options) => {
102275
103050
  const {
102276
103051
  refSet
102277
103052
  } = options.dereference;
102278
- const sanitizedURI = _util_url_mjs__WEBPACK_IMPORTED_MODULE_12__.sanitize(uri);
103053
+ // the file is parsed as a whole document, so its URI has no fragment
103054
+ const baseURI = _util_url_mjs__WEBPACK_IMPORTED_MODULE_12__.normalize(_util_url_mjs__WEBPACK_IMPORTED_MODULE_12__.stripHash(uri));
102279
103055
  let parseResult;
102280
103056
 
102281
103057
  // if refSet was provided, use it to avoid unnecessary parsing
102282
- if (refSet !== null && refSet.has(sanitizedURI)) {
103058
+ if (refSet !== null && refSet.has(baseURI)) {
102283
103059
  // @ts-ignore
102284
103060
  ({
102285
103061
  value: parseResult
102286
- } = refSet.find((0,ramda__WEBPACK_IMPORTED_MODULE_1__["default"])(sanitizedURI, 'uri')));
103062
+ } = refSet.find((0,ramda__WEBPACK_IMPORTED_MODULE_1__["default"])(baseURI, 'uri')));
102287
103063
  } else {
102288
103064
  parseResult = await (0,_parse_index_mjs__WEBPACK_IMPORTED_MODULE_10__["default"])(uri, options);
102289
103065
  }
102290
103066
  const mergedOptions = (0,_options_util_mjs__WEBPACK_IMPORTED_MODULE_11__.merge)(options, {
102291
103067
  resolve: {
102292
- baseURI: sanitizedURI
103068
+ baseURI
102293
103069
  },
102294
103070
  dereference: {
102295
103071
  // if refSet was not provided, then we can work in mutable mode
@@ -108942,6 +109718,10 @@ const defaultOptions = {
108942
109718
  resolve: {
108943
109719
  /**
108944
109720
  * baseURI serves as a base for all relative URL found in ApiDOM references.
109721
+ * It must be absolute: a file system path, a file:// URL or an HTTP(S) URL.
109722
+ * Defaults to the current working directory (the page URL in browsers).
109723
+ * A fragment marks where the ApiDOM fragment is located in its document;
109724
+ * leave it out when passing a whole document.
108945
109725
  */
108946
109726
  baseURI: '',
108947
109727
  /**
@@ -109162,7 +109942,13 @@ __webpack_require__.r(__webpack_exports__);
109162
109942
  */
109163
109943
 
109164
109944
  const baseURILens = (0,ramda__WEBPACK_IMPORTED_MODULE_1__["default"])((0,ramda__WEBPACK_IMPORTED_MODULE_4__["default"])(['resolve', 'baseURI']), (0,ramda__WEBPACK_IMPORTED_MODULE_0__["default"])(['resolve', 'baseURI']));
109165
- const baseURIDefault = baseURI => (0,ramda_adjunct__WEBPACK_IMPORTED_MODULE_5__["default"])(baseURI) ? (0,_util_url_mjs__WEBPACK_IMPORTED_MODULE_6__.cwd)() : baseURI;
109945
+ // in Node cwd() is a raw file system path; encode it, so that it reads as a URI
109946
+ // (in browsers it is the page URL, which may be an already encoded file:// URL)
109947
+ const cwdURI = () => {
109948
+ const dir = (0,_util_url_mjs__WEBPACK_IMPORTED_MODULE_6__.cwd)();
109949
+ return (0,_util_url_mjs__WEBPACK_IMPORTED_MODULE_6__.isFileSystemPath)(dir) && (0,_util_url_mjs__WEBPACK_IMPORTED_MODULE_6__.getProtocol)(dir) !== 'file' ? (0,_util_url_mjs__WEBPACK_IMPORTED_MODULE_6__.fromFileSystemPath)(dir) : dir;
109950
+ };
109951
+ const baseURIDefault = baseURI => (0,ramda_adjunct__WEBPACK_IMPORTED_MODULE_5__["default"])(baseURI) ? cwdURI() : baseURI;
109166
109952
 
109167
109953
  /**
109168
109954
  * @public
@@ -110837,9 +111623,10 @@ const resolveApiDOM = async (element, options) => {
110837
111623
  elementClone.classes.push('result');
110838
111624
  parseResult = new _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_3__["default"]([elementClone]);
110839
111625
  }
110840
- const sanitizedURI = _util_url_mjs__WEBPACK_IMPORTED_MODULE_10__.sanitize(_util_url_mjs__WEBPACK_IMPORTED_MODULE_10__.stripHash(options.resolve.baseURI));
111626
+
111627
+ // strategies look up same-document references by a resolved, hence normalized, URI
110841
111628
  const file = new _File_mjs__WEBPACK_IMPORTED_MODULE_7__["default"]({
110842
- uri: sanitizedURI,
111629
+ uri: _util_url_mjs__WEBPACK_IMPORTED_MODULE_10__.normalize(options.resolve.baseURI),
110843
111630
  parseResult,
110844
111631
  mediaType: options.parse.mediaType
110845
111632
  });
@@ -110866,9 +111653,11 @@ const resolveApiDOM = async (element, options) => {
110866
111653
  */
110867
111654
  const resolve = async (uri, options) => {
110868
111655
  const parseResult = await (0,_parse_index_mjs__WEBPACK_IMPORTED_MODULE_5__["default"])(uri, options);
111656
+ // the file is parsed as a whole document, so its URI has no fragment
111657
+ const baseURI = _util_url_mjs__WEBPACK_IMPORTED_MODULE_10__.normalize(_util_url_mjs__WEBPACK_IMPORTED_MODULE_10__.stripHash(uri));
110869
111658
  const mergedOptions = (0,_options_util_mjs__WEBPACK_IMPORTED_MODULE_4__.merge)(options, {
110870
111659
  resolve: {
110871
- baseURI: _util_url_mjs__WEBPACK_IMPORTED_MODULE_10__.sanitize(uri)
111660
+ baseURI
110872
111661
  }
110873
111662
  });
110874
111663
  return resolveApiDOM(parseResult, mergedOptions);
@@ -111827,21 +112616,23 @@ const isURI = uri => {
111827
112616
  */
111828
112617
  const toFileSystemPath = (uri, options) => {
111829
112618
  // RegExp patterns to URL-decode special characters for local filesystem paths
111830
- const urlDecodePatterns = [/%23/g, '#', /%24/g, '$', /%26/g, '&', /%2C/g, ',', /%40/g, '@'];
112619
+ const urlDecodePatterns = [/%23/g, '#', /%24/g, '$', /%26/g, '&', /%2C/g, ',', /%3F/g, '?', /%40/g, '@'];
111831
112620
  const keepFileProtocol = (0,ramda__WEBPACK_IMPORTED_MODULE_3__["default"])(false, 'keepFileProtocol', options);
111832
112621
  const isWindowsPredicate = (0,ramda__WEBPACK_IMPORTED_MODULE_3__["default"])(isWindows, 'isWindows', options);
111833
112622
 
111834
- // Step 1: `decodeURI` will decode characters such as Cyrillic characters, spaces, etc.
111835
- let path = decodeURI(uri);
111836
-
111837
- // Step 2: Manually decode characters that are not decoded by `decodeURI`.
112623
+ // Step 1: Manually decode characters that are not decoded by `decodeURI`.
111838
112624
  // This includes characters such as "#" and "?", which have special meaning in URLs,
111839
- // but are just normal characters in a filesystem path.
112625
+ // but are just normal characters in a filesystem path. It runs before `decodeURI`,
112626
+ // so that an encoded "%" (e.g. "%253F") isn't decoded twice.
112627
+ let path = uri;
111840
112628
  for (let i = 0; i < urlDecodePatterns.length; i += 2) {
111841
112629
  // @ts-ignore
111842
112630
  path = path.replace(urlDecodePatterns[i], urlDecodePatterns[i + 1]);
111843
112631
  }
111844
112632
 
112633
+ // Step 2: `decodeURI` will decode characters such as Cyrillic characters, spaces, etc.
112634
+ path = decodeURI(path);
112635
+
111845
112636
  // Step 3: If it's a "file://" URL, then format it consistently
111846
112637
  // or convert it to a local filesystem path
111847
112638
  let isFileUrl = path.substring(0, 7).toLowerCase() === 'file://';
@@ -111982,6 +112773,33 @@ const resolve = (from, to) => {
111982
112773
  return resolvedUrl.toString();
111983
112774
  };
111984
112775
 
112776
+ /**
112777
+ * Normalizes a URI the way `resolve` normalizes its result (WHATWG URL normalization):
112778
+ * lowercases the scheme and the host of an absolute URL, drops a default port and
112779
+ * removes dot segments. This is not RFC 3986 syntax-based normalization: existing
112780
+ * percent-encoding is left as is. A file system path is sanitized first, so characters
112781
+ * not allowed in URLs (e.g. spaces, `[`, `?`) are percent-encoded; a `file://` URL has
112782
+ * its path sanitized the same way and stays a URL. The fragment is kept as given.
112783
+ * A URI that can't be normalized is returned unchanged.
112784
+ * @public
112785
+ */
112786
+ const normalize = uri => {
112787
+ // getHash returns the root hash ('#') for a URI without fragment
112788
+ const fragment = uri.includes('#') ? getHash(uri) : '';
112789
+ const documentURI = stripHash(uri);
112790
+ try {
112791
+ let sanitizedURI = sanitize(documentURI);
112792
+ // sanitize turns a file:// URL into a path; keep it a URL, as references
112793
+ // resolved against it are, e.g. file:///C:/x.json rather than file://C:/x.json
112794
+ if (getProtocol(documentURI) === 'file') {
112795
+ sanitizedURI = `file://${sanitizedURI.startsWith('/') ? '' : '/'}${sanitizedURI}`;
112796
+ }
112797
+ return resolve('', sanitizedURI) + fragment;
112798
+ } catch {
112799
+ return uri;
112800
+ }
112801
+ };
112802
+
111985
112803
  /**
111986
112804
  * Computes the URI reference that resolves to `to` against `from` — the inverse
111987
112805
  * of `resolve`: `resolve(from, relative(from, to)) === to`. The reference is
@@ -112059,6 +112877,7 @@ const unsanitize = uri => {
112059
112877
  /* harmony export */ "isFileSystemPath", 0, /* binding */ isFileSystemPath,
112060
112878
  /* harmony export */ "isHttpUrl", 0, /* binding */ isHttpUrl,
112061
112879
  /* harmony export */ "isURI", 0, /* binding */ isURI,
112880
+ /* harmony export */ "normalize", 0, /* binding */ normalize,
112062
112881
  /* harmony export */ "relative", 0, /* binding */ relative,
112063
112882
  /* harmony export */ "resolve", 0, /* binding */ resolve,
112064
112883
  /* harmony export */ "sanitize", 0, /* binding */ sanitize,