@speclynx/apidom-reference 4.9.0 → 4.10.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.
@@ -21529,11 +21529,13 @@ const knownAdapters = {
21529
21529
  _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(knownAdapters, (fn, value) => {
21530
21530
  if (fn) {
21531
21531
  try {
21532
- Object.defineProperty(fn, 'name', { value });
21532
+ // Null-proto descriptors so a polluted Object.prototype.get cannot turn
21533
+ // these data descriptors into accessor descriptors on the way in.
21534
+ Object.defineProperty(fn, 'name', { __proto__: null, value });
21533
21535
  } catch (e) {
21534
21536
  // eslint-disable-next-line no-empty
21535
21537
  }
21536
- Object.defineProperty(fn, 'adapterName', { value });
21538
+ Object.defineProperty(fn, 'adapterName', { __proto__: null, value });
21537
21539
  }
21538
21540
  });
21539
21541
 
@@ -21654,6 +21656,8 @@ __webpack_require__.r(__webpack_exports__);
21654
21656
  /* harmony import */ var _helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(79194);
21655
21657
  /* harmony import */ var _helpers_resolveConfig_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(28451);
21656
21658
  /* harmony import */ var _core_settle_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(40788);
21659
+ /* harmony import */ var _helpers_estimateDataURLDecodedBytes_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(879);
21660
+ /* harmony import */ var _env_data_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(18679);
21657
21661
 
21658
21662
 
21659
21663
 
@@ -21664,16 +21668,11 @@ __webpack_require__.r(__webpack_exports__);
21664
21668
 
21665
21669
 
21666
21670
 
21667
- const DEFAULT_CHUNK_SIZE = 64 * 1024;
21668
21671
 
21669
- const { isFunction } = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"];
21670
21672
 
21671
- const globalFetchAPI = (({ Request, Response }) => ({
21672
- Request,
21673
- Response,
21674
- }))(_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].global);
21673
+ const DEFAULT_CHUNK_SIZE = 64 * 1024;
21675
21674
 
21676
- const { ReadableStream, TextEncoder } = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].global;
21675
+ const { isFunction } = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"];
21677
21676
 
21678
21677
  const test = (fn, ...args) => {
21679
21678
  try {
@@ -21684,11 +21683,17 @@ const test = (fn, ...args) => {
21684
21683
  };
21685
21684
 
21686
21685
  const factory = (env) => {
21686
+ const globalObject = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].global ?? globalThis;
21687
+ const { ReadableStream, TextEncoder } = globalObject;
21688
+
21687
21689
  env = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].merge.call(
21688
21690
  {
21689
21691
  skipUndefined: true,
21690
21692
  },
21691
- globalFetchAPI,
21693
+ {
21694
+ Request: globalObject.Request,
21695
+ Response: globalObject.Response,
21696
+ },
21692
21697
  env
21693
21698
  );
21694
21699
 
@@ -21718,18 +21723,20 @@ const factory = (env) => {
21718
21723
  test(() => {
21719
21724
  let duplexAccessed = false;
21720
21725
 
21721
- const body = new ReadableStream();
21722
-
21723
- const hasContentType = new Request(_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].origin, {
21724
- body,
21726
+ const request = new Request(_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].origin, {
21727
+ body: new ReadableStream(),
21725
21728
  method: 'POST',
21726
21729
  get duplex() {
21727
21730
  duplexAccessed = true;
21728
21731
  return 'half';
21729
21732
  },
21730
- }).headers.has('Content-Type');
21733
+ });
21731
21734
 
21732
- body.cancel();
21735
+ const hasContentType = request.headers.has('Content-Type');
21736
+
21737
+ if (request.body != null) {
21738
+ request.body.cancel();
21739
+ }
21733
21740
 
21734
21741
  return duplexAccessed && !hasContentType;
21735
21742
  });
@@ -21813,8 +21820,13 @@ const factory = (env) => {
21813
21820
  headers,
21814
21821
  withCredentials = 'same-origin',
21815
21822
  fetchOptions,
21823
+ maxContentLength,
21824
+ maxBodyLength,
21816
21825
  } = (0,_helpers_resolveConfig_js__WEBPACK_IMPORTED_MODULE_7__["default"])(config);
21817
21826
 
21827
+ const hasMaxContentLength = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isNumber(maxContentLength) && maxContentLength > -1;
21828
+ const hasMaxBodyLength = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isNumber(maxBodyLength) && maxBodyLength > -1;
21829
+
21818
21830
  let _fetch = envFetch || fetch;
21819
21831
 
21820
21832
  responseType = responseType ? (responseType + '').toLowerCase() : 'text';
@@ -21836,6 +21848,41 @@ const factory = (env) => {
21836
21848
  let requestContentLength;
21837
21849
 
21838
21850
  try {
21851
+ // Enforce maxContentLength for data: URLs up-front so we never materialize
21852
+ // an oversized payload. The HTTP adapter applies the same check (see http.js
21853
+ // "if (protocol === 'data:')" branch).
21854
+ if (hasMaxContentLength && typeof url === 'string' && url.startsWith('data:')) {
21855
+ const estimated = (0,_helpers_estimateDataURLDecodedBytes_js__WEBPACK_IMPORTED_MODULE_9__["default"])(url);
21856
+ if (estimated > maxContentLength) {
21857
+ throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"](
21858
+ 'maxContentLength size of ' + maxContentLength + ' exceeded',
21859
+ _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"].ERR_BAD_RESPONSE,
21860
+ config,
21861
+ request
21862
+ );
21863
+ }
21864
+ }
21865
+
21866
+ // Enforce maxBodyLength against the outbound request body before dispatch.
21867
+ // Mirrors http.js behavior (ERR_BAD_REQUEST / 'Request body larger than
21868
+ // maxBodyLength limit'). Skip when the body length cannot be determined
21869
+ // (e.g. a live ReadableStream supplied by the caller).
21870
+ if (hasMaxBodyLength && method !== 'get' && method !== 'head') {
21871
+ const outboundLength = await resolveBodyLength(headers, data);
21872
+ if (
21873
+ typeof outboundLength === 'number' &&
21874
+ isFinite(outboundLength) &&
21875
+ outboundLength > maxBodyLength
21876
+ ) {
21877
+ throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"](
21878
+ 'Request body larger than maxBodyLength limit',
21879
+ _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"].ERR_BAD_REQUEST,
21880
+ config,
21881
+ request
21882
+ );
21883
+ }
21884
+ }
21885
+
21839
21886
  if (
21840
21887
  onUploadProgress &&
21841
21888
  supportsRequestStream &&
@@ -21873,6 +21920,22 @@ const factory = (env) => {
21873
21920
  // see https://github.com/cloudflare/workerd/issues/902
21874
21921
  const isCredentialsSupported = isRequestSupported && 'credentials' in Request.prototype;
21875
21922
 
21923
+ // If data is FormData and Content-Type is multipart/form-data without boundary,
21924
+ // delete it so fetch can set it correctly with the boundary
21925
+ if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isFormData(data)) {
21926
+ const contentType = headers.getContentType();
21927
+ if (
21928
+ contentType &&
21929
+ /^multipart\/form-data/i.test(contentType) &&
21930
+ !/boundary=/i.test(contentType)
21931
+ ) {
21932
+ headers.delete('content-type');
21933
+ }
21934
+ }
21935
+
21936
+ // Set User-Agent header if not already set (fetch defaults to 'node' in Node.js)
21937
+ headers.set('User-Agent', 'axios/' + _env_data_js__WEBPACK_IMPORTED_MODULE_10__.VERSION, false);
21938
+
21876
21939
  const resolvedOptions = {
21877
21940
  ...fetchOptions,
21878
21941
  signal: composedSignal,
@@ -21889,10 +21952,28 @@ const factory = (env) => {
21889
21952
  ? _fetch(request, fetchOptions)
21890
21953
  : _fetch(url, resolvedOptions));
21891
21954
 
21955
+ // Cheap pre-check: if the server honestly declares a content-length that
21956
+ // already exceeds the cap, reject before we start streaming.
21957
+ if (hasMaxContentLength) {
21958
+ const declaredLength = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].toFiniteNumber(response.headers.get('content-length'));
21959
+ if (declaredLength != null && declaredLength > maxContentLength) {
21960
+ throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"](
21961
+ 'maxContentLength size of ' + maxContentLength + ' exceeded',
21962
+ _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"].ERR_BAD_RESPONSE,
21963
+ config,
21964
+ request
21965
+ );
21966
+ }
21967
+ }
21968
+
21892
21969
  const isStreamResponse =
