piral-cli 1.6.1 → 1.6.2-beta.7393

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/external/index.js +963 -589
  2. package/package.json +3 -3
@@ -7873,13 +7873,13 @@ var require_CachedInputFileSystem = __commonJS({
7873
7873
  callback = options;
7874
7874
  options = void 0;
7875
7875
  }
7876
+ if (typeof path !== "string" && !Buffer.isBuffer(path) && !(path instanceof URL) && typeof path !== "number") {
7877
+ callback(new TypeError("path must be a string, Buffer, URL or number"));
7878
+ return;
7879
+ }
7876
7880
  if (options) {
7877
7881
  return this._provider.call(this._providerContext, path, options, callback);
7878
7882
  }
7879
- if (typeof path !== "string") {
7880
- callback(new TypeError("path must be a string"));
7881
- return;
7882
- }
7883
7883
  let callbacks = this._activeAsyncOperations.get(path);
7884
7884
  if (callbacks) {
7885
7885
  callbacks.push(callback);
@@ -7929,68 +7929,70 @@ var require_CachedInputFileSystem = __commonJS({
7929
7929
  callback = options;
7930
7930
  options = void 0;
7931
7931
  }
7932
- if (typeof path !== "string") {
7933
- callback(new TypeError("path must be a string"));
7932
+ if (typeof path !== "string" && !Buffer.isBuffer(path) && !(path instanceof URL) && typeof path !== "number") {
7933
+ callback(new TypeError("path must be a string, Buffer, URL or number"));
7934
7934
  return;
7935
7935
  }
7936
+ const strPath = typeof path !== "string" ? path.toString() : path;
7936
7937
  if (options) {
7937
7938
  return this._provider.call(this._providerContext, path, options, callback);
7938
7939
  }
7939
7940
  if (this._mode === STORAGE_MODE_SYNC) {
7940
7941
  this._enterAsyncMode();
7941
7942
  }
7942
- let cacheEntry = this._data.get(path);
7943
+ let cacheEntry = this._data.get(strPath);
7943
7944
  if (cacheEntry !== void 0) {
7944
7945
  if (cacheEntry.err)
7945
7946
  return nextTick(callback, cacheEntry.err);
7946
7947
  return nextTick(callback, null, cacheEntry.result);
7947
7948
  }
7948
- let callbacks = this._activeAsyncOperations.get(path);
7949
+ let callbacks = this._activeAsyncOperations.get(strPath);
7949
7950
  if (callbacks !== void 0) {
7950
7951
  callbacks.push(callback);
7951
7952
  return;
7952
7953
  }
7953
- this._activeAsyncOperations.set(path, callbacks = [callback]);
7954
+ this._activeAsyncOperations.set(strPath, callbacks = [callback]);
7954
7955
  this._provider.call(this._providerContext, path, (err, result) => {
7955
- this._activeAsyncOperations.delete(path);
7956
- this._storeResult(path, err, result);
7956
+ this._activeAsyncOperations.delete(strPath);
7957
+ this._storeResult(strPath, err, result);
7957
7958
  this._enterAsyncMode();
7958
7959
  runCallbacks(callbacks, err, result);
7959
7960
  });
7960
7961
  }
7961
7962
  provideSync(path, options) {
7962
- if (typeof path !== "string") {
7963
+ if (typeof path !== "string" && !Buffer.isBuffer(path) && !(path instanceof URL) && typeof path !== "number") {
7963
7964
  throw new TypeError("path must be a string");
7964
7965
  }
7966
+ const strPath = typeof path !== "string" ? path.toString() : path;
7965
7967
  if (options) {
7966
7968
  return this._syncProvider.call(this._providerContext, path, options);
7967
7969
  }
7968
7970
  if (this._mode === STORAGE_MODE_SYNC) {
7969
7971
  this._runDecays();
7970
7972
  }
7971
- let cacheEntry = this._data.get(path);
7973
+ let cacheEntry = this._data.get(strPath);
7972
7974
  if (cacheEntry !== void 0) {
7973
7975
  if (cacheEntry.err)
7974
7976
  throw cacheEntry.err;
7975
7977
  return cacheEntry.result;
7976
7978
  }
7977
- const callbacks = this._activeAsyncOperations.get(path);
7978
- this._activeAsyncOperations.delete(path);
7979
+ const callbacks = this._activeAsyncOperations.get(strPath);
7980
+ this._activeAsyncOperations.delete(strPath);
7979
7981
  let result;
7980
7982
  try {
7981
7983
  result = this._syncProvider.call(this._providerContext, path);
7982
7984
  } catch (err) {
7983
- this._storeResult(path, err, void 0);
7985
+ this._storeResult(strPath, err, void 0);
7984
7986
  this._enterSyncModeWhenIdle();
7985
7987
  if (callbacks) {
7986
7988
  runCallbacks(callbacks, err, void 0);
7987
7989
  }
7988
7990
  throw err;
7989
7991
  }
7990
- this._storeResult(path, void 0, result);
7992
+ this._storeResult(strPath, null, result);
7991
7993
  this._enterSyncModeWhenIdle();
7992
7994
  if (callbacks) {
7993
- runCallbacks(callbacks, void 0, result);
7995
+ runCallbacks(callbacks, null, result);
7994
7996
  }
7995
7997
  return result;
7996
7998
  }
@@ -8003,9 +8005,10 @@ var require_CachedInputFileSystem = __commonJS({
8003
8005
  }
8004
8006
  this._enterIdleMode();
8005
8007
  }
8006
- } else if (typeof what === "string") {
8008
+ } else if (typeof what === "string" || Buffer.isBuffer(what) || what instanceof URL || typeof what === "number") {
8009
+ const strWhat = typeof what !== "string" ? what.toString() : what;
8007
8010
  for (let [key, data] of this._data) {
8008
- if (key.startsWith(what)) {
8011
+ if (key.startsWith(strWhat)) {
8009
8012
  this._data.delete(key);
8010
8013
  data.level.delete(key);
8011
8014
  }
@@ -8016,7 +8019,8 @@ var require_CachedInputFileSystem = __commonJS({
8016
8019
  } else {
8017
8020
  for (let [key, data] of this._data) {
8018
8021
  for (const item of what) {
8019
- if (key.startsWith(item)) {
8022
+ const strItem = typeof item !== "string" ? item.toString() : item;
8023
+ if (key.startsWith(strItem)) {
8020
8024
  this._data.delete(key);
8021
8025
  data.level.delete(key);
8022
8026
  break;
@@ -8031,12 +8035,14 @@ var require_CachedInputFileSystem = __commonJS({
8031
8035
  purgeParent(what) {
8032
8036
  if (!what) {
8033
8037
  this.purge();
8034
- } else if (typeof what === "string") {
8035
- this.purge(dirname(what));
8038
+ } else if (typeof what === "string" || Buffer.isBuffer(what) || what instanceof URL || typeof what === "number") {
8039
+ const strWhat = typeof what !== "string" ? what.toString() : what;
8040
+ this.purge(dirname(strWhat));
8036
8041
  } else {
8037
8042
  const set = new Set();
8038
8043
  for (const item of what) {
8039
- set.add(dirname(item));
8044
+ const strItem = typeof item !== "string" ? item.toString() : item;
8045
+ set.add(dirname(strItem));
8040
8046
  }
8041
8047
  this.purge(set);
8042
8048
  }
@@ -8162,6 +8168,11 @@ var require_CachedInputFileSystem = __commonJS({
8162
8168
  this.readlink = readlink;
8163
8169
  const readlinkSync = this._readlinkBackend.provideSync;
8164
8170
  this.readlinkSync = readlinkSync;
8171
+ this._realpathBackend = createBackend(duration, this.fileSystem.realpath, this.fileSystem.realpathSync, this.fileSystem);
8172
+ const realpath = this._realpathBackend.provide;
8173
+ this.realpath = realpath;
8174
+ const realpathSync = this._realpathBackend.provideSync;
8175
+ this.realpathSync = realpathSync;
8165
8176
  }
8166
8177
  purge(what) {
8167
8178
  this._statBackend.purge(what);
@@ -8170,6 +8181,7 @@ var require_CachedInputFileSystem = __commonJS({
8170
8181
  this._readFileBackend.purge(what);
8171
8182
  this._readlinkBackend.purge(what);
8172
8183
  this._readJsonBackend.purge(what);
8184
+ this._realpathBackend.purge(what);
8173
8185
  }
8174
8186
  };
8175
8187
  }
@@ -9421,6 +9433,10 @@ var require_path = __commonJS({
9421
9433
  Internal: 5
9422
9434
  });
9423
9435
  exports.PathType = PathType;
9436
+ var invalidSegmentRegEx = /(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))?(\\|\/|$)/i;
9437
+ exports.invalidSegmentRegEx = invalidSegmentRegEx;
9438
+ var deprecatedInvalidSegmentRegEx = /(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))(\\|\/|$)/i;
9439
+ exports.deprecatedInvalidSegmentRegEx = deprecatedInvalidSegmentRegEx;
9424
9440
  var getType = (p) => {
9425
9441
  switch (p.length) {
9426
9442
  case 0:
@@ -9553,30 +9569,6 @@ var require_path = __commonJS({
9553
9569
  return cacheEntry;
9554
9570
  };
9555
9571
  exports.cachedJoin = cachedJoin;
9556
- var checkImportsExportsFieldTarget = (relativePath) => {
9557
- let lastNonSlashIndex = 0;
9558
- let slashIndex = relativePath.indexOf("/", 1);
9559
- let cd = 0;
9560
- while (slashIndex !== -1) {
9561
- const folder = relativePath.slice(lastNonSlashIndex, slashIndex);
9562
- switch (folder) {
9563
- case "..": {
9564
- cd--;
9565
- if (cd < 0)
9566
- return new Error(`Trying to access out of package scope. Requesting ${relativePath}`);
9567
- break;
9568
- }
9569
- case ".":
9570
- break;
9571
- default:
9572
- cd++;
9573
- break;
9574
- }
9575
- lastNonSlashIndex = slashIndex + 1;
9576
- slashIndex = relativePath.indexOf("/", lastNonSlashIndex);
9577
- }
9578
- };
9579
- exports.checkImportsExportsFieldTarget = checkImportsExportsFieldTarget;
9580
9572
  }
9581
9573
  });
9582
9574
 
@@ -9780,7 +9772,8 @@ var require_Resolver = __commonJS({
9780
9772
  }
9781
9773
  newStack.add(stackEntry);
9782
9774
  } else {
9783
- newStack = new Set([stackEntry]);
9775
+ newStack = new Set();
9776
+ newStack.add(stackEntry);
9784
9777
  }
9785
9778
  this.hooks.resolveStep.call(hook, request);
9786
9779
  if (hook.isUsed()) {
@@ -9860,7 +9853,7 @@ var require_SyncAsyncFileSystemDecorator = __commonJS({
9860
9853
  this.lstat = (arg, options, callback) => {
9861
9854
  let result;
9862
9855
  try {
9863
- result = lstatSync.call(fs2, arg);
9856
+ result = callback ? lstatSync.call(fs2, arg, options) : lstatSync.call(fs2, arg);
9864
9857
  } catch (e) {
9865
9858
  return (callback || options)(e);
9866
9859
  }
@@ -9881,7 +9874,7 @@ var require_SyncAsyncFileSystemDecorator = __commonJS({
9881
9874
  this.readdir = (arg, options, callback) => {
9882
9875
  let result;
9883
9876
  try {
9884
- result = fs2.readdirSync(arg);
9877
+ result = callback ? fs2.readdirSync(arg, options) : fs2.readdirSync(arg);
9885
9878
  } catch (e) {
9886
9879
  return (callback || options)(e);
9887
9880
  }
@@ -9891,7 +9884,7 @@ var require_SyncAsyncFileSystemDecorator = __commonJS({
9891
9884
  this.readFile = (arg, options, callback) => {
9892
9885
  let result;
9893
9886
  try {
9894
- result = fs2.readFileSync(arg);
9887
+ result = callback ? fs2.readFileSync(arg, options) : fs2.readFileSync(arg);
9895
9888
  } catch (e) {
9896
9889
  return (callback || options)(e);
9897
9890
  }
@@ -9901,7 +9894,7 @@ var require_SyncAsyncFileSystemDecorator = __commonJS({
9901
9894
  this.readlink = (arg, options, callback) => {
9902
9895
  let result;
9903
9896
  try {
9904
- result = fs2.readlinkSync(arg);
9897
+ result = callback ? fs2.readlinkSync(arg, options) : fs2.readlinkSync(arg);
9905
9898
  } catch (e) {
9906
9899
  return (callback || options)(e);
9907
9900
  }
@@ -9912,16 +9905,31 @@ var require_SyncAsyncFileSystemDecorator = __commonJS({
9912
9905
  this.readJsonSync = void 0;
9913
9906
  const readJsonSync = fs2.readJsonSync;
9914
9907
  if (readJsonSync) {
9915
- this.readJson = (arg, options, callback) => {
9908
+ this.readJson = (arg, callback) => {
9916
9909
  let result;
9917
9910
  try {
9918
9911
  result = readJsonSync.call(fs2, arg);
9912
+ } catch (e) {
9913
+ return callback(e);
9914
+ }
9915
+ callback(null, result);
9916
+ };
9917
+ this.readJsonSync = (arg) => readJsonSync.call(fs2, arg);
9918
+ }
9919
+ this.realpath = void 0;
9920
+ this.realpathSync = void 0;
9921
+ const realpathSync = fs2.realpathSync;
9922
+ if (realpathSync) {
9923
+ this.realpath = (arg, options, callback) => {
9924
+ let result;
9925
+ try {
9926
+ result = callback ? realpathSync.call(fs2, arg, options) : realpathSync.call(fs2, arg);
9919
9927
  } catch (e) {
9920
9928
  return (callback || options)(e);
9921
9929
  }
9922
9930
  (callback || options)(null, result);
9923
9931
  };
9924
- this.readJsonSync = (arg, options) => readJsonSync.call(fs2, arg, options);
9932
+ this.realpathSync = (arg, options) => realpathSync.call(fs2, arg, options);
9925
9933
  }
9926
9934
  }
9927
9935
  module2.exports = SyncAsyncFileSystemDecorator;
@@ -9940,7 +9948,7 @@ var require_forEachBail = __commonJS({
9940
9948
  let loop = void 0;
9941
9949
  iterator(array[i++], (err, result) => {
9942
9950
  if (err || result !== void 0 || i >= array.length) {
9943
- return callback(err, result);
9951
+ return callback(err, result, i);
9944
9952
  }
9945
9953
  if (loop === false)
9946
9954
  while (next())
@@ -10406,6 +10414,7 @@ var require_DirectoryExistsPlugin = __commonJS({
10406
10414
  var require_entrypoints = __commonJS({
10407
10415
  "../../../node_modules/enhanced-resolve/lib/util/entrypoints.js"(exports, module2) {
10408
10416
  "use strict";
10417
+ var { parseIdentifier } = require_identifier();
10409
10418
  var slashCode = "/".charCodeAt(0);
10410
10419
  var dotCode = ".".charCodeAt(0);
10411
10420
  var hashCode = "#".charCodeAt(0);
@@ -10414,24 +10423,27 @@ var require_entrypoints = __commonJS({
10414
10423
  return createFieldProcessor(buildExportsField(exportsField), (request) => request.length === 0 ? "." : "./" + request, assertExportsFieldRequest, assertExportTarget);
10415
10424
  };
10416
10425
  module2.exports.processImportsField = function processImportsField(importsField) {
10417
- return createFieldProcessor(buildImportsField(importsField), (request) => "#" + request, assertImportsFieldRequest, assertImportTarget);
10426
+ return createFieldProcessor(importsField, (request) => "#" + request, assertImportsFieldRequest, assertImportTarget);
10418
10427
  };
10419
10428
  function createFieldProcessor(field, normalizeRequest, assertRequest, assertTarget) {
10420
10429
  return function fieldProcessor(request, conditionNames) {
10421
10430
  request = assertRequest(request);
10422
10431
  const match = findMatch(normalizeRequest(request), field);
10423
10432
  if (match === null)
10424
- return [];
10425
- const [mapping, remainingRequest, isSubpathMapping, isPattern] = match;
10433
+ return [[], null];
10434
+ const [mapping, remainingRequest, isSubpathMapping, isPattern, usedField] = match;
10426
10435
  let direct = null;
10427
10436
  if (isConditionalMapping(mapping)) {
10428
10437
  direct = conditionalMapping(mapping, conditionNames);
10429
10438
  if (direct === null)
10430
- return [];
10439
+ return [[], null];
10431
10440
  } else {
10432
10441
  direct = mapping;
10433
10442
  }
10434
- return directMapping(remainingRequest, isPattern, isSubpathMapping, direct, conditionNames, assertTarget);
10443
+ return [
10444
+ directMapping(remainingRequest, isPattern, isSubpathMapping, direct, conditionNames, assertTarget),
10445
+ usedField
10446
+ ];
10435
10447
  };
10436
10448
  }
10437
10449
  function assertExportsFieldRequest(request) {
@@ -10464,16 +10476,23 @@ var require_entrypoints = __commonJS({
10464
10476
  return request.slice(1);
10465
10477
  }
10466
10478
  function assertExportTarget(exp, expectFolder) {
10467
- if (exp.charCodeAt(0) === slashCode || exp.charCodeAt(0) === dotCode && exp.charCodeAt(1) !== slashCode) {
10468
- throw new Error(`Export should be relative path and start with "./", got ${JSON.stringify(exp)}.`);
10479
+ const parsedIdentifier = parseIdentifier(exp);
10480
+ if (!parsedIdentifier) {
10481
+ return;
10469
10482
  }
10470
- const isFolder = exp.charCodeAt(exp.length - 1) === slashCode;
10483
+ const [relativePath] = parsedIdentifier;
10484
+ const isFolder = relativePath.charCodeAt(relativePath.length - 1) === slashCode;
10471
10485
  if (isFolder !== expectFolder) {
10472
10486
  throw new Error(expectFolder ? `Expecting folder to folder mapping. ${JSON.stringify(exp)} should end with "/"` : `Expecting file to file mapping. ${JSON.stringify(exp)} should not end with "/"`);
10473
10487
  }
10474
10488
  }
10475
10489
  function assertImportTarget(imp, expectFolder) {
10476
- const isFolder = imp.charCodeAt(imp.length - 1) === slashCode;
10490
+ const parsedIdentifier = parseIdentifier(imp);
10491
+ if (!parsedIdentifier) {
10492
+ return;
10493
+ }
10494
+ const [relativePath] = parsedIdentifier;
10495
+ const isFolder = relativePath.charCodeAt(relativePath.length - 1) === slashCode;
10477
10496
  if (isFolder !== expectFolder) {
10478
10497
  throw new Error(expectFolder ? `Expecting folder to folder mapping. ${JSON.stringify(imp)} should end with "/"` : `Expecting file to file mapping. ${JSON.stringify(imp)} should not end with "/"`);
10479
10498
  }
@@ -10500,7 +10519,7 @@ var require_entrypoints = __commonJS({
10500
10519
  function findMatch(request, field) {
10501
10520
  if (Object.prototype.hasOwnProperty.call(field, request) && !request.includes("*") && !request.endsWith("/")) {
10502
10521
  const target2 = field[request];
10503
- return [target2, "", false, false];
10522
+ return [target2, "", false, false, request];
10504
10523
  }
10505
10524
  let bestMatch = "";
10506
10525
  let bestMatchSubpath;
@@ -10528,7 +10547,8 @@ var require_entrypoints = __commonJS({
10528
10547
  target,
10529
10548
  bestMatchSubpath,
10530
10549
  isSubpathMapping,
10531
- isPattern
10550
+ isPattern,
10551
+ bestMatch
10532
10552
  ];
10533
10553
  }
10534
10554
  function isConditionalMapping(mapping) {
@@ -10579,14 +10599,9 @@ var require_entrypoints = __commonJS({
10579
10599
  loop:
10580
10600
  while (lookup.length > 0) {
10581
10601
  const [mapping, conditions, j] = lookup[lookup.length - 1];
10582
- const last = conditions.length - 1;
10583
10602
  for (let i = j; i < conditions.length; i++) {
10584
10603
  const condition = conditions[i];
10585
- if (i !== last) {
10586
- if (condition === "default") {
10587
- throw new Error("Default condition should be last one");
10588
- }
10589
- } else if (condition === "default") {
10604
+ if (condition === "default") {
10590
10605
  const innerMapping = mapping[condition];
10591
10606
  if (isConditionalMapping(innerMapping)) {
10592
10607
  const conditionalMapping2 = innerMapping;
@@ -10640,22 +10655,6 @@ var require_entrypoints = __commonJS({
10640
10655
  }
10641
10656
  return field;
10642
10657
  }
10643
- function buildImportsField(field) {
10644
- const keys = Object.keys(field);
10645
- for (let i = 0; i < keys.length; i++) {
10646
- const key = keys[i];
10647
- if (key.charCodeAt(0) !== hashCode) {
10648
- throw new Error(`Imports field key should start with "#" (key: ${JSON.stringify(key)})`);
10649
- }
10650
- if (key.length === 1) {
10651
- throw new Error(`Imports field key should have at least 2 characters (key: ${JSON.stringify(key)})`);
10652
- }
10653
- if (key.charCodeAt(1) === slashCode) {
10654
- throw new Error(`Imports field key should not start with "#/" (key: ${JSON.stringify(key)})`);
10655
- }
10656
- }
10657
- return field;
10658
- }
10659
10658
  }
10660
10659
  });
10661
10660
 
@@ -10663,12 +10662,14 @@ var require_entrypoints = __commonJS({
10663
10662
  var require_ExportsFieldPlugin = __commonJS({
10664
10663
  "../../../node_modules/enhanced-resolve/lib/ExportsFieldPlugin.js"(exports, module2) {
10665
10664
  "use strict";
10666
- var path = require("path");
10667
10665
  var DescriptionFileUtils = require_DescriptionFileUtils();
10668
10666
  var forEachBail = require_forEachBail();
10669
10667
  var { processExportsField } = require_entrypoints();
10670
10668
  var { parseIdentifier } = require_identifier();
10671
- var { checkImportsExportsFieldTarget } = require_path();
10669
+ var {
10670
+ invalidSegmentRegEx,
10671
+ deprecatedInvalidSegmentRegEx
10672
+ } = require_path();
10672
10673
  module2.exports = class ExportsFieldPlugin {
10673
10674
  constructor(source, conditionNames, fieldNamePath, target) {
10674
10675
  this.source = source;
@@ -10692,13 +10693,14 @@ var require_ExportsFieldPlugin = __commonJS({
10692
10693
  return callback(new Error(`Resolving to directories is not possible with the exports field (request was ${remainingRequest}/)`));
10693
10694
  }
10694
10695
  let paths;
10696
+ let usedField;
10695
10697
  try {
10696
10698
  let fieldProcessor = this.fieldProcessorCache.get(request.descriptionFileData);
10697
10699
  if (fieldProcessor === void 0) {
10698
10700
  fieldProcessor = processExportsField(exportsField);
10699
10701
  this.fieldProcessorCache.set(request.descriptionFileData, fieldProcessor);
10700
10702
  }
10701
- paths = fieldProcessor(remainingRequest, this.conditionNames);
10703
+ [paths, usedField] = fieldProcessor(remainingRequest, this.conditionNames);
10702
10704
  } catch (err) {
10703
10705
  if (resolveContext.log) {
10704
10706
  resolveContext.log(`Exports field in ${request.descriptionFilePath} can't be processed: ${err}`);
@@ -10708,24 +10710,38 @@ var require_ExportsFieldPlugin = __commonJS({
10708
10710
  if (paths.length === 0) {
10709
10711
  return callback(new Error(`Package path ${remainingRequest} is not exported from package ${request.descriptionFileRoot} (see exports field in ${request.descriptionFilePath})`));
10710
10712
  }
10711
- forEachBail(paths, (p, callback2) => {
10713
+ forEachBail(paths, (p, callback2, i) => {
10712
10714
  const parsedIdentifier = parseIdentifier(p);
10713
10715
  if (!parsedIdentifier)
10714
10716
  return callback2();
10715
10717
  const [relativePath, query, fragment] = parsedIdentifier;
10716
- const error = checkImportsExportsFieldTarget(relativePath);
10717
- if (error) {
10718
- return callback2(error);
10718
+ if (relativePath.length === 0 || !relativePath.startsWith("./")) {
10719
+ if (paths.length === i) {
10720
+ return callback2(new Error(`Invalid "exports" target "${p}" defined for "${usedField}" in the package config ${request.descriptionFilePath}, targets must start with "./"`));
10721
+ }
10722
+ return callback2();
10723
+ }
10724
+ if (invalidSegmentRegEx.exec(relativePath.slice(2)) !== null && deprecatedInvalidSegmentRegEx.test(relativePath.slice(2)) !== null) {
10725
+ if (paths.length === i) {
10726
+ return callback2(new Error(`Invalid "exports" target "${p}" defined for "${usedField}" in the package config ${request.descriptionFilePath}, targets must start with "./"`));
10727
+ }
10728
+ return callback2();
10719
10729
  }
10720
10730
  const obj = {
10721
10731
  ...request,
10722
10732
  request: void 0,
10723
- path: path.join(request.descriptionFileRoot, relativePath),
10733
+ path: resolver.join(request.descriptionFileRoot, relativePath),
10724
10734
  relativePath,
10725
10735
  query,
10726
10736
  fragment
10727
10737
  };
10728
- resolver.doResolve(target, obj, "using exports field: " + p, resolveContext, callback2);
10738
+ resolver.doResolve(target, obj, "using exports field: " + p, resolveContext, (err, result) => {
10739
+ if (err)
10740
+ return callback2(err);
10741
+ if (result === void 0)
10742
+ return callback2(null, null);
10743
+ callback2(null, result);
10744
+ });
10729
10745
  }, (err, result) => callback(err, result || null));
10730
10746
  });
10731
10747
  }
@@ -10837,12 +10853,14 @@ var require_FileExistsPlugin = __commonJS({
10837
10853
  var require_ImportsFieldPlugin = __commonJS({
10838
10854
  "../../../node_modules/enhanced-resolve/lib/ImportsFieldPlugin.js"(exports, module2) {
10839
10855
  "use strict";
10840
- var path = require("path");
10841
10856
  var DescriptionFileUtils = require_DescriptionFileUtils();
10842
10857
  var forEachBail = require_forEachBail();
10843
10858
  var { processImportsField } = require_entrypoints();
10844
10859
  var { parseIdentifier } = require_identifier();
10845
- var { checkImportsExportsFieldTarget } = require_path();
10860
+ var {
10861
+ invalidSegmentRegEx,
10862
+ deprecatedInvalidSegmentRegEx
10863
+ } = require_path();
10846
10864
  var dotCode = ".".charCodeAt(0);
10847
10865
  module2.exports = class ImportsFieldPlugin {
10848
10866
  constructor(source, conditionNames, fieldNamePath, targetFile, targetPackage) {
@@ -10868,13 +10886,14 @@ var require_ImportsFieldPlugin = __commonJS({
10868
10886
  return callback(new Error(`Resolving to directories is not possible with the imports field (request was ${remainingRequest}/)`));
10869
10887
  }
10870
10888
  let paths;
10889
+ let usedField;
10871
10890
  try {
10872
10891
  let fieldProcessor = this.fieldProcessorCache.get(request.descriptionFileData);
10873
10892
  if (fieldProcessor === void 0) {
10874
10893
  fieldProcessor = processImportsField(importsField);
10875
10894
  this.fieldProcessorCache.set(request.descriptionFileData, fieldProcessor);
10876
10895
  }
10877
- paths = fieldProcessor(remainingRequest, this.conditionNames);
10896
+ [paths, usedField] = fieldProcessor(remainingRequest, this.conditionNames);
10878
10897
  } catch (err) {
10879
10898
  if (resolveContext.log) {
10880
10899
  resolveContext.log(`Imports field in ${request.descriptionFilePath} can't be processed: ${err}`);
@@ -10884,26 +10903,34 @@ var require_ImportsFieldPlugin = __commonJS({
10884
10903
  if (paths.length === 0) {
10885
10904
  return callback(new Error(`Package import ${remainingRequest} is not imported from package ${request.descriptionFileRoot} (see imports field in ${request.descriptionFilePath})`));
10886
10905
  }
10887
- forEachBail(paths, (p, callback2) => {
10906
+ forEachBail(paths, (p, callback2, i) => {
10888
10907
  const parsedIdentifier = parseIdentifier(p);
10889
10908
  if (!parsedIdentifier)
10890
10909
  return callback2();
10891
10910
  const [path_, query, fragment] = parsedIdentifier;
10892
- const error = checkImportsExportsFieldTarget(path_);
10893
- if (error) {
10894
- return callback2(error);
10895
- }
10896
10911
  switch (path_.charCodeAt(0)) {
10897
10912
  case dotCode: {
10913
+ if (invalidSegmentRegEx.exec(path_.slice(2)) !== null && deprecatedInvalidSegmentRegEx.test(path_.slice(2)) !== null) {
10914
+ if (paths.length === i) {
10915
+ return callback2(new Error(`Invalid "imports" target "${p}" defined for "${usedField}" in the package config ${request.descriptionFilePath}, targets must start with "./"`));
10916
+ }
10917
+ return callback2();
10918
+ }
10898
10919
  const obj = {
10899
10920
  ...request,
10900
10921
  request: void 0,
10901
- path: path.join(request.descriptionFileRoot, path_),
10922
+ path: resolver.join(request.descriptionFileRoot, path_),
10902
10923
  relativePath: path_,
10903
10924
  query,
10904
10925
  fragment
10905
10926
  };
10906
- resolver.doResolve(targetFile, obj, "using imports field: " + p, resolveContext, callback2);
10927
+ resolver.doResolve(targetFile, obj, "using imports field: " + p, resolveContext, (err, result) => {
10928
+ if (err)
10929
+ return callback2(err);
10930
+ if (result === void 0)
10931
+ return callback2(null, null);
10932
+ callback2(null, result);
10933
+ });
10907
10934
  break;
10908
10935
  }
10909
10936
  default: {
@@ -10915,7 +10942,13 @@ var require_ImportsFieldPlugin = __commonJS({
10915
10942
  query,
10916
10943
  fragment
10917
10944
  };
10918
- resolver.doResolve(targetPackage, obj, "using imports field: " + p, resolveContext, callback2);
10945
+ resolver.doResolve(targetPackage, obj, "using imports field: " + p, resolveContext, (err, result) => {
10946
+ if (err)
10947
+ return callback2(err);
10948
+ if (result === void 0)
10949
+ return callback2(null, null);
10950
+ callback2(null, result);
10951
+ });
10919
10952
  }
10920
10953
  }
10921
10954
  }, (err, result) => callback(err, result || null));
@@ -11220,13 +11253,15 @@ var require_PnpPlugin = __commonJS({
11220
11253
  "../../../node_modules/enhanced-resolve/lib/PnpPlugin.js"(exports, module2) {
11221
11254
  "use strict";
11222
11255
  module2.exports = class PnpPlugin {
11223
- constructor(source, pnpApi, target) {
11256
+ constructor(source, pnpApi, target, alternateTarget) {
11224
11257
  this.source = source;
11225
11258
  this.pnpApi = pnpApi;
11226
11259
  this.target = target;
11260
+ this.alternateTarget = alternateTarget;
11227
11261
  }
11228
11262
  apply(resolver) {
11229
11263
  const target = resolver.ensureHook(this.target);
11264
+ const alternateTarget = resolver.ensureHook(this.alternateTarget);
11230
11265
  resolver.getHook(this.source).tapAsync("PnpPlugin", (request, resolveContext, callback) => {
11231
11266
  const req = request.request;
11232
11267
  if (!req)
@@ -11243,6 +11278,16 @@ var require_PnpPlugin = __commonJS({
11243
11278
  resolution = this.pnpApi.resolveToUnqualified(packageName, issuer, {
11244
11279
  considerBuiltins: false
11245
11280
  });
11281
+ if (resolution === null) {
11282
+ resolver.doResolve(alternateTarget, request, "issuer is not managed by a pnpapi", resolveContext, (err, result) => {
11283
+ if (err)
11284
+ return callback(err);
11285
+ if (result)
11286
+ return callback(null, result);
11287
+ return callback(null, null);
11288
+ });
11289
+ return;
11290
+ }
11246
11291
  if (resolveContext.fileDependencies) {
11247
11292
  apiResolution = this.pnpApi.resolveToUnqualified("pnpapi", issuer, {
11248
11293
  considerBuiltins: false
@@ -11651,7 +11696,18 @@ var require_ResolverFactory = __commonJS({
11651
11696
  var UseFilePlugin = require_UseFilePlugin();
11652
11697
  function processPnpApiOption(option) {
11653
11698
  if (option === void 0 && versions.pnp) {
11654
- return require("pnpapi");
11699
+ const _findPnpApi = require("module").findPnpApi;
11700
+ if (_findPnpApi) {
11701
+ return {
11702
+ resolveToUnqualified(request, issuer, opts) {
11703
+ const pnpapi = _findPnpApi(issuer);
11704
+ if (!pnpapi) {
11705
+ return null;
11706
+ }
11707
+ return pnpapi.resolveToUnqualified(request, issuer, opts);
11708
+ }
11709
+ };
11710
+ }
11655
11711
  }
11656
11712
  return option || null;
11657
11713
  }
@@ -11766,6 +11822,7 @@ var require_ResolverFactory = __commonJS({
11766
11822
  resolver.ensureHook("normalResolve");
11767
11823
  resolver.ensureHook("internal");
11768
11824
  resolver.ensureHook("rawModule");
11825
+ resolver.ensureHook("alternateRawModule");
11769
11826
  resolver.ensureHook("module");
11770
11827
  resolver.ensureHook("resolveAsModule");
11771
11828
  resolver.ensureHook("undescribedResolveInPackage");
@@ -11832,7 +11889,8 @@ var require_ResolverFactory = __commonJS({
11832
11889
  if (Array.isArray(item)) {
11833
11890
  if (item.includes("node_modules") && pnpApi) {
11834
11891
  plugins.push(new ModulesInHierarchicalDirectoriesPlugin("raw-module", item.filter((i) => i !== "node_modules"), "module"));
11835
- plugins.push(new PnpPlugin("raw-module", pnpApi, "undescribed-resolve-in-package"));
11892
+ plugins.push(new PnpPlugin("raw-module", pnpApi, "undescribed-resolve-in-package", "alternate-raw-module"));
11893
+ plugins.push(new ModulesInHierarchicalDirectoriesPlugin("alternate-raw-module", ["node_modules"], "module"));
11836
11894
  } else {
11837
11895
  plugins.push(new ModulesInHierarchicalDirectoriesPlugin("raw-module", item, "module"));
11838
11896
  }
@@ -37094,9 +37152,9 @@ var require_safer = __commonJS({
37094
37152
  }
37095
37153
  });
37096
37154
 
37097
- // ../../../node_modules/iconv-lite/lib/bom-handling.js
37155
+ // ../../../node_modules/external-editor/node_modules/iconv-lite/lib/bom-handling.js
37098
37156
  var require_bom_handling = __commonJS({
37099
- "../../../node_modules/iconv-lite/lib/bom-handling.js"(exports) {
37157
+ "../../../node_modules/external-editor/node_modules/iconv-lite/lib/bom-handling.js"(exports) {
37100
37158
  "use strict";
37101
37159
  var BOMChar = "\uFEFF";
37102
37160
  exports.PrependBOM = PrependBOMWrapper;
@@ -37138,9 +37196,9 @@ var require_bom_handling = __commonJS({
37138
37196
  }
37139
37197
  });
37140
37198
 
37141
- // ../../../node_modules/iconv-lite/encodings/internal.js
37199
+ // ../../../node_modules/external-editor/node_modules/iconv-lite/encodings/internal.js
37142
37200
  var require_internal = __commonJS({
37143
- "../../../node_modules/iconv-lite/encodings/internal.js"(exports, module2) {
37201
+ "../../../node_modules/external-editor/node_modules/iconv-lite/encodings/internal.js"(exports, module2) {
37144
37202
  "use strict";
37145
37203
  var Buffer2 = require_safer().Buffer;
37146
37204
  module2.exports = {
@@ -37280,9 +37338,9 @@ var require_internal = __commonJS({
37280
37338
  }
37281
37339
  });
37282
37340
 
37283
- // ../../../node_modules/iconv-lite/encodings/utf16.js
37341
+ // ../../../node_modules/external-editor/node_modules/iconv-lite/encodings/utf16.js
37284
37342
  var require_utf16 = __commonJS({
37285
- "../../../node_modules/iconv-lite/encodings/utf16.js"(exports) {
37343
+ "../../../node_modules/external-editor/node_modules/iconv-lite/encodings/utf16.js"(exports) {
37286
37344
  "use strict";
37287
37345
  var Buffer2 = require_safer().Buffer;
37288
37346
  exports.utf16be = Utf16BECodec;
@@ -37398,9 +37456,9 @@ var require_utf16 = __commonJS({
37398
37456
  }
37399
37457
  });
37400
37458
 
37401
- // ../../../node_modules/iconv-lite/encodings/utf7.js
37459
+ // ../../../node_modules/external-editor/node_modules/iconv-lite/encodings/utf7.js
37402
37460
  var require_utf7 = __commonJS({
37403
- "../../../node_modules/iconv-lite/encodings/utf7.js"(exports) {
37461
+ "../../../node_modules/external-editor/node_modules/iconv-lite/encodings/utf7.js"(exports) {
37404
37462
  "use strict";
37405
37463
  var Buffer2 = require_safer().Buffer;
37406
37464
  exports.utf7 = Utf7Codec;
@@ -37599,9 +37657,9 @@ var require_utf7 = __commonJS({
37599
37657
  }
37600
37658
  });
37601
37659
 
37602
- // ../../../node_modules/iconv-lite/encodings/sbcs-codec.js
37660
+ // ../../../node_modules/external-editor/node_modules/iconv-lite/encodings/sbcs-codec.js
37603
37661
  var require_sbcs_codec = __commonJS({
37604
- "../../../node_modules/iconv-lite/encodings/sbcs-codec.js"(exports) {
37662
+ "../../../node_modules/external-editor/node_modules/iconv-lite/encodings/sbcs-codec.js"(exports) {
37605
37663
  "use strict";
37606
37664
  var Buffer2 = require_safer().Buffer;
37607
37665
  exports._sbcs = SBCSCodec;
@@ -37655,9 +37713,9 @@ var require_sbcs_codec = __commonJS({
37655
37713
  }
37656
37714
  });
37657
37715
 
37658
- // ../../../node_modules/iconv-lite/encodings/sbcs-data.js
37716
+ // ../../../node_modules/external-editor/node_modules/iconv-lite/encodings/sbcs-data.js
37659
37717
  var require_sbcs_data = __commonJS({
37660
- "../../../node_modules/iconv-lite/encodings/sbcs-data.js"(exports, module2) {
37718
+ "../../../node_modules/external-editor/node_modules/iconv-lite/encodings/sbcs-data.js"(exports, module2) {
37661
37719
  "use strict";
37662
37720
  module2.exports = {
37663
37721
  "10029": "maccenteuro",
@@ -37802,9 +37860,9 @@ var require_sbcs_data = __commonJS({
37802
37860
  }
37803
37861
  });
37804
37862
 
37805
- // ../../../node_modules/iconv-lite/encodings/sbcs-data-generated.js
37863
+ // ../../../node_modules/external-editor/node_modules/iconv-lite/encodings/sbcs-data-generated.js
37806
37864
  var require_sbcs_data_generated = __commonJS({
37807
- "../../../node_modules/iconv-lite/encodings/sbcs-data-generated.js"(exports, module2) {
37865
+ "../../../node_modules/external-editor/node_modules/iconv-lite/encodings/sbcs-data-generated.js"(exports, module2) {
37808
37866
  "use strict";
37809
37867
  module2.exports = {
37810
37868
  "437": "cp437",
@@ -38257,9 +38315,9 @@ var require_sbcs_data_generated = __commonJS({
38257
38315
  }
38258
38316
  });
38259
38317
 
38260
- // ../../../node_modules/iconv-lite/encodings/dbcs-codec.js
38318
+ // ../../../node_modules/external-editor/node_modules/iconv-lite/encodings/dbcs-codec.js
38261
38319
  var require_dbcs_codec = __commonJS({
38262
- "../../../node_modules/iconv-lite/encodings/dbcs-codec.js"(exports) {
38320
+ "../../../node_modules/external-editor/node_modules/iconv-lite/encodings/dbcs-codec.js"(exports) {
38263
38321
  "use strict";
38264
38322
  var Buffer2 = require_safer().Buffer;
38265
38323
  exports._dbcs = DBCSCodec;
@@ -38642,9 +38700,9 @@ var require_dbcs_codec = __commonJS({
38642
38700
  }
38643
38701
  });
38644
38702
 
38645
- // ../../../node_modules/iconv-lite/encodings/tables/shiftjis.json
38703
+ // ../../../node_modules/external-editor/node_modules/iconv-lite/encodings/tables/shiftjis.json
38646
38704
  var require_shiftjis = __commonJS({
38647
- "../../../node_modules/iconv-lite/encodings/tables/shiftjis.json"(exports, module2) {
38705
+ "../../../node_modules/external-editor/node_modules/iconv-lite/encodings/tables/shiftjis.json"(exports, module2) {
38648
38706
  module2.exports = [
38649
38707
  ["0", "\0", 128],
38650
38708
  ["a1", "\uFF61", 62],
@@ -38773,9 +38831,9 @@ var require_shiftjis = __commonJS({
38773
38831
  }
38774
38832
  });
38775
38833
 
38776
- // ../../../node_modules/iconv-lite/encodings/tables/eucjp.json
38834
+ // ../../../node_modules/external-editor/node_modules/iconv-lite/encodings/tables/eucjp.json
38777
38835
  var require_eucjp = __commonJS({
38778
- "../../../node_modules/iconv-lite/encodings/tables/eucjp.json"(exports, module2) {
38836
+ "../../../node_modules/external-editor/node_modules/iconv-lite/encodings/tables/eucjp.json"(exports, module2) {
38779
38837
  module2.exports = [
38780
38838
  ["0", "\0", 127],
38781
38839
  ["8ea1", "\uFF61", 62],
@@ -38961,9 +39019,9 @@ var require_eucjp = __commonJS({
38961
39019
  }
38962
39020
  });
38963
39021
 
38964
- // ../../../node_modules/iconv-lite/encodings/tables/cp936.json
39022
+ // ../../../node_modules/external-editor/node_modules/iconv-lite/encodings/tables/cp936.json
38965
39023
  var require_cp936 = __commonJS({
38966
- "../../../node_modules/iconv-lite/encodings/tables/cp936.json"(exports, module2) {
39024
+ "../../../node_modules/external-editor/node_modules/iconv-lite/encodings/tables/cp936.json"(exports, module2) {
38967
39025
  module2.exports = [
38968
39026
  ["0", "\0", 127, "\u20AC"],
38969
39027
  ["8140", "\u4E02\u4E04\u4E05\u4E06\u4E0F\u4E12\u4E17\u4E1F\u4E20\u4E21\u4E23\u4E26\u4E29\u4E2E\u4E2F\u4E31\u4E33\u4E35\u4E37\u4E3C\u4E40\u4E41\u4E42\u4E44\u4E46\u4E4A\u4E51\u4E55\u4E57\u4E5A\u4E5B\u4E62\u4E63\u4E64\u4E65\u4E67\u4E68\u4E6A", 5, "\u4E72\u4E74", 9, "\u4E7F", 6, "\u4E87\u4E8A"],
@@ -39231,9 +39289,9 @@ var require_cp936 = __commonJS({
39231
39289
  }
39232
39290
  });
39233
39291
 
39234
- // ../../../node_modules/iconv-lite/encodings/tables/gbk-added.json
39292
+ // ../../../node_modules/external-editor/node_modules/iconv-lite/encodings/tables/gbk-added.json
39235
39293
  var require_gbk_added = __commonJS({
39236
- "../../../node_modules/iconv-lite/encodings/tables/gbk-added.json"(exports, module2) {
39294
+ "../../../node_modules/external-editor/node_modules/iconv-lite/encodings/tables/gbk-added.json"(exports, module2) {
39237
39295
  module2.exports = [
39238
39296
  ["a140", "\uE4C6", 62],
39239
39297
  ["a180", "\uE505", 32],
@@ -39292,16 +39350,16 @@ var require_gbk_added = __commonJS({
39292
39350
  }
39293
39351
  });
39294
39352
 
39295
- // ../../../node_modules/iconv-lite/encodings/tables/gb18030-ranges.json
39353
+ // ../../../node_modules/external-editor/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json
39296
39354
  var require_gb18030_ranges = __commonJS({
39297
- "../../../node_modules/iconv-lite/encodings/tables/gb18030-ranges.json"(exports, module2) {
39355
+ "../../../node_modules/external-editor/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json"(exports, module2) {
39298
39356
  module2.exports = { uChars: [128, 165, 169, 178, 184, 216, 226, 235, 238, 244, 248, 251, 253, 258, 276, 284, 300, 325, 329, 334, 364, 463, 465, 467, 469, 471, 473, 475, 477, 506, 594, 610, 712, 716, 730, 930, 938, 962, 970, 1026, 1104, 1106, 8209, 8215, 8218, 8222, 8231, 8241, 8244, 8246, 8252, 8365, 8452, 8454, 8458, 8471, 8482, 8556, 8570, 8596, 8602, 8713, 8720, 8722, 8726, 8731, 8737, 8740, 8742, 8748, 8751, 8760, 8766, 8777, 8781, 8787, 8802, 8808, 8816, 8854, 8858, 8870, 8896, 8979, 9322, 9372, 9548, 9588, 9616, 9622, 9634, 9652, 9662, 9672, 9676, 9680, 9702, 9735, 9738, 9793, 9795, 11906, 11909, 11913, 11917, 11928, 11944, 11947, 11951, 11956, 11960, 11964, 11979, 12284, 12292, 12312, 12319, 12330, 12351, 12436, 12447, 12535, 12543, 12586, 12842, 12850, 12964, 13200, 13215, 13218, 13253, 13263, 13267, 13270, 13384, 13428, 13727, 13839, 13851, 14617, 14703, 14801, 14816, 14964, 15183, 15471, 15585, 16471, 16736, 17208, 17325, 17330, 17374, 17623, 17997, 18018, 18212, 18218, 18301, 18318, 18760, 18811, 18814, 18820, 18823, 18844, 18848, 18872, 19576, 19620, 19738, 19887, 40870, 59244, 59336, 59367, 59413, 59417, 59423, 59431, 59437, 59443, 59452, 59460, 59478, 59493, 63789, 63866, 63894, 63976, 63986, 64016, 64018, 64021, 64025, 64034, 64037, 64042, 65074, 65093, 65107, 65112, 65127, 65132, 65375, 65510, 65536], gbChars: [0, 36, 38, 45, 50, 81, 89, 95, 96, 100, 103, 104, 105, 109, 126, 133, 148, 172, 175, 179, 208, 306, 307, 308, 309, 310, 311, 312, 313, 341, 428, 443, 544, 545, 558, 741, 742, 749, 750, 805, 819, 820, 7922, 7924, 7925, 7927, 7934, 7943, 7944, 7945, 7950, 8062, 8148, 8149, 8152, 8164, 8174, 8236, 8240, 8262, 8264, 8374, 8380, 8381, 8384, 8388, 8390, 8392, 8393, 8394, 8396, 8401, 8406, 8416, 8419, 8424, 8437, 8439, 8445, 8482, 8485, 8496, 8521, 8603, 8936, 8946, 9046, 9050, 9063, 9066, 9076, 9092, 9100, 9108, 9111, 9113, 9131, 9162, 9164, 9218, 9219, 11329, 11331, 11334, 11336, 11346, 11361, 11363, 11366, 11370, 11372, 11375, 11389, 11682, 11686, 11687, 11692, 11694, 11714, 11716, 11723, 11725, 11730, 11736, 11982, 11989, 12102, 12336, 12348, 12350, 12384, 12393, 12395, 12397, 12510, 12553, 12851, 12962, 12973, 13738, 13823, 13919, 13933, 14080, 14298, 14585, 14698, 15583, 15847, 16318, 16434, 16438, 16481, 16729, 17102, 17122, 17315, 17320, 17402, 17418, 17859, 17909, 17911, 17915, 17916, 17936, 17939, 17961, 18664, 18703, 18814, 18962, 19043, 33469, 33470, 33471, 33484, 33485, 33490, 33497, 33501, 33505, 33513, 33520, 33536, 33550, 37845, 37921, 37948, 38029, 38038, 38064, 38065, 38066, 38069, 38075, 38076, 38078, 39108, 39109, 39113, 39114, 39115, 39116, 39265, 39394, 189e3] };
39299
39357
  }
39300
39358
  });
39301
39359
 
39302
- // ../../../node_modules/iconv-lite/encodings/tables/cp949.json
39360
+ // ../../../node_modules/external-editor/node_modules/iconv-lite/encodings/tables/cp949.json
39303
39361
  var require_cp949 = __commonJS({
39304
- "../../../node_modules/iconv-lite/encodings/tables/cp949.json"(exports, module2) {
39362
+ "../../../node_modules/external-editor/node_modules/iconv-lite/encodings/tables/cp949.json"(exports, module2) {
39305
39363
  module2.exports = [
39306
39364
  ["0", "\0", 127],
39307
39365
  ["8141", "\uAC02\uAC03\uAC05\uAC06\uAC0B", 4, "\uAC18\uAC1E\uAC1F\uAC21\uAC22\uAC23\uAC25", 6, "\uAC2E\uAC32\uAC33\uAC34"],
@@ -39578,9 +39636,9 @@ var require_cp949 = __commonJS({
39578
39636
  }
39579
39637
  });
39580
39638
 
39581
- // ../../../node_modules/iconv-lite/encodings/tables/cp950.json
39639
+ // ../../../node_modules/external-editor/node_modules/iconv-lite/encodings/tables/cp950.json
39582
39640
  var require_cp950 = __commonJS({
39583
- "../../../node_modules/iconv-lite/encodings/tables/cp950.json"(exports, module2) {
39641
+ "../../../node_modules/external-editor/node_modules/iconv-lite/encodings/tables/cp950.json"(exports, module2) {
39584
39642
  module2.exports = [
39585
39643
  ["0", "\0", 127],
39586
39644
  ["a140", "\u3000\uFF0C\u3001\u3002\uFF0E\u2027\uFF1B\uFF1A\uFF1F\uFF01\uFE30\u2026\u2025\uFE50\uFE51\uFE52\xB7\uFE54\uFE55\uFE56\uFE57\uFF5C\u2013\uFE31\u2014\uFE33\u2574\uFE34\uFE4F\uFF08\uFF09\uFE35\uFE36\uFF5B\uFF5D\uFE37\uFE38\u3014\u3015\uFE39\uFE3A\u3010\u3011\uFE3B\uFE3C\u300A\u300B\uFE3D\uFE3E\u3008\u3009\uFE3F\uFE40\u300C\u300D\uFE41\uFE42\u300E\u300F\uFE43\uFE44\uFE59\uFE5A"],
@@ -39761,9 +39819,9 @@ var require_cp950 = __commonJS({
39761
39819
  }
39762
39820
  });
39763
39821
 
39764
- // ../../../node_modules/iconv-lite/encodings/tables/big5-added.json
39822
+ // ../../../node_modules/external-editor/node_modules/iconv-lite/encodings/tables/big5-added.json
39765
39823
  var require_big5_added = __commonJS({
39766
- "../../../node_modules/iconv-lite/encodings/tables/big5-added.json"(exports, module2) {
39824
+ "../../../node_modules/external-editor/node_modules/iconv-lite/encodings/tables/big5-added.json"(exports, module2) {
39767
39825
  module2.exports = [
39768
39826
  ["8740", "\u43F0\u4C32\u4603\u45A6\u4578\u{27267}\u4D77\u45B3\u{27CB1}\u4CE2\u{27CC5}\u3B95\u4736\u4744\u4C47\u4C40\u{242BF}\u{23617}\u{27352}\u{26E8B}\u{270D2}\u4C57\u{2A351}\u474F\u45DA\u4C85\u{27C6C}\u4D07\u4AA4\u46A1\u{26B23}\u7225\u{25A54}\u{21A63}\u{23E06}\u{23F61}\u664D\u56FB"],
39769
39827
  ["8767", "\u7D95\u591D\u{28BB9}\u3DF4\u9734\u{27BEF}\u5BDB\u{21D5E}\u5AA4\u3625\u{29EB0}\u5AD1\u5BB7\u5CFC\u676E\u8593\u{29945}\u7461\u749D\u3875\u{21D53}\u{2369E}\u{26021}\u3EEC"],
@@ -39889,9 +39947,9 @@ var require_big5_added = __commonJS({
39889
39947
  }
39890
39948
  });
39891
39949
 
39892
- // ../../../node_modules/iconv-lite/encodings/dbcs-data.js
39950
+ // ../../../node_modules/external-editor/node_modules/iconv-lite/encodings/dbcs-data.js
39893
39951
  var require_dbcs_data = __commonJS({
39894
- "../../../node_modules/iconv-lite/encodings/dbcs-data.js"(exports, module2) {
39952
+ "../../../node_modules/external-editor/node_modules/iconv-lite/encodings/dbcs-data.js"(exports, module2) {
39895
39953
  "use strict";
39896
39954
  module2.exports = {
39897
39955
  "shiftjis": {
@@ -39995,9 +40053,9 @@ var require_dbcs_data = __commonJS({
39995
40053
  }
39996
40054
  });
39997
40055
 
39998
- // ../../../node_modules/iconv-lite/encodings/index.js
40056
+ // ../../../node_modules/external-editor/node_modules/iconv-lite/encodings/index.js
39999
40057
  var require_encodings = __commonJS({
40000
- "../../../node_modules/iconv-lite/encodings/index.js"(exports, module2) {
40058
+ "../../../node_modules/external-editor/node_modules/iconv-lite/encodings/index.js"(exports, module2) {
40001
40059
  "use strict";
40002
40060
  var modules = [
40003
40061
  require_internal(),
@@ -40021,9 +40079,9 @@ var require_encodings = __commonJS({
40021
40079
  }
40022
40080
  });
40023
40081
 
40024
- // ../../../node_modules/iconv-lite/lib/streams.js
40082
+ // ../../../node_modules/external-editor/node_modules/iconv-lite/lib/streams.js
40025
40083
  var require_streams = __commonJS({
40026
- "../../../node_modules/iconv-lite/lib/streams.js"(exports, module2) {
40084
+ "../../../node_modules/external-editor/node_modules/iconv-lite/lib/streams.js"(exports, module2) {
40027
40085
  "use strict";
40028
40086
  var Buffer2 = require("buffer").Buffer;
40029
40087
  var Transform = require("stream").Transform;
@@ -40126,9 +40184,9 @@ var require_streams = __commonJS({
40126
40184
  }
40127
40185
  });
40128
40186
 
40129
- // ../../../node_modules/iconv-lite/lib/extend-node.js
40187
+ // ../../../node_modules/external-editor/node_modules/iconv-lite/lib/extend-node.js
40130
40188
  var require_extend_node = __commonJS({
40131
- "../../../node_modules/iconv-lite/lib/extend-node.js"(exports, module2) {
40189
+ "../../../node_modules/external-editor/node_modules/iconv-lite/lib/extend-node.js"(exports, module2) {
40132
40190
  "use strict";
40133
40191
  var Buffer2 = require("buffer").Buffer;
40134
40192
  module2.exports = function(iconv) {
@@ -40295,9 +40353,9 @@ var require_extend_node = __commonJS({
40295
40353
  }
40296
40354
  });
40297
40355
 
40298
- // ../../../node_modules/iconv-lite/lib/index.js
40356
+ // ../../../node_modules/external-editor/node_modules/iconv-lite/lib/index.js
40299
40357
  var require_lib3 = __commonJS({
40300
- "../../../node_modules/iconv-lite/lib/index.js"(exports, module2) {
40358
+ "../../../node_modules/external-editor/node_modules/iconv-lite/lib/index.js"(exports, module2) {
40301
40359
  "use strict";
40302
40360
  var Buffer2 = require_safer().Buffer;
40303
40361
  var bomHandling = require_bom_handling();
@@ -63127,7 +63185,7 @@ var require_axios = __commonJS({
63127
63185
  var followRedirects = require_follow_redirects();
63128
63186
  var zlib = require("zlib");
63129
63187
  var stream = require("stream");
63130
- var EventEmitter = require("events");
63188
+ var events = require("events");
63131
63189
  function _interopDefaultLegacy(e) {
63132
63190
  return e && typeof e === "object" && "default" in e ? e : { "default": e };
63133
63191
  }
@@ -63139,7 +63197,6 @@ var require_axios = __commonJS({
63139
63197
  var followRedirects__default = /* @__PURE__ */ _interopDefaultLegacy(followRedirects);
63140
63198
  var zlib__default = /* @__PURE__ */ _interopDefaultLegacy(zlib);
63141
63199
  var stream__default = /* @__PURE__ */ _interopDefaultLegacy(stream);
63142
- var EventEmitter__default = /* @__PURE__ */ _interopDefaultLegacy(EventEmitter);
63143
63200
  function bind(fn, thisArg) {
63144
63201
  return function wrap() {
63145
63202
  return fn.apply(thisArg, arguments);
@@ -63193,6 +63250,7 @@ var require_axios = __commonJS({
63193
63250
  return thing && (typeof FormData === "function" && thing instanceof FormData || isFunction(thing.append) && ((kind = kindOf(thing)) === "formdata" || kind === "object" && isFunction(thing.toString) && thing.toString() === "[object FormData]"));
63194
63251
  };
63195
63252
  var isURLSearchParams = kindOfTest("URLSearchParams");
63253
+ var [isReadableStream, isRequest, isResponse, isHeaders] = ["ReadableStream", "Request", "Response", "Headers"].map(kindOfTest);
63196
63254
  var trim = (str) => str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
63197
63255
  function forEach(obj, fn, { allOwnKeys = false } = {}) {
63198
63256
  if (obj === null || typeof obj === "undefined") {
@@ -63399,8 +63457,7 @@ var require_axios = __commonJS({
63399
63457
  var noop = () => {
63400
63458
  };
63401
63459
  var toFiniteNumber = (value, defaultValue) => {
63402
- value = +value;
63403
- return Number.isFinite(value) ? value : defaultValue;
63460
+ return value != null && Number.isFinite(value = +value) ? value : defaultValue;
63404
63461
  };
63405
63462
  var ALPHA = "abcdefghijklmnopqrstuvwxyz";
63406
63463
  var DIGIT = "0123456789";
@@ -63444,7 +63501,24 @@ var require_axios = __commonJS({
63444
63501
  };
63445
63502
  var isAsyncFn = kindOfTest("AsyncFunction");
63446
63503
  var isThenable = (thing) => thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);
63447
- var utils = {
63504
+ var _setImmediate = ((setImmediateSupported, postMessageSupported) => {
63505
+ if (setImmediateSupported) {
63506
+ return setImmediate;
63507
+ }
63508
+ return postMessageSupported ? ((token, callbacks) => {
63509
+ _global.addEventListener("message", ({ source, data }) => {
63510
+ if (source === _global && data === token) {
63511
+ callbacks.length && callbacks.shift()();
63512
+ }
63513
+ }, false);
63514
+ return (cb) => {
63515
+ callbacks.push(cb);
63516
+ _global.postMessage(token, "*");
63517
+ };
63518
+ })(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);
63519
+ })(typeof setImmediate === "function", isFunction(_global.postMessage));
63520
+ var asap = typeof queueMicrotask !== "undefined" ? queueMicrotask.bind(_global) : typeof process !== "undefined" && process.nextTick || _setImmediate;
63521
+ var utils$1 = {
63448
63522
  isArray,
63449
63523
  isArrayBuffer,
63450
63524
  isBuffer,
@@ -63455,6 +63529,10 @@ var require_axios = __commonJS({
63455
63529
  isBoolean,
63456
63530
  isObject,
63457
63531
  isPlainObject,
63532
+ isReadableStream,
63533
+ isRequest,
63534
+ isResponse,
63535
+ isHeaders,
63458
63536
  isUndefined,
63459
63537
  isDate,
63460
63538
  isFile,
@@ -63495,7 +63573,9 @@ var require_axios = __commonJS({
63495
63573
  isSpecCompliantForm,
63496
63574
  toJSONObject,
63497
63575
  isAsyncFn,
63498
- isThenable
63576
+ isThenable,
63577
+ setImmediate: _setImmediate,
63578
+ asap
63499
63579
  };
63500
63580
  function AxiosError(message, code, config, request, response) {
63501
63581
  Error.call(this);
@@ -63509,9 +63589,12 @@ var require_axios = __commonJS({
63509
63589
  code && (this.code = code);
63510
63590
  config && (this.config = config);
63511
63591
  request && (this.request = request);
63512
- response && (this.response = response);
63592
+ if (response) {
63593
+ this.response = response;
63594
+ this.status = response.status ? response.status : null;
63595
+ }
63513
63596
  }
63514
- utils.inherits(AxiosError, Error, {
63597
+ utils$1.inherits(AxiosError, Error, {
63515
63598
  toJSON: function toJSON() {
63516
63599
  return {
63517
63600
  message: this.message,
@@ -63522,9 +63605,9 @@ var require_axios = __commonJS({
63522
63605
  lineNumber: this.lineNumber,
63523
63606
  columnNumber: this.columnNumber,
63524
63607
  stack: this.stack,
63525
- config: utils.toJSONObject(this.config),
63608
+ config: utils$1.toJSONObject(this.config),
63526
63609
  code: this.code,
63527
- status: this.response && this.response.status ? this.response.status : null
63610
+ status: this.status
63528
63611
  };
63529
63612
  }
63530
63613
  });
@@ -63550,7 +63633,7 @@ var require_axios = __commonJS({
63550
63633
  Object.defineProperty(prototype$1, "isAxiosError", { value: true });
63551
63634
  AxiosError.from = (error, code, config, request, response, customProps) => {
63552
63635
  const axiosError = Object.create(prototype$1);
63553
- utils.toFlatObject(error, axiosError, function filter(obj) {
63636
+ utils$1.toFlatObject(error, axiosError, function filter(obj) {
63554
63637
  return obj !== Error.prototype;
63555
63638
  }, (prop) => {
63556
63639
  return prop !== "isAxiosError";
@@ -63562,10 +63645,10 @@ var require_axios = __commonJS({
63562
63645
  return axiosError;
63563
63646
  };
63564
63647
  function isVisitable(thing) {
63565
- return utils.isPlainObject(thing) || utils.isArray(thing);
63648
+ return utils$1.isPlainObject(thing) || utils$1.isArray(thing);
63566
63649
  }
63567
63650
  function removeBrackets(key) {
63568
- return utils.endsWith(key, "[]") ? key.slice(0, -2) : key;
63651
+ return utils$1.endsWith(key, "[]") ? key.slice(0, -2) : key;
63569
63652
  }
63570
63653
  function renderKey(path, key, dots) {
63571
63654
  if (!path)
@@ -63576,42 +63659,42 @@ var require_axios = __commonJS({
63576
63659
  }).join(dots ? "." : "");
63577
63660
  }
63578
63661
  function isFlatArray(arr) {
63579
- return utils.isArray(arr) && !arr.some(isVisitable);
63662
+ return utils$1.isArray(arr) && !arr.some(isVisitable);
63580
63663
  }
63581
- var predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {
63664
+ var predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop) {
63582
63665
  return /^is[A-Z]/.test(prop);
63583
63666
  });
63584
63667
  function toFormData(obj, formData, options) {
63585
- if (!utils.isObject(obj)) {
63668
+ if (!utils$1.isObject(obj)) {
63586
63669
  throw new TypeError("target must be an object");
63587
63670
  }
63588
63671
  formData = formData || new (FormData__default["default"] || FormData)();
63589
- options = utils.toFlatObject(options, {
63672
+ options = utils$1.toFlatObject(options, {
63590
63673
  metaTokens: true,
63591
63674
  dots: false,
63592
63675
  indexes: false
63593
63676
  }, false, function defined(option, source) {
63594
- return !utils.isUndefined(source[option]);
63677
+ return !utils$1.isUndefined(source[option]);
63595
63678
  });
63596
63679
  const metaTokens = options.metaTokens;
63597
63680
  const visitor = options.visitor || defaultVisitor;
63598
63681
  const dots = options.dots;
63599
63682
  const indexes = options.indexes;
63600
63683
  const _Blob = options.Blob || typeof Blob !== "undefined" && Blob;
63601
- const useBlob = _Blob && utils.isSpecCompliantForm(formData);
63602
- if (!utils.isFunction(visitor)) {
63684
+ const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);
63685
+ if (!utils$1.isFunction(visitor)) {
63603
63686
  throw new TypeError("visitor must be a function");
63604
63687
  }
63605
63688
  function convertValue(value) {
63606
63689
  if (value === null)
63607
63690
  return "";
63608
- if (utils.isDate(value)) {
63691
+ if (utils$1.isDate(value)) {
63609
63692
  return value.toISOString();
63610
63693
  }
63611
- if (!useBlob && utils.isBlob(value)) {
63694
+ if (!useBlob && utils$1.isBlob(value)) {
63612
63695
  throw new AxiosError("Blob is not supported. Use a Buffer instead.");
63613
63696
  }
63614
- if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {
63697
+ if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {
63615
63698
  return useBlob && typeof Blob === "function" ? new Blob([value]) : Buffer.from(value);
63616
63699
  }
63617
63700
  return value;
@@ -63619,13 +63702,13 @@ var require_axios = __commonJS({
63619
63702
  function defaultVisitor(value, key, path) {
63620
63703
  let arr = value;
63621
63704
  if (value && !path && typeof value === "object") {
63622
- if (utils.endsWith(key, "{}")) {
63705
+ if (utils$1.endsWith(key, "{}")) {
63623
63706
  key = metaTokens ? key : key.slice(0, -2);
63624
63707
  value = JSON.stringify(value);
63625
- } else if (utils.isArray(value) && isFlatArray(value) || (utils.isFileList(value) || utils.endsWith(key, "[]")) && (arr = utils.toArray(value))) {
63708
+ } else if (utils$1.isArray(value) && isFlatArray(value) || (utils$1.isFileList(value) || utils$1.endsWith(key, "[]")) && (arr = utils$1.toArray(value))) {
63626
63709
  key = removeBrackets(key);
63627
63710
  arr.forEach(function each(el, index) {
63628
- !(utils.isUndefined(el) || el === null) && formData.append(indexes === true ? renderKey([key], index, dots) : indexes === null ? key : key + "[]", convertValue(el));
63711
+ !(utils$1.isUndefined(el) || el === null) && formData.append(indexes === true ? renderKey([key], index, dots) : indexes === null ? key : key + "[]", convertValue(el));
63629
63712
  });
63630
63713
  return false;
63631
63714
  }
@@ -63643,21 +63726,21 @@ var require_axios = __commonJS({
63643
63726
  isVisitable
63644
63727
  });
63645
63728
  function build(value, path) {
63646
- if (utils.isUndefined(value))
63729
+ if (utils$1.isUndefined(value))
63647
63730
  return;
63648
63731
  if (stack.indexOf(value) !== -1) {
63649
63732
  throw Error("Circular reference detected in " + path.join("."));
63650
63733
  }
63651
63734
  stack.push(value);
63652
- utils.forEach(value, function each(el, key) {
63653
- const result = !(utils.isUndefined(el) || el === null) && visitor.call(formData, el, utils.isString(key) ? key.trim() : key, path, exposedHelpers);
63735
+ utils$1.forEach(value, function each(el, key) {
63736
+ const result = !(utils$1.isUndefined(el) || el === null) && visitor.call(formData, el, utils$1.isString(key) ? key.trim() : key, path, exposedHelpers);
63654
63737
  if (result === true) {
63655
63738
  build(el, path ? path.concat(key) : [key]);
63656
63739
  }
63657
63740
  });
63658
63741
  stack.pop();
63659
63742
  }
63660
- if (!utils.isObject(obj)) {
63743
+ if (!utils$1.isObject(obj)) {
63661
63744
  throw new TypeError("data must be an object");
63662
63745
  }
63663
63746
  build(obj);
@@ -63706,7 +63789,7 @@ var require_axios = __commonJS({
63706
63789
  if (serializeFn) {
63707
63790
  serializedParams = serializeFn(params, options);
63708
63791
  } else {
63709
- serializedParams = utils.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams(params, options).toString(_encode);
63792
+ serializedParams = utils$1.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams(params, options).toString(_encode);
63710
63793
  }
63711
63794
  if (serializedParams) {
63712
63795
  const hashmarkIndex = url2.indexOf("#");
@@ -63741,7 +63824,7 @@ var require_axios = __commonJS({
63741
63824
  }
63742
63825
  }
63743
63826
  forEach(fn) {
63744
- utils.forEach(this.handlers, function forEachHandler(h) {
63827
+ utils$1.forEach(this.handlers, function forEachHandler(h) {
63745
63828
  if (h !== null) {
63746
63829
  fn(h);
63747
63830
  }
@@ -63755,7 +63838,7 @@ var require_axios = __commonJS({
63755
63838
  clarifyTimeoutError: false
63756
63839
  };
63757
63840
  var URLSearchParams = url__default["default"].URLSearchParams;
63758
- var platform = {
63841
+ var platform$1 = {
63759
63842
  isNode: true,
63760
63843
  classes: {
63761
63844
  URLSearchParams,
@@ -63764,10 +63847,29 @@ var require_axios = __commonJS({
63764
63847
  },
63765
63848
  protocols: ["http", "https", "file", "data"]
63766
63849
  };
63850
+ var hasBrowserEnv = typeof window !== "undefined" && typeof document !== "undefined";
63851
+ var _navigator = typeof navigator === "object" && navigator || void 0;
63852
+ var hasStandardBrowserEnv = hasBrowserEnv && (!_navigator || ["ReactNative", "NativeScript", "NS"].indexOf(_navigator.product) < 0);
63853
+ var hasStandardBrowserWebWorkerEnv = (() => {
63854
+ return typeof WorkerGlobalScope !== "undefined" && self instanceof WorkerGlobalScope && typeof self.importScripts === "function";
63855
+ })();
63856
+ var origin = hasBrowserEnv && window.location.href || "http://localhost";
63857
+ var utils = /* @__PURE__ */ Object.freeze({
63858
+ __proto__: null,
63859
+ hasBrowserEnv,
63860
+ hasStandardBrowserWebWorkerEnv,
63861
+ hasStandardBrowserEnv,
63862
+ navigator: _navigator,
63863
+ origin
63864
+ });
63865
+ var platform = {
63866
+ ...utils,
63867
+ ...platform$1
63868
+ };
63767
63869
  function toURLEncodedForm(data, options) {
63768
63870
  return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({
63769
63871
  visitor: function(value, key, path, helpers) {
63770
- if (utils.isBuffer(value)) {
63872
+ if (platform.isNode && utils$1.isBuffer(value)) {
63771
63873
  this.append(key, value.toString("base64"));
63772
63874
  return false;
63773
63875
  }
@@ -63776,7 +63878,7 @@ var require_axios = __commonJS({
63776
63878
  }, options));
63777
63879
  }
63778
63880
  function parsePropPath(name) {
63779
- return utils.matchAll(/\w+|\[(\w*)]/g, name).map((match) => {
63881
+ return utils$1.matchAll(/\w+|\[(\w*)]/g, name).map((match) => {
63780
63882
  return match[0] === "[]" ? "" : match[1] || match[0];
63781
63883
  });
63782
63884
  }
@@ -63795,29 +63897,31 @@ var require_axios = __commonJS({
63795
63897
  function formDataToJSON(formData) {
63796
63898
  function buildPath(path, value, target, index) {
63797
63899
  let name = path[index++];
63900
+ if (name === "__proto__")
63901
+ return true;
63798
63902
  const isNumericKey = Number.isFinite(+name);
63799
63903
  const isLast = index >= path.length;
63800
- name = !name && utils.isArray(target) ? target.length : name;
63904
+ name = !name && utils$1.isArray(target) ? target.length : name;
63801
63905
  if (isLast) {
63802
- if (utils.hasOwnProp(target, name)) {
63906
+ if (utils$1.hasOwnProp(target, name)) {
63803
63907
  target[name] = [target[name], value];
63804
63908
  } else {
63805
63909
  target[name] = value;
63806
63910
  }
63807
63911
  return !isNumericKey;
63808
63912
  }
63809
- if (!target[name] || !utils.isObject(target[name])) {
63913
+ if (!target[name] || !utils$1.isObject(target[name])) {
63810
63914
  target[name] = [];
63811
63915
  }
63812
63916
  const result = buildPath(path, value, target[name], index);
63813
- if (result && utils.isArray(target[name])) {
63917
+ if (result && utils$1.isArray(target[name])) {
63814
63918
  target[name] = arrayToObject(target[name]);
63815
63919
  }
63816
63920
  return !isNumericKey;
63817
63921
  }
63818
- if (utils.isFormData(formData) && utils.isFunction(formData.entries)) {
63922
+ if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) {
63819
63923
  const obj = {};
63820
- utils.forEachEntry(formData, (name, value) => {
63924
+ utils$1.forEachEntry(formData, (name, value) => {
63821
63925
  buildPath(parsePropPath(name), value, obj, 0);
63822
63926
  });
63823
63927
  return obj;
@@ -63825,10 +63929,10 @@ var require_axios = __commonJS({
63825
63929
  return null;
63826
63930
  }
63827
63931
  function stringifySafely(rawValue, parser, encoder) {
63828
- if (utils.isString(rawValue)) {
63932
+ if (utils$1.isString(rawValue)) {
63829
63933
  try {
63830
63934
  (parser || JSON.parse)(rawValue);
63831
- return utils.trim(rawValue);
63935
+ return utils$1.trim(rawValue);
63832
63936
  } catch (e) {
63833
63937
  if (e.name !== "SyntaxError") {
63834
63938
  throw e;
@@ -63839,28 +63943,25 @@ var require_axios = __commonJS({
63839
63943
  }
63840
63944
  var defaults = {
63841
63945
  transitional: transitionalDefaults,
63842
- adapter: ["xhr", "http"],
63946
+ adapter: ["xhr", "http", "fetch"],
63843
63947
  transformRequest: [function transformRequest(data, headers) {
63844
63948
  const contentType = headers.getContentType() || "";
63845
63949
  const hasJSONContentType = contentType.indexOf("application/json") > -1;
63846
- const isObjectPayload = utils.isObject(data);
63847
- if (isObjectPayload && utils.isHTMLForm(data)) {
63950
+ const isObjectPayload = utils$1.isObject(data);
63951
+ if (isObjectPayload && utils$1.isHTMLForm(data)) {
63848
63952
  data = new FormData(data);
63849
63953
  }
63850
- const isFormData2 = utils.isFormData(data);
63954
+ const isFormData2 = utils$1.isFormData(data);
63851
63955
  if (isFormData2) {
63852
- if (!hasJSONContentType) {
63853
- return data;
63854
- }
63855
63956
  return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
63856
63957
  }
63857
- if (utils.isArrayBuffer(data) || utils.isBuffer(data) || utils.isStream(data) || utils.isFile(data) || utils.isBlob(data)) {
63958
+ if (utils$1.isArrayBuffer(data) || utils$1.isBuffer(data) || utils$1.isStream(data) || utils$1.isFile(data) || utils$1.isBlob(data) || utils$1.isReadableStream(data)) {
63858
63959
  return data;
63859
63960
  }
63860
- if (utils.isArrayBufferView(data)) {
63961
+ if (utils$1.isArrayBufferView(data)) {
63861
63962
  return data.buffer;
63862
63963
  }
63863
- if (utils.isURLSearchParams(data)) {
63964
+ if (utils$1.isURLSearchParams(data)) {
63864
63965
  headers.setContentType("application/x-www-form-urlencoded;charset=utf-8", false);
63865
63966
  return data.toString();
63866
63967
  }
@@ -63869,7 +63970,7 @@ var require_axios = __commonJS({
63869
63970
  if (contentType.indexOf("application/x-www-form-urlencoded") > -1) {
63870
63971
  return toURLEncodedForm(data, this.formSerializer).toString();
63871
63972
  }
63872
- if ((isFileList2 = utils.isFileList(data)) || contentType.indexOf("multipart/form-data") > -1) {
63973
+ if ((isFileList2 = utils$1.isFileList(data)) || contentType.indexOf("multipart/form-data") > -1) {
63873
63974
  const _FormData = this.env && this.env.FormData;
63874
63975
  return toFormData(isFileList2 ? { "files[]": data } : data, _FormData && new _FormData(), this.formSerializer);
63875
63976
  }
@@ -63884,7 +63985,10 @@ var require_axios = __commonJS({
63884
63985
  const transitional = this.transitional || defaults.transitional;
63885
63986
  const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
63886
63987
  const JSONRequested = this.responseType === "json";
63887
- if (data && utils.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) {
63988
+ if (utils$1.isResponse(data) || utils$1.isReadableStream(data)) {
63989
+ return data;
63990
+ }
63991
+ if (data && utils$1.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) {
63888
63992
  const silentJSONParsing = transitional && transitional.silentJSONParsing;
63889
63993
  const strictJSONParsing = !silentJSONParsing && JSONRequested;
63890
63994
  try {
@@ -63919,11 +64023,11 @@ var require_axios = __commonJS({
63919
64023
  }
63920
64024
  }
63921
64025
  };
63922
- utils.forEach(["delete", "get", "head", "post", "put", "patch"], (method) => {
64026
+ utils$1.forEach(["delete", "get", "head", "post", "put", "patch"], (method) => {
63923
64027
  defaults.headers[method] = {};
63924
64028
  });
63925
64029
  var defaults$1 = defaults;
63926
- var ignoreDuplicateOf = utils.toObjectSet([
64030
+ var ignoreDuplicateOf = utils$1.toObjectSet([
63927
64031
  "age",
63928
64032
  "authorization",
63929
64033
  "content-length",
@@ -63974,7 +64078,7 @@ var require_axios = __commonJS({
63974
64078
  if (value === false || value == null) {
63975
64079
  return value;
63976
64080
  }
63977
- return utils.isArray(value) ? value.map(normalizeValue) : String(value);
64081
+ return utils$1.isArray(value) ? value.map(normalizeValue) : String(value);
63978
64082
  }
63979
64083
  function parseTokens(str) {
63980
64084
  const tokens = Object.create(null);
@@ -63987,18 +64091,18 @@ var require_axios = __commonJS({
63987
64091
  }
63988
64092
  var isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
63989
64093
  function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
63990
- if (utils.isFunction(filter)) {
64094
+ if (utils$1.isFunction(filter)) {
63991
64095
  return filter.call(this, value, header);
63992
64096
  }
63993
64097
  if (isHeaderNameFilter) {
63994
64098
  value = header;
63995
64099
  }
63996
- if (!utils.isString(value))
64100
+ if (!utils$1.isString(value))
63997
64101
  return;
63998
- if (utils.isString(filter)) {
64102
+ if (utils$1.isString(filter)) {
63999
64103
  return value.indexOf(filter) !== -1;
64000
64104
  }
64001
- if (utils.isRegExp(filter)) {
64105
+ if (utils$1.isRegExp(filter)) {
64002
64106
  return filter.test(value);
64003
64107
  }
64004
64108
  }
@@ -64008,7 +64112,7 @@ var require_axios = __commonJS({
64008
64112
  });
64009
64113
  }
64010
64114
  function buildAccessors(obj, header) {
64011
- const accessorName = utils.toCamelCase(" " + header);
64115
+ const accessorName = utils$1.toCamelCase(" " + header);
64012
64116
  ["get", "set", "has"].forEach((methodName) => {
64013
64117
  Object.defineProperty(obj, methodName + accessorName, {
64014
64118
  value: function(arg1, arg2, arg3) {
@@ -64029,16 +64133,20 @@ var require_axios = __commonJS({
64029
64133
  if (!lHeader) {
64030
64134
  throw new Error("header name must be a non-empty string");
64031
64135
  }
64032
- const key = utils.findKey(self2, lHeader);
64136
+ const key = utils$1.findKey(self2, lHeader);
64033
64137
  if (!key || self2[key] === void 0 || _rewrite === true || _rewrite === void 0 && self2[key] !== false) {
64034
64138
  self2[key || _header] = normalizeValue(_value);
64035
64139
  }
64036
64140
  }
64037
- const setHeaders = (headers, _rewrite) => utils.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
64038
- if (utils.isPlainObject(header) || header instanceof this.constructor) {
64141
+ const setHeaders = (headers, _rewrite) => utils$1.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
64142
+ if (utils$1.isPlainObject(header) || header instanceof this.constructor) {
64039
64143
  setHeaders(header, valueOrRewrite);
64040
- } else if (utils.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
64144
+ } else if (utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
64041
64145
  setHeaders(parseHeaders(header), valueOrRewrite);
64146
+ } else if (utils$1.isHeaders(header)) {
64147
+ for (const [key, value] of header.entries()) {
64148
+ setHeader(value, key, rewrite);
64149
+ }
64042
64150
  } else {
64043
64151
  header != null && setHeader(valueOrRewrite, header, rewrite);
64044
64152
  }
@@ -64047,7 +64155,7 @@ var require_axios = __commonJS({
64047
64155
  get(header, parser) {
64048
64156
  header = normalizeHeader(header);
64049
64157
  if (header) {
64050
- const key = utils.findKey(this, header);
64158
+ const key = utils$1.findKey(this, header);
64051
64159
  if (key) {
64052
64160
  const value = this[key];
64053
64161
  if (!parser) {
@@ -64056,10 +64164,10 @@ var require_axios = __commonJS({
64056
64164
  if (parser === true) {
64057
64165
  return parseTokens(value);
64058
64166
  }
64059
- if (utils.isFunction(parser)) {
64167
+ if (utils$1.isFunction(parser)) {
64060
64168
  return parser.call(this, value, key);
64061
64169
  }
64062
- if (utils.isRegExp(parser)) {
64170
+ if (utils$1.isRegExp(parser)) {
64063
64171
  return parser.exec(value);
64064
64172
  }
64065
64173
  throw new TypeError("parser must be boolean|regexp|function");
@@ -64069,7 +64177,7 @@ var require_axios = __commonJS({
64069
64177
  has(header, matcher) {
64070
64178
  header = normalizeHeader(header);
64071
64179
  if (header) {
64072
- const key = utils.findKey(this, header);
64180
+ const key = utils$1.findKey(this, header);
64073
64181
  return !!(key && this[key] !== void 0 && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
64074
64182
  }
64075
64183
  return false;
@@ -64080,14 +64188,14 @@ var require_axios = __commonJS({
64080
64188
  function deleteHeader(_header) {
64081
64189
  _header = normalizeHeader(_header);
64082
64190
  if (_header) {
64083
- const key = utils.findKey(self2, _header);
64191
+ const key = utils$1.findKey(self2, _header);
64084
64192
  if (key && (!matcher || matchHeaderValue(self2, self2[key], key, matcher))) {
64085
64193
  delete self2[key];
64086
64194
  deleted = true;
64087
64195
  }
64088
64196
  }
64089
64197
  }
64090
- if (utils.isArray(header)) {
64198
+ if (utils$1.isArray(header)) {
64091
64199
  header.forEach(deleteHeader);
64092
64200
  } else {
64093
64201
  deleteHeader(header);
@@ -64110,8 +64218,8 @@ var require_axios = __commonJS({
64110
64218
  normalize(format) {
64111
64219
  const self2 = this;
64112
64220
  const headers = {};
64113
- utils.forEach(this, (value, header) => {
64114
- const key = utils.findKey(headers, header);
64221
+ utils$1.forEach(this, (value, header) => {
64222
+ const key = utils$1.findKey(headers, header);
64115
64223
  if (key) {
64116
64224
  self2[key] = normalizeValue(value);
64117
64225
  delete self2[header];
@@ -64131,8 +64239,8 @@ var require_axios = __commonJS({
64131
64239
  }
64132
64240
  toJSON(asStrings) {
64133
64241
  const obj = Object.create(null);
64134
- utils.forEach(this, (value, header) => {
64135
- value != null && value !== false && (obj[header] = asStrings && utils.isArray(value) ? value.join(", ") : value);
64242
+ utils$1.forEach(this, (value, header) => {
64243
+ value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(", ") : value);
64136
64244
  });
64137
64245
  return obj;
64138
64246
  }
@@ -64166,12 +64274,12 @@ var require_axios = __commonJS({
64166
64274
  accessors[lHeader] = true;
64167
64275
  }
64168
64276
  }
64169
- utils.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
64277
+ utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
64170
64278
  return this;
64171
64279
  }
64172
64280
  };
64173
64281
  AxiosHeaders.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
64174
- utils.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {
64282
+ utils$1.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {
64175
64283
  let mapped = key[0].toUpperCase() + key.slice(1);
64176
64284
  return {
64177
64285
  get: () => value,
@@ -64180,14 +64288,14 @@ var require_axios = __commonJS({
64180
64288
  }
64181
64289
  };
64182
64290
  });
64183
- utils.freezeMethods(AxiosHeaders);
64291
+ utils$1.freezeMethods(AxiosHeaders);
64184
64292
  var AxiosHeaders$1 = AxiosHeaders;
64185
64293
  function transformData(fns, response) {
64186
64294
  const config = this || defaults$1;
64187
64295
  const context = response || config;
64188
64296
  const headers = AxiosHeaders$1.from(context.headers);
64189
64297
  let data = context.data;
64190
- utils.forEach(fns, function transform(fn) {
64298
+ utils$1.forEach(fns, function transform(fn) {
64191
64299
  data = fn.call(config, data, headers.normalize(), response ? response.status : void 0);
64192
64300
  });
64193
64301
  headers.normalize();
@@ -64200,7 +64308,7 @@ var require_axios = __commonJS({
64200
64308
  AxiosError.call(this, message == null ? "canceled" : message, AxiosError.ERR_CANCELED, config, request);
64201
64309
  this.name = "CanceledError";
64202
64310
  }
64203
- utils.inherits(CanceledError, AxiosError, {
64311
+ utils$1.inherits(CanceledError, AxiosError, {
64204
64312
  __CANCEL__: true
64205
64313
  });
64206
64314
  function settle(resolve, reject, response) {
@@ -64215,7 +64323,7 @@ var require_axios = __commonJS({
64215
64323
  return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url2);
64216
64324
  }
64217
64325
  function combineURLs(baseURL, relativeURL) {
64218
- return relativeURL ? baseURL.replace(/\/+$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL;
64326
+ return relativeURL ? baseURL.replace(/\/?\/$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL;
64219
64327
  }
64220
64328
  function buildFullPath(baseURL, requestedURL) {
64221
64329
  if (baseURL && !isAbsoluteURL(requestedURL)) {
@@ -64223,7 +64331,7 @@ var require_axios = __commonJS({
64223
64331
  }
64224
64332
  return requestedURL;
64225
64333
  }
64226
- var VERSION = "1.6.0";
64334
+ var VERSION = "1.7.7";
64227
64335
  function parseProtocol(url2) {
64228
64336
  const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url2);
64229
64337
  return match && match[1] || "";
@@ -64255,66 +64363,10 @@ var require_axios = __commonJS({
64255
64363
  }
64256
64364
  throw new AxiosError("Unsupported protocol " + protocol, AxiosError.ERR_NOT_SUPPORT);
64257
64365
  }
64258
- function throttle(fn, freq) {
64259
- let timestamp = 0;
64260
- const threshold = 1e3 / freq;
64261
- let timer = null;
64262
- return function throttled(force, args) {
64263
- const now = Date.now();
64264
- if (force || now - timestamp > threshold) {
64265
- if (timer) {
64266
- clearTimeout(timer);
64267
- timer = null;
64268
- }
64269
- timestamp = now;
64270
- return fn.apply(null, args);
64271
- }
64272
- if (!timer) {
64273
- timer = setTimeout(() => {
64274
- timer = null;
64275
- timestamp = Date.now();
64276
- return fn.apply(null, args);
64277
- }, threshold - (now - timestamp));
64278
- }
64279
- };
64280
- }
64281
- function speedometer(samplesCount, min) {
64282
- samplesCount = samplesCount || 10;
64283
- const bytes = new Array(samplesCount);
64284
- const timestamps = new Array(samplesCount);
64285
- let head = 0;
64286
- let tail = 0;
64287
- let firstSampleTS;
64288
- min = min !== void 0 ? min : 1e3;
64289
- return function push(chunkLength) {
64290
- const now = Date.now();
64291
- const startedAt = timestamps[tail];
64292
- if (!firstSampleTS) {
64293
- firstSampleTS = now;
64294
- }
64295
- bytes[head] = chunkLength;
64296
- timestamps[head] = now;
64297
- let i = tail;
64298
- let bytesCount = 0;
64299
- while (i !== head) {
64300
- bytesCount += bytes[i++];
64301
- i = i % samplesCount;
64302
- }
64303
- head = (head + 1) % samplesCount;
64304
- if (head === tail) {
64305
- tail = (tail + 1) % samplesCount;
64306
- }
64307
- if (now - firstSampleTS < min) {
64308
- return;
64309
- }
64310
- const passed = startedAt && now - startedAt;
64311
- return passed ? Math.round(bytesCount * 1e3 / passed) : void 0;
64312
- };
64313
- }
64314
64366
  var kInternals = Symbol("internals");
64315
64367
  var AxiosTransformStream = class extends stream__default["default"].Transform {
64316
64368
  constructor(options) {
64317
- options = utils.toFlatObject(options, {
64369
+ options = utils$1.toFlatObject(options, {
64318
64370
  maxRate: 0,
64319
64371
  chunkSize: 64 * 1024,
64320
64372
  minChunkSize: 100,
@@ -64322,16 +64374,13 @@ var require_axios = __commonJS({
64322
64374
  ticksRate: 2,
64323
64375
  samplesCount: 15
64324
64376
  }, null, (prop, source) => {
64325
- return !utils.isUndefined(source[prop]);
64377
+ return !utils$1.isUndefined(source[prop]);
64326
64378
  });
64327
64379
  super({
64328
64380
  readableHighWaterMark: options.chunkSize
64329
64381
  });
64330
- const self2 = this;
64331
64382
  const internals = this[kInternals] = {
64332
- length: options.length,
64333
64383
  timeWindow: options.timeWindow,
64334
- ticksRate: options.ticksRate,
64335
64384
  chunkSize: options.chunkSize,
64336
64385
  maxRate: options.maxRate,
64337
64386
  minChunkSize: options.minChunkSize,
@@ -64342,7 +64391,6 @@ var require_axios = __commonJS({
64342
64391
  bytes: 0,
64343
64392
  onReadCallback: null
64344
64393
  };
64345
- const _speedometer = speedometer(internals.ticksRate * options.samplesCount, internals.timeWindow);
64346
64394
  this.on("newListener", (event) => {
64347
64395
  if (event === "progress") {
64348
64396
  if (!internals.isCaptured) {
@@ -64350,31 +64398,6 @@ var require_axios = __commonJS({
64350
64398
  }
64351
64399
  }
64352
64400
  });
64353
- let bytesNotified = 0;
64354
- internals.updateProgress = throttle(function throttledHandler() {
64355
- const totalBytes = internals.length;
64356
- const bytesTransferred = internals.bytesSeen;
64357
- const progressBytes = bytesTransferred - bytesNotified;
64358
- if (!progressBytes || self2.destroyed)
64359
- return;
64360
- const rate = _speedometer(progressBytes);
64361
- bytesNotified = bytesTransferred;
64362
- process.nextTick(() => {
64363
- self2.emit("progress", {
64364
- "loaded": bytesTransferred,
64365
- "total": totalBytes,
64366
- "progress": totalBytes ? bytesTransferred / totalBytes : void 0,
64367
- "bytes": progressBytes,
64368
- "rate": rate ? rate : void 0,
64369
- "estimated": rate && totalBytes && bytesTransferred <= totalBytes ? (totalBytes - bytesTransferred) / rate : void 0
64370
- });
64371
- });
64372
- }, internals.ticksRate);
64373
- const onFinish = () => {
64374
- internals.updateProgress(true);
64375
- };
64376
- this.once("end", onFinish);
64377
- this.once("error", onFinish);
64378
64401
  }
64379
64402
  _read(size) {
64380
64403
  const internals = this[kInternals];
@@ -64384,7 +64407,6 @@ var require_axios = __commonJS({
64384
64407
  return super._read(size);
64385
64408
  }
64386
64409
  _transform(chunk, encoding, callback) {
64387
- const self2 = this;
64388
64410
  const internals = this[kInternals];
64389
64411
  const maxRate = internals.maxRate;
64390
64412
  const readableHighWaterMark = this.readableHighWaterMark;
@@ -64392,14 +64414,12 @@ var require_axios = __commonJS({
64392
64414
  const divider = 1e3 / timeWindow;
64393
64415
  const bytesThreshold = maxRate / divider;
64394
64416
  const minChunkSize = internals.minChunkSize !== false ? Math.max(internals.minChunkSize, bytesThreshold * 0.01) : 0;
64395
- function pushChunk(_chunk, _callback) {
64417
+ const pushChunk = (_chunk, _callback) => {
64396
64418
  const bytes = Buffer.byteLength(_chunk);
64397
64419
  internals.bytesSeen += bytes;
64398
64420
  internals.bytes += bytes;
64399
- if (internals.isCaptured) {
64400
- internals.updateProgress();
64401
- }
64402
- if (self2.push(_chunk)) {
64421
+ internals.isCaptured && this.emit("progress", internals.bytesSeen);
64422
+ if (this.push(_chunk)) {
64403
64423
  process.nextTick(_callback);
64404
64424
  } else {
64405
64425
  internals.onReadCallback = () => {
@@ -64407,7 +64427,7 @@ var require_axios = __commonJS({
64407
64427
  process.nextTick(_callback);
64408
64428
  };
64409
64429
  }
64410
- }
64430
+ };
64411
64431
  const transformChunk = (_chunk, _callback) => {
64412
64432
  const chunkSize = Buffer.byteLength(_chunk);
64413
64433
  let chunkRemainder = null;
@@ -64453,10 +64473,6 @@ var require_axios = __commonJS({
64453
64473
  }
64454
64474
  });
64455
64475
  }
64456
- setLength(length) {
64457
- this[kInternals].length = +length;
64458
- return this;
64459
- }
64460
64476
  };
64461
64477
  var AxiosTransformStream$1 = AxiosTransformStream;
64462
64478
  var { asyncIterator } = Symbol;
@@ -64472,7 +64488,7 @@ var require_axios = __commonJS({
64472
64488
  }
64473
64489
  };
64474
64490
  var readBlob$1 = readBlob;
64475
- var BOUNDARY_ALPHABET = utils.ALPHABET.ALPHA_DIGIT + "-_";
64491
+ var BOUNDARY_ALPHABET = utils$1.ALPHABET.ALPHA_DIGIT + "-_";
64476
64492
  var textEncoder = new util.TextEncoder();
64477
64493
  var CRLF = "\r\n";
64478
64494
  var CRLF_BYTES = textEncoder.encode(CRLF);
@@ -64480,7 +64496,7 @@ var require_axios = __commonJS({
64480
64496
  var FormDataPart = class {
64481
64497
  constructor(name, value) {
64482
64498
  const { escapeName } = this.constructor;
64483
- const isStringValue = utils.isString(value);
64499
+ const isStringValue = utils$1.isString(value);
64484
64500
  let headers = `Content-Disposition: form-data; name="${escapeName(name)}"${!isStringValue && value.name ? `; filename="${escapeName(value.name)}"` : ""}${CRLF}`;
64485
64501
  if (isStringValue) {
64486
64502
  value = textEncoder.encode(String(value).replace(/\r?\n|\r\n?/g, CRLF));
@@ -64496,7 +64512,7 @@ var require_axios = __commonJS({
64496
64512
  async *encode() {
64497
64513
  yield this.headers;
64498
64514
  const { value } = this;
64499
- if (utils.isTypedArray(value)) {
64515
+ if (utils$1.isTypedArray(value)) {
64500
64516
  yield value;
64501
64517
  } else {
64502
64518
  yield* readBlob$1(value);
@@ -64515,9 +64531,9 @@ var require_axios = __commonJS({
64515
64531
  const {
64516
64532
  tag = "form-data-boundary",
64517
64533
  size = 25,
64518
- boundary = tag + "-" + utils.generateString(size, BOUNDARY_ALPHABET)
64534
+ boundary = tag + "-" + utils$1.generateString(size, BOUNDARY_ALPHABET)
64519
64535
  } = options || {};
64520
- if (!utils.isFormData(form)) {
64536
+ if (!utils$1.isFormData(form)) {
64521
64537
  throw TypeError("FormData instance required");
64522
64538
  }
64523
64539
  if (boundary.length < 1 || boundary.length > 70) {
@@ -64532,7 +64548,7 @@ var require_axios = __commonJS({
64532
64548
  return part;
64533
64549
  });
64534
64550
  contentLength += boundaryBytes.byteLength * parts.length;
64535
- contentLength = utils.toFiniteNumber(contentLength);
64551
+ contentLength = utils$1.toFiniteNumber(contentLength);
64536
64552
  const computedHeaders = {
64537
64553
  "Content-Type": `multipart/form-data; boundary=${boundary}`
64538
64554
  };
@@ -64569,7 +64585,7 @@ var require_axios = __commonJS({
64569
64585
  };
64570
64586
  var ZlibHeaderTransformStream$1 = ZlibHeaderTransformStream;
64571
64587
  var callbackify = (fn, reducer) => {
64572
- return utils.isAsyncFn(fn) ? function(...args) {
64588
+ return utils$1.isAsyncFn(fn) ? function(...args) {
64573
64589
  const cb = args.pop();
64574
64590
  fn.apply(this, args).then((value) => {
64575
64591
  try {
@@ -64581,6 +64597,104 @@ var require_axios = __commonJS({
64581
64597
  } : fn;
64582
64598
  };
64583
64599
  var callbackify$1 = callbackify;
64600
+ function speedometer(samplesCount, min) {
64601
+ samplesCount = samplesCount || 10;
64602
+ const bytes = new Array(samplesCount);
64603
+ const timestamps = new Array(samplesCount);
64604
+ let head = 0;
64605
+ let tail = 0;
64606
+ let firstSampleTS;
64607
+ min = min !== void 0 ? min : 1e3;
64608
+ return function push(chunkLength) {
64609
+ const now = Date.now();
64610
+ const startedAt = timestamps[tail];
64611
+ if (!firstSampleTS) {
64612
+ firstSampleTS = now;
64613
+ }
64614
+ bytes[head] = chunkLength;
64615
+ timestamps[head] = now;
64616
+ let i = tail;
64617
+ let bytesCount = 0;
64618
+ while (i !== head) {
64619
+ bytesCount += bytes[i++];
64620
+ i = i % samplesCount;
64621
+ }
64622
+ head = (head + 1) % samplesCount;
64623
+ if (head === tail) {
64624
+ tail = (tail + 1) % samplesCount;
64625
+ }
64626
+ if (now - firstSampleTS < min) {
64627
+ return;
64628
+ }
64629
+ const passed = startedAt && now - startedAt;
64630
+ return passed ? Math.round(bytesCount * 1e3 / passed) : void 0;
64631
+ };
64632
+ }
64633
+ function throttle(fn, freq) {
64634
+ let timestamp = 0;
64635
+ let threshold = 1e3 / freq;
64636
+ let lastArgs;
64637
+ let timer;
64638
+ const invoke = (args, now = Date.now()) => {
64639
+ timestamp = now;
64640
+ lastArgs = null;
64641
+ if (timer) {
64642
+ clearTimeout(timer);
64643
+ timer = null;
64644
+ }
64645
+ fn.apply(null, args);
64646
+ };
64647
+ const throttled = (...args) => {
64648
+ const now = Date.now();
64649
+ const passed = now - timestamp;
64650
+ if (passed >= threshold) {
64651
+ invoke(args, now);
64652
+ } else {
64653
+ lastArgs = args;
64654
+ if (!timer) {
64655
+ timer = setTimeout(() => {
64656
+ timer = null;
64657
+ invoke(lastArgs);
64658
+ }, threshold - passed);
64659
+ }
64660
+ }
64661
+ };
64662
+ const flush = () => lastArgs && invoke(lastArgs);
64663
+ return [throttled, flush];
64664
+ }
64665
+ var progressEventReducer = (listener, isDownloadStream, freq = 3) => {
64666
+ let bytesNotified = 0;
64667
+ const _speedometer = speedometer(50, 250);
64668
+ return throttle((e) => {
64669
+ const loaded = e.loaded;
64670
+ const total = e.lengthComputable ? e.total : void 0;
64671
+ const progressBytes = loaded - bytesNotified;
64672
+ const rate = _speedometer(progressBytes);
64673
+ const inRange = loaded <= total;
64674
+ bytesNotified = loaded;
64675
+ const data = {
64676
+ loaded,
64677
+ total,
64678
+ progress: total ? loaded / total : void 0,
64679
+ bytes: progressBytes,
64680
+ rate: rate ? rate : void 0,
64681
+ estimated: rate && total && inRange ? (total - loaded) / rate : void 0,
64682
+ event: e,
64683
+ lengthComputable: total != null,
64684
+ [isDownloadStream ? "download" : "upload"]: true
64685
+ };
64686
+ listener(data);
64687
+ }, freq);
64688
+ };
64689
+ var progressEventDecorator = (total, throttled) => {
64690
+ const lengthComputable = total != null;
64691
+ return [(loaded) => throttled[0]({
64692
+ lengthComputable,
64693
+ total,
64694
+ loaded
64695
+ }), throttled[1]];
64696
+ };
64697
+ var asyncDecorator = (fn) => (...args) => utils$1.asap(() => fn(...args));
64584
64698
  var zlibOptions = {
64585
64699
  flush: zlib__default["default"].constants.Z_SYNC_FLUSH,
64586
64700
  finishFlush: zlib__default["default"].constants.Z_SYNC_FLUSH
@@ -64589,18 +64703,22 @@ var require_axios = __commonJS({
64589
64703
  flush: zlib__default["default"].constants.BROTLI_OPERATION_FLUSH,
64590
64704
  finishFlush: zlib__default["default"].constants.BROTLI_OPERATION_FLUSH
64591
64705
  };
64592
- var isBrotliSupported = utils.isFunction(zlib__default["default"].createBrotliDecompress);
64706
+ var isBrotliSupported = utils$1.isFunction(zlib__default["default"].createBrotliDecompress);
64593
64707
  var { http: httpFollow, https: httpsFollow } = followRedirects__default["default"];
64594
64708
  var isHttps = /https:?/;
64595
64709
  var supportedProtocols = platform.protocols.map((protocol) => {
64596
64710
  return protocol + ":";
64597
64711
  });
64598
- function dispatchBeforeRedirect(options) {
64712
+ var flushOnFinish = (stream2, [throttled, flush]) => {
64713
+ stream2.on("end", flush).on("error", flush);
64714
+ return throttled;
64715
+ };
64716
+ function dispatchBeforeRedirect(options, responseDetails) {
64599
64717
  if (options.beforeRedirects.proxy) {
64600
64718
  options.beforeRedirects.proxy(options);
64601
64719
  }
64602
64720
  if (options.beforeRedirects.config) {
64603
- options.beforeRedirects.config(options);
64721
+ options.beforeRedirects.config(options, responseDetails);
64604
64722
  }
64605
64723
  }
64606
64724
  function setProxy(options, configProxy, location) {
@@ -64636,7 +64754,7 @@ var require_axios = __commonJS({
64636
64754
  setProxy(redirectOptions, configProxy, redirectOptions.href);
64637
64755
  };
64638
64756
  }
64639
- var isHttpAdapterSupported = typeof process !== "undefined" && utils.kindOf(process) === "process";
64757
+ var isHttpAdapterSupported = typeof process !== "undefined" && utils$1.kindOf(process) === "process";
64640
64758
  var wrapAsync = (asyncExecutor) => {
64641
64759
  return new Promise((resolve, reject) => {
64642
64760
  let onDone;
@@ -64659,7 +64777,7 @@ var require_axios = __commonJS({
64659
64777
  });
64660
64778
  };
64661
64779
  var resolveFamily = ({ address, family }) => {
64662
- if (!utils.isString(address)) {
64780
+ if (!utils$1.isString(address)) {
64663
64781
  throw TypeError("address must be a string");
64664
64782
  }
64665
64783
  return {
@@ -64667,7 +64785,7 @@ var require_axios = __commonJS({
64667
64785
  family: family || (address.indexOf(".") < 0 ? 6 : 4)
64668
64786
  };
64669
64787
  };
64670
- var buildAddressEntry = (address, family) => resolveFamily(utils.isObject(address) ? address : { address, family });
64788
+ var buildAddressEntry = (address, family) => resolveFamily(utils$1.isObject(address) ? address : { address, family });
64671
64789
  var httpAdapter = isHttpAdapterSupported && function httpAdapter2(config) {
64672
64790
  return wrapAsync(async function dispatchHttpRequest(resolve, reject, onDone) {
64673
64791
  let { data, lookup, family } = config;
@@ -64677,15 +64795,18 @@ var require_axios = __commonJS({
64677
64795
  let rejected = false;
64678
64796
  let req;
64679
64797
  if (lookup) {
64680
- const _lookup = callbackify$1(lookup, (value) => utils.isArray(value) ? value : [value]);
64798
+ const _lookup = callbackify$1(lookup, (value) => utils$1.isArray(value) ? value : [value]);
64681
64799
  lookup = (hostname, opt, cb) => {
64682
64800
  _lookup(hostname, opt, (err, arg0, arg1) => {
64683
- const addresses = utils.isArray(arg0) ? arg0.map((addr) => buildAddressEntry(addr)) : [buildAddressEntry(arg0, arg1)];
64801
+ if (err) {
64802
+ return cb(err);
64803
+ }
64804
+ const addresses = utils$1.isArray(arg0) ? arg0.map((addr) => buildAddressEntry(addr)) : [buildAddressEntry(arg0, arg1)];
64684
64805
  opt.all ? cb(err, addresses) : cb(err, addresses[0].address, addresses[0].family);
64685
64806
  });
64686
64807
  };
64687
64808
  }
64688
- const emitter = new EventEmitter__default["default"]();
64809
+ const emitter = new events.EventEmitter();
64689
64810
  const onFinished = () => {
64690
64811
  if (config.cancelToken) {
64691
64812
  config.cancelToken.unsubscribe(abort);
@@ -64713,7 +64834,7 @@ var require_axios = __commonJS({
64713
64834
  }
64714
64835
  }
64715
64836
  const fullPath = buildFullPath(config.baseURL, config.url);
64716
- const parsed = new URL(fullPath, "http://localhost");
64837
+ const parsed = new URL(fullPath, platform.hasBrowserEnv ? platform.origin : void 0);
64717
64838
  const protocol = parsed.protocol || supportedProtocols[0];
64718
64839
  if (protocol === "data:") {
64719
64840
  let convertedData;
@@ -64735,7 +64856,7 @@ var require_axios = __commonJS({
64735
64856
  if (responseType === "text") {
64736
64857
  convertedData = convertedData.toString(responseEncoding);
64737
64858
  if (!responseEncoding || responseEncoding === "utf8") {
64738
- convertedData = utils.stripBOM(convertedData);
64859
+ convertedData = utils$1.stripBOM(convertedData);
64739
64860
  }
64740
64861
  } else if (responseType === "stream") {
64741
64862
  convertedData = stream__default["default"].Readable.from(convertedData);
@@ -64753,12 +64874,11 @@ var require_axios = __commonJS({
64753
64874
  }
64754
64875
  const headers = AxiosHeaders$1.from(config.headers).normalize();
64755
64876
  headers.set("User-Agent", "axios/" + VERSION, false);
64756
- const onDownloadProgress = config.onDownloadProgress;
64757
- const onUploadProgress = config.onUploadProgress;
64877
+ const { onUploadProgress, onDownloadProgress } = config;
64758
64878
  const maxRate = config.maxRate;
64759
64879
  let maxUploadRate = void 0;
64760
64880
  let maxDownloadRate = void 0;
64761
- if (utils.isSpecCompliantForm(data)) {
64881
+ if (utils$1.isSpecCompliantForm(data)) {
64762
64882
  const userBoundary = headers.getContentType(/boundary=([-_\w\d]{10,70})/i);
64763
64883
  data = formDataToStream$1(data, (formHeaders) => {
64764
64884
  headers.set(formHeaders);
@@ -64766,7 +64886,7 @@ var require_axios = __commonJS({
64766
64886
  tag: `axios-${VERSION}-boundary`,
64767
64887
  boundary: userBoundary && userBoundary[1] || void 0
64768
64888
  });
64769
- } else if (utils.isFormData(data) && utils.isFunction(data.getHeaders)) {
64889
+ } else if (utils$1.isFormData(data) && utils$1.isFunction(data.getHeaders)) {
64770
64890
  headers.set(data.getHeaders());
64771
64891
  if (!headers.hasContentLength()) {
64772
64892
  try {
@@ -64775,16 +64895,16 @@ var require_axios = __commonJS({
64775
64895
  } catch (e) {
64776
64896
  }
64777
64897
  }
64778
- } else if (utils.isBlob(data)) {
64898
+ } else if (utils$1.isBlob(data)) {
64779
64899
  data.size && headers.setContentType(data.type || "application/octet-stream");
64780
64900
  headers.setContentLength(data.size || 0);
64781
64901
  data = stream__default["default"].Readable.from(readBlob$1(data));
64782
- } else if (data && !utils.isStream(data)) {
64902
+ } else if (data && !utils$1.isStream(data)) {
64783
64903
  if (Buffer.isBuffer(data))
64784
64904
  ;
64785
- else if (utils.isArrayBuffer(data)) {
64905
+ else if (utils$1.isArrayBuffer(data)) {
64786
64906
  data = Buffer.from(new Uint8Array(data));
64787
- } else if (utils.isString(data)) {
64907
+ } else if (utils$1.isString(data)) {
64788
64908
  data = Buffer.from(data, "utf-8");
64789
64909
  } else {
64790
64910
  return reject(new AxiosError("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream", AxiosError.ERR_BAD_REQUEST, config));
@@ -64794,26 +64914,21 @@ var require_axios = __commonJS({
64794
64914
  return reject(new AxiosError("Request body larger than maxBodyLength limit", AxiosError.ERR_BAD_REQUEST, config));
64795
64915
  }
64796
64916
  }
64797
- const contentLength = utils.toFiniteNumber(headers.getContentLength());
64798
- if (utils.isArray(maxRate)) {
64917
+ const contentLength = utils$1.toFiniteNumber(headers.getContentLength());
64918
+ if (utils$1.isArray(maxRate)) {
64799
64919
  maxUploadRate = maxRate[0];
64800
64920
  maxDownloadRate = maxRate[1];
64801
64921
  } else {
64802
64922
  maxUploadRate = maxDownloadRate = maxRate;
64803
64923
  }
64804
64924
  if (data && (onUploadProgress || maxUploadRate)) {
64805
- if (!utils.isStream(data)) {
64925
+ if (!utils$1.isStream(data)) {
64806
64926
  data = stream__default["default"].Readable.from(data, { objectMode: false });
64807
64927
  }
64808
64928
  data = stream__default["default"].pipeline([data, new AxiosTransformStream$1({
64809
- length: contentLength,
64810
- maxRate: utils.toFiniteNumber(maxUploadRate)
64811
- })], utils.noop);
64812
- onUploadProgress && data.on("progress", (progress) => {
64813
- onUploadProgress(Object.assign(progress, {
64814
- upload: true
64815
- }));
64816
- });
64929
+ maxRate: utils$1.toFiniteNumber(maxUploadRate)
64930
+ })], utils$1.noop);
64931
+ onUploadProgress && data.on("progress", flushOnFinish(data, progressEventDecorator(contentLength, progressEventReducer(asyncDecorator(onUploadProgress), false, 3))));
64817
64932
  }
64818
64933
  let auth = void 0;
64819
64934
  if (config.auth) {
@@ -64849,11 +64964,11 @@ var require_axios = __commonJS({
64849
64964
  beforeRedirect: dispatchBeforeRedirect,
64850
64965
  beforeRedirects: {}
64851
64966
  };
64852
- !utils.isUndefined(lookup) && (options.lookup = lookup);
64967
+ !utils$1.isUndefined(lookup) && (options.lookup = lookup);
64853
64968
  if (config.socketPath) {
64854
64969
  options.socketPath = config.socketPath;
64855
64970
  } else {
64856
- options.hostname = parsed.hostname;
64971
+ options.hostname = parsed.hostname.startsWith("[") ? parsed.hostname.slice(1, -1) : parsed.hostname;
64857
64972
  options.port = parsed.port;
64858
64973
  setProxy(options, config.proxy, protocol + "//" + parsed.hostname + (parsed.port ? ":" + parsed.port : "") + options.path);
64859
64974
  }
@@ -64886,16 +65001,11 @@ var require_axios = __commonJS({
64886
65001
  return;
64887
65002
  const streams = [res];
64888
65003
  const responseLength = +res.headers["content-length"];
64889
- if (onDownloadProgress) {
65004
+ if (onDownloadProgress || maxDownloadRate) {
64890
65005
  const transformStream = new AxiosTransformStream$1({
64891
- length: utils.toFiniteNumber(responseLength),
64892
- maxRate: utils.toFiniteNumber(maxDownloadRate)
64893
- });
64894
- onDownloadProgress && transformStream.on("progress", (progress) => {
64895
- onDownloadProgress(Object.assign(progress, {
64896
- download: true
64897
- }));
65006
+ maxRate: utils$1.toFiniteNumber(maxDownloadRate)
64898
65007
  });
65008
+ onDownloadProgress && transformStream.on("progress", flushOnFinish(transformStream, progressEventDecorator(responseLength, progressEventReducer(asyncDecorator(onDownloadProgress), true, 3))));
64899
65009
  streams.push(transformStream);
64900
65010
  }
64901
65011
  let responseStream = res;
@@ -64924,7 +65034,7 @@ var require_axios = __commonJS({
64924
65034
  }
64925
65035
  }
64926
65036
  }
64927
- responseStream = streams.length > 1 ? stream__default["default"].pipeline(streams, utils.noop) : streams[0];
65037
+ responseStream = streams.length > 1 ? stream__default["default"].pipeline(streams, utils$1.noop) : streams[0];
64928
65038
  const offListeners = stream__default["default"].finished(responseStream, () => {
64929
65039
  offListeners();
64930
65040
  onFinished();
@@ -64970,7 +65080,7 @@ var require_axios = __commonJS({
64970
65080
  if (responseType !== "arraybuffer") {
64971
65081
  responseData = responseData.toString(responseEncoding);
64972
65082
  if (!responseEncoding || responseEncoding === "utf8") {
64973
- responseData = utils.stripBOM(responseData);
65083
+ responseData = utils$1.stripBOM(responseData);
64974
65084
  }
64975
65085
  }
64976
65086
  response.data = responseData;
@@ -65015,7 +65125,7 @@ var require_axios = __commonJS({
65015
65125
  abort();
65016
65126
  });
65017
65127
  }
65018
- if (utils.isStream(data)) {
65128
+ if (utils$1.isStream(data)) {
65019
65129
  let ended = false;
65020
65130
  let errored = false;
65021
65131
  data.on("end", () => {
@@ -65036,46 +65146,8 @@ var require_axios = __commonJS({
65036
65146
  }
65037
65147
  });
65038
65148
  };
65039
- var cookies = platform.isStandardBrowserEnv ? function standardBrowserEnv() {
65040
- return {
65041
- write: function write(name, value, expires, path, domain, secure) {
65042
- const cookie = [];
65043
- cookie.push(name + "=" + encodeURIComponent(value));
65044
- if (utils.isNumber(expires)) {
65045
- cookie.push("expires=" + new Date(expires).toGMTString());
65046
- }
65047
- if (utils.isString(path)) {
65048
- cookie.push("path=" + path);
65049
- }
65050
- if (utils.isString(domain)) {
65051
- cookie.push("domain=" + domain);
65052
- }
65053
- if (secure === true) {
65054
- cookie.push("secure");
65055
- }
65056
- document.cookie = cookie.join("; ");
65057
- },
65058
- read: function read(name) {
65059
- const match = document.cookie.match(new RegExp("(^|;\\s*)(" + name + ")=([^;]*)"));
65060
- return match ? decodeURIComponent(match[3]) : null;
65061
- },
65062
- remove: function remove(name) {
65063
- this.write(name, "", Date.now() - 864e5);
65064
- }
65065
- };
65066
- }() : function nonStandardBrowserEnv() {
65067
- return {
65068
- write: function write() {
65069
- },
65070
- read: function read() {
65071
- return null;
65072
- },
65073
- remove: function remove() {
65074
- }
65075
- };
65076
- }();
65077
- var isURLSameOrigin = platform.isStandardBrowserEnv ? function standardBrowserEnv() {
65078
- const msie = /(msie|trident)/i.test(navigator.userAgent);
65149
+ var isURLSameOrigin = platform.hasStandardBrowserEnv ? function standardBrowserEnv() {
65150
+ const msie = platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent);
65079
65151
  const urlParsingNode = document.createElement("a");
65080
65152
  let originURL;
65081
65153
  function resolveURL(url2) {
@@ -65098,7 +65170,7 @@ var require_axios = __commonJS({
65098
65170
  }
65099
65171
  originURL = resolveURL(window.location.href);
65100
65172
  return function isURLSameOrigin2(requestURL) {
65101
- const parsed = utils.isString(requestURL) ? resolveURL(requestURL) : requestURL;
65173
+ const parsed = utils$1.isString(requestURL) ? resolveURL(requestURL) : requestURL;
65102
65174
  return parsed.protocol === originURL.protocol && parsed.host === originURL.host;
65103
65175
  };
65104
65176
  }() : function nonStandardBrowserEnv() {
@@ -65106,63 +65178,156 @@ var require_axios = __commonJS({
65106
65178
  return true;
65107
65179
  };
65108
65180
  }();
65109
- function progressEventReducer(listener, isDownloadStream) {
65110
- let bytesNotified = 0;
65111
- const _speedometer = speedometer(50, 250);
65112
- return (e) => {
65113
- const loaded = e.loaded;
65114
- const total = e.lengthComputable ? e.total : void 0;
65115
- const progressBytes = loaded - bytesNotified;
65116
- const rate = _speedometer(progressBytes);
65117
- const inRange = loaded <= total;
65118
- bytesNotified = loaded;
65119
- const data = {
65120
- loaded,
65121
- total,
65122
- progress: total ? loaded / total : void 0,
65123
- bytes: progressBytes,
65124
- rate: rate ? rate : void 0,
65125
- estimated: rate && total && inRange ? (total - loaded) / rate : void 0,
65126
- event: e
65127
- };
65128
- data[isDownloadStream ? "download" : "upload"] = true;
65129
- listener(data);
65181
+ var cookies = platform.hasStandardBrowserEnv ? {
65182
+ write(name, value, expires, path, domain, secure) {
65183
+ const cookie = [name + "=" + encodeURIComponent(value)];
65184
+ utils$1.isNumber(expires) && cookie.push("expires=" + new Date(expires).toGMTString());
65185
+ utils$1.isString(path) && cookie.push("path=" + path);
65186
+ utils$1.isString(domain) && cookie.push("domain=" + domain);
65187
+ secure === true && cookie.push("secure");
65188
+ document.cookie = cookie.join("; ");
65189
+ },
65190
+ read(name) {
65191
+ const match = document.cookie.match(new RegExp("(^|;\\s*)(" + name + ")=([^;]*)"));
65192
+ return match ? decodeURIComponent(match[3]) : null;
65193
+ },
65194
+ remove(name) {
65195
+ this.write(name, "", Date.now() - 864e5);
65196
+ }
65197
+ } : {
65198
+ write() {
65199
+ },
65200
+ read() {
65201
+ return null;
65202
+ },
65203
+ remove() {
65204
+ }
65205
+ };
65206
+ var headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? { ...thing } : thing;
65207
+ function mergeConfig(config1, config2) {
65208
+ config2 = config2 || {};
65209
+ const config = {};
65210
+ function getMergedValue(target, source, caseless) {
65211
+ if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {
65212
+ return utils$1.merge.call({ caseless }, target, source);
65213
+ } else if (utils$1.isPlainObject(source)) {
65214
+ return utils$1.merge({}, source);
65215
+ } else if (utils$1.isArray(source)) {
65216
+ return source.slice();
65217
+ }
65218
+ return source;
65219
+ }
65220
+ function mergeDeepProperties(a, b, caseless) {
65221
+ if (!utils$1.isUndefined(b)) {
65222
+ return getMergedValue(a, b, caseless);
65223
+ } else if (!utils$1.isUndefined(a)) {
65224
+ return getMergedValue(void 0, a, caseless);
65225
+ }
65226
+ }
65227
+ function valueFromConfig2(a, b) {
65228
+ if (!utils$1.isUndefined(b)) {
65229
+ return getMergedValue(void 0, b);
65230
+ }
65231
+ }
65232
+ function defaultToConfig2(a, b) {
65233
+ if (!utils$1.isUndefined(b)) {
65234
+ return getMergedValue(void 0, b);
65235
+ } else if (!utils$1.isUndefined(a)) {
65236
+ return getMergedValue(void 0, a);
65237
+ }
65238
+ }
65239
+ function mergeDirectKeys(a, b, prop) {
65240
+ if (prop in config2) {
65241
+ return getMergedValue(a, b);
65242
+ } else if (prop in config1) {
65243
+ return getMergedValue(void 0, a);
65244
+ }
65245
+ }
65246
+ const mergeMap = {
65247
+ url: valueFromConfig2,
65248
+ method: valueFromConfig2,
65249
+ data: valueFromConfig2,
65250
+ baseURL: defaultToConfig2,
65251
+ transformRequest: defaultToConfig2,
65252
+ transformResponse: defaultToConfig2,
65253
+ paramsSerializer: defaultToConfig2,
65254
+ timeout: defaultToConfig2,
65255
+ timeoutMessage: defaultToConfig2,
65256
+ withCredentials: defaultToConfig2,
65257
+ withXSRFToken: defaultToConfig2,
65258
+ adapter: defaultToConfig2,
65259
+ responseType: defaultToConfig2,
65260
+ xsrfCookieName: defaultToConfig2,
65261
+ xsrfHeaderName: defaultToConfig2,
65262
+ onUploadProgress: defaultToConfig2,
65263
+ onDownloadProgress: defaultToConfig2,
65264
+ decompress: defaultToConfig2,
65265
+ maxContentLength: defaultToConfig2,
65266
+ maxBodyLength: defaultToConfig2,
65267
+ beforeRedirect: defaultToConfig2,
65268
+ transport: defaultToConfig2,
65269
+ httpAgent: defaultToConfig2,
65270
+ httpsAgent: defaultToConfig2,
65271
+ cancelToken: defaultToConfig2,
65272
+ socketPath: defaultToConfig2,
65273
+ responseEncoding: defaultToConfig2,
65274
+ validateStatus: mergeDirectKeys,
65275
+ headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)
65130
65276
  };
65277
+ utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
65278
+ const merge2 = mergeMap[prop] || mergeDeepProperties;
65279
+ const configValue = merge2(config1[prop], config2[prop], prop);
65280
+ utils$1.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config[prop] = configValue);
65281
+ });
65282
+ return config;
65131
65283
  }
65284
+ var resolveConfig = (config) => {
65285
+ const newConfig = mergeConfig({}, config);
65286
+ let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig;
65287
+ newConfig.headers = headers = AxiosHeaders$1.from(headers);
65288
+ newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url), config.params, config.paramsSerializer);
65289
+ if (auth) {
65290
+ headers.set("Authorization", "Basic " + btoa((auth.username || "") + ":" + (auth.password ? unescape(encodeURIComponent(auth.password)) : "")));
65291
+ }
65292
+ let contentType;
65293
+ if (utils$1.isFormData(data)) {
65294
+ if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
65295
+ headers.setContentType(void 0);
65296
+ } else if ((contentType = headers.getContentType()) !== false) {
65297
+ const [type, ...tokens] = contentType ? contentType.split(";").map((token) => token.trim()).filter(Boolean) : [];
65298
+ headers.setContentType([type || "multipart/form-data", ...tokens].join("; "));
65299
+ }
65300
+ }
65301
+ if (platform.hasStandardBrowserEnv) {
65302
+ withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));
65303
+ if (withXSRFToken || withXSRFToken !== false && isURLSameOrigin(newConfig.url)) {
65304
+ const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName);
65305
+ if (xsrfValue) {
65306
+ headers.set(xsrfHeaderName, xsrfValue);
65307
+ }
65308
+ }
65309
+ }
65310
+ return newConfig;
65311
+ };
65132
65312
  var isXHRAdapterSupported = typeof XMLHttpRequest !== "undefined";
65133
65313
  var xhrAdapter = isXHRAdapterSupported && function(config) {
65134
65314
  return new Promise(function dispatchXhrRequest(resolve, reject) {
65135
- let requestData = config.data;
65136
- const requestHeaders = AxiosHeaders$1.from(config.headers).normalize();
65137
- const responseType = config.responseType;
65315
+ const _config = resolveConfig(config);
65316
+ let requestData = _config.data;
65317
+ const requestHeaders = AxiosHeaders$1.from(_config.headers).normalize();
65318
+ let { responseType, onUploadProgress, onDownloadProgress } = _config;
65138
65319
  let onCanceled;
65320
+ let uploadThrottled, downloadThrottled;
65321
+ let flushUpload, flushDownload;
65139
65322
  function done() {
65140
- if (config.cancelToken) {
65141
- config.cancelToken.unsubscribe(onCanceled);
65142
- }
65143
- if (config.signal) {
65144
- config.signal.removeEventListener("abort", onCanceled);
65145
- }
65146
- }
65147
- let contentType;
65148
- if (utils.isFormData(requestData)) {
65149
- if (platform.isStandardBrowserEnv || platform.isStandardBrowserWebWorkerEnv) {
65150
- requestHeaders.setContentType(false);
65151
- } else if (!requestHeaders.getContentType(/^\s*multipart\/form-data/)) {
65152
- requestHeaders.setContentType("multipart/form-data");
65153
- } else if (utils.isString(contentType = requestHeaders.getContentType())) {
65154
- requestHeaders.setContentType(contentType.replace(/^\s*(multipart\/form-data);+/, "$1"));
65155
- }
65323
+ flushUpload && flushUpload();
65324
+ flushDownload && flushDownload();
65325
+ _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);
65326
+ _config.signal && _config.signal.removeEventListener("abort", onCanceled);
65156
65327
  }
65157
65328
  let request = new XMLHttpRequest();
65158
- if (config.auth) {
65159
- const username = config.auth.username || "";
65160
- const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : "";
65161
- requestHeaders.set("Authorization", "Basic " + btoa(username + ":" + password));
65162
- }
65163
- const fullPath = buildFullPath(config.baseURL, config.url);
65164
- request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);
65165
- request.timeout = config.timeout;
65329
+ request.open(_config.method.toUpperCase(), _config.url, true);
65330
+ request.timeout = _config.timeout;
65166
65331
  function onloadend() {
65167
65332
  if (!request) {
65168
65333
  return;
@@ -65211,39 +65376,36 @@ var require_axios = __commonJS({
65211
65376
  request = null;
65212
65377
  };
65213
65378
  request.ontimeout = function handleTimeout() {
65214
- let timeoutErrorMessage = config.timeout ? "timeout of " + config.timeout + "ms exceeded" : "timeout exceeded";
65215
- const transitional = config.transitional || transitionalDefaults;
65216
- if (config.timeoutErrorMessage) {
65217
- timeoutErrorMessage = config.timeoutErrorMessage;
65379
+ let timeoutErrorMessage = _config.timeout ? "timeout of " + _config.timeout + "ms exceeded" : "timeout exceeded";
65380
+ const transitional = _config.transitional || transitionalDefaults;
65381
+ if (_config.timeoutErrorMessage) {
65382
+ timeoutErrorMessage = _config.timeoutErrorMessage;
65218
65383
  }
65219
65384
  reject(new AxiosError(timeoutErrorMessage, transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED, config, request));
65220
65385
  request = null;
65221
65386
  };
65222
- if (platform.isStandardBrowserEnv) {
65223
- const xsrfValue = isURLSameOrigin(fullPath) && config.xsrfCookieName && cookies.read(config.xsrfCookieName);
65224
- if (xsrfValue) {
65225
- requestHeaders.set(config.xsrfHeaderName, xsrfValue);
65226
- }
65227
- }
65228
65387
  requestData === void 0 && requestHeaders.setContentType(null);
65229
65388
  if ("setRequestHeader" in request) {
65230
- utils.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
65389
+ utils$1.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
65231
65390
  request.setRequestHeader(key, val);
65232
65391
  });
65233
65392
  }
65234
- if (!utils.isUndefined(config.withCredentials)) {
65235
- request.withCredentials = !!config.withCredentials;
65393
+ if (!utils$1.isUndefined(_config.withCredentials)) {
65394
+ request.withCredentials = !!_config.withCredentials;
65236
65395
  }
65237
65396
  if (responseType && responseType !== "json") {
65238
- request.responseType = config.responseType;
65397
+ request.responseType = _config.responseType;
65239
65398
  }
65240
- if (typeof config.onDownloadProgress === "function") {
65241
- request.addEventListener("progress", progressEventReducer(config.onDownloadProgress, true));
65399
+ if (onDownloadProgress) {
65400
+ [downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true);
65401
+ request.addEventListener("progress", downloadThrottled);
65242
65402
  }
65243
- if (typeof config.onUploadProgress === "function" && request.upload) {
65244
- request.upload.addEventListener("progress", progressEventReducer(config.onUploadProgress));
65403
+ if (onUploadProgress && request.upload) {
65404
+ [uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress);
65405
+ request.upload.addEventListener("progress", uploadThrottled);
65406
+ request.upload.addEventListener("loadend", flushUpload);
65245
65407
  }
65246
- if (config.cancelToken || config.signal) {
65408
+ if (_config.cancelToken || _config.signal) {
65247
65409
  onCanceled = (cancel) => {
65248
65410
  if (!request) {
65249
65411
  return;
@@ -65252,12 +65414,12 @@ var require_axios = __commonJS({
65252
65414
  request.abort();
65253
65415
  request = null;
65254
65416
  };
65255
- config.cancelToken && config.cancelToken.subscribe(onCanceled);
65256
- if (config.signal) {
65257
- config.signal.aborted ? onCanceled() : config.signal.addEventListener("abort", onCanceled);
65417
+ _config.cancelToken && _config.cancelToken.subscribe(onCanceled);
65418
+ if (_config.signal) {
65419
+ _config.signal.aborted ? onCanceled() : _config.signal.addEventListener("abort", onCanceled);
65258
65420
  }
65259
65421
  }
65260
- const protocol = parseProtocol(fullPath);
65422
+ const protocol = parseProtocol(_config.url);
65261
65423
  if (protocol && platform.protocols.indexOf(protocol) === -1) {
65262
65424
  reject(new AxiosError("Unsupported protocol " + protocol + ":", AxiosError.ERR_BAD_REQUEST, config));
65263
65425
  return;
@@ -65265,11 +65427,271 @@ var require_axios = __commonJS({
65265
65427
  request.send(requestData || null);
65266
65428
  });
65267
65429
  };
65430
+ var composeSignals = (signals, timeout) => {
65431
+ const { length } = signals = signals ? signals.filter(Boolean) : [];
65432
+ if (timeout || length) {
65433
+ let controller = new AbortController();
65434
+ let aborted;
65435
+ const onabort = function(reason) {
65436
+ if (!aborted) {
65437
+ aborted = true;
65438
+ unsubscribe();
65439
+ const err = reason instanceof Error ? reason : this.reason;
65440
+ controller.abort(err instanceof AxiosError ? err : new CanceledError(err instanceof Error ? err.message : err));
65441
+ }
65442
+ };
65443
+ let timer = timeout && setTimeout(() => {
65444
+ timer = null;
65445
+ onabort(new AxiosError(`timeout ${timeout} of ms exceeded`, AxiosError.ETIMEDOUT));
65446
+ }, timeout);
65447
+ const unsubscribe = () => {
65448
+ if (signals) {
65449
+ timer && clearTimeout(timer);
65450
+ timer = null;
65451
+ signals.forEach((signal2) => {
65452
+ signal2.unsubscribe ? signal2.unsubscribe(onabort) : signal2.removeEventListener("abort", onabort);
65453
+ });
65454
+ signals = null;
65455
+ }
65456
+ };
65457
+ signals.forEach((signal2) => signal2.addEventListener("abort", onabort));
65458
+ const { signal } = controller;
65459
+ signal.unsubscribe = () => utils$1.asap(unsubscribe);
65460
+ return signal;
65461
+ }
65462
+ };
65463
+ var composeSignals$1 = composeSignals;
65464
+ var streamChunk = function* (chunk, chunkSize) {
65465
+ let len = chunk.byteLength;
65466
+ if (!chunkSize || len < chunkSize) {
65467
+ yield chunk;
65468
+ return;
65469
+ }
65470
+ let pos = 0;
65471
+ let end;
65472
+ while (pos < len) {
65473
+ end = pos + chunkSize;
65474
+ yield chunk.slice(pos, end);
65475
+ pos = end;
65476
+ }
65477
+ };
65478
+ var readBytes = async function* (iterable, chunkSize) {
65479
+ for await (const chunk of readStream(iterable)) {
65480
+ yield* streamChunk(chunk, chunkSize);
65481
+ }
65482
+ };
65483
+ var readStream = async function* (stream2) {
65484
+ if (stream2[Symbol.asyncIterator]) {
65485
+ yield* stream2;
65486
+ return;
65487
+ }
65488
+ const reader = stream2.getReader();
65489
+ try {
65490
+ for (; ; ) {
65491
+ const { done, value } = await reader.read();
65492
+ if (done) {
65493
+ break;
65494
+ }
65495
+ yield value;
65496
+ }
65497
+ } finally {
65498
+ await reader.cancel();
65499
+ }
65500
+ };
65501
+ var trackStream = (stream2, chunkSize, onProgress, onFinish) => {
65502
+ const iterator = readBytes(stream2, chunkSize);
65503
+ let bytes = 0;
65504
+ let done;
65505
+ let _onFinish = (e) => {
65506
+ if (!done) {
65507
+ done = true;
65508
+ onFinish && onFinish(e);
65509
+ }
65510
+ };
65511
+ return new ReadableStream({
65512
+ async pull(controller) {
65513
+ try {
65514
+ const { done: done2, value } = await iterator.next();
65515
+ if (done2) {
65516
+ _onFinish();
65517
+ controller.close();
65518
+ return;
65519
+ }
65520
+ let len = value.byteLength;
65521
+ if (onProgress) {
65522
+ let loadedBytes = bytes += len;
65523
+ onProgress(loadedBytes);
65524
+ }
65525
+ controller.enqueue(new Uint8Array(value));
65526
+ } catch (err) {
65527
+ _onFinish(err);
65528
+ throw err;
65529
+ }
65530
+ },
65531
+ cancel(reason) {
65532
+ _onFinish(reason);
65533
+ return iterator.return();
65534
+ }
65535
+ }, {
65536
+ highWaterMark: 2
65537
+ });
65538
+ };
65539
+ var isFetchSupported = typeof fetch === "function" && typeof Request === "function" && typeof Response === "function";
65540
+ var isReadableStreamSupported = isFetchSupported && typeof ReadableStream === "function";
65541
+ var encodeText = isFetchSupported && (typeof TextEncoder === "function" ? ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) : async (str) => new Uint8Array(await new Response(str).arrayBuffer()));
65542
+ var test = (fn, ...args) => {
65543
+ try {
65544
+ return !!fn(...args);
65545
+ } catch (e) {
65546
+ return false;
65547
+ }
65548
+ };
65549
+ var supportsRequestStream = isReadableStreamSupported && test(() => {
65550
+ let duplexAccessed = false;
65551
+ const hasContentType = new Request(platform.origin, {
65552
+ body: new ReadableStream(),
65553
+ method: "POST",
65554
+ get duplex() {
65555
+ duplexAccessed = true;
65556
+ return "half";
65557
+ }
65558
+ }).headers.has("Content-Type");
65559
+ return duplexAccessed && !hasContentType;
65560
+ });
65561
+ var DEFAULT_CHUNK_SIZE = 64 * 1024;
65562
+ var supportsResponseStream = isReadableStreamSupported && test(() => utils$1.isReadableStream(new Response("").body));
65563
+ var resolvers = {
65564
+ stream: supportsResponseStream && ((res) => res.body)
65565
+ };
65566
+ isFetchSupported && ((res) => {
65567
+ ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((type) => {
65568
+ !resolvers[type] && (resolvers[type] = utils$1.isFunction(res[type]) ? (res2) => res2[type]() : (_, config) => {
65569
+ throw new AxiosError(`Response type '${type}' is not supported`, AxiosError.ERR_NOT_SUPPORT, config);
65570
+ });
65571
+ });
65572
+ })(new Response());
65573
+ var getBodyLength = async (body) => {
65574
+ if (body == null) {
65575
+ return 0;
65576
+ }
65577
+ if (utils$1.isBlob(body)) {
65578
+ return body.size;
65579
+ }
65580
+ if (utils$1.isSpecCompliantForm(body)) {
65581
+ const _request = new Request(platform.origin, {
65582
+ method: "POST",
65583
+ body
65584
+ });
65585
+ return (await _request.arrayBuffer()).byteLength;
65586
+ }
65587
+ if (utils$1.isArrayBufferView(body) || utils$1.isArrayBuffer(body)) {
65588
+ return body.byteLength;
65589
+ }
65590
+ if (utils$1.isURLSearchParams(body)) {
65591
+ body = body + "";
65592
+ }
65593
+ if (utils$1.isString(body)) {
65594
+ return (await encodeText(body)).byteLength;
65595
+ }
65596
+ };
65597
+ var resolveBodyLength = async (headers, body) => {
65598
+ const length = utils$1.toFiniteNumber(headers.getContentLength());
65599
+ return length == null ? getBodyLength(body) : length;
65600
+ };
65601
+ var fetchAdapter = isFetchSupported && (async (config) => {
65602
+ let {
65603
+ url: url2,
65604
+ method,
65605
+ data,
65606
+ signal,
65607
+ cancelToken,
65608
+ timeout,
65609
+ onDownloadProgress,
65610
+ onUploadProgress,
65611
+ responseType,
65612
+ headers,
65613
+ withCredentials = "same-origin",
65614
+ fetchOptions
65615
+ } = resolveConfig(config);
65616
+ responseType = responseType ? (responseType + "").toLowerCase() : "text";
65617
+ let composedSignal = composeSignals$1([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
65618
+ let request;
65619
+ const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
65620
+ composedSignal.unsubscribe();
65621
+ });
65622
+ let requestContentLength;
65623
+ try {
65624
+ if (onUploadProgress && supportsRequestStream && method !== "get" && method !== "head" && (requestContentLength = await resolveBodyLength(headers, data)) !== 0) {
65625
+ let _request = new Request(url2, {
65626
+ method: "POST",
65627
+ body: data,
65628
+ duplex: "half"
65629
+ });
65630
+ let contentTypeHeader;
65631
+ if (utils$1.isFormData(data) && (contentTypeHeader = _request.headers.get("content-type"))) {
65632
+ headers.setContentType(contentTypeHeader);
65633
+ }
65634
+ if (_request.body) {
65635
+ const [onProgress, flush] = progressEventDecorator(requestContentLength, progressEventReducer(asyncDecorator(onUploadProgress)));
65636
+ data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
65637
+ }
65638
+ }
65639
+ if (!utils$1.isString(withCredentials)) {
65640
+ withCredentials = withCredentials ? "include" : "omit";
65641
+ }
65642
+ const isCredentialsSupported = "credentials" in Request.prototype;
65643
+ request = new Request(url2, {
65644
+ ...fetchOptions,
65645
+ signal: composedSignal,
65646
+ method: method.toUpperCase(),
65647
+ headers: headers.normalize().toJSON(),
65648
+ body: data,
65649
+ duplex: "half",
65650
+ credentials: isCredentialsSupported ? withCredentials : void 0
65651
+ });
65652
+ let response = await fetch(request);
65653
+ const isStreamResponse = supportsResponseStream && (responseType === "stream" || responseType === "response");
65654
+ if (supportsResponseStream && (onDownloadProgress || isStreamResponse && unsubscribe)) {
65655
+ const options = {};
65656
+ ["status", "statusText", "headers"].forEach((prop) => {
65657
+ options[prop] = response[prop];
65658
+ });
65659
+ const responseContentLength = utils$1.toFiniteNumber(response.headers.get("content-length"));
65660
+ const [onProgress, flush] = onDownloadProgress && progressEventDecorator(responseContentLength, progressEventReducer(asyncDecorator(onDownloadProgress), true)) || [];
65661
+ response = new Response(trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
65662
+ flush && flush();
65663
+ unsubscribe && unsubscribe();
65664
+ }), options);
65665
+ }
65666
+ responseType = responseType || "text";
65667
+ let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || "text"](response, config);
65668
+ !isStreamResponse && unsubscribe && unsubscribe();
65669
+ return await new Promise((resolve, reject) => {
65670
+ settle(resolve, reject, {
65671
+ data: responseData,
65672
+ headers: AxiosHeaders$1.from(response.headers),
65673
+ status: response.status,
65674
+ statusText: response.statusText,
65675
+ config,
65676
+ request
65677
+ });
65678
+ });
65679
+ } catch (err) {
65680
+ unsubscribe && unsubscribe();
65681
+ if (err && err.name === "TypeError" && /fetch/i.test(err.message)) {
65682
+ throw Object.assign(new AxiosError("Network Error", AxiosError.ERR_NETWORK, config, request), {
65683
+ cause: err.cause || err
65684
+ });
65685
+ }
65686
+ throw AxiosError.from(err, err && err.code, config, request);
65687
+ }
65688
+ });
65268
65689
  var knownAdapters = {
65269
65690
  http: httpAdapter,
65270
- xhr: xhrAdapter
65691
+ xhr: xhrAdapter,
65692
+ fetch: fetchAdapter
65271
65693
  };
65272
- utils.forEach(knownAdapters, (fn, value) => {
65694
+ utils$1.forEach(knownAdapters, (fn, value) => {
65273
65695
  if (fn) {
65274
65696
  try {
65275
65697
  Object.defineProperty(fn, "name", { value });
@@ -65279,10 +65701,10 @@ var require_axios = __commonJS({
65279
65701
  }
65280
65702
  });
65281
65703
  var renderReason = (reason) => `- ${reason}`;
65282
- var isResolvedHandle = (adapter) => utils.isFunction(adapter) || adapter === null || adapter === false;
65704
+ var isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false;
65283
65705
  var adapters = {
65284
65706
  getAdapter: (adapters2) => {
65285
- adapters2 = utils.isArray(adapters2) ? adapters2 : [adapters2];
65707
+ adapters2 = utils$1.isArray(adapters2) ? adapters2 : [adapters2];
65286
65708
  const { length } = adapters2;
65287
65709
  let nameOrAdapter;
65288
65710
  let adapter;
@@ -65343,83 +65765,6 @@ var require_axios = __commonJS({
65343
65765
  return Promise.reject(reason);
65344
65766
  });
65345
65767
  }
65346
- var headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? thing.toJSON() : thing;
65347
- function mergeConfig(config1, config2) {
65348
- config2 = config2 || {};
65349
- const config = {};
65350
- function getMergedValue(target, source, caseless) {
65351
- if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
65352
- return utils.merge.call({ caseless }, target, source);
65353
- } else if (utils.isPlainObject(source)) {
65354
- return utils.merge({}, source);
65355
- } else if (utils.isArray(source)) {
65356
- return source.slice();
65357
- }
65358
- return source;
65359
- }
65360
- function mergeDeepProperties(a, b, caseless) {
65361
- if (!utils.isUndefined(b)) {
65362
- return getMergedValue(a, b, caseless);
65363
- } else if (!utils.isUndefined(a)) {
65364
- return getMergedValue(void 0, a, caseless);
65365
- }
65366
- }
65367
- function valueFromConfig2(a, b) {
65368
- if (!utils.isUndefined(b)) {
65369
- return getMergedValue(void 0, b);
65370
- }
65371
- }
65372
- function defaultToConfig2(a, b) {
65373
- if (!utils.isUndefined(b)) {
65374
- return getMergedValue(void 0, b);
65375
- } else if (!utils.isUndefined(a)) {
65376
- return getMergedValue(void 0, a);
65377
- }
65378
- }
65379
- function mergeDirectKeys(a, b, prop) {
65380
- if (prop in config2) {
65381
- return getMergedValue(a, b);
65382
- } else if (prop in config1) {
65383
- return getMergedValue(void 0, a);
65384
- }
65385
- }
65386
- const mergeMap = {
65387
- url: valueFromConfig2,
65388
- method: valueFromConfig2,
65389
- data: valueFromConfig2,
65390
- baseURL: defaultToConfig2,
65391
- transformRequest: defaultToConfig2,
65392
- transformResponse: defaultToConfig2,
65393
- paramsSerializer: defaultToConfig2,
65394
- timeout: defaultToConfig2,
65395
- timeoutMessage: defaultToConfig2,
65396
- withCredentials: defaultToConfig2,
65397
- adapter: defaultToConfig2,
65398
- responseType: defaultToConfig2,
65399
- xsrfCookieName: defaultToConfig2,
65400
- xsrfHeaderName: defaultToConfig2,
65401
- onUploadProgress: defaultToConfig2,
65402
- onDownloadProgress: defaultToConfig2,
65403
- decompress: defaultToConfig2,
65404
- maxContentLength: defaultToConfig2,
65405
- maxBodyLength: defaultToConfig2,
65406
- beforeRedirect: defaultToConfig2,
65407
- transport: defaultToConfig2,
65408
- httpAgent: defaultToConfig2,
65409
- httpsAgent: defaultToConfig2,
65410
- cancelToken: defaultToConfig2,
65411
- socketPath: defaultToConfig2,
65412
- responseEncoding: defaultToConfig2,
65413
- validateStatus: mergeDirectKeys,
65414
- headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)
65415
- };
65416
- utils.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
65417
- const merge2 = mergeMap[prop] || mergeDeepProperties;
65418
- const configValue = merge2(config1[prop], config2[prop], prop);
65419
- utils.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config[prop] = configValue);
65420
- });
65421
- return config;
65422
- }
65423
65768
  var validators$1 = {};
65424
65769
  ["object", "boolean", "number", "function", "string", "symbol"].forEach((type, i) => {
65425
65770
  validators$1[type] = function validator2(thing) {
@@ -65477,7 +65822,27 @@ var require_axios = __commonJS({
65477
65822
  response: new InterceptorManager$1()
65478
65823
  };
65479
65824
  }
65480
- request(configOrUrl, config) {
65825
+ async request(configOrUrl, config) {
65826
+ try {
65827
+ return await this._request(configOrUrl, config);
65828
+ } catch (err) {
65829
+ if (err instanceof Error) {
65830
+ let dummy;
65831
+ Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : dummy = new Error();
65832
+ const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, "") : "";
65833
+ try {
65834
+ if (!err.stack) {
65835
+ err.stack = stack;
65836
+ } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ""))) {
65837
+ err.stack += "\n" + stack;
65838
+ }
65839
+ } catch (e) {
65840
+ }
65841
+ }
65842
+ throw err;
65843
+ }
65844
+ }
65845
+ _request(configOrUrl, config) {
65481
65846
  if (typeof configOrUrl === "string") {
65482
65847
  config = config || {};
65483
65848
  config.url = configOrUrl;
@@ -65494,7 +65859,7 @@ var require_axios = __commonJS({
65494
65859
  }, false);
65495
65860
  }
65496
65861
  if (paramsSerializer != null) {
65497
- if (utils.isFunction(paramsSerializer)) {
65862
+ if (utils$1.isFunction(paramsSerializer)) {
65498
65863
  config.paramsSerializer = {
65499
65864
  serialize: paramsSerializer
65500
65865
  };
@@ -65506,8 +65871,8 @@ var require_axios = __commonJS({
65506
65871
  }
65507
65872
  }
65508
65873
  config.method = (config.method || this.defaults.method || "get").toLowerCase();
65509
- let contextHeaders = headers && utils.merge(headers.common, headers[config.method]);
65510
- headers && utils.forEach(["delete", "get", "head", "post", "put", "patch", "common"], (method) => {
65874
+ let contextHeaders = headers && utils$1.merge(headers.common, headers[config.method]);
65875
+ headers && utils$1.forEach(["delete", "get", "head", "post", "put", "patch", "common"], (method) => {
65511
65876
  delete headers[method];
65512
65877
  });
65513
65878
  config.headers = AxiosHeaders$1.concat(contextHeaders, headers);
@@ -65569,7 +65934,7 @@ var require_axios = __commonJS({
65569
65934
  return buildURL(fullPath, config.params, config.paramsSerializer);
65570
65935
  }
65571
65936
  };
65572
- utils.forEach(["delete", "get", "head", "options"], function forEachMethodNoData(method) {
65937
+ utils$1.forEach(["delete", "get", "head", "options"], function forEachMethodNoData(method) {
65573
65938
  Axios.prototype[method] = function(url2, config) {
65574
65939
  return this.request(mergeConfig(config || {}, {
65575
65940
  method,
@@ -65578,7 +65943,7 @@ var require_axios = __commonJS({
65578
65943
  }));
65579
65944
  };
65580
65945
  });
65581
- utils.forEach(["post", "put", "patch"], function forEachMethodWithData(method) {
65946
+ utils$1.forEach(["post", "put", "patch"], function forEachMethodWithData(method) {
65582
65947
  function generateHTTPMethod(isForm) {
65583
65948
  return function httpMethod(url2, data, config) {
65584
65949
  return this.request(mergeConfig(config || {}, {
@@ -65658,6 +66023,15 @@ var require_axios = __commonJS({
65658
66023
  this._listeners.splice(index, 1);
65659
66024
  }
65660
66025
  }
66026
+ toAbortSignal() {
66027
+ const controller = new AbortController();
66028
+ const abort = (err) => {
66029
+ controller.abort(err);
66030
+ };
66031
+ this.subscribe(abort);
66032
+ controller.signal.unsubscribe = () => this.unsubscribe(abort);
66033
+ return controller.signal;
66034
+ }
65661
66035
  static source() {
65662
66036
  let cancel;
65663
66037
  const token = new CancelToken(function executor(c) {
@@ -65676,7 +66050,7 @@ var require_axios = __commonJS({
65676
66050
  };
65677
66051
  }
65678
66052
  function isAxiosError(payload) {
65679
- return utils.isObject(payload) && payload.isAxiosError === true;
66053
+ return utils$1.isObject(payload) && payload.isAxiosError === true;
65680
66054
  }
65681
66055
  var HttpStatusCode = {
65682
66056
  Continue: 100,
@@ -65750,8 +66124,8 @@ var require_axios = __commonJS({
65750
66124
  function createInstance(defaultConfig) {
65751
66125
  const context = new Axios$1(defaultConfig);
65752
66126
  const instance = bind(Axios$1.prototype.request, context);
65753
- utils.extend(instance, Axios$1.prototype, context, { allOwnKeys: true });
65754
- utils.extend(instance, context, null, { allOwnKeys: true });
66127
+ utils$1.extend(instance, Axios$1.prototype, context, { allOwnKeys: true });
66128
+ utils$1.extend(instance, context, null, { allOwnKeys: true });
65755
66129
  instance.create = function create(instanceConfig) {
65756
66130
  return createInstance(mergeConfig(defaultConfig, instanceConfig));
65757
66131
  };
@@ -65773,7 +66147,7 @@ var require_axios = __commonJS({
65773
66147
  axios2.isAxiosError = isAxiosError;
65774
66148
  axios2.mergeConfig = mergeConfig;
65775
66149
  axios2.AxiosHeaders = AxiosHeaders$1;
65776
- axios2.formToJSON = (thing) => formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);
66150
+ axios2.formToJSON = (thing) => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);
65777
66151
  axios2.getAdapter = adapters.getAdapter;
65778
66152
  axios2.HttpStatusCode = HttpStatusCode$1;
65779
66153
  axios2.default = axios2;