@qssolutions/ssas-registration-form 1.0.7 → 1.0.8

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.
package/dist/index.esm.js CHANGED
@@ -76,7 +76,7 @@ lodash.exports;
76
76
  var undefined$1;
77
77
 
78
78
  /** Used as the semantic version number. */
79
- var VERSION = '4.17.23';
79
+ var VERSION = '4.18.1';
80
80
 
81
81
  /** Used as the size to enable large array optimizations. */
82
82
  var LARGE_ARRAY_SIZE = 200;
@@ -84,7 +84,8 @@ lodash.exports;
84
84
  /** Error message constants. */
85
85
  var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',
86
86
  FUNC_ERROR_TEXT = 'Expected a function',
87
- INVALID_TEMPL_VAR_ERROR_TEXT = 'Invalid `variable` option passed into `_.template`';
87
+ INVALID_TEMPL_VAR_ERROR_TEXT = 'Invalid `variable` option passed into `_.template`',
88
+ INVALID_TEMPL_IMPORTS_ERROR_TEXT = 'Invalid `imports` option passed into `_.template`';
88
89
 
89
90
  /** Used to stand-in for `undefined` hash values. */
90
91
  var HASH_UNDEFINED = '__lodash_hash_undefined__';
@@ -1816,6 +1817,10 @@ lodash.exports;
1816
1817
  * embedded Ruby (ERB) as well as ES2015 template strings. Change the
1817
1818
  * following template settings to use alternative delimiters.
1818
1819
  *
1820
+ * **Security:** See
1821
+ * [threat model](https://github.com/lodash/lodash/blob/main/threat-model.md)
1822
+ * — `_.template` is insecure and will be removed in v5.
1823
+ *
1819
1824
  * @static
1820
1825
  * @memberOf _
1821
1826
  * @type {Object}
@@ -2364,7 +2369,7 @@ lodash.exports;
2364
2369
  * @name has
2365
2370
  * @memberOf SetCache
2366
2371
  * @param {*} value The value to search for.
2367
- * @returns {number} Returns `true` if `value` is found, else `false`.
2372
+ * @returns {boolean} Returns `true` if `value` is found, else `false`.
2368
2373
  */
2369
2374
  function setCacheHas(value) {
2370
2375
  return this.__data__.has(value);
@@ -4435,7 +4440,9 @@ lodash.exports;
4435
4440
  function baseUnset(object, path) {
4436
4441
  path = castPath(path, object);
4437
4442
 
4438
- // Prevent prototype pollution, see: https://github.com/lodash/lodash/security/advisories/GHSA-xxjr-mmjv-4gpg
4443
+ // Prevent prototype pollution:
4444
+ // https://github.com/lodash/lodash/security/advisories/GHSA-xxjr-mmjv-4gpg
4445
+ // https://github.com/lodash/lodash/security/advisories/GHSA-f23m-r3pf-42rh
4439
4446
  var index = -1,
4440
4447
  length = path.length;
4441
4448
 
@@ -4443,32 +4450,17 @@ lodash.exports;
4443
4450
  return true;
4444
4451
  }
4445
4452
 
4446
- var isRootPrimitive = object == null || (typeof object !== 'object' && typeof object !== 'function');
4447
-
4448
4453
  while (++index < length) {
4449
- var key = path[index];
4450
-
4451
- // skip non-string keys (e.g., Symbols, numbers)
4452
- if (typeof key !== 'string') {
4453
- continue;
4454
- }
4454
+ var key = toKey(path[index]);
4455
4455
 
4456
4456
  // Always block "__proto__" anywhere in the path if it's not expected
4457
4457
  if (key === '__proto__' && !hasOwnProperty.call(object, '__proto__')) {
4458
4458
  return false;
4459
4459
  }
4460
4460
 
4461
- // Block "constructor.prototype" chains
4462
- if (key === 'constructor' &&
4463
- (index + 1) < length &&
4464
- typeof path[index + 1] === 'string' &&
4465
- path[index + 1] === 'prototype') {
4466
-
4467
- // Allow ONLY when the path starts at a primitive root, e.g., _.unset(0, 'constructor.prototype.a')
4468
- if (isRootPrimitive && index === 0) {
4469
- continue;
4470
- }
4471
-
4461
+ // Block constructor/prototype as non-terminal traversal keys to prevent
4462
+ // escaping the object graph into built-in constructors and prototypes.
4463
+ if ((key === 'constructor' || key === 'prototype') && index < length - 1) {
4472
4464
  return false;
4473
4465
  }
4474
4466
  }
@@ -7025,7 +7017,7 @@ lodash.exports;
7025
7017
 
7026
7018
  /**
7027
7019
  * Creates an array with all falsey values removed. The values `false`, `null`,
7028
- * `0`, `""`, `undefined`, and `NaN` are falsey.
7020
+ * `0`, `-0`, `0n`, `""`, `undefined`, and `NaN` are falsy.
7029
7021
  *
7030
7022
  * @static
7031
7023
  * @memberOf _
@@ -7564,7 +7556,7 @@ lodash.exports;
7564
7556
 
7565
7557
  while (++index < length) {
7566
7558
  var pair = pairs[index];
7567
- result[pair[0]] = pair[1];
7559
+ baseAssignValue(result, pair[0], pair[1]);
7568
7560
  }
7569
7561
  return result;
7570
7562
  }
@@ -14224,6 +14216,8 @@ lodash.exports;
14224
14216
  * **Note:** JavaScript follows the IEEE-754 standard for resolving
14225
14217
  * floating-point values which can produce unexpected results.
14226
14218
  *
14219
+ * **Note:** If `lower` is greater than `upper`, the values are swapped.
14220
+ *
14227
14221
  * @static
14228
14222
  * @memberOf _
14229
14223
  * @since 0.7.0
@@ -14237,9 +14231,16 @@ lodash.exports;
14237
14231
  * _.random(0, 5);
14238
14232
  * // => an integer between 0 and 5
14239
14233
  *
14234
+ * // when lower is greater than upper the values are swapped
14235
+ * _.random(5, 0);
14236
+ * // => an integer between 0 and 5
14237
+ *
14240
14238
  * _.random(5);
14241
14239
  * // => also an integer between 0 and 5
14242
14240
  *
14241
+ * _.random(-5);
14242
+ * // => an integer between -5 and 0
14243
+ *
14243
14244
  * _.random(5, true);
14244
14245
  * // => a floating-point number between 0 and 5
14245
14246
  *
@@ -14841,6 +14842,10 @@ lodash.exports;
14841
14842
  * properties may be accessed as free variables in the template. If a setting
14842
14843
  * object is given, it takes precedence over `_.templateSettings` values.
14843
14844
  *
14845
+ * **Security:** `_.template` is insecure and should not be used. It will be
14846
+ * removed in Lodash v5. Avoid untrusted input. See
14847
+ * [threat model](https://github.com/lodash/lodash/blob/main/threat-model.md).
14848
+ *
14844
14849
  * **Note:** In the development build `_.template` utilizes
14845
14850
  * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)
14846
14851
  * for easier debugging.
@@ -14948,12 +14953,18 @@ lodash.exports;
14948
14953
  options = undefined$1;
14949
14954
  }
14950
14955
  string = toString(string);
14951
- options = assignInWith({}, options, settings, customDefaultsAssignIn);
14956
+ options = assignWith({}, options, settings, customDefaultsAssignIn);
14952
14957
 
14953
- var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn),
14958
+ var imports = assignWith({}, options.imports, settings.imports, customDefaultsAssignIn),
14954
14959
  importsKeys = keys(imports),
14955
14960
  importsValues = baseValues(imports, importsKeys);
14956
14961
 
14962
+ arrayEach(importsKeys, function(key) {
14963
+ if (reForbiddenIdentifierChars.test(key)) {
14964
+ throw new Error(INVALID_TEMPL_IMPORTS_ERROR_TEXT);
14965
+ }
14966
+ });
14967
+
14957
14968
  var isEscaping,
14958
14969
  isEvaluating,
14959
14970
  index = 0,
@@ -17325,30 +17336,30 @@ function bind(fn, thisArg) {
17325
17336
 
17326
17337
  // utils is a library of generic helper functions non-specific to axios
17327
17338
 
17328
- const {toString} = Object.prototype;
17329
- const {getPrototypeOf} = Object;
17330
- const {iterator, toStringTag} = Symbol;
17339
+ const { toString } = Object.prototype;
17340
+ const { getPrototypeOf } = Object;
17341
+ const { iterator, toStringTag } = Symbol;
17331
17342
 
17332
- const kindOf = (cache => thing => {
17333
- const str = toString.call(thing);
17334
- return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
17343
+ const kindOf = ((cache) => (thing) => {
17344
+ const str = toString.call(thing);
17345
+ return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
17335
17346
  })(Object.create(null));
17336
17347
 
17337
17348
  const kindOfTest = (type) => {
17338
17349
  type = type.toLowerCase();
17339
- return (thing) => kindOf(thing) === type
17350
+ return (thing) => kindOf(thing) === type;
17340
17351
  };
17341
17352
 
17342
- const typeOfTest = type => thing => typeof thing === type;
17353
+ const typeOfTest = (type) => (thing) => typeof thing === type;
17343
17354
 
17344
17355
  /**
17345
- * Determine if a value is an Array
17356
+ * Determine if a value is a non-null object
17346
17357
  *
17347
17358
  * @param {Object} val The value to test
17348
17359
  *
17349
17360
  * @returns {boolean} True if value is an Array, otherwise false
17350
17361
  */
17351
- const {isArray} = Array;
17362
+ const { isArray } = Array;
17352
17363
 
17353
17364
  /**
17354
17365
  * Determine if a value is undefined
@@ -17367,8 +17378,14 @@ const isUndefined = typeOfTest('undefined');
17367
17378
  * @returns {boolean} True if value is a Buffer, otherwise false
17368
17379
  */
17369
17380
  function isBuffer(val) {
17370
- return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)
17371
- && isFunction$1(val.constructor.isBuffer) && val.constructor.isBuffer(val);
17381
+ return (
17382
+ val !== null &&
17383
+ !isUndefined(val) &&
17384
+ val.constructor !== null &&
17385
+ !isUndefined(val.constructor) &&
17386
+ isFunction$1(val.constructor.isBuffer) &&
17387
+ val.constructor.isBuffer(val)
17388
+ );
17372
17389
  }
17373
17390
 
17374
17391
  /**
@@ -17380,7 +17397,6 @@ function isBuffer(val) {
17380
17397
  */
17381
17398
  const isArrayBuffer = kindOfTest('ArrayBuffer');
17382
17399
 
17383
-
17384
17400
  /**
17385
17401
  * Determine if a value is a view on an ArrayBuffer
17386
17402
  *
@@ -17390,10 +17406,10 @@ const isArrayBuffer = kindOfTest('ArrayBuffer');
17390
17406
  */
17391
17407
  function isArrayBufferView(val) {
17392
17408
  let result;
17393
- if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
17409
+ if (typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView) {
17394
17410
  result = ArrayBuffer.isView(val);
17395
17411
  } else {
17396
- result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));
17412
+ result = val && val.buffer && isArrayBuffer(val.buffer);
17397
17413
  }
17398
17414
  return result;
17399
17415
  }
@@ -17439,7 +17455,7 @@ const isObject$1 = (thing) => thing !== null && typeof thing === 'object';
17439
17455
  * @param {*} thing The value to test
17440
17456
  * @returns {boolean} True if value is a Boolean, otherwise false
17441
17457
  */
17442
- const isBoolean = thing => thing === true || thing === false;
17458
+ const isBoolean = (thing) => thing === true || thing === false;
17443
17459
 
17444
17460
  /**
17445
17461
  * Determine if a value is a plain Object
@@ -17454,7 +17470,13 @@ const isPlainObject = (val) => {
17454
17470
  }
17455
17471
 
17456
17472
  const prototype = getPrototypeOf(val);
17457
- return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(toStringTag in val) && !(iterator in val);
17473
+ return (
17474
+ (prototype === null ||
17475
+ prototype === Object.prototype ||
17476
+ Object.getPrototypeOf(prototype) === null) &&
17477
+ !(toStringTag in val) &&
17478
+ !(iterator in val)
17479
+ );
17458
17480
  };
17459
17481
 
17460
17482
  /**
@@ -17496,6 +17518,31 @@ const isDate = kindOfTest('Date');
17496
17518
  */
17497
17519
  const isFile = kindOfTest('File');
17498
17520
 
17521
+ /**
17522
+ * Determine if a value is a React Native Blob
17523
+ * React Native "blob": an object with a `uri` attribute. Optionally, it can
17524
+ * also have a `name` and `type` attribute to specify filename and content type
17525
+ *
17526
+ * @see https://github.com/facebook/react-native/blob/26684cf3adf4094eb6c405d345a75bf8c7c0bf88/Libraries/Network/FormData.js#L68-L71
17527
+ *
17528
+ * @param {*} value The value to test
17529
+ *
17530
+ * @returns {boolean} True if value is a React Native Blob, otherwise false
17531
+ */
17532
+ const isReactNativeBlob = (value) => {
17533
+ return !!(value && typeof value.uri !== 'undefined');
17534
+ };
17535
+
17536
+ /**
17537
+ * Determine if environment is React Native
17538
+ * ReactNative `FormData` has a non-standard `getParts()` method
17539
+ *
17540
+ * @param {*} formData The formData to test
17541
+ *
17542
+ * @returns {boolean} True if environment is React Native, otherwise false
17543
+ */
17544
+ const isReactNative = (formData) => formData && typeof formData.getParts !== 'undefined';
17545
+
17499
17546
  /**
17500
17547
  * Determine if a value is a Blob
17501
17548
  *
@@ -17530,17 +17577,28 @@ const isStream = (val) => isObject$1(val) && isFunction$1(val.pipe);
17530
17577
  *
17531
17578
  * @returns {boolean} True if value is an FormData, otherwise false
17532
17579
  */
17580
+ function getGlobal() {
17581
+ if (typeof globalThis !== 'undefined') return globalThis;
17582
+ if (typeof self !== 'undefined') return self;
17583
+ if (typeof window !== 'undefined') return window;
17584
+ if (typeof global !== 'undefined') return global;
17585
+ return {};
17586
+ }
17587
+
17588
+ const G = getGlobal();
17589
+ const FormDataCtor = typeof G.FormData !== 'undefined' ? G.FormData : undefined;
17590
+
17533
17591
  const isFormData = (thing) => {
17534
17592
  let kind;
17535
17593
  return thing && (
17536
- (typeof FormData === 'function' && thing instanceof FormData) || (
17594
+ (FormDataCtor && thing instanceof FormDataCtor) || (
17537
17595
  isFunction$1(thing.append) && (
17538
17596
  (kind = kindOf(thing)) === 'formdata' ||
17539
17597
  // detect form-data instance
17540
17598
  (kind === 'object' && isFunction$1(thing.toString) && thing.toString() === '[object FormData]')
17541
17599
  )
17542
17600
  )
17543
- )
17601
+ );
17544
17602
  };
17545
17603
 
17546
17604
  /**
@@ -17552,7 +17610,12 @@ const isFormData = (thing) => {
17552
17610
  */
17553
17611
  const isURLSearchParams = kindOfTest('URLSearchParams');
17554
17612
 
17555
- const [isReadableStream, isRequest, isResponse, isHeaders] = ['ReadableStream', 'Request', 'Response', 'Headers'].map(kindOfTest);
17613
+ const [isReadableStream, isRequest, isResponse, isHeaders] = [
17614
+ 'ReadableStream',
17615
+ 'Request',
17616
+ 'Response',
17617
+ 'Headers',
17618
+ ].map(kindOfTest);
17556
17619
 
17557
17620
  /**
17558
17621
  * Trim excess whitespace off the beginning and end of a string
@@ -17561,9 +17624,9 @@ const [isReadableStream, isRequest, isResponse, isHeaders] = ['ReadableStream',
17561
17624
  *
17562
17625
  * @returns {String} The String freed of excess whitespace
17563
17626
  */
17564
- const trim = (str) => str.trim ?
17565
- str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
17566
-
17627
+ const trim = (str) => {
17628
+ return str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
17629
+ };
17567
17630
  /**
17568
17631
  * Iterate over an Array or an Object invoking a function for each item.
17569
17632
  *
@@ -17580,7 +17643,7 @@ const trim = (str) => str.trim ?
17580
17643
  * @param {Boolean} [options.allOwnKeys = false]
17581
17644
  * @returns {any}
17582
17645
  */
