@qssolutions/ssas-registration-form 1.0.6 → 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.js CHANGED
@@ -96,7 +96,7 @@ lodash.exports;
96
96
  var undefined$1;
97
97
 
98
98
  /** Used as the semantic version number. */
99
- var VERSION = '4.17.23';
99
+ var VERSION = '4.18.1';
100
100
 
101
101
  /** Used as the size to enable large array optimizations. */
102
102
  var LARGE_ARRAY_SIZE = 200;
@@ -104,7 +104,8 @@ lodash.exports;
104
104
  /** Error message constants. */
105
105
  var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',
106
106
  FUNC_ERROR_TEXT = 'Expected a function',
107
- INVALID_TEMPL_VAR_ERROR_TEXT = 'Invalid `variable` option passed into `_.template`';
107
+ INVALID_TEMPL_VAR_ERROR_TEXT = 'Invalid `variable` option passed into `_.template`',
108
+ INVALID_TEMPL_IMPORTS_ERROR_TEXT = 'Invalid `imports` option passed into `_.template`';
108
109
 
109
110
  /** Used to stand-in for `undefined` hash values. */
110
111
  var HASH_UNDEFINED = '__lodash_hash_undefined__';
@@ -1836,6 +1837,10 @@ lodash.exports;
1836
1837
  * embedded Ruby (ERB) as well as ES2015 template strings. Change the
1837
1838
  * following template settings to use alternative delimiters.
1838
1839
  *
1840
+ * **Security:** See
1841
+ * [threat model](https://github.com/lodash/lodash/blob/main/threat-model.md)
1842
+ * — `_.template` is insecure and will be removed in v5.
1843
+ *
1839
1844
  * @static
1840
1845
  * @memberOf _
1841
1846
  * @type {Object}
@@ -2384,7 +2389,7 @@ lodash.exports;
2384
2389
  * @name has
2385
2390
  * @memberOf SetCache
2386
2391
  * @param {*} value The value to search for.
2387
- * @returns {number} Returns `true` if `value` is found, else `false`.
2392
+ * @returns {boolean} Returns `true` if `value` is found, else `false`.
2388
2393
  */
2389
2394
  function setCacheHas(value) {
2390
2395
  return this.__data__.has(value);
@@ -4455,7 +4460,9 @@ lodash.exports;
4455
4460
  function baseUnset(object, path) {
4456
4461
  path = castPath(path, object);
4457
4462
 
4458
- // Prevent prototype pollution, see: https://github.com/lodash/lodash/security/advisories/GHSA-xxjr-mmjv-4gpg
4463
+ // Prevent prototype pollution:
4464
+ // https://github.com/lodash/lodash/security/advisories/GHSA-xxjr-mmjv-4gpg
4465
+ // https://github.com/lodash/lodash/security/advisories/GHSA-f23m-r3pf-42rh
4459
4466
  var index = -1,
4460
4467
  length = path.length;
4461
4468
 
@@ -4463,32 +4470,17 @@ lodash.exports;
4463
4470
  return true;
4464
4471
  }
4465
4472
 
4466
- var isRootPrimitive = object == null || (typeof object !== 'object' && typeof object !== 'function');
4467
-
4468
4473
  while (++index < length) {
4469
- var key = path[index];
4470
-
4471
- // skip non-string keys (e.g., Symbols, numbers)
4472
- if (typeof key !== 'string') {
4473
- continue;
4474
- }
4474
+ var key = toKey(path[index]);
4475
4475
 
4476
4476
  // Always block "__proto__" anywhere in the path if it's not expected
4477
4477
  if (key === '__proto__' && !hasOwnProperty.call(object, '__proto__')) {
4478
4478
  return false;
4479
4479
  }
4480
4480
 
4481
- // Block "constructor.prototype" chains
4482
- if (key === 'constructor' &&
4483
- (index + 1) < length &&
4484
- typeof path[index + 1] === 'string' &&
4485
- path[index + 1] === 'prototype') {
4486
-
4487
- // Allow ONLY when the path starts at a primitive root, e.g., _.unset(0, 'constructor.prototype.a')
4488
- if (isRootPrimitive && index === 0) {
4489
- continue;
4490
- }
4491
-
4481
+ // Block constructor/prototype as non-terminal traversal keys to prevent
4482
+ // escaping the object graph into built-in constructors and prototypes.
4483
+ if ((key === 'constructor' || key === 'prototype') && index < length - 1) {
4492
4484
  return false;
4493
4485
  }
4494
4486
  }
@@ -7045,7 +7037,7 @@ lodash.exports;
7045
7037
 
7046
7038
  /**
7047
7039
  * Creates an array with all falsey values removed. The values `false`, `null`,
7048
- * `0`, `""`, `undefined`, and `NaN` are falsey.
7040
+ * `0`, `-0`, `0n`, `""`, `undefined`, and `NaN` are falsy.
7049
7041
  *
7050
7042
  * @static
7051
7043
  * @memberOf _
@@ -7584,7 +7576,7 @@ lodash.exports;
7584
7576
 
7585
7577
  while (++index < length) {
7586
7578
  var pair = pairs[index];
7587
- result[pair[0]] = pair[1];
7579
+ baseAssignValue(result, pair[0], pair[1]);
7588
7580
  }
7589
7581
  return result;
7590
7582
  }
@@ -14244,6 +14236,8 @@ lodash.exports;
14244
14236
  * **Note:** JavaScript follows the IEEE-754 standard for resolving
14245
14237
  * floating-point values which can produce unexpected results.
14246
14238
  *
14239
+ * **Note:** If `lower` is greater than `upper`, the values are swapped.
14240
+ *
14247
14241
  * @static
14248
14242
  * @memberOf _
14249
14243
  * @since 0.7.0
@@ -14257,9 +14251,16 @@ lodash.exports;
14257
14251
  * _.random(0, 5);
14258
14252
  * // => an integer between 0 and 5
14259
14253
  *
14254
+ * // when lower is greater than upper the values are swapped
14255
+ * _.random(5, 0);
14256
+ * // => an integer between 0 and 5
14257
+ *
14260
14258
  * _.random(5);
14261
14259
  * // => also an integer between 0 and 5
14262
14260
  *
14261
+ * _.random(-5);
14262
+ * // => an integer between -5 and 0
14263
+ *
14263
14264
  * _.random(5, true);
14264
14265
  * // => a floating-point number between 0 and 5
14265
14266
  *
@@ -14861,6 +14862,10 @@ lodash.exports;
14861
14862
  * properties may be accessed as free variables in the template. If a setting
14862
14863
  * object is given, it takes precedence over `_.templateSettings` values.
14863
14864
  *
14865
+ * **Security:** `_.template` is insecure and should not be used. It will be
14866
+ * removed in Lodash v5. Avoid untrusted input. See
14867
+ * [threat model](https://github.com/lodash/lodash/blob/main/threat-model.md).
14868
+ *
14864
14869
  * **Note:** In the development build `_.template` utilizes
14865
14870
  * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)
14866
14871
  * for easier debugging.
@@ -14968,12 +14973,18 @@ lodash.exports;
14968
14973
  options = undefined$1;
14969
14974
  }
14970
14975
  string = toString(string);
14971
- options = assignInWith({}, options, settings, customDefaultsAssignIn);
14976
+ options = assignWith({}, options, settings, customDefaultsAssignIn);
14972
14977
 
14973
- var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn),
14978
+ var imports = assignWith({}, options.imports, settings.imports, customDefaultsAssignIn),
14974
14979
  importsKeys = keys(imports),
14975
14980
  importsValues = baseValues(imports, importsKeys);
14976
14981
 
14982
+ arrayEach(importsKeys, function(key) {
14983
+ if (reForbiddenIdentifierChars.test(key)) {
14984
+ throw new Error(INVALID_TEMPL_IMPORTS_ERROR_TEXT);
14985
+ }
14986
+ });
14987
+
14977
14988
  var isEscaping,
14978
14989
  isEvaluating,
14979
14990
  index = 0,
@@ -17345,30 +17356,30 @@ function bind(fn, thisArg) {
17345
17356
 
17346
17357
  // utils is a library of generic helper functions non-specific to axios
17347
17358
 
17348
- const {toString} = Object.prototype;
17349
- const {getPrototypeOf} = Object;
17350
- const {iterator, toStringTag} = Symbol;
17359
+ const { toString } = Object.prototype;
17360
+ const { getPrototypeOf } = Object;
17361
+ const { iterator, toStringTag } = Symbol;
17351
17362
 
17352
- const kindOf = (cache => thing => {
17353
- const str = toString.call(thing);
17354
- return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
17363
+ const kindOf = ((cache) => (thing) => {
17364
+ const str = toString.call(thing);
17365
+ return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
17355
17366
  })(Object.create(null));
17356
17367
 
17357
17368
  const kindOfTest = (type) => {
17358
17369
  type = type.toLowerCase();
17359
- return (thing) => kindOf(thing) === type
17370
+ return (thing) => kindOf(thing) === type;
17360
17371
  };
17361
17372
 
17362
- const typeOfTest = type => thing => typeof thing === type;
17373
+ const typeOfTest = (type) => (thing) => typeof thing === type;
17363
17374
 
17364
17375
  /**
17365
- * Determine if a value is an Array
17376
+ * Determine if a value is a non-null object
17366
17377
  *
17367
17378
  * @param {Object} val The value to test
17368
17379
  *
17369
17380
  * @returns {boolean} True if value is an Array, otherwise false
17370
17381
  */
17371
- const {isArray} = Array;
17382
+ const { isArray } = Array;
17372
17383
 
17373
17384
  /**
17374
17385
  * Determine if a value is undefined
@@ -17387,8 +17398,14 @@ const isUndefined = typeOfTest('undefined');
17387
17398
  * @returns {boolean} True if value is a Buffer, otherwise false
17388
17399
  */
17389
17400
  function isBuffer(val) {
17390
- return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)
17391
- && isFunction$1(val.constructor.isBuffer) && val.constructor.isBuffer(val);
17401
+ return (
17402
+ val !== null &&
17403
+ !isUndefined(val) &&
17404
+ val.constructor !== null &&
17405
+ !isUndefined(val.constructor) &&
17406
+ isFunction$1(val.constructor.isBuffer) &&
17407
+ val.constructor.isBuffer(val)
17408
+ );
17392
17409
  }
17393
17410
 
17394
17411
  /**
@@ -17400,7 +17417,6 @@ function isBuffer(val) {
17400
17417
  */
17401
17418
  const isArrayBuffer = kindOfTest('ArrayBuffer');
17402
17419
 
17403
-
17404
17420
  /**
17405
17421
  * Determine if a value is a view on an ArrayBuffer
17406
17422
  *
@@ -17410,10 +17426,10 @@ const isArrayBuffer = kindOfTest('ArrayBuffer');
17410
17426
  */
17411
17427
  function isArrayBufferView(val) {
17412
17428
  let result;
17413
- if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
17429
+ if (typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView) {
17414
17430
  result = ArrayBuffer.isView(val);
17415
17431
  } else {
17416
- result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));
17432
+ result = val && val.buffer && isArrayBuffer(val.buffer);
17417
17433
  }
17418
17434
  return result;
17419
17435
  }
@@ -17459,7 +17475,7 @@ const isObject$1 = (thing) => thing !== null && typeof thing === 'object';
17459
17475
  * @param {*} thing The value to test
17460
17476
  * @returns {boolean} True if value is a Boolean, otherwise false
17461
17477
  */
17462
- const isBoolean = thing => thing === true || thing === false;
17478
+ const isBoolean = (thing) => thing === true || thing === false;
17463
17479
 
17464
17480
  /**
17465
17481
  * Determine if a value is a plain Object
@@ -17474,7 +17490,13 @@ const isPlainObject = (val) => {
17474
17490
  }
17475
17491
 
17476
17492
  const prototype = getPrototypeOf(val);
17477
- return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(toStringTag in val) && !(iterator in val);
17493
+ return (
17494
+ (prototype === null ||
17495
+ prototype === Object.prototype ||
17496
+ Object.getPrototypeOf(prototype) === null) &&
17497
+ !(toStringTag in val) &&
17498
+ !(iterator in val)
17499
+ );
17478
17500
  };
17479
17501
 
17480
17502
  /**
@@ -17516,6 +17538,31 @@ const isDate = kindOfTest('Date');
17516
17538
  */
17517
17539
  const isFile = kindOfTest('File');
17518
17540
 
17541
+ /**
17542
+ * Determine if a value is a React Native Blob
17543
+ * React Native "blob": an object with a `uri` attribute. Optionally, it can
17544
+ * also have a `name` and `type` attribute to specify filename and content type
17545
+ *
17546
+ * @see https://github.com/facebook/react-native/blob/26684cf3adf4094eb6c405d345a75bf8c7c0bf88/Libraries/Network/FormData.js#L68-L71
17547
+ *
17548
+ * @param {*} value The value to test
17549
+ *
17550
+ * @returns {boolean} True if value is a React Native Blob, otherwise false
17551
+ */
17552
+ const isReactNativeBlob = (value) => {
17553
+ return !!(value && typeof value.uri !== 'undefined');
17554
+ };
17555
+
17556
+ /**
17557
+ * Determine if environment is React Native
17558
+ * ReactNative `FormData` has a non-standard `getParts()` method
17559
+ *
17560
+ * @param {*} formData The formData to test
17561
+ *
17562
+ * @returns {boolean} True if environment is React Native, otherwise false
17563
+ */
17564
+ const isReactNative = (formData) => formData && typeof formData.getParts !== 'undefined';
17565
+
17519
17566
  /**
17520
17567
  * Determine if a value is a Blob
17521
17568
  *
@@ -17550,17 +17597,28 @@ const isStream = (val) => isObject$1(val) && isFunction$1(val.pipe);
17550
17597
  *
17551
17598
  * @returns {boolean} True if value is an FormData, otherwise false
17552
17599
  */
17600
+ function getGlobal() {
17601
+ if (typeof globalThis !== 'undefined') return globalThis;
17602
+ if (typeof self !== 'undefined') return self;
17603
+ if (typeof window !== 'undefined') return window;
17604
+ if (typeof global !== 'undefined') return global;
17605
+ return {};
17606
+ }
17607
+
17608
+ const G = getGlobal();
17609
+ const FormDataCtor = typeof G.FormData !== 'undefined' ? G.FormData : undefined;
17610
+
17553
17611
  const isFormData = (thing) => {
17554
17612
  let kind;
17555
17613
  return thing && (
17556
- (typeof FormData === 'function' && thing instanceof FormData) || (
17614
+ (FormDataCtor && thing instanceof FormDataCtor) || (
17557
17615
  isFunction$1(thing.append) && (
17558
17616
  (kind = kindOf(thing)) === 'formdata' ||
17559
17617
  // detect form-data instance
17560
17618
  (kind === 'object' && isFunction$1(thing.toString) && thing.toString() === '[object FormData]')
17561
17619
  )
17562
17620
  )
17563
- )
17621
+ );
17564
17622
  };
17565
17623
 
17566
17624
  /**
@@ -17572,7 +17630,12 @@ const isFormData = (thing) => {
17572
17630
  */
17573
17631
  const isURLSearchParams = kindOfTest('URLSearchParams');
17574
17632
 
17575
- const [isReadableStream, isRequest, isResponse, isHeaders] = ['ReadableStream', 'Request', 'Response', 'Headers'].map(kindOfTest);
17633
+ const [isReadableStream, isRequest, isResponse, isHeaders] = [
17634
+ 'ReadableStream',
17635
+ 'Request',
17636
+ 'Response',
17637
+ 'Headers',
17638
+ ].map(kindOfTest);
17576
17639
 
17577
17640
  /**
17578
17641
  * Trim excess whitespace off the beginning and end of a string
@@ -17581,9 +17644,9 @@ const [isReadableStream, isRequest, isResponse, isHeaders] = ['ReadableStream',
17581
17644
  *
17582
17645
  * @returns {String} The String freed of excess whitespace
17583
17646
  */
17584
- const trim = (str) => str.trim ?
17585
- str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
17586
-
17647
+ const trim = (str) => {
17648
+ return str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
17649
+ };
17587
17650
  /**
17588
17651
  * Iterate over an Array or an Object invoking a function for each item.
17589
17652
  *
@@ -17600,7 +17663,7 @@ const trim = (str) => str.trim ?
17600
17663
  * @param {Boolean} [options.allOwnKeys = false]
17601
17664
  * @returns {any}
17602
17665
  */
