cloudstructs 0.9.6 → 0.9.7

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 (73) hide show
  1. package/.jsii +3 -3
  2. package/assets/slack-textract/detect.lambda/index.js +477 -211
  3. package/lib/codecommit-mirror/index.js +2 -2
  4. package/lib/dmarc/index.js +1 -1
  5. package/lib/ecs-service-roller/index.js +2 -2
  6. package/lib/email-receiver/receiver.js +1 -1
  7. package/lib/saml-identity-provider/index.js +2 -2
  8. package/lib/slack-app/manifest.js +1 -1
  9. package/lib/slack-app/slack-app.js +2 -2
  10. package/lib/slack-events/index.js +1 -1
  11. package/lib/slack-textract/index.js +1 -1
  12. package/lib/ssl-server-test/index.js +1 -1
  13. package/lib/state-machine-cr-provider/index.js +1 -1
  14. package/lib/static-website/index.js +1 -1
  15. package/lib/toolkit-cleaner/index.js +1 -1
  16. package/lib/url-shortener/index.js +1 -1
  17. package/node_modules/@slack/logger/node_modules/@types/node/README.md +1 -1
  18. package/node_modules/@slack/logger/node_modules/@types/node/fs.d.ts +6 -0
  19. package/node_modules/@slack/logger/node_modules/@types/node/package.json +2 -2
  20. package/node_modules/@slack/logger/node_modules/@types/node/stream.d.ts +50 -46
  21. package/node_modules/@slack/web-api/node_modules/@types/node/README.md +1 -1
  22. package/node_modules/@slack/web-api/node_modules/@types/node/fs.d.ts +6 -0
  23. package/node_modules/@slack/web-api/node_modules/@types/node/package.json +2 -2
  24. package/node_modules/@slack/web-api/node_modules/@types/node/stream.d.ts +50 -46
  25. package/node_modules/@types/cacheable-request/node_modules/@types/node/README.md +1 -1
  26. package/node_modules/@types/cacheable-request/node_modules/@types/node/fs.d.ts +6 -0
  27. package/node_modules/@types/cacheable-request/node_modules/@types/node/package.json +2 -2
  28. package/node_modules/@types/cacheable-request/node_modules/@types/node/stream.d.ts +50 -46
  29. package/node_modules/@types/is-stream/node_modules/@types/node/README.md +1 -1
  30. package/node_modules/@types/is-stream/node_modules/@types/node/fs.d.ts +6 -0
  31. package/node_modules/@types/is-stream/node_modules/@types/node/package.json +2 -2
  32. package/node_modules/@types/is-stream/node_modules/@types/node/stream.d.ts +50 -46
  33. package/node_modules/@types/keyv/node_modules/@types/node/README.md +1 -1
  34. package/node_modules/@types/keyv/node_modules/@types/node/fs.d.ts +6 -0
  35. package/node_modules/@types/keyv/node_modules/@types/node/package.json +2 -2
  36. package/node_modules/@types/keyv/node_modules/@types/node/stream.d.ts +50 -46
  37. package/node_modules/@types/responselike/node_modules/@types/node/README.md +1 -1
  38. package/node_modules/@types/responselike/node_modules/@types/node/fs.d.ts +6 -0
  39. package/node_modules/@types/responselike/node_modules/@types/node/package.json +2 -2
  40. package/node_modules/@types/responselike/node_modules/@types/node/stream.d.ts +50 -46
  41. package/node_modules/axios/CHANGELOG.md +868 -790
  42. package/node_modules/axios/README.md +60 -15
  43. package/node_modules/axios/dist/axios.js +1018 -294
  44. package/node_modules/axios/dist/axios.js.map +1 -1
  45. package/node_modules/axios/dist/axios.min.js +1 -1
  46. package/node_modules/axios/dist/axios.min.js.map +1 -1
  47. package/node_modules/axios/dist/browser/axios.cjs +688 -308
  48. package/node_modules/axios/dist/browser/axios.cjs.map +1 -1
  49. package/node_modules/axios/dist/esm/axios.js +688 -308
  50. package/node_modules/axios/dist/esm/axios.js.map +1 -1
  51. package/node_modules/axios/dist/esm/axios.min.js +1 -1
  52. package/node_modules/axios/dist/esm/axios.min.js.map +1 -1
  53. package/node_modules/axios/dist/node/axios.cjs +597 -246
  54. package/node_modules/axios/dist/node/axios.cjs.map +1 -1
  55. package/node_modules/axios/index.d.cts +5 -2
  56. package/node_modules/axios/index.d.ts +5 -2
  57. package/node_modules/axios/lib/adapters/adapters.js +3 -1
  58. package/node_modules/axios/lib/adapters/fetch.js +227 -0
  59. package/node_modules/axios/lib/adapters/xhr.js +31 -101
  60. package/node_modules/axios/lib/core/Axios.js +9 -6
  61. package/node_modules/axios/lib/core/AxiosHeaders.js +4 -0
  62. package/node_modules/axios/lib/defaults/index.js +7 -2
  63. package/node_modules/axios/lib/env/data.js +1 -1
  64. package/node_modules/axios/lib/helpers/AxiosTransformStream.js +9 -8
  65. package/node_modules/axios/lib/helpers/composeSignals.js +46 -0
  66. package/node_modules/axios/lib/helpers/progressEventReducer.js +32 -0
  67. package/node_modules/axios/lib/helpers/resolveConfig.js +57 -0
  68. package/node_modules/axios/lib/helpers/throttle.js +5 -3
  69. package/node_modules/axios/lib/helpers/trackStream.js +55 -0
  70. package/node_modules/axios/lib/platform/common/utils.js +4 -1
  71. package/node_modules/axios/lib/utils.js +7 -2
  72. package/node_modules/axios/package.json +4 -3
  73. package/package.json +16 -16
@@ -11769,6 +11769,7 @@ var require_axios = __commonJS({
11769
11769
  kind === "object" && isFunction(thing.toString) && thing.toString() === "[object FormData]"));
11770
11770
  };
11771
11771
  var isURLSearchParams = kindOfTest("URLSearchParams");
11772
+ var [isReadableStream, isRequest, isResponse, isHeaders] = ["ReadableStream", "Request", "Response", "Headers"].map(kindOfTest);
11772
11773
  var trim = (str) => str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