21893
21970
  supportsResponseStream && (responseType === 'stream' || responseType === 'response');
21894
21971
 
21895
- if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) {
21972
+ if (
21973
+ supportsResponseStream &&
21974
+ response.body &&
21975
+ (onDownloadProgress || hasMaxContentLength || (isStreamResponse && unsubscribe))
21976
+ ) {
21896
21977
  const options = {};
21897
21978
 
21898
21979
  ['status', 'statusText', 'headers'].forEach((prop) => {
@@ -21909,8 +21990,24 @@ const factory = (env) => {
21909
21990
  )) ||
21910
21991
  [];
21911
21992
 
21993
+ let bytesRead = 0;
21994
+ const onChunkProgress = (loadedBytes) => {
21995
+ if (hasMaxContentLength) {
21996
+ bytesRead = loadedBytes;
21997
+ if (bytesRead > maxContentLength) {
21998
+ throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"](
21999
+ 'maxContentLength size of ' + maxContentLength + ' exceeded',
22000
+ _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"].ERR_BAD_RESPONSE,
22001
+ config,
22002
+ request
22003
+ );
22004
+ }
22005
+ }
22006
+ onProgress && onProgress(loadedBytes);
22007
+ };
22008
+
21912
22009
  response = new Response(
21913
- (0,_helpers_trackStream_js__WEBPACK_IMPORTED_MODULE_4__.trackStream)(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
22010
+ (0,_helpers_trackStream_js__WEBPACK_IMPORTED_MODULE_4__.trackStream)(response.body, DEFAULT_CHUNK_SIZE, onChunkProgress, () => {
21914
22011
  flush && flush();
21915
22012
  unsubscribe && unsubscribe();
21916
22013
  }),
@@ -21925,6 +22022,33 @@ const factory = (env) => {
21925
22022
  config
21926
22023
  );
21927
22024
 
22025
+ // Fallback enforcement for environments without ReadableStream support
22026
+ // (legacy runtimes). Detect materialized size from typed output; skip
22027
+ // streams/Response passthrough since the user will read those themselves.
22028
+ if (hasMaxContentLength && !supportsResponseStream && !isStreamResponse) {
22029
+ let materializedSize;
22030
+ if (responseData != null) {
22031
+ if (typeof responseData.byteLength === 'number') {
22032
+ materializedSize = responseData.byteLength;
22033
+ } else if (typeof responseData.size === 'number') {
22034
+ materializedSize = responseData.size;
22035
+ } else if (typeof responseData === 'string') {
22036
+ materializedSize =
22037
+ typeof TextEncoder === 'function'
22038
+ ? new TextEncoder().encode(responseData).byteLength
22039
+ : responseData.length;
22040
+ }
22041
+ }
22042
+ if (typeof materializedSize === 'number' && materializedSize > maxContentLength) {
22043
+ throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"](
22044
+ 'maxContentLength size of ' + maxContentLength + ' exceeded',
22045
+ _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"].ERR_BAD_RESPONSE,
22046
+ config,
22047
+ request
22048
+ );
22049
+ }
22050
+ }
22051
+
21928
22052
  !isStreamResponse && unsubscribe && unsubscribe();
21929
22053
 
21930
22054
  return await new Promise((resolve, reject) => {
@@ -21940,6 +22064,17 @@ const factory = (env) => {
21940
22064
  } catch (err) {
21941
22065
  unsubscribe && unsubscribe();
21942
22066
 
22067
+ // Safari can surface fetch aborts as a DOMException-like object whose
22068
+ // branded getters throw. Prefer our composed signal reason before reading
22069
+ // the caught error, preserving timeout vs cancellation semantics.
22070
+ if (composedSignal && composedSignal.aborted && composedSignal.reason instanceof _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"]) {
22071
+ const canceledError = composedSignal.reason;
22072
+ canceledError.config = config;
22073
+ request && (canceledError.request = request);
22074
+ err !== canceledError && (canceledError.cause = err);
22075
+ throw canceledError;
22076
+ }
22077
+
21943
22078
  if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) {
21944
22079
  throw Object.assign(
21945
22080
  new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"](
@@ -22103,7 +22238,7 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
22103
22238
  // will return status as 0 even though it's a successful request
22104
22239
  if (
22105
22240
  request.status === 0 &&
22106
- !(request.responseURL && request.responseURL.indexOf('file:') === 0)
22241
+ !(request.responseURL && request.responseURL.startsWith('file:'))
22107
22242
  ) {
22108
22243
  return;
22109
22244
  }
@@ -22120,6 +22255,7 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
22120
22255
  }
22121
22256
 
22122
22257
  reject(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"]('Request aborted', _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"].ECONNABORTED, config, request));
22258
+ done();
22123
22259
 
22124
22260
  // Clean up request
22125
22261
  request = null;
@@ -22135,6 +22271,7 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
22135
22271
  // attach the underlying event for consumers who want details
22136
22272
  err.event = event || null;
22137
22273
  reject(err);
22274
+ done();
22138
22275
  request = null;
22139
22276
  };
22140
22277
 
@@ -22155,6 +22292,7 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
22155
22292
  request
22156
22293
  )
22157
22294
  );
22295
+ done();
22158
22296
 
22159
22297
  // Clean up request
22160
22298
  request = null;
@@ -22204,6 +22342,7 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
22204
22342
  }
22205
22343
  reject(!cancel || cancel.type ? new _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_4__["default"](null, config, request) : cancel);
22206
22344
  request.abort();
22345
+ done();
22207
22346
  request = null;
22208
22347
  };
22209
22348
 
@@ -22217,7 +22356,7 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
22217
22356
 
22218
22357
  const protocol = (0,_helpers_parseProtocol_js__WEBPACK_IMPORTED_MODULE_5__["default"])(_config.url);
22219
22358
 
22220
- if (protocol && _platform_index_js__WEBPACK_IMPORTED_MODULE_6__["default"].protocols.indexOf(protocol) === -1) {
22359
+ if (protocol && !_platform_index_js__WEBPACK_IMPORTED_MODULE_6__["default"].protocols.includes(protocol)) {
22221
22360
  reject(
22222
22361
  new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"](
22223
22362
  'Unsupported protocol ' + protocol + ':',
@@ -22721,7 +22860,7 @@ class Axios {
22721
22860
  let contextHeaders = headers && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].merge(headers.common, headers[config.method]);
22722
22861
 
22723
22862
  headers &&
22724
- _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], (method) => {
22863
+ _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'query', 'common'], (method) => {
22725
22864
  delete headers[method];
22726
22865
  });
22727
22866
 
@@ -22824,7 +22963,7 @@ _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(['delete', 'get', 'hea
22824
22963
  };
22825
22964
  });
22826
22965
 
