@myinterview/widget-react 1.1.53 → 1.1.54-development-66eb8ed

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/esm/index.js CHANGED
@@ -11608,7 +11608,7 @@ const Explanation = ({ isVideoQuestion, isAssessment, timeLimit, answerType, dur
11608
11608
  !!timeLimit && (t(`recorder.explanation.question.${isAssessment ? 'questionDuration' : 'questionThinkingTime'}`, { time })))));
11609
11609
  };
11610
11610
 
11611
- var platform$2 = {exports: {}};
11611
+ var platform$3 = {exports: {}};
11612
11612
 
11613
11613
  /*!
11614
11614
  * Platform.js v1.3.6
@@ -12850,9 +12850,9 @@ var platform$2 = {exports: {}};
12850
12850
  root.platform = platform;
12851
12851
  }
12852
12852
  }.call(commonjsGlobal));
12853
- } (platform$2, platform$2.exports));
12853
+ } (platform$3, platform$3.exports));
12854
12854
 
12855
- var platform$1 = platform$2.exports;
12855
+ var platform$2 = platform$3.exports;
12856
12856
 
12857
12857
  // Generated ESM version of ua-parser-js
12858
12858
  // DO NOT EDIT THIS FILE!
@@ -14085,21 +14085,21 @@ const getUAParserData = (userAgent) => {
14085
14085
  }
14086
14086
  return undefined;
14087
14087
  };
14088
- const isMobile = ['Android', 'iOS'].some((os) => { var _a, _b; return (_b = (_a = platform$1.os) === null || _a === void 0 ? void 0 : _a.family) === null || _b === void 0 ? void 0 : _b.includes(os); })
14089
- || ((_a = platform$1.name) === null || _a === void 0 ? void 0 : _a.includes('Mobile'))
14088
+ const isMobile = ['Android', 'iOS'].some((os) => { var _a, _b; return (_b = (_a = platform$2.os) === null || _a === void 0 ? void 0 : _a.family) === null || _b === void 0 ? void 0 : _b.includes(os); })
14089
+ || ((_a = platform$2.name) === null || _a === void 0 ? void 0 : _a.includes('Mobile'))
14090
14090
  || (navigator.maxTouchPoints > 2 && /MacIntel/.test(navigator.platform)); // For iPads
14091
- const validNumericVersion = Number(((_c = (_b = platform$1.os) === null || _b === void 0 ? void 0 : _b.version) !== null && _c !== void 0 ? _c : '').split('.').slice(0, 2).join('.'));
14092
- const isAndroid = ((_d = platform$1.os) === null || _d === void 0 ? void 0 : _d.family) === 'Android';
14093
- const isIphone = ((_e = platform$1.os) === null || _e === void 0 ? void 0 : _e.family) === 'iOS';
14091
+ const validNumericVersion = Number(((_c = (_b = platform$2.os) === null || _b === void 0 ? void 0 : _b.version) !== null && _c !== void 0 ? _c : '').split('.').slice(0, 2).join('.'));
14092
+ const isAndroid = ((_d = platform$2.os) === null || _d === void 0 ? void 0 : _d.family) === 'Android';
14093
+ const isIphone = ((_e = platform$2.os) === null || _e === void 0 ? void 0 : _e.family) === 'iOS';
14094
14094
  const isFireFox = navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
14095
- const isSupportedIosDevice = (((_f = platform$1.os) === null || _f === void 0 ? void 0 : _f.family) !== 'iOS' || (validNumericVersion || 14.4) >= 14.4);
14095
+ const isSupportedIosDevice = (((_f = platform$2.os) === null || _f === void 0 ? void 0 : _f.family) !== 'iOS' || (validNumericVersion || 14.4) >= 14.4);
14096
14096
  const isSupportedDevice = 'MediaRecorder' in window && isSupportedIosDevice;
14097
- const hasRotatedCameraIssue = (((_g = platform$1.os) === null || _g === void 0 ? void 0 : _g.family) === 'iOS' && validNumericVersion >= 18.4 && validNumericVersion < 18.6);
14097
+ const hasRotatedCameraIssue = (((_g = platform$2.os) === null || _g === void 0 ? void 0 : _g.family) === 'iOS' && validNumericVersion >= 18.4 && validNumericVersion < 18.6);
14098
14098
  const PLATFORMS_OPTIONS = ['ANDROID', 'IOS', 'MACBOOK', 'WINDOWS'];
14099
14099
  const BROWSERS_OPTIONS = ['CHROME', 'SAFARI', 'FIREFOX', 'SAMSUNG'];
14100
14100
  const DEVICE = {
14101
- PLATFORM: PLATFORMS_OPTIONS.find((p) => { var _a, _b; return (_b = (_a = platform$1.os) === null || _a === void 0 ? void 0 : _a.family) === null || _b === void 0 ? void 0 : _b.toUpperCase().includes(p === 'MACBOOK' ? 'OS X' : p); }) || 'WINDOWS',
14102
- BROWSER: BROWSERS_OPTIONS.find((b) => { var _a; return (_a = platform$1.name) === null || _a === void 0 ? void 0 : _a.toUpperCase().includes(b); }) || 'CHROME',
14101
+ PLATFORM: PLATFORMS_OPTIONS.find((p) => { var _a, _b; return (_b = (_a = platform$2.os) === null || _a === void 0 ? void 0 : _a.family) === null || _b === void 0 ? void 0 : _b.toUpperCase().includes(p === 'MACBOOK' ? 'OS X' : p); }) || 'WINDOWS',
14102
+ BROWSER: BROWSERS_OPTIONS.find((b) => { var _a; return (_a = platform$2.name) === null || _a === void 0 ? void 0 : _a.toUpperCase().includes(b); }) || 'CHROME',
14103
14103
  };
14104
14104
  const isPortrait = () => {
14105
14105
  if (typeof window.matchMedia !== 'undefined') {
@@ -32767,7 +32767,7 @@ const SKIPPED = '__SKIPPED';
32767
32767
  * or else the return value of the original function.
32768
32768
  */