11773
11774
  function forEach(obj, fn, { allOwnKeys = false } = {}) {
11774
11775
  if (obj === null || typeof obj === "undefined") {
@@ -11972,8 +11973,7 @@ var require_axios = __commonJS({
11972
11973
  var noop = () => {
11973
11974
  };
11974
11975
  var toFiniteNumber = (value, defaultValue) => {
11975
- value = +value;
11976
- return Number.isFinite(value) ? value : defaultValue;
11976
+ return value != null && Number.isFinite(value = +value) ? value : defaultValue;
11977
11977
  };
11978
11978
  var ALPHA = "abcdefghijklmnopqrstuvwxyz";
11979
11979
  var DIGIT = "0123456789";
@@ -12028,6 +12028,10 @@ var require_axios = __commonJS({
12028
12028
  isBoolean,
12029
12029
  isObject,
12030
12030
  isPlainObject,
12031
+ isReadableStream,
12032
+ isRequest,
12033
+ isResponse,
12034
+ isHeaders,
12031
12035
  isUndefined,
12032
12036
  isDate,
12033
12037
  isFile,
@@ -12388,11 +12392,13 @@ var require_axios = __commonJS({
12388
12392
  return typeof WorkerGlobalScope !== "undefined" && // eslint-disable-next-line no-undef
12389
12393
  self instanceof WorkerGlobalScope && typeof self.importScripts === "function";
12390
12394
  })();
12395
+ var origin = hasBrowserEnv && window.location.href || "http://localhost";
12391
12396
  var utils = /* @__PURE__ */ Object.freeze({
12392
12397
  __proto__: null,
12393
12398
  hasBrowserEnv,
12394
12399
  hasStandardBrowserWebWorkerEnv,
12395
- hasStandardBrowserEnv
12400
+ hasStandardBrowserEnv,
12401
+ origin
12396
12402
  });
12397
12403
  var platform = {
12398
12404
  ...utils,
@@ -12474,7 +12480,7 @@ var require_axios = __commonJS({
12474
12480
  }
12475
12481
  var defaults = {
12476
12482
  transitional: transitionalDefaults,
12477
- adapter: ["xhr", "http"],
12483
+ adapter: ["xhr", "http", "fetch"],
12478
12484
  transformRequest: [function transformRequest(data, headers) {
12479
12485
  const contentType = headers.getContentType() || "";
12480
12486
  const hasJSONContentType = contentType.indexOf("application/json") > -1;
@@ -12486,7 +12492,7 @@ var require_axios = __commonJS({
12486
12492
  if (isFormData2) {
12487
12493
  return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
12488
12494
  }
12489
- if (utils$1.isArrayBuffer(data) || utils$1.isBuffer(data) || utils$1.isStream(data) || utils$1.isFile(data) || utils$1.isBlob(data)) {
12495
+ 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)) {
12490
12496
  return data;
12491
12497
  }
12492
12498
  if (utils$1.isArrayBufferView(data)) {
@@ -12520,6 +12526,9 @@ var require_axios = __commonJS({
12520
12526
  const transitional = this.transitional || defaults.transitional;
12521
12527
  const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
12522
12528
  const JSONRequested = this.responseType === "json";
12529
+ if (utils$1.isResponse(data) || utils$1.isReadableStream(data)) {
12530
+ return data;
12531
+ }
12523
12532
  if (data && utils$1.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) {
12524
12533
  const silentJSONParsing = transitional && transitional.silentJSONParsing;
12525
12534
  const strictJSONParsing = !silentJSONParsing && JSONRequested;
@@ -12678,6 +12687,10 @@ var require_axios = __commonJS({
12678
12687
  setHeaders(header, valueOrRewrite);
12679
12688
  } else if (utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
12680
12689
  setHeaders(parseHeaders(header), valueOrRewrite);
12690
+ } else if (utils$1.isHeaders(header)) {
12691
+ for (const [key, value] of header.entries()) {
12692
+ setHeader(value, key, rewrite);
12693
+ }
12681
12694
  } else {
12682
12695
  header != null && setHeader(valueOrRewrite, header, rewrite);
12683
12696
  }
@@ -12868,7 +12881,7 @@ var require_axios = __commonJS({
12868
12881
  }
12869
12882
  return requestedURL;
12870
12883
  }
12871
- var VERSION = "1.6.8";
12884
+ var VERSION = "1.7.2";
12872
12885
  function parseProtocol(url2) {
12873
12886
  const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url2);
12874
12887
  return match && match[1] || "";
@@ -12904,7 +12917,8 @@ var require_axios = __commonJS({
12904
12917
  let timestamp = 0;
12905
12918
  const threshold = 1e3 / freq;
12906
12919
  let timer = null;
12907
- return function throttled(force, args) {
12920
+ return function throttled() {
12921
+ const force = this === true;
12908
12922
  const now = Date.now();
12909
12923
  if (force || now - timestamp > threshold) {
12910
12924
  if (timer) {
@@ -12912,13 +12926,13 @@ var require_axios = __commonJS({
12912
12926
  timer = null;
12913
12927
  }
12914
12928
  timestamp = now;
12915
- return fn.apply(null, args);
12929
+ return fn.apply(null, arguments);
12916
12930
  }
12917
12931
  if (!timer) {
12918
12932
  timer = setTimeout(() => {
12919
12933
  timer = null;
12920
12934
  timestamp = Date.now();
12921
- return fn.apply(null, args);
12935
+ return fn.apply(null, arguments);
12922
12936
  }, threshold - (now - timestamp));
12923
12937
  }
12924
12938
  };
@@ -13005,17 +13019,18 @@ var require_axios = __commonJS({
13005
13019
  bytesNotified = bytesTransferred;
13006
13020
  process.nextTick(() => {
13007
13021
  self2.emit("progress", {
13008
- "loaded": bytesTransferred,
13009
- "total": totalBytes,
13010
- "progress": totalBytes ? bytesTransferred / totalBytes : void 0,
13011
- "bytes": progressBytes,
13012
- "rate": rate ? rate : void 0,
13013
- "estimated": rate && totalBytes && bytesTransferred <= totalBytes ? (totalBytes - bytesTransferred) / rate : void 0
13022
+ loaded: bytesTransferred,
13023
+ total: totalBytes,
13024
+ progress: totalBytes ? bytesTransferred / totalBytes : void 0,
13025
+ bytes: progressBytes,
13026
+ rate: rate ? rate : void 0,
13027
+ estimated: rate && totalBytes && bytesTransferred <= totalBytes ? (totalBytes - bytesTransferred) / rate : void 0,
13028
+ lengthComputable: totalBytes != null
13014
13029
  });
13015
13030
  });
13016
13031
  }, internals.ticksRate);
13017
13032
  const onFinish = () => {
13018
- internals.updateProgress(true);
13033
+ internals.updateProgress.call(true);
13019
13034
  };
13020
13035
  this.once("end", onFinish);
13021
13036
  this.once("error", onFinish);
@@ -13718,37 +13733,30 @@ var require_axios = __commonJS({
13718
13733
  }
13719
13734
  });
13720
13735
  };
13721
- var cookies = platform.hasStandardBrowserEnv ? (
13722
- // Standard browser envs support document.cookie
13723
- {
13724
- write(name, value, expires, path, domain, secure) {
13725
- const cookie = [name + "=" + encodeURIComponent(value)];
13726
- utils$1.isNumber(expires) && cookie.push("expires=" + new Date(expires).toGMTString());
13727
- utils$1.isString(path) && cookie.push("path=" + path);
13728
- utils$1.isString(domain) && cookie.push("domain=" + domain);
13729
- secure === true && cookie.push("secure");
13730
- document.cookie = cookie.join("; ");
13731
- },
13732
- read(name) {
13733
- const match = document.cookie.match(new RegExp("(^|;\\s*)(" + name + ")=([^;]*)"));
13734
- return match ? decodeURIComponent(match[3]) : null;
13735
- },
13736
- remove(name) {
13737
- this.write(name, "", Date.now() - 864e5);
13738
- }
13739
- }
13740
- ) : (
13741
- // Non-standard browser env (web workers, react-native) lack needed support.
13742
- {
13743
- write() {
13744
- },
13745
- read() {
13746
- return null;
13747
- },
13748
- remove() {
13749
- }
13750
- }
13751
- );
13736
+ var progressEventReducer = (listener, isDownloadStream, freq = 3) => {
13737
+ let bytesNotified = 0;
13738
+ const _speedometer = speedometer(50, 250);
13739
+ return throttle((e) => {
13740
+ const loaded = e.loaded;
13741
+ const total = e.lengthComputable ? e.total : void 0;
13742
+ const progressBytes = loaded - bytesNotified;
13743
+ const rate = _speedometer(progressBytes);
13744
+ const inRange = loaded <= total;
13745
+ bytesNotified = loaded;
13746
+ const data = {
13747
+ loaded,
13748
+ total,
13749
+ progress: total ? loaded / total : void 0,
13750
+ bytes: progressBytes,
13751
+ rate: rate ? rate : void 0,
13752
+ estimated: rate && total && inRange ? (total - loaded) / rate : void 0,
13753
+ event: e,
13754
+ lengthComputable: total != null
13755
+ };
13756
+ data[isDownloadStream ? "download" : "upload"] = true;
13757
+ listener(data);
13758
+ }, freq);
13759
+ };
13752
13760
  var isURLSameOrigin = platform.hasStandardBrowserEnv ? (
13753
13761
  // Standard browser envs have full support of the APIs needed to test
13754
13762
  // whether the request URL is of the same origin as current location.
@@ -13788,62 +13796,165 @@ var require_axios = __commonJS({
13788
13796
  };
13789
13797
  }()
13790
13798
  );
13791
- function progressEventReducer(listener, isDownloadStream) {
13792
- let bytesNotified = 0;
13793
- const _speedometer = speedometer(50, 250);
13794
- return (e) => {
13795
- const loaded = e.loaded;
13796
- const total = e.lengthComputable ? e.total : void 0;
13797
- const progressBytes = loaded - bytesNotified;
13798
- const rate = _speedometer(progressBytes);
13799
- const inRange = loaded <= total;
13800
- bytesNotified = loaded;
13801
- const data = {
13802
- loaded,
13803
- total,
13804
- progress: total ? loaded / total : void 0,
13805
- bytes: progressBytes,
13806
- rate: rate ? rate : void 0,
13807
- estimated: rate && total && inRange ? (total - loaded) / rate : void 0,
13808
- event: e
13809
- };
13810
- data[isDownloadStream ? "download" : "upload"] = true;
13811
- listener(data);
13799
+ var cookies = platform.hasStandardBrowserEnv ? (
13800
+ // Standard browser envs support document.cookie
13801
+ {
13802
+ write(name, value, expires, path, domain, secure) {
13803
+ const cookie = [name + "=" + encodeURIComponent(value)];
13804
+ utils$1.isNumber(expires) && cookie.push("expires=" + new Date(expires).toGMTString());
13805
+ utils$1.isString(path) && cookie.push("path=" + path);
13806
+ utils$1.isString(domain) && cookie.push("domain=" + domain);
13807
+ secure === true && cookie.push("secure");
13808
+ document.cookie = cookie.join("; ");
13809
+ },
13810
+ read(name) {
13811
+ const match = document.cookie.match(new RegExp("(^|;\\s*)(" + name + ")=([^;]*)"));
13812
+ return match ? decodeURIComponent(match[3]) : null;
13813
+ },
13814
+ remove(name) {
13815
+ this.write(name, "", Date.now() - 864e5);
13816
+ }
13817
+ }
13818
+ ) : (
13819
+ // Non-standard browser env (web workers, react-native) lack needed support.
13820
+ {
13821
+ write() {
13822
+ },
13823
+ read() {
13824
+ return null;
13825
+ },
13826
+ remove() {
13827
+ }
13828
+ }
13829
+ );
13830
+ var headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? { ...thing } : thing;
13831
+ function mergeConfig(config1, config2) {
13832
+ config2 = config2 || {};
13833
+ const config = {};
13834
+ function getMergedValue(target, source, caseless) {
13835
+ if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {
13836
+ return utils$1.merge.call({ caseless }, target, source);
13837
+ } else if (utils$1.isPlainObject(source)) {
13838
+ return utils$1.merge({}, source);
13839
+ } else if (utils$1.isArray(source)) {
13840
+ return source.slice();
13841
+ }
13842
+ return source;
13843
+ }
13844
+ function mergeDeepProperties(a, b, caseless) {
13845
+ if (!utils$1.isUndefined(b)) {
13846
+ return getMergedValue(a, b, caseless);
13847
+ } else if (!utils$1.isUndefined(a)) {
13848
+ return getMergedValue(void 0, a, caseless);
13849
+ }
13850
+ }
13851
+ function valueFromConfig2(a, b) {
13852
+ if (!utils$1.isUndefined(b)) {
13853
+ return getMergedValue(void 0, b);
13854
+ }
13855
+ }
13856
+ function defaultToConfig2(a, b) {
13857
+ if (!utils$1.isUndefined(b)) {
13858
+ return getMergedValue(void 0, b);
13859
+ } else if (!utils$1.isUndefined(a)) {
13860
+ return getMergedValue(void 0, a);
13861
+ }
13862
+ }
13863
+ function mergeDirectKeys(a, b, prop) {
13864
+ if (prop in config2) {
13865
+ return getMergedValue(a, b);
13866
+ } else if (prop in config1) {
13867
+ return getMergedValue(void 0, a);
13868
+ }
13869
+ }
13870
+ const mergeMap = {
13871
+ url: valueFromConfig2,
13872
+ method: valueFromConfig2,
13873
+ data: valueFromConfig2,
13874
+ baseURL: defaultToConfig2,
13875
+ transformRequest: defaultToConfig2,
13876
+ transformResponse: defaultToConfig2,
13877
+ paramsSerializer: defaultToConfig2,
13878
+ timeout: defaultToConfig2,
13879
+ timeoutMessage: defaultToConfig2,
13880
+ withCredentials: defaultToConfig2,
13881
+ withXSRFToken: defaultToConfig2,
13882
+ adapter: defaultToConfig2,
13883
+ responseType: defaultToConfig2,
13884
+ xsrfCookieName: defaultToConfig2,
13885
+ xsrfHeaderName: defaultToConfig2,
13886
+ onUploadProgress: defaultToConfig2,
13887
+ onDownloadProgress: defaultToConfig2,
13888
+ decompress: defaultToConfig2,
13889
+ maxContentLength: defaultToConfig2,
13890
+ maxBodyLength: defaultToConfig2,
13891
+ beforeRedirect: defaultToConfig2,
13892
+ transport: defaultToConfig2,
13893
+ httpAgent: defaultToConfig2,
13894
+ httpsAgent: defaultToConfig2,
13895
+ cancelToken: defaultToConfig2,
13896
+ socketPath: defaultToConfig2,
13897
+ responseEncoding: defaultToConfig2,
13898
+ validateStatus: mergeDirectKeys,
13899
+ headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)
13812
13900
  };
13901
+ utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
13902
+ const merge2 = mergeMap[prop] || mergeDeepProperties;
13903
+ const configValue = merge2(config1[prop], config2[prop], prop);
13904
+ utils$1.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config[prop] = configValue);
13905
+ });
13906
+ return config;
13813
13907
  }
13908
+ var resolveConfig = (config) => {
13909
+ const newConfig = mergeConfig({}, config);
13910
+ let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig;
13911
+ newConfig.headers = headers = AxiosHeaders$1.from(headers);
13912
+ newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url), config.params, config.paramsSerializer);
13913
+ if (auth) {
13914
+ headers.set(
13915
+ "Authorization",
13916
+ "Basic " + btoa((auth.username || "") + ":" + (auth.password ? unescape(encodeURIComponent(auth.password)) : ""))
13917
+ );
13918
+ }
13919
+ let contentType;
13920
+ if (utils$1.isFormData(data)) {
13921
+ if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
13922
+ headers.setContentType(void 0);
13923
+ } else if ((contentType = headers.getContentType()) !== false) {
13924
+ const [type, ...tokens] = contentType ? contentType.split(";").map((token) => token.trim()).filter(Boolean) : [];
13925
+ headers.setContentType([type || "multipart/form-data", ...tokens].join("; "));
13926
+ }
13927
+ }
13928
+ if (platform.hasStandardBrowserEnv) {
13929
+ withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));
13930
+ if (withXSRFToken || withXSRFToken !== false && isURLSameOrigin(newConfig.url)) {
13931
+ const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName);
13932
+ if (xsrfValue) {
13933
+ headers.set(xsrfHeaderName, xsrfValue);
13934
+ }
13935
+ }
13936
+ }
13937
+ return newConfig;
13938
+ };
13814
13939
  var isXHRAdapterSupported = typeof XMLHttpRequest !== "undefined";
13815
13940
  var xhrAdapter = isXHRAdapterSupported && function(config) {
13816
13941
  return new Promise(function dispatchXhrRequest(resolve, reject) {
13817
- let requestData = config.data;
13818
- const requestHeaders = AxiosHeaders$1.from(config.headers).normalize();
13819
- let { responseType, withXSRFToken } = config;
13942
+ const _config = resolveConfig(config);
13943
+ let requestData = _config.data;
13944
+ const requestHeaders = AxiosHeaders$1.from(_config.headers).normalize();
13945
+ let { responseType } = _config;
13820
13946
  let onCanceled;
13821
13947
  function done() {
13822
- if (config.cancelToken) {
13823
- config.cancelToken.unsubscribe(onCanceled);
13948
+ if (_config.cancelToken) {
13949
+ _config.cancelToken.unsubscribe(onCanceled);
13824
13950
  }
13825
- if (config.signal) {
13826
- config.signal.removeEventListener("abort", onCanceled);
13827
- }
13828
- }
13829
- let contentType;
13830
- if (utils$1.isFormData(requestData)) {
13831
- if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
13832
- requestHeaders.setContentType(false);
13833
- } else if ((contentType = requestHeaders.getContentType()) !== false) {
13834
- const [type, ...tokens] = contentType ? contentType.split(";").map((token) => token.trim()).filter(Boolean) : [];
13835
- requestHeaders.setContentType([type || "multipart/form-data", ...tokens].join("; "));
13951
+ if (_config.signal) {
13952
+ _config.signal.removeEventListener("abort", onCanceled);
13836
13953
  }
13837
13954
  }
13838
13955
  let request = new XMLHttpRequest();
13839
- if (config.auth) {
13840
- const username = config.auth.username || "";
13841
- const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : "";
13842
- requestHeaders.set("Authorization", "Basic " + btoa(username + ":" + password));
13843
- }
13844
- const fullPath = buildFullPath(config.baseURL, config.url);
13845
- request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);
13846
- request.timeout = config.timeout;
13956
+ request.open(_config.method.toUpperCase(), _config.url, true);
13957
+ request.timeout = _config.timeout;
13847
13958
  function onloadend() {
13848
13959
  if (!request) {
13849
13960
  return;
@@ -13886,55 +13997,46 @@ var require_axios = __commonJS({
13886
13997
  if (!request) {
13887
13998
  return;
13888
13999
  }
13889
- reject(new AxiosError("Request aborted", AxiosError.ECONNABORTED, config, request));
14000
+ reject(new AxiosError("Request aborted", AxiosError.ECONNABORTED, _config, request));
13890
14001
  request = null;
13891
14002
  };
13892
14003
  request.onerror = function handleError() {
13893
- reject(new AxiosError("Network Error", AxiosError.ERR_NETWORK, config, request));
14004
+ reject(new AxiosError("Network Error", AxiosError.ERR_NETWORK, _config, request));
13894
14005
  request = null;
13895
14006
  };
13896
14007
  request.ontimeout = function handleTimeout() {
13897
- let timeoutErrorMessage = config.timeout ? "timeout of " + config.timeout + "ms exceeded" : "timeout exceeded";
13898
- const transitional = config.transitional || transitionalDefaults;
13899
- if (config.timeoutErrorMessage) {
13900
- timeoutErrorMessage = config.timeoutErrorMessage;
14008
+ let timeoutErrorMessage = _config.timeout ? "timeout of " + _config.timeout + "ms exceeded" : "timeout exceeded";
14009
+ const transitional = _config.transitional || transitionalDefaults;
14010
+ if (_config.timeoutErrorMessage) {
14011
+ timeoutErrorMessage = _config.timeoutErrorMessage;
13901
14012
  }
13902
14013
  reject(new AxiosError(
13903
14014
  timeoutErrorMessage,
13904
14015
  transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,
13905
- config,
14016
+ _config,
13906
14017
  request
13907
14018
  ));
13908
14019
  request = null;
13909
14020
  };
13910
- if (platform.hasStandardBrowserEnv) {
13911
- withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));
13912
- if (withXSRFToken || withXSRFToken !== false && isURLSameOrigin(fullPath)) {
13913
- const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies.read(config.xsrfCookieName);
13914
- if (xsrfValue) {
13915
- requestHeaders.set(config.xsrfHeaderName, xsrfValue);
13916
- }
13917
- }
13918
- }
13919
14021
  requestData === void 0 && requestHeaders.setContentType(null);
13920
14022
  if ("setRequestHeader" in request) {
13921
14023
  utils$1.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
13922
14024
  request.setRequestHeader(key, val);
13923
14025
  });
13924
14026
  }
13925
- if (!utils$1.isUndefined(config.withCredentials)) {
13926
- request.withCredentials = !!config.withCredentials;
14027
+ if (!utils$1.isUndefined(_config.withCredentials)) {
14028
+ request.withCredentials = !!_config.withCredentials;
13927
14029
  }
13928
14030
  if (responseType && responseType !== "json") {
13929
- request.responseType = config.responseType;
14031
+ request.responseType = _config.responseType;
13930
14032
  }
13931
- if (typeof config.onDownloadProgress === "function") {
13932
- request.addEventListener("progress", progressEventReducer(config.onDownloadProgress, true));
14033
+ if (typeof _config.onDownloadProgress === "function") {
14034
+ request.addEventListener("progress", progressEventReducer(_config.onDownloadProgress, true));
13933
14035
  }
13934
- if (typeof config.onUploadProgress === "function" && request.upload) {
13935
- request.upload.addEventListener("progress", progressEventReducer(config.onUploadProgress));
14036
+ if (typeof _config.onUploadProgress === "function" && request.upload) {
14037
+ request.upload.addEventListener("progress", progressEventReducer(_config.onUploadProgress));
13936
14038
  }
13937
- if (config.cancelToken || config.signal) {
14039
+ if (_config.cancelToken || _config.signal) {
13938
14040
  onCanceled = (cancel) => {
13939
14041
  if (!request) {
13940
14042
  return;
@@ -13943,12 +14045,12 @@ var require_axios = __commonJS({
13943
14045
  request.abort();
13944
14046
  request = null;
13945
14047
  };
13946
- config.cancelToken && config.cancelToken.subscribe(onCanceled);
13947
- if (config.signal) {
13948
- config.signal.aborted ? onCanceled() : config.signal.addEventListener("abort", onCanceled);
14048
+ _config.cancelToken && _config.cancelToken.subscribe(onCanceled);
14049
+ if (_config.signal) {
14050
+ _config.signal.aborted ? onCanceled() : _config.signal.addEventListener("abort", onCanceled);
13949
14051
  }
13950
14052
  }
13951
- const protocol = parseProtocol(fullPath);
14053
+ const protocol = parseProtocol(_config.url);
13952
14054
  if (protocol && platform.protocols.indexOf(protocol) === -1) {
13953
14055
  reject(new AxiosError("Unsupported protocol " + protocol + ":", AxiosError.ERR_BAD_REQUEST, config));
13954
14056
  return;
@@ -13956,9 +14058,248 @@ var require_axios = __commonJS({
13956
14058
  request.send(requestData || null);
13957
14059
  });
13958
14060
  };
14061
+ var composeSignals = (signals, timeout) => {
14062
+ let controller = new AbortController();
14063
+ let aborted;
14064
+ const onabort = function(cancel) {
14065
+ if (!aborted) {
14066
+ aborted = true;
14067
+ unsubscribe();
14068
+ const err = cancel instanceof Error ? cancel : this.reason;
14069
+ controller.abort(err instanceof AxiosError ? err : new CanceledError(err instanceof Error ? err.message : err));
14070
+ }
14071
+ };
14072
+ let timer = timeout && setTimeout(() => {
14073
+ onabort(new AxiosError(`timeout ${timeout} of ms exceeded`, AxiosError.ETIMEDOUT));
14074
+ }, timeout);
14075
+ const unsubscribe = () => {
14076
+ if (signals) {
14077
+ timer && clearTimeout(timer);
14078
+ timer = null;
14079
+ signals.forEach((signal2) => {
14080
+ signal2 && (signal2.removeEventListener ? signal2.removeEventListener("abort", onabort) : signal2.unsubscribe(onabort));
14081
+ });
14082
+ signals = null;
14083
+ }
14084
+ };
14085
+ signals.forEach((signal2) => signal2 && signal2.addEventListener && signal2.addEventListener("abort", onabort));
14086
+ const { signal } = controller;
14087
+ signal.unsubscribe = unsubscribe;
14088
+ return [signal, () => {
14089
+ timer && clearTimeout(timer);
14090
+ timer = null;
14091
+ }];
14092
+ };
14093
+ var composeSignals$1 = composeSignals;
14094
+ var streamChunk = function* (chunk, chunkSize) {
14095
+ let len = chunk.byteLength;
14096
+ if (!chunkSize || len < chunkSize) {
14097
+ yield chunk;
14098
+ return;
14099
+ }
14100
+ let pos = 0;
14101
+ let end;
14102
+ while (pos < len) {
14103
+ end = pos + chunkSize;
14104
+ yield chunk.slice(pos, end);
14105
+ pos = end;
14106
+ }
14107
+ };
14108
+ var readBytes = async function* (iterable, chunkSize, encode2) {
14109
+ for await (const chunk of iterable) {
14110
+ yield* streamChunk(ArrayBuffer.isView(chunk) ? chunk : await encode2(String(chunk)), chunkSize);
14111
+ }
14112
+ };
14113
+ var trackStream = (stream2, chunkSize, onProgress, onFinish, encode2) => {
14114
+ const iterator = readBytes(stream2, chunkSize, encode2);
14115
+ let bytes = 0;
14116
+ return new ReadableStream({
14117
+ type: "bytes",
14118
+ async pull(controller) {
14119
+ const { done, value } = await iterator.next();
14120
+ if (done) {
14121
+ controller.close();
14122
+ onFinish();
14123
+ return;
14124
+ }
14125
+ let len = value.byteLength;
14126
+ onProgress && onProgress(bytes += len);
14127
+ controller.enqueue(new Uint8Array(value));
14128
+ },
14129
+ cancel(reason) {
14130
+ onFinish(reason);
14131
+ return iterator.return();
14132
+ }
14133
+ }, {
14134
+ highWaterMark: 2
14135
+ });
14136
+ };
14137
+ var fetchProgressDecorator = (total, fn) => {
14138
+ const lengthComputable = total != null;
14139
+ return (loaded) => setTimeout(() => fn({
14140
+ lengthComputable,
14141
+ total,
14142
+ loaded
14143
+ }));
14144
+ };
14145
+ var isFetchSupported = typeof fetch === "function" && typeof Request === "function" && typeof Response === "function";
14146
+ var isReadableStreamSupported = isFetchSupported && typeof ReadableStream === "function";
14147
+ var encodeText = isFetchSupported && (typeof TextEncoder === "function" ? /* @__PURE__ */ ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) : async (str) => new Uint8Array(await new Response(str).arrayBuffer()));
14148
+ var supportsRequestStream = isReadableStreamSupported && (() => {
14149
+ let duplexAccessed = false;
14150
+ const hasContentType = new Request(platform.origin, {
14151
+ body: new ReadableStream(),
14152
+ method: "POST",
14153
+ get duplex() {
14154
+ duplexAccessed = true;
14155
+ return "half";
14156
+ }
14157
+ }).headers.has("Content-Type");
14158
+ return duplexAccessed && !hasContentType;
14159
+ })();
14160
+ var DEFAULT_CHUNK_SIZE = 64 * 1024;
14161
+ var supportsResponseStream = isReadableStreamSupported && !!(() => {
14162
+ try {
14163
+ return utils$1.isReadableStream(new Response("").body);
14164
+ } catch (err) {
14165
+ }
14166
+ })();
14167
+ var resolvers = {
14168
+ stream: supportsResponseStream && ((res) => res.body)
14169
+ };
14170
+ isFetchSupported && ((res) => {
14171
+ ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((type) => {
14172
+ !resolvers[type] && (resolvers[type] = utils$1.isFunction(res[type]) ? (res2) => res2[type]() : (_, config) => {
14173
+ throw new AxiosError(`Response type '${type}' is not supported`, AxiosError.ERR_NOT_SUPPORT, config);
14174
+ });
14175
+ });
14176
+ })(new Response());
14177
+ var getBodyLength = async (body) => {
14178
+ if (body == null) {
14179
+ return 0;
14180
+ }
14181
+ if (utils$1.isBlob(body)) {
14182
+ return body.size;
14183
+ }
14184
+ if (utils$1.isSpecCompliantForm(body)) {
14185
+ return (await new Request(body).arrayBuffer()).byteLength;
14186
+ }
14187
+ if (utils$1.isArrayBufferView(body)) {
14188
+ return body.byteLength;
14189
+ }
14190
+ if (utils$1.isURLSearchParams(body)) {
14191
+ body = body + "";
14192
+ }
14193
+ if (utils$1.isString(body)) {
14194
+ return (await encodeText(body)).byteLength;
14195
+ }
14196
+ };
14197
+ var resolveBodyLength = async (headers, body) => {
14198
+ const length = utils$1.toFiniteNumber(headers.getContentLength());
14199
+ return length == null ? getBodyLength(body) : length;
14200
+ };
14201
+ var fetchAdapter = isFetchSupported && (async (config) => {
14202
+ let {
14203
+ url: url2,
14204
+ method,
14205
+ data,
14206
+ signal,
14207
+ cancelToken,
14208
+ timeout,
14209
+ onDownloadProgress,
14210
+ onUploadProgress,
14211
+ responseType,
14212
+ headers,
14213
+ withCredentials = "same-origin",
14214
+ fetchOptions
14215
+ } = resolveConfig(config);
14216
+ responseType = responseType ? (responseType + "").toLowerCase() : "text";
14217
+ let [composedSignal, stopTimeout] = signal || cancelToken || timeout ? composeSignals$1([signal, cancelToken], timeout) : [];
14218
+ let finished, request;
14219
+ const onFinish = () => {
14220
+ !finished && setTimeout(() => {
14221
+ composedSignal && composedSignal.unsubscribe();
14222
+ });
14223
+ finished = true;
14224
+ };
14225
+ let requestContentLength;
14226
+ try {
14227
+ if (onUploadProgress && supportsRequestStream && method !== "get" && method !== "head" && (requestContentLength = await resolveBodyLength(headers, data)) !== 0) {
14228
+ let _request = new Request(url2, {
14229
+ method: "POST",
14230
+ body: data,
14231
+ duplex: "half"
14232
+ });
14233
+ let contentTypeHeader;
14234
+ if (utils$1.isFormData(data) && (contentTypeHeader = _request.headers.get("content-type"))) {
14235
+ headers.setContentType(contentTypeHeader);
14236
+ }
14237
+ if (_request.body) {
14238
+ data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, fetchProgressDecorator(
14239
+ requestContentLength,
14240
+ progressEventReducer(onUploadProgress)
14241
+ ), null, encodeText);
14242
+ }
14243
+ }
14244
+ if (!utils$1.isString(withCredentials)) {
14245
+ withCredentials = withCredentials ? "cors" : "omit";
14246
+ }
14247
+ request = new Request(url2, {
14248
+ ...fetchOptions,
14249
+ signal: composedSignal,
14250
+ method: method.toUpperCase(),
14251
+ headers: headers.normalize().toJSON(),
14252
+ body: data,
14253
+ duplex: "half",
14254
+ withCredentials
14255
+ });
14256
+ let response = await fetch(request);
14257
+ const isStreamResponse = supportsResponseStream && (responseType === "stream" || responseType === "response");
14258
+ if (supportsResponseStream && (onDownloadProgress || isStreamResponse)) {
14259
+ const options = {};
14260
+ ["status", "statusText", "headers"].forEach((prop) => {
14261
+ options[prop] = response[prop];
14262
+ });
14263
+ const responseContentLength = utils$1.toFiniteNumber(response.headers.get("content-length"));
14264
+ response = new Response(
14265
+ trackStream(response.body, DEFAULT_CHUNK_SIZE, onDownloadProgress && fetchProgressDecorator(
14266
+ responseContentLength,
14267
+ progressEventReducer(onDownloadProgress, true)
14268
+ ), isStreamResponse && onFinish, encodeText),
14269
+ options
14270
+ );
14271
+ }
14272
+ responseType = responseType || "text";
14273
+ let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || "text"](response, config);
14274
+ !isStreamResponse && onFinish();
14275
+ stopTimeout && stopTimeout();
14276
+ return await new Promise((resolve, reject) => {
14277
+ settle(resolve, reject, {
14278
+ data: responseData,
14279
+ headers: AxiosHeaders$1.from(response.headers),
14280
+ status: response.status,
14281
+ statusText: response.statusText,
14282
+ config,
14283
+ request
14284
+ });
14285
+ });
14286
+ } catch (err) {
14287
+ onFinish();
14288
+ if (err && err.name === "TypeError" && /fetch/i.test(err.message)) {
14289
+ throw Object.assign(
14290
+ new AxiosError("Network Error", AxiosError.ERR_NETWORK, config, request),
14291
+ {
14292
+ cause: err.cause || err
14293
+ }
14294
+ );
14295
+ }
14296
+ throw AxiosError.from(err, err && err.code, config, request);
14297
+ }
14298
+ });
13959
14299
  var knownAdapters = {
13960
14300
  http: httpAdapter,
13961
- xhr: xhrAdapter
14301
+ xhr: xhrAdapter,
14302
+ fetch: fetchAdapter
13962
14303
  };
13963
14304
  utils$1.forEach(knownAdapters, (fn, value) => {
13964
14305
  if (fn) {
@@ -14050,84 +14391,6 @@ var require_axios = __commonJS({
14050
14391
  return Promise.reject(reason);
14051
14392
  });
14052
14393
  }
14053
- var headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? { ...thing } : thing;
14054
- function mergeConfig(config1, config2) {
14055
- config2 = config2 || {};
14056
- const config = {};
14057
- function getMergedValue(target, source, caseless) {
14058
- if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {
14059
- return utils$1.merge.call({ caseless }, target, source);
14060
- } else if (utils$1.isPlainObject(source)) {
14061
- return utils$1.merge({}, source);
14062
- } else if (utils$1.isArray(source)) {
14063
- return source.slice();
14064
- }
14065
- return source;
14066
- }
14067
- function mergeDeepProperties(a, b, caseless) {
14068
- if (!utils$1.isUndefined(b)) {
14069
- return getMergedValue(a, b, caseless);
14070
- } else if (!utils$1.isUndefined(a)) {
14071
- return getMergedValue(void 0, a, caseless);
14072
- }
14073
- }
14074
- function valueFromConfig2(a, b) {
14075
- if (!utils$1.isUndefined(b)) {
14076
- return getMergedValue(void 0, b);
14077
- }
14078
- }
14079
- function defaultToConfig2(a, b) {
14080
- if (!utils$1.isUndefined(b)) {
14081
- return getMergedValue(void 0, b);
14082
- } else if (!utils$1.isUndefined(a)) {
14083
- return getMergedValue(void 0, a);
14084
- }
14085
- }
14086
- function mergeDirectKeys(a, b, prop) {
14087
- if (prop in config2) {
14088
- return getMergedValue(a, b);
14089
- } else if (prop in config1) {
14090
- return getMergedValue(void 0, a);
14091
- }
14092
- }
14093
- const mergeMap = {
14094
- url: valueFromConfig2,
14095
- method: valueFromConfig2,
14096
- data: valueFromConfig2,
14097
- baseURL: defaultToConfig2,
14098
- transformRequest: defaultToConfig2,
14099
- transformResponse: defaultToConfig2,
14100
- paramsSerializer: defaultToConfig2,
14101
- timeout: defaultToConfig2,
14102
- timeoutMessage: defaultToConfig2,
14103
- withCredentials: defaultToConfig2,
14104
- withXSRFToken: defaultToConfig2,
14105
- adapter: defaultToConfig2,
14106
- responseType: defaultToConfig2,
14107
- xsrfCookieName: defaultToConfig2,
14108
- xsrfHeaderName: defaultToConfig2,
14109
- onUploadProgress: defaultToConfig2,
14110
- onDownloadProgress: defaultToConfig2,
14111
- decompress: defaultToConfig2,
14112
- maxContentLength: defaultToConfig2,
14113
- maxBodyLength: defaultToConfig2,
14114
- beforeRedirect: defaultToConfig2,
14115
- transport: defaultToConfig2,
14116
- httpAgent: defaultToConfig2,
14117
- httpsAgent: defaultToConfig2,
14118
- cancelToken: defaultToConfig2,
14119
- socketPath: defaultToConfig2,
14120
- responseEncoding: defaultToConfig2,
14121
- validateStatus: mergeDirectKeys,
14122
- headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)
14123
- };
14124
- utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
14125
- const merge2 = mergeMap[prop] || mergeDeepProperties;
14126
- const configValue = merge2(config1[prop], config2[prop], prop);
14127
- utils$1.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config[prop] = configValue);
14128
- });
14129
- return config;
14130
- }
14131
14394
  var validators$1 = {};
14132
14395
  ["object", "boolean", "number", "function", "string", "symbol"].forEach((type, i) => {
14133
14396
  validators$1[type] = function validator2(thing) {
@@ -14209,10 +14472,13 @@ var require_axios = __commonJS({
14209
14472
  let dummy;
14210
14473
  Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : dummy = new Error();
14211
14474
  const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, "") : "";
14212
- if (!err.stack) {
14213
- err.stack = stack;
14214
- } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ""))) {
14215
- err.stack += "\n" + stack;
14475
+ try {
14476
+ if (!err.stack) {
14477
+ err.stack = stack;
14478
+ } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ""))) {
14479
+ err.stack += "\n" + stack;
14480
+ }
14481
+ } catch (e) {
14216
14482
  }
14217
14483
  }
14218
14484
  throw err;
@@ -18975,7 +19241,7 @@ var require_src2 = __commonJS({
18975
19241
  "use strict";
18976
19242
  var Readable = require("stream").Readable;
18977
19243
  var lowercaseKeys = require_lowercase_keys();
18978
- var Response = class extends Readable {
19244
+ var Response2 = class extends Readable {
18979
19245
  constructor(statusCode, headers, body, url) {
18980
19246
  if (typeof statusCode !== "number") {
18981
19247
  throw new TypeError("Argument `statusCode` should be a number");
@@ -19000,7 +19266,7 @@ var require_src2 = __commonJS({
19000
19266
  this.push(null);
19001
19267
  }
19002
19268
  };
19003
- module2.exports = Response;
19269
+ module2.exports = Response2;
19004
19270
  }
19005
19271
  });
19006
19272
 
@@ -19315,7 +19581,7 @@ var require_src5 = __commonJS({
19315
19581
  var normalizeUrl = require_normalize_url();
19316
19582
  var getStream = require_get_stream();
19317
19583
  var CachePolicy = require_http_cache_semantics();
19318
- var Response = require_src2();
19584
+ var Response2 = require_src2();
19319
19585
  var lowercaseKeys = require_lowercase_keys();
19320
19586
  var cloneResponse = require_src3();
19321
19587
  var Keyv = require_src4();
@@ -19385,7 +19651,7 @@ var require_src5 = __commonJS({
19385
19651
  const revalidatedPolicy = CachePolicy.fromObject(revalidate.cachePolicy).revalidatedPolicy(opts2, response);
19386
19652
  if (!revalidatedPolicy.modified) {
19387
19653
  const headers = revalidatedPolicy.policy.responseHeaders();
19388
- response = new Response(revalidate.statusCode, headers, revalidate.body, revalidate.url);
19654
+ response = new Response2(revalidate.statusCode, headers, revalidate.body, revalidate.url);
19389
19655
  response.cachePolicy = revalidatedPolicy.policy;
19390
19656
  response.fromCache = true;
19391
19657
  }
@@ -19456,7 +19722,7 @@ var require_src5 = __commonJS({
19456
19722
  const policy = CachePolicy.fromObject(cacheEntry.cachePolicy);
19457
19723
  if (policy.satisfiesWithoutRevalidation(opts2) && !opts2.forceRefresh) {
19458
19724
  const headers = policy.responseHeaders();
19459
- const response = new Response(cacheEntry.statusCode, headers, cacheEntry.body, cacheEntry.url);
19725
+ const response = new Response2(cacheEntry.statusCode, headers, cacheEntry.body, cacheEntry.url);
19460
19726
  response.cachePolicy = policy;
19461
19727
  response.fromCache = true;
19462
19728
  ee.emit("response", response);
@@ -21537,7 +21803,7 @@ var require_core = __commonJS({
21537
21803
  Error.captureStackTrace(this, this.constructor);
21538
21804
  this.name = "RequestError";
21539
21805
  this.code = (_a = error.code) !== null && _a !== void 0 ? _a : "ERR_GOT_REQUEST_ERROR";
21540
- if (self2 instanceof Request) {
21806
+ if (self2 instanceof Request2) {
21541
21807
  Object.defineProperty(this, "request", {
21542
21808
  enumerable: false,
21543
21809
  value: self2
@@ -21638,7 +21904,7 @@ var require_core = __commonJS({
21638
21904
  "upgrade",
21639
21905
  "timeout"
21640
21906
  ];
21641
- var Request = class extends stream_1.Duplex {
21907
+ var Request2 = class extends stream_1.Duplex {
21642
21908
  constructor(url, options = {}, defaults) {
21643
21909
  super({
21644
21910
  // This must be false, to enable throwing after destroy
@@ -22725,7 +22991,7 @@ var require_core = __commonJS({
22725
22991
  return this;
22726
22992
  }
22727
22993
  };
22728
- exports2.default = Request;
22994
+ exports2.default = Request2;
22729
22995
  }
22730
22996
  });
22731
22997