22827
- _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
22966
+ _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(['post', 'put', 'patch', 'query'], function forEachMethodWithData(method) {
22828
22967
  function generateHTTPMethod(isForm) {
22829
22968
  return function httpMethod(url, data, config) {
22830
22969
  return this.request(
@@ -22844,7 +22983,11 @@ _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(['post', 'put', 'patch
22844
22983
 
22845
22984
  Axios.prototype[method] = generateHTTPMethod();
22846
22985
 
22847
- Axios.prototype[method + 'Form'] = generateHTTPMethod(true);
22986
+ // QUERY is a safe/idempotent read method; multipart form bodies don't fit
22987
+ // its semantics, so no queryForm shorthand is generated.
22988
+ if (method !== 'query') {
22989
+ Axios.prototype[method + 'Form'] = generateHTTPMethod(true);
22990
+ }
22848
22991
  });
22849
22992
 
22850
22993
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Axios);
@@ -22861,10 +23004,81 @@ __webpack_require__.r(__webpack_exports__);
22861
23004
  /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
22862
23005
  /* harmony export */ });
22863
23006
  /* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(68750);
23007
+ /* harmony import */ var _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(76487);
22864
23008
 
22865
23009
 
22866
23010
 
22867
23011
 
23012
+
23013
+ const REDACTED = '[REDACTED ****]';
23014
+
23015
+ function hasOwnOrPrototypeToJSON(source) {
23016
+ if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(source, 'toJSON')) {
23017
+ return true;
23018
+ }
23019
+
23020
+ let prototype = Object.getPrototypeOf(source);
23021
+
23022
+ while (prototype && prototype !== Object.prototype) {
23023
+ if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(prototype, 'toJSON')) {
23024
+ return true;
23025
+ }
23026
+
23027
+ prototype = Object.getPrototypeOf(prototype);
23028
+ }
23029
+
23030
+ return false;
23031
+ }
23032
+
23033
+ // Build a plain-object snapshot of `config` and replace the value of any key
23034
+ // (case-insensitive) listed in `redactKeys` with REDACTED. Walks through arrays
23035
+ // and AxiosHeaders, and short-circuits on circular references.
23036
+ function redactConfig(config, redactKeys) {
23037
+ const lowerKeys = new Set(redactKeys.map((k) => String(k).toLowerCase()));
23038
+ const seen = [];
23039
+
23040
+ const visit = (source) => {
23041
+ if (source === null || typeof source !== 'object') return source;
23042
+ if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isBuffer(source)) return source;
23043
+ if (seen.indexOf(source) !== -1) return undefined;
23044
+
23045
+ if (source instanceof _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"]) {
23046
+ source = source.toJSON();
23047
+ }
23048
+
23049
+ seen.push(source);
23050
+
23051
+ let result;
23052
+ if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(source)) {
23053
+ result = [];
23054
+ source.forEach((v, i) => {
23055
+ const reducedValue = visit(v);
23056
+ if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(reducedValue)) {
23057
+ result[i] = reducedValue;
23058
+ }
23059
+ });
23060
+ } else {
23061
+ if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(source) && hasOwnOrPrototypeToJSON(source)) {
23062
+ seen.pop();
23063
+ return source;
23064
+ }
23065
+
23066
+ result = Object.create(null);
23067
+ for (const [key, value] of Object.entries(source)) {
23068
+ const reducedValue = lowerKeys.has(key.toLowerCase()) ? REDACTED : visit(value);
23069
+ if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(reducedValue)) {
23070
+ result[key] = reducedValue;
23071
+ }
23072
+ }
23073
+ }
23074
+
23075
+ seen.pop();
23076
+ return result;
23077
+ };
23078
+
23079
+ return visit(config);
23080
+ }
23081
+
22868
23082
  class AxiosError extends Error {
22869
23083
  static from(error, code, config, request, response, customProps) {
22870
23084
  const axiosError = new AxiosError(error.message, code || error.code, config, request, response);
@@ -22880,42 +23094,56 @@ class AxiosError extends Error {
22880
23094
  return axiosError;
22881
23095
  }
22882
23096
 
22883
- /**
22884
- * Create an Error with the specified message, config, error code, request and response.
22885
- *
22886
- * @param {string} message The error message.
22887
- * @param {string} [code] The error code (for example, 'ECONNABORTED').
22888
- * @param {Object} [config] The config.
22889
- * @param {Object} [request] The request.
22890
- * @param {Object} [response] The response.
22891
- *
22892
- * @returns {Error} The created error.
22893
- */
22894
- constructor(message, code, config, request, response) {
22895
- super(message);
22896
-
22897
- // Make message enumerable to maintain backward compatibility
22898
- // The native Error constructor sets message as non-enumerable,
22899
- // but axios < v1.13.3 had it as enumerable
22900
- Object.defineProperty(this, 'message', {
22901
- value: message,
22902
- enumerable: true,
22903
- writable: true,
22904
- configurable: true
22905
- });
22906
-
22907
- this.name = 'AxiosError';
22908
- this.isAxiosError = true;
22909
- code && (this.code = code);
22910
- config && (this.config = config);
22911
- request && (this.request = request);
22912
- if (response) {
22913
- this.response = response;
22914
- this.status = response.status;
22915
- }
23097
+ /**
23098
+ * Create an Error with the specified message, config, error code, request and response.
23099
+ *
23100
+ * @param {string} message The error message.
23101
+ * @param {string} [code] The error code (for example, 'ECONNABORTED').
23102
+ * @param {Object} [config] The config.
23103
+ * @param {Object} [request] The request.
23104
+ * @param {Object} [response] The response.
23105
+ *
23106
+ * @returns {Error} The created error.
23107
+ */
23108
+ constructor(message, code, config, request, response) {
23109
+ super(message);
23110
+
23111
+ // Make message enumerable to maintain backward compatibility
23112
+ // The native Error constructor sets message as non-enumerable,
23113
+ // but axios < v1.13.3 had it as enumerable
23114
+ Object.defineProperty(this, 'message', {
23115
+ // Null-proto descriptor so a polluted Object.prototype.get cannot turn
23116
+ // this data descriptor into an accessor descriptor on the way in.
23117
+ __proto__: null,
23118
+ value: message,
23119
+ enumerable: true,
23120
+ writable: true,
23121
+ configurable: true,
23122
+ });
23123
+
23124
+ this.name = 'AxiosError';
23125
+ this.isAxiosError = true;
23126
+ code && (this.code = code);
23127
+ config && (this.config = config);
23128
+ request && (this.request = request);
23129
+ if (response) {
23130
+ this.response = response;
23131
+ this.status = response.status;
22916
23132
  }
23133
+ }
22917
23134
 
22918
23135
  toJSON() {
23136
+ // Opt-in redaction: when the request config carries a `redact` array, the
23137
+ // value of any matching key (case-insensitive, at any depth) is replaced
23138
+ // with REDACTED in the serialized snapshot. Undefined or empty leaves the
23139
+ // existing serialization behavior unchanged.
23140
+ const config = this.config;
23141
+ const redactKeys = config && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(config, 'redact') ? config.redact : undefined;
23142
+ const serializedConfig =
23143
+ _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(redactKeys) && redactKeys.length > 0
23144
+ ? redactConfig(config, redactKeys)
23145
+ : _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toJSONObject(config);
23146
+
22919
23147
  return {
22920
23148
  // Standard
22921
23149
  message: this.message,
@@ -22929,7 +23157,7 @@ class AxiosError extends Error {
22929
23157
  columnNumber: this.columnNumber,
22930
23158
  stack: this.stack,
22931
23159
  // Axios
22932
- config: _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toJSONObject(this.config),
23160
+ config: serializedConfig,
22933
23161
  code: this.code,
22934
23162
  status: this.status,
22935
23163
  };
@@ -22941,6 +23169,7 @@ AxiosError.ERR_BAD_OPTION_VALUE = 'ERR_BAD_OPTION_VALUE';
22941
23169
  AxiosError.ERR_BAD_OPTION = 'ERR_BAD_OPTION';
22942
23170
  AxiosError.ECONNABORTED = 'ECONNABORTED';
22943
23171
  AxiosError.ETIMEDOUT = 'ETIMEDOUT';
23172
+ AxiosError.ECONNREFUSED = 'ECONNREFUSED';
22944
23173
  AxiosError.ERR_NETWORK = 'ERR_NETWORK';
22945
23174
  AxiosError.ERR_FR_TOO_MANY_REDIRECTS = 'ERR_FR_TOO_MANY_REDIRECTS';
22946
23175
  AxiosError.ERR_DEPRECATED = 'ERR_DEPRECATED';
@@ -22949,6 +23178,7 @@ AxiosError.ERR_BAD_REQUEST = 'ERR_BAD_REQUEST';
22949
23178
  AxiosError.ERR_CANCELED = 'ERR_CANCELED';
22950
23179
  AxiosError.ERR_NOT_SUPPORT = 'ERR_NOT_SUPPORT';
22951
23180
  AxiosError.ERR_INVALID_URL = 'ERR_INVALID_URL';
23181
+ AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED = 'ERR_FORM_DATA_DEPTH_EXCEEDED';
22952
23182
 
22953
23183
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AxiosError);
22954
23184
 
@@ -22972,41 +23202,41 @@ __webpack_require__.r(__webpack_exports__);
22972
23202
 
22973
23203
  const $internals = Symbol('internals');
22974
23204
 
22975
- const isValidHeaderValue = (value) => !/[\r\n]/.test(value);
22976
-
22977
- function assertValidHeaderValue(value, header) {
22978
- if (value === false || value == null) {
22979
- return;
22980
- }
23205
+ const INVALID_HEADER_VALUE_CHARS_RE = /[^\x09\x20-\x7E\x80-\xFF]/g;
22981
23206
 
22982
- if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(value)) {
22983
- value.forEach((v) => assertValidHeaderValue(v, header));
22984
- return;
22985
- }
23207
+ function trimSPorHTAB(str) {
23208
+ let start = 0;
23209
+ let end = str.length;
22986
23210
 
22987
- if (!isValidHeaderValue(String(value))) {
22988
- throw new Error(`Invalid character in header content ["${header}"]`);
22989
- }
22990
- }
23211
+ while (start < end) {
23212
+ const code = str.charCodeAt(start);
22991
23213
 
22992
- function normalizeHeader(header) {
22993
- return header && String(header).trim().toLowerCase();
22994
- }
23214
+ if (code !== 0x09 && code !== 0x20) {
23215
+ break;
23216
+ }
22995
23217
 
22996
- function stripTrailingCRLF(str) {
22997
- let end = str.length;
23218
+ start += 1;
23219
+ }
22998
23220
 
22999
- while (end > 0) {
23000
- const charCode = str.charCodeAt(end - 1);
23221
+ while (end > start) {
23222
+ const code = str.charCodeAt(end - 1);
23001
23223
 
23002
- if (charCode !== 10 && charCode !== 13) {
23224
+ if (code !== 0x09 && code !== 0x20) {
23003
23225
  break;
23004
23226
  }
23005
23227
 
23006
23228
  end -= 1;
23007
23229
  }
23008
23230
 
23009
- return end === str.length ? str : str.slice(0, end);
23231
+ return start === 0 && end === str.length ? str : str.slice(start, end);
23232
+ }
23233
+
23234
+ function normalizeHeader(header) {
23235
+ return header && String(header).trim().toLowerCase();
23236
+ }
23237
+
23238
+ function sanitizeHeaderValue(str) {
23239
+ return trimSPorHTAB(str.replace(INVALID_HEADER_VALUE_CHARS_RE, ''));
23010
23240
  }
23011
23241
 
23012
23242
  function normalizeValue(value) {
@@ -23014,7 +23244,7 @@ function normalizeValue(value) {
23014
23244
  return value;
23015
23245
  }
23016
23246
 
23017
- return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(value) ? value.map(normalizeValue) : stripTrailingCRLF(String(value));
23247
+ return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(value) ? value.map(normalizeValue) : sanitizeHeaderValue(String(value));
23018
23248
  }
23019
23249
 
23020
23250
  function parseTokens(str) {
@@ -23065,6 +23295,9 @@ function buildAccessors(obj, header) {
23065
23295
 
23066
23296
  ['get', 'set', 'has'].forEach((methodName) => {
23067
23297
  Object.defineProperty(obj, methodName + accessorName, {
23298
+ // Null-proto descriptor so a polluted Object.prototype.get cannot turn
23299
+ // this data descriptor into an accessor descriptor on the way in.
23300
+ __proto__: null,
23068
23301
  value: function (arg1, arg2, arg3) {
23069
23302
  return this[methodName].call(this, header, arg1, arg2, arg3);
23070
23303
  },
@@ -23096,7 +23329,6 @@ class AxiosHeaders {
23096
23329
  _rewrite === true ||
23097
23330
  (_rewrite === undefined && self[key] !== false)
23098
23331
  ) {
23099
- assertValidHeaderValue(_value, _header);
23100
23332
  self[key || _header] = normalizeValue(_value);
23101
23333
  }
23102
23334
  }
@@ -23459,7 +23691,7 @@ __webpack_require__.r(__webpack_exports__);
23459
23691
  */
23460
23692
  function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
23461
23693
  let isRelativeUrl = !(0,_helpers_isAbsoluteURL_js__WEBPACK_IMPORTED_MODULE_0__["default"])(requestedURL);
23462
- if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) {
23694
+ if (baseURL && (isRelativeUrl || allowAbsoluteUrls === false)) {
23463
23695
  return (0,_helpers_combineURLs_js__WEBPACK_IMPORTED_MODULE_1__["default"])(baseURL, requestedURL);
23464
23696
  }
23465
23697
  return requestedURL;
@@ -23533,8 +23765,15 @@ function dispatchRequest(config) {
23533
23765
  function onAdapterResolution(response) {
23534
23766
  throwIfCancellationRequested(config);
23535
23767
 
23536
- // Transform response data
23537
- response.data = _transformData_js__WEBPACK_IMPORTED_MODULE_0__["default"].call(config, config.transformResponse, response);
23768
+ // Expose the current response on config so that transformResponse can
23769
+ // attach it to any AxiosError it throws (e.g. on JSON parse failure).
23770
+ // We clean it up afterwards to avoid polluting the config object.
23771
+ config.response = response;
23772
+ try {
23773
+ response.data = _transformData_js__WEBPACK_IMPORTED_MODULE_0__["default"].call(config, config.transformResponse, response);
23774
+ } finally {
23775
+ delete config.response;
23776
+ }
23538
23777
 
23539
23778
  response.headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_4__["default"].from(response.headers);
23540
23779
 
@@ -23546,11 +23785,16 @@ function dispatchRequest(config) {
23546
23785
 
23547
23786
  // Transform response data
23548
23787
  if (reason && reason.response) {
23549
- reason.response.data = _transformData_js__WEBPACK_IMPORTED_MODULE_0__["default"].call(
23550
- config,
23551
- config.transformResponse,
23552
- reason.response
23553
- );
23788
+ config.response = reason.response;
23789
+ try {
23790
+ reason.response.data = _transformData_js__WEBPACK_IMPORTED_MODULE_0__["default"].call(
23791
+ config,
23792
+ config.transformResponse,
23793
+ reason.response
23794
+ );
23795
+ } finally {
23796
+ delete config.response;
23797
+ }
23554
23798
  reason.response.headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_4__["default"].from(reason.response.headers);
23555
23799
  }
23556
23800
  }
@@ -23592,7 +23836,21 @@ const headersToObject = (thing) => (thing instanceof _AxiosHeaders_js__WEBPACK_I
23592
23836
  function mergeConfig(config1, config2) {
23593
23837
  // eslint-disable-next-line no-param-reassign
23594
23838
  config2 = config2 || {};
23595
- const config = {};
23839
+
23840
+ // Use a null-prototype object so that downstream reads such as `config.auth`
23841
+ // or `config.baseURL` cannot inherit polluted values from Object.prototype.
23842
+ // `hasOwnProperty` is restored as a non-enumerable own slot to preserve
23843
+ // ergonomics for user code that relies on it.
23844
+ const config = Object.create(null);
23845
+ Object.defineProperty(config, 'hasOwnProperty', {
23846
+ // Null-proto descriptor so a polluted Object.prototype.get cannot turn
23847
+ // this data descriptor into an accessor descriptor on the way in.
23848
+ __proto__: null,
23849
+ value: Object.prototype.hasOwnProperty,
23850
+ enumerable: false,
23851
+ writable: true,
23852
+ configurable: true,
23853
+ });
23596
23854
 
23597
23855
  function getMergedValue(target, source, prop, caseless) {
23598
23856
  if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(target) && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(source)) {
@@ -23631,9 +23889,9 @@ function mergeConfig(config1, config2) {
23631
23889
 
23632
23890
  // eslint-disable-next-line consistent-return
23633
23891
  function mergeDirectKeys(a, b, prop) {
23634
- if (prop in config2) {
23892
+ if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(config2, prop)) {
23635
23893
  return getMergedValue(a, b);
23636
- } else if (prop in config1) {
23894
+ } else if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(config1, prop)) {
23637
23895
  return getMergedValue(undefined, a);
23638
23896
  }
23639
23897
  }
@@ -23665,6 +23923,7 @@ function mergeConfig(config1, config2) {
23665
23923
  httpsAgent: defaultToConfig2,
23666
23924
  cancelToken: defaultToConfig2,
23667
23925
  socketPath: defaultToConfig2,
23926
+ allowedSocketPaths: defaultToConfig2,
23668
23927
  responseEncoding: defaultToConfig2,
23669
23928
  validateStatus: mergeDirectKeys,
23670
23929
  headers: (a, b, prop) =>
@@ -23674,7 +23933,9 @@ function mergeConfig(config1, config2) {
23674
23933
  _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(Object.keys({ ...config1, ...config2 }), function computeConfigValue(prop) {
23675
23934
  if (prop === '__proto__' || prop === 'constructor' || prop === 'prototype') return;
23676
23935
  const merge = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;
23677
- const configValue = merge(config1[prop], config2[prop], prop);
23936
+ const a = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(config1, prop) ? config1[prop] : undefined;
23937
+ const b = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(config2, prop) ? config2[prop] : undefined;
23938
+ const configValue = merge(a, b, prop);
23678
23939
  (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
23679
23940
  });
23680
23941
 
@@ -23711,17 +23972,13 @@ function settle(resolve, reject, response) {
23711
23972
  if (!response.status || !validateStatus || validateStatus(response.status)) {
23712
23973
  resolve(response);
23713
23974
  } else {
23714
- reject(
23715
- new _AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"](
23716
- 'Request failed with status code ' + response.status,
23717
- [_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"].ERR_BAD_REQUEST, _AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"].ERR_BAD_RESPONSE][
23718
- Math.floor(response.status / 100) - 4
23719
- ],
23720
- response.config,
23721
- response.request,
23722
- response
23723
- )
23724
- );
23975
+ reject(new _AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"](
23976
+ 'Request failed with status code ' + response.status,
23977
+ response.status >= 400 && response.status < 500 ? _AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"].ERR_BAD_REQUEST : _AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"].ERR_BAD_RESPONSE,
23978
+ response.config,
23979
+ response.request,
23980
+ response
23981
+ ));
23725
23982
  }
23726
23983
  }
23727
23984
 
@@ -23796,6 +24053,8 @@ __webpack_require__.r(__webpack_exports__);
23796
24053
 
23797
24054
 
23798
24055
 
24056
+ const own = (obj, key) => (obj != null && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(obj, key) ? obj[key] : undefined);
24057
+
23799
24058
  /**
23800
24059
  * It takes a string, tries to parse it, and if it fails, it returns the stringified version
23801
24060
  * of the input
@@ -23863,20 +24122,22 @@ const defaults = {
23863
24122
  let isFileList;
23864
24123
 
23865
24124
  if (isObjectPayload) {
24125
+ const formSerializer = own(this, 'formSerializer');
23866
24126
  if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {
23867
- return (0,_helpers_toURLEncodedForm_js__WEBPACK_IMPORTED_MODULE_4__["default"])(data, this.formSerializer).toString();
24127
+ return (0,_helpers_toURLEncodedForm_js__WEBPACK_IMPORTED_MODULE_4__["default"])(data, formSerializer).toString();
23868
24128
  }
23869
24129
 
23870
24130
  if (
23871
24131
  (isFileList = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFileList(data)) ||
23872
24132
  contentType.indexOf('multipart/form-data') > -1
23873
24133
  ) {
23874
- const _FormData = this.env && this.env.FormData;
24134
+ const env = own(this, 'env');
24135
+ const _FormData = env && env.FormData;
23875
24136
 
23876
24137
  return (0,_helpers_toFormData_js__WEBPACK_IMPORTED_MODULE_3__["default"])(
23877
24138
  isFileList ? { 'files[]': data } : data,
23878
24139
  _FormData && new _FormData(),
23879
- this.formSerializer
24140
+ formSerializer
23880
24141
  );
23881
24142
  }
23882
24143
  }
@@ -23892,9 +24153,10 @@ const defaults = {
23892
24153
 
23893
24154
  transformResponse: [
23894
24155
  function transformResponse(data) {
23895
- const transitional = this.transitional || defaults.transitional;
24156
+ const transitional = own(this, 'transitional') || defaults.transitional;
23896
24157
  const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
23897
- const JSONRequested = this.responseType === 'json';
24158
+ const responseType = own(this, 'responseType');
24159
+ const JSONRequested = responseType === 'json';
23898
24160
 
23899
24161
  if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isResponse(data) || _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isReadableStream(data)) {
23900
24162
  return data;
@@ -23903,17 +24165,17 @@ const defaults = {
23903
24165
  if (
23904
24166
  data &&
23905
24167
  _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(data) &&
23906
- ((forcedJSONParsing && !this.responseType) || JSONRequested)
24168
+ ((forcedJSONParsing && !responseType) || JSONRequested)
23907
24169
  ) {
23908
24170
  const silentJSONParsing = transitional && transitional.silentJSONParsing;
23909
24171
  const strictJSONParsing = !silentJSONParsing && JSONRequested;
23910
24172
 
23911
24173
  try {
23912
- return JSON.parse(data, this.parseReviver);
24174
+ return JSON.parse(data, own(this, 'parseReviver'));
23913
24175
  } catch (e) {
23914
24176
  if (strictJSONParsing) {
23915
24177
  if (e.name === 'SyntaxError') {
23916
- throw _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].from(e, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].ERR_BAD_RESPONSE, this, null, this.response);
24178
+ throw _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].from(e, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].ERR_BAD_RESPONSE, this, null, own(this, 'response'));
23917
24179
  }
23918
24180
  throw e;
23919
24181
  }
@@ -23953,7 +24215,7 @@ const defaults = {
23953
24215
  },
23954
24216
  };
23955
24217
 
23956
- _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {
24218
+ _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'query'], (method) => {
23957
24219
  defaults.headers[method] = {};
23958
24220
  });
23959
24221
 
@@ -23990,7 +24252,7 @@ __webpack_require__.r(__webpack_exports__);
23990
24252
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
23991
24253
  /* harmony export */ VERSION: () => (/* binding */ VERSION)
23992
24254
  /* harmony export */ });
23993
- const VERSION = "1.15.0";
24255
+ const VERSION = "1.16.0";
23994
24256
 
23995
24257
  /***/ },
23996
24258
 
@@ -24023,9 +24285,8 @@ function encode(str) {
24023
24285
  ')': '%29',
24024
24286
  '~': '%7E',
24025
24287
  '%20': '+',
24026
- '%00': '\x00',
24027
24288
  };
24028
- return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {
24289
+ return encodeURIComponent(str).replace(/[!'()~]|%20/g, function replacer(match) {
24029
24290
  return charMap[match];
24030
24291
  });
24031
24292
  }
@@ -24190,7 +24451,8 @@ function bind(fn, thisArg) {
24190
24451
  "use strict";
24191
24452
  __webpack_require__.r(__webpack_exports__);
24192
24453
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
24193
- /* harmony export */ "default": () => (/* binding */ buildURL)
24454
+ /* harmony export */ "default": () => (/* binding */ buildURL),
24455
+ /* harmony export */ encode: () => (/* binding */ encode)
24194
24456
  /* harmony export */ });
24195
24457
  /* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(68750);
24196
24458
  /* harmony import */ var _helpers_AxiosURLSearchParams_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(15720);
@@ -24404,8 +24666,20 @@ __webpack_require__.r(__webpack_exports__);
24404
24666
 
24405
24667
  read(name) {
24406
24668
  if (typeof document === 'undefined') return null;
24407
- const match = document.cookie.match(new RegExp('(?:^|; )' + name + '=([^;]*)'));
24408
- return match ? decodeURIComponent(match[1]) : null;
24669
+ // Match name=value by splitting on the semicolon separator instead of building a
24670
+ // RegExp from `name` — interpolating an unescaped string into a RegExp would let
24671
+ // metacharacters (e.g. `.+?` in an attacker-influenced cookie name) cause ReDoS or
24672
+ // match the wrong cookie. Browsers may serialize cookie pairs as either ";" or
24673
+ // "; ", so ignore optional whitespace before each cookie name.
24674
+ const cookies = document.cookie.split(';');
24675
+ for (let i = 0; i < cookies.length; i++) {
24676
+ const cookie = cookies[i].replace(/^\s+/, '');
24677
+ const eq = cookie.indexOf('=');
24678
+ if (eq !== -1 && cookie.slice(0, eq) === name) {
24679
+ return decodeURIComponent(cookie.slice(eq + 1));
24680
+ }
24681
+ }
24682
+ return null;
24409
24683
  },
24410
24684
 
24411
24685
  remove(name) {
@@ -24422,6 +24696,118 @@ __webpack_require__.r(__webpack_exports__);
24422
24696
  });
24423
24697
 
24424
24698
 
24699
+ /***/ },
24700
+
24701
+ /***/ 879
24702
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
24703
+
24704
+ "use strict";
24705
+ __webpack_require__.r(__webpack_exports__);
24706
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
24707
+ /* harmony export */ "default": () => (/* binding */ estimateDataURLDecodedBytes)
24708
+ /* harmony export */ });
24709
+ /**
24710
+ * Estimate decoded byte length of a data:// URL *without* allocating large buffers.
24711
+ * - For base64: compute exact decoded size using length and padding;
24712
+ * handle %XX at the character-count level (no string allocation).
24713
+ * - For non-base64: use UTF-8 byteLength of the encoded body as a safe upper bound.
24714
+ *
24715
+ * @param {string} url
24716
+ * @returns {number}
24717
+ */
24718
+ function estimateDataURLDecodedBytes(url) {
24719
+ if (!url || typeof url !== 'string') return 0;
24720
+ if (!url.startsWith('data:')) return 0;
24721
+
24722
+ const comma = url.indexOf(',');
24723
+ if (comma < 0) return 0;
24724
+
24725
+ const meta = url.slice(5, comma);
24726
+ const body = url.slice(comma + 1);
24727
+ const isBase64 = /;base64/i.test(meta);
24728
+
24729
+ if (isBase64) {
24730
+ let effectiveLen = body.length;
24731
+ const len = body.length; // cache length
24732
+
24733
+ for (let i = 0; i < len; i++) {
24734
+ if (body.charCodeAt(i) === 37 /* '%' */ && i + 2 < len) {
24735
+ const a = body.charCodeAt(i + 1);
24736
+ const b = body.charCodeAt(i + 2);
24737
+ const isHex =
24738
+ ((a >= 48 && a <= 57) || (a >= 65 && a <= 70) || (a >= 97 && a <= 102)) &&
24739
+ ((b >= 48 && b <= 57) || (b >= 65 && b <= 70) || (b >= 97 && b <= 102));
24740
+
24741
+ if (isHex) {
24742
+ effectiveLen -= 2;
24743
+ i += 2;
24744
+ }
24745
+ }
24746
+ }
24747
+
24748
+ let pad = 0;
24749
+ let idx = len - 1;
24750
+
24751
+ const tailIsPct3D = (j) =>
24752
+ j >= 2 &&
24753
+ body.charCodeAt(j - 2) === 37 && // '%'
24754
+ body.charCodeAt(j - 1) === 51 && // '3'
24755
+ (body.charCodeAt(j) === 68 || body.charCodeAt(j) === 100); // 'D' or 'd'
24756
+
24757
+ if (idx >= 0) {
24758
+ if (body.charCodeAt(idx) === 61 /* '=' */) {
24759
+ pad++;
24760
+ idx--;
24761
+ } else if (tailIsPct3D(idx)) {
24762
+ pad++;
24763
+ idx -= 3;
24764
+ }
24765
+ }
24766
+
24767
+ if (pad === 1 && idx >= 0) {
24768
+ if (body.charCodeAt(idx) === 61 /* '=' */) {
24769
+ pad++;
24770
+ } else if (tailIsPct3D(idx)) {
24771
+ pad++;
24772
+ }
24773
+ }
24774
+
24775
+ const groups = Math.floor(effectiveLen / 4);
24776
+ const bytes = groups * 3 - (pad || 0);
24777
+ return bytes > 0 ? bytes : 0;
24778
+ }
24779
+
24780
+ if (typeof Buffer !== 'undefined' && typeof Buffer.byteLength === 'function') {
24781
+ return Buffer.byteLength(body, 'utf8');
24782
+ }
24783
+
24784
+ // Compute UTF-8 byte length directly from UTF-16 code units without allocating
24785
+ // a byte buffer (TextEncoder.encode would defeat the DoS guard on large bodies).
24786
+ // Using body.length here would undercount non-ASCII (e.g. '€' is 1 code unit
24787
+ // but 3 UTF-8 bytes).
24788
+ let bytes = 0;
24789
+ for (let i = 0, len = body.length; i < len; i++) {
24790
+ const c = body.charCodeAt(i);
24791
+ if (c < 0x80) {
24792
+ bytes += 1;
24793
+ } else if (c < 0x800) {
24794
+ bytes += 2;
24795
+ } else if (c >= 0xd800 && c <= 0xdbff && i + 1 < len) {
24796
+ const next = body.charCodeAt(i + 1);
24797
+ if (next >= 0xdc00 && next <= 0xdfff) {
24798
+ bytes += 4;
24799
+ i++;
24800
+ } else {
24801
+ bytes += 3;
24802
+ }
24803
+ } else {
24804
+ bytes += 3;
24805
+ }
24806
+ }
24807
+ return bytes;
24808
+ }
24809
+
24810
+
24425
24811
  /***/ },
24426
24812
 
24427
24813
  /***/ 66256
@@ -24493,7 +24879,9 @@ function formDataToJSON(formData) {
24493
24879
 
24494
24880
  if (isLast) {
24495
24881
  if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(target, name)) {
24496
- target[name] = [target[name], value];
24882
+ target[name] = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(target[name])
24883
+ ? target[name].concat(value)
24884
+ : [target[name], value];
24497
24885
  } else {
24498
24886
  target[name] = value;
24499
24887
  }
@@ -24727,7 +25115,7 @@ __webpack_require__.r(__webpack_exports__);
24727
25115
 
24728
25116
 
24729
25117
  function parseProtocol(url) {
24730
- const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
25118
+ const match = /^([-+\w]{1,25}):(?:\/\/)?/.exec(url);
24731
25119
  return (match && match[1]) || '';
24732
25120
  }
24733
25121
 
@@ -24756,13 +25144,13 @@ const progressEventReducer = (listener, isDownloadStream, freq = 3) => {
24756
25144
  const _speedometer = (0,_speedometer_js__WEBPACK_IMPORTED_MODULE_0__["default"])(50, 250);
24757
25145
 
24758
25146
  return (0,_throttle_js__WEBPACK_IMPORTED_MODULE_1__["default"])((e) => {
24759
- const loaded = e.loaded;
25147
+ const rawLoaded = e.loaded;
24760
25148
  const total = e.lengthComputable ? e.total : undefined;
24761
- const progressBytes = loaded - bytesNotified;
25149
+ const loaded = total != null ? Math.min(rawLoaded, total) : rawLoaded;
25150
+ const progressBytes = Math.max(0, loaded - bytesNotified);
24762
25151
  const rate = _speedometer(progressBytes);
24763
- const inRange = loaded <= total;
24764
25152
 
24765
- bytesNotified = loaded;
25153
+ bytesNotified = Math.max(bytesNotified, loaded);
24766
25154
 
24767
25155
  const data = {
24768
25156
  loaded,
@@ -24770,7 +25158,7 @@ const progressEventReducer = (listener, isDownloadStream, freq = 3) => {
24770
25158
  progress: total ? loaded / total : undefined,
24771
25159
  bytes: progressBytes,
24772
25160
  rate: rate ? rate : undefined,
24773
- estimated: rate && total && inRange ? (total - loaded) / rate : undefined,
25161
+ estimated: rate && total ? (total - loaded) / rate : undefined,
24774
25162
  event: e,
24775
25163
  lengthComputable: total != null,
24776
25164
  [isDownloadStream ? 'download' : 'upload']: true,
@@ -24827,15 +25215,55 @@ __webpack_require__.r(__webpack_exports__);
24827
25215
 
24828
25216
 
24829
25217
 
25218
+ const FORM_DATA_CONTENT_HEADERS = ['content-type', 'content-length'];
25219
+
25220
+ function setFormDataHeaders(headers, formHeaders, policy) {
25221
+ if (policy !== 'content-only') {
25222
+ headers.set(formHeaders);
25223
+ return;
25224
+ }
25225
+
25226
+ Object.entries(formHeaders).forEach(([key, val]) => {
25227
+ if (FORM_DATA_CONTENT_HEADERS.includes(key.toLowerCase())) {
25228
+ headers.set(key, val);
25229
+ }
25230
+ });
25231
+ }
25232
+
25233
+ /**
25234
+ * Encode a UTF-8 string to a Latin-1 byte string for use with btoa().
25235
+ * This is a modern replacement for the deprecated unescape(encodeURIComponent(str)) pattern.
25236
+ *
25237
+ * @param {string} str The string to encode
25238
+ *
25239
+ * @returns {string} UTF-8 bytes as a Latin-1 string
25240
+ */
25241
+ const encodeUTF8 = (str) =>
25242
+ encodeURIComponent(str).replace(/%([0-9A-F]{2})/gi, (_, hex) =>
25243
+ String.fromCharCode(parseInt(hex, 16))
25244
+ );
25245
+
24830
25246
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((config) => {
24831
25247
  const newConfig = (0,_core_mergeConfig_js__WEBPACK_IMPORTED_MODULE_5__["default"])({}, config);
24832
25248
 
24833
- let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig;
25249
+ // Read only own properties to prevent prototype pollution gadgets
25250
+ // (e.g. Object.prototype.baseURL = 'https://evil.com').
25251
+ const own = (key) => (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].hasOwnProp(newConfig, key) ? newConfig[key] : undefined);
25252
+
25253
+ const data = own('data');
25254
+ let withXSRFToken = own('withXSRFToken');
25255
+ const xsrfHeaderName = own('xsrfHeaderName');
25256
+ const xsrfCookieName = own('xsrfCookieName');
25257
+ let headers = own('headers');
25258
+ const auth = own('auth');
25259
+ const baseURL = own('baseURL');
25260
+ const allowAbsoluteUrls = own('allowAbsoluteUrls');
25261
+ const url = own('url');
24834
25262
 
24835
25263
  newConfig.headers = headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_6__["default"].from(headers);
24836
25264
 
24837
25265
  newConfig.url = (0,_buildURL_js__WEBPACK_IMPORTED_MODULE_7__["default"])(
24838
- (0,_core_buildFullPath_js__WEBPACK_IMPORTED_MODULE_4__["default"])(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls),
25266
+ (0,_core_buildFullPath_js__WEBPACK_IMPORTED_MODULE_4__["default"])(baseURL, url, allowAbsoluteUrls),
24839
25267
  config.params,
24840
25268
  config.paramsSerializer
24841
25269
  );
@@ -24845,11 +25273,7 @@ __webpack_require__.r(__webpack_exports__);
24845
25273
  headers.set(
24846
25274
  'Authorization',
24847
25275
  'Basic ' +
24848
- btoa(
24849
- (auth.username || '') +
24850
- ':' +
24851
- (auth.password ? unescape(encodeURIComponent(auth.password)) : '')
24852
- )
25276
+ btoa((auth.username || '') + ':' + (auth.password ? encodeUTF8(auth.password) : ''))
24853
25277
  );
24854
25278
  }
24855
25279
 
@@ -24858,14 +25282,7 @@ __webpack_require__.r(__webpack_exports__);
24858
25282
  headers.setContentType(undefined); // browser handles it
24859
25283
  } else if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isFunction(data.getHeaders)) {
24860
25284
  // Node.js FormData (like form-data package)
24861
- const formHeaders = data.getHeaders();
24862
- // Only set safe headers to avoid overwriting security headers
24863
- const allowedHeaders = ['content-type', 'content-length'];
24864
- Object.entries(formHeaders).forEach(([key, val]) => {
24865
- if (allowedHeaders.includes(key.toLowerCase())) {
24866
- headers.set(key, val);
24867
- }
24868
- });
25285
+ setFormDataHeaders(headers, data.getHeaders(), own('formDataHeaderPolicy'));
24869
25286
  }
24870
25287
  }
24871
25288
 
@@ -24874,10 +25291,17 @@ __webpack_require__.r(__webpack_exports__);
24874
25291
  // Specifically not if we're in a web worker, or react-native.
24875
25292
 
24876
25293
  if (_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasStandardBrowserEnv) {
24877
- withXSRFToken && _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));
25294
+ if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isFunction(withXSRFToken)) {
25295
+ withXSRFToken = withXSRFToken(newConfig);
25296
+ }
25297
+
25298
+ // Strict boolean check — prevents proto-pollution gadgets (e.g. Object.prototype.withXSRFToken = 1)
25299
+ // and misconfigurations (e.g. "false") from short-circuiting the same-origin check and leaking
25300
+ // the XSRF token cross-origin.
25301
+ const shouldSendXSRF =
25302
+ withXSRFToken === true || (withXSRFToken == null && (0,_isURLSameOrigin_js__WEBPACK_IMPORTED_MODULE_2__["default"])(newConfig.url));
24878
25303
 
24879
- if (withXSRFToken || (withXSRFToken !== false && (0,_isURLSameOrigin_js__WEBPACK_IMPORTED_MODULE_2__["default"])(newConfig.url))) {
24880
- // Add xsrf header
25304
+ if (shouldSendXSRF) {
24881
25305
  const xsrfValue = xsrfHeaderName && xsrfCookieName && _cookies_js__WEBPACK_IMPORTED_MODULE_3__["default"].read(xsrfCookieName);
24882
25306
 
24883
25307
  if (xsrfValue) {
@@ -25184,6 +25608,7 @@ function toFormData(obj, formData, options) {
25184
25608
  const dots = options.dots;
25185
25609
  const indexes = options.indexes;
25186
25610
  const _Blob = options.Blob || (typeof Blob !== 'undefined' && Blob);
25611
+ const maxDepth = options.maxDepth === undefined ? 100 : options.maxDepth;
25187
25612
  const useBlob = _Blob && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isSpecCompliantForm(formData);
25188
25613
 
25189
25614
  if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(visitor)) {
@@ -25276,9 +25701,16 @@ function toFormData(obj, formData, options) {
25276
25701
  isVisitable,
25277
25702
  });
25278
25703
 
25279
- function build(value, path) {
25704
+ function build(value, path, depth = 0) {
25280
25705
  if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(value)) return;
25281
25706
 
25707
+ if (depth > maxDepth) {
25708
+ throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"](
25709
+ 'Object is too deeply nested (' + depth + ' levels). Max depth: ' + maxDepth,
25710
+ _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].ERR_FORM_DATA_DEPTH_EXCEEDED
25711
+ );
25712
+ }
25713
+
25282
25714
  if (stack.indexOf(value) !== -1) {
25283
25715
  throw Error('Circular reference detected in ' + path.join('.'));
25284
25716
  }
@@ -25291,7 +25723,7 @@ function toFormData(obj, formData, options) {
25291
25723
  visitor.call(formData, el, _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(key) ? key.trim() : key, path, exposedHelpers);
25292
25724
 
25293
25725
  if (result === true) {
25294
- build(el, path ? path.concat(key) : [key]);
25726
+ build(el, path ? path.concat(key) : [key], depth + 1);
25295
25727
  }
25296
25728
  });
25297
25729
 
@@ -25547,7 +25979,9 @@ function assertOptions(options, schema, allowUnknown) {
25547
25979
  let i = keys.length;
25548
25980
  while (i-- > 0) {
25549
25981
  const opt = keys[i];
25550
- const validator = schema[opt];
25982
+ // Use hasOwnProperty so a polluted Object.prototype.<opt> cannot supply
25983
+ // a non-function validator and cause a TypeError.
25984
+ const validator = Object.prototype.hasOwnProperty.call(schema, opt) ? schema[opt] : undefined;
25551
25985
  if (validator) {
25552
25986
  const value = options[opt];
25553
25987
  const result = value === undefined || validator(value, opt, options);
@@ -25934,21 +26368,21 @@ const isFile = kindOfTest('File');
25934
26368
  * also have a `name` and `type` attribute to specify filename and content type
25935
26369
  *
25936
26370
  * @see https://github.com/facebook/react-native/blob/26684cf3adf4094eb6c405d345a75bf8c7c0bf88/Libraries/Network/FormData.js#L68-L71
25937
- *
26371
+ *
25938
26372
  * @param {*} value The value to test
25939
- *
26373
+ *
25940
26374
  * @returns {boolean} True if value is a React Native Blob, otherwise false
25941
26375
  */
25942
26376
  const isReactNativeBlob = (value) => {
25943
26377
  return !!(value && typeof value.uri !== 'undefined');
25944
- }
26378
+ };
25945
26379
 
25946
26380
  /**
25947
26381
  * Determine if environment is React Native
25948
26382
  * ReactNative `FormData` has a non-standard `getParts()` method
25949
- *
26383
+ *
25950
26384
  * @param {*} formData The formData to test
25951
- *
26385
+ *
25952
26386
  * @returns {boolean} True if environment is React Native, otherwise false
25953
26387
  */
25954
26388
  const isReactNative = (formData) => formData && typeof formData.getParts !== 'undefined';
@@ -25967,7 +26401,7 @@ const isBlob = kindOfTest('Blob');
25967
26401
  *
25968
26402
  * @param {*} val The value to test
25969
26403
  *
25970
- * @returns {boolean} True if value is a File, otherwise false
26404
+ * @returns {boolean} True if value is a FileList, otherwise false
25971
26405
  */
25972
26406
  const isFileList = kindOfTest('FileList');
25973
26407
 
@@ -25999,15 +26433,17 @@ const G = getGlobal();
25999
26433
  const FormDataCtor = typeof G.FormData !== 'undefined' ? G.FormData : undefined;
26000
26434
 
26001
26435
  const isFormData = (thing) => {
26002
- let kind;
26003
- return thing && (
26004
- (FormDataCtor && thing instanceof FormDataCtor) || (
26005
- isFunction(thing.append) && (
26006
- (kind = kindOf(thing)) === 'formdata' ||
26007
- // detect form-data instance
26008
- (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')
26009
- )
26010
- )
26436
+ if (!thing) return false;
26437
+ if (FormDataCtor && thing instanceof FormDataCtor) return true;
26438
+ // Reject plain objects inheriting directly from Object.prototype so prototype-pollution gadgets can't spoof FormData.
26439
+ const proto = getPrototypeOf(thing);
26440
+ if (!proto || proto === Object.prototype) return false;
26441
+ if (!isFunction(thing.append)) return false;
26442
+ const kind = kindOf(thing);
26443
+ return (
26444
+ kind === 'formdata' ||
26445
+ // detect form-data instance
26446
+ (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')
26011
26447
  );
26012
26448
  };
26013
26449
 
@@ -26143,7 +26579,7 @@ const isContextDefined = (context) => !isUndefined(context) && context !== _glob
26143
26579
  *
26144
26580
  * @returns {Object} Result of all merge properties
26145
26581
  */
26146
- function merge(/* obj1, obj2, obj3, ... */) {
26582
+ function merge(...objs) {
26147
26583
  const { caseless, skipUndefined } = (isContextDefined(this) && this) || {};
26148
26584
  const result = {};
26149
26585
  const assignValue = (val, key) => {
@@ -26153,8 +26589,12 @@ function merge(/* obj1, obj2, obj3, ... */) {
26153
26589
  }
26154
26590
 
26155
26591
  const targetKey = (caseless && findKey(result, key)) || key;
26156
- if (isPlainObject(result[targetKey]) && isPlainObject(val)) {
26157
- result[targetKey] = merge(result[targetKey], val);
26592
+ // Read via own-prop only — a bare `result[targetKey]` walks the prototype
26593
+ // chain, so a polluted Object.prototype value could surface here and get
26594
+ // copied into the merged result.
26595
+ const existing = hasOwnProperty(result, targetKey) ? result[targetKey] : undefined;
26596
+ if (isPlainObject(existing) && isPlainObject(val)) {
26597
+ result[targetKey] = merge(existing, val);
26158
26598
  } else if (isPlainObject(val)) {
26159
26599
  result[targetKey] = merge({}, val);
26160
26600
  } else if (isArray(val)) {
@@ -26164,8 +26604,8 @@ function merge(/* obj1, obj2, obj3, ... */) {
26164
26604
  }
26165
26605
  };
26166
26606
 
26167
- for (let i = 0, l = arguments.length; i < l; i++) {
26168
- arguments[i] && forEach(arguments[i], assignValue);
26607
+ for (let i = 0, l = objs.length; i < l; i++) {
26608
+ objs[i] && forEach(objs[i], assignValue);
26169
26609
  }
26170
26610
  return result;
26171
26611
  }
@@ -26187,6 +26627,9 @@ const extend = (a, b, thisArg, { allOwnKeys } = {}) => {
26187
26627
  (val, key) => {
26188
26628
  if (thisArg && isFunction(val)) {
26189
26629
  Object.defineProperty(a, key, {
26630
+ // Null-proto descriptor so a polluted Object.prototype.get cannot
26631
+ // hijack defineProperty's accessor-vs-data resolution.
26632
+ __proto__: null,
26190
26633
  value: (0,_helpers_bind_js__WEBPACK_IMPORTED_MODULE_0__["default"])(val, thisArg),
26191
26634
  writable: true,
26192
26635
  enumerable: true,
@@ -26194,6 +26637,7 @@ const extend = (a, b, thisArg, { allOwnKeys } = {}) => {
26194
26637
  });
26195
26638
  } else {
26196
26639
  Object.defineProperty(a, key, {
26640
+ __proto__: null,
26197
26641
  value: val,
26198
26642
  writable: true,
26199
26643
  enumerable: true,
@@ -26232,12 +26676,14 @@ const stripBOM = (content) => {
26232
26676
  const inherits = (constructor, superConstructor, props, descriptors) => {
26233
26677
  constructor.prototype = Object.create(superConstructor.prototype, descriptors);
26234
26678
  Object.defineProperty(constructor.prototype, 'constructor', {
26679
+ __proto__: null,
26235
26680
  value: constructor,
26236
26681
  writable: true,
26237
26682
  enumerable: false,
26238
26683
  configurable: true,
26239
26684
  });
26240
26685
  Object.defineProperty(constructor, 'super', {
26686
+ __proto__: null,
26241
26687
  value: superConstructor.prototype,
26242
26688
  });
26243
26689
  props && Object.assign(constructor.prototype, props);
@@ -26419,7 +26865,7 @@ const reduceDescriptors = (obj, reducer) => {
26419
26865
  const freezeMethods = (obj) => {
26420
26866
  reduceDescriptors(obj, (descriptor, name) => {
26421
26867
  // skip restricted props in strict mode
26422
- if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {
26868
+ if (isFunction(obj) && ['arguments', 'caller', 'callee'].includes(name)) {
26423
26869
  return false;
26424
26870
  }
26425
26871
 
@@ -40662,7 +41108,7 @@ function doubleQuotedValue(source, onError) {
40662
41108
  next = source[++i + 1];
40663
41109
  }
40664
41110
  else if (next === 'x' || next === 'u' || next === 'U') {
40665
- const length = { x: 2, u: 4, U: 8 }[next];
41111
+ const length = next === 'x' ? 2 : next === 'u' ? 4 : 8;
40666
41112
  res += parseCharCode(source, i + 1, length, onError);
40667
41113
  i += length;
40668
41114
  }
@@ -40732,12 +41178,14 @@ function parseCharCode(source, offset, length, onError) {
40732
41178
  const cc = source.substr(offset, length);
40733
41179
  const ok = cc.length === length && /^[0-9a-fA-F]+$/.test(cc);
40734
41180
  const code = ok ? parseInt(cc, 16) : NaN;
40735
- if (isNaN(code)) {
41181
+ try {
41182
+ return String.fromCodePoint(code);
41183
+ }
41184
+ catch {
40736
41185
  const raw = source.substr(offset - 2, length + 2);
40737
41186
  onError(offset - 2, 'BAD_DQ_ESCAPE', `Invalid escape sequence ${raw}`);
40738
41187
  return raw;
40739
41188
  }
40740
- return String.fromCodePoint(code);
40741
41189
  }
40742
41190
 
40743
41191
 
@@ -42050,6 +42498,8 @@ class Alias extends _Node_js__WEBPACK_IMPORTED_MODULE_3__.NodeBase {
42050
42498
  * instance of the `source` anchor before this node.
42051
42499
  */
42052
42500
  resolve(doc, ctx) {
42501
+ if (ctx?.maxAliasCount === 0)
42502
+ throw new ReferenceError('Alias resolution is disabled');
42053
42503
  let nodes;
42054
42504
  if (ctx?.aliasResolveCache) {
42055
42505
  nodes = ctx.aliasResolveCache;
@@ -46229,18 +46679,18 @@ const isMergeKey = (ctx, key) => (merge.identify(key) ||
46229
46679
  merge.identify(key.value))) &&
46230
46680
  ctx?.doc.schema.tags.some(tag => tag.tag === merge.tag && tag.default);
46231
46681
  function addMergeToJSMap(ctx, map, value) {
46232
- value = ctx && (0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isAlias)(value) ? value.resolve(ctx.doc) : value;
46233
- if ((0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isSeq)(value))
46234
- for (const it of value.items)
46682
+ const source = resolveAliasValue(ctx, value);
46683
+ if ((0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isSeq)(source))
46684
+ for (const it of source.items)
46235
46685
  mergeValue(ctx, map, it);
46236
- else if (Array.isArray(value))
46237
- for (const it of value)
46686
+ else if (Array.isArray(source))
46687
+ for (const it of source)
46238
46688
  mergeValue(ctx, map, it);
46239
46689
  else
46240
- mergeValue(ctx, map, value);
46690
+ mergeValue(ctx, map, source);
46241
46691
  }
46242
46692
  function mergeValue(ctx, map, value) {
46243
- const source = ctx && (0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isAlias)(value) ? value.resolve(ctx.doc) : value;
46693
+ const source = resolveAliasValue(ctx, value);
46244
46694
  if (!(0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isMap)(source))
46245
46695
  throw new Error('Merge sources must be maps or map aliases');
46246
46696
  const srcMap = source.toJSON(null, ctx, Map);
@@ -46263,6 +46713,9 @@ function mergeValue(ctx, map, value) {
46263
46713
  }
46264
46714
  return map;
46265
46715
  }
46716
+ function resolveAliasValue(ctx, value) {
46717
+ return ctx && (0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isAlias)(value) ? value.resolve(ctx.doc, ctx) : value;
46718
+ }
46266
46719
 
46267
46720
 
46268
46721
 
@@ -47373,7 +47826,8 @@ function stringifyNumber({ format, minFractionDigits, tag, value }) {
47373
47826
  if (!format &&
47374
47827
  minFractionDigits &&
47375
47828
  (!tag || tag === 'tag:yaml.org,2002:float') &&
47376
- /^\d/.test(n)) {
47829
+ /^-?\d/.test(n) &&
47830
+ !n.includes('e')) {
47377
47831
  let i = n.indexOf('.');
47378
47832
  if (i < 0) {
47379
47833
  i = n.length;