@ohif/app 3.13.10 → 3.13.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/dist/{100.bundle.1c5ef7d0e0ea4583.js → 100.bundle.cb5a2bad747309f0.js} +2 -2
  2. package/dist/{1180.bundle.12ff4a7091b814b0.js → 1180.bundle.5b8634c0a08964c4.js} +2 -2
  3. package/dist/{136.bundle.b948da0438a0a660.js → 136.bundle.7b820280583ef059.js} +5 -5
  4. package/dist/{8478.bundle.4520037e6185b95f.js → 2169.bundle.2973ff2503da4478.js} +32 -42
  5. package/dist/{2299.bundle.2375af8b16a1702e.js → 2299.bundle.55b447ec64b2c61c.js} +5 -5
  6. package/dist/{2779.bundle.590547b8c00fb118.js → 2779.bundle.fecd2db9528a6793.js} +2 -2
  7. package/dist/{3500.bundle.7eafa2e253d6ebf9.js → 3500.bundle.ed0dac1a16ec3fc9.js} +3 -3
  8. package/dist/{5731.bundle.694bce33e168bf29.js → 3553.bundle.e4798bfbe97d7aca.js} +42 -92
  9. package/dist/{3760.bundle.049908339d53018a.js → 3760.bundle.676c3dfedb88b932.js} +3 -3
  10. package/dist/{9383.bundle.40008913697b48b8.js → 4104.bundle.175b407a79f0b910.js} +29 -115
  11. package/dist/{4556.bundle.f47dd30a2808e074.js → 4556.bundle.9dad045b95dbf87d.js} +2 -2
  12. package/dist/{4683.bundle.124370a390087ca2.js → 4683.bundle.bd79a0628604571e.js} +2 -2
  13. package/dist/{5060.bundle.09456fba37e490bf.js → 5060.bundle.1a87b7b8c79d243a.js} +2 -2
  14. package/dist/{5696.bundle.8212bd837256341d.js → 5696.bundle.9336757a352f09bf.js} +2 -2
  15. package/dist/{12.bundle.b4688cdbdd856b75.js → 5700.bundle.682cd7e4ba38db11.js} +913 -199
  16. package/dist/{7071.bundle.de8df9d95b2ba245.js → 7071.bundle.0dd91590b962da14.js} +2 -2
  17. package/dist/{7248.bundle.e96ca656fdb25c7d.js → 7248.bundle.b48a875240cdd78d.js} +5 -5
  18. package/dist/{7463.bundle.bc592adfcd96a763.js → 7463.bundle.10f90a3dc5df84cf.js} +2 -2
  19. package/dist/{7499.bundle.57679cd343fae834.js → 7499.bundle.18c1c759f0508e28.js} +8 -8
  20. package/dist/{781.bundle.40af085bb7abd069.js → 781.bundle.3dd9e958d39a1dde.js} +6 -6
  21. package/dist/{8492.bundle.80935f39a3863f1f.js → 8492.bundle.90e74bb48a042efa.js} +2 -2
  22. package/dist/{8832.bundle.21b7afcf9ad88fee.js → 8832.bundle.08d096b37edc3ff4.js} +6 -6
  23. package/dist/{89.bundle.0c0b32304742d0d3.js → 89.bundle.32ec8b1356c76ca0.js} +17 -17
  24. package/dist/{9290.bundle.9f40c51f5da6c0d4.js → 9290.bundle.93cc172c5bcc89f1.js} +2 -2
  25. package/dist/{9363.bundle.8b90310748978ac8.js → 9363.bundle.285d218d72f9ac0b.js} +2 -2
  26. package/dist/{9415.bundle.dc8266561c966fdc.js → 9415.bundle.e624b651488d77f6.js} +4 -4
  27. package/dist/{9437.bundle.8880cc3f5874eb8c.js → 9437.bundle.7d96a9ebfcf04849.js} +2 -2
  28. package/dist/{app.bundle.2e2def80f8090a74.js → app.bundle.03a0f18892736c61.js} +789 -946
  29. package/dist/{compute.bundle.910086331888fd1b.js → compute.bundle.b9477cca94f45255.js} +3 -3
  30. package/dist/index.html +1 -1
  31. package/dist/{interpolation.bundle.fa54018d8628f8c0.js → interpolation.bundle.237f0ac59d5e9b04.js} +3 -3
  32. package/dist/{polySeg.bundle.0e906840b3becd72.js → polySeg.bundle.bb830462c629693e.js} +3 -3
  33. package/dist/sw.js +1 -1
  34. package/package.json +7 -7
  35. /package/dist/{1483.bundle.d61e4b3b75394193.js → 1483.bundle.f328dd43d7a0f167.js} +0 -0
  36. /package/dist/{1602.bundle.ce71ed9405418551.js → 1602.bundle.00866f8a8fa36293.js} +0 -0
  37. /package/dist/{6749.bundle.903e779c064193ad.js → 6749.bundle.72392a7e62097ebb.js} +0 -0
  38. /package/dist/{8423.bundle.a73bb02540af284b.js → 8423.bundle.5b1beb9c42b3e746.js} +0 -0
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
- (globalThis["rspackChunk"] = globalThis["rspackChunk"] || []).push([[12], {
3
- 97527(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
2
+ (globalThis["rspackChunk"] = globalThis["rspackChunk"] || []).push([[5700], {
3
+ 25439(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
4
4
 
5
5
  // EXPORTS
6
6
  __webpack_require__.d(__webpack_exports__, {
@@ -53,12 +53,65 @@ const utils_hasOwnProperty = (
53
53
  hasOwnProperty.call(obj, prop)
54
54
  )(Object.prototype);
55
55
 
56
+ const isUnsafeObjectKey = (prop) =>
57
+ typeof prop === 'string' &&
58
+ (prop === '__proto__' || prop === 'constructor' || prop === 'prototype');
59
+
60
+ /**
61
+ * Determine whether an inherited object must be treated as a shared-prototype
62
+ * boundary. Cross-realm Object.prototype objects cannot be distinguished
63
+ * reliably from application-created null-prototype objects because their
64
+ * properties are mutable, so all inherited terminal prototypes are excluded
65
+ * as a fail-closed boundary. A null-prototype source still keeps its own
66
+ * properties, as produced by mergeConfig and other safe materialization paths.
67
+ *
68
+ * @param {*} obj The object to inspect
69
+ * @param {*} prototype The object's prototype
70
+ * @param {boolean} source Whether obj is the original traversal source
71
+ *
72
+ * @returns {boolean} True when obj is a safe prototype traversal boundary
73
+ */
74
+ const isPrototypeBoundary = (obj, prototype, source) =>
75
+ obj === Object.prototype || (!source && prototype === null);
76
+
77
+ /**
78
+ * Determine whether an object can retain its identity through code paths that
79
+ * add, replace, and remove config properties without bypassing unsafe-key
80
+ * filtering. Immutable objects, unsafe-key-bearing objects, and objects with
81
+ * accessor or restricted data properties must be materialized instead.
82
+ *
83
+ * @param {*} obj The object to inspect
84
+ *
85
+ * @returns {boolean} True when every own property is safe and fully mutable
86
+ */
87
+ const isSafeAndFullyMutable = (obj) => {
88
+ if (!Object.isExtensible(obj)) {
89
+ return false;
90
+ }
91
+
92
+ const props = Object.getOwnPropertyNames(obj);
93
+
94
+ if (Object.getOwnPropertySymbols) {
95
+ props.push(...Object.getOwnPropertySymbols(obj));
96
+ }
97
+
98
+ return props.every((prop) => {
99
+ if (isUnsafeObjectKey(prop)) {
100
+ return false;
101
+ }
102
+
103
+ const descriptor = Object.getOwnPropertyDescriptor(obj, prop);
104
+
105
+ return !!descriptor && descriptor.configurable && descriptor.writable === true;
106
+ });
107
+ };
108
+
56
109
  /**
57
- * Walk the prototype chain (excluding the shared Object.prototype) looking for
58
- * an own `prop`. This distinguishes genuine own/inherited members — including
59
- * class accessors and template prototypes — from members injected via
60
- * Object.prototype pollution (e.g. `Object.prototype.username = '...'`), which
61
- * live on Object.prototype itself and are therefore never matched.
110
+ * Walk the prototype chain (excluding the source realm's Object.prototype)
111
+ * looking for an own `prop`. This distinguishes genuine own/inherited members
112
+ * — including class accessors and template prototypes — from members injected
113
+ * via Object.prototype pollution (e.g. `Object.prototype.username = '...'`),
114
+ * which live on Object.prototype itself and are therefore never matched.
62
115
  *
63
116
  * @param {*} thing The value whose chain to inspect
64
117
  * @param {string|symbol} prop The property key to look for
@@ -69,16 +122,22 @@ const hasOwnInPrototypeChain = (thing, prop) => {
69
122
  let obj = thing;
70
123
  const seen = [];
71
124
 
72
- while (obj != null && obj !== Object.prototype) {
125
+ while (obj != null) {
73
126
  if (seen.indexOf(obj) !== -1) {
74
127
  return false;
75
128
  }
76
129
  seen.push(obj);
77
130
 
131
+ const prototype = getPrototypeOf(obj);
132
+
133
+ if (isPrototypeBoundary(obj, prototype, obj === thing)) {
134
+ return false;
135
+ }
136
+
78
137
  if (utils_hasOwnProperty(obj, prop)) {
79
138
  return true;
80
139
  }
81
- obj = getPrototypeOf(obj);
140
+ obj = prototype;
82
141
  }
83
142
  return false;
84
143
  };
@@ -97,6 +156,69 @@ const hasOwnInPrototypeChain = (thing, prop) => {
97
156
  const getSafeProp = (obj, prop) =>
98
157
  obj != null && hasOwnInPrototypeChain(obj, prop) ? obj[prop] : undefined;
99
158
 
159
+ /**
160
+ * Flatten an object and its application-defined prototype chain into a
161
+ * null-prototype object. Members inherited only from the source realm's
162
+ * Object.prototype are deliberately excluded, while class/template members
163
+ * below that boundary are preserved.
164
+ *
165
+ * @param {*} thing The value to flatten
166
+ *
167
+ * @returns {*} A null-prototype copy, or the original value when it is already
168
+ * structurally safe or is not an object
169
+ */
170
+ const toSafeFlatObject = (thing) => {
171
+ if (thing == null || (typeof thing !== 'object' && typeof thing !== 'function')) {
172
+ return thing;
173
+ }
174
+
175
+ const sourcePrototype = getPrototypeOf(thing);
176
+
177
+ if (sourcePrototype === null && isSafeAndFullyMutable(thing)) {
178
+ return thing;
179
+ }
180
+
181
+ const result = Object.create(null);
182
+ const merged = Object.create(null);
183
+ const seen = [];
184
+ let current = thing;
185
+
186
+ while (current != null) {
187
+ if (seen.indexOf(current) !== -1) {
188
+ break;
189
+ }
190
+
191
+ seen.push(current);
192
+
193
+ const prototype = current === thing ? sourcePrototype : getPrototypeOf(current);
194
+
195
+ if (isPrototypeBoundary(current, prototype, current === thing)) {
196
+ break;
197
+ }
198
+
199
+ const props = Object.getOwnPropertyNames(current);
200
+
201
+ if (Object.getOwnPropertySymbols) {
202
+ props.push(...Object.getOwnPropertySymbols(current));
203
+ }
204
+
205
+ for (const prop of props) {
206
+ if (isUnsafeObjectKey(prop)) {
207
+ continue;
208
+ }
209
+
210
+ if (!utils_hasOwnProperty(merged, prop)) {
211
+ result[prop] = thing[prop];
212
+ merged[prop] = true;
213
+ }
214
+ }
215
+
216
+ current = prototype;
217
+ }
218
+
219
+ return result;
220
+ };
221
+
100
222
  const kindOf = ((cache) => (thing) => {
101
223
  const str = utils_toString.call(thing);
102
224
  return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
@@ -228,12 +350,10 @@ const isPlainObject = (val) => {
228
350
 
229
351
  const prototype = getPrototypeOf(val);
230
352
  return (
231
- (prototype === null ||
232
- prototype === Object.prototype ||
233
- getPrototypeOf(prototype) === null) &&
234
- // Treat any genuine (non-Object.prototype-polluted) Symbol.toStringTag or
235
- // Symbol.iterator as evidence the value is a tagged/iterable type rather
236
- // than a plain object, while ignoring keys injected onto Object.prototype.
353
+ (prototype === null || prototype === Object.prototype || getPrototypeOf(prototype) === null) &&
354
+ // Treat safe own/inherited Symbol.toStringTag or Symbol.iterator members as
355
+ // evidence the value is tagged/iterable, while ignoring members reachable
356
+ // only through shared or terminal prototype boundaries.
237
357
  !hasOwnInPrototypeChain(val, toStringTag) &&
238
358
  !hasOwnInPrototypeChain(val, utils_iterator)
239
359
  );
@@ -320,6 +440,7 @@ const isBlob = kindOfTest('Blob');
320
440
  * @returns {boolean} True if value is a FileList, otherwise false
321
441
  */
322
442
  const utils_isFileList = kindOfTest('FileList');
443
+ const isSet = kindOfTest('Set');
323
444
 
324
445
  /**
325
446
  * Determine if a value is a Stream
@@ -885,12 +1006,23 @@ const toJSONObject = (obj) => {
885
1006
  if (!('toJSON' in source)) {
886
1007
  // add-on descent / delete-on-ascent: preserves path semantics, so DAG nodes serialise at every occurrence (see #7230).
887
1008
  visited.add(source);
888
- const target = isArray(source) ? [] : {};
889
1009
 
890
- forEach(source, (value, key) => {
891
- const reducedValue = visit(value);
892
- !isUndefined(reducedValue) && (target[key] = reducedValue);
893
- });
1010
+ let target;
1011
+
1012
+ if (isSet(source)) {
1013
+ target = [];
1014
+ for (const value of source) {
1015
+ const reducedValue = visit(value);
1016
+ !isUndefined(reducedValue) && target.push(reducedValue);
1017
+ }
1018
+ } else {
1019
+ target = isArray(source) ? [] : {};
1020
+
1021
+ forEach(source, (value, key) => {
1022
+ const reducedValue = visit(value);
1023
+ !isUndefined(reducedValue) && (target[key] = reducedValue);
1024
+ });
1025
+ }
894
1026
 
895
1027
  visited.delete(source);
896
1028
 
@@ -1035,6 +1167,7 @@ const isSafeIterable = (thing) =>
1035
1167
  hasOwnProp: utils_hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection
1036
1168
  hasOwnInPrototypeChain,
1037
1169
  getSafeProp,
1170
+ toSafeFlatObject,
1038
1171
  reduceDescriptors,
1039
1172
  freezeMethods,
1040
1173
  toObjectSet,
@@ -1107,18 +1240,20 @@ const ignoreDuplicateOf = utils.toObjectSet([
1107
1240
  key = line.substring(0, i).trim().toLowerCase();
1108
1241
  val = line.substring(i + 1).trim();
1109
1242
 
1110
- if (!key || (parsed[key] && ignoreDuplicateOf[key])) {
1243
+ const hasKey = utils.hasOwnProp(parsed, key);
1244
+
1245
+ if (!key || (hasKey && utils.hasOwnProp(ignoreDuplicateOf, key))) {
1111
1246
  return;
1112
1247
  }
1113
1248
 
1114
1249
  if (key === 'set-cookie') {
1115
- if (parsed[key]) {
1250
+ if (hasKey) {
1116
1251
  parsed[key].push(val);
1117
1252
  } else {
1118
1253
  parsed[key] = [val];
1119
1254
  }
1120
1255
  } else {
1121
- parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
1256
+ parsed[key] = hasKey ? parsed[key] + ', ' + val : val;
1122
1257
  }
1123
1258
  });
1124
1259
 
@@ -1220,6 +1355,124 @@ function parseTokens(str) {
1220
1355
  return tokens;
1221
1356
  }
1222
1357
 
1358
+ const parameterNameRE = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;
1359
+
1360
+ function trimOWS(value) {
1361
+ let start = 0;
1362
+ let end = value.length;
1363
+
1364
+ while (start < end) {
1365
+ const code = value.charCodeAt(start);
1366
+
1367
+ if (code !== 0x09 && code !== 0x20) {
1368
+ break;
1369
+ }
1370
+
1371
+ start += 1;
1372
+ }
1373
+
1374
+ while (end > start) {
1375
+ const code = value.charCodeAt(end - 1);
1376
+
1377
+ if (code !== 0x09 && code !== 0x20) {
1378
+ break;
1379
+ }
1380
+
1381
+ end -= 1;
1382
+ }
1383
+
1384
+ return start === 0 && end === value.length ? value : value.slice(start, end);
1385
+ }
1386
+
1387
+ function decodeQuotedString(value) {
1388
+ const last = value.length - 1;
1389
+
1390
+ if (last < 1 || value.charCodeAt(0) !== 0x22 || value.charCodeAt(last) !== 0x22) {
1391
+ return value;
1392
+ }
1393
+
1394
+ let decoded = '';
1395
+
1396
+ for (let i = 1; i < last; i++) {
1397
+ const code = value.charCodeAt(i);
1398
+
1399
+ if (code === 0x22) {
1400
+ return value;
1401
+ }
1402
+
1403
+ if (code === 0x5c) {
1404
+ i += 1;
1405
+
1406
+ if (i >= last) {
1407
+ return value;
1408
+ }
1409
+ }
1410
+
1411
+ decoded += value[i];
1412
+ }
1413
+
1414
+ return decoded;
1415
+ }
1416
+
1417
+ function parseParameters(value) {
1418
+ const parameters = Object.create(null);
1419
+ const str = String(value);
1420
+ let start = 0;
1421
+ let quoted = false;
1422
+ let escaped = false;
1423
+
1424
+ function parseParameter(end) {
1425
+ const part = trimOWS(str.slice(start, end));
1426
+ const equals = part.indexOf('=');
1427
+
1428
+ if (equals < 1) {
1429
+ return;
1430
+ }
1431
+
1432
+ const name = trimOWS(part.slice(0, equals));
1433
+
1434
+ if (!parameterNameRE.test(name)) {
1435
+ return;
1436
+ }
1437
+
1438
+ const normalizedName = name.toLowerCase();
1439
+
1440
+ if (
1441
+ normalizedName === '__proto__' ||
1442
+ normalizedName === 'constructor' ||
1443
+ normalizedName === 'prototype'
1444
+ ) {
1445
+ return;
1446
+ }
1447
+
1448
+ const parameterValue = trimOWS(part.slice(equals + 1));
1449
+ parameters[normalizedName] = decodeQuotedString(parameterValue);
1450
+ }
1451
+
1452
+ for (let i = 0; i < str.length; i++) {
1453
+ const code = str.charCodeAt(i);
1454
+
1455
+ if (quoted) {
1456
+ if (escaped) {
1457
+ escaped = false;
1458
+ } else if (code === 0x5c) {
1459
+ escaped = true;
1460
+ } else if (code === 0x22) {
1461
+ quoted = false;
1462
+ }
1463
+ } else if (code === 0x22) {
1464
+ quoted = true;
1465
+ } else if (code === 0x2c || code === 0x3b) {
1466
+ parseParameter(i);
1467
+ start = i + 1;
1468
+ }
1469
+ }
1470
+
1471
+ parseParameter(str.length);
1472
+
1473
+ return parameters;
1474
+ }
1475
+
1223
1476
  const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
1224
1477
 
1225
1478
  function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
@@ -1471,7 +1724,8 @@ class AxiosHeaders {
1471
1724
  }
1472
1725
 
1473
1726
  getSetCookie() {
1474
- return this.get('set-cookie') || [];
1727
+ const value = this.get('set-cookie');
1728
+ return utils.isArray(value) ? value : value == null || value === false ? [] : [value];
1475
1729
  }
1476
1730
 
1477
1731
  get [Symbol.toStringTag]() {
@@ -1482,6 +1736,10 @@ class AxiosHeaders {
1482
1736
  return thing instanceof this ? thing : new this(thing);
1483
1737
  }
1484
1738
 
1739
+ static parseParameters(value) {
1740
+ return parseParameters(value);
1741
+ }
1742
+
1485
1743
  static concat(first, ...targets) {
1486
1744
  const computed = new this(first);
1487
1745
 
@@ -1615,9 +1873,40 @@ function redactConfig(config, redactKeys) {
1615
1873
  return visit(config);
1616
1874
  }
1617
1875
 
1876
+ function stringifySafely(value) {
1877
+ try {
1878
+ return String(value);
1879
+ } catch (err) {
1880
+ return '';
1881
+ }
1882
+ }
1883
+
1884
+ function aggregateErrorMessage(error) {
1885
+ const message = error.errors
1886
+ .map((entry) => {
1887
+ try {
1888
+ return entry && entry.message ? stringifySafely(entry.message) : stringifySafely(entry);
1889
+ } catch (err) {
1890
+ return '';
1891
+ }
1892
+ })
1893
+ .filter(Boolean)
1894
+ .join('; ');
1895
+
1896
+ return message || error.name || 'AggregateError';
1897
+ }
1898
+
1618
1899
  class AxiosError extends Error {
1619
1900
  static from(error, code, config, request, response, customProps) {
1620
- const axiosError = new AxiosError(error.message, code || error.code, config, request, response);
1901
+ // `AggregateError` (thrown by Node on dual-stack/Happy-Eyeballs connection
1902
+ // failures) has an empty `message`; its detail lives in `errors[]`. Without
1903
+ // this, the wrapped error surfaces with a blank message (see #6721).
1904
+ let message = error.message;
1905
+ if (!message && utils.isArray(error.errors) && error.errors.length) {
1906
+ message = aggregateErrorMessage(error);
1907
+ }
1908
+
1909
+ const axiosError = new AxiosError(message, code || error.code, config, request, response);
1621
1910
  // Match native `Error` `cause` semantics: non-enumerable. The wrapped
1622
1911
  // error often carries circular internals (sockets, requests, agents), so
1623
1912
  // an enumerable `cause` makes structured loggers (pino/winston) and any
@@ -1735,7 +2024,6 @@ AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED = 'ERR_FORM_DATA_DEPTH_EXCEEDED';
1735
2024
  /* export default */ const helpers_null = (null);
1736
2025
 
1737
2026
  ;// CONCATENATED MODULE: ../../../node_modules/axios/lib/helpers/toFormData.js
1738
- /* provided dependency */ var Buffer = __webpack_require__(81429)["hp"];
1739
2027
 
1740
2028
 
1741
2029
 
@@ -1743,6 +2031,7 @@ AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED = 'ERR_FORM_DATA_DEPTH_EXCEEDED';
1743
2031
  // temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored
1744
2032
 
1745
2033
 
2034
+
1746
2035
  // Default nesting limit shared with the inverse transform (formDataToJSON) so
1747
2036
  // the FormData <-> JSON round-trip stays symmetric.
1748
2037
  const DEFAULT_FORM_DATA_MAX_DEPTH = 100;
@@ -1836,28 +2125,18 @@ function toFormData(obj, formData, options) {
1836
2125
  // eslint-disable-next-line no-param-reassign
1837
2126
  formData = formData || new (helpers_null || FormData)();
1838
2127
 
1839
- // eslint-disable-next-line no-param-reassign
1840
- options = utils.toFlatObject(
1841
- options,
1842
- {
1843
- metaTokens: true,
1844
- dots: false,
1845
- indexes: false,
1846
- },
1847
- false,
1848
- function defined(option, source) {
1849
- // eslint-disable-next-line no-eq-null,eqeqeq
1850
- return !utils.isUndefined(source[option]);
1851
- }
1852
- );
2128
+ const option = (name, fallback) => {
2129
+ const value = utils.getSafeProp(options, name);
2130
+ return utils.isUndefined(value) ? fallback : value;
2131
+ };
1853
2132
 
1854
- const metaTokens = options.metaTokens;
2133
+ const metaTokens = option('metaTokens', true);
1855
2134
  // eslint-disable-next-line no-use-before-define
1856
- const visitor = options.visitor || defaultVisitor;
1857
- const dots = options.dots;
1858
- const indexes = options.indexes;
1859
- const _Blob = options.Blob || (typeof Blob !== 'undefined' && Blob);
1860
- const maxDepth = options.maxDepth === undefined ? DEFAULT_FORM_DATA_MAX_DEPTH : options.maxDepth;
2135
+ const visitor = option('visitor') || defaultVisitor;
2136
+ const dots = option('dots', false);
2137
+ const indexes = option('indexes', false);
2138
+ const _Blob = option('Blob') || (typeof Blob !== 'undefined' && Blob);
2139
+ const maxDepth = option('maxDepth', DEFAULT_FORM_DATA_MAX_DEPTH);
1861
2140
  const useBlob = _Blob && utils.isSpecCompliantForm(formData);
1862
2141
  const stack = [];
1863
2142
 
@@ -1884,10 +2163,13 @@ function toFormData(obj, formData, options) {
1884
2163
  if (useBlob && typeof _Blob === 'function') {
1885
2164
  return new _Blob([value]);
1886
2165
  }
1887
- if (typeof Buffer !== 'undefined') {
1888
- return Buffer.from(value);
2166
+ if (helpers_null && helpers_null.isBufferAvailable()) {
2167
+ return helpers_null.from(value);
1889
2168
  }
1890
- throw new core_AxiosError('Blob is not supported. Use a Buffer instead.', core_AxiosError.ERR_NOT_SUPPORT);
2169
+ throw new core_AxiosError(
2170
+ 'Blob is not supported. Use a Buffer instead.',
2171
+ core_AxiosError.ERR_NOT_SUPPORT
2172
+ );
1891
2173
  }
1892
2174
 
1893
2175
  return value;
@@ -2159,9 +2441,57 @@ function buildURL(url, params, options) {
2159
2441
 
2160
2442
 
2161
2443
 
2444
+ const InterceptorManager_$internals = Symbol('internals');
2445
+
2446
+ // `handlers` is public and may be replaced with a nullish value by user code;
2447
+ // `clear()` has always tolerated that. Treat it as an empty stack rather than
2448
+ // dereferencing it.
2449
+ function countHandlers(handlers) {
2450
+ return handlers ? handlers.length : 0;
2451
+ }
2452
+
2453
+ function trimHandlers(handlers) {
2454
+ if (!handlers) {
2455
+ return;
2456
+ }
2457
+
2458
+ while (handlers.length && handlers[handlers.length - 1] === null) {
2459
+ handlers.pop();
2460
+ }
2461
+ }
2462
+
2463
+ function syncHandlerEntries(manager, internals) {
2464
+ const handlers = manager.handlers;
2465
+ const length = countHandlers(handlers);
2466
+
2467
+ if (handlers !== internals.handlersRef) {
2468
+ internals.handlersRef = handlers;
2469
+ internals.handlerEntries.clear();
2470
+ } else if (length !== internals.handlersLength) {
2471
+ if (!length) {
2472
+ internals.handlerEntries.clear();
2473
+ } else {
2474
+ internals.handlerEntries.forEach(function removeStaleEntry(entry, id) {
2475
+ if (handlers[entry.index] !== entry.handler) {
2476
+ internals.handlerEntries.delete(id);
2477
+ }
2478
+ });
2479
+ }
2480
+ }
2481
+
2482
+ internals.handlersLength = length;
2483
+ }
2484
+
2162
2485
  class InterceptorManager {
2163
2486
  constructor() {
2164
2487
  this.handlers = [];
2488
+ this[InterceptorManager_$internals] = {
2489
+ handlersRef: this.handlers,
2490
+ handlersLength: this.handlers.length,
2491
+ handlerEntries: new Map(),
2492
+ iterationDepth: 0,
2493
+ nextId: 0,
2494
+ };
2165
2495
  }
2166
2496
 
2167
2497
  /**
@@ -2174,13 +2504,30 @@ class InterceptorManager {
2174
2504
  * @return {Number} An ID used to remove interceptor later
2175
2505
  */
2176
2506
  use(fulfilled, rejected, options) {
2177
- this.handlers.push({
2507
+ const handler = {
2178
2508
  fulfilled,
2179
2509
  rejected,
2180
2510
  synchronous: options ? options.synchronous : false,
2181
2511
  runWhen: options ? options.runWhen : null,
2512
+ };
2513
+ const internals = this[InterceptorManager_$internals];
2514
+
2515
+ if (this.handlers == null) {
2516
+ this.handlers = [];
2517
+ }
2518
+
2519
+ syncHandlerEntries(this, internals);
2520
+
2521
+ const id = internals.nextId++;
2522
+
2523
+ this.handlers.push(handler);
2524
+ internals.handlerEntries.set(id, {
2525
+ handler,
2526
+ index: this.handlers.length - 1,
2182
2527
  });
2183
- return this.handlers.length - 1;
2528
+ internals.handlersLength = this.handlers.length;
2529
+
2530
+ return id;
2184
2531
  }
2185
2532
 
2186
2533
  /**
@@ -2191,8 +2538,27 @@ class InterceptorManager {
2191
2538
  * @returns {void}
2192
2539
  */
2193
2540
  eject(id) {
2194
- if (this.handlers[id]) {
2195
- this.handlers[id] = null;
2541
+ const internals = this[InterceptorManager_$internals];
2542
+
2543
+ syncHandlerEntries(this, internals);
2544
+
2545
+ const entry = internals.handlerEntries.get(id);
2546
+
2547
+ if (entry) {
2548
+ internals.handlerEntries.delete(id);
2549
+
2550
+ // Ignore IDs invalidated by clear or direct replacement of handlers.
2551
+ if (this.handlers[entry.index] !== entry.handler) {
2552
+ return;
2553
+ }
2554
+
2555
+ this.handlers[entry.index] = null;
2556
+
2557
+ // Do not reuse an index while forEach is walking its length snapshot.
2558
+ if (!internals.iterationDepth) {
2559
+ trimHandlers(this.handlers);
2560
+ internals.handlersLength = this.handlers.length;
2561
+ }
2196
2562
  }
2197
2563
  }
2198
2564
 
@@ -2204,6 +2570,7 @@ class InterceptorManager {
2204
2570
  clear() {
2205
2571
  if (this.handlers) {
2206
2572
  this.handlers = [];
2573
+ syncHandlerEntries(this, this[InterceptorManager_$internals]);
2207
2574
  }
2208
2575
  }
2209
2576
 
@@ -2218,11 +2585,25 @@ class InterceptorManager {
2218
2585
  * @returns {void}
2219
2586
  */
2220
2587
  forEach(fn) {
2221
- utils.forEach(this.handlers, function forEachHandler(h) {
2222
- if (h !== null) {
2223
- fn(h);
2588
+ const internals = this[InterceptorManager_$internals];
2589
+
2590
+ syncHandlerEntries(this, internals);
2591
+
2592
+ internals.iterationDepth++;
2593
+
2594
+ try {
2595
+ utils.forEach(this.handlers, function forEachHandler(h) {
2596
+ if (h !== null) {
2597
+ fn(h);
2598
+ }
2599
+ });
2600
+ } finally {
2601
+ if (!--internals.iterationDepth) {
2602
+ syncHandlerEntries(this, internals);
2603
+ trimHandlers(this.handlers);
2604
+ internals.handlersLength = countHandlers(this.handlers);
2224
2605
  }
2225
- });
2606
+ }
2226
2607
  }
2227
2608
  }
2228
2609
 
@@ -2375,12 +2756,18 @@ function throwIfDepthExceeded(index) {
2375
2756
  * @returns An array of strings.
2376
2757
  */
2377
2758
  function parsePropPath(name) {
2378
- // foo[x][y][z]
2379
- // foo.x.y.z
2380
- // foo-x-y-z
2381
- // foo x y z
2759
+ // foo[x][y][z] -> ['foo', 'x', 'y', 'z']
2760
+ // foo.x.y.z -> ['foo', 'x', 'y', 'z']
2761
+ // A path is split on `.` and on `[...]` groups. A segment — whether written
2762
+ // in dot notation or captured inside brackets — may contain any character
2763
+ // except `.`, `[` and `]`, so a key like `user-name` or `user name` is kept
2764
+ // literal instead of being split (#5402). `.`, `[` and `]` keep their existing
2765
+ // meaning, e.g. `foo[bar.baz]` -> ['foo', 'bar', 'baz'] and `[]` is an array push.
2766
+ // Excluding `[` from the bracket group also makes the match fail fast at the
2767
+ // next `[`, so a malformed name cannot rescan to the end of the string from
2768
+ // every unmatched `[` — parsing stays linear in the length of the name.
2382
2769
  const path = [];
2383
- const pattern = /\w+|\[(\w*)]/g;
2770
+ const pattern = /[^.[\]]+|\[([^.[\]]*)]/g;
2384
2771
  let match;
2385
2772
 
2386
2773
  while ((match = pattern.exec(name)) !== null) {
@@ -2470,6 +2857,25 @@ function formDataToJSON(formData) {
2470
2857
 
2471
2858
  /* export default */ const helpers_formDataToJSON = (formDataToJSON);
2472
2859
 
2860
+ ;// CONCATENATED MODULE: ../../../node_modules/axios/lib/core/methodList.js
2861
+
2862
+
2863
+ const methodList = Object.freeze([
2864
+ 'get',
2865
+ 'delete',
2866
+ 'head',
2867
+ 'options',
2868
+ 'post',
2869
+ 'put',
2870
+ 'patch',
2871
+ 'purge',
2872
+ 'link',
2873
+ 'unlink',
2874
+ 'query',
2875
+ ]);
2876
+
2877
+ /* export default */ const core_methodList = (methodList);
2878
+
2473
2879
  ;// CONCATENATED MODULE: ../../../node_modules/axios/lib/defaults/index.js
2474
2880
 
2475
2881
 
@@ -2481,6 +2887,7 @@ function formDataToJSON(formData) {
2481
2887
 
2482
2888
 
2483
2889
 
2890
+
2484
2891
  const defaults_own = (obj, key) => (obj != null && utils.hasOwnProp(obj, key) ? obj[key] : undefined);
2485
2892
 
2486
2893
  /**
@@ -2493,7 +2900,7 @@ const defaults_own = (obj, key) => (obj != null && utils.hasOwnProp(obj, key) ?
2493
2900
  *
2494
2901
  * @returns {string} A stringified version of the rawValue.
2495
2902
  */
2496
- function stringifySafely(rawValue, parser, encoder) {
2903
+ function defaults_stringifySafely(rawValue, parser, encoder) {
2497
2904
  if (utils.isString(rawValue)) {
2498
2905
  try {
2499
2906
  (parser || JSON.parse)(rawValue);
@@ -2572,7 +2979,7 @@ const defaults = {
2572
2979
 
2573
2980
  if (isObjectPayload || hasJSONContentType) {
2574
2981
  headers.setContentType('application/json', false);
2575
- return stringifySafely(data);
2982
+ return defaults_stringifySafely(data);
2576
2983
  }
2577
2984
 
2578
2985
  return data;
@@ -2643,7 +3050,7 @@ const defaults = {
2643
3050
  },
2644
3051
  };
2645
3052
 
2646
- utils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'query'], (method) => {
3053
+ utils.forEach(core_methodList, (method) => {
2647
3054
  defaults.headers[method] = {};
2648
3055
  });
2649
3056
 
@@ -2739,6 +3146,32 @@ function settle(resolve, reject, response) {
2739
3146
  }
2740
3147
  }
2741
3148
 
3149
+ ;// CONCATENATED MODULE: ../../../node_modules/axios/lib/helpers/normalizeURLForProtocolCheck.js
3150
+
3151
+
3152
+ const urlParserControlCharacters = /[\t\n\r]/g;
3153
+
3154
+ /**
3155
+ * Match WHATWG URL preprocessing before checking a URL's protocol.
3156
+ *
3157
+ * @param {string} url
3158
+ *
3159
+ * @returns {string}
3160
+ */
3161
+ function normalizeURLForProtocolCheck(url) {
3162
+ if (typeof url !== 'string') {
3163
+ return url;
3164
+ }
3165
+
3166
+ let start = 0;
3167
+
3168
+ while (start < url.length && url.charCodeAt(start) <= 0x20) {
3169
+ start++;
3170
+ }
3171
+
3172
+ return url.slice(start).replace(urlParserControlCharacters, '');
3173
+ }
3174
+
2742
3175
  ;// CONCATENATED MODULE: ../../../node_modules/axios/lib/helpers/parseProtocol.js
2743
3176
 
2744
3177
 
@@ -2809,7 +3242,7 @@ function speedometer(samplesCount, min) {
2809
3242
  * Throttle decorator
2810
3243
  * @param {Function} fn
2811
3244
  * @param {Number} freq
2812
- * @return {Function}
3245
+ * @return {Array<Function>}
2813
3246
  */
2814
3247
  function throttle(fn, freq) {
2815
3248
  let timestamp = 0;
@@ -2844,8 +3277,9 @@ function throttle(fn, freq) {
2844
3277
  };
2845
3278
 
2846
3279
  const flush = () => lastArgs && invoke(lastArgs);
3280
+ const flushWith = (...args) => invoke(args);
2847
3281
 
2848
- return [throttled, flush];
3282
+ return [throttled, flush, flushWith];
2849
3283
  }
2850
3284
 
2851
3285
  /* export default */ const helpers_throttle = (throttle);
@@ -2860,12 +3294,12 @@ const progressEventReducer = (listener, isDownloadStream, freq = 3) => {
2860
3294
  const _speedometer = helpers_speedometer(50, 250);
2861
3295
 
2862
3296
  return helpers_throttle((e) => {
2863
- if (!e || typeof e.loaded !== 'number') {
3297
+ if (!e || !utils.isNumber(e.loaded)) {
2864
3298
  return;
2865
3299
  }
2866
3300
  const rawLoaded = e.loaded;
2867
3301
  const total = e.lengthComputable ? e.total : undefined;
2868
- const loaded = total != null ? Math.min(rawLoaded, total) : rawLoaded;
3302
+ const loaded = Math.max(0, total != null ? Math.min(rawLoaded, total) : rawLoaded);
2869
3303
  const progressBytes = Math.max(0, loaded - bytesNotified);
2870
3304
  const rate = _speedometer(progressBytes);
2871
3305
 
@@ -2902,9 +3336,9 @@ const progressEventDecorator = (total, throttled) => {
2902
3336
  };
2903
3337
 
2904
3338
  const asyncDecorator =
2905
- (fn) =>
3339
+ (fn, scheduler = utils.asap) =>
2906
3340
  (...args) =>
2907
- utils.asap(() => fn(...args));
3341
+ scheduler(() => fn(...args));
2908
3342
 
2909
3343
  ;// CONCATENATED MODULE: ../../../node_modules/axios/lib/helpers/isURLSameOrigin.js
2910
3344
 
@@ -3023,9 +3457,17 @@ function isAbsoluteURL(url) {
3023
3457
  * @returns {string} The combined URL
3024
3458
  */
3025
3459
  function combineURLs(baseURL, relativeURL) {
3026
- return relativeURL
3027
- ? baseURL.replace(/\/?\/$/, '') + '/' + relativeURL.replace(/^\/+/, '')
3028
- : baseURL;
3460
+ if (!relativeURL) {
3461
+ return baseURL;
3462
+ }
3463
+
3464
+ let end = baseURL.length;
3465
+
3466
+ while (end > 0 && baseURL.charCodeAt(end - 1) === 47) {
3467
+ end--;
3468
+ }
3469
+
3470
+ return baseURL.slice(0, end) + '/' + relativeURL.replace(/^\/+/, '');
3029
3471
  }
3030
3472
 
3031
3473
  ;// CONCATENATED MODULE: ../../../node_modules/axios/lib/core/buildFullPath.js
@@ -3035,28 +3477,54 @@ function combineURLs(baseURL, relativeURL) {
3035
3477
 
3036
3478
 
3037
3479
 
3480
+
3038
3481
  const malformedHttpProtocol = /^https?:(?!\/\/)/i;
3039
- const httpProtocolControlCharacters = /[\t\n\r]/g;
3040
3482
 
3041
- function stripLeadingC0ControlOrSpace(url) {
3042
- let i = 0;
3043
- while (i < url.length && url.charCodeAt(i) <= 0x20) {
3044
- i++;
3483
+ // Redact the parts of a URL that can carry secrets before it is embedded in an
3484
+ // error message. AxiosError.toJSON() serializes `message` verbatim and errors
3485
+ // are commonly logged, while the opt-in `config.redact` model only cleans
3486
+ // config keys — it cannot reach the message. Redact only the genuinely
3487
+ // sensitive substrings — userinfo (credentials), query parameter values and
3488
+ // fragment contents — with the same REDACTED marker the config redaction uses,
3489
+ // while keeping the scheme, host, path and parameter names so the offending
3490
+ // request stays accurately identifiable.
3491
+ function redactFragment(fragment) {
3492
+ if (!fragment) {
3493
+ return fragment;
3045
3494
  }
3046
- return url.slice(i);
3495
+
3496
+ return fragment.replace(/(^|&)([^=&]*=)?[^&]+/g, (match, separator, parameterName = '') => {
3497
+ return `${separator}${parameterName}${REDACTED}`;
3498
+ });
3047
3499
  }
3048
3500
 
3049
- function normalizeURLForProtocolCheck(url) {
3050
- return stripLeadingC0ControlOrSpace(url).replace(httpProtocolControlCharacters, '');
3501
+ function redactSensitiveURLParts(url) {
3502
+ const redactedURL = url.replace(/^(https?:\/{0,2})[^/?#]*@/i, `$1${REDACTED}@`);
3503
+ const fragmentIndex = redactedURL.indexOf('#');
3504
+ const urlWithoutFragment =
3505
+ fragmentIndex === -1 ? redactedURL : redactedURL.slice(0, fragmentIndex);
3506
+ const redactedURLWithoutFragment = urlWithoutFragment.replace(
3507
+ /([?&][^=&#]*=)[^&#]*/g,
3508
+ `$1${REDACTED}`
3509
+ );
3510
+
3511
+ if (fragmentIndex === -1) {
3512
+ return redactedURLWithoutFragment;
3513
+ }
3514
+
3515
+ return `${redactedURLWithoutFragment}#${redactFragment(redactedURL.slice(fragmentIndex + 1))}`;
3051
3516
  }
3052
3517
 
3053
3518
  function assertValidHttpProtocolURL(url, config) {
3054
- if (typeof url === 'string' && malformedHttpProtocol.test(normalizeURLForProtocolCheck(url))) {
3055
- throw new core_AxiosError(
3056
- 'Invalid URL: missing "//" after protocol',
3057
- core_AxiosError.ERR_INVALID_URL,
3058
- config
3059
- );
3519
+ if (typeof url === 'string') {
3520
+ const normalizedURL = normalizeURLForProtocolCheck(url);
3521
+ if (malformedHttpProtocol.test(normalizedURL)) {
3522
+ throw new core_AxiosError(
3523
+ `Invalid URL ${JSON.stringify(redactSensitiveURLParts(normalizedURL))}: missing "//" after protocol`,
3524
+ core_AxiosError.ERR_INVALID_URL,
3525
+ config
3526
+ );
3527
+ }
3060
3528
  }
3061
3529
  }
3062
3530
 
@@ -3088,6 +3556,17 @@ function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls, config) {
3088
3556
 
3089
3557
  const headersToObject = (thing) => (thing instanceof core_AxiosHeaders ? { ...thing } : thing);
3090
3558
 
3559
+ const ownEnumerableKeys = (thing) => {
3560
+ if (Object.getOwnPropertySymbols && Object.getOwnPropertyDescriptor) {
3561
+ return Object.keys(thing).concat(
3562
+ Object.getOwnPropertySymbols(thing).filter(
3563
+ (symbol) => Object.getOwnPropertyDescriptor(thing, symbol).enumerable
3564
+ )
3565
+ );
3566
+ }
3567
+ return Object.keys(thing);
3568
+ };
3569
+
3091
3570
  /**
3092
3571
  * Config-specific merge-function which creates a new config-object
3093
3572
  * by merging two configuration objects together.
@@ -3153,7 +3632,9 @@ function mergeConfig(config1, config2) {
3153
3632
  }
3154
3633
 
3155
3634
  function getMergedTransitionalOption(prop) {
3156
- const transitional2 = utils.hasOwnProp(config2, 'transitional') ? config2.transitional : undefined;
3635
+ const transitional2 = utils.hasOwnProp(config2, 'transitional')
3636
+ ? config2.transitional
3637
+ : undefined;
3157
3638
 
3158
3639
  if (!utils.isUndefined(transitional2)) {
3159
3640
  if (utils.isPlainObject(transitional2)) {
@@ -3165,7 +3646,9 @@ function mergeConfig(config1, config2) {
3165
3646
  }
3166
3647
  }
3167
3648
 
3168
- const transitional1 = utils.hasOwnProp(config1, 'transitional') ? config1.transitional : undefined;
3649
+ const transitional1 = utils.hasOwnProp(config1, 'transitional')
3650
+ ? config1.transitional
3651
+ : undefined;
3169
3652
 
3170
3653
  if (utils.isPlainObject(transitional1) && utils.hasOwnProp(transitional1, prop)) {
3171
3654
  return transitional1[prop];
@@ -3192,7 +3675,7 @@ function mergeConfig(config1, config2) {
3192
3675
  transformResponse: defaultToConfig2,
3193
3676
  paramsSerializer: defaultToConfig2,
3194
3677
  timeout: defaultToConfig2,
3195
- timeoutMessage: defaultToConfig2,
3678
+ timeoutErrorMessage: defaultToConfig2,
3196
3679
  withCredentials: defaultToConfig2,
3197
3680
  withXSRFToken: defaultToConfig2,
3198
3681
  adapter: defaultToConfig2,
@@ -3217,7 +3700,7 @@ function mergeConfig(config1, config2) {
3217
3700
  mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true),
3218
3701
  };
3219
3702
 
3220
- utils.forEach(Object.keys({ ...config1, ...config2 }), function computeConfigValue(prop) {
3703
+ utils.forEach(ownEnumerableKeys({ ...config1, ...config2 }), function computeConfigValue(prop) {
3221
3704
  if (prop === '__proto__' || prop === 'constructor' || prop === 'prototype') return;
3222
3705
  const merge = utils.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;
3223
3706
  const a = utils.hasOwnProp(config1, prop) ? config1[prop] : undefined;
@@ -3241,19 +3724,22 @@ function mergeConfig(config1, config2) {
3241
3724
  return config;
3242
3725
  }
3243
3726
 
3244
- ;// CONCATENATED MODULE: ../../../node_modules/axios/lib/helpers/resolveConfig.js
3245
-
3246
-
3247
-
3248
-
3249
-
3250
-
3251
-
3252
-
3727
+ ;// CONCATENATED MODULE: ../../../node_modules/axios/lib/core/setFormDataHeaders.js
3253
3728
 
3254
3729
 
3255
3730
  const FORM_DATA_CONTENT_HEADERS = ['content-type', 'content-length'];
3256
3731
 
3732
+ /**
3733
+ * Apply the headers generated by a FormData implementation to the request headers,
3734
+ * honoring the `formDataHeaderPolicy` option: with 'content-only', copy only the
3735
+ * content-* headers; otherwise merge all of them.
3736
+ *
3737
+ * @param {AxiosHeaders} headers - the request headers to mutate
3738
+ * @param {Object | null | undefined} formHeaders - headers produced by the FormData implementation
3739
+ * @param {String} [policy] - the resolved `formDataHeaderPolicy` config value
3740
+ *
3741
+ * @returns {void}
3742
+ */
3257
3743
  function setFormDataHeaders(headers, formHeaders, policy) {
3258
3744
  if (policy !== 'content-only') {
3259
3745
  headers.set(formHeaders);
@@ -3267,6 +3753,18 @@ function setFormDataHeaders(headers, formHeaders, policy) {
3267
3753
  });
3268
3754
  }
3269
3755
 
3756
+ ;// CONCATENATED MODULE: ../../../node_modules/axios/lib/helpers/resolveConfig.js
3757
+
3758
+
3759
+
3760
+
3761
+
3762
+
3763
+
3764
+
3765
+
3766
+
3767
+
3270
3768
  /**
3271
3769
  * Encode a UTF-8 string to a Latin-1 byte string for use with btoa().
3272
3770
  * This is a modern replacement for the deprecated unescape(encodeURIComponent(str)) pattern.
@@ -3321,15 +3819,17 @@ function resolveConfig(config) {
3321
3819
  }
3322
3820
 
3323
3821
  if (utils.isFormData(data)) {
3822
+ const getHeaders = utils.getSafeProp(data, 'getHeaders');
3823
+
3324
3824
  if (
3325
3825
  platform.hasStandardBrowserEnv ||
3326
3826
  platform.hasStandardBrowserWebWorkerEnv ||
3327
3827
  utils.isReactNative(data)
3328
3828
  ) {
3329
3829
  headers.setContentType(undefined); // browser/web worker/RN handles it
3330
- } else if (utils.isFunction(data.getHeaders)) {
3830
+ } else if (utils.isFunction(getHeaders)) {
3331
3831
  // Node.js FormData (like form-data package)
3332
- setFormDataHeaders(headers, data.getHeaders(), own('formDataHeaderPolicy'));
3832
+ setFormDataHeaders(headers, getHeaders.call(data), own('formDataHeaderPolicy'));
3333
3833
  }
3334
3834
  }
3335
3835
 
@@ -3375,6 +3875,7 @@ function resolveConfig(config) {
3375
3875
 
3376
3876
 
3377
3877
 
3878
+
3378
3879
  const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
3379
3880
 
3380
3881
  /* export default */ const xhr = (isXHRAdapterSupported &&
@@ -3386,7 +3887,7 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
3386
3887
  let { responseType, onUploadProgress, onDownloadProgress } = _config;
3387
3888
  let onCanceled;
3388
3889
  let uploadThrottled, downloadThrottled;
3389
- let flushUpload, flushDownload;
3890
+ let flushUpload, flushDownload, flushDownloadWithEvent;
3390
3891
 
3391
3892
  function done() {
3392
3893
  flushUpload && flushUpload(); // flush events
@@ -3404,10 +3905,55 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
3404
3905
  // Set the request timeout in MS
3405
3906
  request.timeout = _config.timeout;
3406
3907
 
3407
- function onloadend() {
3908
+ function onloadend(event) {
3408
3909
  if (!request) {
3409
3910
  return;
3410
3911
  }
3912
+
3913
+ // Status 0 means no response was received, which onerror and onabort normally
3914
+ // reject before this runs. Firefox 152 fires only readystatechange and loadend for
3915
+ // navigation-canceled requests (https://bugzilla.mozilla.org/show_bug.cgi?id=1505389),
3916
+ // leaving settle() to resolve them as an empty success. ECONNABORTED is the error
3917
+ // onabort raised on Firefox 151. Reads over file:, which some environments report as
3918
+ // status 0 on success, are excluded by the request URL's scheme after browser-style
3919
+ // preprocessing, by the page origin's scheme for relative URLs (which inherit it), or
3920
+ // by responseURL where implemented.
3921
+ if (
3922
+ request.status === 0 &&
3923
+ (parseProtocol(normalizeURLForProtocolCheck(_config.url)) ||
3924
+ parseProtocol(platform.origin)) !== 'file' &&
3925
+ !(request.responseURL && request.responseURL.startsWith('file:'))
3926
+ ) {
3927
+ reject(new core_AxiosError('Request aborted', core_AxiosError.ECONNABORTED, config, request));
3928
+ done();
3929
+
3930
+ // Clean up request
3931
+ request = null;
3932
+ return;
3933
+ }
3934
+
3935
+ // When loadend is still dispatching, flushing with it gives progress
3936
+ // listeners a final delivery whose event has a live target. The legacy
3937
+ // ready-state fallback has no event, so replay its pending progress.
3938
+ // A throwing listener must not block settlement; rethrow asynchronously,
3939
+ // matching how listener errors surface on the throttle timer path.
3940
+ try {
3941
+ if (event) {
3942
+ flushDownloadWithEvent && flushDownloadWithEvent(event);
3943
+ } else {
3944
+ flushDownload && flushDownload();
3945
+ }
3946
+ } catch (err) {
3947
+ setTimeout(() => {
3948
+ throw err;
3949
+ });
3950
+ }
3951
+
3952
+ // A final progress callback can cancel the request synchronously.
3953
+ if (!request) {
3954
+ return;
3955
+ }
3956
+
3411
3957
  // Prepare the response
3412
3958
  const responseHeaders = core_AxiosHeaders.from(
3413
3959
  'getAllResponseHeaders' in request && request.getAllResponseHeaders()
@@ -3539,7 +4085,10 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
3539
4085
 
3540
4086
  // Handle progress if needed
3541
4087
  if (onDownloadProgress) {
3542
- [downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true);
4088
+ [downloadThrottled, flushDownload, flushDownloadWithEvent] = progressEventReducer(
4089
+ onDownloadProgress,
4090
+ true
4091
+ );
3543
4092
  request.addEventListener('progress', downloadThrottled);
3544
4093
  }
3545
4094
 
@@ -3640,7 +4189,18 @@ const composeSignals = (signals, timeout) => {
3640
4189
  signals = null;
3641
4190
  };
3642
4191
 
3643
- signals.forEach((signal) => signal.addEventListener('abort', onabort, { once: true }));
4192
+ signals.forEach((signal) => {
4193
+ if (aborted) {
4194
+ return;
4195
+ }
4196
+
4197
+ if (signal.aborted) {
4198
+ onabort.call(signal);
4199
+ return;
4200
+ }
4201
+
4202
+ signal.addEventListener('abort', onabort, { once: true });
4203
+ });
3644
4204
 
3645
4205
  const { signal } = controller;
3646
4206
 
@@ -3744,13 +4304,11 @@ const trackStream = (stream, chunkSize, onProgress, onFinish) => {
3744
4304
 
3745
4305
  ;// CONCATENATED MODULE: ../../../node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js
3746
4306
  /**
3747
- * Estimate decoded byte length of a data:// URL *without* allocating large buffers.
3748
- * - For base64: compute exact decoded size using length and padding;
3749
- * handle %XX at the character-count level (no string allocation).
3750
- * - For non-base64: compute the exact percent-decoded UTF-8 byte length.
3751
- *
3752
- * @param {string} url
3753
- * @returns {number}
4307
+ * Estimate data: URL byte lengths *without* allocating large buffers.
4308
+ * - Fetch percent-decodes a base64 body before decoding it.
4309
+ * - Node's Buffer.from(body, 'base64') sizes its backing allocation from the
4310
+ * raw body, including ignored characters and content after padding.
4311
+ * - Non-base64 data is percent-decoded and then encoded as UTF-8.
3754
4312
  */
3755
4313
  const isHexDigit = (charCode) =>
3756
4314
  (charCode >= 48 && charCode <= 57) ||
@@ -3760,64 +4318,101 @@ const isHexDigit = (charCode) =>
3760
4318
  const isPercentEncodedByte = (str, i, len) =>
3761
4319
  i + 2 < len && isHexDigit(str.charCodeAt(i + 1)) && isHexDigit(str.charCodeAt(i + 2));
3762
4320
 
3763
- function estimateDataURLDecodedBytes(url) {
3764
- if (!url || typeof url !== 'string') return 0;
3765
- if (!url.startsWith('data:')) return 0;
4321
+ const hexValue = (charCode) => (charCode <= 57 ? charCode - 48 : (charCode & 0xdf) - 55);
3766
4322
 
3767
- const comma = url.indexOf(',');
3768
- if (comma < 0) return 0;
4323
+ const isBase64Char = (charCode) =>
4324
+ (charCode >= 65 && charCode <= 90) || // A-Z
4325
+ (charCode >= 97 && charCode <= 122) || // a-z
4326
+ (charCode >= 48 && charCode <= 57) || // 0-9
4327
+ charCode === 43 || // +
4328
+ charCode === 47 || // /
4329
+ charCode === 45 || // - (base64url)
4330
+ charCode === 95; // _ (base64url)
3769
4331
 
3770
- const meta = url.slice(5, comma);
3771
- const body = url.slice(comma + 1);
3772
- const isBase64 = /;base64/i.test(meta);
4332
+ const isBase64Whitespace = (charCode) =>
4333
+ charCode === 9 || charCode === 10 || charCode === 12 || charCode === 13 || charCode === 32;
3773
4334
 
3774
- if (isBase64) {
3775
- let effectiveLen = body.length;
3776
- const len = body.length; // cache length
3777
-
3778
- for (let i = 0; i < len; i++) {
3779
- if (body.charCodeAt(i) === 37 /* '%' */ && i + 2 < len) {
3780
- const a = body.charCodeAt(i + 1);
3781
- const b = body.charCodeAt(i + 2);
3782
- const isHex = isHexDigit(a) && isHexDigit(b);
3783
-
3784
- if (isHex) {
3785
- effectiveLen -= 2;
3786
- i += 2;
3787
- }
3788
- }
4335
+ const base64Bytes = (significant) => {
4336
+ const groups = Math.floor(significant / 4);
4337
+ const remainder = significant % 4;
4338
+ return groups * 3 + (remainder === 2 ? 1 : remainder === 3 ? 2 : 0);
4339
+ };
4340
+
4341
+ // Buffer.byteLength(body, 'base64') uses the raw string length as an allocation
4342
+ // upper bound even when Buffer.from later ignores characters or stops at '='.
4343
+ const estimateBase64BufferAllocation = (body) => {
4344
+ const len = body.length;
4345
+ let padding = 0;
4346
+
4347
+ if (len > 0 && body.charCodeAt(len - 1) === 61 /* '=' */) {
4348
+ padding++;
4349
+
4350
+ if (len > 1 && body.charCodeAt(len - 2) === 61 /* '=' */) {
4351
+ padding++;
3789
4352
  }
4353
+ }
3790
4354
 
3791
- let pad = 0;
3792
- let idx = len - 1;
4355
+ return Math.floor(((len - padding) * 3) / 4);
4356
+ };
3793
4357
 
3794
- const tailIsPct3D = (j) =>
3795
- j >= 2 &&
3796
- body.charCodeAt(j - 2) === 37 && // '%'
3797
- body.charCodeAt(j - 1) === 51 && // '3'
3798
- (body.charCodeAt(j) === 68 || body.charCodeAt(j) === 100); // 'D' or 'd'
4358
+ const estimatePercentDecodedBase64Bytes = (body) => {
4359
+ const len = body.length;
4360
+ let significant = 0;
4361
+ let padding = 0;
4362
+ let invalid = false;
3799
4363
 
3800
- if (idx >= 0) {
3801
- if (body.charCodeAt(idx) === 61 /* '=' */) {
3802
- pad++;
3803
- idx--;
3804
- } else if (tailIsPct3D(idx)) {
3805
- pad++;
3806
- idx -= 3;
3807
- }
4364
+ for (let i = 0; i < len; i++) {
4365
+ let code = body.charCodeAt(i);
4366
+
4367
+ if (code === 37 /* '%' */ && isPercentEncodedByte(body, i, len)) {
4368
+ code = hexValue(body.charCodeAt(i + 1)) * 16 + hexValue(body.charCodeAt(i + 2));
4369
+ i += 2;
3808
4370
  }
3809
4371
 
3810
- if (pad === 1 && idx >= 0) {
3811
- if (body.charCodeAt(idx) === 61 /* '=' */) {
3812
- pad++;
3813
- } else if (tailIsPct3D(idx)) {
3814
- pad++;
3815
- }
4372
+ if (isBase64Whitespace(code)) {
4373
+ continue;
4374
+ }
4375
+
4376
+ if (code === 61 /* '=' */) {
4377
+ padding++;
4378
+ continue;
3816
4379
  }
3817
4380
 
3818
- const groups = Math.floor(effectiveLen / 4);
3819
- const bytes = groups * 3 - (pad || 0);
3820
- return bytes > 0 ? bytes : 0;
4381
+ if (!isBase64Char(code) || padding > 0) {
4382
+ invalid = true;
4383
+ continue;
4384
+ }
4385
+
4386
+ significant++;
4387
+ }
4388
+
4389
+ // Fetch rejects malformed forgiving-base64 input. Returning the raw-size
4390
+ // allocation bound keeps that invalid input from becoming a pre-check bypass.
4391
+ if (
4392
+ invalid ||
4393
+ padding > 2 ||
4394
+ (padding > 0 && (significant + padding) % 4 !== 0) ||
4395
+ significant % 4 === 1
4396
+ ) {
4397
+ return estimateBase64BufferAllocation(body);
4398
+ }
4399
+
4400
+ return base64Bytes(significant);
4401
+ };
4402
+
4403
+ const estimateDataURLBytes = (url, estimateBase64) => {
4404
+ if (!url || typeof url !== 'string') return 0;
4405
+ if (!url.startsWith('data:')) return 0;
4406
+
4407
+ const comma = url.indexOf(',');
4408
+ if (comma < 0) return 0;
4409
+
4410
+ const meta = url.slice(5, comma);
4411
+ const body = url.slice(comma + 1);
4412
+ const isBase64 = /;base64/i.test(meta);
4413
+
4414
+ if (isBase64) {
4415
+ return estimateBase64(body);
3821
4416
  }
3822
4417
 
3823
4418
  // Compute UTF-8 byte length directly from UTF-16 code units without allocating
@@ -3847,10 +4442,36 @@ function estimateDataURLDecodedBytes(url) {
3847
4442
  }
3848
4443
  }
3849
4444
  return bytes;
4445
+ };
4446
+
4447
+ /**
4448
+ * Estimate the percent-decoded payload size used by Fetch data: URLs.
4449
+ *
4450
+ * @param {string} url
4451
+ * @returns {number}
4452
+ */
4453
+ function estimateDataURLDecodedBytes(url) {
4454
+ // Fetch removes URL fragments before processing a data: URL.
4455
+ const fragmentIndex = typeof url === 'string' ? url.indexOf('#') : -1;
4456
+
4457
+ return estimateDataURLBytes(
4458
+ fragmentIndex === -1 ? url : url.slice(0, fragmentIndex),
4459
+ estimatePercentDecodedBase64Bytes
4460
+ );
4461
+ }
4462
+
4463
+ /**
4464
+ * Estimate the Buffer backing allocation used by Node's raw base64 decoder.
4465
+ *
4466
+ * @param {string} url
4467
+ * @returns {number}
4468
+ */
4469
+ function estimateDataURLBufferAllocation(url) {
4470
+ return estimateDataURLBytes(url, estimateBase64BufferAllocation);
3850
4471
  }
3851
4472
 
3852
4473
  ;// CONCATENATED MODULE: ../../../node_modules/axios/lib/env/data.js
3853
- const VERSION = "1.18.1";
4474
+ const VERSION = "1.20.0";
3854
4475
  ;// CONCATENATED MODULE: ../../../node_modules/axios/lib/adapters/fetch.js
3855
4476
 
3856
4477
 
@@ -3867,6 +4488,18 @@ const VERSION = "1.18.1";
3867
4488
 
3868
4489
  const DEFAULT_CHUNK_SIZE = 64 * 1024;
3869
4490
 
4491
+ const DEFAULT_REQUEST_OPTIONS = {
4492
+ cache: 'default',
4493
+ redirect: 'follow',
4494
+ referrer: 'about:client',
4495
+ referrerPolicy: '',
4496
+ mode: 'cors',
4497
+ integrity: '',
4498
+ keepalive: false,
4499
+ priority: 'auto',
4500
+ window: null,
4501
+ };
4502
+
3870
4503
  const { isFunction: fetch_isFunction } = utils;
3871
4504
 
3872
4505
  /**
@@ -3917,9 +4550,7 @@ const maybeWithAuthCredentials = (url) => {
3917
4550
 
3918
4551
  const factory = (env) => {
3919
4552
  const globalObject =
3920
- utils.global !== undefined && utils.global !== null
3921
- ? utils.global
3922
- : globalThis;
4553
+ utils.global !== undefined && utils.global !== null ? utils.global : globalThis;
3923
4554
  const { ReadableStream, TextEncoder } = globalObject;
3924
4555
 
3925
4556
  env = utils.merge.call(
@@ -4058,6 +4689,7 @@ const factory = (env) => {
4058
4689
  fetchOptions,
4059
4690
  maxContentLength,
4060
4691
  maxBodyLength,
4692
+ maxRedirects,
4061
4693
  } = helpers_resolveConfig(config);
4062
4694
 
4063
4695
  const hasMaxContentLength = utils.isNumber(maxContentLength) && maxContentLength > -1;
@@ -4108,7 +4740,7 @@ const factory = (env) => {
4108
4740
  const password = utils.getSafeProp(configAuth, 'password') || '';
4109
4741
  auth = {
4110
4742
  username,
4111
- password
4743
+ password,
4112
4744
  };
4113
4745
  }
4114
4746
 
@@ -4120,7 +4752,7 @@ const factory = (env) => {
4120
4752
  const urlPassword = decodeURIComponentSafe(parsedURL.password);
4121
4753
  auth = {
4122
4754
  username: urlUsername,
4123
- password: urlPassword
4755
+ password: urlPassword,
4124
4756
  };
4125
4757
  }
4126
4758
 
@@ -4194,7 +4826,9 @@ const factory = (env) => {
4194
4826
  (onUploadProgress || mustEnforceStreamBody)
4195
4827
  ) {
4196
4828
  requestContentLength =
4197
- requestContentLength == null ? await resolveBodyLength(headers, data) : requestContentLength;
4829
+ requestContentLength == null
4830
+ ? await resolveBodyLength(headers, data)
4831
+ : requestContentLength;
4198
4832
 
4199
4833
  // A declared length of 0 is only trusted to skip the wrap when we are
4200
4834
  // not enforcing a stream limit (which must not rely on that header).
@@ -4207,7 +4841,10 @@ const factory = (env) => {
4207
4841
 
4208
4842
  let contentTypeHeader;
4209
4843
 
4210
- if (utils.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {
4844
+ if (
4845
+ utils.isFormData(data) &&
4846
+ (contentTypeHeader = _request.headers.get('content-type'))
4847
+ ) {
4211
4848
  headers.setContentType(contentTypeHeader);
4212
4849
  }
4213
4850
 
@@ -4268,22 +4905,59 @@ const factory = (env) => {
4268
4905
  }
4269
4906
 
4270
4907
  // Set User-Agent header if not already set (fetch defaults to 'node' in Node.js)
4271
- headers.set('User-Agent', 'axios/' + (/* inlined export .VERSION */"1.18.1"), false);
4908
+ headers.set('User-Agent', 'axios/' + (/* inlined export .VERSION */"1.20.0"), false);
4909
+
4910
+ const safeFetchOptions =
4911
+ fetchOptions == null ? fetchOptions : Object.assign(Object.create(null), fetchOptions);
4912
+
4913
+ if (safeFetchOptions) {
4914
+ // These options are owned by Axios and are already reflected in the
4915
+ // resolved Request passed to fetch.
4916
+ delete safeFetchOptions.body;
4917
+ delete safeFetchOptions.headers;
4918
+ delete safeFetchOptions.method;
4919
+ delete safeFetchOptions.signal;
4920
+ delete safeFetchOptions.duplex;
4921
+ delete safeFetchOptions.credentials;
4922
+ }
4272
4923
 
4273
- const resolvedOptions = {
4274
- ...fetchOptions,
4924
+ const resolvedOptions = Object.assign(Object.create(null), safeFetchOptions, {
4275
4925
  signal: composedSignal,
4276
4926
  method: method.toUpperCase(),
4277
4927
  headers: toByteStringHeaderObject(headers.normalize()),
4278
4928
  body: data,
4279
4929
  duplex: 'half',
4280
4930
  credentials: isCredentialsSupported ? withCredentials : undefined,
4281
- };
4931
+ });
4932
+
4933
+ if (isRequestSupported) {
4934
+ utils.forEach(DEFAULT_REQUEST_OPTIONS, (value, key) => {
4935
+ if (resolvedOptions[key] === undefined) {
4936
+ resolvedOptions[key] = value;
4937
+ }
4938
+ });
4939
+
4940
+ if (resolvedOptions.signal === undefined) {
4941
+ resolvedOptions.signal = null;
4942
+ }
4943
+
4944
+ if (resolvedOptions.body === undefined) {
4945
+ resolvedOptions.body = null;
4946
+ }
4947
+ }
4948
+
4949
+ if (maxRedirects === 0) {
4950
+ resolvedOptions.redirect = 'manual';
4951
+
4952
+ if (safeFetchOptions) {
4953
+ safeFetchOptions.redirect = 'manual';
4954
+ }
4955
+ }
4282
4956
 
4283
4957
  request = isRequestSupported && new Request(url, resolvedOptions);
4284
4958
 
4285
4959
  let response = await (isRequestSupported
4286
- ? _fetch(request, fetchOptions)
4960
+ ? _fetch(request, safeFetchOptions)
4287
4961
  : _fetch(url, resolvedOptions));
4288
4962
 
4289
4963
  const responseHeaders = core_AxiosHeaders.from(response.headers);
@@ -4636,6 +5310,7 @@ function getAdapter(adapters, config) {
4636
5310
 
4637
5311
 
4638
5312
 
5313
+
4639
5314
  /**
4640
5315
  * Throws a `CanceledError` if cancellation has been requested.
4641
5316
  *
@@ -4660,10 +5335,15 @@ function throwIfCancellationRequested(config) {
4660
5335
  *
4661
5336
  * @returns {Promise} The Promise to be fulfilled
4662
5337
  */
4663
- function dispatchRequest(config) {
5338
+ function dispatchRequest(_config) {
5339
+ // Interceptors may replace the merged config with an ordinary object. Flatten
5340
+ // it at the dispatch boundary so shared prototype members cannot become
5341
+ // request behavior, while preserving intentional template/class members.
5342
+ const config = utils.toSafeFlatObject(_config);
5343
+
4664
5344
  throwIfCancellationRequested(config);
4665
5345
 
4666
- config.headers = core_AxiosHeaders.from(config.headers);
5346
+ config.headers = core_AxiosHeaders.from(utils.getSafeProp(config, 'headers'));
4667
5347
 
4668
5348
  // Transform request data
4669
5349
  config.data = transformData.call(config, config.transformRequest);
@@ -4747,7 +5427,7 @@ validators.transitional = function transitional(validator, version, message) {
4747
5427
  function formatMessage(opt, desc) {
4748
5428
  return (
4749
5429
  '[Axios v' +
4750
- (/* inlined export .VERSION */"1.18.1") +
5430
+ (/* inlined export .VERSION */"1.20.0") +
4751
5431
  "] Transitional option '" +
4752
5432
  opt +
4753
5433
  "'" +
@@ -4844,6 +5524,7 @@ function assertOptions(options, schema, allowUnknown) {
4844
5524
 
4845
5525
 
4846
5526
 
5527
+
4847
5528
  const Axios_validators = helpers_validator.validators;
4848
5529
 
4849
5530
  /**
@@ -4875,21 +5556,21 @@ class Axios {
4875
5556
  return await this._request(configOrUrl, config);
4876
5557
  } catch (err) {
4877
5558
  if (err instanceof Error) {
4878
- let dummy = {};
5559
+ try {
5560
+ let dummy = {};
4879
5561
 
4880
- Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error());
5562
+ Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error());
4881
5563
 
4882
- // slice off the Error: ... line
4883
- const stack = (() => {
4884
- if (!dummy.stack) {
4885
- return '';
4886
- }
5564
+ const dummyStack = dummy.stack;
5565
+ let stack = '';
4887
5566
 
4888
- const firstNewlineIndex = dummy.stack.indexOf('\n');
5567
+ // slice off the Error: ... line
5568
+ if (typeof dummyStack === 'string') {
5569
+ const firstNewlineIndex = dummyStack.indexOf('\n');
5570
+
5571
+ stack = firstNewlineIndex === -1 ? '' : dummyStack.slice(firstNewlineIndex + 1);
5572
+ }
4889
5573
 
4890
- return firstNewlineIndex === -1 ? '' : dummy.stack.slice(firstNewlineIndex + 1);
4891
- })();
4892
- try {
4893
5574
  if (!err.stack) {
4894
5575
  err.stack = stack;
4895
5576
  // match without the 2 top stack lines
@@ -4905,7 +5586,7 @@ class Axios {
4905
5586
  }
4906
5587
  }
4907
5588
  } catch (e) {
4908
- // ignore the case where "stack" is an un-writable property
5589
+ // Ignore failures from custom stack hooks or un-writable stack properties.
4909
5590
  }
4910
5591
  }
4911
5592
 
@@ -4978,13 +5659,17 @@ class Axios {
4978
5659
  );
4979
5660
 
4980
5661
  // Set config.method
4981
- config.method = (config.method || this.defaults.method || 'get').toLowerCase();
5662
+ config.method = (
5663
+ utils.getSafeProp(config, 'method') ||
5664
+ utils.getSafeProp(this.defaults, 'method') ||
5665
+ 'get'
5666
+ ).toLowerCase();
4982
5667
 
4983
5668
  // Flatten headers
4984
5669
  let contextHeaders = headers && utils.merge(headers.common, headers[config.method]);
4985
5670
 
4986
5671
  headers &&
4987
- utils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'query', 'common'], (method) => {
5672
+ utils.forEach(core_methodList.concat('common'), (method) => {
4988
5673
  delete headers[method];
4989
5674
  });
4990
5675
 
@@ -5043,17 +5728,35 @@ class Axios {
5043
5728
  const onFulfilled = requestInterceptorChain[i++];
5044
5729
  const onRejected = requestInterceptorChain[i++];
5045
5730
  try {
5046
- newConfig = onFulfilled(newConfig);
5731
+ newConfig = onFulfilled ? onFulfilled(newConfig) : newConfig;
5047
5732
  } catch (error) {
5048
- onRejected.call(this, error);
5733
+ if (!onRejected) {
5734
+ promise = Promise.reject(error);
5735
+ break;
5736
+ }
5737
+
5738
+ try {
5739
+ const rejectedResult = onRejected.call(this, error);
5740
+
5741
+ if (utils.isThenable(rejectedResult)) {
5742
+ promise = Promise.resolve(rejectedResult).then(() =>
5743
+ dispatchRequest.call(this, newConfig)
5744
+ );
5745
+ }
5746
+ } catch (rejectedError) {
5747
+ promise = Promise.reject(rejectedError);
5748
+ }
5749
+
5049
5750
  break;
5050
5751
  }
5051
5752
  }
5052
5753
 
5053
- try {
5054
- promise = dispatchRequest.call(this, newConfig);
5055
- } catch (error) {
5056
- return Promise.reject(error);
5754
+ if (!promise) {
5755
+ try {
5756
+ promise = dispatchRequest.call(this, newConfig);
5757
+ } catch (error) {
5758
+ promise = Promise.reject(error);
5759
+ }
5057
5760
  }
5058
5761
 
5059
5762
  i = 0;
@@ -5337,14 +6040,22 @@ const HttpStatusCode = {
5337
6040
  Gone: 410,
5338
6041
  LengthRequired: 411,
5339
6042
  PreconditionFailed: 412,
6043
+ /**
6044
+ * @deprecated Use `ContentTooLarge` instead.
6045
+ */
5340
6046
  PayloadTooLarge: 413,
6047
+ ContentTooLarge: 413,
5341
6048
  UriTooLong: 414,
5342
6049
  UnsupportedMediaType: 415,
5343
6050
  RangeNotSatisfiable: 416,
5344
6051
  ExpectationFailed: 417,
5345
6052
  ImATeapot: 418,
5346
6053
  MisdirectedRequest: 421,
6054
+ /**
6055
+ * @deprecated Use `UnprocessableContent` instead.
6056
+ */
5347
6057
  UnprocessableEntity: 422,
6058
+ UnprocessableContent: 422,
5348
6059
  Locked: 423,
5349
6060
  FailedDependency: 424,
5350
6061
  TooEarly: 425,
@@ -5364,6 +6075,7 @@ const HttpStatusCode = {
5364
6075
  LoopDetected: 508,
5365
6076
  NotExtended: 510,
5366
6077
  NetworkAuthenticationRequired: 511,
6078
+ WebServerReturnsAnUnknownError: 520,
5367
6079
  WebServerIsDown: 521,
5368
6080
  ConnectionTimedOut: 522,
5369
6081
  OriginIsUnreachable: 523,
@@ -5373,7 +6085,9 @@ const HttpStatusCode = {
5373
6085
  };
5374
6086
 
5375
6087
  Object.entries(HttpStatusCode).forEach(([key, value]) => {
5376
- HttpStatusCode[value] = key;
6088
+ if (HttpStatusCode[value] === undefined) {
6089
+ HttpStatusCode[value] = key;
6090
+ }
5377
6091
  });
5378
6092
 
5379
6093
  /* export default */ const helpers_HttpStatusCode = (HttpStatusCode);
@@ -5434,7 +6148,7 @@ axios.Axios = core_Axios;
5434
6148
  axios.CanceledError = cancel_CanceledError;
5435
6149
  axios.CancelToken = cancel_CancelToken;
5436
6150
  axios.isCancel = isCancel;
5437
- axios.VERSION = (/* inlined export .VERSION */"1.18.1");
6151
+ axios.VERSION = (/* inlined export .VERSION */"1.20.0");
5438
6152
  axios.toFormData = helpers_toFormData;
5439
6153
 
5440
6154
  // Expose AxiosError class