firecrawl 1.23.2 → 1.23.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -39,7 +39,7 @@ var require_delayed_stream = __commonJS({
39
39
  "node_modules/delayed-stream/lib/delayed_stream.js"(exports, module) {
40
40
  "use strict";
41
41
  var Stream = __require("stream").Stream;
42
- var util3 = __require("util");
42
+ var util2 = __require("util");
43
43
  module.exports = DelayedStream;
44
44
  function DelayedStream() {
45
45
  this.source = null;
@@ -50,7 +50,7 @@ var require_delayed_stream = __commonJS({
50
50
  this._released = false;
51
51
  this._bufferedEvents = [];
52
52
  }
53
- util3.inherits(DelayedStream, Stream);
53
+ util2.inherits(DelayedStream, Stream);
54
54
  DelayedStream.create = function(source, options) {
55
55
  var delayedStream = new this();
56
56
  options = options || {};
@@ -130,7 +130,7 @@ var require_delayed_stream = __commonJS({
130
130
  var require_combined_stream = __commonJS({
131
131
  "node_modules/combined-stream/lib/combined_stream.js"(exports, module) {
132
132
  "use strict";
133
- var util3 = __require("util");
133
+ var util2 = __require("util");
134
134
  var Stream = __require("stream").Stream;
135
135
  var DelayedStream = require_delayed_stream();
136
136
  module.exports = CombinedStream;
@@ -146,7 +146,7 @@ var require_combined_stream = __commonJS({
146
146
  this._insideLoop = false;
147
147
  this._pendingNext = false;
148
148
  }
149
- util3.inherits(CombinedStream, Stream);
149
+ util2.inherits(CombinedStream, Stream);
150
150
  CombinedStream.create = function(options) {
151
151
  var combinedStream = new this();
152
152
  options = options || {};
@@ -9156,7 +9156,7 @@ var require_form_data = __commonJS({
9156
9156
  "node_modules/form-data/lib/form_data.js"(exports, module) {
9157
9157
  "use strict";
9158
9158
  var CombinedStream = require_combined_stream();
9159
- var util3 = __require("util");
9159
+ var util2 = __require("util");
9160
9160
  var path = __require("path");
9161
9161
  var http2 = __require("http");
9162
9162
  var https2 = __require("https");
@@ -9167,7 +9167,7 @@ var require_form_data = __commonJS({
9167
9167
  var asynckit = require_asynckit();
9168
9168
  var populate = require_populate();
9169
9169
  module.exports = FormData3;
9170
- util3.inherits(FormData3, CombinedStream);
9170
+ util2.inherits(FormData3, CombinedStream);
9171
9171
  function FormData3(options) {
9172
9172
  if (!(this instanceof FormData3)) {
9173
9173
  return new FormData3(options);
@@ -9192,7 +9192,7 @@ var require_form_data = __commonJS({
9192
9192
  if (typeof value == "number") {
9193
9193
  value = "" + value;
9194
9194
  }
9195
- if (util3.isArray(value)) {
9195
+ if (util2.isArray(value)) {
9196
9196
  this._error(new Error("Arrays are not supported."));
9197
9197
  return;
9198
9198
  }
@@ -9482,7 +9482,7 @@ var require_proxy_from_env = __commonJS({
9482
9482
  var stringEndsWith = String.prototype.endsWith || function(s) {
9483
9483
  return s.length <= this.length && this.indexOf(s, this.length - s.length) !== -1;
9484
9484
  };
9485
- function getProxyForUrl(url2) {
9485
+ function getProxyForUrl2(url2) {
9486
9486
  var parsedUrl = typeof url2 === "string" ? parseUrl(url2) : url2 || {};
9487
9487
  var proto = parsedUrl.protocol;
9488
9488
  var hostname = parsedUrl.host;
@@ -9532,7 +9532,7 @@ var require_proxy_from_env = __commonJS({
9532
9532
  function getEnv(key) {
9533
9533
  return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || "";
9534
9534
  }
9535
- exports.getProxyForUrl = getProxyForUrl;
9535
+ exports.getProxyForUrl = getProxyForUrl2;
9536
9536
  }
9537
9537
  });
9538
9538
 
@@ -10108,14 +10108,14 @@ var require_node = __commonJS({
10108
10108
  "node_modules/debug/src/node.js"(exports, module) {
10109
10109
  "use strict";
10110
10110
  var tty = __require("tty");
10111
- var util3 = __require("util");
10111
+ var util2 = __require("util");
10112
10112
  exports.init = init;
10113
10113
  exports.log = log;
10114
10114
  exports.formatArgs = formatArgs;
10115
10115
  exports.save = save;
10116
10116
  exports.load = load;
10117
10117
  exports.useColors = useColors;
10118
- exports.destroy = util3.deprecate(
10118
+ exports.destroy = util2.deprecate(
10119
10119
  () => {
10120
10120
  },
10121
10121
  "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."
@@ -10246,7 +10246,7 @@ var require_node = __commonJS({
10246
10246
  return (/* @__PURE__ */ new Date()).toISOString() + " ";
10247
10247
  }
10248
10248
  function log(...args) {
10249
- return process.stderr.write(util3.formatWithOptions(exports.inspectOpts, ...args) + "\n");
10249
+ return process.stderr.write(util2.formatWithOptions(exports.inspectOpts, ...args) + "\n");
10250
10250
  }
10251
10251
  function save(namespaces) {
10252
10252
  if (namespaces) {
@@ -10269,11 +10269,11 @@ var require_node = __commonJS({
10269
10269
  var { formatters } = module.exports;
10270
10270
  formatters.o = function(v) {
10271
10271
  this.inspectOpts.colors = this.useColors;
10272
- return util3.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" ");
10272
+ return util2.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" ");
10273
10273
  };
10274
10274
  formatters.O = function(v) {
10275
10275
  this.inspectOpts.colors = this.useColors;
10276
- return util3.inspect(v, this.inspectOpts);
10276
+ return util2.inspect(v, this.inspectOpts);
10277
10277
  };
10278
10278
  }
10279
10279
  });
@@ -10855,7 +10855,6 @@ var isFormData = (thing) => {
10855
10855
  kind === "object" && isFunction(thing.toString) && thing.toString() === "[object FormData]"));
10856
10856
  };
10857
10857
  var isURLSearchParams = kindOfTest("URLSearchParams");
10858
- var [isReadableStream, isRequest, isResponse, isHeaders] = ["ReadableStream", "Request", "Response", "Headers"].map(kindOfTest);
10859
10858
  var trim = (str) => str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
10860
10859
  function forEach(obj, fn, { allOwnKeys = false } = {}) {
10861
10860
  if (obj === null || typeof obj === "undefined") {
@@ -11059,7 +11058,23 @@ var toObjectSet = (arrayOrString, delimiter) => {
11059
11058
  var noop = () => {
11060
11059
  };
11061
11060
  var toFiniteNumber = (value, defaultValue) => {
11062
- return value != null && Number.isFinite(value = +value) ? value : defaultValue;
11061
+ value = +value;
11062
+ return Number.isFinite(value) ? value : defaultValue;
11063
+ };
11064
+ var ALPHA = "abcdefghijklmnopqrstuvwxyz";
11065
+ var DIGIT = "0123456789";
11066
+ var ALPHABET = {
11067
+ DIGIT,
11068
+ ALPHA,
11069
+ ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
11070
+ };
11071
+ var generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
11072
+ let str = "";
11073
+ const { length } = alphabet;
11074
+ while (size--) {
11075
+ str += alphabet[Math.random() * length | 0];
11076
+ }
11077
+ return str;
11063
11078
  };
11064
11079
  function isSpecCompliantForm(thing) {
11065
11080
  return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === "FormData" && thing[Symbol.iterator]);
@@ -11088,26 +11103,6 @@ var toJSONObject = (obj) => {
11088
11103
  };
11089
11104
  var isAsyncFn = kindOfTest("AsyncFunction");
11090
11105
  var isThenable = (thing) => thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);
11091
- var _setImmediate = ((setImmediateSupported, postMessageSupported) => {
11092
- if (setImmediateSupported) {
11093
- return setImmediate;
11094
- }
11095
- return postMessageSupported ? ((token, callbacks) => {
11096
- _global.addEventListener("message", ({ source, data }) => {
11097
- if (source === _global && data === token) {
11098
- callbacks.length && callbacks.shift()();
11099
- }
11100
- }, false);
11101
- return (cb) => {
11102
- callbacks.push(cb);
11103
- _global.postMessage(token, "*");
11104
- };
11105
- })(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);
11106
- })(
11107
- typeof setImmediate === "function",
11108
- isFunction(_global.postMessage)
11109
- );
11110
- var asap = typeof queueMicrotask !== "undefined" ? queueMicrotask.bind(_global) : typeof process !== "undefined" && process.nextTick || _setImmediate;
11111
11106
  var utils_default = {
11112
11107
  isArray,
11113
11108
  isArrayBuffer,
@@ -11119,10 +11114,6 @@ var utils_default = {
11119
11114
  isBoolean,
11120
11115
  isObject,
11121
11116
  isPlainObject,
11122
- isReadableStream,
11123
- isRequest,
11124
- isResponse,
11125
- isHeaders,
11126
11117
  isUndefined,
11127
11118
  isDate,
11128
11119
  isFile,
@@ -11159,12 +11150,12 @@ var utils_default = {
11159
11150
  findKey,
11160
11151
  global: _global,
11161
11152
  isContextDefined,
11153
+ ALPHABET,
11154
+ generateString,
11162
11155
  isSpecCompliantForm,
11163
11156
  toJSONObject,
11164
11157
  isAsyncFn,
11165
- isThenable,
11166
- setImmediate: _setImmediate,
11167
- asap
11158
+ isThenable
11168
11159
  };
11169
11160
 
11170
11161
  // node_modules/axios/lib/core/AxiosError.js
@@ -11180,10 +11171,7 @@ function AxiosError(message, code, config, request, response) {
11180
11171
  code && (this.code = code);
11181
11172
  config && (this.config = config);
11182
11173
  request && (this.request = request);
11183
- if (response) {
11184
- this.response = response;
11185
- this.status = response.status ? response.status : null;
11186
- }
11174
+ response && (this.response = response);
11187
11175
  }
11188
11176
  utils_default.inherits(AxiosError, Error, {
11189
11177
  toJSON: function toJSON() {
@@ -11202,7 +11190,7 @@ utils_default.inherits(AxiosError, Error, {
11202
11190
  // Axios
11203
11191
  config: utils_default.toJSONObject(this.config),
11204
11192
  code: this.code,
11205
- status: this.status
11193
+ status: this.response && this.response.status ? this.response.status : null
11206
11194
  };
11207
11195
  }
11208
11196
  });
@@ -11400,11 +11388,6 @@ function buildURL(url2, params, options) {
11400
11388
  return url2;
11401
11389
  }
11402
11390
  const _encode = options && options.encode || encode2;
11403
- if (utils_default.isFunction(options)) {
11404
- options = {
11405
- serialize: options
11406
- };
11407
- }
11408
11391
  const serializeFn = options && options.serialize;
11409
11392
  let serializedParams;
11410
11393
  if (serializeFn) {
@@ -11493,31 +11476,11 @@ var transitional_default = {
11493
11476
  clarifyTimeoutError: false
11494
11477
  };
11495
11478
 
11496
- // node_modules/axios/lib/platform/node/index.js
11497
- import crypto from "crypto";
11498
-
11499
11479
  // node_modules/axios/lib/platform/node/classes/URLSearchParams.js
11500
11480
  import url from "url";
11501
11481
  var URLSearchParams_default = url.URLSearchParams;
11502
11482
 
11503
11483
  // node_modules/axios/lib/platform/node/index.js
11504
- var ALPHA = "abcdefghijklmnopqrstuvwxyz";
11505
- var DIGIT = "0123456789";
11506
- var ALPHABET = {
11507
- DIGIT,
11508
- ALPHA,
11509
- ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
11510
- };
11511
- var generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
11512
- let str = "";
11513
- const { length } = alphabet;
11514
- const randomValues = new Uint32Array(size);
11515
- crypto.randomFillSync(randomValues);
11516
- for (let i = 0; i < size; i++) {
11517
- str += alphabet[randomValues[i] % length];
11518
- }
11519
- return str;
11520
- };
11521
11484
  var node_default = {
11522
11485
  isNode: true,
11523
11486
  classes: {
@@ -11525,8 +11488,6 @@ var node_default = {
11525
11488
  FormData: FormData_default,
11526
11489
  Blob: typeof Blob !== "undefined" && Blob || null
11527
11490
  },
11528
- ALPHABET,
11529
- generateString,
11530
11491
  protocols: ["http", "https", "file", "data"]
11531
11492
  };
11532
11493
 
@@ -11535,18 +11496,16 @@ var utils_exports = {};
11535
11496
  __export(utils_exports, {
11536
11497
  hasBrowserEnv: () => hasBrowserEnv,
11537
11498
  hasStandardBrowserEnv: () => hasStandardBrowserEnv,
11538
- hasStandardBrowserWebWorkerEnv: () => hasStandardBrowserWebWorkerEnv,
11539
- navigator: () => _navigator,
11540
- origin: () => origin
11499
+ hasStandardBrowserWebWorkerEnv: () => hasStandardBrowserWebWorkerEnv
11541
11500
  });
11542
11501
  var hasBrowserEnv = typeof window !== "undefined" && typeof document !== "undefined";
11543
- var _navigator = typeof navigator === "object" && navigator || void 0;
11544
- var hasStandardBrowserEnv = hasBrowserEnv && (!_navigator || ["ReactNative", "NativeScript", "NS"].indexOf(_navigator.product) < 0);
11502
+ var hasStandardBrowserEnv = ((product) => {
11503
+ return hasBrowserEnv && ["ReactNative", "NativeScript", "NS"].indexOf(product) < 0;
11504
+ })(typeof navigator !== "undefined" && navigator.product);
11545
11505
  var hasStandardBrowserWebWorkerEnv = (() => {
11546
11506
  return typeof WorkerGlobalScope !== "undefined" && // eslint-disable-next-line no-undef
11547
11507
  self instanceof WorkerGlobalScope && typeof self.importScripts === "function";
11548
11508
  })();
11549
- var origin = hasBrowserEnv && window.location.href || "http://localhost";
11550
11509
 
11551
11510
  // node_modules/axios/lib/platform/index.js
11552
11511
  var platform_default = {
@@ -11636,7 +11595,7 @@ function stringifySafely(rawValue, parser, encoder) {
11636
11595
  }
11637
11596
  var defaults = {
11638
11597
  transitional: transitional_default,
11639
- adapter: ["xhr", "http", "fetch"],
11598
+ adapter: ["xhr", "http"],
11640
11599
  transformRequest: [function transformRequest(data, headers) {
11641
11600
  const contentType = headers.getContentType() || "";
11642
11601
  const hasJSONContentType = contentType.indexOf("application/json") > -1;
@@ -11648,7 +11607,7 @@ var defaults = {
11648
11607
  if (isFormData2) {
11649
11608
  return hasJSONContentType ? JSON.stringify(formDataToJSON_default(data)) : data;
11650
11609
  }
11651
- if (utils_default.isArrayBuffer(data) || utils_default.isBuffer(data) || utils_default.isStream(data) || utils_default.isFile(data) || utils_default.isBlob(data) || utils_default.isReadableStream(data)) {
11610
+ if (utils_default.isArrayBuffer(data) || utils_default.isBuffer(data) || utils_default.isStream(data) || utils_default.isFile(data) || utils_default.isBlob(data)) {
11652
11611
  return data;
11653
11612
  }
11654
11613
  if (utils_default.isArrayBufferView(data)) {
@@ -11682,9 +11641,6 @@ var defaults = {
11682
11641
  const transitional2 = this.transitional || defaults.transitional;
11683
11642
  const forcedJSONParsing = transitional2 && transitional2.forcedJSONParsing;
11684
11643
  const JSONRequested = this.responseType === "json";
11685
- if (utils_default.isResponse(data) || utils_default.isReadableStream(data)) {
11686
- return data;
11687
- }
11688
11644
  if (data && utils_default.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) {
11689
11645
  const silentJSONParsing = transitional2 && transitional2.silentJSONParsing;
11690
11646
  const strictJSONParsing = !silentJSONParsing && JSONRequested;
@@ -11847,10 +11803,6 @@ var AxiosHeaders = class {
11847
11803
  setHeaders(header, valueOrRewrite);
11848
11804
  } else if (utils_default.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
11849
11805
  setHeaders(parseHeaders_default(header), valueOrRewrite);
11850
- } else if (utils_default.isHeaders(header)) {
11851
- for (const [key, value] of header.entries()) {
11852
- setHeader(value, key, rewrite);
11853
- }
11854
11806
  } else {
11855
11807
  header != null && setHeader(valueOrRewrite, header, rewrite);
11856
11808
  }
@@ -12050,9 +12002,8 @@ function combineURLs(baseURL, relativeURL) {
12050
12002
  }
12051
12003
 
12052
12004
  // node_modules/axios/lib/core/buildFullPath.js
12053
- function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
12054
- let isRelativeUrl = !isAbsoluteURL(requestedURL);
12055
- if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) {
12005
+ function buildFullPath(baseURL, requestedURL) {
12006
+ if (baseURL && !isAbsoluteURL(requestedURL)) {
12056
12007
  return combineURLs(baseURL, requestedURL);
12057
12008
  }
12058
12009
  return requestedURL;
@@ -12063,11 +12014,11 @@ var import_proxy_from_env = __toESM(require_proxy_from_env(), 1);
12063
12014
  var import_follow_redirects = __toESM(require_follow_redirects(), 1);
12064
12015
  import http from "http";
12065
12016
  import https from "https";
12066
- import util2 from "util";
12017
+ import util from "util";
12067
12018
  import zlib from "zlib";
12068
12019
 
12069
12020
  // node_modules/axios/lib/env/data.js
12070
- var VERSION = "1.8.4";
12021
+ var VERSION = "1.6.8";
12071
12022
 
12072
12023
  // node_modules/axios/lib/helpers/parseProtocol.js
12073
12024
  function parseProtocol(url2) {
@@ -12109,6 +12060,70 @@ import stream3 from "stream";
12109
12060
 
12110
12061
  // node_modules/axios/lib/helpers/AxiosTransformStream.js
12111
12062
  import stream from "stream";
12063
+
12064
+ // node_modules/axios/lib/helpers/throttle.js
12065
+ function throttle(fn, freq) {
12066
+ let timestamp = 0;
12067
+ const threshold = 1e3 / freq;
12068
+ let timer = null;
12069
+ return function throttled(force, args) {
12070
+ const now = Date.now();
12071
+ if (force || now - timestamp > threshold) {
12072
+ if (timer) {
12073
+ clearTimeout(timer);
12074
+ timer = null;
12075
+ }
12076
+ timestamp = now;
12077
+ return fn.apply(null, args);
12078
+ }
12079
+ if (!timer) {
12080
+ timer = setTimeout(() => {
12081
+ timer = null;
12082
+ timestamp = Date.now();
12083
+ return fn.apply(null, args);
12084
+ }, threshold - (now - timestamp));
12085
+ }
12086
+ };
12087
+ }
12088
+ var throttle_default = throttle;
12089
+
12090
+ // node_modules/axios/lib/helpers/speedometer.js
12091
+ function speedometer(samplesCount, min) {
12092
+ samplesCount = samplesCount || 10;
12093
+ const bytes = new Array(samplesCount);
12094
+ const timestamps = new Array(samplesCount);
12095
+ let head = 0;
12096
+ let tail = 0;
12097
+ let firstSampleTS;
12098
+ min = min !== void 0 ? min : 1e3;
12099
+ return function push(chunkLength) {
12100
+ const now = Date.now();
12101
+ const startedAt = timestamps[tail];
12102
+ if (!firstSampleTS) {
12103
+ firstSampleTS = now;
12104
+ }
12105
+ bytes[head] = chunkLength;
12106
+ timestamps[head] = now;
12107
+ let i = tail;
12108
+ let bytesCount = 0;
12109
+ while (i !== head) {
12110
+ bytesCount += bytes[i++];
12111
+ i = i % samplesCount;
12112
+ }
12113
+ head = (head + 1) % samplesCount;
12114
+ if (head === tail) {
12115
+ tail = (tail + 1) % samplesCount;
12116
+ }
12117
+ if (now - firstSampleTS < min) {
12118
+ return;
12119
+ }
12120
+ const passed = startedAt && now - startedAt;
12121
+ return passed ? Math.round(bytesCount * 1e3 / passed) : void 0;
12122
+ };
12123
+ }
12124
+ var speedometer_default = speedometer;
12125
+
12126
+ // node_modules/axios/lib/helpers/AxiosTransformStream.js
12112
12127
  var kInternals = Symbol("internals");
12113
12128
  var AxiosTransformStream = class extends stream.Transform {
12114
12129
  constructor(options) {
@@ -12125,8 +12140,11 @@ var AxiosTransformStream = class extends stream.Transform {
12125
12140
  super({
12126
12141
  readableHighWaterMark: options.chunkSize
12127
12142
  });
12143
+ const self2 = this;
12128
12144
  const internals = this[kInternals] = {
12145
+ length: options.length,
12129
12146
  timeWindow: options.timeWindow,
12147
+ ticksRate: options.ticksRate,
12130
12148
  chunkSize: options.chunkSize,
12131
12149
  maxRate: options.maxRate,
12132
12150
  minChunkSize: options.minChunkSize,
@@ -12137,6 +12155,7 @@ var AxiosTransformStream = class extends stream.Transform {
12137
12155
  bytes: 0,
12138
12156
  onReadCallback: null
12139
12157
  };
12158
+ const _speedometer = speedometer_default(internals.ticksRate * options.samplesCount, internals.timeWindow);
12140
12159
  this.on("newListener", (event) => {
12141
12160
  if (event === "progress") {
12142
12161
  if (!internals.isCaptured) {
@@ -12144,6 +12163,30 @@ var AxiosTransformStream = class extends stream.Transform {
12144
12163
  }
12145
12164
  }
12146
12165
  });
12166
+ let bytesNotified = 0;
12167
+ internals.updateProgress = throttle_default(function throttledHandler() {
12168
+ const totalBytes = internals.length;
12169
+ const bytesTransferred = internals.bytesSeen;
12170
+ const progressBytes = bytesTransferred - bytesNotified;
12171
+ if (!progressBytes || self2.destroyed) return;
12172
+ const rate = _speedometer(progressBytes);
12173
+ bytesNotified = bytesTransferred;
12174
+ process.nextTick(() => {
12175
+ self2.emit("progress", {
12176
+ "loaded": bytesTransferred,
12177
+ "total": totalBytes,
12178
+ "progress": totalBytes ? bytesTransferred / totalBytes : void 0,
12179
+ "bytes": progressBytes,
12180
+ "rate": rate ? rate : void 0,
12181
+ "estimated": rate && totalBytes && bytesTransferred <= totalBytes ? (totalBytes - bytesTransferred) / rate : void 0
12182
+ });
12183
+ });
12184
+ }, internals.ticksRate);
12185
+ const onFinish = () => {
12186
+ internals.updateProgress(true);
12187
+ };
12188
+ this.once("end", onFinish);
12189
+ this.once("error", onFinish);
12147
12190
  }
12148
12191
  _read(size) {
12149
12192
  const internals = this[kInternals];
@@ -12153,6 +12196,7 @@ var AxiosTransformStream = class extends stream.Transform {
12153
12196
  return super._read(size);
12154
12197
  }
12155
12198
  _transform(chunk, encoding, callback) {
12199
+ const self2 = this;
12156
12200
  const internals = this[kInternals];
12157
12201
  const maxRate = internals.maxRate;
12158
12202
  const readableHighWaterMark = this.readableHighWaterMark;
@@ -12160,12 +12204,14 @@ var AxiosTransformStream = class extends stream.Transform {
12160
12204
  const divider = 1e3 / timeWindow;
12161
12205
  const bytesThreshold = maxRate / divider;
12162
12206
  const minChunkSize = internals.minChunkSize !== false ? Math.max(internals.minChunkSize, bytesThreshold * 0.01) : 0;
12163
- const pushChunk = (_chunk, _callback) => {
12207
+ function pushChunk(_chunk, _callback) {
12164
12208
  const bytes = Buffer.byteLength(_chunk);
12165
12209
  internals.bytesSeen += bytes;
12166
12210
  internals.bytes += bytes;
12167
- internals.isCaptured && this.emit("progress", internals.bytesSeen);
12168
- if (this.push(_chunk)) {
12211
+ if (internals.isCaptured) {
12212
+ internals.updateProgress();
12213
+ }
12214
+ if (self2.push(_chunk)) {
12169
12215
  process.nextTick(_callback);
12170
12216
  } else {
12171
12217
  internals.onReadCallback = () => {
@@ -12173,7 +12219,7 @@ var AxiosTransformStream = class extends stream.Transform {
12173
12219
  process.nextTick(_callback);
12174
12220
  };
12175
12221
  }
12176
- };
12222
+ }
12177
12223
  const transformChunk = (_chunk, _callback) => {
12178
12224
  const chunkSize = Buffer.byteLength(_chunk);
12179
12225
  let chunkRemainder = null;
@@ -12219,6 +12265,10 @@ var AxiosTransformStream = class extends stream.Transform {
12219
12265
  }
12220
12266
  });
12221
12267
  }
12268
+ setLength(length) {
12269
+ this[kInternals].length = +length;
12270
+ return this;
12271
+ }
12222
12272
  };
12223
12273
  var AxiosTransformStream_default = AxiosTransformStream;
12224
12274
 
@@ -12226,7 +12276,7 @@ var AxiosTransformStream_default = AxiosTransformStream;
12226
12276
  import { EventEmitter } from "events";
12227
12277
 
12228
12278
  // node_modules/axios/lib/helpers/formDataToStream.js
12229
- import util from "util";
12279
+ import { TextEncoder } from "util";
12230
12280
  import { Readable } from "stream";
12231
12281
 
12232
12282
  // node_modules/axios/lib/helpers/readBlob.js
@@ -12245,8 +12295,8 @@ var readBlob = async function* (blob) {
12245
12295
  var readBlob_default = readBlob;
12246
12296
 
12247
12297
  // node_modules/axios/lib/helpers/formDataToStream.js
12248
- var BOUNDARY_ALPHABET = platform_default.ALPHABET.ALPHA_DIGIT + "-_";
12249
- var textEncoder = typeof TextEncoder === "function" ? new TextEncoder() : new util.TextEncoder();
12298
+ var BOUNDARY_ALPHABET = utils_default.ALPHABET.ALPHA_DIGIT + "-_";
12299
+ var textEncoder = new TextEncoder();
12250
12300
  var CRLF = "\r\n";
12251
12301
  var CRLF_BYTES = textEncoder.encode(CRLF);
12252
12302
  var CRLF_BYTES_COUNT = 2;
@@ -12288,7 +12338,7 @@ var formDataToStream = (form, headersHandler, options) => {
12288
12338
  const {
12289
12339
  tag = "form-data-boundary",
12290
12340
  size = 25,
12291
- boundary = tag + "-" + platform_default.generateString(size, BOUNDARY_ALPHABET)
12341
+ boundary = tag + "-" + utils_default.generateString(size, BOUNDARY_ALPHABET)
12292
12342
  } = options || {};
12293
12343
  if (!utils_default.isFormData(form)) {
12294
12344
  throw TypeError("FormData instance required");
@@ -12360,112 +12410,6 @@ var callbackify = (fn, reducer) => {
12360
12410
  };
12361
12411
  var callbackify_default = callbackify;
12362
12412
 
12363
- // node_modules/axios/lib/helpers/speedometer.js
12364
- function speedometer(samplesCount, min) {
12365
- samplesCount = samplesCount || 10;
12366
- const bytes = new Array(samplesCount);
12367
- const timestamps = new Array(samplesCount);
12368
- let head = 0;
12369
- let tail = 0;
12370
- let firstSampleTS;
12371
- min = min !== void 0 ? min : 1e3;
12372
- return function push(chunkLength) {
12373
- const now = Date.now();
12374
- const startedAt = timestamps[tail];
12375
- if (!firstSampleTS) {
12376
- firstSampleTS = now;
12377
- }
12378
- bytes[head] = chunkLength;
12379
- timestamps[head] = now;
12380
- let i = tail;
12381
- let bytesCount = 0;
12382
- while (i !== head) {
12383
- bytesCount += bytes[i++];
12384
- i = i % samplesCount;
12385
- }
12386
- head = (head + 1) % samplesCount;
12387
- if (head === tail) {
12388
- tail = (tail + 1) % samplesCount;
12389
- }
12390
- if (now - firstSampleTS < min) {
12391
- return;
12392
- }
12393
- const passed = startedAt && now - startedAt;
12394
- return passed ? Math.round(bytesCount * 1e3 / passed) : void 0;
12395
- };
12396
- }
12397
- var speedometer_default = speedometer;
12398
-
12399
- // node_modules/axios/lib/helpers/throttle.js
12400
- function throttle(fn, freq) {
12401
- let timestamp = 0;
12402
- let threshold = 1e3 / freq;
12403
- let lastArgs;
12404
- let timer;
12405
- const invoke = (args, now = Date.now()) => {
12406
- timestamp = now;
12407
- lastArgs = null;
12408
- if (timer) {
12409
- clearTimeout(timer);
12410
- timer = null;
12411
- }
12412
- fn.apply(null, args);
12413
- };
12414
- const throttled = (...args) => {
12415
- const now = Date.now();
12416
- const passed = now - timestamp;
12417
- if (passed >= threshold) {
12418
- invoke(args, now);
12419
- } else {
12420
- lastArgs = args;
12421
- if (!timer) {
12422
- timer = setTimeout(() => {
12423
- timer = null;
12424
- invoke(lastArgs);
12425
- }, threshold - passed);
12426
- }
12427
- }
12428
- };
12429
- const flush = () => lastArgs && invoke(lastArgs);
12430
- return [throttled, flush];
12431
- }
12432
- var throttle_default = throttle;
12433
-
12434
- // node_modules/axios/lib/helpers/progressEventReducer.js
12435
- var progressEventReducer = (listener, isDownloadStream, freq = 3) => {
12436
- let bytesNotified = 0;
12437
- const _speedometer = speedometer_default(50, 250);
12438
- return throttle_default((e2) => {
12439
- const loaded = e2.loaded;
12440
- const total = e2.lengthComputable ? e2.total : void 0;
12441
- const progressBytes = loaded - bytesNotified;
12442
- const rate = _speedometer(progressBytes);
12443
- const inRange = loaded <= total;
12444
- bytesNotified = loaded;
12445
- const data = {
12446
- loaded,
12447
- total,
12448
- progress: total ? loaded / total : void 0,
12449
- bytes: progressBytes,
12450
- rate: rate ? rate : void 0,
12451
- estimated: rate && total && inRange ? (total - loaded) / rate : void 0,
12452
- event: e2,
12453
- lengthComputable: total != null,
12454
- [isDownloadStream ? "download" : "upload"]: true
12455
- };
12456
- listener(data);
12457
- }, freq);
12458
- };
12459
- var progressEventDecorator = (total, throttled) => {
12460
- const lengthComputable = total != null;
12461
- return [(loaded) => throttled[0]({
12462
- lengthComputable,
12463
- total,
12464
- loaded
12465
- }), throttled[1]];
12466
- };
12467
- var asyncDecorator = (fn) => (...args) => utils_default.asap(() => fn(...args));
12468
-
12469
12413
  // node_modules/axios/lib/adapters/http.js
12470
12414
  var zlibOptions = {
12471
12415
  flush: zlib.constants.Z_SYNC_FLUSH,
@@ -12481,10 +12425,6 @@ var isHttps = /https:?/;
12481
12425
  var supportedProtocols = platform_default.protocols.map((protocol) => {
12482
12426
  return protocol + ":";
12483
12427
  });
12484
- var flushOnFinish = (stream4, [throttled, flush]) => {
12485
- stream4.on("end", flush).on("error", flush);
12486
- return throttled;
12487
- };
12488
12428
  function dispatchBeforeRedirect(options, responseDetails) {
12489
12429
  if (options.beforeRedirects.proxy) {
12490
12430
  options.beforeRedirects.proxy(options);
@@ -12496,7 +12436,7 @@ function dispatchBeforeRedirect(options, responseDetails) {
12496
12436
  function setProxy(options, configProxy, location) {
12497
12437
  let proxy = configProxy;
12498
12438
  if (!proxy && proxy !== false) {
12499
- const proxyUrl = import_proxy_from_env.default.getProxyForUrl(location);
12439
+ const proxyUrl = (0, import_proxy_from_env.getProxyForUrl)(location);
12500
12440
  if (proxyUrl) {
12501
12441
  proxy = new URL(proxyUrl);
12502
12442
  }
@@ -12604,8 +12544,8 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
12604
12544
  config.signal.aborted ? abort() : config.signal.addEventListener("abort", abort);
12605
12545
  }
12606
12546
  }
12607
- const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
12608
- const parsed = new URL(fullPath, platform_default.hasBrowserEnv ? platform_default.origin : void 0);
12547
+ const fullPath = buildFullPath(config.baseURL, config.url);
12548
+ const parsed = new URL(fullPath, "http://localhost");
12609
12549
  const protocol = parsed.protocol || supportedProtocols[0];
12610
12550
  if (protocol === "data:") {
12611
12551
  let convertedData;
@@ -12649,7 +12589,8 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
12649
12589
  }
12650
12590
  const headers = AxiosHeaders_default.from(config.headers).normalize();
12651
12591
  headers.set("User-Agent", "axios/" + VERSION, false);
12652
- const { onUploadProgress, onDownloadProgress } = config;
12592
+ const onDownloadProgress = config.onDownloadProgress;
12593
+ const onUploadProgress = config.onUploadProgress;
12653
12594
  const maxRate = config.maxRate;
12654
12595
  let maxUploadRate = void 0;
12655
12596
  let maxDownloadRate = void 0;
@@ -12665,12 +12606,12 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
12665
12606
  headers.set(data.getHeaders());
12666
12607
  if (!headers.hasContentLength()) {
12667
12608
  try {
12668
- const knownLength = await util2.promisify(data.getLength).call(data);
12609
+ const knownLength = await util.promisify(data.getLength).call(data);
12669
12610
  Number.isFinite(knownLength) && knownLength >= 0 && headers.setContentLength(knownLength);
12670
12611
  } catch (e2) {
12671
12612
  }
12672
12613
  }
12673
- } else if (utils_default.isBlob(data) || utils_default.isFile(data)) {
12614
+ } else if (utils_default.isBlob(data)) {
12674
12615
  data.size && headers.setContentType(data.type || "application/octet-stream");
12675
12616
  headers.setContentLength(data.size || 0);
12676
12617
  data = stream3.Readable.from(readBlob_default(data));
@@ -12708,15 +12649,14 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
12708
12649
  data = stream3.Readable.from(data, { objectMode: false });
12709
12650
  }
12710
12651
  data = stream3.pipeline([data, new AxiosTransformStream_default({
12652
+ length: contentLength,
12711
12653
  maxRate: utils_default.toFiniteNumber(maxUploadRate)
12712
12654
  })], utils_default.noop);
12713
- onUploadProgress && data.on("progress", flushOnFinish(
12714
- data,
12715
- progressEventDecorator(
12716
- contentLength,
12717
- progressEventReducer(asyncDecorator(onUploadProgress), false, 3)
12718
- )
12719
- ));
12655
+ onUploadProgress && data.on("progress", (progress) => {
12656
+ onUploadProgress(Object.assign(progress, {
12657
+ upload: true
12658
+ }));
12659
+ });
12720
12660
  }
12721
12661
  let auth = void 0;
12722
12662
  if (config.auth) {
@@ -12764,7 +12704,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
12764
12704
  if (config.socketPath) {
12765
12705
  options.socketPath = config.socketPath;
12766
12706
  } else {
12767
- options.hostname = parsed.hostname.startsWith("[") ? parsed.hostname.slice(1, -1) : parsed.hostname;
12707
+ options.hostname = parsed.hostname;
12768
12708
  options.port = parsed.port;
12769
12709
  setProxy(options, config.proxy, protocol + "//" + parsed.hostname + (parsed.port ? ":" + parsed.port : "") + options.path);
12770
12710
  }
@@ -12796,17 +12736,16 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
12796
12736
  if (req.destroyed) return;
12797
12737
  const streams = [res];
12798
12738
  const responseLength = +res.headers["content-length"];
12799
- if (onDownloadProgress || maxDownloadRate) {
12739
+ if (onDownloadProgress) {
12800
12740
  const transformStream = new AxiosTransformStream_default({
12741
+ length: utils_default.toFiniteNumber(responseLength),
12801
12742
  maxRate: utils_default.toFiniteNumber(maxDownloadRate)
12802
12743
  });
12803
- onDownloadProgress && transformStream.on("progress", flushOnFinish(
12804
- transformStream,
12805
- progressEventDecorator(
12806
- responseLength,
12807
- progressEventReducer(asyncDecorator(onDownloadProgress), true, 3)
12808
- )
12809
- ));
12744
+ onDownloadProgress && transformStream.on("progress", (progress) => {
12745
+ onDownloadProgress(Object.assign(progress, {
12746
+ download: true
12747
+ }));
12748
+ });
12810
12749
  streams.push(transformStream);
12811
12750
  }
12812
12751
  let responseStream = res;
@@ -12873,7 +12812,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
12873
12812
  return;
12874
12813
  }
12875
12814
  const err = new AxiosError_default(
12876
- "stream has been aborted",
12815
+ "maxContentLength size of " + config.maxContentLength + " exceeded",
12877
12816
  AxiosError_default.ERR_BAD_RESPONSE,
12878
12817
  config,
12879
12818
  lastRequest
@@ -12967,15 +12906,6 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
12967
12906
  });
12968
12907
  };
12969
12908
 
12970
- // node_modules/axios/lib/helpers/isURLSameOrigin.js
12971
- var isURLSameOrigin_default = platform_default.hasStandardBrowserEnv ? /* @__PURE__ */ ((origin2, isMSIE) => (url2) => {
12972
- url2 = new URL(url2, platform_default.origin);
12973
- return origin2.protocol === url2.protocol && origin2.host === url2.host && (isMSIE || origin2.port === url2.port);
12974
- })(
12975
- new URL(platform_default.origin),
12976
- platform_default.navigator && /(msie|trident)/i.test(platform_default.navigator.userAgent)
12977
- ) : () => true;
12978
-
12979
12909
  // node_modules/axios/lib/helpers/cookies.js
12980
12910
  var cookies_default = platform_default.hasStandardBrowserEnv ? (
12981
12911
  // Standard browser envs support document.cookie
@@ -13009,139 +12939,104 @@ var cookies_default = platform_default.hasStandardBrowserEnv ? (
13009
12939
  }
13010
12940
  );
13011
12941
 
13012
- // node_modules/axios/lib/core/mergeConfig.js
13013
- var headersToObject = (thing) => thing instanceof AxiosHeaders_default ? { ...thing } : thing;
13014
- function mergeConfig(config1, config2) {
13015
- config2 = config2 || {};
13016
- const config = {};
13017
- function getMergedValue(target, source, prop, caseless) {
13018
- if (utils_default.isPlainObject(target) && utils_default.isPlainObject(source)) {
13019
- return utils_default.merge.call({ caseless }, target, source);
13020
- } else if (utils_default.isPlainObject(source)) {
13021
- return utils_default.merge({}, source);
13022
- } else if (utils_default.isArray(source)) {
13023
- return source.slice();
13024
- }
13025
- return source;
13026
- }
13027
- function mergeDeepProperties(a, b, prop, caseless) {
13028
- if (!utils_default.isUndefined(b)) {
13029
- return getMergedValue(a, b, prop, caseless);
13030
- } else if (!utils_default.isUndefined(a)) {
13031
- return getMergedValue(void 0, a, prop, caseless);
13032
- }
13033
- }
13034
- function valueFromConfig2(a, b) {
13035
- if (!utils_default.isUndefined(b)) {
13036
- return getMergedValue(void 0, b);
13037
- }
13038
- }
13039
- function defaultToConfig2(a, b) {
13040
- if (!utils_default.isUndefined(b)) {
13041
- return getMergedValue(void 0, b);
13042
- } else if (!utils_default.isUndefined(a)) {
13043
- return getMergedValue(void 0, a);
13044
- }
13045
- }
13046
- function mergeDirectKeys(a, b, prop) {
13047
- if (prop in config2) {
13048
- return getMergedValue(a, b);
13049
- } else if (prop in config1) {
13050
- return getMergedValue(void 0, a);
13051
- }
13052
- }
13053
- const mergeMap = {
13054
- url: valueFromConfig2,
13055
- method: valueFromConfig2,
13056
- data: valueFromConfig2,
13057
- baseURL: defaultToConfig2,
13058
- transformRequest: defaultToConfig2,
13059
- transformResponse: defaultToConfig2,
13060
- paramsSerializer: defaultToConfig2,
13061
- timeout: defaultToConfig2,
13062
- timeoutMessage: defaultToConfig2,
13063
- withCredentials: defaultToConfig2,
13064
- withXSRFToken: defaultToConfig2,
13065
- adapter: defaultToConfig2,
13066
- responseType: defaultToConfig2,
13067
- xsrfCookieName: defaultToConfig2,
13068
- xsrfHeaderName: defaultToConfig2,
13069
- onUploadProgress: defaultToConfig2,
13070
- onDownloadProgress: defaultToConfig2,
13071
- decompress: defaultToConfig2,
13072
- maxContentLength: defaultToConfig2,
13073
- maxBodyLength: defaultToConfig2,
13074
- beforeRedirect: defaultToConfig2,
13075
- transport: defaultToConfig2,
13076
- httpAgent: defaultToConfig2,
13077
- httpsAgent: defaultToConfig2,
13078
- cancelToken: defaultToConfig2,
13079
- socketPath: defaultToConfig2,
13080
- responseEncoding: defaultToConfig2,
13081
- validateStatus: mergeDirectKeys,
13082
- headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true)
13083
- };
13084
- utils_default.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
13085
- const merge2 = mergeMap[prop] || mergeDeepProperties;
13086
- const configValue = merge2(config1[prop], config2[prop], prop);
13087
- utils_default.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config[prop] = configValue);
13088
- });
13089
- return config;
13090
- }
13091
-
13092
- // node_modules/axios/lib/helpers/resolveConfig.js
13093
- var resolveConfig_default = (config) => {
13094
- const newConfig = mergeConfig({}, config);
13095
- let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig;
13096
- newConfig.headers = headers = AxiosHeaders_default.from(headers);
13097
- newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config.params, config.paramsSerializer);
13098
- if (auth) {
13099
- headers.set(
13100
- "Authorization",
13101
- "Basic " + btoa((auth.username || "") + ":" + (auth.password ? unescape(encodeURIComponent(auth.password)) : ""))
13102
- );
13103
- }
13104
- let contentType;
13105
- if (utils_default.isFormData(data)) {
13106
- if (platform_default.hasStandardBrowserEnv || platform_default.hasStandardBrowserWebWorkerEnv) {
13107
- headers.setContentType(void 0);
13108
- } else if ((contentType = headers.getContentType()) !== false) {
13109
- const [type, ...tokens] = contentType ? contentType.split(";").map((token) => token.trim()).filter(Boolean) : [];
13110
- headers.setContentType([type || "multipart/form-data", ...tokens].join("; "));
13111
- }
13112
- }
13113
- if (platform_default.hasStandardBrowserEnv) {
13114
- withXSRFToken && utils_default.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));
13115
- if (withXSRFToken || withXSRFToken !== false && isURLSameOrigin_default(newConfig.url)) {
13116
- const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies_default.read(xsrfCookieName);
13117
- if (xsrfValue) {
13118
- headers.set(xsrfHeaderName, xsrfValue);
13119
- }
12942
+ // node_modules/axios/lib/helpers/isURLSameOrigin.js
12943
+ var isURLSameOrigin_default = platform_default.hasStandardBrowserEnv ? (
12944
+ // Standard browser envs have full support of the APIs needed to test
12945
+ // whether the request URL is of the same origin as current location.
12946
+ function standardBrowserEnv() {
12947
+ const msie = /(msie|trident)/i.test(navigator.userAgent);
12948
+ const urlParsingNode = document.createElement("a");
12949
+ let originURL;
12950
+ function resolveURL(url2) {
12951
+ let href = url2;
12952
+ if (msie) {
12953
+ urlParsingNode.setAttribute("href", href);
12954
+ href = urlParsingNode.href;
12955
+ }
12956
+ urlParsingNode.setAttribute("href", href);
12957
+ return {
12958
+ href: urlParsingNode.href,
12959
+ protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, "") : "",
12960
+ host: urlParsingNode.host,
12961
+ search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, "") : "",
12962
+ hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, "") : "",
12963
+ hostname: urlParsingNode.hostname,
12964
+ port: urlParsingNode.port,
12965
+ pathname: urlParsingNode.pathname.charAt(0) === "/" ? urlParsingNode.pathname : "/" + urlParsingNode.pathname
12966
+ };
13120
12967
  }
13121
- }
13122
- return newConfig;
13123
- };
12968
+ originURL = resolveURL(window.location.href);
12969
+ return function isURLSameOrigin(requestURL) {
12970
+ const parsed = utils_default.isString(requestURL) ? resolveURL(requestURL) : requestURL;
12971
+ return parsed.protocol === originURL.protocol && parsed.host === originURL.host;
12972
+ };
12973
+ }()
12974
+ ) : (
12975
+ // Non standard browser envs (web workers, react-native) lack needed support.
12976
+ /* @__PURE__ */ function nonStandardBrowserEnv() {
12977
+ return function isURLSameOrigin() {
12978
+ return true;
12979
+ };
12980
+ }()
12981
+ );
13124
12982
 
13125
12983
  // node_modules/axios/lib/adapters/xhr.js
12984
+ function progressEventReducer(listener, isDownloadStream) {
12985
+ let bytesNotified = 0;
12986
+ const _speedometer = speedometer_default(50, 250);
12987
+ return (e2) => {
12988
+ const loaded = e2.loaded;
12989
+ const total = e2.lengthComputable ? e2.total : void 0;
12990
+ const progressBytes = loaded - bytesNotified;
12991
+ const rate = _speedometer(progressBytes);
12992
+ const inRange = loaded <= total;
12993
+ bytesNotified = loaded;
12994
+ const data = {
12995
+ loaded,
12996
+ total,
12997
+ progress: total ? loaded / total : void 0,
12998
+ bytes: progressBytes,
12999
+ rate: rate ? rate : void 0,
13000
+ estimated: rate && total && inRange ? (total - loaded) / rate : void 0,
13001
+ event: e2
13002
+ };
13003
+ data[isDownloadStream ? "download" : "upload"] = true;
13004
+ listener(data);
13005
+ };
13006
+ }
13126
13007
  var isXHRAdapterSupported = typeof XMLHttpRequest !== "undefined";
13127
13008
  var xhr_default = isXHRAdapterSupported && function(config) {
13128
13009
  return new Promise(function dispatchXhrRequest(resolve, reject) {
13129
- const _config = resolveConfig_default(config);
13130
- let requestData = _config.data;
13131
- const requestHeaders = AxiosHeaders_default.from(_config.headers).normalize();
13132
- let { responseType, onUploadProgress, onDownloadProgress } = _config;
13010
+ let requestData = config.data;
13011
+ const requestHeaders = AxiosHeaders_default.from(config.headers).normalize();
13012
+ let { responseType, withXSRFToken } = config;
13133
13013
  let onCanceled;
13134
- let uploadThrottled, downloadThrottled;
13135
- let flushUpload, flushDownload;
13136
13014
  function done() {
13137
- flushUpload && flushUpload();
13138
- flushDownload && flushDownload();
13139
- _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);
13140
- _config.signal && _config.signal.removeEventListener("abort", onCanceled);
13015
+ if (config.cancelToken) {
13016
+ config.cancelToken.unsubscribe(onCanceled);
13017
+ }
13018
+ if (config.signal) {
13019
+ config.signal.removeEventListener("abort", onCanceled);
13020
+ }
13021
+ }
13022
+ let contentType;
13023
+ if (utils_default.isFormData(requestData)) {
13024
+ if (platform_default.hasStandardBrowserEnv || platform_default.hasStandardBrowserWebWorkerEnv) {
13025
+ requestHeaders.setContentType(false);
13026
+ } else if ((contentType = requestHeaders.getContentType()) !== false) {
13027
+ const [type, ...tokens] = contentType ? contentType.split(";").map((token) => token.trim()).filter(Boolean) : [];
13028
+ requestHeaders.setContentType([type || "multipart/form-data", ...tokens].join("; "));
13029
+ }
13141
13030
  }
13142
13031
  let request = new XMLHttpRequest();
13143
- request.open(_config.method.toUpperCase(), _config.url, true);
13144
- request.timeout = _config.timeout;
13032
+ if (config.auth) {
13033
+ const username = config.auth.username || "";
13034
+ const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : "";
13035
+ requestHeaders.set("Authorization", "Basic " + btoa(username + ":" + password));
13036
+ }
13037
+ const fullPath = buildFullPath(config.baseURL, config.url);
13038
+ request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);
13039
+ request.timeout = config.timeout;
13145
13040
  function onloadend() {
13146
13041
  if (!request) {
13147
13042
  return;
@@ -13192,10 +13087,10 @@ var xhr_default = isXHRAdapterSupported && function(config) {
13192
13087
  request = null;
13193
13088
  };
13194
13089
  request.ontimeout = function handleTimeout() {
13195
- let timeoutErrorMessage = _config.timeout ? "timeout of " + _config.timeout + "ms exceeded" : "timeout exceeded";
13196
- const transitional2 = _config.transitional || transitional_default;
13197
- if (_config.timeoutErrorMessage) {
13198
- timeoutErrorMessage = _config.timeoutErrorMessage;
13090
+ let timeoutErrorMessage = config.timeout ? "timeout of " + config.timeout + "ms exceeded" : "timeout exceeded";
13091
+ const transitional2 = config.transitional || transitional_default;
13092
+ if (config.timeoutErrorMessage) {
13093
+ timeoutErrorMessage = config.timeoutErrorMessage;
13199
13094
  }
13200
13095
  reject(new AxiosError_default(
13201
13096
  timeoutErrorMessage,
@@ -13205,28 +13100,34 @@ var xhr_default = isXHRAdapterSupported && function(config) {
13205
13100
  ));
13206
13101
  request = null;
13207
13102
  };
13103
+ if (platform_default.hasStandardBrowserEnv) {
13104
+ withXSRFToken && utils_default.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));
13105
+ if (withXSRFToken || withXSRFToken !== false && isURLSameOrigin_default(fullPath)) {
13106
+ const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies_default.read(config.xsrfCookieName);
13107
+ if (xsrfValue) {
13108
+ requestHeaders.set(config.xsrfHeaderName, xsrfValue);
13109
+ }
13110
+ }
13111
+ }
13208
13112
  requestData === void 0 && requestHeaders.setContentType(null);
13209
13113
  if ("setRequestHeader" in request) {
13210
13114
  utils_default.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
13211
13115
  request.setRequestHeader(key, val);
13212
13116
  });
13213
13117
  }
13214
- if (!utils_default.isUndefined(_config.withCredentials)) {
13215
- request.withCredentials = !!_config.withCredentials;
13118
+ if (!utils_default.isUndefined(config.withCredentials)) {
13119
+ request.withCredentials = !!config.withCredentials;
13216
13120
  }
13217
13121
  if (responseType && responseType !== "json") {
13218
- request.responseType = _config.responseType;
13122
+ request.responseType = config.responseType;
13219
13123
  }
13220
- if (onDownloadProgress) {
13221
- [downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true);
13222
- request.addEventListener("progress", downloadThrottled);
13124
+ if (typeof config.onDownloadProgress === "function") {
13125
+ request.addEventListener("progress", progressEventReducer(config.onDownloadProgress, true));
13223
13126
  }
13224
- if (onUploadProgress && request.upload) {
13225
- [uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress);
13226
- request.upload.addEventListener("progress", uploadThrottled);
13227
- request.upload.addEventListener("loadend", flushUpload);
13127
+ if (typeof config.onUploadProgress === "function" && request.upload) {
13128
+ request.upload.addEventListener("progress", progressEventReducer(config.onUploadProgress));
13228
13129
  }
13229
- if (_config.cancelToken || _config.signal) {
13130
+ if (config.cancelToken || config.signal) {
13230
13131
  onCanceled = (cancel) => {
13231
13132
  if (!request) {
13232
13133
  return;
@@ -13235,12 +13136,12 @@ var xhr_default = isXHRAdapterSupported && function(config) {
13235
13136
  request.abort();
13236
13137
  request = null;
13237
13138
  };
13238
- _config.cancelToken && _config.cancelToken.subscribe(onCanceled);
13239
- if (_config.signal) {
13240
- _config.signal.aborted ? onCanceled() : _config.signal.addEventListener("abort", onCanceled);
13139
+ config.cancelToken && config.cancelToken.subscribe(onCanceled);
13140
+ if (config.signal) {
13141
+ config.signal.aborted ? onCanceled() : config.signal.addEventListener("abort", onCanceled);
13241
13142
  }
13242
13143
  }
13243
- const protocol = parseProtocol(_config.url);
13144
+ const protocol = parseProtocol(fullPath);
13244
13145
  if (protocol && platform_default.protocols.indexOf(protocol) === -1) {
13245
13146
  reject(new AxiosError_default("Unsupported protocol " + protocol + ":", AxiosError_default.ERR_BAD_REQUEST, config));
13246
13147
  return;
@@ -13249,288 +13150,10 @@ var xhr_default = isXHRAdapterSupported && function(config) {
13249
13150
  });
13250
13151
  };
13251
13152
 
13252
- // node_modules/axios/lib/helpers/composeSignals.js
13253
- var composeSignals = (signals, timeout) => {
13254
- const { length } = signals = signals ? signals.filter(Boolean) : [];
13255
- if (timeout || length) {
13256
- let controller = new AbortController();
13257
- let aborted;
13258
- const onabort = function(reason) {
13259
- if (!aborted) {
13260
- aborted = true;
13261
- unsubscribe();
13262
- const err = reason instanceof Error ? reason : this.reason;
13263
- controller.abort(err instanceof AxiosError_default ? err : new CanceledError_default(err instanceof Error ? err.message : err));
13264
- }
13265
- };
13266
- let timer = timeout && setTimeout(() => {
13267
- timer = null;
13268
- onabort(new AxiosError_default(`timeout ${timeout} of ms exceeded`, AxiosError_default.ETIMEDOUT));
13269
- }, timeout);
13270
- const unsubscribe = () => {
13271
- if (signals) {
13272
- timer && clearTimeout(timer);
13273
- timer = null;
13274
- signals.forEach((signal2) => {
13275
- signal2.unsubscribe ? signal2.unsubscribe(onabort) : signal2.removeEventListener("abort", onabort);
13276
- });
13277
- signals = null;
13278
- }
13279
- };
13280
- signals.forEach((signal2) => signal2.addEventListener("abort", onabort));
13281
- const { signal } = controller;
13282
- signal.unsubscribe = () => utils_default.asap(unsubscribe);
13283
- return signal;
13284
- }
13285
- };
13286
- var composeSignals_default = composeSignals;
13287
-
13288
- // node_modules/axios/lib/helpers/trackStream.js
13289
- var streamChunk = function* (chunk, chunkSize) {
13290
- let len = chunk.byteLength;
13291
- if (!chunkSize || len < chunkSize) {
13292
- yield chunk;
13293
- return;
13294
- }
13295
- let pos = 0;
13296
- let end;
13297
- while (pos < len) {
13298
- end = pos + chunkSize;
13299
- yield chunk.slice(pos, end);
13300
- pos = end;
13301
- }
13302
- };
13303
- var readBytes = async function* (iterable, chunkSize) {
13304
- for await (const chunk of readStream(iterable)) {
13305
- yield* streamChunk(chunk, chunkSize);
13306
- }
13307
- };
13308
- var readStream = async function* (stream4) {
13309
- if (stream4[Symbol.asyncIterator]) {
13310
- yield* stream4;
13311
- return;
13312
- }
13313
- const reader = stream4.getReader();
13314
- try {
13315
- for (; ; ) {
13316
- const { done, value } = await reader.read();
13317
- if (done) {
13318
- break;
13319
- }
13320
- yield value;
13321
- }
13322
- } finally {
13323
- await reader.cancel();
13324
- }
13325
- };
13326
- var trackStream = (stream4, chunkSize, onProgress, onFinish) => {
13327
- const iterator = readBytes(stream4, chunkSize);
13328
- let bytes = 0;
13329
- let done;
13330
- let _onFinish = (e2) => {
13331
- if (!done) {
13332
- done = true;
13333
- onFinish && onFinish(e2);
13334
- }
13335
- };
13336
- return new ReadableStream({
13337
- async pull(controller) {
13338
- try {
13339
- const { done: done2, value } = await iterator.next();
13340
- if (done2) {
13341
- _onFinish();
13342
- controller.close();
13343
- return;
13344
- }
13345
- let len = value.byteLength;
13346
- if (onProgress) {
13347
- let loadedBytes = bytes += len;
13348
- onProgress(loadedBytes);
13349
- }
13350
- controller.enqueue(new Uint8Array(value));
13351
- } catch (err) {
13352
- _onFinish(err);
13353
- throw err;
13354
- }
13355
- },
13356
- cancel(reason) {
13357
- _onFinish(reason);
13358
- return iterator.return();
13359
- }
13360
- }, {
13361
- highWaterMark: 2
13362
- });
13363
- };
13364
-
13365
- // node_modules/axios/lib/adapters/fetch.js
13366
- var isFetchSupported = typeof fetch === "function" && typeof Request === "function" && typeof Response === "function";
13367
- var isReadableStreamSupported = isFetchSupported && typeof ReadableStream === "function";
13368
- var encodeText = isFetchSupported && (typeof TextEncoder === "function" ? /* @__PURE__ */ ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) : async (str) => new Uint8Array(await new Response(str).arrayBuffer()));
13369
- var test = (fn, ...args) => {
13370
- try {
13371
- return !!fn(...args);
13372
- } catch (e2) {
13373
- return false;
13374
- }
13375
- };
13376
- var supportsRequestStream = isReadableStreamSupported && test(() => {
13377
- let duplexAccessed = false;
13378
- const hasContentType = new Request(platform_default.origin, {
13379
- body: new ReadableStream(),
13380
- method: "POST",
13381
- get duplex() {
13382
- duplexAccessed = true;
13383
- return "half";
13384
- }
13385
- }).headers.has("Content-Type");
13386
- return duplexAccessed && !hasContentType;
13387
- });
13388
- var DEFAULT_CHUNK_SIZE = 64 * 1024;
13389
- var supportsResponseStream = isReadableStreamSupported && test(() => utils_default.isReadableStream(new Response("").body));
13390
- var resolvers = {
13391
- stream: supportsResponseStream && ((res) => res.body)
13392
- };
13393
- isFetchSupported && ((res) => {
13394
- ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((type) => {
13395
- !resolvers[type] && (resolvers[type] = utils_default.isFunction(res[type]) ? (res2) => res2[type]() : (_, config) => {
13396
- throw new AxiosError_default(`Response type '${type}' is not supported`, AxiosError_default.ERR_NOT_SUPPORT, config);
13397
- });
13398
- });
13399
- })(new Response());
13400
- var getBodyLength = async (body) => {
13401
- if (body == null) {
13402
- return 0;
13403
- }
13404
- if (utils_default.isBlob(body)) {
13405
- return body.size;
13406
- }
13407
- if (utils_default.isSpecCompliantForm(body)) {
13408
- const _request = new Request(platform_default.origin, {
13409
- method: "POST",
13410
- body
13411
- });
13412
- return (await _request.arrayBuffer()).byteLength;
13413
- }
13414
- if (utils_default.isArrayBufferView(body) || utils_default.isArrayBuffer(body)) {
13415
- return body.byteLength;
13416
- }
13417
- if (utils_default.isURLSearchParams(body)) {
13418
- body = body + "";
13419
- }
13420
- if (utils_default.isString(body)) {
13421
- return (await encodeText(body)).byteLength;
13422
- }
13423
- };
13424
- var resolveBodyLength = async (headers, body) => {
13425
- const length = utils_default.toFiniteNumber(headers.getContentLength());
13426
- return length == null ? getBodyLength(body) : length;
13427
- };
13428
- var fetch_default = isFetchSupported && (async (config) => {
13429
- let {
13430
- url: url2,
13431
- method,
13432
- data,
13433
- signal,
13434
- cancelToken,
13435
- timeout,
13436
- onDownloadProgress,
13437
- onUploadProgress,
13438
- responseType,
13439
- headers,
13440
- withCredentials = "same-origin",
13441
- fetchOptions
13442
- } = resolveConfig_default(config);
13443
- responseType = responseType ? (responseType + "").toLowerCase() : "text";
13444
- let composedSignal = composeSignals_default([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
13445
- let request;
13446
- const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
13447
- composedSignal.unsubscribe();
13448
- });
13449
- let requestContentLength;
13450
- try {
13451
- if (onUploadProgress && supportsRequestStream && method !== "get" && method !== "head" && (requestContentLength = await resolveBodyLength(headers, data)) !== 0) {
13452
- let _request = new Request(url2, {
13453
- method: "POST",
13454
- body: data,
13455
- duplex: "half"
13456
- });
13457
- let contentTypeHeader;
13458
- if (utils_default.isFormData(data) && (contentTypeHeader = _request.headers.get("content-type"))) {
13459
- headers.setContentType(contentTypeHeader);
13460
- }
13461
- if (_request.body) {
13462
- const [onProgress, flush] = progressEventDecorator(
13463
- requestContentLength,
13464
- progressEventReducer(asyncDecorator(onUploadProgress))
13465
- );
13466
- data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
13467
- }
13468
- }
13469
- if (!utils_default.isString(withCredentials)) {
13470
- withCredentials = withCredentials ? "include" : "omit";
13471
- }
13472
- const isCredentialsSupported = "credentials" in Request.prototype;
13473
- request = new Request(url2, {
13474
- ...fetchOptions,
13475
- signal: composedSignal,
13476
- method: method.toUpperCase(),
13477
- headers: headers.normalize().toJSON(),
13478
- body: data,
13479
- duplex: "half",
13480
- credentials: isCredentialsSupported ? withCredentials : void 0
13481
- });
13482
- let response = await fetch(request);
13483
- const isStreamResponse = supportsResponseStream && (responseType === "stream" || responseType === "response");
13484
- if (supportsResponseStream && (onDownloadProgress || isStreamResponse && unsubscribe)) {
13485
- const options = {};
13486
- ["status", "statusText", "headers"].forEach((prop) => {
13487
- options[prop] = response[prop];
13488
- });
13489
- const responseContentLength = utils_default.toFiniteNumber(response.headers.get("content-length"));
13490
- const [onProgress, flush] = onDownloadProgress && progressEventDecorator(
13491
- responseContentLength,
13492
- progressEventReducer(asyncDecorator(onDownloadProgress), true)
13493
- ) || [];
13494
- response = new Response(
13495
- trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
13496
- flush && flush();
13497
- unsubscribe && unsubscribe();
13498
- }),
13499
- options
13500
- );
13501
- }
13502
- responseType = responseType || "text";
13503
- let responseData = await resolvers[utils_default.findKey(resolvers, responseType) || "text"](response, config);
13504
- !isStreamResponse && unsubscribe && unsubscribe();
13505
- return await new Promise((resolve, reject) => {
13506
- settle(resolve, reject, {
13507
- data: responseData,
13508
- headers: AxiosHeaders_default.from(response.headers),
13509
- status: response.status,
13510
- statusText: response.statusText,
13511
- config,
13512
- request
13513
- });
13514
- });
13515
- } catch (err) {
13516
- unsubscribe && unsubscribe();
13517
- if (err && err.name === "TypeError" && /fetch/i.test(err.message)) {
13518
- throw Object.assign(
13519
- new AxiosError_default("Network Error", AxiosError_default.ERR_NETWORK, config, request),
13520
- {
13521
- cause: err.cause || err
13522
- }
13523
- );
13524
- }
13525
- throw AxiosError_default.from(err, err && err.code, config, request);
13526
- }
13527
- });
13528
-
13529
13153
  // node_modules/axios/lib/adapters/adapters.js
13530
13154
  var knownAdapters = {
13531
13155
  http: http_default,
13532
- xhr: xhr_default,
13533
- fetch: fetch_default
13156
+ xhr: xhr_default
13534
13157
  };
13535
13158
  utils_default.forEach(knownAdapters, (fn, value) => {
13536
13159
  if (fn) {
@@ -13625,6 +13248,86 @@ function dispatchRequest(config) {
13625
13248
  });
13626
13249
  }
13627
13250
 
13251
+ // node_modules/axios/lib/core/mergeConfig.js
13252
+ var headersToObject = (thing) => thing instanceof AxiosHeaders_default ? { ...thing } : thing;
13253
+ function mergeConfig(config1, config2) {
13254
+ config2 = config2 || {};
13255
+ const config = {};
13256
+ function getMergedValue(target, source, caseless) {
13257
+ if (utils_default.isPlainObject(target) && utils_default.isPlainObject(source)) {
13258
+ return utils_default.merge.call({ caseless }, target, source);
13259
+ } else if (utils_default.isPlainObject(source)) {
13260
+ return utils_default.merge({}, source);
13261
+ } else if (utils_default.isArray(source)) {
13262
+ return source.slice();
13263
+ }
13264
+ return source;
13265
+ }
13266
+ function mergeDeepProperties(a, b, caseless) {
13267
+ if (!utils_default.isUndefined(b)) {
13268
+ return getMergedValue(a, b, caseless);
13269
+ } else if (!utils_default.isUndefined(a)) {
13270
+ return getMergedValue(void 0, a, caseless);
13271
+ }
13272
+ }
13273
+ function valueFromConfig2(a, b) {
13274
+ if (!utils_default.isUndefined(b)) {
13275
+ return getMergedValue(void 0, b);
13276
+ }
13277
+ }
13278
+ function defaultToConfig2(a, b) {
13279
+ if (!utils_default.isUndefined(b)) {
13280
+ return getMergedValue(void 0, b);
13281
+ } else if (!utils_default.isUndefined(a)) {
13282
+ return getMergedValue(void 0, a);
13283
+ }
13284
+ }
13285
+ function mergeDirectKeys(a, b, prop) {
13286
+ if (prop in config2) {
13287
+ return getMergedValue(a, b);
13288
+ } else if (prop in config1) {
13289
+ return getMergedValue(void 0, a);
13290
+ }
13291
+ }
13292
+ const mergeMap = {
13293
+ url: valueFromConfig2,
13294
+ method: valueFromConfig2,
13295
+ data: valueFromConfig2,
13296
+ baseURL: defaultToConfig2,
13297
+ transformRequest: defaultToConfig2,
13298
+ transformResponse: defaultToConfig2,
13299
+ paramsSerializer: defaultToConfig2,
13300
+ timeout: defaultToConfig2,
13301
+ timeoutMessage: defaultToConfig2,
13302
+ withCredentials: defaultToConfig2,
13303
+ withXSRFToken: defaultToConfig2,
13304
+ adapter: defaultToConfig2,
13305
+ responseType: defaultToConfig2,
13306
+ xsrfCookieName: defaultToConfig2,
13307
+ xsrfHeaderName: defaultToConfig2,
13308
+ onUploadProgress: defaultToConfig2,
13309
+ onDownloadProgress: defaultToConfig2,
13310
+ decompress: defaultToConfig2,
13311
+ maxContentLength: defaultToConfig2,
13312
+ maxBodyLength: defaultToConfig2,
13313
+ beforeRedirect: defaultToConfig2,
13314
+ transport: defaultToConfig2,
13315
+ httpAgent: defaultToConfig2,
13316
+ httpsAgent: defaultToConfig2,
13317
+ cancelToken: defaultToConfig2,
13318
+ socketPath: defaultToConfig2,
13319
+ responseEncoding: defaultToConfig2,
13320
+ validateStatus: mergeDirectKeys,
13321
+ headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)
13322
+ };
13323
+ utils_default.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
13324
+ const merge2 = mergeMap[prop] || mergeDeepProperties;
13325
+ const configValue = merge2(config1[prop], config2[prop], prop);
13326
+ utils_default.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config[prop] = configValue);
13327
+ });
13328
+ return config;
13329
+ }
13330
+
13628
13331
  // node_modules/axios/lib/helpers/validator.js
13629
13332
  var validators = {};
13630
13333
  ["object", "boolean", "number", "function", "string", "symbol"].forEach((type, i) => {
@@ -13656,12 +13359,6 @@ validators.transitional = function transitional(validator, version, message) {
13656
13359
  return validator ? validator(value, opt, opts) : true;
13657
13360
  };
13658
13361
  };
13659
- validators.spelling = function spelling(correctSpelling) {
13660
- return (value, opt) => {
13661
- console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);
13662
- return true;
13663
- };
13664
- };
13665
13362
  function assertOptions(options, schema, allowUnknown) {
13666
13363
  if (typeof options !== "object") {
13667
13364
  throw new AxiosError_default("options must be an object", AxiosError_default.ERR_BAD_OPTION_VALUE);
@@ -13712,16 +13409,13 @@ var Axios = class {
13712
13409
  return await this._request(configOrUrl, config);
13713
13410
  } catch (err) {
13714
13411
  if (err instanceof Error) {
13715
- let dummy = {};
13716
- Error.captureStackTrace ? Error.captureStackTrace(dummy) : dummy = new Error();
13412
+ let dummy;
13413
+ Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : dummy = new Error();
13717
13414
  const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, "") : "";
13718
- try {
13719
- if (!err.stack) {
13720
- err.stack = stack;
13721
- } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ""))) {
13722
- err.stack += "\n" + stack;
13723
- }
13724
- } catch (e2) {
13415
+ if (!err.stack) {
13416
+ err.stack = stack;
13417
+ } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ""))) {
13418
+ err.stack += "\n" + stack;
13725
13419
  }
13726
13420
  }
13727
13421
  throw err;
@@ -13755,16 +13449,6 @@ var Axios = class {
13755
13449
  }, true);
13756
13450
  }
13757
13451
  }
13758
- if (config.allowAbsoluteUrls !== void 0) {
13759
- } else if (this.defaults.allowAbsoluteUrls !== void 0) {
13760
- config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;
13761
- } else {
13762
- config.allowAbsoluteUrls = true;
13763
- }
13764
- validator_default.assertOptions(config, {
13765
- baseUrl: validators2.spelling("baseURL"),
13766
- withXsrfToken: validators2.spelling("withXSRFToken")
13767
- }, true);
13768
13452
  config.method = (config.method || this.defaults.method || "get").toLowerCase();
13769
13453
  let contextHeaders = headers && utils_default.merge(
13770
13454
  headers.common,
@@ -13831,7 +13515,7 @@ var Axios = class {
13831
13515
  }
13832
13516
  getUri(config) {
13833
13517
  config = mergeConfig(this.defaults, config);
13834
- const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
13518
+ const fullPath = buildFullPath(config.baseURL, config.url);
13835
13519
  return buildURL(fullPath, config.params, config.paramsSerializer);
13836
13520
  }
13837
13521
  };
@@ -13934,15 +13618,6 @@ var CancelToken = class _CancelToken {
13934
13618
  this._listeners.splice(index, 1);
13935
13619
  }
13936
13620
  }
13937
- toAbortSignal() {
13938
- const controller = new AbortController();
13939
- const abort = (err) => {
13940
- controller.abort(err);
13941
- };
13942
- this.subscribe(abort);
13943
- controller.signal.unsubscribe = () => this.unsubscribe(abort);
13944
- return controller.signal;
13945
- }
13946
13621
  /**
13947
13622
  * Returns an object that contains a new `CancelToken` and a function that, when called,
13948
13623
  * cancels the `CancelToken`.