17603
- function forEach(obj, fn, {allOwnKeys = false} = {}) {
17666
+ function forEach(obj, fn, { allOwnKeys = false } = {}) {
17604
17667
  // Don't bother if no value provided
17605
17668
  if (obj === null || typeof obj === 'undefined') {
17606
17669
  return;
@@ -17638,8 +17701,16 @@ function forEach(obj, fn, {allOwnKeys = false} = {}) {
17638
17701
  }
17639
17702
  }
17640
17703
 
17704
+ /**
17705
+ * Finds a key in an object, case-insensitive, returning the actual key name.
17706
+ * Returns null if the object is a Buffer or if no match is found.
17707
+ *
17708
+ * @param {Object} obj - The object to search.
17709
+ * @param {string} key - The key to find (case-insensitive).
17710
+ * @returns {?string} The actual key name if found, otherwise null.
17711
+ */
17641
17712
  function findKey(obj, key) {
17642
- if (isBuffer(obj)){
17713
+ if (isBuffer(obj)) {
17643
17714
  return null;
17644
17715
  }
17645
17716
 
@@ -17658,8 +17729,8 @@ function findKey(obj, key) {
17658
17729
 
17659
17730
  const _global = (() => {
17660
17731
  /*eslint no-undef:0*/
17661
- if (typeof globalThis !== "undefined") return globalThis;
17662
- return typeof self !== "undefined" ? self : (typeof window !== 'undefined' ? window : global)
17732
+ if (typeof globalThis !== 'undefined') return globalThis;
17733
+ return typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : global;
17663
17734
  })();
17664
17735
 
17665
17736
  const isContextDefined = (context) => !isUndefined(context) && context !== _global;
@@ -17683,10 +17754,15 @@ const isContextDefined = (context) => !isUndefined(context) && context !== _glob
17683
17754
  * @returns {Object} Result of all merge properties
17684
17755
  */
17685
17756
  function merge(/* obj1, obj2, obj3, ... */) {
17686
- const {caseless, skipUndefined} = isContextDefined(this) && this || {};
17757
+ const { caseless, skipUndefined } = (isContextDefined(this) && this) || {};
17687
17758
  const result = {};
17688
17759
  const assignValue = (val, key) => {
17689
- const targetKey = caseless && findKey(result, key) || key;
17760
+ // Skip dangerous property names to prevent prototype pollution
17761
+ if (key === '__proto__' || key === 'constructor' || key === 'prototype') {
17762
+ return;
17763
+ }
17764
+
17765
+ const targetKey = (caseless && findKey(result, key)) || key;
17690
17766
  if (isPlainObject(result[targetKey]) && isPlainObject(val)) {
17691
17767
  result[targetKey] = merge(result[targetKey], val);
17692
17768
  } else if (isPlainObject(val)) {
@@ -17715,24 +17791,28 @@ function merge(/* obj1, obj2, obj3, ... */) {
17715
17791
  * @param {Boolean} [options.allOwnKeys]
17716
17792
  * @returns {Object} The resulting value of object a
17717
17793
  */
17718
- const extend = (a, b, thisArg, {allOwnKeys}= {}) => {
17719
- forEach(b, (val, key) => {
17720
- if (thisArg && isFunction$1(val)) {
17721
- Object.defineProperty(a, key, {
17722
- value: bind(val, thisArg),
17723
- writable: true,
17724
- enumerable: true,
17725
- configurable: true
17726
- });
17727
- } else {
17728
- Object.defineProperty(a, key, {
17729
- value: val,
17730
- writable: true,
17731
- enumerable: true,
17732
- configurable: true
17733
- });
17734
- }
17735
- }, {allOwnKeys});
17794
+ const extend = (a, b, thisArg, { allOwnKeys } = {}) => {
17795
+ forEach(
17796
+ b,
17797
+ (val, key) => {
17798
+ if (thisArg && isFunction$1(val)) {
17799
+ Object.defineProperty(a, key, {
17800
+ value: bind(val, thisArg),
17801
+ writable: true,
17802
+ enumerable: true,
17803
+ configurable: true,
17804
+ });
17805
+ } else {
17806
+ Object.defineProperty(a, key, {
17807
+ value: val,
17808
+ writable: true,
17809
+ enumerable: true,
17810
+ configurable: true,
17811
+ });
17812
+ }
17813
+ },
17814
+ { allOwnKeys }
17815
+ );
17736
17816
  return a;
17737
17817
  };
17738
17818
 
@@ -17744,7 +17824,7 @@ const extend = (a, b, thisArg, {allOwnKeys}= {}) => {
17744
17824
  * @returns {string} content value without BOM
17745
17825
  */
17746
17826
  const stripBOM = (content) => {
17747
- if (content.charCodeAt(0) === 0xFEFF) {
17827
+ if (content.charCodeAt(0) === 0xfeff) {
17748
17828
  content = content.slice(1);
17749
17829
  }
17750
17830
  return content;
@@ -17765,10 +17845,10 @@ const inherits = (constructor, superConstructor, props, descriptors) => {
17765
17845
  value: constructor,
17766
17846
  writable: true,
17767
17847
  enumerable: false,
17768
- configurable: true
17848
+ configurable: true,
17769
17849
  });
17770
17850
  Object.defineProperty(constructor, 'super', {
17771
- value: superConstructor.prototype
17851
+ value: superConstructor.prototype,
17772
17852
  });
17773
17853
  props && Object.assign(constructor.prototype, props);
17774
17854
  };
@@ -17827,7 +17907,6 @@ const endsWith = (str, searchString, position) => {
17827
17907
  return lastIndex !== -1 && lastIndex === position;
17828
17908
  };
17829
17909
 
17830
-
17831
17910
  /**
17832
17911
  * Returns new array from array like object or null if failed
17833
17912
  *
@@ -17856,9 +17935,9 @@ const toArray = (thing) => {
17856
17935
  * @returns {Array}
17857
17936
  */
17858
17937
  // eslint-disable-next-line func-names
17859
- const isTypedArray = (TypedArray => {
17938
+ const isTypedArray = ((TypedArray) => {
17860
17939
  // eslint-disable-next-line func-names
17861
- return thing => {
17940
+ return (thing) => {
17862
17941
  return TypedArray && thing instanceof TypedArray;
17863
17942
  };
17864
17943
  })(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));
@@ -17906,16 +17985,18 @@ const matchAll = (regExp, str) => {
17906
17985
  /* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */
17907
17986
  const isHTMLForm = kindOfTest('HTMLFormElement');
17908
17987
 
17909
- const toCamelCase = str => {
17910
- return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,
17911
- function replacer(m, p1, p2) {
17912
- return p1.toUpperCase() + p2;
17913
- }
17914
- );
17988
+ const toCamelCase = (str) => {
17989
+ return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function replacer(m, p1, p2) {
17990
+ return p1.toUpperCase() + p2;
17991
+ });
17915
17992
  };
17916
17993
 
17917
17994
  /* Creating a function that will check if an object has a property. */
17918
- const hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);
17995
+ const hasOwnProperty = (
17996
+ ({ hasOwnProperty }) =>
17997
+ (obj, prop) =>
17998
+ hasOwnProperty.call(obj, prop)
17999
+ )(Object.prototype);
17919
18000
 
17920
18001
  /**
17921
18002
  * Determine if a value is a RegExp object
@@ -17965,17 +18046,25 @@ const freezeMethods = (obj) => {
17965
18046
 
17966
18047
  if (!descriptor.set) {
17967
18048
  descriptor.set = () => {
17968
- throw Error('Can not rewrite read-only method \'' + name + '\'');
18049
+ throw Error("Can not rewrite read-only method '" + name + "'");
17969
18050
  };
17970
18051
  }
17971
18052
  });
17972
18053
  };
17973
18054
 
18055
+ /**
18056
+ * Converts an array or a delimited string into an object set with values as keys and true as values.
18057
+ * Useful for fast membership checks.
18058
+ *
18059
+ * @param {Array|string} arrayOrString - The array or string to convert.
18060
+ * @param {string} delimiter - The delimiter to use if input is a string.
18061
+ * @returns {Object} An object with keys from the array or string, values set to true.
18062
+ */
17974
18063
  const toObjectSet = (arrayOrString, delimiter) => {
17975
18064
  const obj = {};
17976
18065
 
17977
18066
  const define = (arr) => {
17978
- arr.forEach(value => {
18067
+ arr.forEach((value) => {
17979
18068
  obj[value] = true;
17980
18069
  });
17981
18070
  };
@@ -17988,11 +18077,9 @@ const toObjectSet = (arrayOrString, delimiter) => {
17988
18077
  const noop = () => {};
17989
18078
 
17990
18079
  const toFiniteNumber = (value, defaultValue) => {
17991
- return value != null && Number.isFinite(value = +value) ? value : defaultValue;
18080
+ return value != null && Number.isFinite((value = +value)) ? value : defaultValue;
17992
18081
  };
17993
18082
 
17994
-
17995
-
17996
18083
  /**
17997
18084
  * If the thing is a FormData object, return true, otherwise return false.
17998
18085
  *
@@ -18001,14 +18088,24 @@ const toFiniteNumber = (value, defaultValue) => {
18001
18088
  * @returns {boolean}
18002
18089
  */
18003
18090
  function isSpecCompliantForm(thing) {
18004
- return !!(thing && isFunction$1(thing.append) && thing[toStringTag] === 'FormData' && thing[iterator]);
18091
+ return !!(
18092
+ thing &&
18093
+ isFunction$1(thing.append) &&
18094
+ thing[toStringTag] === 'FormData' &&
18095
+ thing[iterator]
18096
+ );
18005
18097
  }
18006
18098
 
18099
+ /**
18100
+ * Recursively converts an object to a JSON-compatible object, handling circular references and Buffers.
18101
+ *
18102
+ * @param {Object} obj - The object to convert.
18103
+ * @returns {Object} The JSON-compatible object.
18104
+ */
18007
18105
  const toJSONObject = (obj) => {
18008
18106
  const stack = new Array(10);
18009
18107
 
18010
18108
  const visit = (source, i) => {
18011
-
18012
18109
  if (isObject$1(source)) {
18013
18110
  if (stack.indexOf(source) >= 0) {
18014
18111
  return;
@@ -18019,7 +18116,7 @@ const toJSONObject = (obj) => {
18019
18116
  return source;
18020
18117
  }
18021
18118
 
18022
- if(!('toJSON' in source)) {
18119
+ if (!('toJSON' in source)) {
18023
18120
  stack[i] = source;
18024
18121
  const target = isArray(source) ? [] : {};
18025
18122
 
@@ -18040,45 +18137,77 @@ const toJSONObject = (obj) => {
18040
18137
  return visit(obj, 0);
18041
18138
  };
18042
18139
 
18140
+ /**
18141
+ * Determines if a value is an async function.
18142
+ *
18143
+ * @param {*} thing - The value to test.
18144
+ * @returns {boolean} True if value is an async function, otherwise false.
18145
+ */
18043
18146
  const isAsyncFn = kindOfTest('AsyncFunction');
18044
18147
 
18148
+ /**
18149
+ * Determines if a value is thenable (has then and catch methods).
18150
+ *
18151
+ * @param {*} thing - The value to test.
18152
+ * @returns {boolean} True if value is thenable, otherwise false.
18153
+ */
18045
18154
  const isThenable = (thing) =>
18046
- thing && (isObject$1(thing) || isFunction$1(thing)) && isFunction$1(thing.then) && isFunction$1(thing.catch);
18155
+ thing &&
18156
+ (isObject$1(thing) || isFunction$1(thing)) &&
18157
+ isFunction$1(thing.then) &&
18158
+ isFunction$1(thing.catch);
18047
18159
 
18048
18160
  // original code
18049
18161
  // https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34
18050
18162
 
18163
+ /**
18164
+ * Provides a cross-platform setImmediate implementation.
18165
+ * Uses native setImmediate if available, otherwise falls back to postMessage or setTimeout.
18166
+ *
18167
+ * @param {boolean} setImmediateSupported - Whether setImmediate is supported.
18168
+ * @param {boolean} postMessageSupported - Whether postMessage is supported.
18169
+ * @returns {Function} A function to schedule a callback asynchronously.
18170
+ */
18051
18171
  const _setImmediate = ((setImmediateSupported, postMessageSupported) => {
18052
18172
  if (setImmediateSupported) {
18053
18173
  return setImmediate;
18054
18174
  }
18055
18175
 
18056
- return postMessageSupported ? ((token, callbacks) => {
18057
- _global.addEventListener("message", ({source, data}) => {
18058
- if (source === _global && data === token) {
18059
- callbacks.length && callbacks.shift()();
18060
- }
18061
- }, false);
18176
+ return postMessageSupported
18177
+ ? ((token, callbacks) => {
18178
+ _global.addEventListener(
18179
+ 'message',
18180
+ ({ source, data }) => {
18181
+ if (source === _global && data === token) {
18182
+ callbacks.length && callbacks.shift()();
18183
+ }
18184
+ },
18185
+ false
18186
+ );
18062
18187
 
18063
- return (cb) => {
18064
- callbacks.push(cb);
18065
- _global.postMessage(token, "*");
18066
- }
18067
- })(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);
18068
- })(
18069
- typeof setImmediate === 'function',
18070
- isFunction$1(_global.postMessage)
18071
- );
18188
+ return (cb) => {
18189
+ callbacks.push(cb);
18190
+ _global.postMessage(token, '*');
18191
+ };
18192
+ })(`axios@${Math.random()}`, [])
18193
+ : (cb) => setTimeout(cb);
18194
+ })(typeof setImmediate === 'function', isFunction$1(_global.postMessage));
18072
18195
 
18073
- const asap = typeof queueMicrotask !== 'undefined' ?
18074
- queueMicrotask.bind(_global) : ( typeof process !== 'undefined' && process.nextTick || _setImmediate);
18196
+ /**
18197
+ * Schedules a microtask or asynchronous callback as soon as possible.
18198
+ * Uses queueMicrotask if available, otherwise falls back to process.nextTick or _setImmediate.
18199
+ *
18200
+ * @type {Function}
18201
+ */
18202
+ const asap =
18203
+ typeof queueMicrotask !== 'undefined'
18204
+ ? queueMicrotask.bind(_global)
18205
+ : (typeof process !== 'undefined' && process.nextTick) || _setImmediate;
18075
18206
 
18076
18207
  // *********************
18077
18208
 
18078
-
18079
18209
  const isIterable = (thing) => thing != null && isFunction$1(thing[iterator]);
18080
18210
 
18081
-
18082
18211
  var utils$1 = {
18083
18212
  isArray,
18084
18213
  isArrayBuffer,
@@ -18098,6 +18227,8 @@ var utils$1 = {
18098
18227
  isUndefined,
18099
18228
  isDate,
18100
18229
  isFile,
18230
+ isReactNativeBlob,
18231
+ isReactNative,
18101
18232
  isBlob,
18102
18233
  isRegExp,
18103
18234
  isFunction: isFunction$1,
@@ -18136,18 +18267,24 @@ var utils$1 = {
18136
18267
  isThenable,
18137
18268
  setImmediate: _setImmediate,
18138
18269
  asap,
18139
- isIterable
18270
+ isIterable,
18140
18271
  };
18141
18272
 
18142
18273
  class AxiosError extends Error {
18143
- static from(error, code, config, request, response, customProps) {
18144
- const axiosError = new AxiosError(error.message, code || error.code, config, request, response);
18145
- axiosError.cause = error;
18146
- axiosError.name = error.name;
18147
- customProps && Object.assign(axiosError, customProps);
18148
- return axiosError;
18274
+ static from(error, code, config, request, response, customProps) {
18275
+ const axiosError = new AxiosError(error.message, code || error.code, config, request, response);
18276
+ axiosError.cause = error;
18277
+ axiosError.name = error.name;
18278
+
18279
+ // Preserve status from the original error if not already set from response
18280
+ if (error.status != null && axiosError.status == null) {
18281
+ axiosError.status = error.status;
18149
18282
  }
18150
18283
 
18284
+ customProps && Object.assign(axiosError, customProps);
18285
+ return axiosError;
18286
+ }
18287
+
18151
18288
  /**
18152
18289
  * Create an Error with the specified message, config, error code, request and response.
18153
18290
  *
@@ -18160,37 +18297,48 @@ class AxiosError extends Error {
18160
18297
  * @returns {Error} The created error.
18161
18298
  */
18162
18299
  constructor(message, code, config, request, response) {
18163
- super(message);
18164
- this.name = 'AxiosError';
18165
- this.isAxiosError = true;
18166
- code && (this.code = code);
18167
- config && (this.config = config);
18168
- request && (this.request = request);
18169
- if (response) {
18170
- this.response = response;
18171
- this.status = response.status;
18172
- }
18300
+ super(message);
18301
+
18302
+ // Make message enumerable to maintain backward compatibility
18303
+ // The native Error constructor sets message as non-enumerable,
18304
+ // but axios < v1.13.3 had it as enumerable
18305
+ Object.defineProperty(this, 'message', {
18306
+ value: message,
18307
+ enumerable: true,
18308
+ writable: true,
18309
+ configurable: true
18310
+ });
18311
+
18312
+ this.name = 'AxiosError';
18313
+ this.isAxiosError = true;
18314
+ code && (this.code = code);
18315
+ config && (this.config = config);
18316
+ request && (this.request = request);
18317
+ if (response) {
18318
+ this.response = response;
18319
+ this.status = response.status;
18320
+ }
18173
18321
  }
18174
18322
 
18175
- toJSON() {
18176
- return {
18177
- // Standard
18178
- message: this.message,
18179
- name: this.name,
18180
- // Microsoft
18181
- description: this.description,
18182
- number: this.number,
18183
- // Mozilla
18184
- fileName: this.fileName,
18185
- lineNumber: this.lineNumber,
18186
- columnNumber: this.columnNumber,
18187
- stack: this.stack,
18188
- // Axios
18189
- config: utils$1.toJSONObject(this.config),
18190
- code: this.code,
18191
- status: this.status,
18192
- };
18193
- }
18323
+ toJSON() {
18324
+ return {
18325
+ // Standard
18326
+ message: this.message,
18327
+ name: this.name,
18328
+ // Microsoft
18329
+ description: this.description,
18330
+ number: this.number,
18331
+ // Mozilla
18332
+ fileName: this.fileName,
18333
+ lineNumber: this.lineNumber,
18334
+ columnNumber: this.columnNumber,
18335
+ stack: this.stack,
18336
+ // Axios
18337
+ config: utils$1.toJSONObject(this.config),
18338
+ code: this.code,
18339
+ status: this.status,
18340
+ };
18341
+ }
18194
18342
  }
18195
18343
 
18196
18344
  // This can be changed to static properties as soon as the parser options in .eslint.cjs are updated.
@@ -18245,11 +18393,14 @@ function removeBrackets(key) {
18245
18393
  */
18246
18394
  function renderKey(path, key, dots) {
18247
18395
  if (!path) return key;
18248
- return path.concat(key).map(function each(token, i) {
18249
- // eslint-disable-next-line no-param-reassign
18250
- token = removeBrackets(token);
18251
- return !dots && i ? '[' + token + ']' : token;
18252
- }).join(dots ? '.' : '');
18396
+ return path
18397
+ .concat(key)
18398
+ .map(function each(token, i) {
18399
+ // eslint-disable-next-line no-param-reassign
18400
+ token = removeBrackets(token);
18401
+ return !dots && i ? '[' + token + ']' : token;
18402
+ })
18403
+ .join(dots ? '.' : '');
18253
18404
  }
18254
18405
 
18255
18406
  /**
@@ -18299,21 +18450,26 @@ function toFormData(obj, formData, options) {
18299
18450
  formData = formData || new (FormData)();
18300
18451
 
18301
18452
  // eslint-disable-next-line no-param-reassign
18302
- options = utils$1.toFlatObject(options, {
18303
- metaTokens: true,
18304
- dots: false,
18305
- indexes: false
18306
- }, false, function defined(option, source) {
18307
- // eslint-disable-next-line no-eq-null,eqeqeq
18308
- return !utils$1.isUndefined(source[option]);
18309
- });
18453
+ options = utils$1.toFlatObject(
18454
+ options,
18455
+ {
18456
+ metaTokens: true,
18457
+ dots: false,
18458
+ indexes: false,
18459
+ },
18460
+ false,
18461
+ function defined(option, source) {
18462
+ // eslint-disable-next-line no-eq-null,eqeqeq
18463
+ return !utils$1.isUndefined(source[option]);
18464
+ }
18465
+ );
18310
18466
 
18311
18467
  const metaTokens = options.metaTokens;
18312
18468
  // eslint-disable-next-line no-use-before-define
18313
18469
  const visitor = options.visitor || defaultVisitor;
18314
18470
  const dots = options.dots;
18315
18471
  const indexes = options.indexes;
18316
- const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;
18472
+ const _Blob = options.Blob || (typeof Blob !== 'undefined' && Blob);
18317
18473
  const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);
18318
18474
 
18319
18475
  if (!utils$1.isFunction(visitor)) {
@@ -18355,6 +18511,11 @@ function toFormData(obj, formData, options) {
18355
18511
  function defaultVisitor(value, key, path) {
18356
18512
  let arr = value;
18357
18513
 
18514
+ if (utils$1.isReactNative(formData) && utils$1.isReactNativeBlob(value)) {
18515
+ formData.append(renderKey(path, key, dots), convertValue(value));
18516
+ return false;
18517
+ }
18518
+
18358
18519
  if (value && !path && typeof value === 'object') {
18359
18520
  if (utils$1.endsWith(key, '{}')) {
18360
18521
  // eslint-disable-next-line no-param-reassign
@@ -18363,17 +18524,22 @@ function toFormData(obj, formData, options) {
18363
18524
  value = JSON.stringify(value);
18364
18525
  } else if (
18365
18526
  (utils$1.isArray(value) && isFlatArray(value)) ||
18366
- ((utils$1.isFileList(value) || utils$1.endsWith(key, '[]')) && (arr = utils$1.toArray(value))
18367
- )) {
18527
+ ((utils$1.isFileList(value) || utils$1.endsWith(key, '[]')) && (arr = utils$1.toArray(value)))
18528
+ ) {
18368
18529
  // eslint-disable-next-line no-param-reassign
18369
18530
  key = removeBrackets(key);
18370
18531
 
18371
18532
  arr.forEach(function each(el, index) {
18372
- !(utils$1.isUndefined(el) || el === null) && formData.append(
18373
- // eslint-disable-next-line no-nested-ternary
18374
- indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),
18375
- convertValue(el)
18376
- );
18533
+ !(utils$1.isUndefined(el) || el === null) &&
18534
+ formData.append(
18535
+ // eslint-disable-next-line no-nested-ternary
18536
+ indexes === true
18537
+ ? renderKey([key], index, dots)
18538
+ : indexes === null
18539
+ ? key
18540
+ : key + '[]',
18541
+ convertValue(el)
18542
+ );
18377
18543
  });
18378
18544
  return false;
18379
18545
  }
@@ -18393,7 +18559,7 @@ function toFormData(obj, formData, options) {
18393
18559
  const exposedHelpers = Object.assign(predicates, {
18394
18560
  defaultVisitor,
18395
18561
  convertValue,
18396
- isVisitable
18562
+ isVisitable,
18397
18563
  });
18398
18564
 
18399
18565
  function build(value, path) {
@@ -18406,9 +18572,9 @@ function toFormData(obj, formData, options) {
18406
18572
  stack.push(value);
18407
18573
 
18408
18574
  utils$1.forEach(value, function each(el, key) {
18409
- const result = !(utils$1.isUndefined(el) || el === null) && visitor.call(
18410
- formData, el, utils$1.isString(key) ? key.trim() : key, path, exposedHelpers
18411
- );
18575
+ const result =
18576
+ !(utils$1.isUndefined(el) || el === null) &&
18577
+ visitor.call(formData, el, utils$1.isString(key) ? key.trim() : key, path, exposedHelpers);
18412
18578
 
18413
18579
  if (result === true) {
18414
18580
  build(el, path ? path.concat(key) : [key]);
@@ -18443,7 +18609,7 @@ function encode$1(str) {
18443
18609
  ')': '%29',
18444
18610
  '~': '%7E',
18445
18611
  '%20': '+',
18446
- '%00': '\x00'
18612
+ '%00': '\x00',
18447
18613
  };
18448
18614
  return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {
18449
18615
  return charMap[match];
@@ -18471,29 +18637,33 @@ prototype.append = function append(name, value) {
18471
18637
  };
18472
18638
 
18473
18639
  prototype.toString = function toString(encoder) {
18474
- const _encode = encoder ? function(value) {
18475
- return encoder.call(this, value, encode$1);
18476
- } : encode$1;
18640
+ const _encode = encoder
18641
+ ? function (value) {
18642
+ return encoder.call(this, value, encode$1);
18643
+ }
18644
+ : encode$1;
18477
18645
 
18478
- return this._pairs.map(function each(pair) {
18479
- return _encode(pair[0]) + '=' + _encode(pair[1]);
18480
- }, '').join('&');
18646
+ return this._pairs
18647
+ .map(function each(pair) {
18648
+ return _encode(pair[0]) + '=' + _encode(pair[1]);
18649
+ }, '')
18650
+ .join('&');
18481
18651
  };
18482
18652
 
18483
18653
  /**
18484
- * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their
18485
- * URI encoded counterparts
18654
+ * It replaces URL-encoded forms of `:`, `$`, `,`, and spaces with
18655
+ * their plain counterparts (`:`, `$`, `,`, `+`).
18486
18656
  *
18487
18657
  * @param {string} val The value to be encoded.
18488
18658
  *
18489
18659
  * @returns {string} The encoded value.
18490
18660
  */
18491
18661
  function encode(val) {
18492
- return encodeURIComponent(val).
18493
- replace(/%3A/gi, ':').
18494
- replace(/%24/g, '$').
18495
- replace(/%2C/gi, ',').
18496
- replace(/%20/g, '+');
18662
+ return encodeURIComponent(val)
18663
+ .replace(/%3A/gi, ':')
18664
+ .replace(/%24/g, '$')
18665
+ .replace(/%2C/gi, ',')
18666
+ .replace(/%20/g, '+');
18497
18667
  }
18498
18668
 
18499
18669
  /**
@@ -18510,11 +18680,13 @@ function buildURL(url, params, options) {
18510
18680
  return url;
18511
18681
  }
18512
18682
 
18513
- const _encode = options && options.encode || encode;
18683
+ const _encode = (options && options.encode) || encode;
18514
18684
 
18515
- const _options = utils$1.isFunction(options) ? {
18516
- serialize: options
18517
- } : options;
18685
+ const _options = utils$1.isFunction(options)
18686
+ ? {
18687
+ serialize: options,
18688
+ }
18689
+ : options;
18518
18690
 
18519
18691
  const serializeFn = _options && _options.serialize;
18520
18692
 
@@ -18523,13 +18695,13 @@ function buildURL(url, params, options) {
18523
18695
  if (serializeFn) {
18524
18696
  serializedParams = serializeFn(params, _options);
18525
18697
  } else {
18526
- serializedParams = utils$1.isURLSearchParams(params) ?
18527
- params.toString() :
18528
- new AxiosURLSearchParams(params, _options).toString(_encode);
18698
+ serializedParams = utils$1.isURLSearchParams(params)
18699
+ ? params.toString()
18700
+ : new AxiosURLSearchParams(params, _options).toString(_encode);
18529
18701
  }
18530
18702
 
18531
18703
  if (serializedParams) {
18532
- const hashmarkIndex = url.indexOf("#");
18704
+ const hashmarkIndex = url.indexOf('#');
18533
18705
 
18534
18706
  if (hashmarkIndex !== -1) {
18535
18707
  url = url.slice(0, hashmarkIndex);
@@ -18559,7 +18731,7 @@ class InterceptorManager {
18559
18731
  fulfilled,
18560
18732
  rejected,
18561
18733
  synchronous: options ? options.synchronous : false,
18562
- runWhen: options ? options.runWhen : null
18734
+ runWhen: options ? options.runWhen : null,
18563
18735
  });
18564
18736
  return this.handlers.length - 1;
18565
18737
  }
@@ -18612,7 +18784,8 @@ var InterceptorManager$1 = InterceptorManager;
18612
18784
  var transitionalDefaults = {
18613
18785
  silentJSONParsing: true,
18614
18786
  forcedJSONParsing: true,
18615
- clarifyTimeoutError: false
18787
+ clarifyTimeoutError: false,
18788
+ legacyInterceptorReqResOrdering: true,
18616
18789
  };
18617
18790
 
18618
18791
  var URLSearchParams$1 = typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;
@@ -18626,14 +18799,14 @@ var platform$1 = {
18626
18799
  classes: {
18627
18800
  URLSearchParams: URLSearchParams$1,
18628
18801
  FormData: FormData$1,
18629
- Blob: Blob$1
18802
+ Blob: Blob$1,
18630
18803
  },
18631
- protocols: ['http', 'https', 'file', 'blob', 'url', 'data']
18804
+ protocols: ['http', 'https', 'file', 'blob', 'url', 'data'],
18632
18805
  };
18633
18806
 
18634
18807
  const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';
18635
18808
 
18636
- const _navigator = typeof navigator === 'object' && navigator || undefined;
18809
+ const _navigator = (typeof navigator === 'object' && navigator) || undefined;
18637
18810
 
18638
18811
  /**
18639
18812
  * Determine if we're running in a standard browser environment
@@ -18652,7 +18825,8 @@ const _navigator = typeof navigator === 'object' && navigator || undefined;
18652
18825
  *
18653
18826
  * @returns {boolean}
18654
18827
  */
18655
- const hasStandardBrowserEnv = hasBrowserEnv &&
18828
+ const hasStandardBrowserEnv =
18829
+ hasBrowserEnv &&
18656
18830
  (!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0);
18657
18831
 
18658
18832
  /**
@@ -18673,7 +18847,7 @@ const hasStandardBrowserWebWorkerEnv = (() => {
18673
18847
  );
18674
18848
  })();
18675
18849
 
18676
- const origin = hasBrowserEnv && window.location.href || 'http://localhost';
18850
+ const origin = (hasBrowserEnv && window.location.href) || 'http://localhost';
18677
18851
 
18678
18852
  var utils = /*#__PURE__*/Object.freeze({
18679
18853
  __proto__: null,
@@ -18686,12 +18860,12 @@ var utils = /*#__PURE__*/Object.freeze({
18686
18860
 
18687
18861
  var platform = {
18688
18862
  ...utils,
18689
- ...platform$1
18863
+ ...platform$1,
18690
18864
  };
18691
18865
 
18692
18866
  function toURLEncodedForm(data, options) {
18693
18867
  return toFormData(data, new platform.classes.URLSearchParams(), {
18694
- visitor: function(value, key, path, helpers) {
18868
+ visitor: function (value, key, path, helpers) {
18695
18869
  if (platform.isNode && utils$1.isBuffer(value)) {
18696
18870
  this.append(key, value.toString('base64'));
18697
18871
  return false;
@@ -18699,7 +18873,7 @@ function toURLEncodedForm(data, options) {
18699
18873
 
18700
18874
  return helpers.defaultVisitor.apply(this, arguments);
18701
18875
  },
18702
- ...options
18876
+ ...options,
18703
18877
  });
18704
18878
  }
18705
18879
 
@@ -18715,7 +18889,7 @@ function parsePropPath(name) {
18715
18889
  // foo.x.y.z
18716
18890
  // foo-x-y-z
18717
18891
  // foo x y z
18718
- return utils$1.matchAll(/\w+|\[(\w*)]/g, name).map(match => {
18892
+ return utils$1.matchAll(/\w+|\[(\w*)]/g, name).map((match) => {
18719
18893
  return match[0] === '[]' ? '' : match[1] || match[0];
18720
18894
  });
18721
18895
  }
@@ -18819,96 +18993,107 @@ function stringifySafely(rawValue, parser, encoder) {
18819
18993
  }
18820
18994
 
18821
18995
  const defaults = {
18822
-
18823
18996
  transitional: transitionalDefaults,
18824
18997
 
18825
18998
  adapter: ['xhr', 'http', 'fetch'],
18826
18999
 
18827
- transformRequest: [function transformRequest(data, headers) {
18828
- const contentType = headers.getContentType() || '';
18829
- const hasJSONContentType = contentType.indexOf('application/json') > -1;
18830
- const isObjectPayload = utils$1.isObject(data);
19000
+ transformRequest: [
19001
+ function transformRequest(data, headers) {
19002
+ const contentType = headers.getContentType() || '';
19003
+ const hasJSONContentType = contentType.indexOf('application/json') > -1;
19004
+ const isObjectPayload = utils$1.isObject(data);
18831
19005
 
18832
- if (isObjectPayload && utils$1.isHTMLForm(data)) {
18833
- data = new FormData(data);
18834
- }
19006
+ if (isObjectPayload && utils$1.isHTMLForm(data)) {
19007
+ data = new FormData(data);
19008
+ }
18835
19009
 
18836
- const isFormData = utils$1.isFormData(data);
19010
+ const isFormData = utils$1.isFormData(data);
18837
19011
 
18838
- if (isFormData) {
18839
- return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
18840
- }
19012
+ if (isFormData) {
19013
+ return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
19014
+ }
18841
19015
 
18842
- if (utils$1.isArrayBuffer(data) ||
18843
- utils$1.isBuffer(data) ||
18844
- utils$1.isStream(data) ||
18845
- utils$1.isFile(data) ||
18846
- utils$1.isBlob(data) ||
18847
- utils$1.isReadableStream(data)
18848
- ) {
18849
- return data;
18850
- }
18851
- if (utils$1.isArrayBufferView(data)) {
18852
- return data.buffer;
18853
- }
18854
- if (utils$1.isURLSearchParams(data)) {
18855
- headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);
18856
- return data.toString();
18857
- }
19016
+ if (
19017
+ utils$1.isArrayBuffer(data) ||
19018
+ utils$1.isBuffer(data) ||
19019
+ utils$1.isStream(data) ||
19020
+ utils$1.isFile(data) ||
19021
+ utils$1.isBlob(data) ||
19022
+ utils$1.isReadableStream(data)
19023
+ ) {
19024
+ return data;
19025
+ }
19026
+ if (utils$1.isArrayBufferView(data)) {
19027
+ return data.buffer;
19028
+ }
19029
+ if (utils$1.isURLSearchParams(data)) {
19030
+ headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);
19031
+ return data.toString();
19032
+ }
18858
19033
 
18859
- let isFileList;
19034
+ let isFileList;
18860
19035
 
18861
- if (isObjectPayload) {
18862
- if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {
18863
- return toURLEncodedForm(data, this.formSerializer).toString();
18864
- }
19036
+ if (isObjectPayload) {
19037
+ if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {
19038
+ return toURLEncodedForm(data, this.formSerializer).toString();
19039
+ }
18865
19040
 
18866
- if ((isFileList = utils$1.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {
18867
- const _FormData = this.env && this.env.FormData;
19041
+ if (
19042
+ (isFileList = utils$1.isFileList(data)) ||
19043
+ contentType.indexOf('multipart/form-data') > -1
19044
+ ) {
19045
+ const _FormData = this.env && this.env.FormData;
18868
19046
 
18869
- return toFormData(
18870
- isFileList ? {'files[]': data} : data,
18871
- _FormData && new _FormData(),
18872
- this.formSerializer
18873
- );
19047
+ return toFormData(
19048
+ isFileList ? { 'files[]': data } : data,
19049
+ _FormData && new _FormData(),
19050
+ this.formSerializer
19051
+ );
19052
+ }
18874
19053
  }
18875
- }
18876
19054
 
18877
- if (isObjectPayload || hasJSONContentType ) {
18878
- headers.setContentType('application/json', false);
18879
- return stringifySafely(data);
18880
- }
19055
+ if (isObjectPayload || hasJSONContentType) {
19056
+ headers.setContentType('application/json', false);
19057
+ return stringifySafely(data);
19058
+ }
18881
19059
 
18882
- return data;
18883
- }],
19060
+ return data;
19061
+ },
19062
+ ],
18884
19063
 
18885
- transformResponse: [function transformResponse(data) {
18886
- const transitional = this.transitional || defaults.transitional;
18887
- const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
18888
- const JSONRequested = this.responseType === 'json';
19064
+ transformResponse: [
19065
+ function transformResponse(data) {
19066
+ const transitional = this.transitional || defaults.transitional;
19067
+ const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
19068
+ const JSONRequested = this.responseType === 'json';
18889
19069
 
18890
- if (utils$1.isResponse(data) || utils$1.isReadableStream(data)) {
18891
- return data;
18892
- }
19070
+ if (utils$1.isResponse(data) || utils$1.isReadableStream(data)) {
19071
+ return data;
19072
+ }
18893
19073
 
18894
- if (data && utils$1.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {
18895
- const silentJSONParsing = transitional && transitional.silentJSONParsing;
18896
- const strictJSONParsing = !silentJSONParsing && JSONRequested;
19074
+ if (
19075
+ data &&
19076
+ utils$1.isString(data) &&
19077
+ ((forcedJSONParsing && !this.responseType) || JSONRequested)
19078
+ ) {
19079
+ const silentJSONParsing = transitional && transitional.silentJSONParsing;
19080
+ const strictJSONParsing = !silentJSONParsing && JSONRequested;
18897
19081
 
18898
- try {
18899
- return JSON.parse(data, this.parseReviver);
18900
- } catch (e) {
18901
- if (strictJSONParsing) {
18902
- if (e.name === 'SyntaxError') {
18903
- throw AxiosError$1.from(e, AxiosError$1.ERR_BAD_RESPONSE, this, null, this.response);
19082
+ try {
19083
+ return JSON.parse(data, this.parseReviver);
19084
+ } catch (e) {
19085
+ if (strictJSONParsing) {
19086
+ if (e.name === 'SyntaxError') {
19087
+ throw AxiosError$1.from(e, AxiosError$1.ERR_BAD_RESPONSE, this, null, this.response);
19088
+ }
19089
+ throw e;
18904
19090
  }
18905
- throw e;
18906
19091
  }
18907
19092
  }
18908
- }
18909
19093
 
18910
- return data;
18911
- }],
19094
+ return data;
19095
+ },
19096
+ ],
18912
19097
 
18913
19098
  /**
18914
19099
  * A timeout in milliseconds to abort a request. If set to 0 (default) a
@@ -18924,7 +19109,7 @@ const defaults = {
18924
19109
 
18925
19110
  env: {
18926
19111
  FormData: platform.classes.FormData,
18927
- Blob: platform.classes.Blob
19112
+ Blob: platform.classes.Blob,
18928
19113
  },
18929
19114
 
18930
19115
  validateStatus: function validateStatus(status) {
@@ -18933,10 +19118,10 @@ const defaults = {
18933
19118
 
18934
19119
  headers: {
18935
19120
  common: {
18936
- 'Accept': 'application/json, text/plain, */*',
18937
- 'Content-Type': undefined
18938
- }
18939
- }
19121
+ Accept: 'application/json, text/plain, */*',
19122
+ 'Content-Type': undefined,
19123
+ },
19124
+ },
18940
19125
  };
18941
19126
 
18942
19127
  utils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {
@@ -18948,10 +19133,23 @@ var defaults$1 = defaults;
18948
19133
  // RawAxiosHeaders whose duplicates are ignored by node
18949
19134
  // c.f. https://nodejs.org/api/http.html#http_message_headers
18950
19135
  const ignoreDuplicateOf = utils$1.toObjectSet([
18951
- 'age', 'authorization', 'content-length', 'content-type', 'etag',
18952
- 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',
18953
- 'last-modified', 'location', 'max-forwards', 'proxy-authorization',
18954
- 'referer', 'retry-after', 'user-agent'
19136
+ 'age',
19137
+ 'authorization',
19138
+ 'content-length',
19139
+ 'content-type',
19140
+ 'etag',
19141
+ 'expires',
19142
+ 'from',
19143
+ 'host',
19144
+ 'if-modified-since',
19145
+ 'if-unmodified-since',
19146
+ 'last-modified',
19147
+ 'location',
19148
+ 'max-forwards',
19149
+ 'proxy-authorization',
19150
+ 'referer',
19151
+ 'retry-after',
19152
+ 'user-agent',
18955
19153
  ]);
18956
19154
 
18957
19155
  /**
@@ -18968,47 +19166,81 @@ const ignoreDuplicateOf = utils$1.toObjectSet([
18968
19166
  *
18969
19167
  * @returns {Object} Headers parsed into an object
18970
19168
  */
18971
- var parseHeaders = rawHeaders => {
19169
+ var parseHeaders = (rawHeaders) => {
18972
19170
  const parsed = {};
18973
19171
  let key;
18974
19172
  let val;
18975
19173
  let i;
18976
19174
 
18977
- rawHeaders && rawHeaders.split('\n').forEach(function parser(line) {
18978
- i = line.indexOf(':');
18979
- key = line.substring(0, i).trim().toLowerCase();
18980
- val = line.substring(i + 1).trim();
19175
+ rawHeaders &&
19176
+ rawHeaders.split('\n').forEach(function parser(line) {
19177
+ i = line.indexOf(':');
19178
+ key = line.substring(0, i).trim().toLowerCase();
19179
+ val = line.substring(i + 1).trim();
18981
19180
 
18982
- if (!key || (parsed[key] && ignoreDuplicateOf[key])) {
18983
- return;
18984
- }
19181
+ if (!key || (parsed[key] && ignoreDuplicateOf[key])) {
19182
+ return;
19183
+ }
18985
19184
 
18986
- if (key === 'set-cookie') {
18987
- if (parsed[key]) {
18988
- parsed[key].push(val);
19185
+ if (key === 'set-cookie') {
19186
+ if (parsed[key]) {
19187
+ parsed[key].push(val);
19188
+ } else {
19189
+ parsed[key] = [val];
19190
+ }
18989
19191
  } else {
18990
- parsed[key] = [val];
19192
+ parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
18991
19193
  }
18992
- } else {
18993
- parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
18994
- }
18995
- });
19194
+ });
18996
19195
 
18997
19196
  return parsed;
18998
19197
  };
18999
19198
 
19000
19199
  const $internals = Symbol('internals');
19001
19200
 
19201
+ const isValidHeaderValue = (value) => !/[\r\n]/.test(value);
19202
+
19203
+ function assertValidHeaderValue(value, header) {
19204
+ if (value === false || value == null) {
19205
+ return;
19206
+ }
19207
+
19208
+ if (utils$1.isArray(value)) {
19209
+ value.forEach((v) => assertValidHeaderValue(v, header));
19210
+ return;
19211
+ }
19212
+
19213
+ if (!isValidHeaderValue(String(value))) {
19214
+ throw new Error(`Invalid character in header content ["${header}"]`);
19215
+ }
19216
+ }
19217
+
19002
19218
  function normalizeHeader(header) {
19003
19219
  return header && String(header).trim().toLowerCase();
19004
19220
  }
19005
19221
 
19222
+ function stripTrailingCRLF(str) {
19223
+ let end = str.length;
19224
+
19225
+ while (end > 0) {
19226
+ const charCode = str.charCodeAt(end - 1);
19227
+
19228
+ if (charCode !== 10 && charCode !== 13) {
19229
+ break;
19230
+ }
19231
+
19232
+ end -= 1;
19233
+ }
19234
+
19235
+ return end === str.length ? str : str.slice(0, end);
19236
+ }
19237
+
19006
19238
  function normalizeValue(value) {
19007
19239
  if (value === false || value == null) {
19008
19240
  return value;
19009
19241
  }
19010
19242
 
19011
- return utils$1.isArray(value) ? value.map(normalizeValue) : String(value);
19243
+ return utils$1.isArray(value) ? value.map(normalizeValue) : stripTrailingCRLF(String(value));
19012
19244
  }
19013
19245
 
19014
19246
  function parseTokens(str) {
@@ -19046,8 +19278,10 @@ function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
19046
19278
  }
19047
19279
 
19048
19280
  function formatHeader(header) {
19049
- return header.trim()
19050
- .toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => {
19281
+ return header
19282
+ .trim()
19283
+ .toLowerCase()
19284
+ .replace(/([a-z\d])(\w*)/g, (w, char, str) => {
19051
19285
  return char.toUpperCase() + str;
19052
19286
  });
19053
19287
  }
@@ -19055,12 +19289,12 @@ function formatHeader(header) {
19055
19289
  function buildAccessors(obj, header) {
19056
19290
  const accessorName = utils$1.toCamelCase(' ' + header);
19057
19291
 
19058
- ['get', 'set', 'has'].forEach(methodName => {
19292
+ ['get', 'set', 'has'].forEach((methodName) => {
19059
19293
  Object.defineProperty(obj, methodName + accessorName, {
19060
- value: function(arg1, arg2, arg3) {
19294
+ value: function (arg1, arg2, arg3) {
19061
19295
  return this[methodName].call(this, header, arg1, arg2, arg3);
19062
19296
  },
19063
- configurable: true
19297
+ configurable: true,
19064
19298
  });
19065
19299
  });
19066
19300
  }
@@ -19082,7 +19316,13 @@ class AxiosHeaders {
19082
19316
 
19083
19317
  const key = utils$1.findKey(self, lHeader);
19084
19318
 
19085
- if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {
19319
+ if (
19320
+ !key ||
19321
+ self[key] === undefined ||
19322
+ _rewrite === true ||
19323
+ (_rewrite === undefined && self[key] !== false)
19324
+ ) {
19325
+ assertValidHeaderValue(_value, _header);
19086
19326
  self[key || _header] = normalizeValue(_value);
19087
19327
  }
19088
19328
  }
@@ -19092,17 +19332,22 @@ class AxiosHeaders {
19092
19332
 
19093
19333
  if (utils$1.isPlainObject(header) || header instanceof this.constructor) {
19094
19334
  setHeaders(header, valueOrRewrite);
19095
- } else if(utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
19335
+ } else if (utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
19096
19336
  setHeaders(parseHeaders(header), valueOrRewrite);
19097
19337
  } else if (utils$1.isObject(header) && utils$1.isIterable(header)) {
19098
- let obj = {}, dest, key;
19338
+ let obj = {},
19339
+ dest,
19340
+ key;
19099
19341
  for (const entry of header) {
19100
19342
  if (!utils$1.isArray(entry)) {
19101
19343
  throw TypeError('Object iterator must return a key-value pair');
19102
19344
  }
19103
19345
 
19104
- obj[key = entry[0]] = (dest = obj[key]) ?
19105
- (utils$1.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]]) : entry[1];
19346
+ obj[(key = entry[0])] = (dest = obj[key])
19347
+ ? utils$1.isArray(dest)
19348
+ ? [...dest, entry[1]]
19349
+ : [dest, entry[1]]
19350
+ : entry[1];
19106
19351
  }
19107
19352
 
19108
19353
  setHeaders(obj, valueOrRewrite);
@@ -19149,7 +19394,11 @@ class AxiosHeaders {
19149
19394
  if (header) {
19150
19395
  const key = utils$1.findKey(this, header);
19151
19396
 
19152
- return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
19397
+ return !!(
19398
+ key &&
19399
+ this[key] !== undefined &&
19400
+ (!matcher || matchHeaderValue(this, this[key], key, matcher))
19401
+ );
19153
19402
  }
19154
19403
 
19155
19404
  return false;
@@ -19189,7 +19438,7 @@ class AxiosHeaders {
19189
19438
 
19190
19439
  while (i--) {
19191
19440
  const key = keys[i];
19192
- if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
19441
+ if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
19193
19442
  delete this[key];
19194
19443
  deleted = true;
19195
19444
  }
@@ -19233,7 +19482,9 @@ class AxiosHeaders {
19233
19482
  const obj = Object.create(null);
19234
19483
 
19235
19484
  utils$1.forEach(this, (value, header) => {
19236
- value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(', ') : value);
19485
+ value != null &&
19486
+ value !== false &&
19487
+ (obj[header] = asStrings && utils$1.isArray(value) ? value.join(', ') : value);
19237
19488
  });
19238
19489
 
19239
19490
  return obj;
@@ -19244,11 +19495,13 @@ class AxiosHeaders {
19244
19495
  }
19245
19496
 
19246
19497
  toString() {
19247
- return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\n');
19498
+ return Object.entries(this.toJSON())
19499
+ .map(([header, value]) => header + ': ' + value)
19500
+ .join('\n');
19248
19501
  }
19249
19502
 
19250
19503
  getSetCookie() {
19251
- return this.get("set-cookie") || [];
19504
+ return this.get('set-cookie') || [];
19252
19505
  }
19253
19506
 
19254
19507
  get [Symbol.toStringTag]() {
@@ -19268,9 +19521,12 @@ class AxiosHeaders {
19268
19521
  }
19269
19522
 
19270
19523
  static accessor(header) {
19271
- const internals = this[$internals] = (this[$internals] = {
19272
- accessors: {}
19273
- });
19524
+ const internals =
19525
+ (this[$internals] =
19526
+ this[$internals] =
19527
+ {
19528
+ accessors: {},
19529
+ });
19274
19530
 
19275
19531
  const accessors = internals.accessors;
19276
19532
  const prototype = this.prototype;
@@ -19290,17 +19546,24 @@ class AxiosHeaders {
19290
19546
  }
19291
19547
  }
19292
19548
 
19293
- AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);
19549
+ AxiosHeaders.accessor([
19550
+ 'Content-Type',
19551
+ 'Content-Length',
19552
+ 'Accept',
19553
+ 'Accept-Encoding',
19554
+ 'User-Agent',
19555
+ 'Authorization',
19556
+ ]);
19294
19557
 
19295
19558
  // reserved names hotfix
19296
- utils$1.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {
19559
+ utils$1.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {
19297
19560
  let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`
19298
19561
  return {
19299
19562
  get: () => value,
19300
19563
  set(headerValue) {
19301
19564
  this[mapped] = headerValue;
19302
- }
19303
- }
19565
+ },
19566
+ };
19304
19567
  });
19305
19568
 
19306
19569
  utils$1.freezeMethods(AxiosHeaders);
@@ -19367,19 +19630,23 @@ function settle(resolve, reject, response) {
19367
19630
  if (!response.status || !validateStatus || validateStatus(response.status)) {
19368
19631
  resolve(response);
19369
19632
  } else {
19370
- reject(new AxiosError$1(
19371
- 'Request failed with status code ' + response.status,
19372
- [AxiosError$1.ERR_BAD_REQUEST, AxiosError$1.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
19373
- response.config,
19374
- response.request,
19375
- response
19376
- ));
19633
+ reject(
19634
+ new AxiosError$1(
19635
+ 'Request failed with status code ' + response.status,
19636
+ [AxiosError$1.ERR_BAD_REQUEST, AxiosError$1.ERR_BAD_RESPONSE][
19637
+ Math.floor(response.status / 100) - 4
19638
+ ],
19639
+ response.config,
19640
+ response.request,
19641
+ response
19642
+ )
19643
+ );
19377
19644
  }
19378
19645
  }
19379
19646
 
19380
19647
  function parseProtocol(url) {
19381
19648
  const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
19382
- return match && match[1] || '';
19649
+ return (match && match[1]) || '';
19383
19650
  }
19384
19651
 
19385
19652
  /**
@@ -19430,7 +19697,7 @@ function speedometer(samplesCount, min) {
19430
19697
 
19431
19698
  const passed = startedAt && now - startedAt;
19432
19699
 
19433
- return passed ? Math.round(bytesCount * 1000 / passed) : undefined;
19700
+ return passed ? Math.round((bytesCount * 1000) / passed) : undefined;
19434
19701
  };
19435
19702
  }
19436
19703
 
@@ -19459,7 +19726,7 @@ function throttle(fn, freq) {
19459
19726
  const throttled = (...args) => {
19460
19727
  const now = Date.now();
19461
19728
  const passed = now - timestamp;
19462
- if ( passed >= threshold) {
19729
+ if (passed >= threshold) {
19463
19730
  invoke(args, now);
19464
19731
  } else {
19465
19732
  lastArgs = args;
@@ -19481,7 +19748,7 @@ const progressEventReducer = (listener, isDownloadStream, freq = 3) => {
19481
19748
  let bytesNotified = 0;
19482
19749
  const _speedometer = speedometer(50, 250);
19483
19750
 
19484
- return throttle(e => {
19751
+ return throttle((e) => {
19485
19752
  const loaded = e.loaded;
19486
19753
  const total = e.lengthComputable ? e.total : undefined;
19487
19754
  const progressBytes = loaded - bytesNotified;
@@ -19493,13 +19760,13 @@ const progressEventReducer = (listener, isDownloadStream, freq = 3) => {
19493
19760
  const data = {
19494
19761
  loaded,
19495
19762
  total,
19496
- progress: total ? (loaded / total) : undefined,
19763
+ progress: total ? loaded / total : undefined,
19497
19764
  bytes: progressBytes,
19498
19765
  rate: rate ? rate : undefined,
19499
19766
  estimated: rate && total && inRange ? (total - loaded) / rate : undefined,
19500
19767
  event: e,
19501
19768
  lengthComputable: total != null,
19502
- [isDownloadStream ? 'download' : 'upload']: true
19769
+ [isDownloadStream ? 'download' : 'upload']: true,
19503
19770
  };
19504
19771
 
19505
19772
  listener(data);
@@ -19509,77 +19776,82 @@ const progressEventReducer = (listener, isDownloadStream, freq = 3) => {
19509
19776
  const progressEventDecorator = (total, throttled) => {
19510
19777
  const lengthComputable = total != null;
19511
19778
 
19512
- return [(loaded) => throttled[0]({
19513
- lengthComputable,
19514
- total,
19515
- loaded
19516
- }), throttled[1]];
19779
+ return [
19780
+ (loaded) =>
19781
+ throttled[0]({
19782
+ lengthComputable,
19783
+ total,
19784
+ loaded,
19785
+ }),
19786
+ throttled[1],
19787
+ ];
19517
19788
  };
19518
19789
 
19519
- const asyncDecorator = (fn) => (...args) => utils$1.asap(() => fn(...args));
19520
-
19521
- var isURLSameOrigin = platform.hasStandardBrowserEnv ? ((origin, isMSIE) => (url) => {
19522
- url = new URL(url, platform.origin);
19790
+ const asyncDecorator =
19791
+ (fn) =>
19792
+ (...args) =>
19793
+ utils$1.asap(() => fn(...args));
19523
19794
 
19524
- return (
19525
- origin.protocol === url.protocol &&
19526
- origin.host === url.host &&
19527
- (isMSIE || origin.port === url.port)
19528
- );
19529
- })(
19530
- new URL(platform.origin),
19531
- platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)
19532
- ) : () => true;
19795
+ var isURLSameOrigin = platform.hasStandardBrowserEnv
19796
+ ? ((origin, isMSIE) => (url) => {
19797
+ url = new URL(url, platform.origin);
19533
19798
 
19534
- var cookies = platform.hasStandardBrowserEnv ?
19799
+ return (
19800
+ origin.protocol === url.protocol &&
19801
+ origin.host === url.host &&
19802
+ (isMSIE || origin.port === url.port)
19803
+ );
19804
+ })(
19805
+ new URL(platform.origin),
19806
+ platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)
19807
+ )
19808
+ : () => true;
19535
19809
 
19536
- // Standard browser envs support document.cookie
19537
- {
19538
- write(name, value, expires, path, domain, secure, sameSite) {
19539
- if (typeof document === 'undefined') return;
19810
+ var cookies = platform.hasStandardBrowserEnv
19811
+ ? // Standard browser envs support document.cookie
19812
+ {
19813
+ write(name, value, expires, path, domain, secure, sameSite) {
19814
+ if (typeof document === 'undefined') return;
19540
19815
 
19541
- const cookie = [`${name}=${encodeURIComponent(value)}`];
19816
+ const cookie = [`${name}=${encodeURIComponent(value)}`];
19542
19817
 
19543
- if (utils$1.isNumber(expires)) {
19544
- cookie.push(`expires=${new Date(expires).toUTCString()}`);
19545
- }
19546
- if (utils$1.isString(path)) {
19547
- cookie.push(`path=${path}`);
19548
- }
19549
- if (utils$1.isString(domain)) {
19550
- cookie.push(`domain=${domain}`);
19551
- }
19552
- if (secure === true) {
19553
- cookie.push('secure');
19554
- }
19555
- if (utils$1.isString(sameSite)) {
19556
- cookie.push(`SameSite=${sameSite}`);
19557
- }
19818
+ if (utils$1.isNumber(expires)) {
19819
+ cookie.push(`expires=${new Date(expires).toUTCString()}`);
19820
+ }
19821
+ if (utils$1.isString(path)) {
19822
+ cookie.push(`path=${path}`);
19823
+ }
19824
+ if (utils$1.isString(domain)) {
19825
+ cookie.push(`domain=${domain}`);
19826
+ }
19827
+ if (secure === true) {
19828
+ cookie.push('secure');
19829
+ }
19830
+ if (utils$1.isString(sameSite)) {
19831
+ cookie.push(`SameSite=${sameSite}`);
19832
+ }
19558
19833
 
19559
- document.cookie = cookie.join('; ');
19560
- },
19834
+ document.cookie = cookie.join('; ');
19835
+ },
19561
19836
 
19562
- read(name) {
19563
- if (typeof document === 'undefined') return null;
19564
- const match = document.cookie.match(new RegExp('(?:^|; )' + name + '=([^;]*)'));
19565
- return match ? decodeURIComponent(match[1]) : null;
19566
- },
19837
+ read(name) {
19838
+ if (typeof document === 'undefined') return null;
19839
+ const match = document.cookie.match(new RegExp('(?:^|; )' + name + '=([^;]*)'));
19840
+ return match ? decodeURIComponent(match[1]) : null;
19841
+ },
19567
19842
 
19568
- remove(name) {
19569
- this.write(name, '', Date.now() - 86400000, '/');
19843
+ remove(name) {
19844
+ this.write(name, '', Date.now() - 86400000, '/');
19845
+ },
19570
19846
  }
19571
- }
19572
-
19573
- :
19574
-
19575
- // Non-standard browser env (web workers, react-native) lack needed support.
19576
- {
19577
- write() {},
19578
- read() {
19579
- return null;
19580
- },
19581
- remove() {}
19582
- };
19847
+ : // Non-standard browser env (web workers, react-native) lack needed support.
19848
+ {
19849
+ write() {},
19850
+ read() {
19851
+ return null;
19852
+ },
19853
+ remove() {},
19854
+ };
19583
19855
 
19584
19856
  /**
19585
19857
  * Determines whether the specified URL is absolute
@@ -19592,6 +19864,10 @@ function isAbsoluteURL(url) {
19592
19864
  // A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
19593
19865
  // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
19594
19866
  // by any combination of letters, digits, plus, period, or hyphen.
19867
+ if (typeof url !== 'string') {
19868
+ return false;
19869
+ }
19870
+
19595
19871
  return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
19596
19872
  }
19597
19873
 
@@ -19627,7 +19903,7 @@ function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
19627
19903
  return requestedURL;
19628
19904
  }
19629
19905
 
19630
- const headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? { ...thing } : thing;
19906
+ const headersToObject = (thing) => (thing instanceof AxiosHeaders$1 ? { ...thing } : thing);
19631
19907
 
19632
19908
  /**
19633
19909
  * Config-specific merge-function which creates a new config-object
@@ -19716,11 +19992,13 @@ function mergeConfig(config1, config2) {
19716
19992
  socketPath: defaultToConfig2,
19717
19993
  responseEncoding: defaultToConfig2,
19718
19994
  validateStatus: mergeDirectKeys,
19719
- headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true)
19995
+ headers: (a, b, prop) =>
19996
+ mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true),
19720
19997
  };
19721
19998
 
19722
19999
  utils$1.forEach(Object.keys({ ...config1, ...config2 }), function computeConfigValue(prop) {
19723
- const merge = mergeMap[prop] || mergeDeepProperties;
20000
+ if (prop === '__proto__' || prop === 'constructor' || prop === 'prototype') return;
20001
+ const merge = utils$1.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;
19724
20002
  const configValue = merge(config1[prop], config2[prop], prop);
19725
20003
  (utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
19726
20004
  });
@@ -19735,12 +20013,22 @@ var resolveConfig = (config) => {
19735
20013
 
19736
20014
  newConfig.headers = headers = AxiosHeaders$1.from(headers);
19737
20015
 
19738
- newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config.params, config.paramsSerializer);
20016
+ newConfig.url = buildURL(
20017
+ buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls),
20018
+ config.params,
20019
+ config.paramsSerializer
20020
+ );
19739
20021
 
19740
20022
  // HTTP basic authentication
19741
20023
  if (auth) {
19742
- headers.set('Authorization', 'Basic ' +
19743
- btoa((auth.username || '') + ':' + (auth.password ? unescape(encodeURIComponent(auth.password)) : ''))
20024
+ headers.set(
20025
+ 'Authorization',
20026
+ 'Basic ' +
20027
+ btoa(
20028
+ (auth.username || '') +
20029
+ ':' +
20030
+ (auth.password ? unescape(encodeURIComponent(auth.password)) : '')
20031
+ )
19744
20032
  );
19745
20033
  }
19746
20034
 
@@ -19758,7 +20046,7 @@ var resolveConfig = (config) => {
19758
20046
  }
19759
20047
  });
19760
20048
  }
19761
- }
20049
+ }
19762
20050
 
19763
20051
  // Add xsrf header
19764
20052
  // This is only done if running in a standard browser environment.
@@ -19782,196 +20070,218 @@ var resolveConfig = (config) => {
19782
20070
 
19783
20071
  const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
19784
20072
 
19785
- var xhrAdapter = isXHRAdapterSupported && function (config) {
19786
- return new Promise(function dispatchXhrRequest(resolve, reject) {
19787
- const _config = resolveConfig(config);
19788
- let requestData = _config.data;
19789
- const requestHeaders = AxiosHeaders$1.from(_config.headers).normalize();
19790
- let {responseType, onUploadProgress, onDownloadProgress} = _config;
19791
- let onCanceled;
19792
- let uploadThrottled, downloadThrottled;
19793
- let flushUpload, flushDownload;
20073
+ var xhrAdapter = isXHRAdapterSupported &&
20074
+ function (config) {
20075
+ return new Promise(function dispatchXhrRequest(resolve, reject) {
20076
+ const _config = resolveConfig(config);
20077
+ let requestData = _config.data;
20078
+ const requestHeaders = AxiosHeaders$1.from(_config.headers).normalize();
20079
+ let { responseType, onUploadProgress, onDownloadProgress } = _config;
20080
+ let onCanceled;
20081
+ let uploadThrottled, downloadThrottled;
20082
+ let flushUpload, flushDownload;
19794
20083
 
19795
- function done() {
19796
- flushUpload && flushUpload(); // flush events
19797
- flushDownload && flushDownload(); // flush events
20084
+ function done() {
20085
+ flushUpload && flushUpload(); // flush events
20086
+ flushDownload && flushDownload(); // flush events
19798
20087
 
19799
- _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);
20088
+ _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);
19800
20089
 
19801
- _config.signal && _config.signal.removeEventListener('abort', onCanceled);
19802
- }
20090
+ _config.signal && _config.signal.removeEventListener('abort', onCanceled);
20091
+ }
19803
20092
 
19804
- let request = new XMLHttpRequest();
20093
+ let request = new XMLHttpRequest();
19805
20094
 
19806
- request.open(_config.method.toUpperCase(), _config.url, true);
20095
+ request.open(_config.method.toUpperCase(), _config.url, true);
19807
20096
 
19808
- // Set the request timeout in MS
19809
- request.timeout = _config.timeout;
20097
+ // Set the request timeout in MS
20098
+ request.timeout = _config.timeout;
19810
20099
 
19811
- function onloadend() {
19812
- if (!request) {
19813
- return;
20100
+ function onloadend() {
20101
+ if (!request) {
20102
+ return;
20103
+ }
20104
+ // Prepare the response
20105
+ const responseHeaders = AxiosHeaders$1.from(
20106
+ 'getAllResponseHeaders' in request && request.getAllResponseHeaders()
20107
+ );
20108
+ const responseData =
20109
+ !responseType || responseType === 'text' || responseType === 'json'
20110
+ ? request.responseText
20111
+ : request.response;
20112
+ const response = {
20113
+ data: responseData,
20114
+ status: request.status,
20115
+ statusText: request.statusText,
20116
+ headers: responseHeaders,
20117
+ config,
20118
+ request,
20119
+ };
20120
+
20121
+ settle(
20122
+ function _resolve(value) {
20123
+ resolve(value);
20124
+ done();
20125
+ },
20126
+ function _reject(err) {
20127
+ reject(err);
20128
+ done();
20129
+ },
20130
+ response
20131
+ );
20132
+
20133
+ // Clean up request
20134
+ request = null;
19814
20135
  }
19815
- // Prepare the response
19816
- const responseHeaders = AxiosHeaders$1.from(
19817
- 'getAllResponseHeaders' in request && request.getAllResponseHeaders()
19818
- );
19819
- const responseData = !responseType || responseType === 'text' || responseType === 'json' ?
19820
- request.responseText : request.response;
19821
- const response = {
19822
- data: responseData,
19823
- status: request.status,
19824
- statusText: request.statusText,
19825
- headers: responseHeaders,
19826
- config,
19827
- request
19828
- };
19829
20136
 
19830
- settle(function _resolve(value) {
19831
- resolve(value);
19832
- done();
19833
- }, function _reject(err) {
19834
- reject(err);
19835
- done();
19836
- }, response);
20137
+ if ('onloadend' in request) {
20138
+ // Use onloadend if available
20139
+ request.onloadend = onloadend;
20140
+ } else {
20141
+ // Listen for ready state to emulate onloadend
20142
+ request.onreadystatechange = function handleLoad() {
20143
+ if (!request || request.readyState !== 4) {
20144
+ return;
20145
+ }
19837
20146
 
19838
- // Clean up request
19839
- request = null;
19840
- }
20147
+ // The request errored out and we didn't get a response, this will be
20148
+ // handled by onerror instead
20149
+ // With one exception: request that using file: protocol, most browsers
20150
+ // will return status as 0 even though it's a successful request
20151
+ if (
20152
+ request.status === 0 &&
20153
+ !(request.responseURL && request.responseURL.indexOf('file:') === 0)
20154
+ ) {
20155
+ return;
20156
+ }
20157
+ // readystate handler is calling before onerror or ontimeout handlers,
20158
+ // so we should call onloadend on the next 'tick'
20159
+ setTimeout(onloadend);
20160
+ };
20161
+ }
19841
20162
 
19842
- if ('onloadend' in request) {
19843
- // Use onloadend if available
19844
- request.onloadend = onloadend;
19845
- } else {
19846
- // Listen for ready state to emulate onloadend
19847
- request.onreadystatechange = function handleLoad() {
19848
- if (!request || request.readyState !== 4) {
20163
+ // Handle browser request cancellation (as opposed to a manual cancellation)
20164
+ request.onabort = function handleAbort() {
20165
+ if (!request) {
19849
20166
  return;
19850
20167
  }
19851
20168
 
19852
- // The request errored out and we didn't get a response, this will be
19853
- // handled by onerror instead
19854
- // With one exception: request that using file: protocol, most browsers
19855
- // will return status as 0 even though it's a successful request
19856
- if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {
19857
- return;
19858
- }
19859
- // readystate handler is calling before onerror or ontimeout handlers,
19860
- // so we should call onloadend on the next 'tick'
19861
- setTimeout(onloadend);
20169
+ reject(new AxiosError$1('Request aborted', AxiosError$1.ECONNABORTED, config, request));
20170
+
20171
+ // Clean up request
20172
+ request = null;
19862
20173
  };
19863
- }
19864
20174
 
19865
- // Handle browser request cancellation (as opposed to a manual cancellation)
19866
- request.onabort = function handleAbort() {
19867
- if (!request) {
19868
- return;
19869
- }
20175
+ // Handle low level network errors
20176
+ request.onerror = function handleError(event) {
20177
+ // Browsers deliver a ProgressEvent in XHR onerror
20178
+ // (message may be empty; when present, surface it)
20179
+ // See https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/error_event
20180
+ const msg = event && event.message ? event.message : 'Network Error';
20181
+ const err = new AxiosError$1(msg, AxiosError$1.ERR_NETWORK, config, request);
20182
+ // attach the underlying event for consumers who want details
20183
+ err.event = event || null;
20184
+ reject(err);
20185
+ request = null;
20186
+ };
19870
20187
 
19871
- reject(new AxiosError$1('Request aborted', AxiosError$1.ECONNABORTED, config, request));
20188
+ // Handle timeout
20189
+ request.ontimeout = function handleTimeout() {
20190
+ let timeoutErrorMessage = _config.timeout
20191
+ ? 'timeout of ' + _config.timeout + 'ms exceeded'
20192
+ : 'timeout exceeded';
20193
+ const transitional = _config.transitional || transitionalDefaults;
20194
+ if (_config.timeoutErrorMessage) {
20195
+ timeoutErrorMessage = _config.timeoutErrorMessage;
20196
+ }
20197
+ reject(
20198
+ new AxiosError$1(
20199
+ timeoutErrorMessage,
20200
+ transitional.clarifyTimeoutError ? AxiosError$1.ETIMEDOUT : AxiosError$1.ECONNABORTED,
20201
+ config,
20202
+ request
20203
+ )
20204
+ );
19872
20205
 
19873
- // Clean up request
19874
- request = null;
19875
- };
20206
+ // Clean up request
20207
+ request = null;
20208
+ };
19876
20209
 
19877
- // Handle low level network errors
19878
- request.onerror = function handleError(event) {
19879
- // Browsers deliver a ProgressEvent in XHR onerror
19880
- // (message may be empty; when present, surface it)
19881
- // See https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/error_event
19882
- const msg = event && event.message ? event.message : 'Network Error';
19883
- const err = new AxiosError$1(msg, AxiosError$1.ERR_NETWORK, config, request);
19884
- // attach the underlying event for consumers who want details
19885
- err.event = event || null;
19886
- reject(err);
19887
- request = null;
19888
- };
19889
-
19890
- // Handle timeout
19891
- request.ontimeout = function handleTimeout() {
19892
- let timeoutErrorMessage = _config.timeout ? 'timeout of ' + _config.timeout + 'ms exceeded' : 'timeout exceeded';
19893
- const transitional = _config.transitional || transitionalDefaults;
19894
- if (_config.timeoutErrorMessage) {
19895
- timeoutErrorMessage = _config.timeoutErrorMessage;
19896
- }
19897
- reject(new AxiosError$1(
19898
- timeoutErrorMessage,
19899
- transitional.clarifyTimeoutError ? AxiosError$1.ETIMEDOUT : AxiosError$1.ECONNABORTED,
19900
- config,
19901
- request));
19902
-
19903
- // Clean up request
19904
- request = null;
19905
- };
20210
+ // Remove Content-Type if data is undefined
20211
+ requestData === undefined && requestHeaders.setContentType(null);
19906
20212
 
19907
- // Remove Content-Type if data is undefined
19908
- requestData === undefined && requestHeaders.setContentType(null);
20213
+ // Add headers to the request
20214
+ if ('setRequestHeader' in request) {
20215
+ utils$1.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
20216
+ request.setRequestHeader(key, val);
20217
+ });
20218
+ }
19909
20219
 
19910
- // Add headers to the request
19911
- if ('setRequestHeader' in request) {
19912
- utils$1.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
19913
- request.setRequestHeader(key, val);
19914
- });
19915
- }
20220
+ // Add withCredentials to request if needed
20221
+ if (!utils$1.isUndefined(_config.withCredentials)) {
20222
+ request.withCredentials = !!_config.withCredentials;
20223
+ }
19916
20224
 
19917
- // Add withCredentials to request if needed
19918
- if (!utils$1.isUndefined(_config.withCredentials)) {
19919
- request.withCredentials = !!_config.withCredentials;
19920
- }
20225
+ // Add responseType to request if needed
20226
+ if (responseType && responseType !== 'json') {
20227
+ request.responseType = _config.responseType;
20228
+ }
19921
20229
 
19922
- // Add responseType to request if needed
19923
- if (responseType && responseType !== 'json') {
19924
- request.responseType = _config.responseType;
19925
- }
20230
+ // Handle progress if needed
20231
+ if (onDownloadProgress) {
20232
+ [downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true);
20233
+ request.addEventListener('progress', downloadThrottled);
20234
+ }
19926
20235
 
19927
- // Handle progress if needed
19928
- if (onDownloadProgress) {
19929
- ([downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true));
19930
- request.addEventListener('progress', downloadThrottled);
19931
- }
20236
+ // Not all browsers support upload events
20237
+ if (onUploadProgress && request.upload) {
20238
+ [uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress);
19932
20239
 
19933
- // Not all browsers support upload events
19934
- if (onUploadProgress && request.upload) {
19935
- ([uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress));
20240
+ request.upload.addEventListener('progress', uploadThrottled);
19936
20241
 
19937
- request.upload.addEventListener('progress', uploadThrottled);
20242
+ request.upload.addEventListener('loadend', flushUpload);
20243
+ }
19938
20244
 
19939
- request.upload.addEventListener('loadend', flushUpload);
19940
- }
20245
+ if (_config.cancelToken || _config.signal) {
20246
+ // Handle cancellation
20247
+ // eslint-disable-next-line func-names
20248
+ onCanceled = (cancel) => {
20249
+ if (!request) {
20250
+ return;
20251
+ }
20252
+ reject(!cancel || cancel.type ? new CanceledError$1(null, config, request) : cancel);
20253
+ request.abort();
20254
+ request = null;
20255
+ };
19941
20256
 
19942
- if (_config.cancelToken || _config.signal) {
19943
- // Handle cancellation
19944
- // eslint-disable-next-line func-names
19945
- onCanceled = cancel => {
19946
- if (!request) {
19947
- return;
20257
+ _config.cancelToken && _config.cancelToken.subscribe(onCanceled);
20258
+ if (_config.signal) {
20259
+ _config.signal.aborted
20260
+ ? onCanceled()
20261
+ : _config.signal.addEventListener('abort', onCanceled);
19948
20262
  }
19949
- reject(!cancel || cancel.type ? new CanceledError$1(null, config, request) : cancel);
19950
- request.abort();
19951
- request = null;
19952
- };
19953
-
19954
- _config.cancelToken && _config.cancelToken.subscribe(onCanceled);
19955
- if (_config.signal) {
19956
- _config.signal.aborted ? onCanceled() : _config.signal.addEventListener('abort', onCanceled);
19957
20263
  }
19958
- }
19959
20264
 
19960
- const protocol = parseProtocol(_config.url);
19961
-
19962
- if (protocol && platform.protocols.indexOf(protocol) === -1) {
19963
- reject(new AxiosError$1('Unsupported protocol ' + protocol + ':', AxiosError$1.ERR_BAD_REQUEST, config));
19964
- return;
19965
- }
20265
+ const protocol = parseProtocol(_config.url);
19966
20266
 
20267
+ if (protocol && platform.protocols.indexOf(protocol) === -1) {
20268
+ reject(
20269
+ new AxiosError$1(
20270
+ 'Unsupported protocol ' + protocol + ':',
20271
+ AxiosError$1.ERR_BAD_REQUEST,
20272
+ config
20273
+ )
20274
+ );
20275
+ return;
20276
+ }
19967
20277
 
19968
- // Send the request
19969
- request.send(requestData || null);
19970
- });
19971
- };
20278
+ // Send the request
20279
+ request.send(requestData || null);
20280
+ });
20281
+ };
19972
20282
 
19973
20283
  const composeSignals = (signals, timeout) => {
19974
- const {length} = (signals = signals ? signals.filter(Boolean) : []);
20284
+ const { length } = (signals = signals ? signals.filter(Boolean) : []);
19975
20285
 
19976
20286
  if (timeout || length) {
19977
20287
  let controller = new AbortController();
@@ -19983,21 +20293,29 @@ const composeSignals = (signals, timeout) => {
19983
20293
  aborted = true;
19984
20294
  unsubscribe();
19985
20295
  const err = reason instanceof Error ? reason : this.reason;
19986
- controller.abort(err instanceof AxiosError$1 ? err : new CanceledError$1(err instanceof Error ? err.message : err));
20296
+ controller.abort(
20297
+ err instanceof AxiosError$1
20298
+ ? err
20299
+ : new CanceledError$1(err instanceof Error ? err.message : err)
20300
+ );
19987
20301
  }
19988
20302
  };
19989
20303
 
19990
- let timer = timeout && setTimeout(() => {
19991
- timer = null;
19992
- onabort(new AxiosError$1(`timeout of ${timeout}ms exceeded`, AxiosError$1.ETIMEDOUT));
19993
- }, timeout);
20304
+ let timer =
20305
+ timeout &&
20306
+ setTimeout(() => {
20307
+ timer = null;
20308
+ onabort(new AxiosError$1(`timeout of ${timeout}ms exceeded`, AxiosError$1.ETIMEDOUT));
20309
+ }, timeout);
19994
20310
 
19995
20311
  const unsubscribe = () => {
19996
20312
  if (signals) {
19997
20313
  timer && clearTimeout(timer);
19998
20314
  timer = null;
19999
- signals.forEach(signal => {
20000
- signal.unsubscribe ? signal.unsubscribe(onabort) : signal.removeEventListener('abort', onabort);
20315
+ signals.forEach((signal) => {
20316
+ signal.unsubscribe
20317
+ ? signal.unsubscribe(onabort)
20318
+ : signal.removeEventListener('abort', onabort);
20001
20319
  });
20002
20320
  signals = null;
20003
20321
  }
@@ -20005,7 +20323,7 @@ const composeSignals = (signals, timeout) => {
20005
20323
 
20006
20324
  signals.forEach((signal) => signal.addEventListener('abort', onabort));
20007
20325
 
20008
- const {signal} = controller;
20326
+ const { signal } = controller;
20009
20327
 
20010
20328
  signal.unsubscribe = () => utils$1.asap(unsubscribe);
20011
20329
 
@@ -20048,7 +20366,7 @@ const readStream = async function* (stream) {
20048
20366
  const reader = stream.getReader();
20049
20367
  try {
20050
20368
  for (;;) {
20051
- const {done, value} = await reader.read();
20369
+ const { done, value } = await reader.read();
20052
20370
  if (done) {
20053
20371
  break;
20054
20372
  }
@@ -20071,64 +20389,69 @@ const trackStream = (stream, chunkSize, onProgress, onFinish) => {
20071
20389
  }
20072
20390
  };
20073
20391
 
20074
- return new ReadableStream({
20075
- async pull(controller) {
20076
- try {
20077
- const {done, value} = await iterator.next();
20392
+ return new ReadableStream(
20393
+ {
20394
+ async pull(controller) {
20395
+ try {
20396
+ const { done, value } = await iterator.next();
20078
20397
 
20079
- if (done) {
20080
- _onFinish();
20081
- controller.close();
20082
- return;
20083
- }
20398
+ if (done) {
20399
+ _onFinish();
20400
+ controller.close();
20401
+ return;
20402
+ }
20084
20403
 
20085
- let len = value.byteLength;
20086
- if (onProgress) {
20087
- let loadedBytes = bytes += len;
20088
- onProgress(loadedBytes);
20404
+ let len = value.byteLength;
20405
+ if (onProgress) {
20406
+ let loadedBytes = (bytes += len);
20407
+ onProgress(loadedBytes);
20408
+ }
20409
+ controller.enqueue(new Uint8Array(value));
20410
+ } catch (err) {
20411
+ _onFinish(err);
20412
+ throw err;
20089
20413
  }
20090
- controller.enqueue(new Uint8Array(value));
20091
- } catch (err) {
20092
- _onFinish(err);
20093
- throw err;
20094
- }
20414
+ },
20415
+ cancel(reason) {
20416
+ _onFinish(reason);
20417
+ return iterator.return();
20418
+ },
20095
20419
  },
20096
- cancel(reason) {
20097
- _onFinish(reason);
20098
- return iterator.return();
20420
+ {
20421
+ highWaterMark: 2,
20099
20422
  }
20100
- }, {
20101
- highWaterMark: 2
20102
- })
20423
+ );
20103
20424
  };
20104
20425
 
20105
20426
  const DEFAULT_CHUNK_SIZE = 64 * 1024;
20106
20427
 
20107
- const {isFunction} = utils$1;
20428
+ const { isFunction } = utils$1;
20108
20429
 
20109
- const globalFetchAPI = (({Request, Response}) => ({
20110
- Request, Response
20430
+ const globalFetchAPI = (({ Request, Response }) => ({
20431
+ Request,
20432
+ Response,
20111
20433
  }))(utils$1.global);
20112
20434
 
20113
- const {
20114
- ReadableStream: ReadableStream$1, TextEncoder
20115
- } = utils$1.global;
20116
-
20435
+ const { ReadableStream: ReadableStream$1, TextEncoder } = utils$1.global;
20117
20436
 
20118
20437
  const test = (fn, ...args) => {
20119
20438
  try {
20120
20439
  return !!fn(...args);
20121
20440
  } catch (e) {
20122
- return false
20441
+ return false;
20123
20442
  }
20124
20443
  };
20125
20444
 
20126
20445
  const factory = (env) => {
20127
- env = utils$1.merge.call({
20128
- skipUndefined: true
20129
- }, globalFetchAPI, env);
20446
+ env = utils$1.merge.call(
20447
+ {
20448
+ skipUndefined: true,
20449
+ },
20450
+ globalFetchAPI,
20451
+ env
20452
+ );
20130
20453
 
20131
- const {fetch: envFetch, Request, Response} = env;
20454
+ const { fetch: envFetch, Request, Response } = env;
20132
20455
  const isFetchSupported = envFetch ? isFunction(envFetch) : typeof fetch === 'function';
20133
20456
  const isRequestSupported = isFunction(Request);
20134
20457
  const isResponseSupported = isFunction(Response);
@@ -20139,46 +20462,65 @@ const factory = (env) => {
20139
20462
 
20140
20463
  const isReadableStreamSupported = isFetchSupported && isFunction(ReadableStream$1);
20141
20464
 
20142
- const encodeText = isFetchSupported && (typeof TextEncoder === 'function' ?
20143
- ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) :
20144
- async (str) => new Uint8Array(await new Request(str).arrayBuffer())
20145
- );
20465
+ const encodeText =
20466
+ isFetchSupported &&
20467
+ (typeof TextEncoder === 'function'
20468
+ ? (
20469
+ (encoder) => (str) =>
20470
+ encoder.encode(str)
20471
+ )(new TextEncoder())
20472
+ : async (str) => new Uint8Array(await new Request(str).arrayBuffer()));
20146
20473
 
20147
- const supportsRequestStream = isRequestSupported && isReadableStreamSupported && test(() => {
20148
- let duplexAccessed = false;
20474
+ const supportsRequestStream =
20475
+ isRequestSupported &&
20476
+ isReadableStreamSupported &&
20477
+ test(() => {
20478
+ let duplexAccessed = false;
20149
20479
 
20150
- const hasContentType = new Request(platform.origin, {
20151
- body: new ReadableStream$1(),
20152
- method: 'POST',
20153
- get duplex() {
20154
- duplexAccessed = true;
20155
- return 'half';
20156
- },
20157
- }).headers.has('Content-Type');
20480
+ const body = new ReadableStream$1();
20158
20481
 
20159
- return duplexAccessed && !hasContentType;
20160
- });
20482
+ const hasContentType = new Request(platform.origin, {
20483
+ body,
20484
+ method: 'POST',
20485
+ get duplex() {
20486
+ duplexAccessed = true;
20487
+ return 'half';
20488
+ },
20489
+ }).headers.has('Content-Type');
20490
+
20491
+ body.cancel();
20492
+
20493
+ return duplexAccessed && !hasContentType;
20494
+ });
20161
20495
 
20162
- const supportsResponseStream = isResponseSupported && isReadableStreamSupported &&
20496
+ const supportsResponseStream =
20497
+ isResponseSupported &&
20498
+ isReadableStreamSupported &&
20163
20499
  test(() => utils$1.isReadableStream(new Response('').body));
20164
20500
 
20165
20501
  const resolvers = {
20166
- stream: supportsResponseStream && ((res) => res.body)
20502
+ stream: supportsResponseStream && ((res) => res.body),
20167
20503
  };
20168
20504
 
20169
- isFetchSupported && ((() => {
20170
- ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(type => {
20171
- !resolvers[type] && (resolvers[type] = (res, config) => {
20172
- let method = res && res[type];
20505
+ isFetchSupported &&
20506
+ (() => {
20507
+ ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach((type) => {
20508
+ !resolvers[type] &&
20509
+ (resolvers[type] = (res, config) => {
20510
+ let method = res && res[type];
20173
20511
 
20174
- if (method) {
20175
- return method.call(res);
20176
- }
20512
+ if (method) {
20513
+ return method.call(res);
20514
+ }
20177
20515
 
20178
- throw new AxiosError$1(`Response type '${type}' is not supported`, AxiosError$1.ERR_NOT_SUPPORT, config);
20516
+ throw new AxiosError$1(
20517
+ `Response type '${type}' is not supported`,
20518
+ AxiosError$1.ERR_NOT_SUPPORT,
20519
+ config
20520
+ );
20521
+ });
20179
20522
  });
20180
- });
20181
- })());
20523
+ })();
20182
20524
 
20183
20525
  const getBodyLength = async (body) => {
20184
20526
  if (body == null) {
@@ -20229,32 +20571,41 @@ const factory = (env) => {
20229
20571
  responseType,
20230
20572
  headers,
20231
20573
  withCredentials = 'same-origin',
20232
- fetchOptions
20574
+ fetchOptions,
20233
20575
  } = resolveConfig(config);
20234
20576
 
20235
20577
  let _fetch = envFetch || fetch;
20236
20578
 
20237
20579
  responseType = responseType ? (responseType + '').toLowerCase() : 'text';
20238
20580
 
20239
- let composedSignal = composeSignals$1([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
20581
+ let composedSignal = composeSignals$1(
20582
+ [signal, cancelToken && cancelToken.toAbortSignal()],
20583
+ timeout
20584
+ );
20240
20585
 
20241
20586
  let request = null;
20242
20587
 
20243
- const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
20244
- composedSignal.unsubscribe();
20245
- });
20588
+ const unsubscribe =
20589
+ composedSignal &&
20590
+ composedSignal.unsubscribe &&
20591
+ (() => {
20592
+ composedSignal.unsubscribe();
20593
+ });
20246
20594
 
20247
20595
  let requestContentLength;
20248
20596
 
20249
20597
  try {
20250
20598
  if (
20251
- onUploadProgress && supportsRequestStream && method !== 'get' && method !== 'head' &&
20599
+ onUploadProgress &&
20600
+ supportsRequestStream &&
20601
+ method !== 'get' &&
20602
+ method !== 'head' &&
20252
20603
  (requestContentLength = await resolveBodyLength(headers, data)) !== 0
20253
20604
  ) {
20254
20605
  let _request = new Request(url, {
20255
20606
  method: 'POST',
20256
20607
  body: data,
20257
- duplex: "half"
20608
+ duplex: 'half',
20258
20609
  });
20259
20610
 
20260
20611
  let contentTypeHeader;
@@ -20279,7 +20630,7 @@ const factory = (env) => {
20279
20630
 
20280
20631
  // Cloudflare Workers throws when credentials are defined
20281
20632
  // see https://github.com/cloudflare/workerd/issues/902
20282
- const isCredentialsSupported = isRequestSupported && "credentials" in Request.prototype;
20633
+ const isCredentialsSupported = isRequestSupported && 'credentials' in Request.prototype;
20283
20634
 
20284
20635
  const resolvedOptions = {
20285
20636
  ...fetchOptions,
@@ -20287,29 +20638,35 @@ const factory = (env) => {
20287
20638
  method: method.toUpperCase(),
20288
20639
  headers: headers.normalize().toJSON(),
20289
20640
  body: data,
20290
- duplex: "half",
20291
- credentials: isCredentialsSupported ? withCredentials : undefined
20641
+ duplex: 'half',
20642
+ credentials: isCredentialsSupported ? withCredentials : undefined,
20292
20643
  };
20293
20644
 
20294
20645
  request = isRequestSupported && new Request(url, resolvedOptions);
20295
20646
 
20296
- let response = await (isRequestSupported ? _fetch(request, fetchOptions) : _fetch(url, resolvedOptions));
20647
+ let response = await (isRequestSupported
20648
+ ? _fetch(request, fetchOptions)
20649
+ : _fetch(url, resolvedOptions));
20297
20650
 
20298
- const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response');
20651
+ const isStreamResponse =
20652
+ supportsResponseStream && (responseType === 'stream' || responseType === 'response');
20299
20653
 
20300
20654
  if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) {
20301
20655
  const options = {};
20302
20656
 
20303
- ['status', 'statusText', 'headers'].forEach(prop => {
20657
+ ['status', 'statusText', 'headers'].forEach((prop) => {
20304
20658
  options[prop] = response[prop];
20305
20659
  });
20306
20660
 
20307
20661
  const responseContentLength = utils$1.toFiniteNumber(response.headers.get('content-length'));
20308
20662
 
20309
- const [onProgress, flush] = onDownloadProgress && progressEventDecorator(
20310
- responseContentLength,
20311
- progressEventReducer(asyncDecorator(onDownloadProgress), true)
20312
- ) || [];
20663
+ const [onProgress, flush] =
20664
+ (onDownloadProgress &&
20665
+ progressEventDecorator(
20666
+ responseContentLength,
20667
+ progressEventReducer(asyncDecorator(onDownloadProgress), true)
20668
+ )) ||
20669
+ [];
20313
20670
 
20314
20671
  response = new Response(
20315
20672
  trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
@@ -20322,7 +20679,10 @@ const factory = (env) => {
20322
20679
 
20323
20680
  responseType = responseType || 'text';
20324
20681
 
20325
- let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || 'text'](response, config);
20682
+ let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || 'text'](
20683
+ response,
20684
+ config
20685
+ );
20326
20686
 
20327
20687
  !isStreamResponse && unsubscribe && unsubscribe();
20328
20688
 
@@ -20333,43 +20693,50 @@ const factory = (env) => {
20333
20693
  status: response.status,
20334
20694
  statusText: response.statusText,
20335
20695
  config,
20336
- request
20696
+ request,
20337
20697
  });
20338
- })
20698
+ });
20339
20699
  } catch (err) {
20340
20700
  unsubscribe && unsubscribe();
20341
20701
 
20342
20702
  if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) {
20343
20703
  throw Object.assign(
20344
- new AxiosError$1('Network Error', AxiosError$1.ERR_NETWORK, config, request),
20704
+ new AxiosError$1(
20705
+ 'Network Error',
20706
+ AxiosError$1.ERR_NETWORK,
20707
+ config,
20708
+ request,
20709
+ err && err.response
20710
+ ),
20345
20711
  {
20346
- cause: err.cause || err
20712
+ cause: err.cause || err,
20347
20713
  }
20348
- )
20714
+ );
20349
20715
  }
20350
20716
 
20351
- throw AxiosError$1.from(err, err && err.code, config, request);
20717
+ throw AxiosError$1.from(err, err && err.code, config, request, err && err.response);
20352
20718
  }
20353
- }
20719
+ };
20354
20720
  };
20355
20721
 
20356
20722
  const seedCache = new Map();
20357
20723
 
20358
20724
  const getFetch = (config) => {
20359
20725
  let env = (config && config.env) || {};
20360
- const {fetch, Request, Response} = env;
20361
- const seeds = [
20362
- Request, Response, fetch
20363
- ];
20726
+ const { fetch, Request, Response } = env;
20727
+ const seeds = [Request, Response, fetch];
20364
20728
 
20365
- let len = seeds.length, i = len,
20366
- seed, target, map = seedCache;
20729
+ let len = seeds.length,
20730
+ i = len,
20731
+ seed,
20732
+ target,
20733
+ map = seedCache;
20367
20734
 
20368
20735
  while (i--) {
20369
20736
  seed = seeds[i];
20370
20737
  target = map.get(seed);
20371
20738
 
20372
- target === undefined && map.set(seed, target = (i ? new Map() : factory(env)));
20739
+ target === undefined && map.set(seed, (target = i ? new Map() : factory(env)));
20373
20740
 
20374
20741
  map = target;
20375
20742
  }
@@ -20385,7 +20752,7 @@ getFetch();
20385
20752
  * - `http` for Node.js
20386
20753
  * - `xhr` for browsers
20387
20754
  * - `fetch` for fetch API-based requests
20388
- *
20755
+ *
20389
20756
  * @type {Object<string, Function|Object>}
20390
20757
  */
20391
20758
  const knownAdapters = {
@@ -20393,7 +20760,7 @@ const knownAdapters = {
20393
20760
  xhr: xhrAdapter,
20394
20761
  fetch: {
20395
20762
  get: getFetch,
20396
- }
20763
+ },
20397
20764
  };
20398
20765
 
20399
20766
  // Assign adapter names for easier debugging and identification
@@ -20410,7 +20777,7 @@ utils$1.forEach(knownAdapters, (fn, value) => {
20410
20777
 
20411
20778
  /**
20412
20779
  * Render a rejection reason string for unknown or unsupported adapters
20413
- *
20780
+ *
20414
20781
  * @param {string} reason
20415
20782
  * @returns {string}
20416
20783
  */
@@ -20418,17 +20785,18 @@ const renderReason = (reason) => `- ${reason}`;
20418
20785
 
20419
20786
  /**
20420
20787
  * Check if the adapter is resolved (function, null, or false)
20421
- *
20788
+ *
20422
20789
  * @param {Function|null|false} adapter
20423
20790
  * @returns {boolean}
20424
20791
  */
20425
- const isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false;
20792
+ const isResolvedHandle = (adapter) =>
20793
+ utils$1.isFunction(adapter) || adapter === null || adapter === false;
20426
20794
 
20427
20795
  /**
20428
20796
  * Get the first suitable adapter from the provided list.
20429
20797
  * Tries each adapter in order until a supported one is found.
20430
20798
  * Throws an AxiosError if no adapter is suitable.
20431
- *
20799
+ *
20432
20800
  * @param {Array<string|Function>|string|Function} adapters - Adapter(s) by name or function.
20433
20801
  * @param {Object} config - Axios request configuration
20434
20802
  * @throws {AxiosError} If no suitable adapter is available
@@ -20465,14 +20833,17 @@ function getAdapter(adapters, config) {
20465
20833
  }
20466
20834
 
20467
20835
  if (!adapter) {
20468
- const reasons = Object.entries(rejectedReasons)
20469
- .map(([id, state]) => `adapter ${id} ` +
20836
+ const reasons = Object.entries(rejectedReasons).map(
20837
+ ([id, state]) =>
20838
+ `adapter ${id} ` +
20470
20839
  (state === false ? 'is not supported by the environment' : 'is not available in the build')
20471
- );
20840
+ );
20472
20841
 
20473
- let s = length ?
20474
- (reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0])) :
20475
- 'as no adapter specified';
20842
+ let s = length
20843
+ ? reasons.length > 1
20844
+ ? 'since :\n' + reasons.map(renderReason).join('\n')
20845
+ : ' ' + renderReason(reasons[0])
20846
+ : 'as no adapter specified';
20476
20847
 
20477
20848
  throw new AxiosError$1(
20478
20849
  `There is no suitable adapter to dispatch the request ` + s,
@@ -20497,7 +20868,7 @@ var adapters = {
20497
20868
  * Exposes all known adapters
20498
20869
  * @type {Object<string, Function|Object>}
20499
20870
  */
20500
- adapters: knownAdapters
20871
+ adapters: knownAdapters,
20501
20872
  };
20502
20873
 
20503
20874
  /**
@@ -20530,10 +20901,7 @@ function dispatchRequest(config) {
20530
20901
  config.headers = AxiosHeaders$1.from(config.headers);
20531
20902
 
20532
20903
  // Transform request data
20533
- config.data = transformData.call(
20534
- config,
20535
- config.transformRequest
20536
- );
20904
+ config.data = transformData.call(config, config.transformRequest);
20537
20905
 
20538
20906
  if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {
20539
20907
  config.headers.setContentType('application/x-www-form-urlencoded', false);
@@ -20541,39 +20909,38 @@ function dispatchRequest(config) {
20541
20909
 
20542
20910
  const adapter = adapters.getAdapter(config.adapter || defaults$1.adapter, config);
20543
20911
 
20544
- return adapter(config).then(function onAdapterResolution(response) {
20545
- throwIfCancellationRequested(config);
20546
-
20547
- // Transform response data
20548
- response.data = transformData.call(
20549
- config,
20550
- config.transformResponse,
20551
- response
20552
- );
20553
-
20554
- response.headers = AxiosHeaders$1.from(response.headers);
20555
-
20556
- return response;
20557
- }, function onAdapterRejection(reason) {
20558
- if (!isCancel(reason)) {
20912
+ return adapter(config).then(
20913
+ function onAdapterResolution(response) {
20559
20914
  throwIfCancellationRequested(config);
20560
20915
 
20561
20916
  // Transform response data
20562
- if (reason && reason.response) {
20563
- reason.response.data = transformData.call(
20564
- config,
20565
- config.transformResponse,
20566
- reason.response
20567
- );
20568
- reason.response.headers = AxiosHeaders$1.from(reason.response.headers);
20917
+ response.data = transformData.call(config, config.transformResponse, response);
20918
+
20919
+ response.headers = AxiosHeaders$1.from(response.headers);
20920
+
20921
+ return response;
20922
+ },
20923
+ function onAdapterRejection(reason) {
20924
+ if (!isCancel(reason)) {
20925
+ throwIfCancellationRequested(config);
20926
+
20927
+ // Transform response data
20928
+ if (reason && reason.response) {
20929
+ reason.response.data = transformData.call(
20930
+ config,
20931
+ config.transformResponse,
20932
+ reason.response
20933
+ );
20934
+ reason.response.headers = AxiosHeaders$1.from(reason.response.headers);
20935
+ }
20569
20936
  }
20570
- }
20571
20937
 
20572
- return Promise.reject(reason);
20573
- });
20938
+ return Promise.reject(reason);
20939
+ }
20940
+ );
20574
20941
  }
20575
20942
 
20576
- const VERSION = "1.13.4";
20943
+ const VERSION = "1.15.0";
20577
20944
 
20578
20945
  const validators$1 = {};
20579
20946
 
@@ -20597,7 +20964,15 @@ const deprecatedWarnings = {};
20597
20964
  */
20598
20965
  validators$1.transitional = function transitional(validator, version, message) {
20599
20966
  function formatMessage(opt, desc) {
20600
- return '[Axios v' + VERSION + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : '');
20967
+ return (
20968
+ '[Axios v' +
20969
+ VERSION +
20970
+ "] Transitional option '" +
20971
+ opt +
20972
+ "'" +
20973
+ desc +
20974
+ (message ? '. ' + message : '')
20975
+ );
20601
20976
  }
20602
20977
 
20603
20978
  // eslint-disable-next-line func-names
@@ -20629,7 +21004,7 @@ validators$1.spelling = function spelling(correctSpelling) {
20629
21004
  // eslint-disable-next-line no-console
20630
21005
  console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);
20631
21006
  return true;
20632
- }
21007
+ };
20633
21008
  };
20634
21009
 
20635
21010
  /**
@@ -20655,7 +21030,10 @@ function assertOptions(options, schema, allowUnknown) {
20655
21030
  const value = options[opt];
20656
21031
  const result = value === undefined || validator(value, opt, options);
20657
21032
  if (result !== true) {
20658
- throw new AxiosError$1('option ' + opt + ' must be ' + result, AxiosError$1.ERR_BAD_OPTION_VALUE);
21033
+ throw new AxiosError$1(
21034
+ 'option ' + opt + ' must be ' + result,
21035
+ AxiosError$1.ERR_BAD_OPTION_VALUE
21036
+ );
20659
21037
  }
20660
21038
  continue;
20661
21039
  }
@@ -20667,7 +21045,7 @@ function assertOptions(options, schema, allowUnknown) {
20667
21045
 
20668
21046
  var validator = {
20669
21047
  assertOptions,
20670
- validators: validators$1
21048
+ validators: validators$1,
20671
21049
  };
20672
21050
 
20673
21051
  const validators = validator.validators;
@@ -20684,7 +21062,7 @@ class Axios {
20684
21062
  this.defaults = instanceConfig || {};
20685
21063
  this.interceptors = {
20686
21064
  request: new InterceptorManager$1(),
20687
- response: new InterceptorManager$1()
21065
+ response: new InterceptorManager$1(),
20688
21066
  };
20689
21067
  }
20690
21068
 
@@ -20706,13 +21084,29 @@ class Axios {
20706
21084
  Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error());
20707
21085
 
20708
21086
  // slice off the Error: ... line
20709
- const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, '') : '';
21087
+ const stack = (() => {
21088
+ if (!dummy.stack) {
21089
+ return '';
21090
+ }
21091
+
21092
+ const firstNewlineIndex = dummy.stack.indexOf('\n');
21093
+
21094
+ return firstNewlineIndex === -1 ? '' : dummy.stack.slice(firstNewlineIndex + 1);
21095
+ })();
20710
21096
  try {
20711
21097
  if (!err.stack) {
20712
21098
  err.stack = stack;
20713
21099
  // match without the 2 top stack lines
20714
- } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ''))) {
20715
- err.stack += '\n' + stack;
21100
+ } else if (stack) {
21101
+ const firstNewlineIndex = stack.indexOf('\n');
21102
+ const secondNewlineIndex =
21103
+ firstNewlineIndex === -1 ? -1 : stack.indexOf('\n', firstNewlineIndex + 1);
21104
+ const stackWithoutTwoTopLines =
21105
+ secondNewlineIndex === -1 ? '' : stack.slice(secondNewlineIndex + 1);
21106
+
21107
+ if (!String(err.stack).endsWith(stackWithoutTwoTopLines)) {
21108
+ err.stack += '\n' + stack;
21109
+ }
20716
21110
  }
20717
21111
  } catch (e) {
20718
21112
  // ignore the case where "stack" is an un-writable property
@@ -20735,26 +21129,35 @@ class Axios {
20735
21129
 
20736
21130
  config = mergeConfig(this.defaults, config);
20737
21131
 
20738
- const {transitional, paramsSerializer, headers} = config;
21132
+ const { transitional, paramsSerializer, headers } = config;
20739
21133
 
20740
21134
  if (transitional !== undefined) {
20741
- validator.assertOptions(transitional, {
20742
- silentJSONParsing: validators.transitional(validators.boolean),
20743
- forcedJSONParsing: validators.transitional(validators.boolean),
20744
- clarifyTimeoutError: validators.transitional(validators.boolean)
20745
- }, false);
21135
+ validator.assertOptions(
21136
+ transitional,
21137
+ {
21138
+ silentJSONParsing: validators.transitional(validators.boolean),
21139
+ forcedJSONParsing: validators.transitional(validators.boolean),
21140
+ clarifyTimeoutError: validators.transitional(validators.boolean),
21141
+ legacyInterceptorReqResOrdering: validators.transitional(validators.boolean),
21142
+ },
21143
+ false
21144
+ );
20746
21145
  }
20747
21146
 
20748
21147
  if (paramsSerializer != null) {
20749
21148
  if (utils$1.isFunction(paramsSerializer)) {
20750
21149
  config.paramsSerializer = {
20751
- serialize: paramsSerializer
21150
+ serialize: paramsSerializer,
20752
21151
  };
20753
21152
  } else {
20754
- validator.assertOptions(paramsSerializer, {
20755
- encode: validators.function,
20756
- serialize: validators.function
20757
- }, true);
21153
+ validator.assertOptions(
21154
+ paramsSerializer,
21155
+ {
21156
+ encode: validators.function,
21157
+ serialize: validators.function,
21158
+ },
21159
+ true
21160
+ );
20758
21161
  }
20759
21162
  }
20760
21163
 
@@ -20765,26 +21168,25 @@ class Axios {
20765
21168
  config.allowAbsoluteUrls = true;
20766
21169
  }
20767
21170
 
20768
- validator.assertOptions(config, {
20769
- baseUrl: validators.spelling('baseURL'),
20770
- withXsrfToken: validators.spelling('withXSRFToken')
20771
- }, true);
21171
+ validator.assertOptions(
21172
+ config,
21173
+ {
21174
+ baseUrl: validators.spelling('baseURL'),
21175
+ withXsrfToken: validators.spelling('withXSRFToken'),
21176
+ },
21177
+ true
21178
+ );
20772
21179
 
20773
21180
  // Set config.method
20774
21181
  config.method = (config.method || this.defaults.method || 'get').toLowerCase();
20775
21182
 
20776
21183
  // Flatten headers
20777
- let contextHeaders = headers && utils$1.merge(
20778
- headers.common,
20779
- headers[config.method]
20780
- );
21184
+ let contextHeaders = headers && utils$1.merge(headers.common, headers[config.method]);
20781
21185
 
20782
- headers && utils$1.forEach(
20783
- ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
20784
- (method) => {
21186
+ headers &&
21187
+ utils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], (method) => {
20785
21188
  delete headers[method];
20786
- }
20787
- );
21189
+ });
20788
21190
 
20789
21191
  config.headers = AxiosHeaders$1.concat(contextHeaders, headers);
20790
21192
 
@@ -20798,7 +21200,15 @@ class Axios {
20798
21200
 
20799
21201
  synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
20800
21202
 
20801
- requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
21203
+ const transitional = config.transitional || transitionalDefaults;
21204
+ const legacyInterceptorReqResOrdering =
21205
+ transitional && transitional.legacyInterceptorReqResOrdering;
21206
+
21207
+ if (legacyInterceptorReqResOrdering) {
21208
+ requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
21209
+ } else {
21210
+ requestInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
21211
+ }
20802
21212
  });
20803
21213
 
20804
21214
  const responseInterceptorChain = [];
@@ -20866,28 +21276,32 @@ class Axios {
20866
21276
  // Provide aliases for supported request methods
20867
21277
  utils$1.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
20868
21278
  /*eslint func-names:0*/
20869
- Axios.prototype[method] = function(url, config) {
20870
- return this.request(mergeConfig(config || {}, {
20871
- method,
20872
- url,
20873
- data: (config || {}).data
20874
- }));
21279
+ Axios.prototype[method] = function (url, config) {
21280
+ return this.request(
21281
+ mergeConfig(config || {}, {
21282
+ method,
21283
+ url,
21284
+ data: (config || {}).data,
21285
+ })
21286
+ );
20875
21287
  };
20876
21288
  });
20877
21289
 
20878
21290
  utils$1.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
20879
- /*eslint func-names:0*/
20880
-
20881
21291
  function generateHTTPMethod(isForm) {
20882
21292
  return function httpMethod(url, data, config) {
20883
- return this.request(mergeConfig(config || {}, {
20884
- method,
20885
- headers: isForm ? {
20886
- 'Content-Type': 'multipart/form-data'
20887
- } : {},
20888
- url,
20889
- data
20890
- }));
21293
+ return this.request(
21294
+ mergeConfig(config || {}, {
21295
+ method,
21296
+ headers: isForm
21297
+ ? {
21298
+ 'Content-Type': 'multipart/form-data',
21299
+ }
21300
+ : {},
21301
+ url,
21302
+ data,
21303
+ })
21304
+ );
20891
21305
  };
20892
21306
  }
20893
21307
 
@@ -20920,7 +21334,7 @@ class CancelToken {
20920
21334
  const token = this;
20921
21335
 
20922
21336
  // eslint-disable-next-line func-names
20923
- this.promise.then(cancel => {
21337
+ this.promise.then((cancel) => {
20924
21338
  if (!token._listeners) return;
20925
21339
 
20926
21340
  let i = token._listeners.length;
@@ -20932,10 +21346,10 @@ class CancelToken {
20932
21346
  });
20933
21347
 
20934
21348
  // eslint-disable-next-line func-names
20935
- this.promise.then = onfulfilled => {
21349
+ this.promise.then = (onfulfilled) => {
20936
21350
  let _resolve;
20937
21351
  // eslint-disable-next-line func-names
20938
- const promise = new Promise(resolve => {
21352
+ const promise = new Promise((resolve) => {
20939
21353
  token.subscribe(resolve);
20940
21354
  _resolve = resolve;
20941
21355
  }).then(onfulfilled);
@@ -21023,7 +21437,7 @@ class CancelToken {
21023
21437
  });
21024
21438
  return {
21025
21439
  token,
21026
- cancel
21440
+ cancel,
21027
21441
  };
21028
21442
  }
21029
21443
  }
@@ -21065,7 +21479,7 @@ function spread(callback) {
21065
21479
  * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
21066
21480
  */
21067
21481
  function isAxiosError(payload) {
21068
- return utils$1.isObject(payload) && (payload.isAxiosError === true);
21482
+ return utils$1.isObject(payload) && payload.isAxiosError === true;
21069
21483
  }
21070
21484
 
21071
21485
  const HttpStatusCode = {
@@ -21158,10 +21572,10 @@ function createInstance(defaultConfig) {
21158
21572
  const instance = bind(Axios$1.prototype.request, context);
21159
21573
 
21160
21574
  // Copy axios.prototype to instance
21161
- utils$1.extend(instance, Axios$1.prototype, context, {allOwnKeys: true});
21575
+ utils$1.extend(instance, Axios$1.prototype, context, { allOwnKeys: true });
21162
21576
 
21163
21577
  // Copy context to instance
21164
- utils$1.extend(instance, context, null, {allOwnKeys: true});
21578
+ utils$1.extend(instance, context, null, { allOwnKeys: true });
21165
21579
 
21166
21580
  // Factory for creating new instances
21167
21581
  instance.create = function create(instanceConfig) {
@@ -21205,7 +21619,7 @@ axios.mergeConfig = mergeConfig;
21205
21619
 
21206
21620
  axios.AxiosHeaders = AxiosHeaders$1;
21207
21621
 
21208
- axios.formToJSON = thing => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);
21622
+ axios.formToJSON = (thing) => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);
21209
21623
 
21210
21624
  axios.getAdapter = adapters.getAdapter;
21211
21625
 
@@ -21298,18 +21712,26 @@ const DEFAULT_TRANSLATIONS = {
21298
21712
  const API_ENDPOINTS = {
21299
21713
  ADD_USER: '/user/add-from-partner',
21300
21714
  VALIDATE_EMAIL: '/user/validate',
21301
- GET_COUNTRIES: '/common/country-list',
21715
+ GET_COUNTRIES: '/form-library/country-list',
21302
21716
  CHECK_MAINTENANCE: '/app-configuration/maintenance-status',
21303
- GET_ORG_SIZES: '/common/orgsizing-list',
21304
- GET_INDUSTRIES: '/common/industry-list',
21717
+ GET_ORG_SIZES: '/form-library/orgsizing-list',
21718
+ GET_INDUSTRIES: '/form-library/industry-list',
21305
21719
  GET_PARTNER: '/partner/get',
21306
- GET_PARTNER_BY_NAME: '/partner/get-by-name',
21720
+ GET_PARTNER_BY_GUID: '/partner/get-by-guid',
21307
21721
  GET_LOCALIZATION: '/localization/get',
21308
21722
  };
21309
21723
 
21310
21724
  class ApiService {
21311
- constructor(baseUrl) {
21725
+ constructor(baseUrl, partnerGuid) {
21312
21726
  this.baseUrl = baseUrl.endsWith("/") ? baseUrl.slice(0, -1) : baseUrl;
21727
+ this.axios = axios$1.create();
21728
+ this.axios.interceptors.request.use((config) => {
21729
+ if (partnerGuid) {
21730
+ config.headers.set("X-Partner-Guid", partnerGuid);
21731
+ }
21732
+ return config;
21733
+ });
21734
+ this.axiosPlain = axios$1.create();
21313
21735
  }
21314
21736
  getUrl(path) {
21315
21737
  const isLocalhost = this.baseUrl.includes("localhost");
@@ -21321,7 +21743,7 @@ class ApiService {
21321
21743
  */
21322
21744
  async addUser(user, partnerName, callingDomain) {
21323
21745
  return new Promise((resolve, reject) => {
21324
- axios$1
21746
+ this.axios
21325
21747
  .post(this.getUrl(`${API_ENDPOINTS.ADD_USER}?partnerName=${partnerName}&callingDomain=${callingDomain}`), user)
21326
21748
  .then((response) => {
21327
21749
  if (response.data.isSuccess)
@@ -21339,7 +21761,7 @@ class ApiService {
21339
21761
  */
21340
21762
  async validateEmail(email, signal) {
21341
21763
  try {
21342
- const response = await axios$1.get(this.getUrl(API_ENDPOINTS.VALIDATE_EMAIL), {
21764
+ const response = await this.axios.get(this.getUrl(API_ENDPOINTS.VALIDATE_EMAIL), {
21343
21765
  params: { email },
21344
21766
  signal,
21345
21767
  });
@@ -21364,7 +21786,7 @@ class ApiService {
21364
21786
  */
21365
21787
  async getCountries() {
21366
21788
  try {
21367
- const response = await axios$1.get(this.getUrl(API_ENDPOINTS.GET_COUNTRIES));
21789
+ const response = await this.axios.get(this.getUrl(API_ENDPOINTS.GET_COUNTRIES));
21368
21790
  // Handle both wrapped and unwrapped responses
21369
21791
  if (response.data.isSuccess !== undefined) {
21370
21792
  // Wrapped response from your API
@@ -21401,7 +21823,7 @@ class ApiService {
21401
21823
  */
21402
21824
  async checkMaintenanceStatus() {
21403
21825
  try {
21404
- const response = await axios$1.get(this.getUrl(API_ENDPOINTS.CHECK_MAINTENANCE));
21826
+ const response = await this.axios.get(this.getUrl(API_ENDPOINTS.CHECK_MAINTENANCE));
21405
21827
  if (response.data.isSuccess) {
21406
21828
  return response.data.data;
21407
21829
  }
@@ -21419,7 +21841,7 @@ class ApiService {
21419
21841
  */
21420
21842
  async getOrgSizes() {
21421
21843
  try {
21422
- const response = await axios$1.get(this.getUrl(API_ENDPOINTS.GET_ORG_SIZES));
21844
+ const response = await this.axios.get(this.getUrl(API_ENDPOINTS.GET_ORG_SIZES));
21423
21845
  if (response.data.isSuccess) {
21424
21846
  // Map from your API format (lowerBound/upperBound) to library format (sizeLowerBound/sizeUpperBound)
21425
21847
  return response.data.data.map((size) => ({
@@ -21447,7 +21869,7 @@ class ApiService {
21447
21869
  */
21448
21870
  async getIndustries() {
21449
21871
  try {
21450
- const response = await axios$1.get(this.getUrl(API_ENDPOINTS.GET_INDUSTRIES));
21872
+ const response = await this.axios.get(this.getUrl(API_ENDPOINTS.GET_INDUSTRIES));
21451
21873
  if (response.data.isSuccess) {
21452
21874
  // Your API already returns { id, name } format
21453
21875
  return response.data.data;
@@ -21476,7 +21898,7 @@ class ApiService {
21476
21898
  domain = domain.replace(/^(https?:\/\/)/, "");
21477
21899
  // Remove www. prefix if present (but keep port)
21478
21900
  domain = domain.replace(/^www\./, "");
21479
- const response = await axios$1.get(this.getUrl(API_ENDPOINTS.GET_PARTNER), {
21901
+ const response = await this.axios.get(this.getUrl(API_ENDPOINTS.GET_PARTNER), {
21480
21902
  params: { domain },
21481
21903
  });
21482
21904
  if (response.data.isSuccess) {
@@ -21497,10 +21919,10 @@ class ApiService {
21497
21919
  * Get partner by name
21498
21920
  * Extracts name from the baseUrl automatically and cleans it
21499
21921
  */
21500
- async getPartnerByName(partnerName) {
21922
+ async getPartnerByGuid(partnerGuid) {
21501
21923
  try {
21502
- const response = await axios$1.get(this.getUrl(API_ENDPOINTS.GET_PARTNER_BY_NAME), {
21503
- params: { name: partnerName },
21924
+ const response = await this.axiosPlain.get(this.getUrl(API_ENDPOINTS.GET_PARTNER_BY_GUID), {
21925
+ params: { guid: partnerGuid },
21504
21926
  });
21505
21927
  if (response.data.isSuccess) {
21506
21928
  return response.data.data;
@@ -21521,7 +21943,7 @@ class ApiService {
21521
21943
  */
21522
21944
  async getFormScreenLocalization(languageCode, partnerId) {
21523
21945
  try {
21524
- const response = await axios$1.get(this.getUrl(`${API_ENDPOINTS.GET_LOCALIZATION}/${languageCode}/FormScreen/${partnerId}`));
21946
+ const response = await this.axios.get(this.getUrl(`${API_ENDPOINTS.GET_LOCALIZATION}/${languageCode}/FormScreen/${partnerId}`));
21525
21947
  if (response.data.isSuccess) {
21526
21948
  return response.data.data;
21527
21949
  }
@@ -21555,6 +21977,15 @@ const createFormStyles = (primaryColor = '#00BAE4', fonts, backgroundColor = '#F
21555
21977
  padding: '5% 10%',
21556
21978
  },
21557
21979
  },
21980
+ thankyouTopWrapper: {
21981
+ display: 'flex',
21982
+ flexDirection: 'column',
21983
+ alignItems: 'center',
21984
+ padding: '5% 15%',
21985
+ '@media (max-width: 768px)': {
21986
+ padding: '5% 10%',
21987
+ },
21988
+ },
21558
21989
  formWrapper: {
21559
21990
  backgroundColor: '#fff',
21560
21991
  minWidth: '600px',
@@ -22428,9 +22859,9 @@ const SSASRegistrationForm = ({ config, }) => {
22428
22859
  const mergedConfig = useFormConfig(config);
22429
22860
  // Stable service used only for partner lookup (works with relative URLs)
22430
22861
  const initCheckUrl = mergedConfig.apiBaseUrl || "https://portal.selfserviceassessment.com";
22431
- const partnerApiService = React.useMemo(() => new ApiService(initCheckUrl), [initCheckUrl]);
22862
+ const partnerApiService = React.useMemo(() => new ApiService(initCheckUrl, mergedConfig.partnerGuid), [initCheckUrl, mergedConfig.partnerGuid]);
22432
22863
  // Main service uses the partner's own domain once loaded
22433
- const apiService = React.useMemo(() => new ApiService(partnerData?.domain ? new URL(`https://${partnerData?.domain}`).toString() : ""), [partnerData?.domain]);
22864
+ const apiService = React.useMemo(() => new ApiService(partnerData?.domain ? new URL(`https://${partnerData?.domain}`).toString() : "", mergedConfig.partnerGuid), [partnerData?.domain, mergedConfig.partnerGuid]);
22434
22865
  const styles = React.useMemo(() => createFormStyles(mergedConfig.theme?.primaryColor || colorWidget?.column1, mergedConfig.theme?.fonts, mergedConfig.theme?.backgroundColor), [mergedConfig.theme?.primaryColor, mergedConfig.theme?.fonts, mergedConfig.theme?.backgroundColor, colorWidget?.column1]);
22435
22866
  const [isRegistering, setIsRegistering] = React.useState(false);
22436
22867
  const [performByPartner, setPerformByPartner] = React.useState(false);
@@ -22487,7 +22918,7 @@ const SSASRegistrationForm = ({ config, }) => {
22487
22918
  React.useEffect(() => {
22488
22919
  setIsLoadingPartner(true);
22489
22920
  partnerApiService
22490
- .getPartnerByName(mergedConfig.partnerName)
22921
+ .getPartnerByGuid(mergedConfig.partnerGuid)
22491
22922
  .then((partner) => {
22492
22923
  partner ? setPartnerData(partner) : setPartnerLoadFailed(true);
22493
22924
  })
@@ -22498,7 +22929,7 @@ const SSASRegistrationForm = ({ config, }) => {
22498
22929
  .finally(() => {
22499
22930
  setIsLoadingPartner(false);
22500
22931
  });
22501
- }, [mergedConfig.partnerName]);
22932
+ }, [mergedConfig.partnerGuid, partnerApiService]);
22502
22933
  // Step 2: Load remaining data once partnerData is available
22503
22934
  React.useEffect(() => {
22504
22935
  if (!partnerData)
@@ -22705,7 +23136,7 @@ const SSASRegistrationForm = ({ config, }) => {
22705
23136
  if (finalStep) {
22706
23137
  // Default success screen
22707
23138
  return (React.createElement("div", { className: styles.mainContainer },
22708
- React.createElement("div", { className: styles.topWrapper, style: mergedConfig.customStyles?.topWrapper },
23139
+ React.createElement("div", { className: styles.thankyouTopWrapper },
22709
23140
  React.createElement("div", { className: styles.finalStepContainer },
22710
23141
  React.createElement("div", { className: styles.textBlock },
22711
23142
  React.createElement("div", { style: {