@appliedblockchain/silentdatarollup-ethers-provider-fireblocks 1.0.6 → 1.0.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 (3) hide show
  1. package/dist/index.js +351 -199
  2. package/dist/index.mjs +351 -199
  3. package/package.json +2 -2
package/dist/index.mjs CHANGED
@@ -11633,6 +11633,7 @@ var require_axios = __commonJS({
11633
11633
  }
11634
11634
  var { toString } = Object.prototype;
11635
11635
  var { getPrototypeOf } = Object;
11636
+ var { iterator, toStringTag } = Symbol;
11636
11637
  var kindOf = /* @__PURE__ */ ((cache) => (thing) => {
11637
11638
  const str = toString.call(thing);
11638
11639
  return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
@@ -11645,7 +11646,7 @@ var require_axios = __commonJS({
11645
11646
  var { isArray } = Array;
11646
11647
  var isUndefined = typeOfTest("undefined");
11647
11648
  function isBuffer(val) {
11648
- return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);
11649
+ return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) && isFunction$1(val.constructor.isBuffer) && val.constructor.isBuffer(val);
11649
11650
  }
11650
11651
  var isArrayBuffer = kindOfTest("ArrayBuffer");
11651
11652
  function isArrayBufferView(val) {
@@ -11658,7 +11659,7 @@ var require_axios = __commonJS({
11658
11659
  return result;
11659
11660
  }
11660
11661
  var isString = typeOfTest("string");
11661
- var isFunction = typeOfTest("function");
11662
+ var isFunction$1 = typeOfTest("function");
11662
11663
  var isNumber = typeOfTest("number");
11663
11664
  var isObject = (thing) => thing !== null && typeof thing === "object";
11664
11665
  var isBoolean = (thing) => thing === true || thing === false;
@@ -11667,17 +11668,27 @@ var require_axios = __commonJS({
11667
11668
  return false;
11668
11669
  }
11669
11670
  const prototype2 = getPrototypeOf(val);
11670
- return (prototype2 === null || prototype2 === Object.prototype || Object.getPrototypeOf(prototype2) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);
11671
+ return (prototype2 === null || prototype2 === Object.prototype || Object.getPrototypeOf(prototype2) === null) && !(toStringTag in val) && !(iterator in val);
11672
+ };
11673
+ var isEmptyObject = (val) => {
11674
+ if (!isObject(val) || isBuffer(val)) {
11675
+ return false;
11676
+ }
11677
+ try {
11678
+ return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype;
11679
+ } catch (e) {
11680
+ return false;
11681
+ }
11671
11682
  };
11672
11683
  var isDate = kindOfTest("Date");
11673
11684
  var isFile = kindOfTest("File");
11674
11685
  var isBlob = kindOfTest("Blob");
11675
11686
  var isFileList = kindOfTest("FileList");
11676
- var isStream = (val) => isObject(val) && isFunction(val.pipe);
11687
+ var isStream = (val) => isObject(val) && isFunction$1(val.pipe);
11677
11688
  var isFormData = (thing) => {
11678
11689
  let kind;
11679
- return thing && (typeof FormData === "function" && thing instanceof FormData || isFunction(thing.append) && ((kind = kindOf(thing)) === "formdata" || // detect form-data instance
11680
- kind === "object" && isFunction(thing.toString) && thing.toString() === "[object FormData]"));
11690
+ return thing && (typeof FormData === "function" && thing instanceof FormData || isFunction$1(thing.append) && ((kind = kindOf(thing)) === "formdata" || // detect form-data instance
11691
+ kind === "object" && isFunction$1(thing.toString) && thing.toString() === "[object FormData]"));
11681
11692
  };
11682
11693
  var isURLSearchParams = kindOfTest("URLSearchParams");
11683
11694
  var [isReadableStream, isRequest, isResponse, isHeaders] = ["ReadableStream", "Request", "Response", "Headers"].map(kindOfTest);
@@ -11696,6 +11707,9 @@ var require_axios = __commonJS({
11696
11707
  fn.call(null, obj[i], i, obj);
11697
11708
  }
11698
11709
  } else {
11710
+ if (isBuffer(obj)) {
11711
+ return;
11712
+ }
11699
11713
  const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
11700
11714
  const len = keys.length;
11701
11715
  let key;
@@ -11706,6 +11720,9 @@ var require_axios = __commonJS({
11706
11720
  }
11707
11721
  }
11708
11722
  function findKey(obj, key) {
11723
+ if (isBuffer(obj)) {
11724
+ return null;
11725
+ }
11709
11726
  key = key.toLowerCase();
11710
11727
  const keys = Object.keys(obj);
11711
11728
  let i = keys.length;
@@ -11724,7 +11741,7 @@ var require_axios = __commonJS({
11724
11741
  })();
11725
11742
  var isContextDefined = (context) => !isUndefined(context) && context !== _global;
11726
11743
  function merge() {
11727
- const { caseless } = isContextDefined(this) && this || {};
11744
+ const { caseless, skipUndefined } = isContextDefined(this) && this || {};
11728
11745
  const result = {};
11729
11746
  const assignValue = (val, key) => {
11730
11747
  const targetKey = caseless && findKey(result, key) || key;
@@ -11734,7 +11751,7 @@ var require_axios = __commonJS({
11734
11751
  result[targetKey] = merge({}, val);
11735
11752
  } else if (isArray(val)) {
11736
11753
  result[targetKey] = val.slice();
11737
- } else {
11754
+ } else if (!skipUndefined || !isUndefined(val)) {
11738
11755
  result[targetKey] = val;
11739
11756
  }
11740
11757
  };
@@ -11745,7 +11762,7 @@ var require_axios = __commonJS({
11745
11762
  }
11746
11763
  var extend = (a, b, thisArg, { allOwnKeys } = {}) => {
11747
11764
  forEach(b, (val, key) => {
11748
- if (thisArg && isFunction(val)) {
11765
+ if (thisArg && isFunction$1(val)) {
11749
11766
  a[key] = bind(val, thisArg);
11750
11767
  } else {
11751
11768
  a[key] = val;
@@ -11814,10 +11831,10 @@ var require_axios = __commonJS({
11814
11831
  };
11815
11832
  })(typeof Uint8Array !== "undefined" && getPrototypeOf(Uint8Array));
11816
11833
  var forEachEntry = (obj, fn) => {
11817
- const generator = obj && obj[Symbol.iterator];
11818
- const iterator = generator.call(obj);
11834
+ const generator = obj && obj[iterator];
11835
+ const _iterator = generator.call(obj);
11819
11836
  let result;
11820
- while ((result = iterator.next()) && !result.done) {
11837
+ while ((result = _iterator.next()) && !result.done) {
11821
11838
  const pair = result.value;
11822
11839
  fn.call(obj, pair[0], pair[1]);
11823
11840
  }
@@ -11854,11 +11871,11 @@ var require_axios = __commonJS({
11854
11871
  };
11855
11872
  var freezeMethods = (obj) => {
11856
11873
  reduceDescriptors(obj, (descriptor, name) => {
11857
- if (isFunction(obj) && ["arguments", "caller", "callee"].indexOf(name) !== -1) {
11874
+ if (isFunction$1(obj) && ["arguments", "caller", "callee"].indexOf(name) !== -1) {
11858
11875
  return false;
11859
11876
  }
11860
11877
  const value = obj[name];
11861
- if (!isFunction(value)) return;
11878
+ if (!isFunction$1(value)) return;
11862
11879
  descriptor.enumerable = false;
11863
11880
  if ("writable" in descriptor) {
11864
11881
  descriptor.writable = false;
@@ -11887,7 +11904,7 @@ var require_axios = __commonJS({
11887
11904
  return value != null && Number.isFinite(value = +value) ? value : defaultValue;
11888
11905
  };
11889
11906
  function isSpecCompliantForm(thing) {
11890
- return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === "FormData" && thing[Symbol.iterator]);
11907
+ return !!(thing && isFunction$1(thing.append) && thing[toStringTag] === "FormData" && thing[iterator]);
11891
11908
  }
11892
11909
  var toJSONObject = (obj) => {
11893
11910
  const stack = new Array(10);
@@ -11896,6 +11913,9 @@ var require_axios = __commonJS({
11896
11913
  if (stack.indexOf(source) >= 0) {
11897
11914
  return;
11898
11915
  }
11916
+ if (isBuffer(source)) {
11917
+ return source;
11918
+ }
11899
11919
  if (!("toJSON" in source)) {
11900
11920
  stack[i] = source;
11901
11921
  const target = isArray(source) ? [] : {};
@@ -11912,7 +11932,7 @@ var require_axios = __commonJS({
11912
11932
  return visit(obj, 0);
11913
11933
  };
11914
11934
  var isAsyncFn = kindOfTest("AsyncFunction");
11915
- var isThenable = (thing) => thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);
11935
+ var isThenable = (thing) => thing && (isObject(thing) || isFunction$1(thing)) && isFunction$1(thing.then) && isFunction$1(thing.catch);
11916
11936
  var _setImmediate = ((setImmediateSupported, postMessageSupported) => {
11917
11937
  if (setImmediateSupported) {
11918
11938
  return setImmediate;
@@ -11930,9 +11950,10 @@ var require_axios = __commonJS({
11930
11950
  })(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);
11931
11951
  })(
11932
11952
  typeof setImmediate === "function",
11933
- isFunction(_global.postMessage)
11953
+ isFunction$1(_global.postMessage)
11934
11954
  );
11935
11955
  var asap = typeof queueMicrotask !== "undefined" ? queueMicrotask.bind(_global) : typeof process !== "undefined" && process.nextTick || _setImmediate;
11956
+ var isIterable = (thing) => thing != null && isFunction$1(thing[iterator]);
11936
11957
  var utils$1 = {
11937
11958
  isArray,
11938
11959
  isArrayBuffer,
@@ -11944,6 +11965,7 @@ var require_axios = __commonJS({
11944
11965
  isBoolean,
11945
11966
  isObject,
11946
11967
  isPlainObject,
11968
+ isEmptyObject,
11947
11969
  isReadableStream,
11948
11970
  isRequest,
11949
11971
  isResponse,
@@ -11953,7 +11975,7 @@ var require_axios = __commonJS({
11953
11975
  isFile,
11954
11976
  isBlob,
11955
11977
  isRegExp,
11956
- isFunction,
11978
+ isFunction: isFunction$1,
11957
11979
  isStream,
11958
11980
  isURLSearchParams,
11959
11981
  isTypedArray,
@@ -11989,7 +12011,8 @@ var require_axios = __commonJS({
11989
12011
  isAsyncFn,
11990
12012
  isThenable,
11991
12013
  setImmediate: _setImmediate,
11992
- asap
12014
+ asap,
12015
+ isIterable
11993
12016
  };
11994
12017
  function AxiosError(message, code, config, request, response) {
11995
12018
  Error.call(this);
@@ -12057,9 +12080,13 @@ var require_axios = __commonJS({
12057
12080
  }, (prop) => {
12058
12081
  return prop !== "isAxiosError";
12059
12082
  });
12060
- AxiosError.call(axiosError, error.message, code, config, request, response);
12061
- axiosError.cause = error;
12062
- axiosError.name = error.name;
12083
+ const msg = error && error.message ? error.message : "Error";
12084
+ const errCode = code == null && error ? error.code : code;
12085
+ AxiosError.call(axiosError, msg, errCode, config, request, response);
12086
+ if (error && axiosError.cause == null) {
12087
+ Object.defineProperty(axiosError, "cause", { value: error, configurable: true });
12088
+ }
12089
+ axiosError.name = error && error.name || "Error";
12063
12090
  customProps && Object.assign(axiosError, customProps);
12064
12091
  return axiosError;
12065
12092
  };
@@ -12108,6 +12135,9 @@ var require_axios = __commonJS({
12108
12135
  if (utils$1.isDate(value)) {
12109
12136
  return value.toISOString();
12110
12137
  }
12138
+ if (utils$1.isBoolean(value)) {
12139
+ return value.toString();
12140
+ }
12111
12141
  if (!useBlob && utils$1.isBlob(value)) {
12112
12142
  throw new AxiosError("Blob is not supported. Use a Buffer instead.");
12113
12143
  }
@@ -12203,7 +12233,7 @@ var require_axios = __commonJS({
12203
12233
  }, "").join("&");
12204
12234
  };
12205
12235
  function encode(val) {
12206
- return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
12236
+ return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
12207
12237
  }
12208
12238
  function buildURL(url2, params, options) {
12209
12239
  if (!params) {
@@ -12348,15 +12378,16 @@ var require_axios = __commonJS({
12348
12378
  ...platform$1
12349
12379
  };
12350
12380
  function toURLEncodedForm(data, options) {
12351
- return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({
12381
+ return toFormData(data, new platform.classes.URLSearchParams(), {
12352
12382
  visitor: function(value, key, path, helpers) {
12353
12383
  if (platform.isNode && utils$1.isBuffer(value)) {
12354
12384
  this.append(key, value.toString("base64"));
12355
12385
  return false;
12356
12386
  }
12357
12387
  return helpers.defaultVisitor.apply(this, arguments);
12358
- }
12359
- }, options));
12388
+ },
12389
+ ...options
12390
+ });
12360
12391
  }
12361
12392
  function parsePropPath(name) {
12362
12393
  return utils$1.matchAll(/\w+|\[(\w*)]/g, name).map((match) => {
@@ -12476,7 +12507,7 @@ var require_axios = __commonJS({
12476
12507
  const silentJSONParsing = transitional && transitional.silentJSONParsing;
12477
12508
  const strictJSONParsing = !silentJSONParsing && JSONRequested;
12478
12509
  try {
12479
- return JSON.parse(data);
12510
+ return JSON.parse(data, this.parseReviver);
12480
12511
  } catch (e) {
12481
12512
  if (strictJSONParsing) {
12482
12513
  if (e.name === "SyntaxError") {
@@ -12630,10 +12661,15 @@ var require_axios = __commonJS({
12630
12661
  setHeaders(header, valueOrRewrite);
12631
12662
  } else if (utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
12632
12663
  setHeaders(parseHeaders(header), valueOrRewrite);
12633
- } else if (utils$1.isHeaders(header)) {
12634
- for (const [key, value] of header.entries()) {
12635
- setHeader(value, key, rewrite);
12664
+ } else if (utils$1.isObject(header) && utils$1.isIterable(header)) {
12665
+ let obj = {}, dest, key;
12666
+ for (const entry of header) {
12667
+ if (!utils$1.isArray(entry)) {
12668
+ throw TypeError("Object iterator must return a key-value pair");
12669
+ }
12670
+ obj[key = entry[0]] = (dest = obj[key]) ? utils$1.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]] : entry[1];
12636
12671
  }
12672
+ setHeaders(obj, valueOrRewrite);
12637
12673
  } else {
12638
12674
  header != null && setHeader(valueOrRewrite, header, rewrite);
12639
12675
  }
@@ -12737,6 +12773,9 @@ var require_axios = __commonJS({
12737
12773
  toString() {
12738
12774
  return Object.entries(this.toJSON()).map(([header, value]) => header + ": " + value).join("\n");
12739
12775
  }
12776
+ getSetCookie() {
12777
+ return this.get("set-cookie") || [];
12778
+ }
12740
12779
  get [Symbol.toStringTag]() {
12741
12780
  return "AxiosHeaders";
12742
12781
  }
@@ -12820,12 +12859,12 @@ var require_axios = __commonJS({
12820
12859
  }
12821
12860
  function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
12822
12861
  let isRelativeUrl = !isAbsoluteURL(requestedURL);
12823
- if (baseURL && isRelativeUrl || allowAbsoluteUrls == false) {
12862
+ if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) {
12824
12863
  return combineURLs(baseURL, requestedURL);
12825
12864
  }
12826
12865
  return requestedURL;
12827
12866
  }
12828
- var VERSION = "1.8.3";
12867
+ var VERSION = "1.12.2";
12829
12868
  function parseProtocol(url2) {
12830
12869
  const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url2);
12831
12870
  return match && match[1] || "";
@@ -13034,7 +13073,7 @@ var require_axios = __commonJS({
13034
13073
  throw Error("boundary must be 10-70 characters long");
13035
13074
  }
13036
13075
  const boundaryBytes = textEncoder.encode("--" + boundary + CRLF);
13037
- const footerBytes = textEncoder.encode("--" + boundary + "--" + CRLF + CRLF);
13076
+ const footerBytes = textEncoder.encode("--" + boundary + "--" + CRLF);
13038
13077
  let contentLength = footerBytes.byteLength;
13039
13078
  const parts = Array.from(form.entries()).map(([name, value]) => {
13040
13079
  const part = new FormDataPart(name, value);
@@ -13136,7 +13175,7 @@ var require_axios = __commonJS({
13136
13175
  clearTimeout(timer);
13137
13176
  timer = null;
13138
13177
  }
13139
- fn.apply(null, args);
13178
+ fn(...args);
13140
13179
  };
13141
13180
  const throttled = (...args) => {
13142
13181
  const now = Date.now();
@@ -13189,6 +13228,55 @@ var require_axios = __commonJS({
13189
13228
  }), throttled[1]];
13190
13229
  };
13191
13230
  var asyncDecorator = (fn) => (...args) => utils$1.asap(() => fn(...args));
13231
+ function estimateDataURLDecodedBytes(url2) {
13232
+ if (!url2 || typeof url2 !== "string") return 0;
13233
+ if (!url2.startsWith("data:")) return 0;
13234
+ const comma = url2.indexOf(",");
13235
+ if (comma < 0) return 0;
13236
+ const meta = url2.slice(5, comma);
13237
+ const body = url2.slice(comma + 1);
13238
+ const isBase64 = /;base64/i.test(meta);
13239
+ if (isBase64) {
13240
+ let effectiveLen = body.length;
13241
+ const len = body.length;
13242
+ for (let i = 0; i < len; i++) {
13243
+ if (body.charCodeAt(i) === 37 && i + 2 < len) {
13244
+ const a = body.charCodeAt(i + 1);
13245
+ const b = body.charCodeAt(i + 2);
13246
+ const isHex = (a >= 48 && a <= 57 || a >= 65 && a <= 70 || a >= 97 && a <= 102) && (b >= 48 && b <= 57 || b >= 65 && b <= 70 || b >= 97 && b <= 102);
13247
+ if (isHex) {
13248
+ effectiveLen -= 2;
13249
+ i += 2;
13250
+ }
13251
+ }
13252
+ }
13253
+ let pad = 0;
13254
+ let idx = len - 1;
13255
+ const tailIsPct3D = (j) => j >= 2 && body.charCodeAt(j - 2) === 37 && // '%'
13256
+ body.charCodeAt(j - 1) === 51 && // '3'
13257
+ (body.charCodeAt(j) === 68 || body.charCodeAt(j) === 100);
13258
+ if (idx >= 0) {
13259
+ if (body.charCodeAt(idx) === 61) {
13260
+ pad++;
13261
+ idx--;
13262
+ } else if (tailIsPct3D(idx)) {
13263
+ pad++;
13264
+ idx -= 3;
13265
+ }
13266
+ }
13267
+ if (pad === 1 && idx >= 0) {
13268
+ if (body.charCodeAt(idx) === 61) {
13269
+ pad++;
13270
+ } else if (tailIsPct3D(idx)) {
13271
+ pad++;
13272
+ }
13273
+ }
13274
+ const groups = Math.floor(effectiveLen / 4);
13275
+ const bytes = groups * 3 - (pad || 0);
13276
+ return bytes > 0 ? bytes : 0;
13277
+ }
13278
+ return Buffer.byteLength(body, "utf8");
13279
+ }
13192
13280
  var zlibOptions = {
13193
13281
  flush: zlib__default["default"].constants.Z_SYNC_FLUSH,
13194
13282
  finishFlush: zlib__default["default"].constants.Z_SYNC_FLUSH
@@ -13330,6 +13418,17 @@ var require_axios = __commonJS({
13330
13418
  const parsed = new URL(fullPath, platform.hasBrowserEnv ? platform.origin : void 0);
13331
13419
  const protocol = parsed.protocol || supportedProtocols[0];
13332
13420
  if (protocol === "data:") {
13421
+ if (config.maxContentLength > -1) {
13422
+ const dataUrl = String(config.url || fullPath || "");
13423
+ const estimated = estimateDataURLDecodedBytes(dataUrl);
13424
+ if (estimated > config.maxContentLength) {
13425
+ return reject(new AxiosError(
13426
+ "maxContentLength size of " + config.maxContentLength + " exceeded",
13427
+ AxiosError.ERR_BAD_RESPONSE,
13428
+ config
13429
+ ));
13430
+ }
13431
+ }
13333
13432
  let convertedData;
13334
13433
  if (method !== "GET") {
13335
13434
  return settle(resolve, reject, {
@@ -13797,7 +13896,7 @@ var require_axios = __commonJS({
13797
13896
  validateStatus: mergeDirectKeys,
13798
13897
  headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true)
13799
13898
  };
13800
- utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
13899
+ utils$1.forEach(Object.keys({ ...config1, ...config2 }), function computeConfigValue(prop) {
13801
13900
  const merge2 = mergeMap[prop] || mergeDeepProperties;
13802
13901
  const configValue = merge2(config1[prop], config2[prop], prop);
13803
13902
  utils$1.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config[prop] = configValue);
@@ -13815,13 +13914,17 @@ var require_axios = __commonJS({
13815
13914
  "Basic " + btoa((auth.username || "") + ":" + (auth.password ? unescape(encodeURIComponent(auth.password)) : ""))
13816
13915
  );
13817
13916
  }
13818
- let contentType;
13819
13917
  if (utils$1.isFormData(data)) {
13820
13918
  if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
13821
13919
  headers.setContentType(void 0);
13822
- } else if ((contentType = headers.getContentType()) !== false) {
13823
- const [type, ...tokens] = contentType ? contentType.split(";").map((token) => token.trim()).filter(Boolean) : [];
13824
- headers.setContentType([type || "multipart/form-data", ...tokens].join("; "));
13920
+ } else if (utils$1.isFunction(data.getHeaders)) {
13921
+ const formHeaders = data.getHeaders();
13922
+ const allowedHeaders = ["content-type", "content-length"];
13923
+ Object.entries(formHeaders).forEach(([key, val]) => {
13924
+ if (allowedHeaders.includes(key.toLowerCase())) {
13925
+ headers.set(key, val);
13926
+ }
13927
+ });
13825
13928
  }
13826
13929
  }
13827
13930
  if (platform.hasStandardBrowserEnv) {
@@ -13899,8 +14002,11 @@ var require_axios = __commonJS({
13899
14002
  reject(new AxiosError("Request aborted", AxiosError.ECONNABORTED, config, request));
13900
14003
  request = null;
13901
14004
  };
13902
- request.onerror = function handleError() {
13903
- reject(new AxiosError("Network Error", AxiosError.ERR_NETWORK, config, request));
14005
+ request.onerror = function handleError(event) {
14006
+ const msg = event && event.message ? event.message : "Network Error";
14007
+ const err = new AxiosError(msg, AxiosError.ERR_NETWORK, config, request);
14008
+ err.event = event || null;
14009
+ reject(err);
13904
14010
  request = null;
13905
14011
  };
13906
14012
  request.ontimeout = function handleTimeout() {
@@ -14032,7 +14138,7 @@ var require_axios = __commonJS({
14032
14138
  }
14033
14139
  };
14034
14140
  var trackStream = (stream2, chunkSize, onProgress, onFinish) => {
14035
- const iterator = readBytes(stream2, chunkSize);
14141
+ const iterator2 = readBytes(stream2, chunkSize);
14036
14142
  let bytes = 0;
14037
14143
  let done;
14038
14144
  let _onFinish = (e) => {
@@ -14044,7 +14150,7 @@ var require_axios = __commonJS({
14044
14150
  return new ReadableStream({
14045
14151
  async pull(controller) {
14046
14152
  try {
14047
- const { done: done2, value } = await iterator.next();
14153
+ const { done: done2, value } = await iterator2.next();
14048
14154
  if (done2) {
14049
14155
  _onFinish();
14050
14156
  controller.close();
@@ -14063,15 +14169,22 @@ var require_axios = __commonJS({
14063
14169
  },
14064
14170
  cancel(reason) {
14065
14171
  _onFinish(reason);
14066
- return iterator.return();
14172
+ return iterator2.return();
14067
14173
  }
14068
14174
  }, {
14069
14175
  highWaterMark: 2
14070
14176
  });
14071
14177
  };
14072
- var isFetchSupported = typeof fetch === "function" && typeof Request === "function" && typeof Response === "function";
14073
- var isReadableStreamSupported = isFetchSupported && typeof ReadableStream === "function";
14074
- var encodeText = isFetchSupported && (typeof TextEncoder === "function" ? /* @__PURE__ */ ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) : async (str) => new Uint8Array(await new Response(str).arrayBuffer()));
14178
+ var DEFAULT_CHUNK_SIZE = 64 * 1024;
14179
+ var { isFunction } = utils$1;
14180
+ var globalFetchAPI = (({ Request, Response }) => ({
14181
+ Request,
14182
+ Response
14183
+ }))(utils$1.global);
14184
+ var {
14185
+ ReadableStream: ReadableStream$1,
14186
+ TextEncoder: TextEncoder$1
14187
+ } = utils$1.global;
14075
14188
  var test = (fn, ...args) => {
14076
14189
  try {
14077
14190
  return !!fn(...args);
@@ -14079,162 +14192,202 @@ var require_axios = __commonJS({
14079
14192
  return false;
14080
14193
  }
14081
14194
  };
14082
- var supportsRequestStream = isReadableStreamSupported && test(() => {
14083
- let duplexAccessed = false;
14084
- const hasContentType = new Request(platform.origin, {
14085
- body: new ReadableStream(),
14086
- method: "POST",
14087
- get duplex() {
14088
- duplexAccessed = true;
14089
- return "half";
14090
- }
14091
- }).headers.has("Content-Type");
14092
- return duplexAccessed && !hasContentType;
14093
- });
14094
- var DEFAULT_CHUNK_SIZE = 64 * 1024;
14095
- var supportsResponseStream = isReadableStreamSupported && test(() => utils$1.isReadableStream(new Response("").body));
14096
- var resolvers = {
14097
- stream: supportsResponseStream && ((res) => res.body)
14098
- };
14099
- isFetchSupported && ((res) => {
14100
- ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((type) => {
14101
- !resolvers[type] && (resolvers[type] = utils$1.isFunction(res[type]) ? (res2) => res2[type]() : (_, config) => {
14102
- throw new AxiosError(`Response type '${type}' is not supported`, AxiosError.ERR_NOT_SUPPORT, config);
14103
- });
14104
- });
14105
- })(new Response());
14106
- var getBodyLength = async (body) => {
14107
- if (body == null) {
14108
- return 0;
14109
- }
14110
- if (utils$1.isBlob(body)) {
14111
- return body.size;
14195
+ var factory = (env) => {
14196
+ env = utils$1.merge.call({
14197
+ skipUndefined: true
14198
+ }, globalFetchAPI, env);
14199
+ const { fetch: envFetch, Request, Response } = env;
14200
+ const isFetchSupported = envFetch ? isFunction(envFetch) : typeof fetch === "function";
14201
+ const isRequestSupported = isFunction(Request);
14202
+ const isResponseSupported = isFunction(Response);
14203
+ if (!isFetchSupported) {
14204
+ return false;
14112
14205
  }
14113
- if (utils$1.isSpecCompliantForm(body)) {
14114
- const _request = new Request(platform.origin, {
14206
+ const isReadableStreamSupported = isFetchSupported && isFunction(ReadableStream$1);
14207
+ const encodeText = isFetchSupported && (typeof TextEncoder$1 === "function" ? /* @__PURE__ */ ((encoder) => (str) => encoder.encode(str))(new TextEncoder$1()) : async (str) => new Uint8Array(await new Request(str).arrayBuffer()));
14208
+ const supportsRequestStream = isRequestSupported && isReadableStreamSupported && test(() => {
14209
+ let duplexAccessed = false;
14210
+ const hasContentType = new Request(platform.origin, {
14211
+ body: new ReadableStream$1(),
14115
14212
  method: "POST",
14116
- body
14117
- });
14118
- return (await _request.arrayBuffer()).byteLength;
14119
- }
14120
- if (utils$1.isArrayBufferView(body) || utils$1.isArrayBuffer(body)) {
14121
- return body.byteLength;
14122
- }
14123
- if (utils$1.isURLSearchParams(body)) {
14124
- body = body + "";
14125
- }
14126
- if (utils$1.isString(body)) {
14127
- return (await encodeText(body)).byteLength;
14128
- }
14129
- };
14130
- var resolveBodyLength = async (headers, body) => {
14131
- const length = utils$1.toFiniteNumber(headers.getContentLength());
14132
- return length == null ? getBodyLength(body) : length;
14133
- };
14134
- var fetchAdapter = isFetchSupported && (async (config) => {
14135
- let {
14136
- url: url2,
14137
- method,
14138
- data,
14139
- signal,
14140
- cancelToken,
14141
- timeout,
14142
- onDownloadProgress,
14143
- onUploadProgress,
14144
- responseType,
14145
- headers,
14146
- withCredentials = "same-origin",
14147
- fetchOptions
14148
- } = resolveConfig(config);
14149
- responseType = responseType ? (responseType + "").toLowerCase() : "text";
14150
- let composedSignal = composeSignals$1([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
14151
- let request;
14152
- const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
14153
- composedSignal.unsubscribe();
14213
+ get duplex() {
14214
+ duplexAccessed = true;
14215
+ return "half";
14216
+ }
14217
+ }).headers.has("Content-Type");
14218
+ return duplexAccessed && !hasContentType;
14154
14219
  });
14155
- let requestContentLength;
14156
- try {
14157
- if (onUploadProgress && supportsRequestStream && method !== "get" && method !== "head" && (requestContentLength = await resolveBodyLength(headers, data)) !== 0) {
14158
- let _request = new Request(url2, {
14159
- method: "POST",
14160
- body: data,
14161
- duplex: "half"
14162
- });
14163
- let contentTypeHeader;
14164
- if (utils$1.isFormData(data) && (contentTypeHeader = _request.headers.get("content-type"))) {
14165
- headers.setContentType(contentTypeHeader);
14166
- }
14167
- if (_request.body) {
14168
- const [onProgress, flush] = progressEventDecorator(
14169
- requestContentLength,
14170
- progressEventReducer(asyncDecorator(onUploadProgress))
14171
- );
14172
- data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
14173
- }
14174
- }
14175
- if (!utils$1.isString(withCredentials)) {
14176
- withCredentials = withCredentials ? "include" : "omit";
14177
- }
14178
- const isCredentialsSupported = "credentials" in Request.prototype;
14179
- request = new Request(url2, {
14180
- ...fetchOptions,
14181
- signal: composedSignal,
14182
- method: method.toUpperCase(),
14183
- headers: headers.normalize().toJSON(),
14184
- body: data,
14185
- duplex: "half",
14186
- credentials: isCredentialsSupported ? withCredentials : void 0
14187
- });
14188
- let response = await fetch(request);
14189
- const isStreamResponse = supportsResponseStream && (responseType === "stream" || responseType === "response");
14190
- if (supportsResponseStream && (onDownloadProgress || isStreamResponse && unsubscribe)) {
14191
- const options = {};
14192
- ["status", "statusText", "headers"].forEach((prop) => {
14193
- options[prop] = response[prop];
14220
+ const supportsResponseStream = isResponseSupported && isReadableStreamSupported && test(() => utils$1.isReadableStream(new Response("").body));
14221
+ const resolvers = {
14222
+ stream: supportsResponseStream && ((res) => res.body)
14223
+ };
14224
+ isFetchSupported && (() => {
14225
+ ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((type) => {
14226
+ !resolvers[type] && (resolvers[type] = (res, config) => {
14227
+ let method = res && res[type];
14228
+ if (method) {
14229
+ return method.call(res);
14230
+ }
14231
+ throw new AxiosError(`Response type '${type}' is not supported`, AxiosError.ERR_NOT_SUPPORT, config);
14194
14232
  });
14195
- const responseContentLength = utils$1.toFiniteNumber(response.headers.get("content-length"));
14196
- const [onProgress, flush] = onDownloadProgress && progressEventDecorator(
14197
- responseContentLength,
14198
- progressEventReducer(asyncDecorator(onDownloadProgress), true)
14199
- ) || [];
14200
- response = new Response(
14201
- trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
14202
- flush && flush();
14203
- unsubscribe && unsubscribe();
14204
- }),
14205
- options
14206
- );
14233
+ });
14234
+ })();
14235
+ const getBodyLength = async (body) => {
14236
+ if (body == null) {
14237
+ return 0;
14207
14238
  }
14208
- responseType = responseType || "text";
14209
- let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || "text"](response, config);
14210
- !isStreamResponse && unsubscribe && unsubscribe();
14211
- return await new Promise((resolve, reject) => {
14212
- settle(resolve, reject, {
14213
- data: responseData,
14214
- headers: AxiosHeaders$1.from(response.headers),
14215
- status: response.status,
14216
- statusText: response.statusText,
14217
- config,
14218
- request
14239
+ if (utils$1.isBlob(body)) {
14240
+ return body.size;
14241
+ }
14242
+ if (utils$1.isSpecCompliantForm(body)) {
14243
+ const _request = new Request(platform.origin, {
14244
+ method: "POST",
14245
+ body
14219
14246
  });
14220
- });
14221
- } catch (err) {
14222
- unsubscribe && unsubscribe();
14223
- if (err && err.name === "TypeError" && /fetch/i.test(err.message)) {
14224
- throw Object.assign(
14225
- new AxiosError("Network Error", AxiosError.ERR_NETWORK, config, request),
14226
- {
14227
- cause: err.cause || err
14247
+ return (await _request.arrayBuffer()).byteLength;
14248
+ }
14249
+ if (utils$1.isArrayBufferView(body) || utils$1.isArrayBuffer(body)) {
14250
+ return body.byteLength;
14251
+ }
14252
+ if (utils$1.isURLSearchParams(body)) {
14253
+ body = body + "";
14254
+ }
14255
+ if (utils$1.isString(body)) {
14256
+ return (await encodeText(body)).byteLength;
14257
+ }
14258
+ };
14259
+ const resolveBodyLength = async (headers, body) => {
14260
+ const length = utils$1.toFiniteNumber(headers.getContentLength());
14261
+ return length == null ? getBodyLength(body) : length;
14262
+ };
14263
+ return async (config) => {
14264
+ let {
14265
+ url: url2,
14266
+ method,
14267
+ data,
14268
+ signal,
14269
+ cancelToken,
14270
+ timeout,
14271
+ onDownloadProgress,
14272
+ onUploadProgress,
14273
+ responseType,
14274
+ headers,
14275
+ withCredentials = "same-origin",
14276
+ fetchOptions
14277
+ } = resolveConfig(config);
14278
+ let _fetch = envFetch || fetch;
14279
+ responseType = responseType ? (responseType + "").toLowerCase() : "text";
14280
+ let composedSignal = composeSignals$1([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
14281
+ let request = null;
14282
+ const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
14283
+ composedSignal.unsubscribe();
14284
+ });
14285
+ let requestContentLength;
14286
+ try {
14287
+ if (onUploadProgress && supportsRequestStream && method !== "get" && method !== "head" && (requestContentLength = await resolveBodyLength(headers, data)) !== 0) {
14288
+ let _request = new Request(url2, {
14289
+ method: "POST",
14290
+ body: data,
14291
+ duplex: "half"
14292
+ });
14293
+ let contentTypeHeader;
14294
+ if (utils$1.isFormData(data) && (contentTypeHeader = _request.headers.get("content-type"))) {
14295
+ headers.setContentType(contentTypeHeader);
14296
+ }
14297
+ if (_request.body) {
14298
+ const [onProgress, flush] = progressEventDecorator(
14299
+ requestContentLength,
14300
+ progressEventReducer(asyncDecorator(onUploadProgress))
14301
+ );
14302
+ data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
14228
14303
  }
14229
- );
14304
+ }
14305
+ if (!utils$1.isString(withCredentials)) {
14306
+ withCredentials = withCredentials ? "include" : "omit";
14307
+ }
14308
+ const isCredentialsSupported = isRequestSupported && "credentials" in Request.prototype;
14309
+ const resolvedOptions = {
14310
+ ...fetchOptions,
14311
+ signal: composedSignal,
14312
+ method: method.toUpperCase(),
14313
+ headers: headers.normalize().toJSON(),
14314
+ body: data,
14315
+ duplex: "half",
14316
+ credentials: isCredentialsSupported ? withCredentials : void 0
14317
+ };
14318
+ request = isRequestSupported && new Request(url2, resolvedOptions);
14319
+ let response = await (isRequestSupported ? _fetch(request, fetchOptions) : _fetch(url2, resolvedOptions));
14320
+ const isStreamResponse = supportsResponseStream && (responseType === "stream" || responseType === "response");
14321
+ if (supportsResponseStream && (onDownloadProgress || isStreamResponse && unsubscribe)) {
14322
+ const options = {};
14323
+ ["status", "statusText", "headers"].forEach((prop) => {
14324
+ options[prop] = response[prop];
14325
+ });
14326
+ const responseContentLength = utils$1.toFiniteNumber(response.headers.get("content-length"));
14327
+ const [onProgress, flush] = onDownloadProgress && progressEventDecorator(
14328
+ responseContentLength,
14329
+ progressEventReducer(asyncDecorator(onDownloadProgress), true)
14330
+ ) || [];
14331
+ response = new Response(
14332
+ trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
14333
+ flush && flush();
14334
+ unsubscribe && unsubscribe();
14335
+ }),
14336
+ options
14337
+ );
14338
+ }
14339
+ responseType = responseType || "text";
14340
+ let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || "text"](response, config);
14341
+ !isStreamResponse && unsubscribe && unsubscribe();
14342
+ return await new Promise((resolve, reject) => {
14343
+ settle(resolve, reject, {
14344
+ data: responseData,
14345
+ headers: AxiosHeaders$1.from(response.headers),
14346
+ status: response.status,
14347
+ statusText: response.statusText,
14348
+ config,
14349
+ request
14350
+ });
14351
+ });
14352
+ } catch (err) {
14353
+ unsubscribe && unsubscribe();
14354
+ if (err && err.name === "TypeError" && /Load failed|fetch/i.test(err.message)) {
14355
+ throw Object.assign(
14356
+ new AxiosError("Network Error", AxiosError.ERR_NETWORK, config, request),
14357
+ {
14358
+ cause: err.cause || err
14359
+ }
14360
+ );
14361
+ }
14362
+ throw AxiosError.from(err, err && err.code, config, request);
14230
14363
  }
14231
- throw AxiosError.from(err, err && err.code, config, request);
14364
+ };
14365
+ };
14366
+ var seedCache = /* @__PURE__ */ new Map();
14367
+ var getFetch = (config) => {
14368
+ let env = config ? config.env : {};
14369
+ const { fetch: fetch2, Request, Response } = env;
14370
+ const seeds = [
14371
+ Request,
14372
+ Response,
14373
+ fetch2
14374
+ ];
14375
+ let len = seeds.length, i = len, seed, target, map = seedCache;
14376
+ while (i--) {
14377
+ seed = seeds[i];
14378
+ target = map.get(seed);
14379
+ target === void 0 && map.set(seed, target = i ? /* @__PURE__ */ new Map() : factory(env));
14380
+ map = target;
14232
14381
  }
14233
- });
14382
+ return target;
14383
+ };
14384
+ getFetch();
14234
14385
  var knownAdapters = {
14235
14386
  http: httpAdapter,
14236
14387
  xhr: xhrAdapter,
14237
- fetch: fetchAdapter
14388
+ fetch: {
14389
+ get: getFetch
14390
+ }
14238
14391
  };
14239
14392
  utils$1.forEach(knownAdapters, (fn, value) => {
14240
14393
  if (fn) {
@@ -14248,7 +14401,7 @@ var require_axios = __commonJS({
14248
14401
  var renderReason = (reason) => `- ${reason}`;
14249
14402
  var isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false;
14250
14403
  var adapters = {
14251
- getAdapter: (adapters2) => {
14404
+ getAdapter: (adapters2, config) => {
14252
14405
  adapters2 = utils$1.isArray(adapters2) ? adapters2 : [adapters2];
14253
14406
  const { length } = adapters2;
14254
14407
  let nameOrAdapter;
@@ -14264,7 +14417,7 @@ var require_axios = __commonJS({
14264
14417
  throw new AxiosError(`Unknown adapter '${id}'`);
14265
14418
  }
14266
14419
  }
14267
- if (adapter) {
14420
+ if (adapter && (utils$1.isFunction(adapter) || (adapter = adapter.get(config)))) {
14268
14421
  break;
14269
14422
  }
14270
14423
  rejectedReasons[id || "#" + i] = adapter;
@@ -14301,7 +14454,7 @@ var require_axios = __commonJS({
14301
14454
  if (["post", "put", "patch"].indexOf(config.method) !== -1) {
14302
14455
  config.headers.setContentType("application/x-www-form-urlencoded", false);
14303
14456
  }
14304
- const adapter = adapters.getAdapter(config.adapter || defaults$1.adapter);
14457
+ const adapter = adapters.getAdapter(config.adapter || defaults$1.adapter, config);
14305
14458
  return adapter(config).then(function onAdapterResolution(response) {
14306
14459
  throwIfCancellationRequested(config);
14307
14460
  response.data = transformData.call(
@@ -14391,7 +14544,7 @@ var require_axios = __commonJS({
14391
14544
  var validators = validator.validators;
14392
14545
  var Axios = class {
14393
14546
  constructor(instanceConfig) {
14394
- this.defaults = instanceConfig;
14547
+ this.defaults = instanceConfig || {};
14395
14548
  this.interceptors = {
14396
14549
  request: new InterceptorManager$1(),
14397
14550
  response: new InterceptorManager$1()
@@ -14493,8 +14646,8 @@ var require_axios = __commonJS({
14493
14646
  let len;
14494
14647
  if (!synchronousRequestInterceptors) {
14495
14648
  const chain = [dispatchRequest.bind(this), void 0];
14496
- chain.unshift.apply(chain, requestInterceptorChain);
14497
- chain.push.apply(chain, responseInterceptorChain);
14649
+ chain.unshift(...requestInterceptorChain);
14650
+ chain.push(...responseInterceptorChain);
14498
14651
  len = chain.length;
14499
14652
  promise = Promise.resolve(config);
14500
14653
  while (i < len) {
@@ -14504,7 +14657,6 @@ var require_axios = __commonJS({
14504
14657
  }
14505
14658
  len = requestInterceptorChain.length;
14506
14659
  let newConfig = config;
14507
- i = 0;
14508
14660
  while (i < len) {
14509
14661
  const onFulfilled = requestInterceptorChain[i++];
14510
14662
  const onRejected = requestInterceptorChain[i++];
@@ -45163,7 +45315,7 @@ mime-types/index.js:
45163
45315
  *)
45164
45316
 
45165
45317
  axios/dist/node/axios.cjs:
45166
- (*! Axios v1.8.3 Copyright (c) 2025 Matt Zabriskie and contributors *)
45318
+ (*! Axios v1.12.2 Copyright (c) 2025 Matt Zabriskie and contributors *)
45167
45319
 
45168
45320
  safe-buffer/index.js:
45169
45321
  (*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)