32769
32769
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
32770
- function throttle(
32770
+ function throttle$2(
32771
32771
  fn,
32772
32772
  maxCount,
32773
32773
  durationSeconds,
@@ -32896,7 +32896,7 @@ class ReplayContainer {
32896
32896
  maxWait: this._options.flushMaxDelay,
32897
32897
  });
32898
32898
 
32899
- this._throttledAddEvent = throttle(
32899
+ this._throttledAddEvent = throttle$2(
32900
32900
  (event, isCheckout) => addEvent(this, event, isCheckout),
32901
32901
  // Max 300 events...
32902
32902
  300,
@@ -35429,7 +35429,7 @@ const prod_config = {
35429
35429
  const config$1 = (configEnv) => {
35430
35430
  let env = configEnv;
35431
35431
  try {
35432
- env !== null && env !== void 0 ? env : (env = "prod");
35432
+ env !== null && env !== void 0 ? env : (env = "staging");
35433
35433
  }
35434
35434
  catch (_a) { }
35435
35435
  switch (env) {
@@ -35448,8 +35448,8 @@ const configGenerator = () => {
35448
35448
  let environment;
35449
35449
  let release;
35450
35450
  try {
35451
- environment !== null && environment !== void 0 ? environment : (environment = "prod");
35452
- release !== null && release !== void 0 ? release : (release = "1.1.53");
35451
+ environment !== null && environment !== void 0 ? environment : (environment = "staging");
35452
+ release !== null && release !== void 0 ? release : (release = "1.1.54");
35453
35453
  }
35454
35454
  catch (_a) {
35455
35455
  console.error('sentry configGenerator error');
@@ -36102,7 +36102,7 @@ var lib = {};
36102
36102
 
36103
36103
  var players = {};
36104
36104
 
36105
- var utils$3 = {};
36105
+ var utils$4 = {};
36106
36106
 
36107
36107
  var loadScript = function load (src, opts, cb) {
36108
36108
  var head = document.head || document.getElementsByTagName('head')[0];
@@ -36301,20 +36301,20 @@ var deepmerge_1 = deepmerge;
36301
36301
 
36302
36302
  var cjs = deepmerge_1;
36303
36303
 
36304
- Object.defineProperty(utils$3, "__esModule", {
36304
+ Object.defineProperty(utils$4, "__esModule", {
36305
36305
  value: true
36306
36306
  });
36307
- utils$3.parseStartTime = parseStartTime;
36308
- utils$3.parseEndTime = parseEndTime;
36309
- utils$3.randomString = randomString;
36310
- utils$3.queryString = queryString;
36311
- utils$3.getSDK = getSDK;
36312
- utils$3.getConfig = getConfig;
36313
- utils$3.omit = omit;
36314
- utils$3.callPlayer = callPlayer;
36315
- utils$3.isMediaStream = isMediaStream;
36316
- utils$3.isBlobUrl = isBlobUrl;
36317
- utils$3.supportsWebKitPresentationMode = supportsWebKitPresentationMode;
36307
+ utils$4.parseStartTime = parseStartTime;
36308
+ utils$4.parseEndTime = parseEndTime;
36309
+ utils$4.randomString = randomString;
36310
+ utils$4.queryString = queryString;
36311
+ utils$4.getSDK = getSDK;
36312
+ utils$4.getConfig = getConfig;
36313
+ utils$4.omit = omit;
36314
+ utils$4.callPlayer = callPlayer;
36315
+ utils$4.isMediaStream = isMediaStream;
36316
+ utils$4.isBlobUrl = isBlobUrl;
36317
+ utils$4.supportsWebKitPresentationMode = supportsWebKitPresentationMode;
36318
36318
 
36319
36319
  var _loadScript = _interopRequireDefault$2(loadScript);
36320
36320
 
@@ -36554,7 +36554,7 @@ Object.defineProperty(patterns, "__esModule", {
36554
36554
  });
36555
36555
  patterns.canPlay = patterns.FLV_EXTENSIONS = patterns.DASH_EXTENSIONS = patterns.HLS_EXTENSIONS = patterns.VIDEO_EXTENSIONS = patterns.AUDIO_EXTENSIONS = patterns.MATCH_URL_KALTURA = patterns.MATCH_URL_VIDYARD = patterns.MATCH_URL_MIXCLOUD = patterns.MATCH_URL_DAILYMOTION = patterns.MATCH_URL_TWITCH_CHANNEL = patterns.MATCH_URL_TWITCH_VIDEO = patterns.MATCH_URL_WISTIA = patterns.MATCH_URL_STREAMABLE = patterns.MATCH_URL_FACEBOOK_WATCH = patterns.MATCH_URL_FACEBOOK = patterns.MATCH_URL_VIMEO = patterns.MATCH_URL_SOUNDCLOUD = patterns.MATCH_URL_YOUTUBE = void 0;
36556
36556
 
36557
- var _utils$1 = utils$3;
36557
+ var _utils$1 = utils$4;
36558
36558
 
36559
36559
  function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray$1(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
36560
36560
 
@@ -36694,7 +36694,7 @@ function requireYouTube () {
36694
36694
 
36695
36695
  var _react = _interopRequireWildcard(React__default);
36696
36696
 
36697
- var _utils = utils$3;
36697
+ var _utils = utils$4;
36698
36698
 
36699
36699
  var _patterns = patterns;
36700
36700
 
@@ -37050,7 +37050,7 @@ function requireSoundCloud () {
37050
37050
 
37051
37051
  var _react = _interopRequireWildcard(React__default);
37052
37052
 
37053
- var _utils = utils$3;
37053
+ var _utils = utils$4;
37054
37054
 
37055
37055
  var _patterns = patterns;
37056
37056
 
@@ -37278,7 +37278,7 @@ function requireVimeo () {
37278
37278
 
37279
37279
  var _react = _interopRequireWildcard(React__default);
37280
37280
 
37281
- var _utils = utils$3;
37281
+ var _utils = utils$4;
37282
37282
 
37283
37283
  var _patterns = patterns;
37284
37284
 
@@ -37549,7 +37549,7 @@ function requireFacebook () {
37549
37549
 
37550
37550
  var _react = _interopRequireWildcard(React__default);
37551
37551
 
37552
- var _utils = utils$3;
37552
+ var _utils = utils$4;
37553
37553
 
37554
37554
  var _patterns = patterns;
37555
37555
 
@@ -37767,7 +37767,7 @@ function requireStreamable () {
37767
37767
 
37768
37768
  var _react = _interopRequireWildcard(React__default);
37769
37769
 
37770
- var _utils = utils$3;
37770
+ var _utils = utils$4;
37771
37771
 
37772
37772
  var _patterns = patterns;
37773
37773
 
@@ -37980,7 +37980,7 @@ function requireWistia () {
37980
37980
 
37981
37981
  var _react = _interopRequireWildcard(React__default);
37982
37982
 
37983
- var _utils = utils$3;
37983
+ var _utils = utils$4;
37984
37984
 
37985
37985
  var _patterns = patterns;
37986
37986
 
@@ -38247,7 +38247,7 @@ function requireTwitch () {
38247
38247
 
38248
38248
  var _react = _interopRequireWildcard(React__default);
38249
38249
 
38250
- var _utils = utils$3;
38250
+ var _utils = utils$4;
38251
38251
 
38252
38252
  var _patterns = patterns;
38253
38253
 
@@ -38470,7 +38470,7 @@ function requireDailyMotion () {
38470
38470
 
38471
38471
  var _react = _interopRequireWildcard(React__default);
38472
38472
 
38473
- var _utils = utils$3;
38473
+ var _utils = utils$4;
38474
38474
 
38475
38475
  var _patterns = patterns;
38476
38476
 
@@ -38708,7 +38708,7 @@ function requireMixcloud () {
38708
38708
 
38709
38709
  var _react = _interopRequireWildcard(React__default);
38710
38710
 
38711
- var _utils = utils$3;
38711
+ var _utils = utils$4;
38712
38712
 
38713
38713
  var _patterns = patterns;
38714
38714
 
@@ -38910,7 +38910,7 @@ function requireVidyard () {
38910
38910
 
38911
38911
  var _react = _interopRequireWildcard(React__default);
38912
38912
 
38913
- var _utils = utils$3;
38913
+ var _utils = utils$4;
38914
38914
 
38915
38915
  var _patterns = patterns;
38916
38916
 
@@ -39126,7 +39126,7 @@ function requireKaltura () {
39126
39126
 
39127
39127
  var _react = _interopRequireWildcard(React__default);
39128
39128
 
39129
- var _utils = utils$3;
39129
+ var _utils = utils$4;
39130
39130
 
39131
39131
  var _patterns = patterns;
39132
39132
 
@@ -39340,7 +39340,7 @@ function requireFilePlayer () {
39340
39340
 
39341
39341
  var _react = _interopRequireWildcard(React__default);
39342
39342
 
39343
- var _utils = utils$3;
39343
+ var _utils = utils$4;
39344
39344
 
39345
39345
  var _patterns = patterns;
39346
39346
 
@@ -39913,7 +39913,7 @@ function requireFilePlayer () {
39913
39913
 
39914
39914
  var _react = React__default;
39915
39915
 
39916
- var _utils = utils$3;
39916
+ var _utils = utils$4;
39917
39917
 
39918
39918
  var _patterns = patterns;
39919
39919
 
@@ -40480,7 +40480,7 @@ var Player = {};
40480
40480
 
40481
40481
  var _props = props;
40482
40482
 
40483
- var _utils = utils$3;
40483
+ var _utils = utils$4;
40484
40484
 
40485
40485
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
40486
40486
 
@@ -41123,7 +41123,7 @@ var _reactFastCompare = _interopRequireDefault(reactFastCompare);
41123
41123
 
41124
41124
  var _props = props;
41125
41125
 
41126
- var _utils = utils$3;
41126
+ var _utils = utils$4;
41127
41127
 
41128
41128
  var _Player3 = _interopRequireDefault(Player);
41129
41129
 
@@ -41771,6 +41771,7 @@ function bind$1(fn, thisArg) {
41771
41771
 
41772
41772
  const {toString} = Object.prototype;
41773
41773
  const {getPrototypeOf} = Object;
41774
+ const {iterator, toStringTag} = Symbol;
41774
41775
 
41775
41776
  const kindOf = (cache => thing => {
41776
41777
  const str = toString.call(thing);
@@ -41897,7 +41898,7 @@ const isPlainObject = (val) => {
41897
41898
  }
41898
41899
 
41899
41900
  const prototype = getPrototypeOf(val);
41900
- return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);
41901
+ return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(toStringTag in val) && !(iterator in val);
41901
41902
  };
41902
41903
 
41903
41904
  /**
@@ -41974,6 +41975,8 @@ const isFormData = (thing) => {
41974
41975
  */
41975
41976
  const isURLSearchParams = kindOfTest('URLSearchParams');
41976
41977
 
41978
+ const [isReadableStream, isRequest, isResponse, isHeaders] = ['ReadableStream', 'Request', 'Response', 'Headers'].map(kindOfTest);
41979
+
41977
41980
  /**
41978
41981
  * Trim excess whitespace off the beginning and end of a string
41979
41982
  *
@@ -42246,13 +42249,13 @@ const isTypedArray = (TypedArray => {
42246
42249
  * @returns {void}
42247
42250
  */
42248
42251
  const forEachEntry = (obj, fn) => {
42249
- const generator = obj && obj[Symbol.iterator];
42252
+ const generator = obj && obj[iterator];
42250
42253
 
42251
- const iterator = generator.call(obj);
42254
+ const _iterator = generator.call(obj);
42252
42255
 
42253
42256
  let result;
42254
42257
 
42255
- while ((result = iterator.next()) && !result.done) {
42258
+ while ((result = _iterator.next()) && !result.done) {
42256
42259
  const pair = result.value;
42257
42260
  fn.call(obj, pair[0], pair[1]);
42258
42261
  }
@@ -42362,28 +42365,7 @@ const toObjectSet = (arrayOrString, delimiter) => {
42362
42365
  const noop$1 = () => {};
42363
42366
 
42364
42367
  const toFiniteNumber = (value, defaultValue) => {
42365
- value = +value;
42366
- return Number.isFinite(value) ? value : defaultValue;
42367
- };
42368
-
42369
- const ALPHA = 'abcdefghijklmnopqrstuvwxyz';
42370
-
42371
- const DIGIT = '0123456789';
42372
-
42373
- const ALPHABET = {
42374
- DIGIT,
42375
- ALPHA,
42376
- ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
42377
- };
42378
-
42379
- const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
42380
- let str = '';
42381
- const {length} = alphabet;
42382
- while (size--) {
42383
- str += alphabet[Math.random() * length|0];
42384
- }
42385
-
42386
- return str;
42368
+ return value != null && Number.isFinite(value = +value) ? value : defaultValue;
42387
42369
  };
42388
42370
 
42389
42371
  /**
@@ -42394,7 +42376,7 @@ const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
42394
42376
  * @returns {boolean}
42395
42377
  */
42396
42378
  function isSpecCompliantForm(thing) {
42397
- return !!(thing && isFunction$1(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);
42379
+ return !!(thing && isFunction$1(thing.append) && thing[toStringTag] === 'FormData' && thing[iterator]);
42398
42380
  }
42399
42381
 
42400
42382
  const toJSONObject = (obj) => {
@@ -42433,7 +42415,41 @@ const isAsyncFn = kindOfTest('AsyncFunction');
42433
42415
  const isThenable = (thing) =>
42434
42416
  thing && (isObject(thing) || isFunction$1(thing)) && isFunction$1(thing.then) && isFunction$1(thing.catch);
42435
42417
 
42436
- var utils$2 = {
42418
+ // original code
42419
+ // https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34
42420
+
42421
+ const _setImmediate = ((setImmediateSupported, postMessageSupported) => {
42422
+ if (setImmediateSupported) {
42423
+ return setImmediate;
42424
+ }
42425
+
42426
+ return postMessageSupported ? ((token, callbacks) => {
42427
+ _global.addEventListener("message", ({source, data}) => {
42428
+ if (source === _global && data === token) {
42429
+ callbacks.length && callbacks.shift()();
42430
+ }
42431
+ }, false);
42432
+
42433
+ return (cb) => {
42434
+ callbacks.push(cb);
42435
+ _global.postMessage(token, "*");
42436
+ }
42437
+ })(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);
42438
+ })(
42439
+ typeof setImmediate === 'function',
42440
+ isFunction$1(_global.postMessage)
42441
+ );
42442
+
42443
+ const asap = typeof queueMicrotask !== 'undefined' ?
42444
+ queueMicrotask.bind(_global) : ( typeof process !== 'undefined' && process.nextTick || _setImmediate);
42445
+
42446
+ // *********************
42447
+
42448
+
42449
+ const isIterable = (thing) => thing != null && isFunction$1(thing[iterator]);
42450
+
42451
+
42452
+ var utils$3 = {
42437
42453
  isArray,
42438
42454
  isArrayBuffer,
42439
42455
  isBuffer,
@@ -42444,6 +42460,10 @@ var utils$2 = {
42444
42460
  isBoolean,
42445
42461
  isObject,
42446
42462
  isPlainObject,
42463
+ isReadableStream,
42464
+ isRequest,
42465
+ isResponse,
42466
+ isHeaders,
42447
42467
  isUndefined,
42448
42468
  isDate,
42449
42469
  isFile,
@@ -42479,12 +42499,13 @@ var utils$2 = {
42479
42499
  findKey,
42480
42500
  global: _global,
42481
42501
  isContextDefined,
42482
- ALPHABET,
42483
- generateString,
42484
42502
  isSpecCompliantForm,
42485
42503
  toJSONObject,
42486
42504
  isAsyncFn,
42487
- isThenable
42505
+ isThenable,
42506
+ setImmediate: _setImmediate,
42507
+ asap,
42508
+ isIterable
42488
42509
  };
42489
42510
 
42490
42511
  /**
@@ -42512,10 +42533,13 @@ function AxiosError(message, code, config, request, response) {
42512
42533
  code && (this.code = code);
42513
42534
  config && (this.config = config);
42514
42535
  request && (this.request = request);
42515
- response && (this.response = response);
42536
+ if (response) {
42537
+ this.response = response;
42538
+ this.status = response.status ? response.status : null;
42539
+ }
42516
42540
  }
42517
42541
 
42518
- utils$2.inherits(AxiosError, Error, {
42542
+ utils$3.inherits(AxiosError, Error, {
42519
42543
  toJSON: function toJSON() {
42520
42544
  return {
42521
42545
  // Standard
@@ -42530,9 +42554,9 @@ utils$2.inherits(AxiosError, Error, {
42530
42554
  columnNumber: this.columnNumber,
42531
42555
  stack: this.stack,
42532
42556
  // Axios
42533
- config: utils$2.toJSONObject(this.config),
42557
+ config: utils$3.toJSONObject(this.config),
42534
42558
  code: this.code,
42535
- status: this.response && this.response.status ? this.response.status : null
42559
+ status: this.status
42536
42560
  };
42537
42561
  }
42538
42562
  });
@@ -42565,7 +42589,7 @@ Object.defineProperty(prototype$1, 'isAxiosError', {value: true});
42565
42589
  AxiosError.from = (error, code, config, request, response, customProps) => {
42566
42590
  const axiosError = Object.create(prototype$1);
42567
42591
 
42568
- utils$2.toFlatObject(error, axiosError, function filter(obj) {
42592
+ utils$3.toFlatObject(error, axiosError, function filter(obj) {
42569
42593
  return obj !== Error.prototype;
42570
42594
  }, prop => {
42571
42595
  return prop !== 'isAxiosError';
@@ -42593,7 +42617,7 @@ var httpAdapter = null;
42593
42617
  * @returns {boolean}
42594
42618
  */
42595
42619
  function isVisitable(thing) {
42596
- return utils$2.isPlainObject(thing) || utils$2.isArray(thing);
42620
+ return utils$3.isPlainObject(thing) || utils$3.isArray(thing);
42597
42621
  }
42598
42622
 
42599
42623
  /**
@@ -42604,7 +42628,7 @@ function isVisitable(thing) {
42604
42628
  * @returns {string} the key without the brackets.
42605
42629
  */
42606
42630
  function removeBrackets(key) {
42607
- return utils$2.endsWith(key, '[]') ? key.slice(0, -2) : key;
42631
+ return utils$3.endsWith(key, '[]') ? key.slice(0, -2) : key;
42608
42632
  }
42609
42633
 
42610
42634
  /**
@@ -42633,10 +42657,10 @@ function renderKey(path, key, dots) {
42633
42657
  * @returns {boolean}
42634
42658
  */
42635
42659
  function isFlatArray(arr) {
42636
- return utils$2.isArray(arr) && !arr.some(isVisitable);
42660
+ return utils$3.isArray(arr) && !arr.some(isVisitable);
42637
42661
  }
42638
42662
 
42639
- const predicates = utils$2.toFlatObject(utils$2, {}, null, function filter(prop) {
42663
+ const predicates = utils$3.toFlatObject(utils$3, {}, null, function filter(prop) {
42640
42664
  return /^is[A-Z]/.test(prop);
42641
42665
  });
42642
42666
 
@@ -42664,7 +42688,7 @@ const predicates = utils$2.toFlatObject(utils$2, {}, null, function filter(prop)
42664
42688
  * @returns
42665
42689
  */
42666
42690
  function toFormData(obj, formData, options) {
42667
- if (!utils$2.isObject(obj)) {
42691
+ if (!utils$3.isObject(obj)) {
42668
42692
  throw new TypeError('target must be an object');
42669
42693
  }
42670
42694
 
@@ -42672,13 +42696,13 @@ function toFormData(obj, formData, options) {
42672
42696
  formData = formData || new (FormData)();
42673
42697
 
42674
42698
  // eslint-disable-next-line no-param-reassign
42675
- options = utils$2.toFlatObject(options, {
42699
+ options = utils$3.toFlatObject(options, {
42676
42700
  metaTokens: true,
42677
42701
  dots: false,
42678
42702
  indexes: false
42679
42703
  }, false, function defined(option, source) {
42680
42704
  // eslint-disable-next-line no-eq-null,eqeqeq
42681
- return !utils$2.isUndefined(source[option]);
42705
+ return !utils$3.isUndefined(source[option]);
42682
42706
  });
42683
42707
 
42684
42708
  const metaTokens = options.metaTokens;
@@ -42687,24 +42711,28 @@ function toFormData(obj, formData, options) {
42687
42711
  const dots = options.dots;
42688
42712
  const indexes = options.indexes;
42689
42713
  const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;
42690
- const useBlob = _Blob && utils$2.isSpecCompliantForm(formData);
42714
+ const useBlob = _Blob && utils$3.isSpecCompliantForm(formData);
42691
42715
 
42692
- if (!utils$2.isFunction(visitor)) {
42716
+ if (!utils$3.isFunction(visitor)) {
42693
42717
  throw new TypeError('visitor must be a function');
42694
42718
  }
42695
42719
 
42696
42720
  function convertValue(value) {
42697
42721
  if (value === null) return '';
42698
42722
 
42699
- if (utils$2.isDate(value)) {
42723
+ if (utils$3.isDate(value)) {
42700
42724
  return value.toISOString();
42701
42725
  }
42702
42726
 
42703
- if (!useBlob && utils$2.isBlob(value)) {
42727
+ if (utils$3.isBoolean(value)) {
42728
+ return value.toString();
42729
+ }
42730
+
42731
+ if (!useBlob && utils$3.isBlob(value)) {
42704
42732
  throw new AxiosError('Blob is not supported. Use a Buffer instead.');
42705
42733
  }
42706
42734
 
42707
- if (utils$2.isArrayBuffer(value) || utils$2.isTypedArray(value)) {
42735
+ if (utils$3.isArrayBuffer(value) || utils$3.isTypedArray(value)) {
42708
42736
  return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);
42709
42737
  }
42710
42738
 
@@ -42725,20 +42753,20 @@ function toFormData(obj, formData, options) {
42725
42753
  let arr = value;
42726
42754
 
42727
42755
  if (value && !path && typeof value === 'object') {
42728
- if (utils$2.endsWith(key, '{}')) {
42756
+ if (utils$3.endsWith(key, '{}')) {
42729
42757
  // eslint-disable-next-line no-param-reassign
42730
42758
  key = metaTokens ? key : key.slice(0, -2);
42731
42759
  // eslint-disable-next-line no-param-reassign
42732
42760
  value = JSON.stringify(value);
42733
42761
  } else if (
42734
- (utils$2.isArray(value) && isFlatArray(value)) ||
42735
- ((utils$2.isFileList(value) || utils$2.endsWith(key, '[]')) && (arr = utils$2.toArray(value))
42762
+ (utils$3.isArray(value) && isFlatArray(value)) ||
42763
+ ((utils$3.isFileList(value) || utils$3.endsWith(key, '[]')) && (arr = utils$3.toArray(value))
42736
42764
  )) {
42737
42765
  // eslint-disable-next-line no-param-reassign
42738
42766
  key = removeBrackets(key);
42739
42767
 
42740
42768
  arr.forEach(function each(el, index) {
42741
- !(utils$2.isUndefined(el) || el === null) && formData.append(
42769
+ !(utils$3.isUndefined(el) || el === null) && formData.append(
42742
42770
  // eslint-disable-next-line no-nested-ternary
42743
42771
  indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),
42744
42772
  convertValue(el)
@@ -42766,7 +42794,7 @@ function toFormData(obj, formData, options) {
42766
42794
  });
42767
42795
 
42768
42796
  function build(value, path) {
42769
- if (utils$2.isUndefined(value)) return;
42797
+ if (utils$3.isUndefined(value)) return;
42770
42798
 
42771
42799
  if (stack.indexOf(value) !== -1) {
42772
42800
  throw Error('Circular reference detected in ' + path.join('.'));
@@ -42774,9 +42802,9 @@ function toFormData(obj, formData, options) {
42774
42802
 
42775
42803
  stack.push(value);
42776
42804
 
42777
- utils$2.forEach(value, function each(el, key) {
42778
- const result = !(utils$2.isUndefined(el) || el === null) && visitor.call(
42779
- formData, el, utils$2.isString(key) ? key.trim() : key, path, exposedHelpers
42805
+ utils$3.forEach(value, function each(el, key) {
42806
+ const result = !(utils$3.isUndefined(el) || el === null) && visitor.call(
42807
+ formData, el, utils$3.isString(key) ? key.trim() : key, path, exposedHelpers
42780
42808
  );
42781
42809
 
42782
42810
  if (result === true) {
@@ -42787,7 +42815,7 @@ function toFormData(obj, formData, options) {
42787
42815
  stack.pop();
42788
42816
  }
42789
42817
 
42790
- if (!utils$2.isObject(obj)) {
42818
+ if (!utils$3.isObject(obj)) {
42791
42819
  throw new TypeError('data must be an object');
42792
42820
  }
42793
42821
 
@@ -42872,7 +42900,7 @@ function encode(val) {
42872
42900
  *
42873
42901
  * @param {string} url The base of the url (e.g., http://www.google.com)
42874
42902
  * @param {object} [params] The params to be appended
42875
- * @param {?object} options
42903
+ * @param {?(object|Function)} options
42876
42904
  *
42877
42905
  * @returns {string} The formatted url
42878
42906
  */
@@ -42884,6 +42912,12 @@ function buildURL(url, params, options) {
42884
42912
 
42885
42913
  const _encode = options && options.encode || encode;
42886
42914
 
42915
+ if (utils$3.isFunction(options)) {
42916
+ options = {
42917
+ serialize: options
42918
+ };
42919
+ }
42920
+
42887
42921
  const serializeFn = options && options.serialize;
42888
42922
 
42889
42923
  let serializedParams;
@@ -42891,7 +42925,7 @@ function buildURL(url, params, options) {
42891
42925
  if (serializeFn) {
42892
42926
  serializedParams = serializeFn(params, options);
42893
42927
  } else {
42894
- serializedParams = utils$2.isURLSearchParams(params) ?
42928
+ serializedParams = utils$3.isURLSearchParams(params) ?
42895
42929
  params.toString() :
42896
42930
  new AxiosURLSearchParams(params, options).toString(_encode);
42897
42931
  }
@@ -42966,7 +43000,7 @@ class InterceptorManager {
42966
43000
  * @returns {void}
42967
43001
  */
42968
43002
  forEach(fn) {
42969
- utils$2.forEach(this.handlers, function forEachHandler(h) {
43003
+ utils$3.forEach(this.handlers, function forEachHandler(h) {
42970
43004
  if (h !== null) {
42971
43005
  fn(h);
42972
43006
  }
@@ -42986,6 +43020,20 @@ var FormData$1 = typeof FormData !== 'undefined' ? FormData : null;
42986
43020
 
42987
43021
  var Blob$1 = typeof Blob !== 'undefined' ? Blob : null;
42988
43022
 
43023
+ var platform$1 = {
43024
+ isBrowser: true,
43025
+ classes: {
43026
+ URLSearchParams: URLSearchParams$1,
43027
+ FormData: FormData$1,
43028
+ Blob: Blob$1
43029
+ },
43030
+ protocols: ['http', 'https', 'file', 'blob', 'url', 'data']
43031
+ };
43032
+
43033
+ const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';
43034
+
43035
+ const _navigator = typeof navigator === 'object' && navigator || undefined;
43036
+
42989
43037
  /**
42990
43038
  * Determine if we're running in a standard browser environment
42991
43039
  *
@@ -43003,18 +43051,8 @@ var Blob$1 = typeof Blob !== 'undefined' ? Blob : null;
43003
43051
  *
43004
43052
  * @returns {boolean}
43005
43053
  */
43006
- const isStandardBrowserEnv = (() => {
43007
- let product;
43008
- if (typeof navigator !== 'undefined' && (
43009
- (product = navigator.product) === 'ReactNative' ||
43010
- product === 'NativeScript' ||
43011
- product === 'NS')
43012
- ) {
43013
- return false;
43014
- }
43015
-
43016
- return typeof window !== 'undefined' && typeof document !== 'undefined';
43017
- })();
43054
+ const hasStandardBrowserEnv = hasBrowserEnv &&
43055
+ (!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0);
43018
43056
 
43019
43057
  /**
43020
43058
  * Determine if we're running in a standard browser webWorker environment
@@ -43025,7 +43063,7 @@ const isStandardBrowserEnv = (() => {
43025
43063
  * `typeof window !== 'undefined' && typeof document !== 'undefined'`.
43026
43064
  * This leads to a problem when axios post `FormData` in webWorker
43027
43065
  */
43028
- const isStandardBrowserWebWorkerEnv = (() => {
43066
+ const hasStandardBrowserWebWorkerEnv = (() => {
43029
43067
  return (
43030
43068
  typeof WorkerGlobalScope !== 'undefined' &&
43031
43069
  // eslint-disable-next-line no-undef
@@ -43034,23 +43072,26 @@ const isStandardBrowserEnv = (() => {
43034
43072
  );
43035
43073
  })();
43036
43074
 
43075
+ const origin = hasBrowserEnv && window.location.href || 'http://localhost';
43076
+
43077
+ var utils$2 = /*#__PURE__*/Object.freeze({
43078
+ __proto__: null,
43079
+ hasBrowserEnv: hasBrowserEnv,
43080
+ hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv,
43081
+ hasStandardBrowserEnv: hasStandardBrowserEnv,
43082
+ navigator: _navigator,
43083
+ origin: origin
43084
+ });
43037
43085
 
43038
43086
  var platform = {
43039
- isBrowser: true,
43040
- classes: {
43041
- URLSearchParams: URLSearchParams$1,
43042
- FormData: FormData$1,
43043
- Blob: Blob$1
43044
- },
43045
- isStandardBrowserEnv,
43046
- isStandardBrowserWebWorkerEnv,
43047
- protocols: ['http', 'https', 'file', 'blob', 'url', 'data']
43087
+ ...utils$2,
43088
+ ...platform$1
43048
43089
  };
43049
43090
 
43050
43091
  function toURLEncodedForm(data, options) {
43051
43092
  return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({
43052
43093
  visitor: function(value, key, path, helpers) {
43053
- if (platform.isNode && utils$2.isBuffer(value)) {
43094
+ if (platform.isNode && utils$3.isBuffer(value)) {
43054
43095
  this.append(key, value.toString('base64'));
43055
43096
  return false;
43056
43097
  }
@@ -43072,7 +43113,7 @@ function parsePropPath(name) {
43072
43113
  // foo.x.y.z
43073
43114
  // foo-x-y-z
43074
43115
  // foo x y z
43075
- return utils$2.matchAll(/\w+|\[(\w*)]/g, name).map(match => {
43116
+ return utils$3.matchAll(/\w+|\[(\w*)]/g, name).map(match => {
43076
43117
  return match[0] === '[]' ? '' : match[1] || match[0];
43077
43118
  });
43078
43119
  }
@@ -43107,12 +43148,15 @@ function arrayToObject(arr) {
43107
43148
  function formDataToJSON(formData) {
43108
43149
  function buildPath(path, value, target, index) {
43109
43150
  let name = path[index++];
43151
+
43152
+ if (name === '__proto__') return true;
43153
+
43110
43154
  const isNumericKey = Number.isFinite(+name);
43111
43155
  const isLast = index >= path.length;
43112
- name = !name && utils$2.isArray(target) ? target.length : name;
43156
+ name = !name && utils$3.isArray(target) ? target.length : name;
43113
43157
 
43114
43158
  if (isLast) {
43115
- if (utils$2.hasOwnProp(target, name)) {
43159
+ if (utils$3.hasOwnProp(target, name)) {
43116
43160
  target[name] = [target[name], value];
43117
43161
  } else {
43118
43162
  target[name] = value;
@@ -43121,23 +43165,23 @@ function formDataToJSON(formData) {
43121
43165
  return !isNumericKey;
43122
43166
  }
43123
43167
 
43124
- if (!target[name] || !utils$2.isObject(target[name])) {
43168
+ if (!target[name] || !utils$3.isObject(target[name])) {
43125
43169
  target[name] = [];
43126
43170
  }
43127
43171
 
43128
43172
  const result = buildPath(path, value, target[name], index);
43129
43173
 
43130
- if (result && utils$2.isArray(target[name])) {
43174
+ if (result && utils$3.isArray(target[name])) {
43131
43175
  target[name] = arrayToObject(target[name]);
43132
43176
  }
43133
43177
 
43134
43178
  return !isNumericKey;
43135
43179
  }
43136
43180
 
43137
- if (utils$2.isFormData(formData) && utils$2.isFunction(formData.entries)) {
43181
+ if (utils$3.isFormData(formData) && utils$3.isFunction(formData.entries)) {
43138
43182
  const obj = {};
43139
43183
 
43140
- utils$2.forEachEntry(formData, (name, value) => {
43184
+ utils$3.forEachEntry(formData, (name, value) => {
43141
43185
  buildPath(parsePropPath(name), value, obj, 0);
43142
43186
  });
43143
43187
 
@@ -43158,10 +43202,10 @@ function formDataToJSON(formData) {
43158
43202
  * @returns {string} A stringified version of the rawValue.
43159
43203
  */
43160
43204
  function stringifySafely(rawValue, parser, encoder) {
43161
- if (utils$2.isString(rawValue)) {
43205
+ if (utils$3.isString(rawValue)) {
43162
43206
  try {
43163
43207
  (parser || JSON.parse)(rawValue);
43164
- return utils$2.trim(rawValue);
43208
+ return utils$3.trim(rawValue);
43165
43209
  } catch (e) {
43166
43210
  if (e.name !== 'SyntaxError') {
43167
43211
  throw e;
@@ -43176,38 +43220,36 @@ const defaults = {
43176
43220
 
43177
43221
  transitional: transitionalDefaults,
43178
43222
 
43179
- adapter: ['xhr', 'http'],
43223
+ adapter: ['xhr', 'http', 'fetch'],
43180
43224
 
43181
43225
  transformRequest: [function transformRequest(data, headers) {
43182
43226
  const contentType = headers.getContentType() || '';
43183
43227
  const hasJSONContentType = contentType.indexOf('application/json') > -1;
43184
- const isObjectPayload = utils$2.isObject(data);
43228
+ const isObjectPayload = utils$3.isObject(data);
43185
43229
 
43186
- if (isObjectPayload && utils$2.isHTMLForm(data)) {
43230
+ if (isObjectPayload && utils$3.isHTMLForm(data)) {
43187
43231
  data = new FormData(data);
43188
43232
  }
43189
43233
 
43190
- const isFormData = utils$2.isFormData(data);
43234
+ const isFormData = utils$3.isFormData(data);
43191
43235
 
43192
43236
  if (isFormData) {
43193
- if (!hasJSONContentType) {
43194
- return data;
43195
- }
43196
43237
  return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
43197
43238
  }
43198
43239
 
43199
- if (utils$2.isArrayBuffer(data) ||
43200
- utils$2.isBuffer(data) ||
43201
- utils$2.isStream(data) ||
43202
- utils$2.isFile(data) ||
43203
- utils$2.isBlob(data)
43240
+ if (utils$3.isArrayBuffer(data) ||
43241
+ utils$3.isBuffer(data) ||
43242
+ utils$3.isStream(data) ||
43243
+ utils$3.isFile(data) ||
43244
+ utils$3.isBlob(data) ||
43245
+ utils$3.isReadableStream(data)
43204
43246
  ) {
43205
43247
  return data;
43206
43248
  }
43207
- if (utils$2.isArrayBufferView(data)) {
43249
+ if (utils$3.isArrayBufferView(data)) {
43208
43250
  return data.buffer;
43209
43251
  }
43210
- if (utils$2.isURLSearchParams(data)) {
43252
+ if (utils$3.isURLSearchParams(data)) {
43211
43253
  headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);
43212
43254
  return data.toString();
43213
43255
  }
@@ -43219,7 +43261,7 @@ const defaults = {
43219
43261
  return toURLEncodedForm(data, this.formSerializer).toString();
43220
43262
  }
43221
43263
 
43222
- if ((isFileList = utils$2.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {
43264
+ if ((isFileList = utils$3.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {
43223
43265
  const _FormData = this.env && this.env.FormData;
43224
43266
 
43225
43267
  return toFormData(
@@ -43243,7 +43285,11 @@ const defaults = {
43243
43285
  const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
43244
43286
  const JSONRequested = this.responseType === 'json';
43245
43287
 
43246
- if (data && utils$2.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {
43288
+ if (utils$3.isResponse(data) || utils$3.isReadableStream(data)) {
43289
+ return data;
43290
+ }
43291
+
43292
+ if (data && utils$3.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {
43247
43293
  const silentJSONParsing = transitional && transitional.silentJSONParsing;
43248
43294
  const strictJSONParsing = !silentJSONParsing && JSONRequested;
43249
43295
 
@@ -43291,13 +43337,13 @@ const defaults = {
43291
43337
  }
43292
43338
  };
43293
43339
 
43294
- utils$2.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {
43340
+ utils$3.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {
43295
43341
  defaults.headers[method] = {};
43296
43342
  });
43297
43343
 
43298
43344
  // RawAxiosHeaders whose duplicates are ignored by node
43299
43345
  // c.f. https://nodejs.org/api/http.html#http_message_headers
43300
- const ignoreDuplicateOf = utils$2.toObjectSet([
43346
+ const ignoreDuplicateOf = utils$3.toObjectSet([
43301
43347
  'age', 'authorization', 'content-length', 'content-type', 'etag',
43302
43348
  'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',
43303
43349
  'last-modified', 'location', 'max-forwards', 'proxy-authorization',
@@ -43358,7 +43404,7 @@ function normalizeValue(value) {
43358
43404
  return value;
43359
43405
  }
43360
43406
 
43361
- return utils$2.isArray(value) ? value.map(normalizeValue) : String(value);
43407
+ return utils$3.isArray(value) ? value.map(normalizeValue) : String(value);
43362
43408
  }
43363
43409
 
43364
43410
  function parseTokens(str) {
@@ -43376,7 +43422,7 @@ function parseTokens(str) {
43376
43422
  const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
43377
43423
 
43378
43424
  function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
43379
- if (utils$2.isFunction(filter)) {
43425
+ if (utils$3.isFunction(filter)) {
43380
43426
  return filter.call(this, value, header);
43381
43427
  }
43382
43428
 
@@ -43384,13 +43430,13 @@ function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
43384
43430
  value = header;
43385
43431
  }
43386
43432
 
43387
- if (!utils$2.isString(value)) return;
43433
+ if (!utils$3.isString(value)) return;
43388
43434
 
43389
- if (utils$2.isString(filter)) {
43435
+ if (utils$3.isString(filter)) {
43390
43436
  return value.indexOf(filter) !== -1;
43391
43437
  }
43392
43438
 
43393
- if (utils$2.isRegExp(filter)) {
43439
+ if (utils$3.isRegExp(filter)) {
43394
43440
  return filter.test(value);
43395
43441
  }
43396
43442
  }
@@ -43403,7 +43449,7 @@ function formatHeader(header) {
43403
43449
  }
43404
43450
 
43405
43451
  function buildAccessors(obj, header) {
43406
- const accessorName = utils$2.toCamelCase(' ' + header);
43452
+ const accessorName = utils$3.toCamelCase(' ' + header);
43407
43453
 
43408
43454
  ['get', 'set', 'has'].forEach(methodName => {
43409
43455
  Object.defineProperty(obj, methodName + accessorName, {
@@ -43430,7 +43476,7 @@ class AxiosHeaders {
43430
43476
  throw new Error('header name must be a non-empty string');
43431
43477
  }
43432
43478
 
43433
- const key = utils$2.findKey(self, lHeader);
43479
+ const key = utils$3.findKey(self, lHeader);
43434
43480
 
43435
43481
  if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {
43436
43482
  self[key || _header] = normalizeValue(_value);
@@ -43438,12 +43484,24 @@ class AxiosHeaders {
43438
43484
  }
43439
43485
 
43440
43486
  const setHeaders = (headers, _rewrite) =>
43441
- utils$2.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
43487
+ utils$3.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
43442
43488
 
43443
- if (utils$2.isPlainObject(header) || header instanceof this.constructor) {
43489
+ if (utils$3.isPlainObject(header) || header instanceof this.constructor) {
43444
43490
  setHeaders(header, valueOrRewrite);
43445
- } else if(utils$2.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
43491
+ } else if(utils$3.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
43446
43492
  setHeaders(parseHeaders(header), valueOrRewrite);
43493
+ } else if (utils$3.isObject(header) && utils$3.isIterable(header)) {
43494
+ let obj = {}, dest, key;
43495
+ for (const entry of header) {
43496
+ if (!utils$3.isArray(entry)) {
43497
+ throw TypeError('Object iterator must return a key-value pair');
43498
+ }
43499
+
43500
+ obj[key = entry[0]] = (dest = obj[key]) ?
43501
+ (utils$3.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]]) : entry[1];
43502
+ }
43503
+
43504
+ setHeaders(obj, valueOrRewrite);
43447
43505
  } else {
43448
43506
  header != null && setHeader(valueOrRewrite, header, rewrite);
43449
43507
  }
@@ -43455,7 +43513,7 @@ class AxiosHeaders {
43455
43513
  header = normalizeHeader(header);
43456
43514
 
43457
43515
  if (header) {
43458
- const key = utils$2.findKey(this, header);
43516
+ const key = utils$3.findKey(this, header);
43459
43517
 
43460
43518
  if (key) {
43461
43519
  const value = this[key];
@@ -43468,11 +43526,11 @@ class AxiosHeaders {
43468
43526
  return parseTokens(value);
43469
43527
  }
43470
43528
 
43471
- if (utils$2.isFunction(parser)) {
43529
+ if (utils$3.isFunction(parser)) {
43472
43530
  return parser.call(this, value, key);
43473
43531
  }
43474
43532
 
43475
- if (utils$2.isRegExp(parser)) {
43533
+ if (utils$3.isRegExp(parser)) {
43476
43534
  return parser.exec(value);
43477
43535
  }
43478
43536
 
@@ -43485,7 +43543,7 @@ class AxiosHeaders {
43485
43543
  header = normalizeHeader(header);
43486
43544
 
43487
43545
  if (header) {
43488
- const key = utils$2.findKey(this, header);
43546
+ const key = utils$3.findKey(this, header);
43489
43547
 
43490
43548
  return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
43491
43549
  }
@@ -43501,7 +43559,7 @@ class AxiosHeaders {
43501
43559
  _header = normalizeHeader(_header);
43502
43560
 
43503
43561
  if (_header) {
43504
- const key = utils$2.findKey(self, _header);
43562
+ const key = utils$3.findKey(self, _header);
43505
43563
 
43506
43564
  if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {
43507
43565
  delete self[key];
@@ -43511,7 +43569,7 @@ class AxiosHeaders {
43511
43569
  }
43512
43570
  }
43513
43571
 
43514
- if (utils$2.isArray(header)) {
43572
+ if (utils$3.isArray(header)) {
43515
43573
  header.forEach(deleteHeader);
43516
43574
  } else {
43517
43575
  deleteHeader(header);
@@ -43540,8 +43598,8 @@ class AxiosHeaders {
43540
43598
  const self = this;
43541
43599
  const headers = {};
43542
43600
 
43543
- utils$2.forEach(this, (value, header) => {
43544
- const key = utils$2.findKey(headers, header);
43601
+ utils$3.forEach(this, (value, header) => {
43602
+ const key = utils$3.findKey(headers, header);
43545
43603
 
43546
43604
  if (key) {
43547
43605
  self[key] = normalizeValue(value);
@@ -43570,8 +43628,8 @@ class AxiosHeaders {
43570
43628
  toJSON(asStrings) {
43571
43629
  const obj = Object.create(null);
43572
43630
 
43573
- utils$2.forEach(this, (value, header) => {
43574
- value != null && value !== false && (obj[header] = asStrings && utils$2.isArray(value) ? value.join(', ') : value);
43631
+ utils$3.forEach(this, (value, header) => {
43632
+ value != null && value !== false && (obj[header] = asStrings && utils$3.isArray(value) ? value.join(', ') : value);
43575
43633
  });
43576
43634
 
43577
43635
  return obj;
@@ -43585,6 +43643,10 @@ class AxiosHeaders {
43585
43643
  return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\n');
43586
43644
  }
43587
43645
 
43646
+ getSetCookie() {
43647
+ return this.get("set-cookie") || [];
43648
+ }
43649
+
43588
43650
  get [Symbol.toStringTag]() {
43589
43651
  return 'AxiosHeaders';
43590
43652
  }
@@ -43618,7 +43680,7 @@ class AxiosHeaders {
43618
43680
  }
43619
43681
  }
43620
43682
 
43621
- utils$2.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
43683
+ utils$3.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
43622
43684
 
43623
43685
  return this;
43624
43686
  }
@@ -43627,7 +43689,7 @@ class AxiosHeaders {
43627
43689
  AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);
43628
43690
 
43629
43691
  // reserved names hotfix
43630
- utils$2.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {
43692
+ utils$3.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {
43631
43693
  let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`
43632
43694
  return {
43633
43695
  get: () => value,
@@ -43637,7 +43699,7 @@ utils$2.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {
43637
43699
  }
43638
43700
  });
43639
43701
 
43640
- utils$2.freezeMethods(AxiosHeaders);
43702
+ utils$3.freezeMethods(AxiosHeaders);
43641
43703
 
43642
43704
  /**
43643
43705
  * Transform the data for a request or a response
@@ -43653,7 +43715,7 @@ function transformData(fns, response) {
43653
43715
  const headers = AxiosHeaders.from(context.headers);
43654
43716
  let data = context.data;
43655
43717
 
43656
- utils$2.forEach(fns, function transform(fn) {
43718
+ utils$3.forEach(fns, function transform(fn) {
43657
43719
  data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);
43658
43720
  });
43659
43721
 
@@ -43681,7 +43743,7 @@ function CanceledError(message, config, request) {
43681
43743
  this.name = 'CanceledError';
43682
43744
  }
43683
43745
 
43684
- utils$2.inherits(CanceledError, AxiosError, {
43746
+ utils$3.inherits(CanceledError, AxiosError, {
43685
43747
  __CANCEL__: true
43686
43748
  });
43687
43749
 
@@ -43709,162 +43771,6 @@ function settle(resolve, reject, response) {
43709
43771
  }
43710
43772
  }
43711
43773
 
43712
- var cookies = platform.isStandardBrowserEnv ?
43713
-
43714
- // Standard browser envs support document.cookie
43715
- (function standardBrowserEnv() {
43716
- return {
43717
- write: function write(name, value, expires, path, domain, secure) {
43718
- const cookie = [];
43719
- cookie.push(name + '=' + encodeURIComponent(value));
43720
-
43721
- if (utils$2.isNumber(expires)) {
43722
- cookie.push('expires=' + new Date(expires).toGMTString());
43723
- }
43724
-
43725
- if (utils$2.isString(path)) {
43726
- cookie.push('path=' + path);
43727
- }
43728
-
43729
- if (utils$2.isString(domain)) {
43730
- cookie.push('domain=' + domain);
43731
- }
43732
-
43733
- if (secure === true) {
43734
- cookie.push('secure');
43735
- }
43736
-
43737
- document.cookie = cookie.join('; ');
43738
- },
43739
-
43740
- read: function read(name) {
43741
- const match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
43742
- return (match ? decodeURIComponent(match[3]) : null);
43743
- },
43744
-
43745
- remove: function remove(name) {
43746
- this.write(name, '', Date.now() - 86400000);
43747
- }
43748
- };
43749
- })() :
43750
-
43751
- // Non standard browser env (web workers, react-native) lack needed support.
43752
- (function nonStandardBrowserEnv() {
43753
- return {
43754
- write: function write() {},
43755
- read: function read() { return null; },
43756
- remove: function remove() {}
43757
- };
43758
- })();
43759
-
43760
- /**
43761
- * Determines whether the specified URL is absolute
43762
- *
43763
- * @param {string} url The URL to test
43764
- *
43765
- * @returns {boolean} True if the specified URL is absolute, otherwise false
43766
- */
43767
- function isAbsoluteURL(url) {
43768
- // A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
43769
- // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
43770
- // by any combination of letters, digits, plus, period, or hyphen.
43771
- return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
43772
- }
43773
-
43774
- /**
43775
- * Creates a new URL by combining the specified URLs
43776
- *
43777
- * @param {string} baseURL The base URL
43778
- * @param {string} relativeURL The relative URL
43779
- *
43780
- * @returns {string} The combined URL
43781
- */
43782
- function combineURLs(baseURL, relativeURL) {
43783
- return relativeURL
43784
- ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '')
43785
- : baseURL;
43786
- }
43787
-
43788
- /**
43789
- * Creates a new URL by combining the baseURL with the requestedURL,
43790
- * only when the requestedURL is not already an absolute URL.
43791
- * If the requestURL is absolute, this function returns the requestedURL untouched.
43792
- *
43793
- * @param {string} baseURL The base URL
43794
- * @param {string} requestedURL Absolute or relative URL to combine
43795
- *
43796
- * @returns {string} The combined full path
43797
- */
43798
- function buildFullPath(baseURL, requestedURL) {
43799
- if (baseURL && !isAbsoluteURL(requestedURL)) {
43800
- return combineURLs(baseURL, requestedURL);
43801
- }
43802
- return requestedURL;
43803
- }
43804
-
43805
- var isURLSameOrigin = platform.isStandardBrowserEnv ?
43806
-
43807
- // Standard browser envs have full support of the APIs needed to test
43808
- // whether the request URL is of the same origin as current location.
43809
- (function standardBrowserEnv() {
43810
- const msie = /(msie|trident)/i.test(navigator.userAgent);
43811
- const urlParsingNode = document.createElement('a');
43812
- let originURL;
43813
-
43814
- /**
43815
- * Parse a URL to discover it's components
43816
- *
43817
- * @param {String} url The URL to be parsed
43818
- * @returns {Object}
43819
- */
43820
- function resolveURL(url) {
43821
- let href = url;
43822
-
43823
- if (msie) {
43824
- // IE needs attribute set twice to normalize properties
43825
- urlParsingNode.setAttribute('href', href);
43826
- href = urlParsingNode.href;
43827
- }
43828
-
43829
- urlParsingNode.setAttribute('href', href);
43830
-
43831
- // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils
43832
- return {
43833
- href: urlParsingNode.href,
43834
- protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',
43835
- host: urlParsingNode.host,
43836
- search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',
43837
- hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',
43838
- hostname: urlParsingNode.hostname,
43839
- port: urlParsingNode.port,
43840
- pathname: (urlParsingNode.pathname.charAt(0) === '/') ?
43841
- urlParsingNode.pathname :
43842
- '/' + urlParsingNode.pathname
43843
- };
43844
- }
43845
-
43846
- originURL = resolveURL(window.location.href);
43847
-
43848
- /**
43849
- * Determine if a URL shares the same origin as the current location
43850
- *
43851
- * @param {String} requestURL The URL to test
43852
- * @returns {boolean} True if URL shares the same origin, otherwise false
43853
- */
43854
- return function isURLSameOrigin(requestURL) {
43855
- const parsed = (utils$2.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
43856
- return (parsed.protocol === originURL.protocol &&
43857
- parsed.host === originURL.host);
43858
- };
43859
- })() :
43860
-
43861
- // Non standard browser envs (web workers, react-native) lack needed support.
43862
- (function nonStandardBrowserEnv() {
43863
- return function isURLSameOrigin() {
43864
- return true;
43865
- };
43866
- })();
43867
-
43868
43774
  function parseProtocol(url) {
43869
43775
  const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
43870
43776
  return match && match[1] || '';
@@ -43922,11 +43828,54 @@ function speedometer(samplesCount, min) {
43922
43828
  };
43923
43829
  }
43924
43830
 
43925
- function progressEventReducer(listener, isDownloadStream) {
43831
+ /**
43832
+ * Throttle decorator
43833
+ * @param {Function} fn
43834
+ * @param {Number} freq
43835
+ * @return {Function}
43836
+ */
43837
+ function throttle(fn, freq) {
43838
+ let timestamp = 0;
43839
+ let threshold = 1000 / freq;
43840
+ let lastArgs;
43841
+ let timer;
43842
+
43843
+ const invoke = (args, now = Date.now()) => {
43844
+ timestamp = now;
43845
+ lastArgs = null;
43846
+ if (timer) {
43847
+ clearTimeout(timer);
43848
+ timer = null;
43849
+ }
43850
+ fn.apply(null, args);
43851
+ };
43852
+
43853
+ const throttled = (...args) => {
43854
+ const now = Date.now();
43855
+ const passed = now - timestamp;
43856
+ if ( passed >= threshold) {
43857
+ invoke(args, now);
43858
+ } else {
43859
+ lastArgs = args;
43860
+ if (!timer) {
43861
+ timer = setTimeout(() => {
43862
+ timer = null;
43863
+ invoke(lastArgs);
43864
+ }, threshold - passed);
43865
+ }
43866
+ }
43867
+ };
43868
+
43869
+ const flush = () => lastArgs && invoke(lastArgs);
43870
+
43871
+ return [throttled, flush];
43872
+ }
43873
+
43874
+ const progressEventReducer = (listener, isDownloadStream, freq = 3) => {
43926
43875
  let bytesNotified = 0;
43927
43876
  const _speedometer = speedometer(50, 250);
43928
43877
 
43929
- return e => {
43878
+ return throttle(e => {
43930
43879
  const loaded = e.loaded;
43931
43880
  const total = e.lengthComputable ? e.total : undefined;
43932
43881
  const progressBytes = loaded - bytesNotified;
@@ -43942,61 +43891,302 @@ function progressEventReducer(listener, isDownloadStream) {
43942
43891
  bytes: progressBytes,
43943
43892
  rate: rate ? rate : undefined,
43944
43893
  estimated: rate && total && inRange ? (total - loaded) / rate : undefined,
43945
- event: e
43894
+ event: e,
43895
+ lengthComputable: total != null,
43896
+ [isDownloadStream ? 'download' : 'upload']: true
43946
43897
  };
43947
43898
 
43948
- data[isDownloadStream ? 'download' : 'upload'] = true;
43949
-
43950
43899
  listener(data);
43900
+ }, freq);
43901
+ };
43902
+
43903
+ const progressEventDecorator = (total, throttled) => {
43904
+ const lengthComputable = total != null;
43905
+
43906
+ return [(loaded) => throttled[0]({
43907
+ lengthComputable,
43908
+ total,
43909
+ loaded
43910
+ }), throttled[1]];
43911
+ };
43912
+
43913
+ const asyncDecorator = (fn) => (...args) => utils$3.asap(() => fn(...args));
43914
+
43915
+ var isURLSameOrigin = platform.hasStandardBrowserEnv ? ((origin, isMSIE) => (url) => {
43916
+ url = new URL(url, platform.origin);
43917
+
43918
+ return (
43919
+ origin.protocol === url.protocol &&
43920
+ origin.host === url.host &&
43921
+ (isMSIE || origin.port === url.port)
43922
+ );
43923
+ })(
43924
+ new URL(platform.origin),
43925
+ platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)
43926
+ ) : () => true;
43927
+
43928
+ var cookies = platform.hasStandardBrowserEnv ?
43929
+
43930
+ // Standard browser envs support document.cookie
43931
+ {
43932
+ write(name, value, expires, path, domain, secure) {
43933
+ const cookie = [name + '=' + encodeURIComponent(value)];
43934
+
43935
+ utils$3.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());
43936
+
43937
+ utils$3.isString(path) && cookie.push('path=' + path);
43938
+
43939
+ utils$3.isString(domain) && cookie.push('domain=' + domain);
43940
+
43941
+ secure === true && cookie.push('secure');
43942
+
43943
+ document.cookie = cookie.join('; ');
43944
+ },
43945
+
43946
+ read(name) {
43947
+ const match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
43948
+ return (match ? decodeURIComponent(match[3]) : null);
43949
+ },
43950
+
43951
+ remove(name) {
43952
+ this.write(name, '', Date.now() - 86400000);
43953
+ }
43954
+ }
43955
+
43956
+ :
43957
+
43958
+ // Non-standard browser env (web workers, react-native) lack needed support.
43959
+ {
43960
+ write() {},
43961
+ read() {
43962
+ return null;
43963
+ },
43964
+ remove() {}
43951
43965
  };
43966
+
43967
+ /**
43968
+ * Determines whether the specified URL is absolute
43969
+ *
43970
+ * @param {string} url The URL to test
43971
+ *
43972
+ * @returns {boolean} True if the specified URL is absolute, otherwise false
43973
+ */
43974
+ function isAbsoluteURL(url) {
43975
+ // A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
43976
+ // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
43977
+ // by any combination of letters, digits, plus, period, or hyphen.
43978
+ return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
43952
43979
  }
43953
43980
 
43954
- const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
43981
+ /**
43982
+ * Creates a new URL by combining the specified URLs
43983
+ *
43984
+ * @param {string} baseURL The base URL
43985
+ * @param {string} relativeURL The relative URL
43986
+ *
43987
+ * @returns {string} The combined URL
43988
+ */
43989
+ function combineURLs(baseURL, relativeURL) {
43990
+ return relativeURL
43991
+ ? baseURL.replace(/\/?\/$/, '') + '/' + relativeURL.replace(/^\/+/, '')
43992
+ : baseURL;
43993
+ }
43955
43994
 
43956
- var xhrAdapter = isXHRAdapterSupported && function (config) {
43957
- return new Promise(function dispatchXhrRequest(resolve, reject) {
43958
- let requestData = config.data;
43959
- const requestHeaders = AxiosHeaders.from(config.headers).normalize();
43960
- const responseType = config.responseType;
43961
- let onCanceled;
43962
- function done() {
43963
- if (config.cancelToken) {
43964
- config.cancelToken.unsubscribe(onCanceled);
43965
- }
43995
+ /**
43996
+ * Creates a new URL by combining the baseURL with the requestedURL,
43997
+ * only when the requestedURL is not already an absolute URL.
43998
+ * If the requestURL is absolute, this function returns the requestedURL untouched.
43999
+ *
44000
+ * @param {string} baseURL The base URL
44001
+ * @param {string} requestedURL Absolute or relative URL to combine
44002
+ *
44003
+ * @returns {string} The combined full path
44004
+ */
44005
+ function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
44006
+ let isRelativeUrl = !isAbsoluteURL(requestedURL);
44007
+ if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) {
44008
+ return combineURLs(baseURL, requestedURL);
44009
+ }
44010
+ return requestedURL;
44011
+ }
43966
44012
 
43967
- if (config.signal) {
43968
- config.signal.removeEventListener('abort', onCanceled);
43969
- }
44013
+ const headersToObject = (thing) => thing instanceof AxiosHeaders ? { ...thing } : thing;
44014
+
44015
+ /**
44016
+ * Config-specific merge-function which creates a new config-object
44017
+ * by merging two configuration objects together.
44018
+ *
44019
+ * @param {Object} config1
44020
+ * @param {Object} config2
44021
+ *
44022
+ * @returns {Object} New object resulting from merging config2 to config1
44023
+ */
44024
+ function mergeConfig(config1, config2) {
44025
+ // eslint-disable-next-line no-param-reassign
44026
+ config2 = config2 || {};
44027
+ const config = {};
44028
+
44029
+ function getMergedValue(target, source, prop, caseless) {
44030
+ if (utils$3.isPlainObject(target) && utils$3.isPlainObject(source)) {
44031
+ return utils$3.merge.call({caseless}, target, source);
44032
+ } else if (utils$3.isPlainObject(source)) {
44033
+ return utils$3.merge({}, source);
44034
+ } else if (utils$3.isArray(source)) {
44035
+ return source.slice();
44036
+ }
44037
+ return source;
44038
+ }
44039
+
44040
+ // eslint-disable-next-line consistent-return
44041
+ function mergeDeepProperties(a, b, prop , caseless) {
44042
+ if (!utils$3.isUndefined(b)) {
44043
+ return getMergedValue(a, b, prop , caseless);
44044
+ } else if (!utils$3.isUndefined(a)) {
44045
+ return getMergedValue(undefined, a, prop , caseless);
43970
44046
  }
44047
+ }
43971
44048
 
43972
- let contentType;
44049
+ // eslint-disable-next-line consistent-return
44050
+ function valueFromConfig2(a, b) {
44051
+ if (!utils$3.isUndefined(b)) {
44052
+ return getMergedValue(undefined, b);
44053
+ }
44054
+ }
43973
44055
 
43974
- if (utils$2.isFormData(requestData)) {
43975
- if (platform.isStandardBrowserEnv || platform.isStandardBrowserWebWorkerEnv) {
43976
- requestHeaders.setContentType(false); // Let the browser set it
43977
- } else if(!requestHeaders.getContentType(/^\s*multipart\/form-data/)){
43978
- requestHeaders.setContentType('multipart/form-data'); // mobile/desktop app frameworks
43979
- } else if(utils$2.isString(contentType = requestHeaders.getContentType())){
43980
- // fix semicolon duplication issue for ReactNative FormData implementation
43981
- requestHeaders.setContentType(contentType.replace(/^\s*(multipart\/form-data);+/, '$1'));
44056
+ // eslint-disable-next-line consistent-return
44057
+ function defaultToConfig2(a, b) {
44058
+ if (!utils$3.isUndefined(b)) {
44059
+ return getMergedValue(undefined, b);
44060
+ } else if (!utils$3.isUndefined(a)) {
44061
+ return getMergedValue(undefined, a);
44062
+ }
44063
+ }
44064
+
44065
+ // eslint-disable-next-line consistent-return
44066
+ function mergeDirectKeys(a, b, prop) {
44067
+ if (prop in config2) {
44068
+ return getMergedValue(a, b);
44069
+ } else if (prop in config1) {
44070
+ return getMergedValue(undefined, a);
44071
+ }
44072
+ }
44073
+
44074
+ const mergeMap = {
44075
+ url: valueFromConfig2,
44076
+ method: valueFromConfig2,
44077
+ data: valueFromConfig2,
44078
+ baseURL: defaultToConfig2,
44079
+ transformRequest: defaultToConfig2,
44080
+ transformResponse: defaultToConfig2,
44081
+ paramsSerializer: defaultToConfig2,
44082
+ timeout: defaultToConfig2,
44083
+ timeoutMessage: defaultToConfig2,
44084
+ withCredentials: defaultToConfig2,
44085
+ withXSRFToken: defaultToConfig2,
44086
+ adapter: defaultToConfig2,
44087
+ responseType: defaultToConfig2,
44088
+ xsrfCookieName: defaultToConfig2,
44089
+ xsrfHeaderName: defaultToConfig2,
44090
+ onUploadProgress: defaultToConfig2,
44091
+ onDownloadProgress: defaultToConfig2,
44092
+ decompress: defaultToConfig2,
44093
+ maxContentLength: defaultToConfig2,
44094
+ maxBodyLength: defaultToConfig2,
44095
+ beforeRedirect: defaultToConfig2,
44096
+ transport: defaultToConfig2,
44097
+ httpAgent: defaultToConfig2,
44098
+ httpsAgent: defaultToConfig2,
44099
+ cancelToken: defaultToConfig2,
44100
+ socketPath: defaultToConfig2,
44101
+ responseEncoding: defaultToConfig2,
44102
+ validateStatus: mergeDirectKeys,
44103
+ headers: (a, b , prop) => mergeDeepProperties(headersToObject(a), headersToObject(b),prop, true)
44104
+ };
44105
+
44106
+ utils$3.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
44107
+ const merge = mergeMap[prop] || mergeDeepProperties;
44108
+ const configValue = merge(config1[prop], config2[prop], prop);
44109
+ (utils$3.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
44110
+ });
44111
+
44112
+ return config;
44113
+ }
44114
+
44115
+ var resolveConfig = (config) => {
44116
+ const newConfig = mergeConfig({}, config);
44117
+
44118
+ let {data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth} = newConfig;
44119
+
44120
+ newConfig.headers = headers = AxiosHeaders.from(headers);
44121
+
44122
+ newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config.params, config.paramsSerializer);
44123
+
44124
+ // HTTP basic authentication
44125
+ if (auth) {
44126
+ headers.set('Authorization', 'Basic ' +
44127
+ btoa((auth.username || '') + ':' + (auth.password ? unescape(encodeURIComponent(auth.password)) : ''))
44128
+ );
44129
+ }
44130
+
44131
+ let contentType;
44132
+
44133
+ if (utils$3.isFormData(data)) {
44134
+ if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
44135
+ headers.setContentType(undefined); // Let the browser set it
44136
+ } else if ((contentType = headers.getContentType()) !== false) {
44137
+ // fix semicolon duplication issue for ReactNative FormData implementation
44138
+ const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];
44139
+ headers.setContentType([type || 'multipart/form-data', ...tokens].join('; '));
44140
+ }
44141
+ }
44142
+
44143
+ // Add xsrf header
44144
+ // This is only done if running in a standard browser environment.
44145
+ // Specifically not if we're in a web worker, or react-native.
44146
+
44147
+ if (platform.hasStandardBrowserEnv) {
44148
+ withXSRFToken && utils$3.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));
44149
+
44150
+ if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(newConfig.url))) {
44151
+ // Add xsrf header
44152
+ const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName);
44153
+
44154
+ if (xsrfValue) {
44155
+ headers.set(xsrfHeaderName, xsrfValue);
43982
44156
  }
43983
44157
  }
44158
+ }
43984
44159
 
43985
- let request = new XMLHttpRequest();
44160
+ return newConfig;
44161
+ };
44162
+
44163
+ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
44164
+
44165
+ var xhrAdapter = isXHRAdapterSupported && function (config) {
44166
+ return new Promise(function dispatchXhrRequest(resolve, reject) {
44167
+ const _config = resolveConfig(config);
44168
+ let requestData = _config.data;
44169
+ const requestHeaders = AxiosHeaders.from(_config.headers).normalize();
44170
+ let {responseType, onUploadProgress, onDownloadProgress} = _config;
44171
+ let onCanceled;
44172
+ let uploadThrottled, downloadThrottled;
44173
+ let flushUpload, flushDownload;
44174
+
44175
+ function done() {
44176
+ flushUpload && flushUpload(); // flush events
44177
+ flushDownload && flushDownload(); // flush events
44178
+
44179
+ _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);
43986
44180
 
43987
- // HTTP basic authentication
43988
- if (config.auth) {
43989
- const username = config.auth.username || '';
43990
- const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';
43991
- requestHeaders.set('Authorization', 'Basic ' + btoa(username + ':' + password));
44181
+ _config.signal && _config.signal.removeEventListener('abort', onCanceled);
43992
44182
  }
43993
44183
 
43994
- const fullPath = buildFullPath(config.baseURL, config.url);
44184
+ let request = new XMLHttpRequest();
43995
44185
 
43996
- request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);
44186
+ request.open(_config.method.toUpperCase(), _config.url, true);
43997
44187
 
43998
44188
  // Set the request timeout in MS
43999
- request.timeout = config.timeout;
44189
+ request.timeout = _config.timeout;
44000
44190
 
44001
44191
  function onloadend() {
44002
44192
  if (!request) {
@@ -44076,10 +44266,10 @@ var xhrAdapter = isXHRAdapterSupported && function (config) {
44076
44266
 
44077
44267
  // Handle timeout
44078
44268
  request.ontimeout = function handleTimeout() {
44079
- let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';
44080
- const transitional = config.transitional || transitionalDefaults;
44081
- if (config.timeoutErrorMessage) {
44082
- timeoutErrorMessage = config.timeoutErrorMessage;
44269
+ let timeoutErrorMessage = _config.timeout ? 'timeout of ' + _config.timeout + 'ms exceeded' : 'timeout exceeded';
44270
+ const transitional = _config.transitional || transitionalDefaults;
44271
+ if (_config.timeoutErrorMessage) {
44272
+ timeoutErrorMessage = _config.timeoutErrorMessage;
44083
44273
  }
44084
44274
  reject(new AxiosError(
44085
44275
  timeoutErrorMessage,
@@ -44091,50 +44281,42 @@ var xhrAdapter = isXHRAdapterSupported && function (config) {
44091
44281
  request = null;
44092
44282
  };
44093
44283
 
44094
- // Add xsrf header
44095
- // This is only done if running in a standard browser environment.
44096
- // Specifically not if we're in a web worker, or react-native.
44097
- if (platform.isStandardBrowserEnv) {
44098
- // Add xsrf header
44099
- // regarding CVE-2023-45857 config.withCredentials condition was removed temporarily
44100
- const xsrfValue = isURLSameOrigin(fullPath) && config.xsrfCookieName && cookies.read(config.xsrfCookieName);
44101
-
44102
- if (xsrfValue) {
44103
- requestHeaders.set(config.xsrfHeaderName, xsrfValue);
44104
- }
44105
- }
44106
-
44107
44284
  // Remove Content-Type if data is undefined
44108
44285
  requestData === undefined && requestHeaders.setContentType(null);
44109
44286
 
44110
44287
  // Add headers to the request
44111
44288
  if ('setRequestHeader' in request) {
44112
- utils$2.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
44289
+ utils$3.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
44113
44290
  request.setRequestHeader(key, val);
44114
44291
  });
44115
44292
  }
44116
44293
 
44117
44294
  // Add withCredentials to request if needed
44118
- if (!utils$2.isUndefined(config.withCredentials)) {
44119
- request.withCredentials = !!config.withCredentials;
44295
+ if (!utils$3.isUndefined(_config.withCredentials)) {
44296
+ request.withCredentials = !!_config.withCredentials;
44120
44297
  }
44121
44298
 
44122
44299
  // Add responseType to request if needed
44123
44300
  if (responseType && responseType !== 'json') {
44124
- request.responseType = config.responseType;
44301
+ request.responseType = _config.responseType;
44125
44302
  }
44126
44303
 
44127
44304
  // Handle progress if needed
44128
- if (typeof config.onDownloadProgress === 'function') {
44129
- request.addEventListener('progress', progressEventReducer(config.onDownloadProgress, true));
44305
+ if (onDownloadProgress) {
44306
+ ([downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true));
44307
+ request.addEventListener('progress', downloadThrottled);
44130
44308
  }
44131
44309
 
44132
44310
  // Not all browsers support upload events
44133
- if (typeof config.onUploadProgress === 'function' && request.upload) {
44134
- request.upload.addEventListener('progress', progressEventReducer(config.onUploadProgress));
44311
+ if (onUploadProgress && request.upload) {
44312
+ ([uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress));
44313
+
44314
+ request.upload.addEventListener('progress', uploadThrottled);
44315
+
44316
+ request.upload.addEventListener('loadend', flushUpload);
44135
44317
  }
44136
44318
 
44137
- if (config.cancelToken || config.signal) {
44319
+ if (_config.cancelToken || _config.signal) {
44138
44320
  // Handle cancellation
44139
44321
  // eslint-disable-next-line func-names
44140
44322
  onCanceled = cancel => {
@@ -44146,13 +44328,13 @@ var xhrAdapter = isXHRAdapterSupported && function (config) {
44146
44328
  request = null;
44147
44329
  };
44148
44330
 
44149
- config.cancelToken && config.cancelToken.subscribe(onCanceled);
44150
- if (config.signal) {
44151
- config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);
44331
+ _config.cancelToken && _config.cancelToken.subscribe(onCanceled);
44332
+ if (_config.signal) {
44333
+ _config.signal.aborted ? onCanceled() : _config.signal.addEventListener('abort', onCanceled);
44152
44334
  }
44153
44335
  }
44154
44336
 
44155
- const protocol = parseProtocol(fullPath);
44337
+ const protocol = parseProtocol(_config.url);
44156
44338
 
44157
44339
  if (protocol && platform.protocols.indexOf(protocol) === -1) {
44158
44340
  reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));
@@ -44165,12 +44347,361 @@ var xhrAdapter = isXHRAdapterSupported && function (config) {
44165
44347
  });
44166
44348
  };
44167
44349
 
44350
+ const composeSignals = (signals, timeout) => {
44351
+ const {length} = (signals = signals ? signals.filter(Boolean) : []);
44352
+
44353
+ if (timeout || length) {
44354
+ let controller = new AbortController();
44355
+
44356
+ let aborted;
44357
+
44358
+ const onabort = function (reason) {
44359
+ if (!aborted) {
44360
+ aborted = true;
44361
+ unsubscribe();
44362
+ const err = reason instanceof Error ? reason : this.reason;
44363
+ controller.abort(err instanceof AxiosError ? err : new CanceledError(err instanceof Error ? err.message : err));
44364
+ }
44365
+ };
44366
+
44367
+ let timer = timeout && setTimeout(() => {
44368
+ timer = null;
44369
+ onabort(new AxiosError(`timeout ${timeout} of ms exceeded`, AxiosError.ETIMEDOUT));
44370
+ }, timeout);
44371
+
44372
+ const unsubscribe = () => {
44373
+ if (signals) {
44374
+ timer && clearTimeout(timer);
44375
+ timer = null;
44376
+ signals.forEach(signal => {
44377
+ signal.unsubscribe ? signal.unsubscribe(onabort) : signal.removeEventListener('abort', onabort);
44378
+ });
44379
+ signals = null;
44380
+ }
44381
+ };
44382
+
44383
+ signals.forEach((signal) => signal.addEventListener('abort', onabort));
44384
+
44385
+ const {signal} = controller;
44386
+
44387
+ signal.unsubscribe = () => utils$3.asap(unsubscribe);
44388
+
44389
+ return signal;
44390
+ }
44391
+ };
44392
+
44393
+ const streamChunk = function* (chunk, chunkSize) {
44394
+ let len = chunk.byteLength;
44395
+
44396
+ if (!chunkSize || len < chunkSize) {
44397
+ yield chunk;
44398
+ return;
44399
+ }
44400
+
44401
+ let pos = 0;
44402
+ let end;
44403
+
44404
+ while (pos < len) {
44405
+ end = pos + chunkSize;
44406
+ yield chunk.slice(pos, end);
44407
+ pos = end;
44408
+ }
44409
+ };
44410
+
44411
+ const readBytes = async function* (iterable, chunkSize) {
44412
+ for await (const chunk of readStream(iterable)) {
44413
+ yield* streamChunk(chunk, chunkSize);
44414
+ }
44415
+ };
44416
+
44417
+ const readStream = async function* (stream) {
44418
+ if (stream[Symbol.asyncIterator]) {
44419
+ yield* stream;
44420
+ return;
44421
+ }
44422
+
44423
+ const reader = stream.getReader();
44424
+ try {
44425
+ for (;;) {
44426
+ const {done, value} = await reader.read();
44427
+ if (done) {
44428
+ break;
44429
+ }
44430
+ yield value;
44431
+ }
44432
+ } finally {
44433
+ await reader.cancel();
44434
+ }
44435
+ };
44436
+
44437
+ const trackStream = (stream, chunkSize, onProgress, onFinish) => {
44438
+ const iterator = readBytes(stream, chunkSize);
44439
+
44440
+ let bytes = 0;
44441
+ let done;
44442
+ let _onFinish = (e) => {
44443
+ if (!done) {
44444
+ done = true;
44445
+ onFinish && onFinish(e);
44446
+ }
44447
+ };
44448
+
44449
+ return new ReadableStream({
44450
+ async pull(controller) {
44451
+ try {
44452
+ const {done, value} = await iterator.next();
44453
+
44454
+ if (done) {
44455
+ _onFinish();
44456
+ controller.close();
44457
+ return;
44458
+ }
44459
+
44460
+ let len = value.byteLength;
44461
+ if (onProgress) {
44462
+ let loadedBytes = bytes += len;
44463
+ onProgress(loadedBytes);
44464
+ }
44465
+ controller.enqueue(new Uint8Array(value));
44466
+ } catch (err) {
44467
+ _onFinish(err);
44468
+ throw err;
44469
+ }
44470
+ },
44471
+ cancel(reason) {
44472
+ _onFinish(reason);
44473
+ return iterator.return();
44474
+ }
44475
+ }, {
44476
+ highWaterMark: 2
44477
+ })
44478
+ };
44479
+
44480
+ const isFetchSupported = typeof fetch === 'function' && typeof Request === 'function' && typeof Response === 'function';
44481
+ const isReadableStreamSupported = isFetchSupported && typeof ReadableStream === 'function';
44482
+
44483
+ // used only inside the fetch adapter
44484
+ const encodeText = isFetchSupported && (typeof TextEncoder === 'function' ?
44485
+ ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) :
44486
+ async (str) => new Uint8Array(await new Response(str).arrayBuffer())
44487
+ );
44488
+
44489
+ const test = (fn, ...args) => {
44490
+ try {
44491
+ return !!fn(...args);
44492
+ } catch (e) {
44493
+ return false
44494
+ }
44495
+ };
44496
+
44497
+ const supportsRequestStream = isReadableStreamSupported && test(() => {
44498
+ let duplexAccessed = false;
44499
+
44500
+ const hasContentType = new Request(platform.origin, {
44501
+ body: new ReadableStream(),
44502
+ method: 'POST',
44503
+ get duplex() {
44504
+ duplexAccessed = true;
44505
+ return 'half';
44506
+ },
44507
+ }).headers.has('Content-Type');
44508
+
44509
+ return duplexAccessed && !hasContentType;
44510
+ });
44511
+
44512
+ const DEFAULT_CHUNK_SIZE = 64 * 1024;
44513
+
44514
+ const supportsResponseStream = isReadableStreamSupported &&
44515
+ test(() => utils$3.isReadableStream(new Response('').body));
44516
+
44517
+
44518
+ const resolvers = {
44519
+ stream: supportsResponseStream && ((res) => res.body)
44520
+ };
44521
+
44522
+ isFetchSupported && (((res) => {
44523
+ ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(type => {
44524
+ !resolvers[type] && (resolvers[type] = utils$3.isFunction(res[type]) ? (res) => res[type]() :
44525
+ (_, config) => {
44526
+ throw new AxiosError(`Response type '${type}' is not supported`, AxiosError.ERR_NOT_SUPPORT, config);
44527
+ });
44528
+ });
44529
+ })(new Response));
44530
+
44531
+ const getBodyLength = async (body) => {
44532
+ if (body == null) {
44533
+ return 0;
44534
+ }
44535
+
44536
+ if(utils$3.isBlob(body)) {
44537
+ return body.size;
44538
+ }
44539
+
44540
+ if(utils$3.isSpecCompliantForm(body)) {
44541
+ const _request = new Request(platform.origin, {
44542
+ method: 'POST',
44543
+ body,
44544
+ });
44545
+ return (await _request.arrayBuffer()).byteLength;
44546
+ }
44547
+
44548
+ if(utils$3.isArrayBufferView(body) || utils$3.isArrayBuffer(body)) {
44549
+ return body.byteLength;
44550
+ }
44551
+
44552
+ if(utils$3.isURLSearchParams(body)) {
44553
+ body = body + '';
44554
+ }
44555
+
44556
+ if(utils$3.isString(body)) {
44557
+ return (await encodeText(body)).byteLength;
44558
+ }
44559
+ };
44560
+
44561
+ const resolveBodyLength = async (headers, body) => {
44562
+ const length = utils$3.toFiniteNumber(headers.getContentLength());
44563
+
44564
+ return length == null ? getBodyLength(body) : length;
44565
+ };
44566
+
44567
+ var fetchAdapter = isFetchSupported && (async (config) => {
44568
+ let {
44569
+ url,
44570
+ method,
44571
+ data,
44572
+ signal,
44573
+ cancelToken,
44574
+ timeout,
44575
+ onDownloadProgress,
44576
+ onUploadProgress,
44577
+ responseType,
44578
+ headers,
44579
+ withCredentials = 'same-origin',
44580
+ fetchOptions
44581
+ } = resolveConfig(config);
44582
+
44583
+ responseType = responseType ? (responseType + '').toLowerCase() : 'text';
44584
+
44585
+ let composedSignal = composeSignals([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
44586
+
44587
+ let request;
44588
+
44589
+ const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
44590
+ composedSignal.unsubscribe();
44591
+ });
44592
+
44593
+ let requestContentLength;
44594
+
44595
+ try {
44596
+ if (
44597
+ onUploadProgress && supportsRequestStream && method !== 'get' && method !== 'head' &&
44598
+ (requestContentLength = await resolveBodyLength(headers, data)) !== 0
44599
+ ) {
44600
+ let _request = new Request(url, {
44601
+ method: 'POST',
44602
+ body: data,
44603
+ duplex: "half"
44604
+ });
44605
+
44606
+ let contentTypeHeader;
44607
+
44608
+ if (utils$3.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {
44609
+ headers.setContentType(contentTypeHeader);
44610
+ }
44611
+
44612
+ if (_request.body) {
44613
+ const [onProgress, flush] = progressEventDecorator(
44614
+ requestContentLength,
44615
+ progressEventReducer(asyncDecorator(onUploadProgress))
44616
+ );
44617
+
44618
+ data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
44619
+ }
44620
+ }
44621
+
44622
+ if (!utils$3.isString(withCredentials)) {
44623
+ withCredentials = withCredentials ? 'include' : 'omit';
44624
+ }
44625
+
44626
+ // Cloudflare Workers throws when credentials are defined
44627
+ // see https://github.com/cloudflare/workerd/issues/902
44628
+ const isCredentialsSupported = "credentials" in Request.prototype;
44629
+ request = new Request(url, {
44630
+ ...fetchOptions,
44631
+ signal: composedSignal,
44632
+ method: method.toUpperCase(),
44633
+ headers: headers.normalize().toJSON(),
44634
+ body: data,
44635
+ duplex: "half",
44636
+ credentials: isCredentialsSupported ? withCredentials : undefined
44637
+ });
44638
+
44639
+ let response = await fetch(request, fetchOptions);
44640
+
44641
+ const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response');
44642
+
44643
+ if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) {
44644
+ const options = {};
44645
+
44646
+ ['status', 'statusText', 'headers'].forEach(prop => {
44647
+ options[prop] = response[prop];
44648
+ });
44649
+
44650
+ const responseContentLength = utils$3.toFiniteNumber(response.headers.get('content-length'));
44651
+
44652
+ const [onProgress, flush] = onDownloadProgress && progressEventDecorator(
44653
+ responseContentLength,
44654
+ progressEventReducer(asyncDecorator(onDownloadProgress), true)
44655
+ ) || [];
44656
+
44657
+ response = new Response(
44658
+ trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
44659
+ flush && flush();
44660
+ unsubscribe && unsubscribe();
44661
+ }),
44662
+ options
44663
+ );
44664
+ }
44665
+
44666
+ responseType = responseType || 'text';
44667
+
44668
+ let responseData = await resolvers[utils$3.findKey(resolvers, responseType) || 'text'](response, config);
44669
+
44670
+ !isStreamResponse && unsubscribe && unsubscribe();
44671
+
44672
+ return await new Promise((resolve, reject) => {
44673
+ settle(resolve, reject, {
44674
+ data: responseData,
44675
+ headers: AxiosHeaders.from(response.headers),
44676
+ status: response.status,
44677
+ statusText: response.statusText,
44678
+ config,
44679
+ request
44680
+ });
44681
+ })
44682
+ } catch (err) {
44683
+ unsubscribe && unsubscribe();
44684
+
44685
+ if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) {
44686
+ throw Object.assign(
44687
+ new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request),
44688
+ {
44689
+ cause: err.cause || err
44690
+ }
44691
+ )
44692
+ }
44693
+
44694
+ throw AxiosError.from(err, err && err.code, config, request);
44695
+ }
44696
+ });
44697
+
44168
44698
  const knownAdapters = {
44169
44699
  http: httpAdapter,
44170
- xhr: xhrAdapter
44700
+ xhr: xhrAdapter,
44701
+ fetch: fetchAdapter
44171
44702
  };
44172
44703
 
44173
- utils$2.forEach(knownAdapters, (fn, value) => {
44704
+ utils$3.forEach(knownAdapters, (fn, value) => {
44174
44705
  if (fn) {
44175
44706
  try {
44176
44707
  Object.defineProperty(fn, 'name', {value});
@@ -44183,11 +44714,11 @@ utils$2.forEach(knownAdapters, (fn, value) => {
44183
44714
 
44184
44715
  const renderReason = (reason) => `- ${reason}`;
44185
44716
 
44186
- const isResolvedHandle = (adapter) => utils$2.isFunction(adapter) || adapter === null || adapter === false;
44717
+ const isResolvedHandle = (adapter) => utils$3.isFunction(adapter) || adapter === null || adapter === false;
44187
44718
 
44188
44719
  var adapters = {
44189
44720
  getAdapter: (adapters) => {
44190
- adapters = utils$2.isArray(adapters) ? adapters : [adapters];
44721
+ adapters = utils$3.isArray(adapters) ? adapters : [adapters];
44191
44722
 
44192
44723
  const {length} = adapters;
44193
44724
  let nameOrAdapter;
@@ -44311,108 +44842,7 @@ function dispatchRequest(config) {
44311
44842
  });
44312
44843
  }
44313
44844
 
44314
- const headersToObject = (thing) => thing instanceof AxiosHeaders ? thing.toJSON() : thing;
44315
-
44316
- /**
44317
- * Config-specific merge-function which creates a new config-object
44318
- * by merging two configuration objects together.
44319
- *
44320
- * @param {Object} config1
44321
- * @param {Object} config2
44322
- *
44323
- * @returns {Object} New object resulting from merging config2 to config1
44324
- */
44325
- function mergeConfig(config1, config2) {
44326
- // eslint-disable-next-line no-param-reassign
44327
- config2 = config2 || {};
44328
- const config = {};
44329
-
44330
- function getMergedValue(target, source, caseless) {
44331
- if (utils$2.isPlainObject(target) && utils$2.isPlainObject(source)) {
44332
- return utils$2.merge.call({caseless}, target, source);
44333
- } else if (utils$2.isPlainObject(source)) {
44334
- return utils$2.merge({}, source);
44335
- } else if (utils$2.isArray(source)) {
44336
- return source.slice();
44337
- }
44338
- return source;
44339
- }
44340
-
44341
- // eslint-disable-next-line consistent-return
44342
- function mergeDeepProperties(a, b, caseless) {
44343
- if (!utils$2.isUndefined(b)) {
44344
- return getMergedValue(a, b, caseless);
44345
- } else if (!utils$2.isUndefined(a)) {
44346
- return getMergedValue(undefined, a, caseless);
44347
- }
44348
- }
44349
-
44350
- // eslint-disable-next-line consistent-return
44351
- function valueFromConfig2(a, b) {
44352
- if (!utils$2.isUndefined(b)) {
44353
- return getMergedValue(undefined, b);
44354
- }
44355
- }
44356
-
44357
- // eslint-disable-next-line consistent-return
44358
- function defaultToConfig2(a, b) {
44359
- if (!utils$2.isUndefined(b)) {
44360
- return getMergedValue(undefined, b);
44361
- } else if (!utils$2.isUndefined(a)) {
44362
- return getMergedValue(undefined, a);
44363
- }
44364
- }
44365
-
44366
- // eslint-disable-next-line consistent-return
44367
- function mergeDirectKeys(a, b, prop) {
44368
- if (prop in config2) {
44369
- return getMergedValue(a, b);
44370
- } else if (prop in config1) {
44371
- return getMergedValue(undefined, a);
44372
- }
44373
- }
44374
-
44375
- const mergeMap = {
44376
- url: valueFromConfig2,
44377
- method: valueFromConfig2,
44378
- data: valueFromConfig2,
44379
- baseURL: defaultToConfig2,
44380
- transformRequest: defaultToConfig2,
44381
- transformResponse: defaultToConfig2,
44382
- paramsSerializer: defaultToConfig2,
44383
- timeout: defaultToConfig2,
44384
- timeoutMessage: defaultToConfig2,
44385
- withCredentials: defaultToConfig2,
44386
- adapter: defaultToConfig2,
44387
- responseType: defaultToConfig2,
44388
- xsrfCookieName: defaultToConfig2,
44389
- xsrfHeaderName: defaultToConfig2,
44390
- onUploadProgress: defaultToConfig2,
44391
- onDownloadProgress: defaultToConfig2,
44392
- decompress: defaultToConfig2,
44393
- maxContentLength: defaultToConfig2,
44394
- maxBodyLength: defaultToConfig2,
44395
- beforeRedirect: defaultToConfig2,
44396
- transport: defaultToConfig2,
44397
- httpAgent: defaultToConfig2,
44398
- httpsAgent: defaultToConfig2,
44399
- cancelToken: defaultToConfig2,
44400
- socketPath: defaultToConfig2,
44401
- responseEncoding: defaultToConfig2,
44402
- validateStatus: mergeDirectKeys,
44403
- headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)
44404
- };
44405
-
44406
- utils$2.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
44407
- const merge = mergeMap[prop] || mergeDeepProperties;
44408
- const configValue = merge(config1[prop], config2[prop], prop);
44409
- (utils$2.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
44410
- });
44411
-
44412
- return config;
44413
- }
44414
-
44415
- const VERSION = "1.6.0";
44845
+ const VERSION = "1.10.0";
44416
44846
 
44417
44847
  const validators$1 = {};
44418
44848
 
@@ -44463,6 +44893,14 @@ validators$1.transitional = function transitional(validator, version, message) {
44463
44893
  };
44464
44894
  };
44465
44895
 
44896
+ validators$1.spelling = function spelling(correctSpelling) {
44897
+ return (value, opt) => {
44898
+ // eslint-disable-next-line no-console
44899
+ console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);
44900
+ return true;
44901
+ }
44902
+ };
44903
+
44466
44904
  /**
44467
44905
  * Assert object's properties type
44468
44906
  *
@@ -44512,7 +44950,7 @@ const validators = validator.validators;
44512
44950
  */
44513
44951
  class Axios {
44514
44952
  constructor(instanceConfig) {
44515
- this.defaults = instanceConfig;
44953
+ this.defaults = instanceConfig || {};
44516
44954
  this.interceptors = {
44517
44955
  request: new InterceptorManager(),
44518
44956
  response: new InterceptorManager()
@@ -44527,7 +44965,34 @@ class Axios {
44527
44965
  *
44528
44966
  * @returns {Promise} The Promise to be fulfilled
44529
44967
  */
44530
- request(configOrUrl, config) {
44968
+ async request(configOrUrl, config) {
44969
+ try {
44970
+ return await this._request(configOrUrl, config);
44971
+ } catch (err) {
44972
+ if (err instanceof Error) {
44973
+ let dummy = {};
44974
+
44975
+ Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error());
44976
+
44977
+ // slice off the Error: ... line
44978
+ const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, '') : '';
44979
+ try {
44980
+ if (!err.stack) {
44981
+ err.stack = stack;
44982
+ // match without the 2 top stack lines
44983
+ } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ''))) {
44984
+ err.stack += '\n' + stack;
44985
+ }
44986
+ } catch (e) {
44987
+ // ignore the case where "stack" is an un-writable property
44988
+ }
44989
+ }
44990
+
44991
+ throw err;
44992
+ }
44993
+ }
44994
+
44995
+ _request(configOrUrl, config) {
44531
44996
  /*eslint no-param-reassign:0*/
44532
44997
  // Allow for axios('example/url'[, config]) a la fetch API
44533
44998
  if (typeof configOrUrl === 'string') {
@@ -44550,7 +45015,7 @@ class Axios {
44550
45015
  }
44551
45016
 
44552
45017
  if (paramsSerializer != null) {
44553
- if (utils$2.isFunction(paramsSerializer)) {
45018
+ if (utils$3.isFunction(paramsSerializer)) {
44554
45019
  config.paramsSerializer = {
44555
45020
  serialize: paramsSerializer
44556
45021
  };
@@ -44562,16 +45027,28 @@ class Axios {
44562
45027
  }
44563
45028
  }
44564
45029
 
45030
+ // Set config.allowAbsoluteUrls
45031
+ if (config.allowAbsoluteUrls !== undefined) ; else if (this.defaults.allowAbsoluteUrls !== undefined) {
45032
+ config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;
45033
+ } else {
45034
+ config.allowAbsoluteUrls = true;
45035
+ }
45036
+
45037
+ validator.assertOptions(config, {
45038
+ baseUrl: validators.spelling('baseURL'),
45039
+ withXsrfToken: validators.spelling('withXSRFToken')
45040
+ }, true);
45041
+
44565
45042
  // Set config.method
44566
45043
  config.method = (config.method || this.defaults.method || 'get').toLowerCase();
44567
45044
 
44568
45045
  // Flatten headers
44569
- let contextHeaders = headers && utils$2.merge(
45046
+ let contextHeaders = headers && utils$3.merge(
44570
45047
  headers.common,
44571
45048
  headers[config.method]
44572
45049
  );
44573
45050
 
44574
- headers && utils$2.forEach(
45051
+ headers && utils$3.forEach(
44575
45052
  ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
44576
45053
  (method) => {
44577
45054
  delete headers[method];
@@ -44652,13 +45129,13 @@ class Axios {
44652
45129
 
44653
45130
  getUri(config) {
44654
45131
  config = mergeConfig(this.defaults, config);
44655
- const fullPath = buildFullPath(config.baseURL, config.url);
45132
+ const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
44656
45133
  return buildURL(fullPath, config.params, config.paramsSerializer);
44657
45134
  }
44658
45135
  }
44659
45136
 
44660
45137
  // Provide aliases for supported request methods
44661
- utils$2.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
45138
+ utils$3.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
44662
45139
  /*eslint func-names:0*/
44663
45140
  Axios.prototype[method] = function(url, config) {
44664
45141
  return this.request(mergeConfig(config || {}, {
@@ -44669,7 +45146,7 @@ utils$2.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoDa
44669
45146
  };
44670
45147
  });
44671
45148
 
44672
- utils$2.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
45149
+ utils$3.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
44673
45150
  /*eslint func-names:0*/
44674
45151
 
44675
45152
  function generateHTTPMethod(isForm) {
@@ -44790,6 +45267,20 @@ class CancelToken {
44790
45267
  }
44791
45268
  }
44792
45269
 
45270
+ toAbortSignal() {
45271
+ const controller = new AbortController();
45272
+
45273
+ const abort = (err) => {
45274
+ controller.abort(err);
45275
+ };
45276
+
45277
+ this.subscribe(abort);
45278
+
45279
+ controller.signal.unsubscribe = () => this.unsubscribe(abort);
45280
+
45281
+ return controller.signal;
45282
+ }
45283
+
44793
45284
  /**
44794
45285
  * Returns an object that contains a new `CancelToken` and a function that, when called,
44795
45286
  * cancels the `CancelToken`.
@@ -44841,7 +45332,7 @@ function spread(callback) {
44841
45332
  * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
44842
45333
  */
44843
45334
  function isAxiosError(payload) {
44844
- return utils$2.isObject(payload) && (payload.isAxiosError === true);
45335
+ return utils$3.isObject(payload) && (payload.isAxiosError === true);
44845
45336
  }
44846
45337
 
44847
45338
  const HttpStatusCode = {
@@ -44926,10 +45417,10 @@ function createInstance(defaultConfig) {
44926
45417
  const instance = bind$1(Axios.prototype.request, context);
44927
45418
 
44928
45419
  // Copy axios.prototype to instance
44929
- utils$2.extend(instance, Axios.prototype, context, {allOwnKeys: true});
45420
+ utils$3.extend(instance, Axios.prototype, context, {allOwnKeys: true});
44930
45421
 
44931
45422
  // Copy context to instance
44932
- utils$2.extend(instance, context, null, {allOwnKeys: true});
45423
+ utils$3.extend(instance, context, null, {allOwnKeys: true});
44933
45424
 
44934
45425
  // Factory for creating new instances
44935
45426
  instance.create = function create(instanceConfig) {
@@ -44973,7 +45464,7 @@ axios.mergeConfig = mergeConfig;
44973
45464
 
44974
45465
  axios.AxiosHeaders = AxiosHeaders;
44975
45466
 
44976
- axios.formToJSON = thing => formDataToJSON(utils$2.isHTMLForm(thing) ? new FormData(thing) : thing);
45467
+ axios.formToJSON = thing => formDataToJSON(utils$3.isHTMLForm(thing) ? new FormData(thing) : thing);
44977
45468
 
44978
45469
  axios.getAdapter = adapters.getAdapter;
44979
45470
 
@@ -49480,7 +49971,7 @@ var Immediate = {
49480
49971
  },
49481
49972
  };
49482
49973
 
49483
- var setImmediate = Immediate.setImmediate, clearImmediate = Immediate.clearImmediate;
49974
+ var setImmediate$1 = Immediate.setImmediate, clearImmediate = Immediate.clearImmediate;
49484
49975
  var immediateProvider = {
49485
49976
  setImmediate: function () {
49486
49977
  var args = [];
@@ -49488,7 +49979,7 @@ var immediateProvider = {
49488
49979
  args[_i] = arguments[_i];
49489
49980
  }
49490
49981
  var delegate = immediateProvider.delegate;
49491
- return ((delegate === null || delegate === void 0 ? void 0 : delegate.setImmediate) || setImmediate).apply(void 0, __spreadArray([], __read(args)));
49982
+ return ((delegate === null || delegate === void 0 ? void 0 : delegate.setImmediate) || setImmediate$1).apply(void 0, __spreadArray([], __read(args)));
49492
49983
  },
49493
49984
  clearImmediate: function (handle) {
49494
49985
  return (clearImmediate)(handle);
@@ -55095,7 +55586,7 @@ const DivComponent = React__default.forwardRef((_a, ref) => {
55095
55586
  return React__default.createElement("div", Object.assign({ ref: ref }, props), children);
55096
55587
  });
55097
55588
  const Widget = forwardRef(({ candidate, job, video, config, disabled = false, buttonText = 'START INTERVIEW', buttonStyle = {}, children, styleUrls = [], fontsUrls = [], }, clientRef) => {
55098
- const widget_version = "1.1.53";
55589
+ const widget_version = "1.1.54";
55099
55590
  const [isWidgetOpen, setIsWidgetOpen] = useState(false);
55100
55591
  const [isWidgetMinimized, setIsWidgetMinimized] = useState(false);
55101
55592
  const [isIncognitoMode, setIsIncognitoMode] = useState(false);