17583
- function forEach(obj, fn, {allOwnKeys = false} = {}) {
17646
+ function forEach(obj, fn, { allOwnKeys = false } = {}) {
17584
17647
  // Don't bother if no value provided
17585
17648
  if (obj === null || typeof obj === 'undefined') {
17586
17649
  return;
@@ -17618,8 +17681,16 @@ function forEach(obj, fn, {allOwnKeys = false} = {}) {
17618
17681
  }
17619
17682
  }
17620
17683
 
17684
+ /**
17685
+ * Finds a key in an object, case-insensitive, returning the actual key name.
17686
+ * Returns null if the object is a Buffer or if no match is found.
17687
+ *
17688
+ * @param {Object} obj - The object to search.
17689
+ * @param {string} key - The key to find (case-insensitive).
17690
+ * @returns {?string} The actual key name if found, otherwise null.
17691
+ */
17621
17692
  function findKey(obj, key) {
17622
- if (isBuffer(obj)){
17693
+ if (isBuffer(obj)) {
17623
17694
  return null;
17624
17695
  }
17625
17696
 
@@ -17638,8 +17709,8 @@ function findKey(obj, key) {
17638
17709
 
17639
17710
  const _global = (() => {
17640
17711
  /*eslint no-undef:0*/
17641
- if (typeof globalThis !== "undefined") return globalThis;
17642
- return typeof self !== "undefined" ? self : (typeof window !== 'undefined' ? window : global)
17712
+ if (typeof globalThis !== 'undefined') return globalThis;
17713
+ return typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : global;
17643
17714
  })();
17644
17715
 
17645
17716
  const isContextDefined = (context) => !isUndefined(context) && context !== _global;
@@ -17663,10 +17734,15 @@ const isContextDefined = (context) => !isUndefined(context) && context !== _glob
17663
17734
  * @returns {Object} Result of all merge properties
17664
17735
  */
17665
17736
  function merge(/* obj1, obj2, obj3, ... */) {
17666
- const {caseless, skipUndefined} = isContextDefined(this) && this || {};
17737
+ const { caseless, skipUndefined } = (isContextDefined(this) && this) || {};
17667
17738
  const result = {};
17668
17739
  const assignValue = (val, key) => {
17669
- const targetKey = caseless && findKey(result, key) || key;
17740
+ // Skip dangerous property names to prevent prototype pollution
17741
+ if (key === '__proto__' || key === 'constructor' || key === 'prototype') {
17742
+ return;
17743
+ }
17744
+
17745
+ const targetKey = (caseless && findKey(result, key)) || key;
17670
17746
  if (isPlainObject(result[targetKey]) && isPlainObject(val)) {
17671
17747
  result[targetKey] = merge(result[targetKey], val);
17672
17748
  } else if (isPlainObject(val)) {
@@ -17695,24 +17771,28 @@ function merge(/* obj1, obj2, obj3, ... */) {
17695
17771
  * @param {Boolean} [options.allOwnKeys]
17696
17772
  * @returns {Object} The resulting value of object a
17697
17773
  */
17698
- const extend = (a, b, thisArg, {allOwnKeys}= {}) => {
17699
- forEach(b, (val, key) => {
17700
- if (thisArg && isFunction$1(val)) {
17701
- Object.defineProperty(a, key, {
17702
- value: bind(val, thisArg),
17703
- writable: true,
17704
- enumerable: true,
17705
- configurable: true
17706
- });
17707
- } else {
17708
- Object.defineProperty(a, key, {
17709
- value: val,
17710
- writable: true,
17711
- enumerable: true,
17712
- configurable: true
17713
- });
17714
- }
17715
- }, {allOwnKeys});
17774
+ const extend = (a, b, thisArg, { allOwnKeys } = {}) => {
17775
+ forEach(
17776
+ b,
17777
+ (val, key) => {
17778
+ if (thisArg && isFunction$1(val)) {
17779
+ Object.defineProperty(a, key, {
17780
+ value: bind(val, thisArg),
17781
+ writable: true,
17782
+ enumerable: true,
17783
+ configurable: true,
17784
+ });
17785
+ } else {
17786
+ Object.defineProperty(a, key, {
17787
+ value: val,
17788
+ writable: true,
17789
+ enumerable: true,
17790
+ configurable: true,
17791
+ });
17792
+ }
17793
+ },
17794
+ { allOwnKeys }
17795
+ );
17716
17796
  return a;
17717
17797
  };
17718
17798
 
@@ -17724,7 +17804,7 @@ const extend = (a, b, thisArg, {allOwnKeys}= {}) => {
17724
17804
  * @returns {string} content value without BOM
17725
17805
  */
17726
17806
  const stripBOM = (content) => {
17727
- if (content.charCodeAt(0) === 0xFEFF) {
17807
+ if (content.charCodeAt(0) === 0xfeff) {
17728
17808
  content = content.slice(1);
17729
17809
  }
17730
17810
  return content;
@@ -17745,10 +17825,10 @@ const inherits = (constructor, superConstructor, props, descriptors) => {
17745
17825
  value: constructor,
17746
17826
  writable: true,
17747
17827
  enumerable: false,
17748
- configurable: true
17828
+ configurable: true,
17749
17829
  });
17750
17830
  Object.defineProperty(constructor, 'super', {
17751
- value: superConstructor.prototype
17831
+ value: superConstructor.prototype,
17752
17832
  });
17753
17833
  props && Object.assign(constructor.prototype, props);
17754
17834
  };
@@ -17807,7 +17887,6 @@ const endsWith = (str, searchString, position) => {
17807
17887
  return lastIndex !== -1 && lastIndex === position;
17808
17888
  };
17809
17889
 
17810
-
17811
17890
  /**
17812
17891
  * Returns new array from array like object or null if failed
17813
17892
  *
@@ -17836,9 +17915,9 @@ const toArray = (thing) => {
17836
17915
  * @returns {Array}
17837
17916
  */
17838
17917
  // eslint-disable-next-line func-names
17839
- const isTypedArray = (TypedArray => {
17918
+ const isTypedArray = ((TypedArray) => {
17840
17919
  // eslint-disable-next-line func-names
17841
- return thing => {
17920
+ return (thing) => {
17842
17921
  return TypedArray && thing instanceof TypedArray;
17843
17922
  };
17844
17923
  })(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));
@@ -17886,16 +17965,18 @@ const matchAll = (regExp, str) => {
17886
17965
  /* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */
17887
17966
  const isHTMLForm = kindOfTest('HTMLFormElement');
17888
17967
 
17889
- const toCamelCase = str => {
17890
- return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,
17891
- function replacer(m, p1, p2) {
17892
- return p1.toUpperCase() + p2;
17893
- }
17894
- );
17968
+ const toCamelCase = (str) => {
17969
+ return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function replacer(m, p1, p2) {
17970
+ return p1.toUpperCase() + p2;
17971
+ });
17895
17972
  };
17896
17973
 
17897
17974
  /* Creating a function that will check if an object has a property. */
17898
- const hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);
17975
+ const hasOwnProperty = (
17976
+ ({ hasOwnProperty }) =>
17977
+ (obj, prop) =>
17978
+ hasOwnProperty.call(obj, prop)
17979
+ )(Object.prototype);
17899
17980
 
17900
17981
  /**
17901
17982
  * Determine if a value is a RegExp object
@@ -17945,17 +18026,25 @@ const freezeMethods = (obj) => {
17945
18026
 
17946
18027
  if (!descriptor.set) {
17947
18028
  descriptor.set = () => {
17948
- throw Error('Can not rewrite read-only method \'' + name + '\'');
18029
+ throw Error("Can not rewrite read-only method '" + name + "'");
17949
18030
  };
17950
18031
  }
17951
18032
  });
17952
18033
  };
17953
18034
 
18035
+ /**
18036
+ * Converts an array or a delimited string into an object set with values as keys and true as values.
18037
+ * Useful for fast membership checks.
18038
+ *
18039
+ * @param {Array|string} arrayOrString - The array or string to convert.
18040
+ * @param {string} delimiter - The delimiter to use if input is a string.
18041
+ * @returns {Object} An object with keys from the array or string, values set to true.
18042
+ */
17954
18043
  const toObjectSet = (arrayOrString, delimiter) => {
17955
18044
  const obj = {};
17956
18045
 
17957
18046
  const define = (arr) => {
17958
- arr.forEach(value => {
18047
+ arr.forEach((value) => {
17959
18048
  obj[value] = true;
17960
18049
  });
17961
18050
  };
@@ -17968,11 +18057,9 @@ const toObjectSet = (arrayOrString, delimiter) => {
17968
18057
  const noop = () => {};
17969
18058
 
17970
18059
  const toFiniteNumber = (value, defaultValue) => {
17971
- return value != null && Number.isFinite(value = +value) ? value : defaultValue;
18060
+ return value != null && Number.isFinite((value = +value)) ? value : defaultValue;
17972
18061
  };
17973
18062
 
17974
-
17975
-
17976
18063
  /**
17977
18064
  * If the thing is a FormData object, return true, otherwise return false.
17978
18065
  *
@@ -17981,14 +18068,24 @@ const toFiniteNumber = (value, defaultValue) => {
17981
18068
  * @returns {boolean}
17982
18069
  */
17983
18070
  function isSpecCompliantForm(thing) {
17984
- return !!(thing && isFunction$1(thing.append) && thing[toStringTag] === 'FormData' && thing[iterator]);
18071
+ return !!(
18072
+ thing &&
18073
+ isFunction$1(thing.append) &&
18074
+ thing[toStringTag] === 'FormData' &&
18075
+ thing[iterator]
18076
+ );
17985
18077
  }
17986
18078
 
18079
+ /**
18080
+ * Recursively converts an object to a JSON-compatible object, handling circular references and Buffers.
18081
+ *
18082
+ * @param {Object} obj - The object to convert.
18083
+ * @returns {Object} The JSON-compatible object.
18084
+ */
17987
18085
  const toJSONObject = (obj) => {
17988
18086
  const stack = new Array(10);
17989
18087
 
17990
18088
  const visit = (source, i) => {
17991
-
17992
18089
  if (isObject$1(source)) {
17993
18090
  if (stack.indexOf(source) >= 0) {
17994
18091
  return;
@@ -17999,7 +18096,7 @@ const toJSONObject = (obj) => {
17999
18096
  return source;
18000
18097
  }
18001
18098
 
18002
- if(!('toJSON' in source)) {
18099
+ if (!('toJSON' in source)) {
18003
18100
  stack[i] = source;
18004
18101
  const target = isArray(source) ? [] : {};
18005
18102
 
@@ -18020,45 +18117,77 @@ const toJSONObject = (obj) => {
18020
18117
  return visit(obj, 0);
18021
18118
  };
18022
18119
 
18120
+ /**
18121
+ * Determines if a value is an async function.
18122
+ *
18123
+ * @param {*} thing - The value to test.
18124
+ * @returns {boolean} True if value is an async function, otherwise false.
18125
+ */
18023
18126
  const isAsyncFn = kindOfTest('AsyncFunction');
18024
18127
 
18128
+ /**
18129
+ * Determines if a value is thenable (has then and catch methods).
18130
+ *
18131
+ * @param {*} thing - The value to test.
18132
+ * @returns {boolean} True if value is thenable, otherwise false.
18133
+ */
18025
18134
  const isThenable = (thing) =>
18026
- thing && (isObject$1(thing) || isFunction$1(thing)) && isFunction$1(thing.then) && isFunction$1(thing.catch);
18135
+ thing &&
18136
+ (isObject$1(thing) || isFunction$1(thing)) &&
18137
+ isFunction$1(thing.then) &&
18138
+ isFunction$1(thing.catch);
18027
18139
 
18028
18140
  // original code
18029
18141
  // https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34
18030
18142
 
18143
+ /**
18144
+ * Provides a cross-platform setImmediate implementation.
18145
+ * Uses native setImmediate if available, otherwise falls back to postMessage or setTimeout.
18146
+ *
18147
+ * @param {boolean} setImmediateSupported - Whether setImmediate is supported.
18148
+ * @param {boolean} postMessageSupported - Whether postMessage is supported.
18149
+ * @returns {Function} A function to schedule a callback asynchronously.
18150
+ */
18031
18151
  const _setImmediate = ((setImmediateSupported, postMessageSupported) => {
18032
18152
  if (setImmediateSupported) {
18033
18153
  return setImmediate;
18034
18154
  }
18035
18155
 
18036
- return postMessageSupported ? ((token, callbacks) => {
18037
- _global.addEventListener("message", ({source, data}) => {
18038
- if (source === _global && data === token) {
18039
- callbacks.length && callbacks.shift()();
18040
- }
18041
- }, false);
18156
+ return postMessageSupported
18157
+ ? ((token, callbacks) => {
18158
+ _global.addEventListener(
18159
+ 'message',
18160
+ ({ source, data }) => {
18161
+ if (source === _global && data === token) {
18162
+ callbacks.length && callbacks.shift()();
18163
+ }
18164
+ },
18165
+ false
18166
+ );
18042
18167
 
18043
- return (cb) => {
18044
- callbacks.push(cb);
18045
- _global.postMessage(token, "*");
18046
- }
18047
- })(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);
18048
- })(
18049
- typeof setImmediate === 'function',
18050
- isFunction$1(_global.postMessage)
18051
- );
18168
+ return (cb) => {
18169
+ callbacks.push(cb);
18170
+ _global.postMessage(token, '*');
18171
+ };
18172
+ })(`axios@${Math.random()}`, [])
18173
+ : (cb) => setTimeout(cb);
18174
+ })(typeof setImmediate === 'function', isFunction$1(_global.postMessage));
18052
18175
 
18053
- const asap = typeof queueMicrotask !== 'undefined' ?
18054
- queueMicrotask.bind(_global) : ( typeof process !== 'undefined' && process.nextTick || _setImmediate);
18176
+ /**
18177
+ * Schedules a microtask or asynchronous callback as soon as possible.
18178
+ * Uses queueMicrotask if available, otherwise falls back to process.nextTick or _setImmediate.
18179
+ *
18180
+ * @type {Function}
18181
+ */
18182
+ const asap =
18183
+ typeof queueMicrotask !== 'undefined'
18184
+ ? queueMicrotask.bind(_global)
18185
+ : (typeof process !== 'undefined' && process.nextTick) || _setImmediate;
18055
18186
 
18056
18187
  // *********************
18057
18188
 
18058
-
18059
18189
  const isIterable = (thing) => thing != null && isFunction$1(thing[iterator]);
18060
18190
 
18061
-
18062
18191
  var utils$1 = {
18063
18192
  isArray,
18064
18193
  isArrayBuffer,
@@ -18078,6 +18207,8 @@ var utils$1 = {
18078
18207
  isUndefined,
18079
18208
  isDate,
18080
18209
  isFile,
18210
+ isReactNativeBlob,
18211
+ isReactNative,
18081
18212
  isBlob,
18082
18213
  isRegExp,
18083
18214
  isFunction: isFunction$1,
@@ -18116,18 +18247,24 @@ var utils$1 = {
18116
18247
  isThenable,
18117
18248
  setImmediate: _setImmediate,
18118
18249
  asap,
18119
- isIterable
18250
+ isIterable,
18120
18251
  };
18121
18252
 
18122
18253
  class AxiosError extends Error {
18123
- static from(error, code, config, request, response, customProps) {
18124
- const axiosError = new AxiosError(error.message, code || error.code, config, request, response);
18125
- axiosError.cause = error;
18126
- axiosError.name = error.name;
18127
- customProps && Object.assign(axiosError, customProps);
18128
- return axiosError;
18254
+ static from(error, code, config, request, response, customProps) {
18255
+ const axiosError = new AxiosError(error.message, code || error.code, config, request, response);
18256
+ axiosError.cause = error;
18257
+ axiosError.name = error.name;
18258
+
18259
+ // Preserve status from the original error if not already set from response
18260
+ if (error.status != null && axiosError.status == null) {
18261
+ axiosError.status = error.status;
18129
18262
  }
18130
18263
 
18264
+ customProps && Object.assign(axiosError, customProps);
18265
+ return axiosError;
18266
+ }
18267
+
18131
18268
  /**
18132
18269
  * Create an Error with the specified message, config, error code, request and response.
18133
18270
  *
@@ -18140,37 +18277,48 @@ class AxiosError extends Error {
18140
18277
  * @returns {Error} The created error.
18141
18278
  */
18142
18279
  constructor(message, code, config, request, response) {
18143
- super(message);
18144
- this.name = 'AxiosError';
18145
- this.isAxiosError = true;
18146
- code && (this.code = code);
18147
- config && (this.config = config);
18148
- request && (this.request = request);
18149
- if (response) {
18150
- this.response = response;
18151
- this.status = response.status;
18152
- }
18280
+ super(message);
18281
+
18282
+ // Make message enumerable to maintain backward compatibility
18283
+ // The native Error constructor sets message as non-enumerable,
18284
+ // but axios < v1.13.3 had it as enumerable
18285
+ Object.defineProperty(this, 'message', {
18286
+ value: message,
18287
+ enumerable: true,
18288
+ writable: true,
18289
+ configurable: true
18290
+ });
18291
+
18292
+ this.name = 'AxiosError';
18293
+ this.isAxiosError = true;
18294
+ code && (this.code = code);
18295
+ config && (this.config = config);
18296
+ request && (this.request = request);
18297
+ if (response) {
18298
+ this.response = response;
18299
+ this.status = response.status;
18300
+ }
18153
18301
  }
18154
18302
 
18155
- toJSON() {
18156
- return {
18157
- // Standard
18158
- message: this.message,
18159
- name: this.name,
18160
- // Microsoft
18161
- description: this.description,
18162
- number: this.number,
18163
- // Mozilla
18164
- fileName: this.fileName,
18165
- lineNumber: this.lineNumber,
18166
- columnNumber: this.columnNumber,
18167
- stack: this.stack,
18168
- // Axios
18169
- config: utils$1.toJSONObject(this.config),
18170
- code: this.code,
18171
- status: this.status,
18172
- };
18173
- }
18303
+ toJSON() {
18304
+ return {
18305
+ // Standard
18306
+ message: this.message,
18307
+ name: this.name,
18308
+ // Microsoft
18309
+ description: this.description,
18310
+ number: this.number,
18311
+ // Mozilla
18312
+ fileName: this.fileName,
18313
+ lineNumber: this.lineNumber,
18314
+ columnNumber: this.columnNumber,
18315
+ stack: this.stack,
18316
+ // Axios
18317
+ config: utils$1.toJSONObject(this.config),
18318
+ code: this.code,
18319
+ status: this.status,
18320
+ };
18321
+ }
18174
18322
  }
18175
18323
 
18176
18324
  // This can be changed to static properties as soon as the parser options in .eslint.cjs are updated.
@@ -18225,11 +18373,14 @@ function removeBrackets(key) {
18225
18373
  */
18226
18374
  function renderKey(path, key, dots) {
18227
18375
  if (!path) return key;
18228
- return path.concat(key).map(function each(token, i) {
18229
- // eslint-disable-next-line no-param-reassign
18230
- token = removeBrackets(token);
18231
- return !dots && i ? '[' + token + ']' : token;
18232
- }).join(dots ? '.' : '');
18376
+ return path
18377
+ .concat(key)
18378
+ .map(function each(token, i) {
18379
+ // eslint-disable-next-line no-param-reassign
18380
+ token = removeBrackets(token);
18381
+ return !dots && i ? '[' + token + ']' : token;
18382
+ })
18383
+ .join(dots ? '.' : '');
18233
18384
  }
18234
18385
 
18235
18386
  /**
@@ -18279,21 +18430,26 @@ function toFormData(obj, formData, options) {
18279
18430
  formData = formData || new (FormData)();
18280
18431
 
18281
18432
  // eslint-disable-next-line no-param-reassign
18282
- options = utils$1.toFlatObject(options, {
18283
- metaTokens: true,
18284
- dots: false,
18285
- indexes: false
18286
- }, false, function defined(option, source) {
18287
- // eslint-disable-next-line no-eq-null,eqeqeq
18288
- return !utils$1.isUndefined(source[option]);
18289
- });
18433
+ options = utils$1.toFlatObject(
18434
+ options,
18435
+ {
18436
+ metaTokens: true,
18437
+ dots: false,
18438
+ indexes: false,
18439
+ },
18440
+ false,
18441
+ function defined(option, source) {
18442
+ // eslint-disable-next-line no-eq-null,eqeqeq
18443
+ return !utils$1.isUndefined(source[option]);
18444
+ }
18445
+ );
18290
18446
 
18291
18447
  const metaTokens = options.metaTokens;
18292
18448
  // eslint-disable-next-line no-use-before-define
18293
18449
  const visitor = options.visitor || defaultVisitor;
18294
18450
  const dots = options.dots;
18295
18451
  const indexes = options.indexes;
18296
- const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;
18452
+ const _Blob = options.Blob || (typeof Blob !== 'undefined' && Blob);
18297
18453
  const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);
18298
18454
 
18299
18455
  if (!utils$1.isFunction(visitor)) {
@@ -18335,6 +18491,11 @@ function toFormData(obj, formData, options) {
18335
18491
  function defaultVisitor(value, key, path) {
18336
18492
  let arr = value;
18337
18493
 
18494
+ if (utils$1.isReactNative(formData) && utils$1.isReactNativeBlob(value)) {
18495
+ formData.append(renderKey(path, key, dots), convertValue(value));
18496
+ return false;
18497
+ }
18498
+
18338
18499
  if (value && !path && typeof value === 'object') {
18339
18500
  if (utils$1.endsWith(key, '{}')) {
18340
18501
  // eslint-disable-next-line no-param-reassign
@@ -18343,17 +18504,22 @@ function toFormData(obj, formData, options) {
18343
18504
  value = JSON.stringify(value);
18344
18505
  } else if (
18345
18506
  (utils$1.isArray(value) && isFlatArray(value)) ||
18346
- ((utils$1.isFileList(value) || utils$1.endsWith(key, '[]')) && (arr = utils$1.toArray(value))
18347
- )) {
18507
+ ((utils$1.isFileList(value) || utils$1.endsWith(key, '[]')) && (arr = utils$1.toArray(value)))
18508
+ ) {
18348
18509
  // eslint-disable-next-line no-param-reassign
18349
18510
  key = removeBrackets(key);
18350
18511
 
18351
18512
  arr.forEach(function each(el, index) {
18352
- !(utils$1.isUndefined(el) || el === null) && formData.append(
18353
- // eslint-disable-next-line no-nested-ternary
18354
- indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),
18355
- convertValue(el)
18356
- );
18513
+ !(utils$1.isUndefined(el) || el === null) &&
18514
+ formData.append(
18515
+ // eslint-disable-next-line no-nested-ternary
18516
+ indexes === true
18517
+ ? renderKey([key], index, dots)
18518
+ : indexes === null
18519
+ ? key
18520
+ : key + '[]',
18521
+ convertValue(el)
18522
+ );
18357
18523
  });
18358
18524
  return false;
18359
18525
  }
@@ -18373,7 +18539,7 @@ function toFormData(obj, formData, options) {
18373
18539
  const exposedHelpers = Object.assign(predicates, {
18374
18540
  defaultVisitor,
18375
18541
  convertValue,
18376
- isVisitable
18542
+ isVisitable,
18377
18543
  });
18378
18544
 
18379
18545
  function build(value, path) {
@@ -18386,9 +18552,9 @@ function toFormData(obj, formData, options) {
18386
18552
  stack.push(value);
18387
18553
 
18388
18554
  utils$1.forEach(value, function each(el, key) {
18389
- const result = !(utils$1.isUndefined(el) || el === null) && visitor.call(
18390
- formData, el, utils$1.isString(key) ? key.trim() : key, path, exposedHelpers
18391
- );
18555
+ const result =
18556
+ !(utils$1.isUndefined(el) || el === null) &&
18557
+ visitor.call(formData, el, utils$1.isString(key) ? key.trim() : key, path, exposedHelpers);
18392
18558
 
18393
18559
  if (result === true) {
18394
18560
  build(el, path ? path.concat(key) : [key]);
@@ -18423,7 +18589,7 @@ function encode$1(str) {
18423
18589
  ')': '%29',
18424
18590
  '~': '%7E',
18425
18591
  '%20': '+',
18426
- '%00': '\x00'
18592
+ '%00': '\x00',
18427
18593
  };
18428
18594
  return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {
18429
18595
  return charMap[match];
@@ -18451,29 +18617,33 @@ prototype.append = function append(name, value) {
18451
18617
  };
18452
18618
 
18453
18619
  prototype.toString = function toString(encoder) {
18454
- const _encode = encoder ? function(value) {
18455
- return encoder.call(this, value, encode$1);
18456
- } : encode$1;
18620
+ const _encode = encoder
18621
+ ? function (value) {
18622
+ return encoder.call(this, value, encode$1);
18623
+ }
18624
+ : encode$1;
18457
18625
 
18458
- return this._pairs.map(function each(pair) {
18459
- return _encode(pair[0]) + '=' + _encode(pair[1]);
18460
- }, '').join('&');
18626
+ return this._pairs
18627
+ .map(function each(pair) {
18628
+ return _encode(pair[0]) + '=' + _encode(pair[1]);
18629
+ }, '')
18630
+ .join('&');
18461
18631
  };
18462
18632
 
18463
18633
  /**
18464
- * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their
18465
- * URI encoded counterparts
18634
+ * It replaces URL-encoded forms of `:`, `$`, `,`, and spaces with
18635
+ * their plain counterparts (`:`, `$`, `,`, `+`).
18466
18636
  *
18467
18637
  * @param {string} val The value to be encoded.
18468
18638
  *
18469
18639
  * @returns {string} The encoded value.
18470
18640
  */
18471
18641
  function encode(val) {
18472
- return encodeURIComponent(val).
18473
- replace(/%3A/gi, ':').
18474
- replace(/%24/g, '$').
18475
- replace(/%2C/gi, ',').
18476
- replace(/%20/g, '+');
18642
+ return encodeURIComponent(val)
18643
+ .replace(/%3A/gi, ':')
18644
+ .replace(/%24/g, '$')
18645
+ .replace(/%2C/gi, ',')
18646
+ .replace(/%20/g, '+');
18477
18647
  }
18478
18648
 
18479
18649
  /**
@@ -18490,11 +18660,13 @@ function buildURL(url, params, options) {
18490
18660
  return url;
18491
18661
  }
18492
18662
 
18493
- const _encode = options && options.encode || encode;
18663
+ const _encode = (options && options.encode) || encode;
18494
18664
 
18495
- const _options = utils$1.isFunction(options) ? {
18496
- serialize: options
18497
- } : options;
18665
+ const _options = utils$1.isFunction(options)
18666
+ ? {
18667
+ serialize: options,
18668
+ }
18669
+ : options;
18498
18670
 
18499
18671
  const serializeFn = _options && _options.serialize;
18500
18672
 
@@ -18503,13 +18675,13 @@ function buildURL(url, params, options) {
18503
18675
  if (serializeFn) {
18504
18676
  serializedParams = serializeFn(params, _options);
18505
18677
  } else {
18506
- serializedParams = utils$1.isURLSearchParams(params) ?
18507
- params.toString() :
18508
- new AxiosURLSearchParams(params, _options).toString(_encode);
18678
+ serializedParams = utils$1.isURLSearchParams(params)
18679
+ ? params.toString()
18680
+ : new AxiosURLSearchParams(params, _options).toString(_encode);
18509
18681
  }
18510
18682
 
18511
18683
  if (serializedParams) {
18512
- const hashmarkIndex = url.indexOf("#");
18684
+ const hashmarkIndex = url.indexOf('#');
18513
18685
 
18514
18686
  if (hashmarkIndex !== -1) {
18515
18687
  url = url.slice(0, hashmarkIndex);
@@ -18539,7 +18711,7 @@ class InterceptorManager {
18539
18711
  fulfilled,
18540
18712
  rejected,
18541
18713
  synchronous: options ? options.synchronous : false,
18542
- runWhen: options ? options.runWhen : null
18714
+ runWhen: options ? options.runWhen : null,
18543
18715
  });
18544
18716
  return this.handlers.length - 1;
18545
18717
  }
@@ -18592,7 +18764,8 @@ var InterceptorManager$1 = InterceptorManager;
18592
18764
  var transitionalDefaults = {
18593
18765
  silentJSONParsing: true,
18594
18766
  forcedJSONParsing: true,
18595
- clarifyTimeoutError: false
18767
+ clarifyTimeoutError: false,
18768
+ legacyInterceptorReqResOrdering: true,
18596
18769
  };
18597
18770
 
18598
18771
  var URLSearchParams$1 = typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;
@@ -18606,14 +18779,14 @@ var platform$1 = {
18606
18779
  classes: {
18607
18780
  URLSearchParams: URLSearchParams$1,
18608
18781
  FormData: FormData$1,
18609
- Blob: Blob$1
18782
+ Blob: Blob$1,
18610
18783
  },
18611
- protocols: ['http', 'https', 'file', 'blob', 'url', 'data']
18784
+ protocols: ['http', 'https', 'file', 'blob', 'url', 'data'],
18612
18785
  };
18613
18786
 
18614
18787
  const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';
18615
18788
 
18616
- const _navigator = typeof navigator === 'object' && navigator || undefined;
18789
+ const _navigator = (typeof navigator === 'object' && navigator) || undefined;
18617
18790
 
18618
18791
  /**
18619
18792
  * Determine if we're running in a standard browser environment
@@ -18632,7 +18805,8 @@ const _navigator = typeof navigator === 'object' && navigator || undefined;
18632
18805
  *
18633
18806
  * @returns {boolean}
18634
18807
  */
18635
- const hasStandardBrowserEnv = hasBrowserEnv &&
18808
+ const hasStandardBrowserEnv =
18809
+ hasBrowserEnv &&
18636
18810
  (!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0);
18637
18811
 
18638
18812
  /**
@@ -18653,7 +18827,7 @@ const hasStandardBrowserWebWorkerEnv = (() => {
18653
18827
  );
18654
18828
  })();
18655
18829
 
18656
- const origin = hasBrowserEnv && window.location.href || 'http://localhost';
18830
+ const origin = (hasBrowserEnv && window.location.href) || 'http://localhost';
18657
18831
 
18658
18832
  var utils = /*#__PURE__*/Object.freeze({
18659
18833
  __proto__: null,
@@ -18666,12 +18840,12 @@ var utils = /*#__PURE__*/Object.freeze({
18666
18840
 
18667
18841
  var platform = {
18668
18842
  ...utils,
18669
- ...platform$1
18843
+ ...platform$1,
18670
18844
  };
18671
18845
 
18672
18846
  function toURLEncodedForm(data, options) {
18673
18847
  return toFormData(data, new platform.classes.URLSearchParams(), {
18674
- visitor: function(value, key, path, helpers) {
18848
+ visitor: function (value, key, path, helpers) {
18675
18849
  if (platform.isNode && utils$1.isBuffer(value)) {
18676
18850
  this.append(key, value.toString('base64'));
18677
18851
  return false;
@@ -18679,7 +18853,7 @@ function toURLEncodedForm(data, options) {
18679
18853
 
18680
18854
  return helpers.defaultVisitor.apply(this, arguments);
18681
18855
  },
18682
- ...options
18856
+ ...options,
18683
18857
  });
18684
18858
  }
18685
18859
 
@@ -18695,7 +18869,7 @@ function parsePropPath(name) {
18695
18869
  // foo.x.y.z
18696
18870
  // foo-x-y-z
18697
18871
  // foo x y z
18698
- return utils$1.matchAll(/\w+|\[(\w*)]/g, name).map(match => {
18872
+ return utils$1.matchAll(/\w+|\[(\w*)]/g, name).map((match) => {
18699
18873
  return match[0] === '[]' ? '' : match[1] || match[0];
18700
18874
  });
18701
18875
  }
@@ -18799,96 +18973,107 @@ function stringifySafely(rawValue, parser, encoder) {
18799
18973
  }
18800
18974
 
18801
18975
  const defaults = {
18802
-
18803
18976
  transitional: transitionalDefaults,
18804
18977
 
18805
18978
  adapter: ['xhr', 'http', 'fetch'],
18806
18979
 
18807
- transformRequest: [function transformRequest(data, headers) {
18808
- const contentType = headers.getContentType() || '';
18809
- const hasJSONContentType = contentType.indexOf('application/json') > -1;
18810
- const isObjectPayload = utils$1.isObject(data);
18980
+ transformRequest: [
18981
+ function transformRequest(data, headers) {
18982
+ const contentType = headers.getContentType() || '';
18983
+ const hasJSONContentType = contentType.indexOf('application/json') > -1;
18984
+ const isObjectPayload = utils$1.isObject(data);
18811
18985
 
18812
- if (isObjectPayload && utils$1.isHTMLForm(data)) {
18813
- data = new FormData(data);
18814
- }
18986
+ if (isObjectPayload && utils$1.isHTMLForm(data)) {
18987
+ data = new FormData(data);
18988
+ }
18815
18989
 
18816
- const isFormData = utils$1.isFormData(data);
18990
+ const isFormData = utils$1.isFormData(data);
18817
18991
 
18818
- if (isFormData) {
18819
- return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
18820
- }
18992
+ if (isFormData) {
18993
+ return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
18994
+ }
18821
18995
 
18822
- if (utils$1.isArrayBuffer(data) ||
18823
- utils$1.isBuffer(data) ||
18824
- utils$1.isStream(data) ||
18825
- utils$1.isFile(data) ||
18826
- utils$1.isBlob(data) ||
18827
- utils$1.isReadableStream(data)
18828
- ) {
18829
- return data;
18830
- }
18831
- if (utils$1.isArrayBufferView(data)) {
18832
- return data.buffer;
18833
- }
18834
- if (utils$1.isURLSearchParams(data)) {
18835
- headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);
18836
- return data.toString();
18837
- }
18996
+ if (
18997
+ utils$1.isArrayBuffer(data) ||
18998
+ utils$1.isBuffer(data) ||
18999
+ utils$1.isStream(data) ||
19000
+ utils$1.isFile(data) ||
19001
+ utils$1.isBlob(data) ||
19002
+ utils$1.isReadableStream(data)
19003
+ ) {
19004
+ return data;
19005
+ }
19006
+ if (utils$1.isArrayBufferView(data)) {
19007
+ return data.buffer;
19008
+ }
19009
+ if (utils$1.isURLSearchParams(data)) {
19010
+ headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);
19011
+ return data.toString();
19012
+ }
18838
19013
 
18839
- let isFileList;
19014
+ let isFileList;
18840
19015
 
18841
- if (isObjectPayload) {
18842
- if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {
18843
- return toURLEncodedForm(data, this.formSerializer).toString();
18844
- }
19016
+ if (isObjectPayload) {
19017
+ if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {
19018
+ return toURLEncodedForm(data, this.formSerializer).toString();
19019
+ }
18845
19020
 
18846
- if ((isFileList = utils$1.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {
18847
- const _FormData = this.env && this.env.FormData;
19021
+ if (
19022
+ (isFileList = utils$1.isFileList(data)) ||
19023
+ contentType.indexOf('multipart/form-data') > -1
19024
+ ) {
19025
+ const _FormData = this.env && this.env.FormData;
18848
19026
 
18849
- return toFormData(
18850
- isFileList ? {'files[]': data} : data,
18851
- _FormData && new _FormData(),
18852
- this.formSerializer
18853
- );
19027
+ return toFormData(
19028
+ isFileList ? { 'files[]': data } : data,
19029
+ _FormData && new _FormData(),
19030
+ this.formSerializer
19031
+ );
19032
+ }
18854
19033
  }
18855
- }
18856
19034
 
18857
- if (isObjectPayload || hasJSONContentType ) {
18858
- headers.setContentType('application/json', false);
18859
- return stringifySafely(data);
18860
- }
19035
+ if (isObjectPayload || hasJSONContentType) {
19036
+ headers.setContentType('application/json', false);
19037
+ return stringifySafely(data);
19038
+ }
18861
19039
 
18862
- return data;
18863
- }],
19040
+ return data;
19041
+ },
19042
+ ],
18864
19043
 
18865
- transformResponse: [function transformResponse(data) {
18866
- const transitional = this.transitional || defaults.transitional;
18867
- const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
18868
- const JSONRequested = this.responseType === 'json';
19044
+ transformResponse: [
19045
+ function transformResponse(data) {
19046
+ const transitional = this.transitional || defaults.transitional;
19047
+ const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
19048
+ const JSONRequested = this.responseType === 'json';
18869
19049
 
18870
- if (utils$1.isResponse(data) || utils$1.isReadableStream(data)) {
18871
- return data;
18872
- }
19050
+ if (utils$1.isResponse(data) || utils$1.isReadableStream(data)) {
19051
+ return data;
19052
+ }
18873
19053
 
18874
- if (data && utils$1.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {
18875
- const silentJSONParsing = transitional && transitional.silentJSONParsing;
18876
- const strictJSONParsing = !silentJSONParsing && JSONRequested;
19054
+ if (
19055
+ data &&
19056
+ utils$1.isString(data) &&
19057
+ ((forcedJSONParsing && !this.responseType) || JSONRequested)
19058
+ ) {
19059
+ const silentJSONParsing = transitional && transitional.silentJSONParsing;
19060
+ const strictJSONParsing = !silentJSONParsing && JSONRequested;
18877
19061
 
18878
- try {
18879
- return JSON.parse(data, this.parseReviver);
18880
- } catch (e) {
18881
- if (strictJSONParsing) {
18882
- if (e.name === 'SyntaxError') {
18883
- throw AxiosError$1.from(e, AxiosError$1.ERR_BAD_RESPONSE, this, null, this.response);
19062
+ try {
19063
+ return JSON.parse(data, this.parseReviver);
19064
+ } catch (e) {
19065
+ if (strictJSONParsing) {
19066
+ if (e.name === 'SyntaxError') {
19067
+ throw AxiosError$1.from(e, AxiosError$1.ERR_BAD_RESPONSE, this, null, this.response);
19068
+ }
19069
+ throw e;
18884
19070
  }
18885
- throw e;
18886
19071
  }
18887
19072
  }
18888
- }
18889
19073
 
18890
- return data;
18891
- }],
19074
+ return data;
19075
+ },
19076
+ ],
18892
19077
 
18893
19078
  /**
18894
19079
  * A timeout in milliseconds to abort a request. If set to 0 (default) a
@@ -18904,7 +19089,7 @@ const defaults = {
18904
19089
 
18905
19090
  env: {
18906
19091
  FormData: platform.classes.FormData,
18907
- Blob: platform.classes.Blob
19092
+ Blob: platform.classes.Blob,
18908
19093
  },
18909
19094
 
18910
19095
  validateStatus: function validateStatus(status) {
@@ -18913,10 +19098,10 @@ const defaults = {
18913
19098
 
18914
19099
  headers: {
18915
19100
  common: {
18916
- 'Accept': 'application/json, text/plain, */*',
18917
- 'Content-Type': undefined
18918
- }
18919
- }
19101
+ Accept: 'application/json, text/plain, */*',
19102
+ 'Content-Type': undefined,
19103
+ },
19104
+ },
18920
19105
  };
18921
19106
 
18922
19107
  utils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {
@@ -18928,10 +19113,23 @@ var defaults$1 = defaults;
18928
19113
  // RawAxiosHeaders whose duplicates are ignored by node
18929
19114
  // c.f. https://nodejs.org/api/http.html#http_message_headers
18930
19115
  const ignoreDuplicateOf = utils$1.toObjectSet([
18931
- 'age', 'authorization', 'content-length', 'content-type', 'etag',
18932
- 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',
18933
- 'last-modified', 'location', 'max-forwards', 'proxy-authorization',
18934
- 'referer', 'retry-after', 'user-agent'
19116
+ 'age',
19117
+ 'authorization',
19118
+ 'content-length',
19119
+ 'content-type',
19120
+ 'etag',
19121
+ 'expires',
19122
+ 'from',
19123
+ 'host',
19124
+ 'if-modified-since',
19125
+ 'if-unmodified-since',
19126
+ 'last-modified',
19127
+ 'location',
19128
+ 'max-forwards',
19129
+ 'proxy-authorization',
19130
+ 'referer',
19131
+ 'retry-after',
19132
+ 'user-agent',
18935
19133
  ]);
18936
19134
 
18937
19135
  /**
@@ -18948,47 +19146,81 @@ const ignoreDuplicateOf = utils$1.toObjectSet([
18948
19146
  *
18949
19147
  * @returns {Object} Headers parsed into an object
18950
19148
  */
18951
- var parseHeaders = rawHeaders => {
19149
+ var parseHeaders = (rawHeaders) => {
18952
19150
  const parsed = {};
18953
19151
  let key;
18954
19152
  let val;
18955
19153
  let i;
18956
19154
 
18957
- rawHeaders && rawHeaders.split('\n').forEach(function parser(line) {
18958
- i = line.indexOf(':');
18959
- key = line.substring(0, i).trim().toLowerCase();
18960
- val = line.substring(i + 1).trim();
19155
+ rawHeaders &&
19156
+ rawHeaders.split('\n').forEach(function parser(line) {
19157
+ i = line.indexOf(':');
19158
+ key = line.substring(0, i).trim().toLowerCase();
19159
+ val = line.substring(i + 1).trim();
18961
19160
 
18962
- if (!key || (parsed[key] && ignoreDuplicateOf[key])) {
18963
- return;
18964
- }
19161
+ if (!key || (parsed[key] && ignoreDuplicateOf[key])) {
19162
+ return;
19163
+ }
18965
19164
 
18966
- if (key === 'set-cookie') {
18967
- if (parsed[key]) {
18968
- parsed[key].push(val);
19165
+ if (key === 'set-cookie') {
19166
+ if (parsed[key]) {
19167
+ parsed[key].push(val);
19168
+ } else {
19169
+ parsed[key] = [val];
19170
+ }
18969
19171
  } else {
18970
- parsed[key] = [val];
19172
+ parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
18971
19173
  }
18972
- } else {
18973
- parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
18974
- }
18975
- });
19174
+ });
18976
19175
 
18977
19176
  return parsed;
18978
19177
  };
18979
19178
 
18980
19179
  const $internals = Symbol('internals');
18981
19180
 
19181
+ const isValidHeaderValue = (value) => !/[\r\n]/.test(value);
19182
+
19183
+ function assertValidHeaderValue(value, header) {
19184
+ if (value === false || value == null) {
19185
+ return;
19186
+ }
19187
+
19188
+ if (utils$1.isArray(value)) {
19189
+ value.forEach((v) => assertValidHeaderValue(v, header));
19190
+ return;
19191
+ }
19192
+
19193
+ if (!isValidHeaderValue(String(value))) {
19194
+ throw new Error(`Invalid character in header content ["${header}"]`);
19195
+ }
19196
+ }
19197
+
18982
19198
  function normalizeHeader(header) {
18983
19199
  return header && String(header).trim().toLowerCase();
18984
19200
  }
18985
19201
 
19202
+ function stripTrailingCRLF(str) {
19203
+ let end = str.length;
19204
+
19205
+ while (end > 0) {
19206
+ const charCode = str.charCodeAt(end - 1);
19207
+
19208
+ if (charCode !== 10 && charCode !== 13) {
19209
+ break;
19210
+ }
19211
+
19212
+ end -= 1;
19213
+ }
19214
+
19215
+ return end === str.length ? str : str.slice(0, end);
19216
+ }
19217
+
18986
19218
  function normalizeValue(value) {
18987
19219
  if (value === false || value == null) {
18988
19220
  return value;
18989
19221
  }
18990
19222
 
18991
- return utils$1.isArray(value) ? value.map(normalizeValue) : String(value);
19223
+ return utils$1.isArray(value) ? value.map(normalizeValue) : stripTrailingCRLF(String(value));
18992
19224
  }
18993
19225
 
18994
19226
  function parseTokens(str) {
@@ -19026,8 +19258,10 @@ function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
19026
19258
  }
19027
19259
 
19028
19260
  function formatHeader(header) {
19029
- return header.trim()
19030
- .toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => {
19261
+ return header
19262
+ .trim()
19263
+ .toLowerCase()
19264
+ .replace(/([a-z\d])(\w*)/g, (w, char, str) => {
19031
19265
  return char.toUpperCase() + str;
19032
19266
  });
19033
19267
  }
@@ -19035,12 +19269,12 @@ function formatHeader(header) {
19035
19269
  function buildAccessors(obj, header) {
19036
19270
  const accessorName = utils$1.toCamelCase(' ' + header);
19037
19271
 
19038
- ['get', 'set', 'has'].forEach(methodName => {
19272
+ ['get', 'set', 'has'].forEach((methodName) => {
19039
19273
  Object.defineProperty(obj, methodName + accessorName, {
19040
- value: function(arg1, arg2, arg3) {
19274
+ value: function (arg1, arg2, arg3) {
19041
19275
  return this[methodName].call(this, header, arg1, arg2, arg3);
19042
19276
  },
19043
- configurable: true
19277
+ configurable: true,
19044
19278
  });
19045
19279
  });
19046
19280
  }
@@ -19062,7 +19296,13 @@ class AxiosHeaders {
19062
19296
 
19063
19297
  const key = utils$1.findKey(self, lHeader);
19064
19298
 
19065
- if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {
19299
+ if (
19300
+ !key ||
19301
+ self[key] === undefined ||
19302
+ _rewrite === true ||
19303
+ (_rewrite === undefined && self[key] !== false)
19304
+ ) {
19305
+ assertValidHeaderValue(_value, _header);
19066
19306
  self[key || _header] = normalizeValue(_value);
19067
19307
  }
19068
19308
  }
@@ -19072,17 +19312,22 @@ class AxiosHeaders {
19072
19312
 
19073
19313
  if (utils$1.isPlainObject(header) || header instanceof this.constructor) {
19074
19314
  setHeaders(header, valueOrRewrite);
19075
- } else if(utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
19315
+ } else if (utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
19076
19316
  setHeaders(parseHeaders(header), valueOrRewrite);
19077
19317
  } else if (utils$1.isObject(header) && utils$1.isIterable(header)) {
19078
- let obj = {}, dest, key;
19318
+ let obj = {},
19319
+ dest,
19320
+ key;
19079
19321
  for (const entry of header) {
19080
19322
  if (!utils$1.isArray(entry)) {
19081
19323
  throw TypeError('Object iterator must return a key-value pair');
19082
19324
  }
19083
19325
 
19084
- obj[key = entry[0]] = (dest = obj[key]) ?
19085
- (utils$1.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]]) : entry[1];
19326
+ obj[(key = entry[0])] = (dest = obj[key])
19327
+ ? utils$1.isArray(dest)
19328
+ ? [...dest, entry[1]]
19329
+ : [dest, entry[1]]
19330
+ : entry[1];
19086
19331
  }
19087
19332
 
19088
19333
  setHeaders(obj, valueOrRewrite);
@@ -19129,7 +19374,11 @@ class AxiosHeaders {
19129
19374
  if (header) {
19130
19375
  const key = utils$1.findKey(this, header);
19131
19376
 
19132
- return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
19377
+ return !!(
19378
+ key &&
19379
+ this[key] !== undefined &&
19380
+ (!matcher || matchHeaderValue(this, this[key], key, matcher))
19381
+ );
19133
19382
  }
19134
19383
 
19135
19384
  return false;
@@ -19169,7 +19418,7 @@ class AxiosHeaders {
19169
19418
 
19170
19419
  while (i--) {
19171
19420
  const key = keys[i];
19172
- if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
19421
+ if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
19173
19422
  delete this[key];
19174
19423
  deleted = true;
19175
19424
  }
@@ -19213,7 +19462,9 @@ class AxiosHeaders {
19213
19462
  const obj = Object.create(null);
19214
19463
 
19215
19464
  utils$1.forEach(this, (value, header) => {
19216
- value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(', ') : value);
19465
+ value != null &&
19466
+ value !== false &&
19467
+ (obj[header] = asStrings && utils$1.isArray(value) ? value.join(', ') : value);
19217
19468
  });
19218
19469
 
19219
19470
  return obj;
@@ -19224,11 +19475,13 @@ class AxiosHeaders {
19224
19475
  }
19225
19476
 
19226
19477
  toString() {
19227
- return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\n');
19478
+ return Object.entries(this.toJSON())
19479
+ .map(([header, value]) => header + ': ' + value)
19480
+ .join('\n');
19228
19481
  }
19229
19482
 
19230
19483
  getSetCookie() {
19231
- return this.get("set-cookie") || [];
19484
+ return this.get('set-cookie') || [];
19232
19485
  }
19233
19486
 
19234
19487
  get [Symbol.toStringTag]() {
@@ -19248,9 +19501,12 @@ class AxiosHeaders {
19248
19501
  }
19249
19502
 
19250
19503
  static accessor(header) {
19251
- const internals = this[$internals] = (this[$internals] = {
19252
- accessors: {}
19253
- });
19504
+ const internals =
19505
+ (this[$internals] =
19506
+ this[$internals] =
19507
+ {
19508
+ accessors: {},
19509
+ });
19254
19510
 
19255
19511
  const accessors = internals.accessors;
19256
19512
  const prototype = this.prototype;
@@ -19270,17 +19526,24 @@ class AxiosHeaders {
19270
19526
  }
19271
19527
  }
19272
19528
 
19273
- AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);
19529
+ AxiosHeaders.accessor([
19530
+ 'Content-Type',
19531
+ 'Content-Length',
19532
+ 'Accept',
19533
+ 'Accept-Encoding',
19534
+ 'User-Agent',
19535
+ 'Authorization',
19536
+ ]);
19274
19537
 
19275
19538
  // reserved names hotfix
19276
- utils$1.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {
19539
+ utils$1.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {
19277
19540
  let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`
19278
19541
  return {
19279
19542
  get: () => value,
19280
19543
  set(headerValue) {
19281
19544
  this[mapped] = headerValue;
19282
- }
19283
- }
19545
+ },
19546
+ };
19284
19547
  });
19285
19548
 
19286
19549
  utils$1.freezeMethods(AxiosHeaders);
@@ -19347,19 +19610,23 @@ function settle(resolve, reject, response) {
19347
19610
  if (!response.status || !validateStatus || validateStatus(response.status)) {
19348
19611
  resolve(response);
19349
19612
  } else {
19350
- reject(new AxiosError$1(
19351
- 'Request failed with status code ' + response.status,
19352
- [AxiosError$1.ERR_BAD_REQUEST, AxiosError$1.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
19353
- response.config,
19354
- response.request,
19355
- response
19356
- ));
19613
+ reject(
19614
+ new AxiosError$1(
19615
+ 'Request failed with status code ' + response.status,
19616
+ [AxiosError$1.ERR_BAD_REQUEST, AxiosError$1.ERR_BAD_RESPONSE][
19617
+ Math.floor(response.status / 100) - 4
19618
+ ],
19619
+ response.config,
19620
+ response.request,
19621
+ response
19622
+ )
19623
+ );
19357
19624
  }
19358
19625
  }
19359
19626
 
19360
19627
  function parseProtocol(url) {
19361
19628
  const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
19362
- return match && match[1] || '';
19629
+ return (match && match[1]) || '';
19363
19630
  }
19364
19631
 
19365
19632
  /**
@@ -19410,7 +19677,7 @@ function speedometer(samplesCount, min) {
19410
19677
 
19411
19678
  const passed = startedAt && now - startedAt;
19412
19679
 
19413
- return passed ? Math.round(bytesCount * 1000 / passed) : undefined;
19680
+ return passed ? Math.round((bytesCount * 1000) / passed) : undefined;
19414
19681
  };
19415
19682
  }
19416
19683
 
@@ -19439,7 +19706,7 @@ function throttle(fn, freq) {
19439
19706
  const throttled = (...args) => {
19440
19707
  const now = Date.now();
19441
19708
  const passed = now - timestamp;
19442
- if ( passed >= threshold) {
19709
+ if (passed >= threshold) {
19443
19710
  invoke(args, now);
19444
19711
  } else {
19445
19712
  lastArgs = args;
@@ -19461,7 +19728,7 @@ const progressEventReducer = (listener, isDownloadStream, freq = 3) => {
19461
19728
  let bytesNotified = 0;
19462
19729
  const _speedometer = speedometer(50, 250);
19463
19730
 
19464
- return throttle(e => {
19731
+ return throttle((e) => {
19465
19732
  const loaded = e.loaded;
19466
19733
  const total = e.lengthComputable ? e.total : undefined;
19467
19734
  const progressBytes = loaded - bytesNotified;
@@ -19473,13 +19740,13 @@ const progressEventReducer = (listener, isDownloadStream, freq = 3) => {
19473
19740
  const data = {
19474
19741
  loaded,
19475
19742
  total,
19476
- progress: total ? (loaded / total) : undefined,
19743
+ progress: total ? loaded / total : undefined,
19477
19744
  bytes: progressBytes,
19478
19745
  rate: rate ? rate : undefined,
19479
19746
  estimated: rate && total && inRange ? (total - loaded) / rate : undefined,
19480
19747
  event: e,
19481
19748
  lengthComputable: total != null,
19482
- [isDownloadStream ? 'download' : 'upload']: true
19749
+ [isDownloadStream ? 'download' : 'upload']: true,
19483
19750
  };
19484
19751
 
19485
19752
  listener(data);
@@ -19489,77 +19756,82 @@ const progressEventReducer = (listener, isDownloadStream, freq = 3) => {
19489
19756
  const progressEventDecorator = (total, throttled) => {
19490
19757
  const lengthComputable = total != null;
19491
19758
 
19492
- return [(loaded) => throttled[0]({
19493
- lengthComputable,
19494
- total,
19495
- loaded
19496
- }), throttled[1]];
19759
+ return [
19760
+ (loaded) =>
19761
+ throttled[0]({
19762
+ lengthComputable,
19763
+ total,
19764
+ loaded,
19765
+ }),
19766
+ throttled[1],
19767
+ ];
19497
19768
  };
19498
19769
 
19499
- const asyncDecorator = (fn) => (...args) => utils$1.asap(() => fn(...args));
19500
-
19501
- var isURLSameOrigin = platform.hasStandardBrowserEnv ? ((origin, isMSIE) => (url) => {
19502
- url = new URL(url, platform.origin);
19770
+ const asyncDecorator =
19771
+ (fn) =>
19772
+ (...args) =>
19773
+ utils$1.asap(() => fn(...args));
19503
19774
 
19504
- return (
19505
- origin.protocol === url.protocol &&
19506
- origin.host === url.host &&
19507
- (isMSIE || origin.port === url.port)
19508
- );
19509
- })(
19510
- new URL(platform.origin),
19511
- platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)
19512
- ) : () => true;
19775
+ var isURLSameOrigin = platform.hasStandardBrowserEnv
19776
+ ? ((origin, isMSIE) => (url) => {
19777
+ url = new URL(url, platform.origin);
19513
19778
 
19514
- var cookies = platform.hasStandardBrowserEnv ?
19779
+ return (
19780
+ origin.protocol === url.protocol &&
19781
+ origin.host === url.host &&
19782
+ (isMSIE || origin.port === url.port)
19783
+ );
19784
+ })(
19785
+ new URL(platform.origin),
19786
+ platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)
19787
+ )
19788
+ : () => true;
19515
19789
 
19516
- // Standard browser envs support document.cookie
19517
- {
19518
- write(name, value, expires, path, domain, secure, sameSite) {
19519
- if (typeof document === 'undefined') return;
19790
+ var cookies = platform.hasStandardBrowserEnv
19791
+ ? // Standard browser envs support document.cookie
19792
+ {
19793
+ write(name, value, expires, path, domain, secure, sameSite) {
19794
+ if (typeof document === 'undefined') return;
19520
19795
 
19521
- const cookie = [`${name}=${encodeURIComponent(value)}`];
19796
+ const cookie = [`${name}=${encodeURIComponent(value)}`];
19522
19797
 
19523
- if (utils$1.isNumber(expires)) {
19524
- cookie.push(`expires=${new Date(expires).toUTCString()}`);
19525
- }
19526
- if (utils$1.isString(path)) {
19527
- cookie.push(`path=${path}`);
19528
- }
19529
- if (utils$1.isString(domain)) {
19530
- cookie.push(`domain=${domain}`);
19531
- }
19532
- if (secure === true) {
19533
- cookie.push('secure');
19534
- }
19535
- if (utils$1.isString(sameSite)) {
19536
- cookie.push(`SameSite=${sameSite}`);
19537
- }
19798
+ if (utils$1.isNumber(expires)) {
19799
+ cookie.push(`expires=${new Date(expires).toUTCString()}`);
19800
+ }
19801
+ if (utils$1.isString(path)) {
19802
+ cookie.push(`path=${path}`);
19803
+ }
19804
+ if (utils$1.isString(domain)) {
19805
+ cookie.push(`domain=${domain}`);
19806
+ }
19807
+ if (secure === true) {
19808
+ cookie.push('secure');
19809
+ }
19810
+ if (utils$1.isString(sameSite)) {
19811
+ cookie.push(`SameSite=${sameSite}`);
19812
+ }
19538
19813
 
19539
- document.cookie = cookie.join('; ');
19540
- },
19814
+ document.cookie = cookie.join('; ');
19815
+ },
19541
19816
 
19542
- read(name) {
19543
- if (typeof document === 'undefined') return null;
19544
- const match = document.cookie.match(new RegExp('(?:^|; )' + name + '=([^;]*)'));
19545
- return match ? decodeURIComponent(match[1]) : null;
19546
- },
19817
+ read(name) {
19818
+ if (typeof document === 'undefined') return null;
19819
+ const match = document.cookie.match(new RegExp('(?:^|; )' + name + '=([^;]*)'));
19820
+ return match ? decodeURIComponent(match[1]) : null;
19821
+ },
19547
19822
 
19548
- remove(name) {
19549
- this.write(name, '', Date.now() - 86400000, '/');
19823
+ remove(name) {
19824
+ this.write(name, '', Date.now() - 86400000, '/');
19825
+ },
19550
19826
  }
19551
- }
19552
-
19553
- :
19554
-
19555
- // Non-standard browser env (web workers, react-native) lack needed support.
19556
- {
19557
- write() {},
19558
- read() {
19559
- return null;
19560
- },
19561
- remove() {}
19562
- };
19827
+ : // Non-standard browser env (web workers, react-native) lack needed support.
19828
+ {
19829
+ write() {},
19830
+ read() {
19831
+ return null;
19832
+ },
19833
+ remove() {},
19834
+ };
19563
19835
 
19564
19836
  /**
19565
19837
  * Determines whether the specified URL is absolute
@@ -19572,6 +19844,10 @@ function isAbsoluteURL(url) {
19572
19844
  // A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
19573
19845
  // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
19574
19846
  // by any combination of letters, digits, plus, period, or hyphen.
19847
+ if (typeof url !== 'string') {
19848
+ return false;
19849
+ }
19850
+
19575
19851
  return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
19576
19852
  }
19577
19853
 
@@ -19607,7 +19883,7 @@ function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
19607
19883
  return requestedURL;
19608
19884
  }
19609
19885
 
19610
- const headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? { ...thing } : thing;
19886
+ const headersToObject = (thing) => (thing instanceof AxiosHeaders$1 ? { ...thing } : thing);
19611
19887
 
19612
19888
  /**
19613
19889
  * Config-specific merge-function which creates a new config-object
@@ -19696,11 +19972,13 @@ function mergeConfig(config1, config2) {
19696
19972
  socketPath: defaultToConfig2,
19697
19973
  responseEncoding: defaultToConfig2,
19698
19974
  validateStatus: mergeDirectKeys,
19699
- headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true)
19975
+ headers: (a, b, prop) =>
19976
+ mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true),
19700
19977
  };
19701
19978
 
19702
19979
  utils$1.forEach(Object.keys({ ...config1, ...config2 }), function computeConfigValue(prop) {
19703
- const merge = mergeMap[prop] || mergeDeepProperties;
19980
+ if (prop === '__proto__' || prop === 'constructor' || prop === 'prototype') return;
19981
+ const merge = utils$1.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;
19704
19982
  const configValue = merge(config1[prop], config2[prop], prop);
19705
19983
  (utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
19706
19984
  });
@@ -19715,12 +19993,22 @@ var resolveConfig = (config) => {
19715
19993
 
19716
19994
  newConfig.headers = headers = AxiosHeaders$1.from(headers);
19717
19995
 
19718
- newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config.params, config.paramsSerializer);
19996
+ newConfig.url = buildURL(
19997
+ buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls),
19998
+ config.params,
19999
+ config.paramsSerializer
20000
+ );
19719
20001
 
19720
20002
  // HTTP basic authentication
19721
20003
  if (auth) {
19722
- headers.set('Authorization', 'Basic ' +
19723
- btoa((auth.username || '') + ':' + (auth.password ? unescape(encodeURIComponent(auth.password)) : ''))
20004
+ headers.set(
20005
+ 'Authorization',
20006
+ 'Basic ' +
20007
+ btoa(
20008
+ (auth.username || '') +
20009
+ ':' +
20010
+ (auth.password ? unescape(encodeURIComponent(auth.password)) : '')
20011
+ )
19724
20012
  );
19725
20013
  }
19726
20014
 
@@ -19738,7 +20026,7 @@ var resolveConfig = (config) => {
19738
20026
  }
19739
20027
  });
19740
20028
  }
19741
- }
20029
+ }
19742
20030
 
19743
20031
  // Add xsrf header
19744
20032
  // This is only done if running in a standard browser environment.
@@ -19762,196 +20050,218 @@ var resolveConfig = (config) => {
19762
20050
 
19763
20051
  const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
19764
20052
 
19765
- var xhrAdapter = isXHRAdapterSupported && function (config) {
19766
- return new Promise(function dispatchXhrRequest(resolve, reject) {
19767
- const _config = resolveConfig(config);
19768
- let requestData = _config.data;
19769
- const requestHeaders = AxiosHeaders$1.from(_config.headers).normalize();
19770
- let {responseType, onUploadProgress, onDownloadProgress} = _config;
19771
- let onCanceled;
19772
- let uploadThrottled, downloadThrottled;
19773
- let flushUpload, flushDownload;
20053
+ var xhrAdapter = isXHRAdapterSupported &&
20054
+ function (config) {
20055
+ return new Promise(function dispatchXhrRequest(resolve, reject) {
20056
+ const _config = resolveConfig(config);
20057
+ let requestData = _config.data;
20058
+ const requestHeaders = AxiosHeaders$1.from(_config.headers).normalize();
20059
+ let { responseType, onUploadProgress, onDownloadProgress } = _config;
20060
+ let onCanceled;
20061
+ let uploadThrottled, downloadThrottled;
20062
+ let flushUpload, flushDownload;
19774
20063
 
19775
- function done() {
19776
- flushUpload && flushUpload(); // flush events
19777
- flushDownload && flushDownload(); // flush events
20064
+ function done() {
20065
+ flushUpload && flushUpload(); // flush events
20066
+ flushDownload && flushDownload(); // flush events
19778
20067
 
19779
- _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);
20068
+ _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);
19780
20069
 
19781
- _config.signal && _config.signal.removeEventListener('abort', onCanceled);
19782
- }
20070
+ _config.signal && _config.signal.removeEventListener('abort', onCanceled);
20071
+ }
19783
20072
 
19784
- let request = new XMLHttpRequest();
20073
+ let request = new XMLHttpRequest();
19785
20074
 
19786
- request.open(_config.method.toUpperCase(), _config.url, true);
20075
+ request.open(_config.method.toUpperCase(), _config.url, true);
19787
20076
 
19788
- // Set the request timeout in MS
19789
- request.timeout = _config.timeout;
20077
+ // Set the request timeout in MS
20078
+ request.timeout = _config.timeout;
19790
20079
 
19791
- function onloadend() {
19792
- if (!request) {
19793
- return;
20080
+ function onloadend() {
20081
+ if (!request) {
20082
+ return;
20083
+ }
20084
+ // Prepare the response
20085
+ const responseHeaders = AxiosHeaders$1.from(
20086
+ 'getAllResponseHeaders' in request && request.getAllResponseHeaders()
20087
+ );
20088
+ const responseData =
20089
+ !responseType || responseType === 'text' || responseType === 'json'
20090
+ ? request.responseText
20091
+ : request.response;
20092
+ const response = {
20093
+ data: responseData,
20094
+ status: request.status,
20095
+ statusText: request.statusText,
20096
+ headers: responseHeaders,
20097
+ config,
20098
+ request,
20099
+ };
20100
+
20101
+ settle(
20102
+ function _resolve(value) {
20103
+ resolve(value);
20104
+ done();
20105
+ },
20106
+ function _reject(err) {
20107
+ reject(err);
20108
+ done();
20109
+ },
20110
+ response
20111
+ );
20112
+
20113
+ // Clean up request
20114
+ request = null;
19794
20115
  }
19795
- // Prepare the response
19796
- const responseHeaders = AxiosHeaders$1.from(
19797
- 'getAllResponseHeaders' in request && request.getAllResponseHeaders()
19798
- );
19799
- const responseData = !responseType || responseType === 'text' || responseType === 'json' ?
19800
- request.responseText : request.response;
19801
- const response = {
19802
- data: responseData,
19803
- status: request.status,
19804
- statusText: request.statusText,
19805
- headers: responseHeaders,
19806
- config,
19807
- request
19808
- };
19809
20116
 
19810
- settle(function _resolve(value) {
19811
- resolve(value);
19812
- done();
19813
- }, function _reject(err) {
19814
- reject(err);
19815
- done();
19816
- }, response);
20117
+ if ('onloadend' in request) {
20118
+ // Use onloadend if available
20119
+ request.onloadend = onloadend;
20120
+ } else {
20121
+ // Listen for ready state to emulate onloadend
20122
+ request.onreadystatechange = function handleLoad() {
20123
+ if (!request || request.readyState !== 4) {
20124
+ return;
20125
+ }
19817
20126
 
19818
- // Clean up request
19819
- request = null;
19820
- }
20127
+ // The request errored out and we didn't get a response, this will be
20128
+ // handled by onerror instead
20129
+ // With one exception: request that using file: protocol, most browsers
20130
+ // will return status as 0 even though it's a successful request
20131
+ if (
20132
+ request.status === 0 &&
20133
+ !(request.responseURL && request.responseURL.indexOf('file:') === 0)
20134
+ ) {
20135
+ return;
20136
+ }
20137
+ // readystate handler is calling before onerror or ontimeout handlers,
20138
+ // so we should call onloadend on the next 'tick'
20139
+ setTimeout(onloadend);
20140
+ };
20141
+ }
19821
20142
 
19822
- if ('onloadend' in request) {
19823
- // Use onloadend if available
19824
- request.onloadend = onloadend;
19825
- } else {
19826
- // Listen for ready state to emulate onloadend
19827
- request.onreadystatechange = function handleLoad() {
19828
- if (!request || request.readyState !== 4) {
20143
+ // Handle browser request cancellation (as opposed to a manual cancellation)
20144
+ request.onabort = function handleAbort() {
20145
+ if (!request) {
19829
20146
  return;
19830
20147
  }
19831
20148
 
19832
- // The request errored out and we didn't get a response, this will be
19833
- // handled by onerror instead
19834
- // With one exception: request that using file: protocol, most browsers
19835
- // will return status as 0 even though it's a successful request
19836
- if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {
19837
- return;
19838
- }
19839
- // readystate handler is calling before onerror or ontimeout handlers,
19840
- // so we should call onloadend on the next 'tick'
19841
- setTimeout(onloadend);
20149
+ reject(new AxiosError$1('Request aborted', AxiosError$1.ECONNABORTED, config, request));
20150
+
20151
+ // Clean up request
20152
+ request = null;
19842
20153
  };
19843
- }
19844
20154
 
19845
- // Handle browser request cancellation (as opposed to a manual cancellation)
19846
- request.onabort = function handleAbort() {
19847
- if (!request) {
19848
- return;
19849
- }
20155
+ // Handle low level network errors
20156
+ request.onerror = function handleError(event) {
20157
+ // Browsers deliver a ProgressEvent in XHR onerror
20158
+ // (message may be empty; when present, surface it)
20159
+ // See https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/error_event
20160
+ const msg = event && event.message ? event.message : 'Network Error';
20161
+ const err = new AxiosError$1(msg, AxiosError$1.ERR_NETWORK, config, request);
20162
+ // attach the underlying event for consumers who want details
20163
+ err.event = event || null;
20164
+ reject(err);
20165
+ request = null;
20166
+ };
19850
20167
 
19851
- reject(new AxiosError$1('Request aborted', AxiosError$1.ECONNABORTED, config, request));
20168
+ // Handle timeout
20169
+ request.ontimeout = function handleTimeout() {
20170
+ let timeoutErrorMessage = _config.timeout
20171
+ ? 'timeout of ' + _config.timeout + 'ms exceeded'
20172
+ : 'timeout exceeded';
20173
+ const transitional = _config.transitional || transitionalDefaults;
20174
+ if (_config.timeoutErrorMessage) {
20175
+ timeoutErrorMessage = _config.timeoutErrorMessage;
20176
+ }
20177
+ reject(
20178
+ new AxiosError$1(
20179
+ timeoutErrorMessage,
20180
+ transitional.clarifyTimeoutError ? AxiosError$1.ETIMEDOUT : AxiosError$1.ECONNABORTED,
20181
+ config,
20182
+ request
20183
+ )
20184
+ );
19852
20185
 
19853
- // Clean up request
19854
- request = null;
19855
- };
20186
+ // Clean up request
20187
+ request = null;
20188
+ };
19856
20189
 
19857
- // Handle low level network errors
19858
- request.onerror = function handleError(event) {
19859
- // Browsers deliver a ProgressEvent in XHR onerror
19860
- // (message may be empty; when present, surface it)
19861
- // See https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/error_event
19862
- const msg = event && event.message ? event.message : 'Network Error';
19863
- const err = new AxiosError$1(msg, AxiosError$1.ERR_NETWORK, config, request);
19864
- // attach the underlying event for consumers who want details
19865
- err.event = event || null;
19866
- reject(err);
19867
- request = null;
19868
- };
19869
-
19870
- // Handle timeout
19871
- request.ontimeout = function handleTimeout() {
19872
- let timeoutErrorMessage = _config.timeout ? 'timeout of ' + _config.timeout + 'ms exceeded' : 'timeout exceeded';
19873
- const transitional = _config.transitional || transitionalDefaults;
19874
- if (_config.timeoutErrorMessage) {
19875
- timeoutErrorMessage = _config.timeoutErrorMessage;
19876
- }
19877
- reject(new AxiosError$1(
19878
- timeoutErrorMessage,
19879
- transitional.clarifyTimeoutError ? AxiosError$1.ETIMEDOUT : AxiosError$1.ECONNABORTED,
19880
- config,
19881
- request));
19882
-
19883
- // Clean up request
19884
- request = null;
19885
- };
20190
+ // Remove Content-Type if data is undefined
20191
+ requestData === undefined && requestHeaders.setContentType(null);
19886
20192
 
19887
- // Remove Content-Type if data is undefined
19888
- requestData === undefined && requestHeaders.setContentType(null);
20193
+ // Add headers to the request
20194
+ if ('setRequestHeader' in request) {
20195
+ utils$1.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
20196
+ request.setRequestHeader(key, val);
20197
+ });
20198
+ }
19889
20199
 
19890
- // Add headers to the request
19891
- if ('setRequestHeader' in request) {
19892
- utils$1.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
19893
- request.setRequestHeader(key, val);
19894
- });
19895
- }
20200
+ // Add withCredentials to request if needed
20201
+ if (!utils$1.isUndefined(_config.withCredentials)) {
20202
+ request.withCredentials = !!_config.withCredentials;
20203
+ }
19896
20204
 
19897
- // Add withCredentials to request if needed
19898
- if (!utils$1.isUndefined(_config.withCredentials)) {
19899
- request.withCredentials = !!_config.withCredentials;
19900
- }
20205
+ // Add responseType to request if needed
20206
+ if (responseType && responseType !== 'json') {
20207
+ request.responseType = _config.responseType;
20208
+ }
19901
20209
 
19902
- // Add responseType to request if needed
19903
- if (responseType && responseType !== 'json') {
19904
- request.responseType = _config.responseType;
19905
- }
20210
+ // Handle progress if needed
20211
+ if (onDownloadProgress) {
20212
+ [downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true);
20213
+ request.addEventListener('progress', downloadThrottled);
20214
+ }
19906
20215
 
19907
- // Handle progress if needed
19908
- if (onDownloadProgress) {
19909
- ([downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true));
19910
- request.addEventListener('progress', downloadThrottled);
19911
- }
20216
+ // Not all browsers support upload events
20217
+ if (onUploadProgress && request.upload) {
20218
+ [uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress);
19912
20219
 
19913
- // Not all browsers support upload events
19914
- if (onUploadProgress && request.upload) {
19915
- ([uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress));
20220
+ request.upload.addEventListener('progress', uploadThrottled);
19916
20221
 
19917
- request.upload.addEventListener('progress', uploadThrottled);
20222
+ request.upload.addEventListener('loadend', flushUpload);
20223
+ }
19918
20224
 
19919
- request.upload.addEventListener('loadend', flushUpload);
19920
- }
20225
+ if (_config.cancelToken || _config.signal) {
20226
+ // Handle cancellation
20227
+ // eslint-disable-next-line func-names
20228
+ onCanceled = (cancel) => {
20229
+ if (!request) {
20230
+ return;
20231
+ }
20232
+ reject(!cancel || cancel.type ? new CanceledError$1(null, config, request) : cancel);
20233
+ request.abort();
20234
+ request = null;
20235
+ };
19921
20236
 
19922
- if (_config.cancelToken || _config.signal) {
19923
- // Handle cancellation
19924
- // eslint-disable-next-line func-names
19925
- onCanceled = cancel => {
19926
- if (!request) {
19927
- return;
20237
+ _config.cancelToken && _config.cancelToken.subscribe(onCanceled);
20238
+ if (_config.signal) {
20239
+ _config.signal.aborted
20240
+ ? onCanceled()
20241
+ : _config.signal.addEventListener('abort', onCanceled);
19928
20242
  }
19929
- reject(!cancel || cancel.type ? new CanceledError$1(null, config, request) : cancel);
19930
- request.abort();
19931
- request = null;
19932
- };
19933
-
19934
- _config.cancelToken && _config.cancelToken.subscribe(onCanceled);
19935
- if (_config.signal) {
19936
- _config.signal.aborted ? onCanceled() : _config.signal.addEventListener('abort', onCanceled);
19937
20243
  }
19938
- }
19939
20244
 
19940
- const protocol = parseProtocol(_config.url);
19941
-
19942
- if (protocol && platform.protocols.indexOf(protocol) === -1) {
19943
- reject(new AxiosError$1('Unsupported protocol ' + protocol + ':', AxiosError$1.ERR_BAD_REQUEST, config));
19944
- return;
19945
- }
20245
+ const protocol = parseProtocol(_config.url);
19946
20246
 
20247
+ if (protocol && platform.protocols.indexOf(protocol) === -1) {
20248
+ reject(
20249
+ new AxiosError$1(
20250
+ 'Unsupported protocol ' + protocol + ':',
20251
+ AxiosError$1.ERR_BAD_REQUEST,
20252
+ config
20253
+ )
20254
+ );
20255
+ return;
20256
+ }
19947
20257
 
19948
- // Send the request
19949
- request.send(requestData || null);
19950
- });
19951
- };
20258
+ // Send the request
20259
+ request.send(requestData || null);
20260
+ });
20261
+ };
19952
20262
 
19953
20263
  const composeSignals = (signals, timeout) => {
19954
- const {length} = (signals = signals ? signals.filter(Boolean) : []);
20264
+ const { length } = (signals = signals ? signals.filter(Boolean) : []);
19955
20265
 
19956
20266
  if (timeout || length) {
19957
20267
  let controller = new AbortController();
@@ -19963,21 +20273,29 @@ const composeSignals = (signals, timeout) => {
19963
20273
  aborted = true;
19964
20274
  unsubscribe();
19965
20275
  const err = reason instanceof Error ? reason : this.reason;
19966
- controller.abort(err instanceof AxiosError$1 ? err : new CanceledError$1(err instanceof Error ? err.message : err));
20276
+ controller.abort(
20277
+ err instanceof AxiosError$1
20278
+ ? err
20279
+ : new CanceledError$1(err instanceof Error ? err.message : err)
20280
+ );
19967
20281
  }
19968
20282
  };
19969
20283
 
19970
- let timer = timeout && setTimeout(() => {
19971
- timer = null;
19972
- onabort(new AxiosError$1(`timeout of ${timeout}ms exceeded`, AxiosError$1.ETIMEDOUT));
19973
- }, timeout);
20284
+ let timer =
20285
+ timeout &&
20286
+ setTimeout(() => {
20287
+ timer = null;
20288
+ onabort(new AxiosError$1(`timeout of ${timeout}ms exceeded`, AxiosError$1.ETIMEDOUT));
20289
+ }, timeout);
19974
20290
 
19975
20291
  const unsubscribe = () => {
19976
20292
  if (signals) {
19977
20293
  timer && clearTimeout(timer);
19978
20294
  timer = null;
19979
- signals.forEach(signal => {
19980
- signal.unsubscribe ? signal.unsubscribe(onabort) : signal.removeEventListener('abort', onabort);
20295
+ signals.forEach((signal) => {
20296
+ signal.unsubscribe
20297
+ ? signal.unsubscribe(onabort)
20298
+ : signal.removeEventListener('abort', onabort);
19981
20299
  });
19982
20300
  signals = null;
19983
20301
  }
@@ -19985,7 +20303,7 @@ const composeSignals = (signals, timeout) => {
19985
20303
 
19986
20304
  signals.forEach((signal) => signal.addEventListener('abort', onabort));
19987
20305
 
19988
- const {signal} = controller;
20306
+ const { signal } = controller;
19989
20307
 
19990
20308
  signal.unsubscribe = () => utils$1.asap(unsubscribe);
19991
20309
 
@@ -20028,7 +20346,7 @@ const readStream = async function* (stream) {
20028
20346
  const reader = stream.getReader();
20029
20347
  try {
20030
20348
  for (;;) {
20031
- const {done, value} = await reader.read();
20349
+ const { done, value } = await reader.read();
20032
20350
  if (done) {
20033
20351
  break;
20034
20352
  }
@@ -20051,64 +20369,69 @@ const trackStream = (stream, chunkSize, onProgress, onFinish) => {
20051
20369
  }
20052
20370
  };
20053
20371
 
20054
- return new ReadableStream({
20055
- async pull(controller) {
20056
- try {
20057
- const {done, value} = await iterator.next();
20372
+ return new ReadableStream(
20373
+ {
20374
+ async pull(controller) {
20375
+ try {
20376
+ const { done, value } = await iterator.next();
20058
20377
 
20059
- if (done) {
20060
- _onFinish();
20061
- controller.close();
20062
- return;
20063
- }
20378
+ if (done) {
20379
+ _onFinish();
20380
+ controller.close();
20381
+ return;
20382
+ }
20064
20383
 
20065
- let len = value.byteLength;
20066
- if (onProgress) {
20067
- let loadedBytes = bytes += len;
20068
- onProgress(loadedBytes);
20384
+ let len = value.byteLength;
20385
+ if (onProgress) {
20386
+ let loadedBytes = (bytes += len);
20387
+ onProgress(loadedBytes);
20388
+ }
20389
+ controller.enqueue(new Uint8Array(value));
20390
+ } catch (err) {
20391
+ _onFinish(err);
20392
+ throw err;
20069
20393
  }
20070
- controller.enqueue(new Uint8Array(value));
20071
- } catch (err) {
20072
- _onFinish(err);
20073
- throw err;
20074
- }
20394
+ },
20395
+ cancel(reason) {
20396
+ _onFinish(reason);
20397
+ return iterator.return();
20398
+ },
20075
20399
  },
20076
- cancel(reason) {
20077
- _onFinish(reason);
20078
- return iterator.return();
20400
+ {
20401
+ highWaterMark: 2,
20079
20402
  }
20080
- }, {
20081
- highWaterMark: 2
20082
- })
20403
+ );
20083
20404
  };
20084
20405
 
20085
20406
  const DEFAULT_CHUNK_SIZE = 64 * 1024;
20086
20407
 
20087
- const {isFunction} = utils$1;
20408
+ const { isFunction } = utils$1;
20088
20409
 
20089
- const globalFetchAPI = (({Request, Response}) => ({
20090
- Request, Response
20410
+ const globalFetchAPI = (({ Request, Response }) => ({
20411
+ Request,
20412
+ Response,
20091
20413
  }))(utils$1.global);
20092
20414
 
20093
- const {
20094
- ReadableStream: ReadableStream$1, TextEncoder
20095
- } = utils$1.global;
20096
-
20415
+ const { ReadableStream: ReadableStream$1, TextEncoder } = utils$1.global;
20097
20416
 
20098
20417
  const test = (fn, ...args) => {
20099
20418
  try {
20100
20419
  return !!fn(...args);
20101
20420
  } catch (e) {
20102
- return false
20421
+ return false;
20103
20422
  }
20104
20423
  };
20105
20424
 
20106
20425
  const factory = (env) => {
20107
- env = utils$1.merge.call({
20108
- skipUndefined: true
20109
- }, globalFetchAPI, env);
20426
+ env = utils$1.merge.call(
20427
+ {
20428
+ skipUndefined: true,
20429
+ },
20430
+ globalFetchAPI,
20431
+ env
20432
+ );
20110
20433
 
20111
- const {fetch: envFetch, Request, Response} = env;
20434
+ const { fetch: envFetch, Request, Response } = env;
20112
20435
  const isFetchSupported = envFetch ? isFunction(envFetch) : typeof fetch === 'function';
20113
20436
  const isRequestSupported = isFunction(Request);
20114
20437
  const isResponseSupported = isFunction(Response);
@@ -20119,46 +20442,65 @@ const factory = (env) => {
20119
20442
 
20120
20443
  const isReadableStreamSupported = isFetchSupported && isFunction(ReadableStream$1);
20121
20444
 
20122
- const encodeText = isFetchSupported && (typeof TextEncoder === 'function' ?
20123
- ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) :
20124
- async (str) => new Uint8Array(await new Request(str).arrayBuffer())
20125
- );
20445
+ const encodeText =
20446
+ isFetchSupported &&
20447
+ (typeof TextEncoder === 'function'
20448
+ ? (
20449
+ (encoder) => (str) =>
20450
+ encoder.encode(str)
20451
+ )(new TextEncoder())
20452
+ : async (str) => new Uint8Array(await new Request(str).arrayBuffer()));
20126
20453
 
20127
- const supportsRequestStream = isRequestSupported && isReadableStreamSupported && test(() => {
20128
- let duplexAccessed = false;
20454
+ const supportsRequestStream =
20455
+ isRequestSupported &&
20456
+ isReadableStreamSupported &&
20457
+ test(() => {
20458
+ let duplexAccessed = false;
20129
20459
 
20130
- const hasContentType = new Request(platform.origin, {
20131
- body: new ReadableStream$1(),
20132
- method: 'POST',
20133
- get duplex() {
20134
- duplexAccessed = true;
20135
- return 'half';
20136
- },
20137
- }).headers.has('Content-Type');
20460
+ const body = new ReadableStream$1();
20138
20461
 
20139
- return duplexAccessed && !hasContentType;
20140
- });
20462
+ const hasContentType = new Request(platform.origin, {
20463
+ body,
20464
+ method: 'POST',
20465
+ get duplex() {
20466
+ duplexAccessed = true;
20467
+ return 'half';
20468
+ },
20469
+ }).headers.has('Content-Type');
20470
+
20471
+ body.cancel();
20472
+
20473
+ return duplexAccessed && !hasContentType;
20474
+ });
20141
20475
 
20142
- const supportsResponseStream = isResponseSupported && isReadableStreamSupported &&
20476
+ const supportsResponseStream =
20477
+ isResponseSupported &&
20478
+ isReadableStreamSupported &&
20143
20479
  test(() => utils$1.isReadableStream(new Response('').body));
20144
20480
 
20145
20481
  const resolvers = {
20146
- stream: supportsResponseStream && ((res) => res.body)
20482
+ stream: supportsResponseStream && ((res) => res.body),
20147
20483
  };
20148
20484
 
20149
- isFetchSupported && ((() => {
20150
- ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(type => {
20151
- !resolvers[type] && (resolvers[type] = (res, config) => {
20152
- let method = res && res[type];
20485
+ isFetchSupported &&
20486
+ (() => {
20487
+ ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach((type) => {
20488
+ !resolvers[type] &&
20489
+ (resolvers[type] = (res, config) => {
20490
+ let method = res && res[type];
20153
20491
 
20154
- if (method) {
20155
- return method.call(res);
20156
- }
20492
+ if (method) {
20493
+ return method.call(res);
20494
+ }
20157
20495
 
20158
- throw new AxiosError$1(`Response type '${type}' is not supported`, AxiosError$1.ERR_NOT_SUPPORT, config);
20496
+ throw new AxiosError$1(
20497
+ `Response type '${type}' is not supported`,
20498
+ AxiosError$1.ERR_NOT_SUPPORT,
20499
+ config
20500
+ );
20501
+ });
20159
20502
  });
20160
- });
20161
- })());
20503
+ })();
20162
20504
 
20163
20505
  const getBodyLength = async (body) => {
20164
20506
  if (body == null) {
@@ -20209,32 +20551,41 @@ const factory = (env) => {
20209
20551
  responseType,
20210
20552
  headers,
20211
20553
  withCredentials = 'same-origin',
20212
- fetchOptions
20554
+ fetchOptions,
20213
20555
  } = resolveConfig(config);
20214
20556
 
20215
20557
  let _fetch = envFetch || fetch;
20216
20558
 
20217
20559
  responseType = responseType ? (responseType + '').toLowerCase() : 'text';
20218
20560
 
20219
- let composedSignal = composeSignals$1([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
20561
+ let composedSignal = composeSignals$1(
20562
+ [signal, cancelToken && cancelToken.toAbortSignal()],
20563
+ timeout
20564
+ );
20220
20565
 
20221
20566
  let request = null;
20222
20567
 
20223
- const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
20224
- composedSignal.unsubscribe();
20225
- });
20568
+ const unsubscribe =
20569
+ composedSignal &&
20570
+ composedSignal.unsubscribe &&
20571
+ (() => {
20572
+ composedSignal.unsubscribe();
20573
+ });
20226
20574
 
20227
20575
  let requestContentLength;
20228
20576
 
20229
20577
  try {
20230
20578
  if (
20231
- onUploadProgress && supportsRequestStream && method !== 'get' && method !== 'head' &&
20579
+ onUploadProgress &&
20580
+ supportsRequestStream &&
20581
+ method !== 'get' &&
20582
+ method !== 'head' &&
20232
20583
  (requestContentLength = await resolveBodyLength(headers, data)) !== 0
20233
20584
  ) {
20234
20585
  let _request = new Request(url, {
20235
20586
  method: 'POST',
20236
20587
  body: data,
20237
- duplex: "half"
20588
+ duplex: 'half',
20238
20589
  });
20239
20590
 
20240
20591
  let contentTypeHeader;
@@ -20259,7 +20610,7 @@ const factory = (env) => {
20259
20610
 
20260
20611
  // Cloudflare Workers throws when credentials are defined
20261
20612
  // see https://github.com/cloudflare/workerd/issues/902
20262
- const isCredentialsSupported = isRequestSupported && "credentials" in Request.prototype;
20613
+ const isCredentialsSupported = isRequestSupported && 'credentials' in Request.prototype;
20263
20614
 
20264
20615
  const resolvedOptions = {
20265
20616
  ...fetchOptions,
@@ -20267,29 +20618,35 @@ const factory = (env) => {
20267
20618
  method: method.toUpperCase(),
20268
20619
  headers: headers.normalize().toJSON(),
20269
20620
  body: data,
20270
- duplex: "half",
20271
- credentials: isCredentialsSupported ? withCredentials : undefined
20621
+ duplex: 'half',
20622
+ credentials: isCredentialsSupported ? withCredentials : undefined,
20272
20623
  };
20273
20624
 
20274
20625
  request = isRequestSupported && new Request(url, resolvedOptions);
20275
20626
 
20276
- let response = await (isRequestSupported ? _fetch(request, fetchOptions) : _fetch(url, resolvedOptions));
20627
+ let response = await (isRequestSupported
20628
+ ? _fetch(request, fetchOptions)
20629
+ : _fetch(url, resolvedOptions));
20277
20630
 
20278
- const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response');
20631
+ const isStreamResponse =
20632
+ supportsResponseStream && (responseType === 'stream' || responseType === 'response');
20279
20633
 
20280
20634
  if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) {
20281
20635
  const options = {};
20282
20636
 
20283
- ['status', 'statusText', 'headers'].forEach(prop => {
20637
+ ['status', 'statusText', 'headers'].forEach((prop) => {
20284
20638
  options[prop] = response[prop];
20285
20639
  });
20286
20640
 
20287
20641
  const responseContentLength = utils$1.toFiniteNumber(response.headers.get('content-length'));
20288
20642
 
20289
- const [onProgress, flush] = onDownloadProgress && progressEventDecorator(
20290
- responseContentLength,
20291
- progressEventReducer(asyncDecorator(onDownloadProgress), true)
20292
- ) || [];
20643
+ const [onProgress, flush] =
20644
+ (onDownloadProgress &&
20645
+ progressEventDecorator(
20646
+ responseContentLength,
20647
+ progressEventReducer(asyncDecorator(onDownloadProgress), true)
20648
+ )) ||
20649
+ [];
20293
20650
 
20294
20651
  response = new Response(
20295
20652
  trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
@@ -20302,7 +20659,10 @@ const factory = (env) => {
20302
20659
 
20303
20660
  responseType = responseType || 'text';
20304
20661
 
20305
- let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || 'text'](response, config);
20662
+ let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || 'text'](
20663
+ response,
20664
+ config
20665
+ );
20306
20666
 
20307
20667
  !isStreamResponse && unsubscribe && unsubscribe();
20308
20668
 
@@ -20313,43 +20673,50 @@ const factory = (env) => {
20313
20673
  status: response.status,
20314
20674
  statusText: response.statusText,
20315
20675
  config,
20316
- request
20676
+ request,
20317
20677
  });
20318
- })
20678
+ });
20319
20679
  } catch (err) {
20320
20680
  unsubscribe && unsubscribe();
20321
20681
 
20322
20682
  if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) {
20323
20683
  throw Object.assign(
20324
- new AxiosError$1('Network Error', AxiosError$1.ERR_NETWORK, config, request),
20684
+ new AxiosError$1(
20685
+ 'Network Error',
20686
+ AxiosError$1.ERR_NETWORK,
20687
+ config,
20688
+ request,
20689
+ err && err.response
20690
+ ),
20325
20691
  {
20326
- cause: err.cause || err
20692
+ cause: err.cause || err,
20327
20693
  }
20328
- )
20694
+ );
20329
20695
  }
20330
20696
 
20331
- throw AxiosError$1.from(err, err && err.code, config, request);
20697
+ throw AxiosError$1.from(err, err && err.code, config, request, err && err.response);
20332
20698
  }
20333
- }
20699
+ };
20334
20700
  };
20335
20701
 
20336
20702
  const seedCache = new Map();
20337
20703
 
20338
20704
  const getFetch = (config) => {
20339
20705
  let env = (config && config.env) || {};
20340
- const {fetch, Request, Response} = env;
20341
- const seeds = [
20342
- Request, Response, fetch
20343
- ];
20706
+ const { fetch, Request, Response } = env;
20707
+ const seeds = [Request, Response, fetch];
20344
20708
 
20345
- let len = seeds.length, i = len,
20346
- seed, target, map = seedCache;
20709
+ let len = seeds.length,
20710
+ i = len,
20711
+ seed,
20712
+ target,
20713
+ map = seedCache;
20347
20714
 
20348
20715
  while (i--) {
20349
20716
  seed = seeds[i];
20350
20717
  target = map.get(seed);
20351
20718
 
20352
- target === undefined && map.set(seed, target = (i ? new Map() : factory(env)));
20719
+ target === undefined && map.set(seed, (target = i ? new Map() : factory(env)));
20353
20720
 
20354
20721
  map = target;
20355
20722
  }
@@ -20365,7 +20732,7 @@ getFetch();
20365
20732
  * - `http` for Node.js
20366
20733
  * - `xhr` for browsers
20367
20734
  * - `fetch` for fetch API-based requests
20368
- *
20735
+ *
20369
20736
  * @type {Object<string, Function|Object>}
20370
20737
  */
20371
20738
  const knownAdapters = {
@@ -20373,7 +20740,7 @@ const knownAdapters = {
20373
20740
  xhr: xhrAdapter,
20374
20741
  fetch: {
20375
20742
  get: getFetch,
20376
- }
20743
+ },
20377
20744
  };
20378
20745
 
20379
20746
  // Assign adapter names for easier debugging and identification
@@ -20390,7 +20757,7 @@ utils$1.forEach(knownAdapters, (fn, value) => {
20390
20757
 
20391
20758
  /**
20392
20759
  * Render a rejection reason string for unknown or unsupported adapters
20393
- *
20760
+ *
20394
20761
  * @param {string} reason
20395
20762
  * @returns {string}
20396
20763
  */
@@ -20398,17 +20765,18 @@ const renderReason = (reason) => `- ${reason}`;
20398
20765
 
20399
20766
  /**
20400
20767
  * Check if the adapter is resolved (function, null, or false)
20401
- *
20768
+ *
20402
20769
  * @param {Function|null|false} adapter
20403
20770
  * @returns {boolean}
20404
20771
  */
20405
- const isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false;
20772
+ const isResolvedHandle = (adapter) =>
20773
+ utils$1.isFunction(adapter) || adapter === null || adapter === false;
20406
20774
 
20407
20775
  /**
20408
20776
  * Get the first suitable adapter from the provided list.
20409
20777
  * Tries each adapter in order until a supported one is found.
20410
20778
  * Throws an AxiosError if no adapter is suitable.
20411
- *
20779
+ *
20412
20780
  * @param {Array<string|Function>|string|Function} adapters - Adapter(s) by name or function.
20413
20781
  * @param {Object} config - Axios request configuration
20414
20782
  * @throws {AxiosError} If no suitable adapter is available
@@ -20445,14 +20813,17 @@ function getAdapter(adapters, config) {
20445
20813
  }
20446
20814
 
20447
20815
  if (!adapter) {
20448
- const reasons = Object.entries(rejectedReasons)
20449
- .map(([id, state]) => `adapter ${id} ` +
20816
+ const reasons = Object.entries(rejectedReasons).map(
20817
+ ([id, state]) =>
20818
+ `adapter ${id} ` +
20450
20819
  (state === false ? 'is not supported by the environment' : 'is not available in the build')
20451
- );
20820
+ );
20452
20821
 
20453
- let s = length ?
20454
- (reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0])) :
20455
- 'as no adapter specified';
20822
+ let s = length
20823
+ ? reasons.length > 1
20824
+ ? 'since :\n' + reasons.map(renderReason).join('\n')
20825
+ : ' ' + renderReason(reasons[0])
20826
+ : 'as no adapter specified';
20456
20827
 
20457
20828
  throw new AxiosError$1(
20458
20829
  `There is no suitable adapter to dispatch the request ` + s,
@@ -20477,7 +20848,7 @@ var adapters = {
20477
20848
  * Exposes all known adapters
20478
20849
  * @type {Object<string, Function|Object>}
20479
20850
  */
20480
- adapters: knownAdapters
20851
+ adapters: knownAdapters,
20481
20852
  };
20482
20853
 
20483
20854
  /**
@@ -20510,10 +20881,7 @@ function dispatchRequest(config) {
20510
20881
  config.headers = AxiosHeaders$1.from(config.headers);
20511
20882
 
20512
20883
  // Transform request data
20513
- config.data = transformData.call(
20514
- config,
20515
- config.transformRequest
20516
- );
20884
+ config.data = transformData.call(config, config.transformRequest);
20517
20885
 
20518
20886
  if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {
20519
20887
  config.headers.setContentType('application/x-www-form-urlencoded', false);
@@ -20521,39 +20889,38 @@ function dispatchRequest(config) {
20521
20889
 
20522
20890
  const adapter = adapters.getAdapter(config.adapter || defaults$1.adapter, config);
20523
20891
 
20524
- return adapter(config).then(function onAdapterResolution(response) {
20525
- throwIfCancellationRequested(config);
20526
-
20527
- // Transform response data
20528
- response.data = transformData.call(
20529
- config,
20530
- config.transformResponse,
20531
- response
20532
- );
20533
-
20534
- response.headers = AxiosHeaders$1.from(response.headers);
20535
-
20536
- return response;
20537
- }, function onAdapterRejection(reason) {
20538
- if (!isCancel(reason)) {
20892
+ return adapter(config).then(
20893
+ function onAdapterResolution(response) {
20539
20894
  throwIfCancellationRequested(config);
20540
20895
 
20541
20896
  // Transform response data
20542
- if (reason && reason.response) {
20543
- reason.response.data = transformData.call(
20544
- config,
20545
- config.transformResponse,
20546
- reason.response
20547
- );
20548
- reason.response.headers = AxiosHeaders$1.from(reason.response.headers);
20897
+ response.data = transformData.call(config, config.transformResponse, response);
20898
+
20899
+ response.headers = AxiosHeaders$1.from(response.headers);
20900
+
20901
+ return response;
20902
+ },
20903
+ function onAdapterRejection(reason) {
20904
+ if (!isCancel(reason)) {
20905
+ throwIfCancellationRequested(config);
20906
+
20907
+ // Transform response data
20908
+ if (reason && reason.response) {
20909
+ reason.response.data = transformData.call(
20910
+ config,
20911
+ config.transformResponse,
20912
+ reason.response
20913
+ );
20914
+ reason.response.headers = AxiosHeaders$1.from(reason.response.headers);
20915
+ }
20549
20916
  }
20550
- }
20551
20917
 
20552
- return Promise.reject(reason);
20553
- });
20918
+ return Promise.reject(reason);
20919
+ }
20920
+ );
20554
20921
  }
20555
20922
 
20556
- const VERSION = "1.13.4";
20923
+ const VERSION = "1.15.0";
20557
20924
 
20558
20925
  const validators$1 = {};
20559
20926
 
@@ -20577,7 +20944,15 @@ const deprecatedWarnings = {};
20577
20944
  */
20578
20945
  validators$1.transitional = function transitional(validator, version, message) {
20579
20946
  function formatMessage(opt, desc) {
20580
- return '[Axios v' + VERSION + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : '');
20947
+ return (
20948
+ '[Axios v' +
20949
+ VERSION +
20950
+ "] Transitional option '" +
20951
+ opt +
20952
+ "'" +
20953
+ desc +
20954
+ (message ? '. ' + message : '')
20955
+ );
20581
20956
  }
20582
20957
 
20583
20958
  // eslint-disable-next-line func-names
@@ -20609,7 +20984,7 @@ validators$1.spelling = function spelling(correctSpelling) {
20609
20984
  // eslint-disable-next-line no-console
20610
20985
  console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);
20611
20986
  return true;
20612
- }
20987
+ };
20613
20988
  };
20614
20989
 
20615
20990
  /**
@@ -20635,7 +21010,10 @@ function assertOptions(options, schema, allowUnknown) {
20635
21010
  const value = options[opt];
20636
21011
  const result = value === undefined || validator(value, opt, options);
20637
21012
  if (result !== true) {
20638
- throw new AxiosError$1('option ' + opt + ' must be ' + result, AxiosError$1.ERR_BAD_OPTION_VALUE);
21013
+ throw new AxiosError$1(
21014
+ 'option ' + opt + ' must be ' + result,
21015
+ AxiosError$1.ERR_BAD_OPTION_VALUE
21016
+ );
20639
21017
  }
20640
21018
  continue;
20641
21019
  }
@@ -20647,7 +21025,7 @@ function assertOptions(options, schema, allowUnknown) {
20647
21025
 
20648
21026
  var validator = {
20649
21027
  assertOptions,
20650
- validators: validators$1
21028
+ validators: validators$1,
20651
21029
  };
20652
21030
 
20653
21031
  const validators = validator.validators;
@@ -20664,7 +21042,7 @@ class Axios {
20664
21042
  this.defaults = instanceConfig || {};
20665
21043
  this.interceptors = {
20666
21044
  request: new InterceptorManager$1(),
20667
- response: new InterceptorManager$1()
21045
+ response: new InterceptorManager$1(),
20668
21046
  };
20669
21047
  }
20670
21048
 
@@ -20686,13 +21064,29 @@ class Axios {
20686
21064
  Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error());
20687
21065
 
20688
21066
  // slice off the Error: ... line
20689
- const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, '') : '';
21067
+ const stack = (() => {
21068
+ if (!dummy.stack) {
21069
+ return '';
21070
+ }
21071
+
21072
+ const firstNewlineIndex = dummy.stack.indexOf('\n');
21073
+
21074
+ return firstNewlineIndex === -1 ? '' : dummy.stack.slice(firstNewlineIndex + 1);
21075
+ })();
20690
21076
  try {
20691
21077
  if (!err.stack) {
20692
21078
  err.stack = stack;
20693
21079
  // match without the 2 top stack lines
20694
- } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ''))) {
20695
- err.stack += '\n' + stack;
21080
+ } else if (stack) {
21081
+ const firstNewlineIndex = stack.indexOf('\n');
21082
+ const secondNewlineIndex =
21083
+ firstNewlineIndex === -1 ? -1 : stack.indexOf('\n', firstNewlineIndex + 1);
21084
+ const stackWithoutTwoTopLines =
21085
+ secondNewlineIndex === -1 ? '' : stack.slice(secondNewlineIndex + 1);
21086
+
21087
+ if (!String(err.stack).endsWith(stackWithoutTwoTopLines)) {
21088
+ err.stack += '\n' + stack;
21089
+ }
20696
21090
  }
20697
21091
  } catch (e) {
20698
21092
  // ignore the case where "stack" is an un-writable property
@@ -20715,26 +21109,35 @@ class Axios {
20715
21109
 
20716
21110
  config = mergeConfig(this.defaults, config);
20717
21111
 
20718
- const {transitional, paramsSerializer, headers} = config;
21112
+ const { transitional, paramsSerializer, headers } = config;
20719
21113
 
20720
21114
  if (transitional !== undefined) {
20721
- validator.assertOptions(transitional, {
20722
- silentJSONParsing: validators.transitional(validators.boolean),
20723
- forcedJSONParsing: validators.transitional(validators.boolean),
20724
- clarifyTimeoutError: validators.transitional(validators.boolean)
20725
- }, false);
21115
+ validator.assertOptions(
21116
+ transitional,
21117
+ {
21118
+ silentJSONParsing: validators.transitional(validators.boolean),
21119
+ forcedJSONParsing: validators.transitional(validators.boolean),
21120
+ clarifyTimeoutError: validators.transitional(validators.boolean),
21121
+ legacyInterceptorReqResOrdering: validators.transitional(validators.boolean),
21122
+ },
21123
+ false
21124
+ );
20726
21125
  }
20727
21126
 
20728
21127
  if (paramsSerializer != null) {
20729
21128
  if (utils$1.isFunction(paramsSerializer)) {
20730
21129
  config.paramsSerializer = {
20731
- serialize: paramsSerializer
21130
+ serialize: paramsSerializer,
20732
21131
  };
20733
21132
  } else {
20734
- validator.assertOptions(paramsSerializer, {
20735
- encode: validators.function,
20736
- serialize: validators.function
20737
- }, true);
21133
+ validator.assertOptions(
21134
+ paramsSerializer,
21135
+ {
21136
+ encode: validators.function,
21137
+ serialize: validators.function,
21138
+ },
21139
+ true
21140
+ );
20738
21141
  }
20739
21142
  }
20740
21143
 
@@ -20745,26 +21148,25 @@ class Axios {
20745
21148
  config.allowAbsoluteUrls = true;
20746
21149
  }
20747
21150
 
20748
- validator.assertOptions(config, {
20749
- baseUrl: validators.spelling('baseURL'),
20750
- withXsrfToken: validators.spelling('withXSRFToken')
20751
- }, true);
21151
+ validator.assertOptions(
21152
+ config,
21153
+ {
21154
+ baseUrl: validators.spelling('baseURL'),
21155
+ withXsrfToken: validators.spelling('withXSRFToken'),
21156
+ },
21157
+ true
21158
+ );
20752
21159
 
20753
21160
  // Set config.method
20754
21161
  config.method = (config.method || this.defaults.method || 'get').toLowerCase();
20755
21162
 
20756
21163
  // Flatten headers
20757
- let contextHeaders = headers && utils$1.merge(
20758
- headers.common,
20759
- headers[config.method]
20760
- );
21164
+ let contextHeaders = headers && utils$1.merge(headers.common, headers[config.method]);
20761
21165
 
20762
- headers && utils$1.forEach(
20763
- ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
20764
- (method) => {
21166
+ headers &&
21167
+ utils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], (method) => {
20765
21168
  delete headers[method];
20766
- }
20767
- );
21169
+ });
20768
21170
 
20769
21171
  config.headers = AxiosHeaders$1.concat(contextHeaders, headers);
20770
21172
 
@@ -20778,7 +21180,15 @@ class Axios {
20778
21180
 
20779
21181
  synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
20780
21182
 
20781
- requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
21183
+ const transitional = config.transitional || transitionalDefaults;
21184
+ const legacyInterceptorReqResOrdering =
21185
+ transitional && transitional.legacyInterceptorReqResOrdering;
21186
+
21187
+ if (legacyInterceptorReqResOrdering) {
21188
+ requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
21189
+ } else {
21190
+ requestInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
21191
+ }
20782
21192
  });
20783
21193
 
20784
21194
  const responseInterceptorChain = [];
@@ -20846,28 +21256,32 @@ class Axios {
20846
21256
  // Provide aliases for supported request methods
20847
21257
  utils$1.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
20848
21258
  /*eslint func-names:0*/
20849
- Axios.prototype[method] = function(url, config) {
20850
- return this.request(mergeConfig(config || {}, {
20851
- method,
20852
- url,
20853
- data: (config || {}).data
20854
- }));
21259
+ Axios.prototype[method] = function (url, config) {
21260
+ return this.request(
21261
+ mergeConfig(config || {}, {
21262
+ method,
21263
+ url,
21264
+ data: (config || {}).data,
21265
+ })
21266
+ );
20855
21267
  };
20856
21268
  });
20857
21269
 
20858
21270
  utils$1.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
20859
- /*eslint func-names:0*/
20860
-
20861
21271
  function generateHTTPMethod(isForm) {
20862
21272
  return function httpMethod(url, data, config) {
20863
- return this.request(mergeConfig(config || {}, {
20864
- method,
20865
- headers: isForm ? {
20866
- 'Content-Type': 'multipart/form-data'
20867
- } : {},
20868
- url,
20869
- data
20870
- }));
21273
+ return this.request(
21274
+ mergeConfig(config || {}, {
21275
+ method,
21276
+ headers: isForm
21277
+ ? {
21278
+ 'Content-Type': 'multipart/form-data',
21279
+ }
21280
+ : {},
21281
+ url,
21282
+ data,
21283
+ })
21284
+ );
20871
21285
  };
20872
21286
  }
20873
21287
 
@@ -20900,7 +21314,7 @@ class CancelToken {
20900
21314
  const token = this;
20901
21315
 
20902
21316
  // eslint-disable-next-line func-names
20903
- this.promise.then(cancel => {
21317
+ this.promise.then((cancel) => {
20904
21318
  if (!token._listeners) return;
20905
21319
 
20906
21320
  let i = token._listeners.length;
@@ -20912,10 +21326,10 @@ class CancelToken {
20912
21326
  });
20913
21327
 
20914
21328
  // eslint-disable-next-line func-names
20915
- this.promise.then = onfulfilled => {
21329
+ this.promise.then = (onfulfilled) => {
20916
21330
  let _resolve;
20917
21331
  // eslint-disable-next-line func-names
20918
- const promise = new Promise(resolve => {
21332
+ const promise = new Promise((resolve) => {
20919
21333
  token.subscribe(resolve);
20920
21334
  _resolve = resolve;
20921
21335
  }).then(onfulfilled);
@@ -21003,7 +21417,7 @@ class CancelToken {
21003
21417
  });
21004
21418
  return {
21005
21419
  token,
21006
- cancel
21420
+ cancel,
21007
21421
  };
21008
21422
  }
21009
21423
  }
@@ -21045,7 +21459,7 @@ function spread(callback) {
21045
21459
  * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
21046
21460
  */
21047
21461
  function isAxiosError(payload) {
21048
- return utils$1.isObject(payload) && (payload.isAxiosError === true);
21462
+ return utils$1.isObject(payload) && payload.isAxiosError === true;
21049
21463
  }
21050
21464
 
21051
21465
  const HttpStatusCode = {
@@ -21138,10 +21552,10 @@ function createInstance(defaultConfig) {
21138
21552
  const instance = bind(Axios$1.prototype.request, context);
21139
21553
 
21140
21554
  // Copy axios.prototype to instance
21141
- utils$1.extend(instance, Axios$1.prototype, context, {allOwnKeys: true});
21555
+ utils$1.extend(instance, Axios$1.prototype, context, { allOwnKeys: true });
21142
21556
 
21143
21557
  // Copy context to instance
21144
- utils$1.extend(instance, context, null, {allOwnKeys: true});
21558
+ utils$1.extend(instance, context, null, { allOwnKeys: true });
21145
21559
 
21146
21560
  // Factory for creating new instances
21147
21561
  instance.create = function create(instanceConfig) {
@@ -21185,7 +21599,7 @@ axios.mergeConfig = mergeConfig;
21185
21599
 
21186
21600
  axios.AxiosHeaders = AxiosHeaders$1;
21187
21601
 
21188
- axios.formToJSON = thing => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);
21602
+ axios.formToJSON = (thing) => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);
21189
21603
 
21190
21604
  axios.getAdapter = adapters.getAdapter;
21191
21605
 
@@ -21278,18 +21692,26 @@ const DEFAULT_TRANSLATIONS = {
21278
21692
  const API_ENDPOINTS = {
21279
21693
  ADD_USER: '/user/add-from-partner',
21280
21694
  VALIDATE_EMAIL: '/user/validate',
21281
- GET_COUNTRIES: '/common/country-list',
21695
+ GET_COUNTRIES: '/form-library/country-list',
21282
21696
  CHECK_MAINTENANCE: '/app-configuration/maintenance-status',
21283
- GET_ORG_SIZES: '/common/orgsizing-list',
21284
- GET_INDUSTRIES: '/common/industry-list',
21697
+ GET_ORG_SIZES: '/form-library/orgsizing-list',
21698
+ GET_INDUSTRIES: '/form-library/industry-list',
21285
21699
  GET_PARTNER: '/partner/get',
21286
21700
  GET_PARTNER_BY_GUID: '/partner/get-by-guid',
21287
21701
  GET_LOCALIZATION: '/localization/get',
21288
21702
  };
21289
21703
 
21290
21704
  class ApiService {
21291
- constructor(baseUrl) {
21705
+ constructor(baseUrl, partnerGuid) {
21292
21706
  this.baseUrl = baseUrl.endsWith("/") ? baseUrl.slice(0, -1) : baseUrl;
21707
+ this.axios = axios$1.create();
21708
+ this.axios.interceptors.request.use((config) => {
21709
+ if (partnerGuid) {
21710
+ config.headers.set("X-Partner-Guid", partnerGuid);
21711
+ }
21712
+ return config;
21713
+ });
21714
+ this.axiosPlain = axios$1.create();
21293
21715
  }
21294
21716
  getUrl(path) {
21295
21717
  const isLocalhost = this.baseUrl.includes("localhost");
@@ -21301,7 +21723,7 @@ class ApiService {
21301
21723
  */
21302
21724
  async addUser(user, partnerName, callingDomain) {
21303
21725
  return new Promise((resolve, reject) => {
21304
- axios$1
21726
+ this.axios
21305
21727
  .post(this.getUrl(`${API_ENDPOINTS.ADD_USER}?partnerName=${partnerName}&callingDomain=${callingDomain}`), user)
21306
21728
  .then((response) => {
21307
21729
  if (response.data.isSuccess)
@@ -21319,7 +21741,7 @@ class ApiService {
21319
21741
  */
21320
21742
  async validateEmail(email, signal) {
21321
21743
  try {
21322
- const response = await axios$1.get(this.getUrl(API_ENDPOINTS.VALIDATE_EMAIL), {
21744
+ const response = await this.axios.get(this.getUrl(API_ENDPOINTS.VALIDATE_EMAIL), {
21323
21745
  params: { email },
21324
21746
  signal,
21325
21747
  });
@@ -21344,7 +21766,7 @@ class ApiService {
21344
21766
  */
21345
21767
  async getCountries() {
21346
21768
  try {
21347
- const response = await axios$1.get(this.getUrl(API_ENDPOINTS.GET_COUNTRIES));
21769
+ const response = await this.axios.get(this.getUrl(API_ENDPOINTS.GET_COUNTRIES));
21348
21770
  // Handle both wrapped and unwrapped responses
21349
21771
  if (response.data.isSuccess !== undefined) {
21350
21772
  // Wrapped response from your API
@@ -21381,7 +21803,7 @@ class ApiService {
21381
21803
  */
21382
21804
  async checkMaintenanceStatus() {
21383
21805
  try {
21384
- const response = await axios$1.get(this.getUrl(API_ENDPOINTS.CHECK_MAINTENANCE));
21806
+ const response = await this.axios.get(this.getUrl(API_ENDPOINTS.CHECK_MAINTENANCE));
21385
21807
  if (response.data.isSuccess) {
21386
21808
  return response.data.data;
21387
21809
  }
@@ -21399,7 +21821,7 @@ class ApiService {
21399
21821
  */
21400
21822
  async getOrgSizes() {
21401
21823
  try {
21402
- const response = await axios$1.get(this.getUrl(API_ENDPOINTS.GET_ORG_SIZES));
21824
+ const response = await this.axios.get(this.getUrl(API_ENDPOINTS.GET_ORG_SIZES));
21403
21825
  if (response.data.isSuccess) {
21404
21826
  // Map from your API format (lowerBound/upperBound) to library format (sizeLowerBound/sizeUpperBound)
21405
21827
  return response.data.data.map((size) => ({
@@ -21427,7 +21849,7 @@ class ApiService {
21427
21849
  */
21428
21850
  async getIndustries() {
21429
21851
  try {
21430
- const response = await axios$1.get(this.getUrl(API_ENDPOINTS.GET_INDUSTRIES));
21852
+ const response = await this.axios.get(this.getUrl(API_ENDPOINTS.GET_INDUSTRIES));
21431
21853
  if (response.data.isSuccess) {
21432
21854
  // Your API already returns { id, name } format
21433
21855
  return response.data.data;
@@ -21456,7 +21878,7 @@ class ApiService {
21456
21878
  domain = domain.replace(/^(https?:\/\/)/, "");
21457
21879
  // Remove www. prefix if present (but keep port)
21458
21880
  domain = domain.replace(/^www\./, "");
21459
- const response = await axios$1.get(this.getUrl(API_ENDPOINTS.GET_PARTNER), {
21881
+ const response = await this.axios.get(this.getUrl(API_ENDPOINTS.GET_PARTNER), {
21460
21882
  params: { domain },
21461
21883
  });
21462
21884
  if (response.data.isSuccess) {
@@ -21479,7 +21901,7 @@ class ApiService {
21479
21901
  */
21480
21902
  async getPartnerByGuid(partnerGuid) {
21481
21903
  try {
21482
- const response = await axios$1.get(this.getUrl(API_ENDPOINTS.GET_PARTNER_BY_GUID), {
21904
+ const response = await this.axiosPlain.get(this.getUrl(API_ENDPOINTS.GET_PARTNER_BY_GUID), {
21483
21905
  params: { guid: partnerGuid },
21484
21906
  });
21485
21907
  if (response.data.isSuccess) {
@@ -21501,7 +21923,7 @@ class ApiService {
21501
21923
  */
21502
21924
  async getFormScreenLocalization(languageCode, partnerId) {
21503
21925
  try {
21504
- const response = await axios$1.get(this.getUrl(`${API_ENDPOINTS.GET_LOCALIZATION}/${languageCode}/FormScreen/${partnerId}`));
21926
+ const response = await this.axios.get(this.getUrl(`${API_ENDPOINTS.GET_LOCALIZATION}/${languageCode}/FormScreen/${partnerId}`));
21505
21927
  if (response.data.isSuccess) {
21506
21928
  return response.data.data;
21507
21929
  }
@@ -21535,6 +21957,15 @@ const createFormStyles = (primaryColor = '#00BAE4', fonts, backgroundColor = '#F
21535
21957
  padding: '5% 10%',
21536
21958
  },
21537
21959
  },
21960
+ thankyouTopWrapper: {
21961
+ display: 'flex',
21962
+ flexDirection: 'column',
21963
+ alignItems: 'center',
21964
+ padding: '5% 15%',
21965
+ '@media (max-width: 768px)': {
21966
+ padding: '5% 10%',
21967
+ },
21968
+ },
21538
21969
  formWrapper: {
21539
21970
  backgroundColor: '#fff',
21540
21971
  minWidth: '600px',
@@ -22408,9 +22839,9 @@ const SSASRegistrationForm = ({ config, }) => {
22408
22839
  const mergedConfig = useFormConfig(config);
22409
22840
  // Stable service used only for partner lookup (works with relative URLs)
22410
22841
  const initCheckUrl = mergedConfig.apiBaseUrl || "https://portal.selfserviceassessment.com";
22411
- const partnerApiService = useMemo(() => new ApiService(initCheckUrl), [initCheckUrl]);
22842
+ const partnerApiService = useMemo(() => new ApiService(initCheckUrl, mergedConfig.partnerGuid), [initCheckUrl, mergedConfig.partnerGuid]);
22412
22843
  // Main service uses the partner's own domain once loaded
22413
- const apiService = useMemo(() => new ApiService(partnerData?.domain ? new URL(`https://${partnerData?.domain}`).toString() : ""), [partnerData?.domain]);
22844
+ const apiService = useMemo(() => new ApiService(partnerData?.domain ? new URL(`https://${partnerData?.domain}`).toString() : "", mergedConfig.partnerGuid), [partnerData?.domain, mergedConfig.partnerGuid]);
22414
22845
  const styles = useMemo(() => createFormStyles(mergedConfig.theme?.primaryColor || colorWidget?.column1, mergedConfig.theme?.fonts, mergedConfig.theme?.backgroundColor), [mergedConfig.theme?.primaryColor, mergedConfig.theme?.fonts, mergedConfig.theme?.backgroundColor, colorWidget?.column1]);
22415
22846
  const [isRegistering, setIsRegistering] = useState(false);
22416
22847
  const [performByPartner, setPerformByPartner] = useState(false);
@@ -22685,7 +23116,7 @@ const SSASRegistrationForm = ({ config, }) => {
22685
23116
  if (finalStep) {
22686
23117
  // Default success screen
22687
23118
  return (React__default.createElement("div", { className: styles.mainContainer },
22688
- React__default.createElement("div", { className: styles.topWrapper, style: mergedConfig.customStyles?.topWrapper },
23119
+ React__default.createElement("div", { className: styles.thankyouTopWrapper },
22689
23120
  React__default.createElement("div", { className: styles.finalStepContainer },
22690
23121
  React__default.createElement("div", { className: styles.textBlock },
22691
23122
  React__default.createElement("div", { style: {