aws-ec2-instance-running-scheduler 3.1.3 → 3.1.5

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.
@@ -12521,6 +12521,7 @@ var require_axios = __commonJS({
12521
12521
  var https = require("https");
12522
12522
  var http2 = require("http2");
12523
12523
  var util2 = require("util");
12524
+ var path = require("path");
12524
12525
  var followRedirects = require_follow_redirects();
12525
12526
  var zlib = require("zlib");
12526
12527
  var stream = require("stream");
@@ -12670,7 +12671,7 @@ var require_axios = __commonJS({
12670
12671
  return typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : global;
12671
12672
  })();
12672
12673
  var isContextDefined = (context) => !isUndefined(context) && context !== _global;
12673
- function merge() {
12674
+ function merge(...objs) {
12674
12675
  const {
12675
12676
  caseless,
12676
12677
  skipUndefined
@@ -12681,8 +12682,9 @@ var require_axios = __commonJS({
12681
12682
  return;
12682
12683
  }
12683
12684
  const targetKey = caseless && findKey(result, key) || key;
12684
- if (isPlainObject(result[targetKey]) && isPlainObject(val)) {
12685
- result[targetKey] = merge(result[targetKey], val);
12685
+ const existing = hasOwnProperty(result, targetKey) ? result[targetKey] : void 0;
12686
+ if (isPlainObject(existing) && isPlainObject(val)) {
12687
+ result[targetKey] = merge(existing, val);
12686
12688
  } else if (isPlainObject(val)) {
12687
12689
  result[targetKey] = merge({}, val);
12688
12690
  } else if (isArray(val)) {
@@ -12691,8 +12693,8 @@ var require_axios = __commonJS({
12691
12693
  result[targetKey] = val;
12692
12694
  }
12693
12695
  };
12694
- for (let i = 0, l = arguments.length; i < l; i++) {
12695
- arguments[i] && forEach(arguments[i], assignValue);
12696
+ for (let i = 0, l = objs.length; i < l; i++) {
12697
+ objs[i] && forEach(objs[i], assignValue);
12696
12698
  }
12697
12699
  return result;
12698
12700
  }
@@ -12702,6 +12704,9 @@ var require_axios = __commonJS({
12702
12704
  forEach(b, (val, key) => {
12703
12705
  if (thisArg && isFunction$1(val)) {
12704
12706
  Object.defineProperty(a, key, {
12707
+ // Null-proto descriptor so a polluted Object.prototype.get cannot
12708
+ // hijack defineProperty's accessor-vs-data resolution.
12709
+ __proto__: null,
12705
12710
  value: bind(val, thisArg),
12706
12711
  writable: true,
12707
12712
  enumerable: true,
@@ -12709,6 +12714,7 @@ var require_axios = __commonJS({
12709
12714
  });
12710
12715
  } else {
12711
12716
  Object.defineProperty(a, key, {
12717
+ __proto__: null,
12712
12718
  value: val,
12713
12719
  writable: true,
12714
12720
  enumerable: true,
@@ -12729,12 +12735,14 @@ var require_axios = __commonJS({
12729
12735
  var inherits = (constructor, superConstructor, props, descriptors) => {
12730
12736
  constructor.prototype = Object.create(superConstructor.prototype, descriptors);
12731
12737
  Object.defineProperty(constructor.prototype, "constructor", {
12738
+ __proto__: null,
12732
12739
  value: constructor,
12733
12740
  writable: true,
12734
12741
  enumerable: false,
12735
12742
  configurable: true
12736
12743
  });
12737
12744
  Object.defineProperty(constructor, "super", {
12745
+ __proto__: null,
12738
12746
  value: superConstructor.prototype
12739
12747
  });
12740
12748
  props && Object.assign(constructor.prototype, props);
@@ -12825,7 +12833,7 @@ var require_axios = __commonJS({
12825
12833
  };
12826
12834
  var freezeMethods = (obj) => {
12827
12835
  reduceDescriptors(obj, (descriptor, name) => {
12828
- if (isFunction$1(obj) && ["arguments", "caller", "callee"].indexOf(name) !== -1) {
12836
+ if (isFunction$1(obj) && ["arguments", "caller", "callee"].includes(name)) {
12829
12837
  return false;
12830
12838
  }
12831
12839
  const value = obj[name];
@@ -12970,814 +12978,876 @@ var require_axios = __commonJS({
12970
12978
  asap,
12971
12979
  isIterable
12972
12980
  };
12973
- var AxiosError = class _AxiosError extends Error {
12974
- static from(error, code, config, request, response, customProps) {
12975
- const axiosError = new _AxiosError(error.message, code || error.code, config, request, response);
12976
- axiosError.cause = error;
12977
- axiosError.name = error.name;
12978
- if (error.status != null && axiosError.status == null) {
12979
- axiosError.status = error.status;
12981
+ var ignoreDuplicateOf = utils$1.toObjectSet(["age", "authorization", "content-length", "content-type", "etag", "expires", "from", "host", "if-modified-since", "if-unmodified-since", "last-modified", "location", "max-forwards", "proxy-authorization", "referer", "retry-after", "user-agent"]);
12982
+ var parseHeaders = (rawHeaders) => {
12983
+ const parsed = {};
12984
+ let key;
12985
+ let val;
12986
+ let i;
12987
+ rawHeaders && rawHeaders.split("\n").forEach(function parser(line) {
12988
+ i = line.indexOf(":");
12989
+ key = line.substring(0, i).trim().toLowerCase();
12990
+ val = line.substring(i + 1).trim();
12991
+ if (!key || parsed[key] && ignoreDuplicateOf[key]) {
12992
+ return;
12980
12993
  }
12981
- customProps && Object.assign(axiosError, customProps);
12982
- return axiosError;
12983
- }
12984
- /**
12985
- * Create an Error with the specified message, config, error code, request and response.
12986
- *
12987
- * @param {string} message The error message.
12988
- * @param {string} [code] The error code (for example, 'ECONNABORTED').
12989
- * @param {Object} [config] The config.
12990
- * @param {Object} [request] The request.
12991
- * @param {Object} [response] The response.
12992
- *
12993
- * @returns {Error} The created error.
12994
- */
12995
- constructor(message, code, config, request, response) {
12996
- super(message);
12997
- Object.defineProperty(this, "message", {
12998
- value: message,
12999
- enumerable: true,
13000
- writable: true,
13001
- configurable: true
13002
- });
13003
- this.name = "AxiosError";
13004
- this.isAxiosError = true;
13005
- code && (this.code = code);
13006
- config && (this.config = config);
13007
- request && (this.request = request);
13008
- if (response) {
13009
- this.response = response;
13010
- this.status = response.status;
12994
+ if (key === "set-cookie") {
12995
+ if (parsed[key]) {
12996
+ parsed[key].push(val);
12997
+ } else {
12998
+ parsed[key] = [val];
12999
+ }
13000
+ } else {
13001
+ parsed[key] = parsed[key] ? parsed[key] + ", " + val : val;
13002
+ }
13003
+ });
13004
+ return parsed;
13005
+ };
13006
+ var $internals = /* @__PURE__ */ Symbol("internals");
13007
+ var INVALID_HEADER_VALUE_CHARS_RE = /[^\x09\x20-\x7E\x80-\xFF]/g;
13008
+ function trimSPorHTAB(str) {
13009
+ let start = 0;
13010
+ let end = str.length;
13011
+ while (start < end) {
13012
+ const code = str.charCodeAt(start);
13013
+ if (code !== 9 && code !== 32) {
13014
+ break;
13011
13015
  }
13016
+ start += 1;
13012
13017
  }
13013
- toJSON() {
13014
- return {
13015
- // Standard
13016
- message: this.message,
13017
- name: this.name,
13018
- // Microsoft
13019
- description: this.description,
13020
- number: this.number,
13021
- // Mozilla
13022
- fileName: this.fileName,
13023
- lineNumber: this.lineNumber,
13024
- columnNumber: this.columnNumber,
13025
- stack: this.stack,
13026
- // Axios
13027
- config: utils$1.toJSONObject(this.config),
13028
- code: this.code,
13029
- status: this.status
13030
- };
13018
+ while (end > start) {
13019
+ const code = str.charCodeAt(end - 1);
13020
+ if (code !== 9 && code !== 32) {
13021
+ break;
13022
+ }
13023
+ end -= 1;
13031
13024
  }
13032
- };
13033
- AxiosError.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE";
13034
- AxiosError.ERR_BAD_OPTION = "ERR_BAD_OPTION";
13035
- AxiosError.ECONNABORTED = "ECONNABORTED";
13036
- AxiosError.ETIMEDOUT = "ETIMEDOUT";
13037
- AxiosError.ERR_NETWORK = "ERR_NETWORK";
13038
- AxiosError.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS";
13039
- AxiosError.ERR_DEPRECATED = "ERR_DEPRECATED";
13040
- AxiosError.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE";
13041
- AxiosError.ERR_BAD_REQUEST = "ERR_BAD_REQUEST";
13042
- AxiosError.ERR_CANCELED = "ERR_CANCELED";
13043
- AxiosError.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
13044
- AxiosError.ERR_INVALID_URL = "ERR_INVALID_URL";
13045
- AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED = "ERR_FORM_DATA_DEPTH_EXCEEDED";
13046
- function isVisitable(thing) {
13047
- return utils$1.isPlainObject(thing) || utils$1.isArray(thing);
13048
- }
13049
- function removeBrackets(key) {
13050
- return utils$1.endsWith(key, "[]") ? key.slice(0, -2) : key;
13025
+ return start === 0 && end === str.length ? str : str.slice(start, end);
13051
13026
  }
13052
- function renderKey(path, key, dots) {
13053
- if (!path) return key;
13054
- return path.concat(key).map(function each(token, i) {
13055
- token = removeBrackets(token);
13056
- return !dots && i ? "[" + token + "]" : token;
13057
- }).join(dots ? "." : "");
13027
+ function normalizeHeader(header) {
13028
+ return header && String(header).trim().toLowerCase();
13058
13029
  }
13059
- function isFlatArray(arr) {
13060
- return utils$1.isArray(arr) && !arr.some(isVisitable);
13030
+ function sanitizeHeaderValue(str) {
13031
+ return trimSPorHTAB(str.replace(INVALID_HEADER_VALUE_CHARS_RE, ""));
13061
13032
  }
13062
- var predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop) {
13063
- return /^is[A-Z]/.test(prop);
13064
- });
13065
- function toFormData(obj, formData, options) {
13066
- if (!utils$1.isObject(obj)) {
13067
- throw new TypeError("target must be an object");
13033
+ function normalizeValue(value) {
13034
+ if (value === false || value == null) {
13035
+ return value;
13068
13036
  }
13069
- formData = formData || new (FormData$1 || FormData)();
13070
- options = utils$1.toFlatObject(options, {
13071
- metaTokens: true,
13072
- dots: false,
13073
- indexes: false
13074
- }, false, function defined(option, source) {
13075
- return !utils$1.isUndefined(source[option]);
13076
- });
13077
- const metaTokens = options.metaTokens;
13078
- const visitor = options.visitor || defaultVisitor;
13079
- const dots = options.dots;
13080
- const indexes = options.indexes;
13081
- const _Blob = options.Blob || typeof Blob !== "undefined" && Blob;
13082
- const maxDepth = options.maxDepth === void 0 ? 100 : options.maxDepth;
13083
- const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);
13084
- if (!utils$1.isFunction(visitor)) {
13085
- throw new TypeError("visitor must be a function");
13037
+ return utils$1.isArray(value) ? value.map(normalizeValue) : sanitizeHeaderValue(String(value));
13038
+ }
13039
+ function parseTokens(str) {
13040
+ const tokens = /* @__PURE__ */ Object.create(null);
13041
+ const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
13042
+ let match;
13043
+ while (match = tokensRE.exec(str)) {
13044
+ tokens[match[1]] = match[2];
13086
13045
  }
13087
- function convertValue(value) {
13088
- if (value === null) return "";
13089
- if (utils$1.isDate(value)) {
13090
- return value.toISOString();
13091
- }
13092
- if (utils$1.isBoolean(value)) {
13093
- return value.toString();
13094
- }
13095
- if (!useBlob && utils$1.isBlob(value)) {
13096
- throw new AxiosError("Blob is not supported. Use a Buffer instead.");
13097
- }
13098
- if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {
13099
- return useBlob && typeof Blob === "function" ? new Blob([value]) : Buffer.from(value);
13100
- }
13101
- return value;
13046
+ return tokens;
13047
+ }
13048
+ var isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
13049
+ function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
13050
+ if (utils$1.isFunction(filter)) {
13051
+ return filter.call(this, value, header);
13102
13052
  }
13103
- function defaultVisitor(value, key, path) {
13104
- let arr = value;
13105
- if (utils$1.isReactNative(formData) && utils$1.isReactNativeBlob(value)) {
13106
- formData.append(renderKey(path, key, dots), convertValue(value));
13107
- return false;
13108
- }
13109
- if (value && !path && typeof value === "object") {
13110
- if (utils$1.endsWith(key, "{}")) {
13111
- key = metaTokens ? key : key.slice(0, -2);
13112
- value = JSON.stringify(value);
13113
- } else if (utils$1.isArray(value) && isFlatArray(value) || (utils$1.isFileList(value) || utils$1.endsWith(key, "[]")) && (arr = utils$1.toArray(value))) {
13114
- key = removeBrackets(key);
13115
- arr.forEach(function each(el, index) {
13116
- !(utils$1.isUndefined(el) || el === null) && formData.append(
13117
- // eslint-disable-next-line no-nested-ternary
13118
- indexes === true ? renderKey([key], index, dots) : indexes === null ? key : key + "[]",
13119
- convertValue(el)
13120
- );
13121
- });
13122
- return false;
13123
- }
13124
- }
13125
- if (isVisitable(value)) {
13126
- return true;
13127
- }
13128
- formData.append(renderKey(path, key, dots), convertValue(value));
13129
- return false;
13053
+ if (isHeaderNameFilter) {
13054
+ value = header;
13130
13055
  }
13131
- const stack = [];
13132
- const exposedHelpers = Object.assign(predicates, {
13133
- defaultVisitor,
13134
- convertValue,
13135
- isVisitable
13136
- });
13137
- function build(value, path, depth = 0) {
13138
- if (utils$1.isUndefined(value)) return;
13139
- if (depth > maxDepth) {
13140
- throw new AxiosError("Object is too deeply nested (" + depth + " levels). Max depth: " + maxDepth, AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED);
13141
- }
13142
- if (stack.indexOf(value) !== -1) {
13143
- throw Error("Circular reference detected in " + path.join("."));
13144
- }
13145
- stack.push(value);
13146
- utils$1.forEach(value, function each(el, key) {
13147
- const result = !(utils$1.isUndefined(el) || el === null) && visitor.call(formData, el, utils$1.isString(key) ? key.trim() : key, path, exposedHelpers);
13148
- if (result === true) {
13149
- build(el, path ? path.concat(key) : [key], depth + 1);
13150
- }
13151
- });
13152
- stack.pop();
13056
+ if (!utils$1.isString(value)) return;
13057
+ if (utils$1.isString(filter)) {
13058
+ return value.indexOf(filter) !== -1;
13153
13059
  }
13154
- if (!utils$1.isObject(obj)) {
13155
- throw new TypeError("data must be an object");
13060
+ if (utils$1.isRegExp(filter)) {
13061
+ return filter.test(value);
13156
13062
  }
13157
- build(obj);
13158
- return formData;
13159
13063
  }
13160
- function encode$1(str) {
13161
- const charMap = {
13162
- "!": "%21",
13163
- "'": "%27",
13164
- "(": "%28",
13165
- ")": "%29",
13166
- "~": "%7E",
13167
- "%20": "+"
13168
- };
13169
- return encodeURIComponent(str).replace(/[!'()~]|%20/g, function replacer(match) {
13170
- return charMap[match];
13064
+ function formatHeader(header) {
13065
+ return header.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => {
13066
+ return char.toUpperCase() + str;
13171
13067
  });
13172
13068
  }
13173
- function AxiosURLSearchParams(params, options) {
13174
- this._pairs = [];
13175
- params && toFormData(params, this, options);
13176
- }
13177
- var prototype = AxiosURLSearchParams.prototype;
13178
- prototype.append = function append(name, value) {
13179
- this._pairs.push([name, value]);
13180
- };
13181
- prototype.toString = function toString2(encoder) {
13182
- const _encode = encoder ? function(value) {
13183
- return encoder.call(this, value, encode$1);
13184
- } : encode$1;
13185
- return this._pairs.map(function each(pair) {
13186
- return _encode(pair[0]) + "=" + _encode(pair[1]);
13187
- }, "").join("&");
13188
- };
13189
- function encode(val) {
13190
- return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
13069
+ function buildAccessors(obj, header) {
13070
+ const accessorName = utils$1.toCamelCase(" " + header);
13071
+ ["get", "set", "has"].forEach((methodName) => {
13072
+ Object.defineProperty(obj, methodName + accessorName, {
13073
+ // Null-proto descriptor so a polluted Object.prototype.get cannot turn
13074
+ // this data descriptor into an accessor descriptor on the way in.
13075
+ __proto__: null,
13076
+ value: function(arg1, arg2, arg3) {
13077
+ return this[methodName].call(this, header, arg1, arg2, arg3);
13078
+ },
13079
+ configurable: true
13080
+ });
13081
+ });
13191
13082
  }
13192
- function buildURL(url2, params, options) {
13193
- if (!params) {
13194
- return url2;
13195
- }
13196
- const _encode = options && options.encode || encode;
13197
- const _options = utils$1.isFunction(options) ? {
13198
- serialize: options
13199
- } : options;
13200
- const serializeFn = _options && _options.serialize;
13201
- let serializedParams;
13202
- if (serializeFn) {
13203
- serializedParams = serializeFn(params, _options);
13204
- } else {
13205
- serializedParams = utils$1.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams(params, _options).toString(_encode);
13083
+ var AxiosHeaders = class {
13084
+ constructor(headers) {
13085
+ headers && this.set(headers);
13206
13086
  }
13207
- if (serializedParams) {
13208
- const hashmarkIndex = url2.indexOf("#");
13209
- if (hashmarkIndex !== -1) {
13210
- url2 = url2.slice(0, hashmarkIndex);
13087
+ set(header, valueOrRewrite, rewrite) {
13088
+ const self2 = this;
13089
+ function setHeader(_value, _header, _rewrite) {
13090
+ const lHeader = normalizeHeader(_header);
13091
+ if (!lHeader) {
13092
+ throw new Error("header name must be a non-empty string");
13093
+ }
13094
+ const key = utils$1.findKey(self2, lHeader);
13095
+ if (!key || self2[key] === void 0 || _rewrite === true || _rewrite === void 0 && self2[key] !== false) {
13096
+ self2[key || _header] = normalizeValue(_value);
13097
+ }
13211
13098
  }
13212
- url2 += (url2.indexOf("?") === -1 ? "?" : "&") + serializedParams;
13099
+ const setHeaders = (headers, _rewrite) => utils$1.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
13100
+ if (utils$1.isPlainObject(header) || header instanceof this.constructor) {
13101
+ setHeaders(header, valueOrRewrite);
13102
+ } else if (utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
13103
+ setHeaders(parseHeaders(header), valueOrRewrite);
13104
+ } else if (utils$1.isObject(header) && utils$1.isIterable(header)) {
13105
+ let obj = {}, dest, key;
13106
+ for (const entry of header) {
13107
+ if (!utils$1.isArray(entry)) {
13108
+ throw TypeError("Object iterator must return a key-value pair");
13109
+ }
13110
+ obj[key = entry[0]] = (dest = obj[key]) ? utils$1.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]] : entry[1];
13111
+ }
13112
+ setHeaders(obj, valueOrRewrite);
13113
+ } else {
13114
+ header != null && setHeader(valueOrRewrite, header, rewrite);
13115
+ }
13116
+ return this;
13213
13117
  }
13214
- return url2;
13215
- }
13216
- var InterceptorManager = class {
13217
- constructor() {
13218
- this.handlers = [];
13118
+ get(header, parser) {
13119
+ header = normalizeHeader(header);
13120
+ if (header) {
13121
+ const key = utils$1.findKey(this, header);
13122
+ if (key) {
13123
+ const value = this[key];
13124
+ if (!parser) {
13125
+ return value;
13126
+ }
13127
+ if (parser === true) {
13128
+ return parseTokens(value);
13129
+ }
13130
+ if (utils$1.isFunction(parser)) {
13131
+ return parser.call(this, value, key);
13132
+ }
13133
+ if (utils$1.isRegExp(parser)) {
13134
+ return parser.exec(value);
13135
+ }
13136
+ throw new TypeError("parser must be boolean|regexp|function");
13137
+ }
13138
+ }
13219
13139
  }
13220
- /**
13221
- * Add a new interceptor to the stack
13222
- *
13223
- * @param {Function} fulfilled The function to handle `then` for a `Promise`
13224
- * @param {Function} rejected The function to handle `reject` for a `Promise`
13225
- * @param {Object} options The options for the interceptor, synchronous and runWhen
13226
- *
13227
- * @return {Number} An ID used to remove interceptor later
13228
- */
13229
- use(fulfilled, rejected, options) {
13230
- this.handlers.push({
13231
- fulfilled,
13232
- rejected,
13233
- synchronous: options ? options.synchronous : false,
13234
- runWhen: options ? options.runWhen : null
13235
- });
13236
- return this.handlers.length - 1;
13140
+ has(header, matcher) {
13141
+ header = normalizeHeader(header);
13142
+ if (header) {
13143
+ const key = utils$1.findKey(this, header);
13144
+ return !!(key && this[key] !== void 0 && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
13145
+ }
13146
+ return false;
13237
13147
  }
13238
- /**
13239
- * Remove an interceptor from the stack
13240
- *
13241
- * @param {Number} id The ID that was returned by `use`
13242
- *
13243
- * @returns {void}
13244
- */
13245
- eject(id) {
13246
- if (this.handlers[id]) {
13247
- this.handlers[id] = null;
13148
+ delete(header, matcher) {
13149
+ const self2 = this;
13150
+ let deleted = false;
13151
+ function deleteHeader(_header) {
13152
+ _header = normalizeHeader(_header);
13153
+ if (_header) {
13154
+ const key = utils$1.findKey(self2, _header);
13155
+ if (key && (!matcher || matchHeaderValue(self2, self2[key], key, matcher))) {
13156
+ delete self2[key];
13157
+ deleted = true;
13158
+ }
13159
+ }
13160
+ }
13161
+ if (utils$1.isArray(header)) {
13162
+ header.forEach(deleteHeader);
13163
+ } else {
13164
+ deleteHeader(header);
13248
13165
  }
13166
+ return deleted;
13249
13167
  }
13250
- /**
13251
- * Clear all interceptors from the stack
13252
- *
13253
- * @returns {void}
13254
- */
13255
- clear() {
13256
- if (this.handlers) {
13257
- this.handlers = [];
13168
+ clear(matcher) {
13169
+ const keys = Object.keys(this);
13170
+ let i = keys.length;
13171
+ let deleted = false;
13172
+ while (i--) {
13173
+ const key = keys[i];
13174
+ if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
13175
+ delete this[key];
13176
+ deleted = true;
13177
+ }
13258
13178
  }
13179
+ return deleted;
13259
13180
  }
13260
- /**
13261
- * Iterate over all the registered interceptors
13262
- *
13263
- * This method is particularly useful for skipping over any
13264
- * interceptors that may have become `null` calling `eject`.
13265
- *
13266
- * @param {Function} fn The function to call for each interceptor
13267
- *
13268
- * @returns {void}
13269
- */
13270
- forEach(fn) {
13271
- utils$1.forEach(this.handlers, function forEachHandler(h) {
13272
- if (h !== null) {
13273
- fn(h);
13181
+ normalize(format) {
13182
+ const self2 = this;
13183
+ const headers = {};
13184
+ utils$1.forEach(this, (value, header) => {
13185
+ const key = utils$1.findKey(headers, header);
13186
+ if (key) {
13187
+ self2[key] = normalizeValue(value);
13188
+ delete self2[header];
13189
+ return;
13190
+ }
13191
+ const normalized = format ? formatHeader(header) : String(header).trim();
13192
+ if (normalized !== header) {
13193
+ delete self2[header];
13274
13194
  }
13195
+ self2[normalized] = normalizeValue(value);
13196
+ headers[normalized] = true;
13275
13197
  });
13198
+ return this;
13276
13199
  }
13277
- };
13278
- var transitionalDefaults = {
13279
- silentJSONParsing: true,
13280
- forcedJSONParsing: true,
13281
- clarifyTimeoutError: false,
13282
- legacyInterceptorReqResOrdering: true
13283
- };
13284
- var URLSearchParams = url.URLSearchParams;
13285
- var ALPHA = "abcdefghijklmnopqrstuvwxyz";
13286
- var DIGIT = "0123456789";
13287
- var ALPHABET = {
13288
- DIGIT,
13289
- ALPHA,
13290
- ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
13291
- };
13292
- var generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
13293
- let str = "";
13294
- const {
13295
- length
13296
- } = alphabet;
13297
- const randomValues = new Uint32Array(size);
13298
- crypto.randomFillSync(randomValues);
13299
- for (let i = 0; i < size; i++) {
13300
- str += alphabet[randomValues[i] % length];
13200
+ concat(...targets) {
13201
+ return this.constructor.concat(this, ...targets);
13301
13202
  }
13302
- return str;
13303
- };
13304
- var platform$1 = {
13305
- isNode: true,
13306
- classes: {
13307
- URLSearchParams,
13308
- FormData: FormData$1,
13309
- Blob: typeof Blob !== "undefined" && Blob || null
13310
- },
13311
- ALPHABET,
13312
- generateString,
13313
- protocols: ["http", "https", "file", "data"]
13314
- };
13315
- var hasBrowserEnv = typeof window !== "undefined" && typeof document !== "undefined";
13316
- var _navigator = typeof navigator === "object" && navigator || void 0;
13317
- var hasStandardBrowserEnv = hasBrowserEnv && (!_navigator || ["ReactNative", "NativeScript", "NS"].indexOf(_navigator.product) < 0);
13318
- var hasStandardBrowserWebWorkerEnv = (() => {
13319
- return typeof WorkerGlobalScope !== "undefined" && // eslint-disable-next-line no-undef
13320
- self instanceof WorkerGlobalScope && typeof self.importScripts === "function";
13321
- })();
13322
- var origin = hasBrowserEnv && window.location.href || "http://localhost";
13323
- var utils = /* @__PURE__ */ Object.freeze({
13324
- __proto__: null,
13325
- hasBrowserEnv,
13326
- hasStandardBrowserEnv,
13327
- hasStandardBrowserWebWorkerEnv,
13328
- navigator: _navigator,
13329
- origin
13330
- });
13331
- var platform = {
13332
- ...utils,
13333
- ...platform$1
13334
- };
13335
- function toURLEncodedForm(data, options) {
13336
- return toFormData(data, new platform.classes.URLSearchParams(), {
13337
- visitor: function(value, key, path, helpers) {
13338
- if (platform.isNode && utils$1.isBuffer(value)) {
13339
- this.append(key, value.toString("base64"));
13340
- return false;
13341
- }
13342
- return helpers.defaultVisitor.apply(this, arguments);
13343
- },
13344
- ...options
13345
- });
13346
- }
13347
- function parsePropPath(name) {
13348
- return utils$1.matchAll(/\w+|\[(\w*)]/g, name).map((match) => {
13349
- return match[0] === "[]" ? "" : match[1] || match[0];
13350
- });
13351
- }
13352
- function arrayToObject(arr) {
13353
- const obj = {};
13354
- const keys = Object.keys(arr);
13355
- let i;
13356
- const len = keys.length;
13357
- let key;
13358
- for (i = 0; i < len; i++) {
13359
- key = keys[i];
13360
- obj[key] = arr[key];
13361
- }
13362
- return obj;
13363
- }
13364
- function formDataToJSON(formData) {
13365
- function buildPath(path, value, target, index) {
13366
- let name = path[index++];
13367
- if (name === "__proto__") return true;
13368
- const isNumericKey = Number.isFinite(+name);
13369
- const isLast = index >= path.length;
13370
- name = !name && utils$1.isArray(target) ? target.length : name;
13371
- if (isLast) {
13372
- if (utils$1.hasOwnProp(target, name)) {
13373
- target[name] = utils$1.isArray(target[name]) ? target[name].concat(value) : [target[name], value];
13374
- } else {
13375
- target[name] = value;
13376
- }
13377
- return !isNumericKey;
13378
- }
13379
- if (!target[name] || !utils$1.isObject(target[name])) {
13380
- target[name] = [];
13381
- }
13382
- const result = buildPath(path, value, target[name], index);
13383
- if (result && utils$1.isArray(target[name])) {
13384
- target[name] = arrayToObject(target[name]);
13385
- }
13386
- return !isNumericKey;
13387
- }
13388
- if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) {
13389
- const obj = {};
13390
- utils$1.forEachEntry(formData, (name, value) => {
13391
- buildPath(parsePropPath(name), value, obj, 0);
13203
+ toJSON(asStrings) {
13204
+ const obj = /* @__PURE__ */ Object.create(null);
13205
+ utils$1.forEach(this, (value, header) => {
13206
+ value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(", ") : value);
13392
13207
  });
13393
13208
  return obj;
13394
13209
  }
13395
- return null;
13396
- }
13397
- var own = (obj, key) => obj != null && utils$1.hasOwnProp(obj, key) ? obj[key] : void 0;
13398
- function stringifySafely(rawValue, parser, encoder) {
13399
- if (utils$1.isString(rawValue)) {
13400
- try {
13401
- (parser || JSON.parse)(rawValue);
13402
- return utils$1.trim(rawValue);
13403
- } catch (e) {
13404
- if (e.name !== "SyntaxError") {
13405
- throw e;
13210
+ [Symbol.iterator]() {
13211
+ return Object.entries(this.toJSON())[Symbol.iterator]();
13212
+ }
13213
+ toString() {
13214
+ return Object.entries(this.toJSON()).map(([header, value]) => header + ": " + value).join("\n");
13215
+ }
13216
+ getSetCookie() {
13217
+ return this.get("set-cookie") || [];
13218
+ }
13219
+ get [Symbol.toStringTag]() {
13220
+ return "AxiosHeaders";
13221
+ }
13222
+ static from(thing) {
13223
+ return thing instanceof this ? thing : new this(thing);
13224
+ }
13225
+ static concat(first, ...targets) {
13226
+ const computed = new this(first);
13227
+ targets.forEach((target) => computed.set(target));
13228
+ return computed;
13229
+ }
13230
+ static accessor(header) {
13231
+ const internals = this[$internals] = this[$internals] = {
13232
+ accessors: {}
13233
+ };
13234
+ const accessors = internals.accessors;
13235
+ const prototype2 = this.prototype;
13236
+ function defineAccessor(_header) {
13237
+ const lHeader = normalizeHeader(_header);
13238
+ if (!accessors[lHeader]) {
13239
+ buildAccessors(prototype2, _header);
13240
+ accessors[lHeader] = true;
13406
13241
  }
13407
13242
  }
13243
+ utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
13244
+ return this;
13408
13245
  }
13409
- return (encoder || JSON.stringify)(rawValue);
13410
- }
13411
- var defaults = {
13412
- transitional: transitionalDefaults,
13413
- adapter: ["xhr", "http", "fetch"],
13414
- transformRequest: [function transformRequest(data, headers) {
13415
- const contentType = headers.getContentType() || "";
13416
- const hasJSONContentType = contentType.indexOf("application/json") > -1;
13417
- const isObjectPayload = utils$1.isObject(data);
13418
- if (isObjectPayload && utils$1.isHTMLForm(data)) {
13419
- data = new FormData(data);
13420
- }
13421
- const isFormData2 = utils$1.isFormData(data);
13422
- if (isFormData2) {
13423
- return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
13424
- }
13425
- 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)) {
13426
- return data;
13427
- }
13428
- if (utils$1.isArrayBufferView(data)) {
13429
- return data.buffer;
13246
+ };
13247
+ AxiosHeaders.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
13248
+ utils$1.reduceDescriptors(AxiosHeaders.prototype, ({
13249
+ value
13250
+ }, key) => {
13251
+ let mapped = key[0].toUpperCase() + key.slice(1);
13252
+ return {
13253
+ get: () => value,
13254
+ set(headerValue) {
13255
+ this[mapped] = headerValue;
13430
13256
  }
13431
- if (utils$1.isURLSearchParams(data)) {
13432
- headers.setContentType("application/x-www-form-urlencoded;charset=utf-8", false);
13433
- return data.toString();
13257
+ };
13258
+ });
13259
+ utils$1.freezeMethods(AxiosHeaders);
13260
+ var REDACTED = "[REDACTED ****]";
13261
+ function hasOwnOrPrototypeToJSON(source) {
13262
+ if (utils$1.hasOwnProp(source, "toJSON")) {
13263
+ return true;
13264
+ }
13265
+ let prototype2 = Object.getPrototypeOf(source);
13266
+ while (prototype2 && prototype2 !== Object.prototype) {
13267
+ if (utils$1.hasOwnProp(prototype2, "toJSON")) {
13268
+ return true;
13434
13269
  }
13435
- let isFileList2;
13436
- if (isObjectPayload) {
13437
- const formSerializer = own(this, "formSerializer");
13438
- if (contentType.indexOf("application/x-www-form-urlencoded") > -1) {
13439
- return toURLEncodedForm(data, formSerializer).toString();
13440
- }
13441
- if ((isFileList2 = utils$1.isFileList(data)) || contentType.indexOf("multipart/form-data") > -1) {
13442
- const env = own(this, "env");
13443
- const _FormData = env && env.FormData;
13444
- return toFormData(isFileList2 ? {
13445
- "files[]": data
13446
- } : data, _FormData && new _FormData(), formSerializer);
13270
+ prototype2 = Object.getPrototypeOf(prototype2);
13271
+ }
13272
+ return false;
13273
+ }
13274
+ function redactConfig(config, redactKeys) {
13275
+ const lowerKeys = new Set(redactKeys.map((k) => String(k).toLowerCase()));
13276
+ const seen = [];
13277
+ const visit = (source) => {
13278
+ if (source === null || typeof source !== "object") return source;
13279
+ if (utils$1.isBuffer(source)) return source;
13280
+ if (seen.indexOf(source) !== -1) return void 0;
13281
+ if (source instanceof AxiosHeaders) {
13282
+ source = source.toJSON();
13283
+ }
13284
+ seen.push(source);
13285
+ let result;
13286
+ if (utils$1.isArray(source)) {
13287
+ result = [];
13288
+ source.forEach((v, i) => {
13289
+ const reducedValue = visit(v);
13290
+ if (!utils$1.isUndefined(reducedValue)) {
13291
+ result[i] = reducedValue;
13292
+ }
13293
+ });
13294
+ } else {
13295
+ if (!utils$1.isPlainObject(source) && hasOwnOrPrototypeToJSON(source)) {
13296
+ seen.pop();
13297
+ return source;
13447
13298
  }
13448
- }
13449
- if (isObjectPayload || hasJSONContentType) {
13450
- headers.setContentType("application/json", false);
13451
- return stringifySafely(data);
13452
- }
13453
- return data;
13454
- }],
13455
- transformResponse: [function transformResponse(data) {
13456
- const transitional = own(this, "transitional") || defaults.transitional;
13457
- const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
13458
- const responseType = own(this, "responseType");
13459
- const JSONRequested = responseType === "json";
13460
- if (utils$1.isResponse(data) || utils$1.isReadableStream(data)) {
13461
- return data;
13462
- }
13463
- if (data && utils$1.isString(data) && (forcedJSONParsing && !responseType || JSONRequested)) {
13464
- const silentJSONParsing = transitional && transitional.silentJSONParsing;
13465
- const strictJSONParsing = !silentJSONParsing && JSONRequested;
13466
- try {
13467
- return JSON.parse(data, own(this, "parseReviver"));
13468
- } catch (e) {
13469
- if (strictJSONParsing) {
13470
- if (e.name === "SyntaxError") {
13471
- throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, own(this, "response"));
13472
- }
13473
- throw e;
13299
+ result = /* @__PURE__ */ Object.create(null);
13300
+ for (const [key, value] of Object.entries(source)) {
13301
+ const reducedValue = lowerKeys.has(key.toLowerCase()) ? REDACTED : visit(value);
13302
+ if (!utils$1.isUndefined(reducedValue)) {
13303
+ result[key] = reducedValue;
13474
13304
  }
13475
13305
  }
13476
13306
  }
13477
- return data;
13478
- }],
13307
+ seen.pop();
13308
+ return result;
13309
+ };
13310
+ return visit(config);
13311
+ }
13312
+ var AxiosError = class _AxiosError extends Error {
13313
+ static from(error, code, config, request, response, customProps) {
13314
+ const axiosError = new _AxiosError(error.message, code || error.code, config, request, response);
13315
+ axiosError.cause = error;
13316
+ axiosError.name = error.name;
13317
+ if (error.status != null && axiosError.status == null) {
13318
+ axiosError.status = error.status;
13319
+ }
13320
+ customProps && Object.assign(axiosError, customProps);
13321
+ return axiosError;
13322
+ }
13479
13323
  /**
13480
- * A timeout in milliseconds to abort a request. If set to 0 (default) a
13481
- * timeout is not created.
13324
+ * Create an Error with the specified message, config, error code, request and response.
13325
+ *
13326
+ * @param {string} message The error message.
13327
+ * @param {string} [code] The error code (for example, 'ECONNABORTED').
13328
+ * @param {Object} [config] The config.
13329
+ * @param {Object} [request] The request.
13330
+ * @param {Object} [response] The response.
13331
+ *
13332
+ * @returns {Error} The created error.
13482
13333
  */
13483
- timeout: 0,
13484
- xsrfCookieName: "XSRF-TOKEN",
13485
- xsrfHeaderName: "X-XSRF-TOKEN",
13486
- maxContentLength: -1,
13487
- maxBodyLength: -1,
13488
- env: {
13489
- FormData: platform.classes.FormData,
13490
- Blob: platform.classes.Blob
13491
- },
13492
- validateStatus: function validateStatus(status) {
13493
- return status >= 200 && status < 300;
13494
- },
13495
- headers: {
13496
- common: {
13497
- Accept: "application/json, text/plain, */*",
13498
- "Content-Type": void 0
13334
+ constructor(message, code, config, request, response) {
13335
+ super(message);
13336
+ Object.defineProperty(this, "message", {
13337
+ // Null-proto descriptor so a polluted Object.prototype.get cannot turn
13338
+ // this data descriptor into an accessor descriptor on the way in.
13339
+ __proto__: null,
13340
+ value: message,
13341
+ enumerable: true,
13342
+ writable: true,
13343
+ configurable: true
13344
+ });
13345
+ this.name = "AxiosError";
13346
+ this.isAxiosError = true;
13347
+ code && (this.code = code);
13348
+ config && (this.config = config);
13349
+ request && (this.request = request);
13350
+ if (response) {
13351
+ this.response = response;
13352
+ this.status = response.status;
13499
13353
  }
13500
13354
  }
13501
- };
13502
- utils$1.forEach(["delete", "get", "head", "post", "put", "patch"], (method) => {
13503
- defaults.headers[method] = {};
13504
- });
13505
- var ignoreDuplicateOf = utils$1.toObjectSet(["age", "authorization", "content-length", "content-type", "etag", "expires", "from", "host", "if-modified-since", "if-unmodified-since", "last-modified", "location", "max-forwards", "proxy-authorization", "referer", "retry-after", "user-agent"]);
13506
- var parseHeaders = (rawHeaders) => {
13507
- const parsed = {};
13508
- let key;
13509
- let val;
13510
- let i;
13511
- rawHeaders && rawHeaders.split("\n").forEach(function parser(line) {
13512
- i = line.indexOf(":");
13513
- key = line.substring(0, i).trim().toLowerCase();
13514
- val = line.substring(i + 1).trim();
13515
- if (!key || parsed[key] && ignoreDuplicateOf[key]) {
13516
- return;
13517
- }
13518
- if (key === "set-cookie") {
13519
- if (parsed[key]) {
13520
- parsed[key].push(val);
13521
- } else {
13522
- parsed[key] = [val];
13523
- }
13524
- } else {
13525
- parsed[key] = parsed[key] ? parsed[key] + ", " + val : val;
13526
- }
13527
- });
13528
- return parsed;
13529
- };
13530
- var $internals = /* @__PURE__ */ Symbol("internals");
13531
- var INVALID_HEADER_VALUE_CHARS_RE = /[^\x09\x20-\x7E\x80-\xFF]/g;
13532
- function trimSPorHTAB(str) {
13533
- let start = 0;
13534
- let end = str.length;
13535
- while (start < end) {
13536
- const code = str.charCodeAt(start);
13537
- if (code !== 9 && code !== 32) {
13538
- break;
13539
- }
13540
- start += 1;
13541
- }
13542
- while (end > start) {
13543
- const code = str.charCodeAt(end - 1);
13544
- if (code !== 9 && code !== 32) {
13545
- break;
13546
- }
13547
- end -= 1;
13355
+ toJSON() {
13356
+ const config = this.config;
13357
+ const redactKeys = config && utils$1.hasOwnProp(config, "redact") ? config.redact : void 0;
13358
+ const serializedConfig = utils$1.isArray(redactKeys) && redactKeys.length > 0 ? redactConfig(config, redactKeys) : utils$1.toJSONObject(config);
13359
+ return {
13360
+ // Standard
13361
+ message: this.message,
13362
+ name: this.name,
13363
+ // Microsoft
13364
+ description: this.description,
13365
+ number: this.number,
13366
+ // Mozilla
13367
+ fileName: this.fileName,
13368
+ lineNumber: this.lineNumber,
13369
+ columnNumber: this.columnNumber,
13370
+ stack: this.stack,
13371
+ // Axios
13372
+ config: serializedConfig,
13373
+ code: this.code,
13374
+ status: this.status
13375
+ };
13548
13376
  }
13549
- return start === 0 && end === str.length ? str : str.slice(start, end);
13377
+ };
13378
+ AxiosError.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE";
13379
+ AxiosError.ERR_BAD_OPTION = "ERR_BAD_OPTION";
13380
+ AxiosError.ECONNABORTED = "ECONNABORTED";
13381
+ AxiosError.ETIMEDOUT = "ETIMEDOUT";
13382
+ AxiosError.ECONNREFUSED = "ECONNREFUSED";
13383
+ AxiosError.ERR_NETWORK = "ERR_NETWORK";
13384
+ AxiosError.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS";
13385
+ AxiosError.ERR_DEPRECATED = "ERR_DEPRECATED";
13386
+ AxiosError.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE";
13387
+ AxiosError.ERR_BAD_REQUEST = "ERR_BAD_REQUEST";
13388
+ AxiosError.ERR_CANCELED = "ERR_CANCELED";
13389
+ AxiosError.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
13390
+ AxiosError.ERR_INVALID_URL = "ERR_INVALID_URL";
13391
+ AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED = "ERR_FORM_DATA_DEPTH_EXCEEDED";
13392
+ function isVisitable(thing) {
13393
+ return utils$1.isPlainObject(thing) || utils$1.isArray(thing);
13550
13394
  }
13551
- function normalizeHeader(header) {
13552
- return header && String(header).trim().toLowerCase();
13395
+ function removeBrackets(key) {
13396
+ return utils$1.endsWith(key, "[]") ? key.slice(0, -2) : key;
13553
13397
  }
13554
- function sanitizeHeaderValue(str) {
13555
- return trimSPorHTAB(str.replace(INVALID_HEADER_VALUE_CHARS_RE, ""));
13398
+ function renderKey(path2, key, dots) {
13399
+ if (!path2) return key;
13400
+ return path2.concat(key).map(function each(token, i) {
13401
+ token = removeBrackets(token);
13402
+ return !dots && i ? "[" + token + "]" : token;
13403
+ }).join(dots ? "." : "");
13556
13404
  }
13557
- function normalizeValue(value) {
13558
- if (value === false || value == null) {
13559
- return value;
13560
- }
13561
- return utils$1.isArray(value) ? value.map(normalizeValue) : sanitizeHeaderValue(String(value));
13405
+ function isFlatArray(arr) {
13406
+ return utils$1.isArray(arr) && !arr.some(isVisitable);
13562
13407
  }
13563
- function parseTokens(str) {
13564
- const tokens = /* @__PURE__ */ Object.create(null);
13565
- const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
13566
- let match;
13567
- while (match = tokensRE.exec(str)) {
13568
- tokens[match[1]] = match[2];
13408
+ var predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop) {
13409
+ return /^is[A-Z]/.test(prop);
13410
+ });
13411
+ function toFormData(obj, formData, options) {
13412
+ if (!utils$1.isObject(obj)) {
13413
+ throw new TypeError("target must be an object");
13569
13414
  }
13570
- return tokens;
13571
- }
13572
- var isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
13573
- function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
13574
- if (utils$1.isFunction(filter)) {
13575
- return filter.call(this, value, header);
13415
+ formData = formData || new (FormData$1 || FormData)();
13416
+ options = utils$1.toFlatObject(options, {
13417
+ metaTokens: true,
13418
+ dots: false,
13419
+ indexes: false
13420
+ }, false, function defined(option, source) {
13421
+ return !utils$1.isUndefined(source[option]);
13422
+ });
13423
+ const metaTokens = options.metaTokens;
13424
+ const visitor = options.visitor || defaultVisitor;
13425
+ const dots = options.dots;
13426
+ const indexes = options.indexes;
13427
+ const _Blob = options.Blob || typeof Blob !== "undefined" && Blob;
13428
+ const maxDepth = options.maxDepth === void 0 ? 100 : options.maxDepth;
13429
+ const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);
13430
+ if (!utils$1.isFunction(visitor)) {
13431
+ throw new TypeError("visitor must be a function");
13576
13432
  }
13577
- if (isHeaderNameFilter) {
13578
- value = header;
13433
+ function convertValue(value) {
13434
+ if (value === null) return "";
13435
+ if (utils$1.isDate(value)) {
13436
+ return value.toISOString();
13437
+ }
13438
+ if (utils$1.isBoolean(value)) {
13439
+ return value.toString();
13440
+ }
13441
+ if (!useBlob && utils$1.isBlob(value)) {
13442
+ throw new AxiosError("Blob is not supported. Use a Buffer instead.");
13443
+ }
13444
+ if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {
13445
+ return useBlob && typeof Blob === "function" ? new Blob([value]) : Buffer.from(value);
13446
+ }
13447
+ return value;
13579
13448
  }
13580
- if (!utils$1.isString(value)) return;
13581
- if (utils$1.isString(filter)) {
13582
- return value.indexOf(filter) !== -1;
13449
+ function defaultVisitor(value, key, path2) {
13450
+ let arr = value;
13451
+ if (utils$1.isReactNative(formData) && utils$1.isReactNativeBlob(value)) {
13452
+ formData.append(renderKey(path2, key, dots), convertValue(value));
13453
+ return false;
13454
+ }
13455
+ if (value && !path2 && typeof value === "object") {
13456
+ if (utils$1.endsWith(key, "{}")) {
13457
+ key = metaTokens ? key : key.slice(0, -2);
13458
+ value = JSON.stringify(value);
13459
+ } else if (utils$1.isArray(value) && isFlatArray(value) || (utils$1.isFileList(value) || utils$1.endsWith(key, "[]")) && (arr = utils$1.toArray(value))) {
13460
+ key = removeBrackets(key);
13461
+ arr.forEach(function each(el, index) {
13462
+ !(utils$1.isUndefined(el) || el === null) && formData.append(
13463
+ // eslint-disable-next-line no-nested-ternary
13464
+ indexes === true ? renderKey([key], index, dots) : indexes === null ? key : key + "[]",
13465
+ convertValue(el)
13466
+ );
13467
+ });
13468
+ return false;
13469
+ }
13470
+ }
13471
+ if (isVisitable(value)) {
13472
+ return true;
13473
+ }
13474
+ formData.append(renderKey(path2, key, dots), convertValue(value));
13475
+ return false;
13583
13476
  }
13584
- if (utils$1.isRegExp(filter)) {
13585
- return filter.test(value);
13477
+ const stack = [];
13478
+ const exposedHelpers = Object.assign(predicates, {
13479
+ defaultVisitor,
13480
+ convertValue,
13481
+ isVisitable
13482
+ });
13483
+ function build(value, path2, depth = 0) {
13484
+ if (utils$1.isUndefined(value)) return;
13485
+ if (depth > maxDepth) {
13486
+ throw new AxiosError("Object is too deeply nested (" + depth + " levels). Max depth: " + maxDepth, AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED);
13487
+ }
13488
+ if (stack.indexOf(value) !== -1) {
13489
+ throw Error("Circular reference detected in " + path2.join("."));
13490
+ }
13491
+ stack.push(value);
13492
+ utils$1.forEach(value, function each(el, key) {
13493
+ const result = !(utils$1.isUndefined(el) || el === null) && visitor.call(formData, el, utils$1.isString(key) ? key.trim() : key, path2, exposedHelpers);
13494
+ if (result === true) {
13495
+ build(el, path2 ? path2.concat(key) : [key], depth + 1);
13496
+ }
13497
+ });
13498
+ stack.pop();
13586
13499
  }
13500
+ if (!utils$1.isObject(obj)) {
13501
+ throw new TypeError("data must be an object");
13502
+ }
13503
+ build(obj);
13504
+ return formData;
13587
13505
  }
13588
- function formatHeader(header) {
13589
- return header.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => {
13590
- return char.toUpperCase() + str;
13506
+ function encode$1(str) {
13507
+ const charMap = {
13508
+ "!": "%21",
13509
+ "'": "%27",
13510
+ "(": "%28",
13511
+ ")": "%29",
13512
+ "~": "%7E",
13513
+ "%20": "+"
13514
+ };
13515
+ return encodeURIComponent(str).replace(/[!'()~]|%20/g, function replacer(match) {
13516
+ return charMap[match];
13591
13517
  });
13592
13518
  }
13593
- function buildAccessors(obj, header) {
13594
- const accessorName = utils$1.toCamelCase(" " + header);
13595
- ["get", "set", "has"].forEach((methodName) => {
13596
- Object.defineProperty(obj, methodName + accessorName, {
13597
- value: function(arg1, arg2, arg3) {
13598
- return this[methodName].call(this, header, arg1, arg2, arg3);
13599
- },
13600
- configurable: true
13601
- });
13602
- });
13519
+ function AxiosURLSearchParams(params, options) {
13520
+ this._pairs = [];
13521
+ params && toFormData(params, this, options);
13603
13522
  }
13604
- var AxiosHeaders = class {
13605
- constructor(headers) {
13606
- headers && this.set(headers);
13523
+ var prototype = AxiosURLSearchParams.prototype;
13524
+ prototype.append = function append(name, value) {
13525
+ this._pairs.push([name, value]);
13526
+ };
13527
+ prototype.toString = function toString2(encoder) {
13528
+ const _encode = encoder ? function(value) {
13529
+ return encoder.call(this, value, encode$1);
13530
+ } : encode$1;
13531
+ return this._pairs.map(function each(pair) {
13532
+ return _encode(pair[0]) + "=" + _encode(pair[1]);
13533
+ }, "").join("&");
13534
+ };
13535
+ function encode(val) {
13536
+ return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
13537
+ }
13538
+ function buildURL(url2, params, options) {
13539
+ if (!params) {
13540
+ return url2;
13607
13541
  }
13608
- set(header, valueOrRewrite, rewrite) {
13609
- const self2 = this;
13610
- function setHeader(_value, _header, _rewrite) {
13611
- const lHeader = normalizeHeader(_header);
13612
- if (!lHeader) {
13613
- throw new Error("header name must be a non-empty string");
13614
- }
13615
- const key = utils$1.findKey(self2, lHeader);
13616
- if (!key || self2[key] === void 0 || _rewrite === true || _rewrite === void 0 && self2[key] !== false) {
13617
- self2[key || _header] = normalizeValue(_value);
13618
- }
13619
- }
13620
- const setHeaders = (headers, _rewrite) => utils$1.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
13621
- if (utils$1.isPlainObject(header) || header instanceof this.constructor) {
13622
- setHeaders(header, valueOrRewrite);
13623
- } else if (utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
13624
- setHeaders(parseHeaders(header), valueOrRewrite);
13625
- } else if (utils$1.isObject(header) && utils$1.isIterable(header)) {
13626
- let obj = {}, dest, key;
13627
- for (const entry of header) {
13628
- if (!utils$1.isArray(entry)) {
13629
- throw TypeError("Object iterator must return a key-value pair");
13630
- }
13631
- obj[key = entry[0]] = (dest = obj[key]) ? utils$1.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]] : entry[1];
13632
- }
13633
- setHeaders(obj, valueOrRewrite);
13634
- } else {
13635
- header != null && setHeader(valueOrRewrite, header, rewrite);
13636
- }
13637
- return this;
13542
+ const _encode = options && options.encode || encode;
13543
+ const _options = utils$1.isFunction(options) ? {
13544
+ serialize: options
13545
+ } : options;
13546
+ const serializeFn = _options && _options.serialize;
13547
+ let serializedParams;
13548
+ if (serializeFn) {
13549
+ serializedParams = serializeFn(params, _options);
13550
+ } else {
13551
+ serializedParams = utils$1.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams(params, _options).toString(_encode);
13638
13552
  }
13639
- get(header, parser) {
13640
- header = normalizeHeader(header);
13641
- if (header) {
13642
- const key = utils$1.findKey(this, header);
13643
- if (key) {
13644
- const value = this[key];
13645
- if (!parser) {
13646
- return value;
13647
- }
13648
- if (parser === true) {
13649
- return parseTokens(value);
13650
- }
13651
- if (utils$1.isFunction(parser)) {
13652
- return parser.call(this, value, key);
13653
- }
13654
- if (utils$1.isRegExp(parser)) {
13655
- return parser.exec(value);
13656
- }
13657
- throw new TypeError("parser must be boolean|regexp|function");
13658
- }
13553
+ if (serializedParams) {
13554
+ const hashmarkIndex = url2.indexOf("#");
13555
+ if (hashmarkIndex !== -1) {
13556
+ url2 = url2.slice(0, hashmarkIndex);
13659
13557
  }
13558
+ url2 += (url2.indexOf("?") === -1 ? "?" : "&") + serializedParams;
13660
13559
  }
13661
- has(header, matcher) {
13662
- header = normalizeHeader(header);
13663
- if (header) {
13664
- const key = utils$1.findKey(this, header);
13665
- return !!(key && this[key] !== void 0 && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
13666
- }
13667
- return false;
13560
+ return url2;
13561
+ }
13562
+ var InterceptorManager = class {
13563
+ constructor() {
13564
+ this.handlers = [];
13668
13565
  }
13669
- delete(header, matcher) {
13670
- const self2 = this;
13671
- let deleted = false;
13672
- function deleteHeader(_header) {
13673
- _header = normalizeHeader(_header);
13674
- if (_header) {
13675
- const key = utils$1.findKey(self2, _header);
13676
- if (key && (!matcher || matchHeaderValue(self2, self2[key], key, matcher))) {
13677
- delete self2[key];
13678
- deleted = true;
13679
- }
13680
- }
13681
- }
13682
- if (utils$1.isArray(header)) {
13683
- header.forEach(deleteHeader);
13684
- } else {
13685
- deleteHeader(header);
13566
+ /**
13567
+ * Add a new interceptor to the stack
13568
+ *
13569
+ * @param {Function} fulfilled The function to handle `then` for a `Promise`
13570
+ * @param {Function} rejected The function to handle `reject` for a `Promise`
13571
+ * @param {Object} options The options for the interceptor, synchronous and runWhen
13572
+ *
13573
+ * @return {Number} An ID used to remove interceptor later
13574
+ */
13575
+ use(fulfilled, rejected, options) {
13576
+ this.handlers.push({
13577
+ fulfilled,
13578
+ rejected,
13579
+ synchronous: options ? options.synchronous : false,
13580
+ runWhen: options ? options.runWhen : null
13581
+ });
13582
+ return this.handlers.length - 1;
13583
+ }
13584
+ /**
13585
+ * Remove an interceptor from the stack
13586
+ *
13587
+ * @param {Number} id The ID that was returned by `use`
13588
+ *
13589
+ * @returns {void}
13590
+ */
13591
+ eject(id) {
13592
+ if (this.handlers[id]) {
13593
+ this.handlers[id] = null;
13686
13594
  }
13687
- return deleted;
13688
13595
  }
13689
- clear(matcher) {
13690
- const keys = Object.keys(this);
13691
- let i = keys.length;
13692
- let deleted = false;
13693
- while (i--) {
13694
- const key = keys[i];
13695
- if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
13696
- delete this[key];
13697
- deleted = true;
13698
- }
13596
+ /**
13597
+ * Clear all interceptors from the stack
13598
+ *
13599
+ * @returns {void}
13600
+ */
13601
+ clear() {
13602
+ if (this.handlers) {
13603
+ this.handlers = [];
13699
13604
  }
13700
- return deleted;
13701
13605
  }
13702
- normalize(format) {
13703
- const self2 = this;
13704
- const headers = {};
13705
- utils$1.forEach(this, (value, header) => {
13706
- const key = utils$1.findKey(headers, header);
13707
- if (key) {
13708
- self2[key] = normalizeValue(value);
13709
- delete self2[header];
13710
- return;
13711
- }
13712
- const normalized = format ? formatHeader(header) : String(header).trim();
13713
- if (normalized !== header) {
13714
- delete self2[header];
13606
+ /**
13607
+ * Iterate over all the registered interceptors
13608
+ *
13609
+ * This method is particularly useful for skipping over any
13610
+ * interceptors that may have become `null` calling `eject`.
13611
+ *
13612
+ * @param {Function} fn The function to call for each interceptor
13613
+ *
13614
+ * @returns {void}
13615
+ */
13616
+ forEach(fn) {
13617
+ utils$1.forEach(this.handlers, function forEachHandler(h) {
13618
+ if (h !== null) {
13619
+ fn(h);
13715
13620
  }
13716
- self2[normalized] = normalizeValue(value);
13717
- headers[normalized] = true;
13718
13621
  });
13719
- return this;
13720
13622
  }
13721
- concat(...targets) {
13722
- return this.constructor.concat(this, ...targets);
13623
+ };
13624
+ var transitionalDefaults = {
13625
+ silentJSONParsing: true,
13626
+ forcedJSONParsing: true,
13627
+ clarifyTimeoutError: false,
13628
+ legacyInterceptorReqResOrdering: true
13629
+ };
13630
+ var URLSearchParams = url.URLSearchParams;
13631
+ var ALPHA = "abcdefghijklmnopqrstuvwxyz";
13632
+ var DIGIT = "0123456789";
13633
+ var ALPHABET = {
13634
+ DIGIT,
13635
+ ALPHA,
13636
+ ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
13637
+ };
13638
+ var generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
13639
+ let str = "";
13640
+ const {
13641
+ length
13642
+ } = alphabet;
13643
+ const randomValues = new Uint32Array(size);
13644
+ crypto.randomFillSync(randomValues);
13645
+ for (let i = 0; i < size; i++) {
13646
+ str += alphabet[randomValues[i] % length];
13647
+ }
13648
+ return str;
13649
+ };
13650
+ var platform$1 = {
13651
+ isNode: true,
13652
+ classes: {
13653
+ URLSearchParams,
13654
+ FormData: FormData$1,
13655
+ Blob: typeof Blob !== "undefined" && Blob || null
13656
+ },
13657
+ ALPHABET,
13658
+ generateString,
13659
+ protocols: ["http", "https", "file", "data"]
13660
+ };
13661
+ var hasBrowserEnv = typeof window !== "undefined" && typeof document !== "undefined";
13662
+ var _navigator = typeof navigator === "object" && navigator || void 0;
13663
+ var hasStandardBrowserEnv = hasBrowserEnv && (!_navigator || ["ReactNative", "NativeScript", "NS"].indexOf(_navigator.product) < 0);
13664
+ var hasStandardBrowserWebWorkerEnv = (() => {
13665
+ return typeof WorkerGlobalScope !== "undefined" && // eslint-disable-next-line no-undef
13666
+ self instanceof WorkerGlobalScope && typeof self.importScripts === "function";
13667
+ })();
13668
+ var origin = hasBrowserEnv && window.location.href || "http://localhost";
13669
+ var utils = /* @__PURE__ */ Object.freeze({
13670
+ __proto__: null,
13671
+ hasBrowserEnv,
13672
+ hasStandardBrowserEnv,
13673
+ hasStandardBrowserWebWorkerEnv,
13674
+ navigator: _navigator,
13675
+ origin
13676
+ });
13677
+ var platform = {
13678
+ ...utils,
13679
+ ...platform$1
13680
+ };
13681
+ function toURLEncodedForm(data, options) {
13682
+ return toFormData(data, new platform.classes.URLSearchParams(), {
13683
+ visitor: function(value, key, path2, helpers) {
13684
+ if (platform.isNode && utils$1.isBuffer(value)) {
13685
+ this.append(key, value.toString("base64"));
13686
+ return false;
13687
+ }
13688
+ return helpers.defaultVisitor.apply(this, arguments);
13689
+ },
13690
+ ...options
13691
+ });
13692
+ }
13693
+ function parsePropPath(name) {
13694
+ return utils$1.matchAll(/\w+|\[(\w*)]/g, name).map((match) => {
13695
+ return match[0] === "[]" ? "" : match[1] || match[0];
13696
+ });
13697
+ }
13698
+ function arrayToObject(arr) {
13699
+ const obj = {};
13700
+ const keys = Object.keys(arr);
13701
+ let i;
13702
+ const len = keys.length;
13703
+ let key;
13704
+ for (i = 0; i < len; i++) {
13705
+ key = keys[i];
13706
+ obj[key] = arr[key];
13707
+ }
13708
+ return obj;
13709
+ }
13710
+ function formDataToJSON(formData) {
13711
+ function buildPath(path2, value, target, index) {
13712
+ let name = path2[index++];
13713
+ if (name === "__proto__") return true;
13714
+ const isNumericKey = Number.isFinite(+name);
13715
+ const isLast = index >= path2.length;
13716
+ name = !name && utils$1.isArray(target) ? target.length : name;
13717
+ if (isLast) {
13718
+ if (utils$1.hasOwnProp(target, name)) {
13719
+ target[name] = utils$1.isArray(target[name]) ? target[name].concat(value) : [target[name], value];
13720
+ } else {
13721
+ target[name] = value;
13722
+ }
13723
+ return !isNumericKey;
13724
+ }
13725
+ if (!target[name] || !utils$1.isObject(target[name])) {
13726
+ target[name] = [];
13727
+ }
13728
+ const result = buildPath(path2, value, target[name], index);
13729
+ if (result && utils$1.isArray(target[name])) {
13730
+ target[name] = arrayToObject(target[name]);
13731
+ }
13732
+ return !isNumericKey;
13723
13733
  }
13724
- toJSON(asStrings) {
13725
- const obj = /* @__PURE__ */ Object.create(null);
13726
- utils$1.forEach(this, (value, header) => {
13727
- value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(", ") : value);
13734
+ if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) {
13735
+ const obj = {};
13736
+ utils$1.forEachEntry(formData, (name, value) => {
13737
+ buildPath(parsePropPath(name), value, obj, 0);
13728
13738
  });
13729
13739
  return obj;
13730
13740
  }
13731
- [Symbol.iterator]() {
13732
- return Object.entries(this.toJSON())[Symbol.iterator]();
13733
- }
13734
- toString() {
13735
- return Object.entries(this.toJSON()).map(([header, value]) => header + ": " + value).join("\n");
13736
- }
13737
- getSetCookie() {
13738
- return this.get("set-cookie") || [];
13739
- }
13740
- get [Symbol.toStringTag]() {
13741
- return "AxiosHeaders";
13742
- }
13743
- static from(thing) {
13744
- return thing instanceof this ? thing : new this(thing);
13745
- }
13746
- static concat(first, ...targets) {
13747
- const computed = new this(first);
13748
- targets.forEach((target) => computed.set(target));
13749
- return computed;
13741
+ return null;
13742
+ }
13743
+ var own = (obj, key) => obj != null && utils$1.hasOwnProp(obj, key) ? obj[key] : void 0;
13744
+ function stringifySafely(rawValue, parser, encoder) {
13745
+ if (utils$1.isString(rawValue)) {
13746
+ try {
13747
+ (parser || JSON.parse)(rawValue);
13748
+ return utils$1.trim(rawValue);
13749
+ } catch (e) {
13750
+ if (e.name !== "SyntaxError") {
13751
+ throw e;
13752
+ }
13753
+ }
13750
13754
  }
13751
- static accessor(header) {
13752
- const internals = this[$internals] = this[$internals] = {
13753
- accessors: {}
13754
- };
13755
- const accessors = internals.accessors;
13756
- const prototype2 = this.prototype;
13757
- function defineAccessor(_header) {
13758
- const lHeader = normalizeHeader(_header);
13759
- if (!accessors[lHeader]) {
13760
- buildAccessors(prototype2, _header);
13761
- accessors[lHeader] = true;
13755
+ return (encoder || JSON.stringify)(rawValue);
13756
+ }
13757
+ var defaults = {
13758
+ transitional: transitionalDefaults,
13759
+ adapter: ["xhr", "http", "fetch"],
13760
+ transformRequest: [function transformRequest(data, headers) {
13761
+ const contentType = headers.getContentType() || "";
13762
+ const hasJSONContentType = contentType.indexOf("application/json") > -1;
13763
+ const isObjectPayload = utils$1.isObject(data);
13764
+ if (isObjectPayload && utils$1.isHTMLForm(data)) {
13765
+ data = new FormData(data);
13766
+ }
13767
+ const isFormData2 = utils$1.isFormData(data);
13768
+ if (isFormData2) {
13769
+ return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
13770
+ }
13771
+ 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)) {
13772
+ return data;
13773
+ }
13774
+ if (utils$1.isArrayBufferView(data)) {
13775
+ return data.buffer;
13776
+ }
13777
+ if (utils$1.isURLSearchParams(data)) {
13778
+ headers.setContentType("application/x-www-form-urlencoded;charset=utf-8", false);
13779
+ return data.toString();
13780
+ }
13781
+ let isFileList2;
13782
+ if (isObjectPayload) {
13783
+ const formSerializer = own(this, "formSerializer");
13784
+ if (contentType.indexOf("application/x-www-form-urlencoded") > -1) {
13785
+ return toURLEncodedForm(data, formSerializer).toString();
13786
+ }
13787
+ if ((isFileList2 = utils$1.isFileList(data)) || contentType.indexOf("multipart/form-data") > -1) {
13788
+ const env = own(this, "env");
13789
+ const _FormData = env && env.FormData;
13790
+ return toFormData(isFileList2 ? {
13791
+ "files[]": data
13792
+ } : data, _FormData && new _FormData(), formSerializer);
13762
13793
  }
13763
13794
  }
13764
- utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
13765
- return this;
13795
+ if (isObjectPayload || hasJSONContentType) {
13796
+ headers.setContentType("application/json", false);
13797
+ return stringifySafely(data);
13798
+ }
13799
+ return data;
13800
+ }],
13801
+ transformResponse: [function transformResponse(data) {
13802
+ const transitional = own(this, "transitional") || defaults.transitional;
13803
+ const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
13804
+ const responseType = own(this, "responseType");
13805
+ const JSONRequested = responseType === "json";
13806
+ if (utils$1.isResponse(data) || utils$1.isReadableStream(data)) {
13807
+ return data;
13808
+ }
13809
+ if (data && utils$1.isString(data) && (forcedJSONParsing && !responseType || JSONRequested)) {
13810
+ const silentJSONParsing = transitional && transitional.silentJSONParsing;
13811
+ const strictJSONParsing = !silentJSONParsing && JSONRequested;
13812
+ try {
13813
+ return JSON.parse(data, own(this, "parseReviver"));
13814
+ } catch (e) {
13815
+ if (strictJSONParsing) {
13816
+ if (e.name === "SyntaxError") {
13817
+ throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, own(this, "response"));
13818
+ }
13819
+ throw e;
13820
+ }
13821
+ }
13822
+ }
13823
+ return data;
13824
+ }],
13825
+ /**
13826
+ * A timeout in milliseconds to abort a request. If set to 0 (default) a
13827
+ * timeout is not created.
13828
+ */
13829
+ timeout: 0,
13830
+ xsrfCookieName: "XSRF-TOKEN",
13831
+ xsrfHeaderName: "X-XSRF-TOKEN",
13832
+ maxContentLength: -1,
13833
+ maxBodyLength: -1,
13834
+ env: {
13835
+ FormData: platform.classes.FormData,
13836
+ Blob: platform.classes.Blob
13837
+ },
13838
+ validateStatus: function validateStatus(status) {
13839
+ return status >= 200 && status < 300;
13840
+ },
13841
+ headers: {
13842
+ common: {
13843
+ Accept: "application/json, text/plain, */*",
13844
+ "Content-Type": void 0
13845
+ }
13766
13846
  }
13767
13847
  };
13768
- AxiosHeaders.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
13769
- utils$1.reduceDescriptors(AxiosHeaders.prototype, ({
13770
- value
13771
- }, key) => {
13772
- let mapped = key[0].toUpperCase() + key.slice(1);
13773
- return {
13774
- get: () => value,
13775
- set(headerValue) {
13776
- this[mapped] = headerValue;
13777
- }
13778
- };
13848
+ utils$1.forEach(["delete", "get", "head", "post", "put", "patch", "query"], (method) => {
13849
+ defaults.headers[method] = {};
13779
13850
  });
13780
- utils$1.freezeMethods(AxiosHeaders);
13781
13851
  function transformData(fns, response) {
13782
13852
  const config = this || defaults;
13783
13853
  const context = response || config;
@@ -13813,7 +13883,7 @@ var require_axios = __commonJS({
13813
13883
  if (!response.status || !validateStatus || validateStatus(response.status)) {
13814
13884
  resolve(response);
13815
13885
  } else {
13816
- reject(new AxiosError("Request failed with status code " + response.status, [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4], response.config, response.request, response));
13886
+ reject(new AxiosError("Request failed with status code " + response.status, response.status >= 400 && response.status < 500 ? AxiosError.ERR_BAD_REQUEST : AxiosError.ERR_BAD_RESPONSE, response.config, response.request, response));
13817
13887
  }
13818
13888
  }
13819
13889
  function isAbsoluteURL(url2) {
@@ -13897,9 +13967,9 @@ var require_axios = __commonJS({
13897
13967
  function getEnv(key) {
13898
13968
  return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || "";
13899
13969
  }
13900
- var VERSION = "1.15.1";
13970
+ var VERSION = "1.16.0";
13901
13971
  function parseProtocol(url2) {
13902
- const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url2);
13972
+ const match = /^([-+\w]{1,25}):(?:\/\/)?/.exec(url2);
13903
13973
  return match && match[1] || "";
13904
13974
  }
13905
13975
  var DATA_URL_PATTERN = /^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;
@@ -14110,7 +14180,7 @@ var require_axios = __commonJS({
14110
14180
  throw TypeError("FormData instance required");
14111
14181
  }
14112
14182
  if (boundary.length < 1 || boundary.length > 70) {
14113
- throw Error("boundary must be 10-70 characters long");
14183
+ throw Error("boundary must be 1-70 characters long");
14114
14184
  }
14115
14185
  const boundaryBytes = textEncoder.encode("--" + boundary + CRLF);
14116
14186
  const footerBytes = textEncoder.encode("--" + boundary + "--" + CRLF);
@@ -14227,6 +14297,20 @@ var require_axios = __commonJS({
14227
14297
  }
14228
14298
  return [entryHost, entryPort];
14229
14299
  };
14300
+ var IPV4_MAPPED_DOTTED_RE = /^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:(\d+\.\d+\.\d+\.\d+)$/i;
14301
+ var IPV4_MAPPED_HEX_RE = /^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i;
14302
+ var unmapIPv4MappedIPv6 = (host) => {
14303
+ if (typeof host !== "string" || host.indexOf(":") === -1) return host;
14304
+ const dotted = host.match(IPV4_MAPPED_DOTTED_RE);
14305
+ if (dotted) return dotted[1];
14306
+ const hex = host.match(IPV4_MAPPED_HEX_RE);
14307
+ if (hex) {
14308
+ const high = parseInt(hex[1], 16);
14309
+ const low = parseInt(hex[2], 16);
14310
+ return `${high >> 8}.${high & 255}.${low >> 8}.${low & 255}`;
14311
+ }
14312
+ return host;
14313
+ };
14230
14314
  var normalizeNoProxyHost = (hostname) => {
14231
14315
  if (!hostname) {
14232
14316
  return hostname;
@@ -14234,7 +14318,7 @@ var require_axios = __commonJS({
14234
14318
  if (hostname.charAt(0) === "[" && hostname.charAt(hostname.length - 1) === "]") {
14235
14319
  hostname = hostname.slice(1, -1);
14236
14320
  }
14237
- return hostname.replace(/\.+$/, "");
14321
+ return unmapIPv4MappedIPv6(hostname.replace(/\.+$/, ""));
14238
14322
  };
14239
14323
  function shouldBypassProxy(location) {
14240
14324
  let parsed;
@@ -14415,10 +14499,32 @@ var require_axios = __commonJS({
14415
14499
  }
14416
14500
  }
14417
14501
  const groups = Math.floor(effectiveLen / 4);
14418
- const bytes = groups * 3 - (pad || 0);
14419
- return bytes > 0 ? bytes : 0;
14502
+ const bytes2 = groups * 3 - (pad || 0);
14503
+ return bytes2 > 0 ? bytes2 : 0;
14504
+ }
14505
+ if (typeof Buffer !== "undefined" && typeof Buffer.byteLength === "function") {
14506
+ return Buffer.byteLength(body, "utf8");
14507
+ }
14508
+ let bytes = 0;
14509
+ for (let i = 0, len = body.length; i < len; i++) {
14510
+ const c = body.charCodeAt(i);
14511
+ if (c < 128) {
14512
+ bytes += 1;
14513
+ } else if (c < 2048) {
14514
+ bytes += 2;
14515
+ } else if (c >= 55296 && c <= 56319 && i + 1 < len) {
14516
+ const next = body.charCodeAt(i + 1);
14517
+ if (next >= 56320 && next <= 57343) {
14518
+ bytes += 4;
14519
+ i++;
14520
+ } else {
14521
+ bytes += 3;
14522
+ }
14523
+ } else {
14524
+ bytes += 3;
14525
+ }
14420
14526
  }
14421
- return Buffer.byteLength(body, "utf8");
14527
+ return bytes;
14422
14528
  }
14423
14529
  var zlibOptions = {
14424
14530
  flush: zlib.constants.Z_SYNC_FLUSH,
@@ -14434,9 +14540,33 @@ var require_axios = __commonJS({
14434
14540
  https: httpsFollow
14435
14541
  } = followRedirects;
14436
14542
  var isHttps = /https:?/;
14543
+ var FORM_DATA_CONTENT_HEADERS$1 = ["content-type", "content-length"];
14544
+ function setFormDataHeaders$1(headers, formHeaders, policy) {
14545
+ if (policy !== "content-only") {
14546
+ headers.set(formHeaders);
14547
+ return;
14548
+ }
14549
+ Object.entries(formHeaders).forEach(([key, val]) => {
14550
+ if (FORM_DATA_CONTENT_HEADERS$1.includes(key.toLowerCase())) {
14551
+ headers.set(key, val);
14552
+ }
14553
+ });
14554
+ }
14555
+ var kAxiosSocketListener = /* @__PURE__ */ Symbol("axios.http.socketListener");
14556
+ var kAxiosCurrentReq = /* @__PURE__ */ Symbol("axios.http.currentReq");
14437
14557
  var supportedProtocols = platform.protocols.map((protocol) => {
14438
14558
  return protocol + ":";
14439
14559
  });
14560
+ var decodeURIComponentSafe = (value) => {
14561
+ if (!utils$1.isString(value)) {
14562
+ return value;
14563
+ }
14564
+ try {
14565
+ return decodeURIComponent(value);
14566
+ } catch (error) {
14567
+ return value;
14568
+ }
14569
+ };
14440
14570
  var flushOnFinish = (stream2, [throttled, flush]) => {
14441
14571
  stream2.on("end", flush).on("error", flush);
14442
14572
  return throttled;
@@ -14513,15 +14643,15 @@ var require_axios = __commonJS({
14513
14643
  }
14514
14644
  };
14515
14645
  var http2Sessions = new Http2Sessions();
14516
- function dispatchBeforeRedirect(options, responseDetails) {
14646
+ function dispatchBeforeRedirect(options, responseDetails, requestDetails) {
14517
14647
  if (options.beforeRedirects.proxy) {
14518
14648
  options.beforeRedirects.proxy(options);
14519
14649
  }
14520
14650
  if (options.beforeRedirects.config) {
14521
- options.beforeRedirects.config(options, responseDetails);
14651
+ options.beforeRedirects.config(options, responseDetails, requestDetails);
14522
14652
  }
14523
14653
  }
14524
- function setProxy(options, configProxy, location) {
14654
+ function setProxy(options, configProxy, location, isRedirect) {
14525
14655
  let proxy = configProxy;
14526
14656
  if (!proxy && proxy !== false) {
14527
14657
  const proxyUrl = getProxyForUrl(location);
@@ -14531,34 +14661,59 @@ var require_axios = __commonJS({
14531
14661
  }
14532
14662
  }
14533
14663
  }
14534
- if (proxy) {
14535
- if (proxy.username) {
14536
- proxy.auth = (proxy.username || "") + ":" + (proxy.password || "");
14664
+ if (isRedirect && options.headers) {
14665
+ for (const name of Object.keys(options.headers)) {
14666
+ if (name.toLowerCase() === "proxy-authorization") {
14667
+ delete options.headers[name];
14668
+ }
14537
14669
  }
14538
- if (proxy.auth) {
14539
- const validProxyAuth = Boolean(proxy.auth.username || proxy.auth.password);
14670
+ }
14671
+ if (proxy) {
14672
+ const isProxyURL = proxy instanceof URL;
14673
+ const readProxyField = (key) => isProxyURL || utils$1.hasOwnProp(proxy, key) ? proxy[key] : void 0;
14674
+ const proxyUsername = readProxyField("username");
14675
+ const proxyPassword = readProxyField("password");
14676
+ let proxyAuth = utils$1.hasOwnProp(proxy, "auth") ? proxy.auth : void 0;
14677
+ if (proxyUsername) {
14678
+ proxyAuth = (proxyUsername || "") + ":" + (proxyPassword || "");
14679
+ }
14680
+ if (proxyAuth) {
14681
+ const authIsObject = typeof proxyAuth === "object";
14682
+ const authUsername = authIsObject && utils$1.hasOwnProp(proxyAuth, "username") ? proxyAuth.username : void 0;
14683
+ const authPassword = authIsObject && utils$1.hasOwnProp(proxyAuth, "password") ? proxyAuth.password : void 0;
14684
+ const validProxyAuth = Boolean(authUsername || authPassword);
14540
14685
  if (validProxyAuth) {
14541
- proxy.auth = (proxy.auth.username || "") + ":" + (proxy.auth.password || "");
14542
- } else if (typeof proxy.auth === "object") {
14686
+ proxyAuth = (authUsername || "") + ":" + (authPassword || "");
14687
+ } else if (authIsObject) {
14543
14688
  throw new AxiosError("Invalid proxy authorization", AxiosError.ERR_BAD_OPTION, {
14544
14689
  proxy
14545
14690
  });
14546
14691
  }
14547
- const base64 = Buffer.from(proxy.auth, "utf8").toString("base64");
14692
+ const base64 = Buffer.from(proxyAuth, "utf8").toString("base64");
14548
14693
  options.headers["Proxy-Authorization"] = "Basic " + base64;
14549
14694
  }
14550
- options.headers.host = options.hostname + (options.port ? ":" + options.port : "");
14551
- const proxyHost = proxy.hostname || proxy.host;
14695
+ let hasUserHostHeader = false;
14696
+ for (const name of Object.keys(options.headers)) {
14697
+ if (name.toLowerCase() === "host") {
14698
+ hasUserHostHeader = true;
14699
+ break;
14700
+ }
14701
+ }
14702
+ if (!hasUserHostHeader) {
14703
+ options.headers.host = options.hostname + (options.port ? ":" + options.port : "");
14704
+ }
14705
+ const proxyHost = readProxyField("hostname") || readProxyField("host");
14552
14706
  options.hostname = proxyHost;
14553
14707
  options.host = proxyHost;
14554
- options.port = proxy.port;
14708
+ options.port = readProxyField("port");
14555
14709
  options.path = location;
14556
- if (proxy.protocol) {
14557
- options.protocol = proxy.protocol.includes(":") ? proxy.protocol : `${proxy.protocol}:`;
14710
+ const proxyProtocol = readProxyField("protocol");
14711
+ if (proxyProtocol) {
14712
+ options.protocol = proxyProtocol.includes(":") ? proxyProtocol : `${proxyProtocol}:`;
14558
14713
  }
14559
14714
  }
14560
14715
  options.beforeRedirects.proxy = function beforeRedirect(redirectOptions) {
14561
- setProxy(redirectOptions, configProxy, redirectOptions.href);
14716
+ setProxy(redirectOptions, configProxy, redirectOptions.href, true);
14562
14717
  };
14563
14718
  }
14564
14719
  var isHttpAdapterSupported = typeof process !== "undefined" && utils$1.kindOf(process) === "process";
@@ -14648,6 +14803,7 @@ var require_axios = __commonJS({
14648
14803
  let isDone;
14649
14804
  let rejected = false;
14650
14805
  let req;
14806
+ let connectPhaseTimer;
14651
14807
  httpVersion = +httpVersion;
14652
14808
  if (Number.isNaN(httpVersion)) {
14653
14809
  throw TypeError(`Invalid protocol version: '${config.httpVersion}' is not a number`);
@@ -14676,8 +14832,23 @@ var require_axios = __commonJS({
14676
14832
  console.warn("emit error", err);
14677
14833
  }
14678
14834
  }
14835
+ function clearConnectPhaseTimer() {
14836
+ if (connectPhaseTimer) {
14837
+ clearTimeout(connectPhaseTimer);
14838
+ connectPhaseTimer = null;
14839
+ }
14840
+ }
14841
+ function createTimeoutError() {
14842
+ let timeoutErrorMessage = config.timeout ? "timeout of " + config.timeout + "ms exceeded" : "timeout exceeded";
14843
+ const transitional = config.transitional || transitionalDefaults;
14844
+ if (config.timeoutErrorMessage) {
14845
+ timeoutErrorMessage = config.timeoutErrorMessage;
14846
+ }
14847
+ return new AxiosError(timeoutErrorMessage, transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED, config, req);
14848
+ }
14679
14849
  abortEmitter.once("abort", reject);
14680
14850
  const onFinished = () => {
14851
+ clearConnectPhaseTimer();
14681
14852
  if (config.cancelToken) {
14682
14853
  config.cancelToken.unsubscribe(abort);
14683
14854
  }
@@ -14694,6 +14865,7 @@ var require_axios = __commonJS({
14694
14865
  }
14695
14866
  onDone((response, isRejected) => {
14696
14867
  isDone = true;
14868
+ clearConnectPhaseTimer();
14697
14869
  if (isRejected) {
14698
14870
  rejected = true;
14699
14871
  onFinished();
@@ -14775,7 +14947,7 @@ var require_axios = __commonJS({
14775
14947
  boundary: userBoundary && userBoundary[1] || void 0
14776
14948
  });
14777
14949
  } else if (utils$1.isFormData(data) && utils$1.isFunction(data.getHeaders) && data.getHeaders !== Object.prototype.getHeaders) {
14778
- headers.set(data.getHeaders());
14950
+ setFormDataHeaders$1(headers, data.getHeaders(), own2("formDataHeaderPolicy"));
14779
14951
  if (!headers.hasContentLength()) {
14780
14952
  try {
14781
14953
  const knownLength = await util2.promisify(data.getLength).call(data);
@@ -14820,20 +14992,21 @@ var require_axios = __commonJS({
14820
14992
  onUploadProgress && data.on("progress", flushOnFinish(data, progressEventDecorator(contentLength, progressEventReducer(asyncDecorator(onUploadProgress), false, 3))));
14821
14993
  }
14822
14994
  let auth = void 0;
14823
- if (config.auth) {
14824
- const username = config.auth.username || "";
14825
- const password = config.auth.password || "";
14995
+ const configAuth = own2("auth");
14996
+ if (configAuth) {
14997
+ const username = configAuth.username || "";
14998
+ const password = configAuth.password || "";
14826
14999
  auth = username + ":" + password;
14827
15000
  }
14828
15001
  if (!auth && parsed.username) {
14829
- const urlUsername = parsed.username;
14830
- const urlPassword = parsed.password;
15002
+ const urlUsername = decodeURIComponentSafe(parsed.username);
15003
+ const urlPassword = decodeURIComponentSafe(parsed.password);
14831
15004
  auth = urlUsername + ":" + urlPassword;
14832
15005
  }
14833
15006
  auth && headers.delete("authorization");
14834
- let path;
15007
+ let path$1;
14835
15008
  try {
14836
- path = buildURL(parsed.pathname + parsed.search, config.params, config.paramsSerializer).replace(/^\?/, "");
15009
+ path$1 = buildURL(parsed.pathname + parsed.search, config.params, config.paramsSerializer).replace(/^\?/, "");
14837
15010
  } catch (err) {
14838
15011
  const customErr = new Error(err.message);
14839
15012
  customErr.config = config;
@@ -14842,8 +15015,8 @@ var require_axios = __commonJS({
14842
15015
  return reject(customErr);
14843
15016
  }
14844
15017
  headers.set("Accept-Encoding", "gzip, compress, deflate" + (isBrotliSupported ? ", br" : ""), false);
14845
- const options = {
14846
- path,
15018
+ const options = Object.assign(/* @__PURE__ */ Object.create(null), {
15019
+ path: path$1,
14847
15020
  method,
14848
15021
  headers: headers.toJSON(),
14849
15022
  agents: {
@@ -14854,11 +15027,22 @@ var require_axios = __commonJS({
14854
15027
  protocol,
14855
15028
  family,
14856
15029
  beforeRedirect: dispatchBeforeRedirect,
14857
- beforeRedirects: {},
15030
+ beforeRedirects: /* @__PURE__ */ Object.create(null),
14858
15031
  http2Options
14859
- };
15032
+ });
14860
15033
  !utils$1.isUndefined(lookup) && (options.lookup = lookup);
14861
15034
  if (config.socketPath) {
15035
+ if (typeof config.socketPath !== "string") {
15036
+ return reject(new AxiosError("socketPath must be a string", AxiosError.ERR_BAD_OPTION_VALUE, config));
15037
+ }
15038
+ if (config.allowedSocketPaths != null) {
15039
+ const allowed = Array.isArray(config.allowedSocketPaths) ? config.allowedSocketPaths : [config.allowedSocketPaths];
15040
+ const resolvedSocket = path.resolve(config.socketPath);
15041
+ const isAllowed = allowed.some((entry) => typeof entry === "string" && path.resolve(entry) === resolvedSocket);
15042
+ if (!isAllowed) {
15043
+ return reject(new AxiosError(`socketPath "${config.socketPath}" is not permitted by allowedSocketPaths`, AxiosError.ERR_BAD_OPTION_VALUE, config));
15044
+ }
15045
+ }
14862
15046
  options.socketPath = config.socketPath;
14863
15047
  } else {
14864
15048
  options.hostname = parsed.hostname.startsWith("[") ? parsed.hostname.slice(1, -1) : parsed.hostname;
@@ -14866,6 +15050,7 @@ var require_axios = __commonJS({
14866
15050
  setProxy(options, config.proxy, protocol + "//" + parsed.hostname + (parsed.port ? ":" + parsed.port : "") + options.path);
14867
15051
  }
14868
15052
  let transport;
15053
+ let isNativeTransport = false;
14869
15054
  const isHttpsRequest = isHttps.test(options.protocol);
14870
15055
  options.agent = isHttpsRequest ? config.httpsAgent : config.httpAgent;
14871
15056
  if (isHttp2) {
@@ -14876,12 +15061,14 @@ var require_axios = __commonJS({
14876
15061
  transport = configTransport;
14877
15062
  } else if (config.maxRedirects === 0) {
14878
15063
  transport = isHttpsRequest ? https : http;
15064
+ isNativeTransport = true;
14879
15065
  } else {
14880
15066
  if (config.maxRedirects) {
14881
15067
  options.maxRedirects = config.maxRedirects;
14882
15068
  }
14883
- if (config.beforeRedirect) {
14884
- options.beforeRedirects.config = config.beforeRedirect;
15069
+ const configBeforeRedirect = own2("beforeRedirect");
15070
+ if (configBeforeRedirect) {
15071
+ options.beforeRedirects.config = configBeforeRedirect;
14885
15072
  }
14886
15073
  transport = isHttpsRequest ? httpsFollow : httpFollow;
14887
15074
  }
@@ -14891,10 +15078,9 @@ var require_axios = __commonJS({
14891
15078
  } else {
14892
15079
  options.maxBodyLength = Infinity;
14893
15080
  }
14894
- if (config.insecureHTTPParser) {
14895
- options.insecureHTTPParser = config.insecureHTTPParser;
14896
- }
15081
+ options.insecureHTTPParser = Boolean(own2("insecureHTTPParser"));
14897
15082
  req = transport.request(options, function handleResponse(res) {
15083
+ clearConnectPhaseTimer();
14898
15084
  if (req.destroyed) return;
14899
15085
  const streams = [res];
14900
15086
  const responseLength = utils$1.toFiniteNumber(res.headers["content-length"]);
@@ -14976,13 +15162,13 @@ var require_axios = __commonJS({
14976
15162
  if (rejected) {
14977
15163
  return;
14978
15164
  }
14979
- const err = new AxiosError("stream has been aborted", AxiosError.ERR_BAD_RESPONSE, config, lastRequest);
15165
+ const err = new AxiosError("stream has been aborted", AxiosError.ERR_BAD_RESPONSE, config, lastRequest, response);
14980
15166
  responseStream.destroy(err);
14981
15167
  reject(err);
14982
15168
  });
14983
15169
  responseStream.on("error", function handleStreamError(err) {
14984
- if (req.destroyed) return;
14985
- reject(AxiosError.from(err, null, config, lastRequest));
15170
+ if (rejected) return;
15171
+ reject(AxiosError.from(err, null, config, lastRequest, response));
14986
15172
  });
14987
15173
  responseStream.on("end", function handleStreamEnd() {
14988
15174
  try {
@@ -15017,19 +15203,29 @@ var require_axios = __commonJS({
15017
15203
  req.on("error", function handleRequestError(err) {
15018
15204
  reject(AxiosError.from(err, null, config, req));
15019
15205
  });
15206
+ const boundSockets = /* @__PURE__ */ new Set();
15020
15207
  req.on("socket", function handleRequestSocket(socket) {
15021
15208
  socket.setKeepAlive(true, 1e3 * 60);
15022
- const removeSocketErrorListener = () => {
15023
- socket.removeListener("error", handleRequestSocketError);
15024
- };
15025
- function handleRequestSocketError(err) {
15026
- removeSocketErrorListener();
15027
- if (!req.destroyed) {
15028
- req.destroy(err);
15209
+ if (!socket[kAxiosSocketListener]) {
15210
+ socket.on("error", function handleSocketError(err) {
15211
+ const current = socket[kAxiosCurrentReq];
15212
+ if (current && !current.destroyed) {
15213
+ current.destroy(err);
15214
+ }
15215
+ });
15216
+ socket[kAxiosSocketListener] = true;
15217
+ }
15218
+ socket[kAxiosCurrentReq] = req;
15219
+ boundSockets.add(socket);
15220
+ });
15221
+ req.once("close", function clearCurrentReq() {
15222
+ clearConnectPhaseTimer();
15223
+ for (const socket of boundSockets) {
15224
+ if (socket[kAxiosCurrentReq] === req) {
15225
+ socket[kAxiosCurrentReq] = null;
15029
15226
  }
15030
15227
  }
15031
- socket.on("error", handleRequestSocketError);
15032
- req.once("close", removeSocketErrorListener);
15228
+ boundSockets.clear();
15033
15229
  });
15034
15230
  if (config.timeout) {
15035
15231
  const timeout = parseInt(config.timeout, 10);
@@ -15037,15 +15233,14 @@ var require_axios = __commonJS({
15037
15233
  abort(new AxiosError("error trying to parse `config.timeout` to int", AxiosError.ERR_BAD_OPTION_VALUE, config, req));
15038
15234
  return;
15039
15235
  }
15040
- req.setTimeout(timeout, function handleRequestTimeout() {
15236
+ const handleTimeout = function handleTimeout2() {
15041
15237
  if (isDone) return;
15042
- let timeoutErrorMessage = config.timeout ? "timeout of " + config.timeout + "ms exceeded" : "timeout exceeded";
15043
- const transitional = config.transitional || transitionalDefaults;
15044
- if (config.timeoutErrorMessage) {
15045
- timeoutErrorMessage = config.timeoutErrorMessage;
15046
- }
15047
- abort(new AxiosError(timeoutErrorMessage, transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED, config, req));
15048
- });
15238
+ abort(createTimeoutError());
15239
+ };
15240
+ if (isNativeTransport && timeout > 0) {
15241
+ connectPhaseTimer = setTimeout(handleTimeout, timeout);
15242
+ }
15243
+ req.setTimeout(timeout, handleTimeout);
15049
15244
  } else {
15050
15245
  req.setTimeout(0);
15051
15246
  }
@@ -15095,14 +15290,14 @@ var require_axios = __commonJS({
15095
15290
  var cookies = platform.hasStandardBrowserEnv ? (
15096
15291
  // Standard browser envs support document.cookie
15097
15292
  {
15098
- write(name, value, expires, path, domain, secure, sameSite) {
15293
+ write(name, value, expires, path2, domain, secure, sameSite) {
15099
15294
  if (typeof document === "undefined") return;
15100
15295
  const cookie = [`${name}=${encodeURIComponent(value)}`];
15101
15296
  if (utils$1.isNumber(expires)) {
15102
15297
  cookie.push(`expires=${new Date(expires).toUTCString()}`);
15103
15298
  }
15104
- if (utils$1.isString(path)) {
15105
- cookie.push(`path=${path}`);
15299
+ if (utils$1.isString(path2)) {
15300
+ cookie.push(`path=${path2}`);
15106
15301
  }
15107
15302
  if (utils$1.isString(domain)) {
15108
15303
  cookie.push(`domain=${domain}`);
@@ -15117,8 +15312,15 @@ var require_axios = __commonJS({
15117
15312
  },
15118
15313
  read(name) {
15119
15314
  if (typeof document === "undefined") return null;
15120
- const match = document.cookie.match(new RegExp("(?:^|; )" + name + "=([^;]*)"));
15121
- return match ? decodeURIComponent(match[1]) : null;
15315
+ const cookies2 = document.cookie.split(";");
15316
+ for (let i = 0; i < cookies2.length; i++) {
15317
+ const cookie = cookies2[i].replace(/^\s+/, "");
15318
+ const eq = cookie.indexOf("=");
15319
+ if (eq !== -1 && cookie.slice(0, eq) === name) {
15320
+ return decodeURIComponent(cookie.slice(eq + 1));
15321
+ }
15322
+ }
15323
+ return null;
15122
15324
  },
15123
15325
  remove(name) {
15124
15326
  this.write(name, "", Date.now() - 864e5, "/");
@@ -15141,7 +15343,16 @@ var require_axios = __commonJS({
15141
15343
  } : thing;
15142
15344
  function mergeConfig(config1, config2) {
15143
15345
  config2 = config2 || {};
15144
- const config = {};
15346
+ const config = /* @__PURE__ */ Object.create(null);
15347
+ Object.defineProperty(config, "hasOwnProperty", {
15348
+ // Null-proto descriptor so a polluted Object.prototype.get cannot turn
15349
+ // this data descriptor into an accessor descriptor on the way in.
15350
+ __proto__: null,
15351
+ value: Object.prototype.hasOwnProperty,
15352
+ enumerable: false,
15353
+ writable: true,
15354
+ configurable: true
15355
+ });
15145
15356
  function getMergedValue(target, source, prop, caseless) {
15146
15357
  if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {
15147
15358
  return utils$1.merge.call({
@@ -15207,6 +15418,7 @@ var require_axios = __commonJS({
15207
15418
  httpsAgent: defaultToConfig2,
15208
15419
  cancelToken: defaultToConfig2,
15209
15420
  socketPath: defaultToConfig2,
15421
+ allowedSocketPaths: defaultToConfig2,
15210
15422
  responseEncoding: defaultToConfig2,
15211
15423
  validateStatus: mergeDirectKeys,
15212
15424
  headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true)
@@ -15224,32 +15436,41 @@ var require_axios = __commonJS({
15224
15436
  });
15225
15437
  return config;
15226
15438
  }
15439
+ var FORM_DATA_CONTENT_HEADERS = ["content-type", "content-length"];
15440
+ function setFormDataHeaders(headers, formHeaders, policy) {
15441
+ if (policy !== "content-only") {
15442
+ headers.set(formHeaders);
15443
+ return;
15444
+ }
15445
+ Object.entries(formHeaders).forEach(([key, val]) => {
15446
+ if (FORM_DATA_CONTENT_HEADERS.includes(key.toLowerCase())) {
15447
+ headers.set(key, val);
15448
+ }
15449
+ });
15450
+ }
15451
+ var encodeUTF8 = (str) => encodeURIComponent(str).replace(/%([0-9A-F]{2})/gi, (_, hex) => String.fromCharCode(parseInt(hex, 16)));
15227
15452
  var resolveConfig = (config) => {
15228
15453
  const newConfig = mergeConfig({}, config);
15229
- let {
15230
- data,
15231
- withXSRFToken,
15232
- xsrfHeaderName,
15233
- xsrfCookieName,
15234
- headers,
15235
- auth
15236
- } = newConfig;
15454
+ const own2 = (key) => utils$1.hasOwnProp(newConfig, key) ? newConfig[key] : void 0;
15455
+ const data = own2("data");
15456
+ let withXSRFToken = own2("withXSRFToken");
15457
+ const xsrfHeaderName = own2("xsrfHeaderName");
15458
+ const xsrfCookieName = own2("xsrfCookieName");
15459
+ let headers = own2("headers");
15460
+ const auth = own2("auth");
15461
+ const baseURL = own2("baseURL");
15462
+ const allowAbsoluteUrls = own2("allowAbsoluteUrls");
15463
+ const url2 = own2("url");
15237
15464
  newConfig.headers = headers = AxiosHeaders.from(headers);
15238
- newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config.params, config.paramsSerializer);
15465
+ newConfig.url = buildURL(buildFullPath(baseURL, url2, allowAbsoluteUrls), config.params, config.paramsSerializer);
15239
15466
  if (auth) {
15240
- headers.set("Authorization", "Basic " + btoa((auth.username || "") + ":" + (auth.password ? unescape(encodeURIComponent(auth.password)) : "")));
15467
+ headers.set("Authorization", "Basic " + btoa((auth.username || "") + ":" + (auth.password ? encodeUTF8(auth.password) : "")));
15241
15468
  }
15242
15469
  if (utils$1.isFormData(data)) {
15243
15470
  if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
15244
15471
  headers.setContentType(void 0);
15245
15472
  } else if (utils$1.isFunction(data.getHeaders)) {
15246
- const formHeaders = data.getHeaders();
15247
- const allowedHeaders = ["content-type", "content-length"];
15248
- Object.entries(formHeaders).forEach(([key, val]) => {
15249
- if (allowedHeaders.includes(key.toLowerCase())) {
15250
- headers.set(key, val);
15251
- }
15252
- });
15473
+ setFormDataHeaders(headers, data.getHeaders(), own2("formDataHeaderPolicy"));
15253
15474
  }
15254
15475
  }
15255
15476
  if (platform.hasStandardBrowserEnv) {
@@ -15319,7 +15540,7 @@ var require_axios = __commonJS({
15319
15540
  if (!request || request.readyState !== 4) {
15320
15541
  return;
15321
15542
  }
15322
- if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf("file:") === 0)) {
15543
+ if (request.status === 0 && !(request.responseURL && request.responseURL.startsWith("file:"))) {
15323
15544
  return;
15324
15545
  }
15325
15546
  setTimeout(onloadend);
@@ -15330,6 +15551,7 @@ var require_axios = __commonJS({
15330
15551
  return;
15331
15552
  }
15332
15553
  reject(new AxiosError("Request aborted", AxiosError.ECONNABORTED, config, request));
15554
+ done();
15333
15555
  request = null;
15334
15556
  };
15335
15557
  request.onerror = function handleError(event) {
@@ -15337,6 +15559,7 @@ var require_axios = __commonJS({
15337
15559
  const err = new AxiosError(msg, AxiosError.ERR_NETWORK, config, request);
15338
15560
  err.event = event || null;
15339
15561
  reject(err);
15562
+ done();
15340
15563
  request = null;
15341
15564
  };
15342
15565
  request.ontimeout = function handleTimeout() {
@@ -15346,6 +15569,7 @@ var require_axios = __commonJS({
15346
15569
  timeoutErrorMessage = _config.timeoutErrorMessage;
15347
15570
  }
15348
15571
  reject(new AxiosError(timeoutErrorMessage, transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED, config, request));
15572
+ done();
15349
15573
  request = null;
15350
15574
  };
15351
15575
  requestData === void 0 && requestHeaders.setContentType(null);
@@ -15376,6 +15600,7 @@ var require_axios = __commonJS({
15376
15600
  }
15377
15601
  reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);
15378
15602
  request.abort();
15603
+ done();
15379
15604
  request = null;
15380
15605
  };
15381
15606
  _config.cancelToken && _config.cancelToken.subscribe(onCanceled);
@@ -15384,7 +15609,7 @@ var require_axios = __commonJS({
15384
15609
  }
15385
15610
  }
15386
15611
  const protocol = parseProtocol(_config.url);
15387
- if (protocol && platform.protocols.indexOf(protocol) === -1) {
15612
+ if (protocol && !platform.protocols.includes(protocol)) {
15388
15613
  reject(new AxiosError("Unsupported protocol " + protocol + ":", AxiosError.ERR_BAD_REQUEST, config));
15389
15614
  return;
15390
15615
  }
@@ -15513,17 +15738,6 @@ var require_axios = __commonJS({
15513
15738
  var {
15514
15739
  isFunction
15515
15740
  } = utils$1;
15516
- var globalFetchAPI = (({
15517
- Request,
15518
- Response
15519
- }) => ({
15520
- Request,
15521
- Response
15522
- }))(utils$1.global);
15523
- var {
15524
- ReadableStream: ReadableStream$1,
15525
- TextEncoder: TextEncoder$1
15526
- } = utils$1.global;
15527
15741
  var test = (fn, ...args) => {
15528
15742
  try {
15529
15743
  return !!fn(...args);
@@ -15532,9 +15746,18 @@ var require_axios = __commonJS({
15532
15746
  }
15533
15747
  };
15534
15748
  var factory = (env) => {
15749
+ var _utils$global;
15750
+ const globalObject = (_utils$global = utils$1.global) !== null && _utils$global !== void 0 ? _utils$global : globalThis;
15751
+ const {
15752
+ ReadableStream: ReadableStream2,
15753
+ TextEncoder: TextEncoder2
15754
+ } = globalObject;
15535
15755
  env = utils$1.merge.call({
15536
15756
  skipUndefined: true
15537
- }, globalFetchAPI, env);
15757
+ }, {
15758
+ Request: globalObject.Request,
15759
+ Response: globalObject.Response
15760
+ }, env);
15538
15761
  const {
15539
15762
  fetch: envFetch,
15540
15763
  Request,
@@ -15546,12 +15769,12 @@ var require_axios = __commonJS({
15546
15769
  if (!isFetchSupported) {
15547
15770
  return false;
15548
15771
  }
15549
- const isReadableStreamSupported = isFetchSupported && isFunction(ReadableStream$1);
15550
- 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()));
15772
+ const isReadableStreamSupported = isFetchSupported && isFunction(ReadableStream2);
15773
+ const encodeText = isFetchSupported && (typeof TextEncoder2 === "function" ? /* @__PURE__ */ ((encoder) => (str) => encoder.encode(str))(new TextEncoder2()) : async (str) => new Uint8Array(await new Request(str).arrayBuffer()));
15551
15774
  const supportsRequestStream = isRequestSupported && isReadableStreamSupported && test(() => {
15552
15775
  let duplexAccessed = false;
15553
15776
  const request = new Request(platform.origin, {
15554
- body: new ReadableStream$1(),
15777
+ body: new ReadableStream2(),
15555
15778
  method: "POST",
15556
15779
  get duplex() {
15557
15780
  duplexAccessed = true;
@@ -15620,8 +15843,12 @@ var require_axios = __commonJS({
15620
15843
  responseType,
15621
15844
  headers,
15622
15845
  withCredentials = "same-origin",
15623
- fetchOptions
15846
+ fetchOptions,
15847
+ maxContentLength,
15848
+ maxBodyLength
15624
15849
  } = resolveConfig(config);
15850
+ const hasMaxContentLength = utils$1.isNumber(maxContentLength) && maxContentLength > -1;
15851
+ const hasMaxBodyLength = utils$1.isNumber(maxBodyLength) && maxBodyLength > -1;
15625
15852
  let _fetch = envFetch || fetch;
15626
15853
  responseType = responseType ? (responseType + "").toLowerCase() : "text";
15627
15854
  let composedSignal = composeSignals([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
@@ -15631,6 +15858,18 @@ var require_axios = __commonJS({
15631
15858
  });
15632
15859
  let requestContentLength;
15633
15860
  try {
15861
+ if (hasMaxContentLength && typeof url2 === "string" && url2.startsWith("data:")) {
15862
+ const estimated = estimateDataURLDecodedBytes(url2);
15863
+ if (estimated > maxContentLength) {
15864
+ throw new AxiosError("maxContentLength size of " + maxContentLength + " exceeded", AxiosError.ERR_BAD_RESPONSE, config, request);
15865
+ }
15866
+ }
15867
+ if (hasMaxBodyLength && method !== "get" && method !== "head") {
15868
+ const outboundLength = await resolveBodyLength(headers, data);
15869
+ if (typeof outboundLength === "number" && isFinite(outboundLength) && outboundLength > maxBodyLength) {
15870
+ throw new AxiosError("Request body larger than maxBodyLength limit", AxiosError.ERR_BAD_REQUEST, config, request);
15871
+ }
15872
+ }
15634
15873
  if (onUploadProgress && supportsRequestStream && method !== "get" && method !== "head" && (requestContentLength = await resolveBodyLength(headers, data)) !== 0) {
15635
15874
  let _request = new Request(url2, {
15636
15875
  method: "POST",
@@ -15656,6 +15895,7 @@ var require_axios = __commonJS({
15656
15895
  headers.delete("content-type");
15657
15896
  }
15658
15897
  }
15898
+ headers.set("User-Agent", "axios/" + VERSION, false);
15659
15899
  const resolvedOptions = {
15660
15900
  ...fetchOptions,
15661
15901
  signal: composedSignal,
@@ -15667,21 +15907,52 @@ var require_axios = __commonJS({
15667
15907
  };
15668
15908
  request = isRequestSupported && new Request(url2, resolvedOptions);
15669
15909
  let response = await (isRequestSupported ? _fetch(request, fetchOptions) : _fetch(url2, resolvedOptions));
15910
+ if (hasMaxContentLength) {
15911
+ const declaredLength = utils$1.toFiniteNumber(response.headers.get("content-length"));
15912
+ if (declaredLength != null && declaredLength > maxContentLength) {
15913
+ throw new AxiosError("maxContentLength size of " + maxContentLength + " exceeded", AxiosError.ERR_BAD_RESPONSE, config, request);
15914
+ }
15915
+ }
15670
15916
  const isStreamResponse = supportsResponseStream && (responseType === "stream" || responseType === "response");
15671
- if (supportsResponseStream && (onDownloadProgress || isStreamResponse && unsubscribe)) {
15917
+ if (supportsResponseStream && response.body && (onDownloadProgress || hasMaxContentLength || isStreamResponse && unsubscribe)) {
15672
15918
  const options = {};
15673
15919
  ["status", "statusText", "headers"].forEach((prop) => {
15674
15920
  options[prop] = response[prop];
15675
15921
  });
15676
15922
  const responseContentLength = utils$1.toFiniteNumber(response.headers.get("content-length"));
15677
15923
  const [onProgress, flush] = onDownloadProgress && progressEventDecorator(responseContentLength, progressEventReducer(asyncDecorator(onDownloadProgress), true)) || [];
15678
- response = new Response(trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
15924
+ let bytesRead = 0;
15925
+ const onChunkProgress = (loadedBytes) => {
15926
+ if (hasMaxContentLength) {
15927
+ bytesRead = loadedBytes;
15928
+ if (bytesRead > maxContentLength) {
15929
+ throw new AxiosError("maxContentLength size of " + maxContentLength + " exceeded", AxiosError.ERR_BAD_RESPONSE, config, request);
15930
+ }
15931
+ }
15932
+ onProgress && onProgress(loadedBytes);
15933
+ };
15934
+ response = new Response(trackStream(response.body, DEFAULT_CHUNK_SIZE, onChunkProgress, () => {
15679
15935
  flush && flush();
15680
15936
  unsubscribe && unsubscribe();
15681
15937
  }), options);
15682
15938
  }
15683
15939
  responseType = responseType || "text";
15684
15940
  let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || "text"](response, config);
15941
+ if (hasMaxContentLength && !supportsResponseStream && !isStreamResponse) {
15942
+ let materializedSize;
15943
+ if (responseData != null) {
15944
+ if (typeof responseData.byteLength === "number") {
15945
+ materializedSize = responseData.byteLength;
15946
+ } else if (typeof responseData.size === "number") {
15947
+ materializedSize = responseData.size;
15948
+ } else if (typeof responseData === "string") {
15949
+ materializedSize = typeof TextEncoder2 === "function" ? new TextEncoder2().encode(responseData).byteLength : responseData.length;
15950
+ }
15951
+ }
15952
+ if (typeof materializedSize === "number" && materializedSize > maxContentLength) {
15953
+ throw new AxiosError("maxContentLength size of " + maxContentLength + " exceeded", AxiosError.ERR_BAD_RESPONSE, config, request);
15954
+ }
15955
+ }
15685
15956
  !isStreamResponse && unsubscribe && unsubscribe();
15686
15957
  return await new Promise((resolve, reject) => {
15687
15958
  settle(resolve, reject, {
@@ -15695,6 +15966,13 @@ var require_axios = __commonJS({
15695
15966
  });
15696
15967
  } catch (err) {
15697
15968
  unsubscribe && unsubscribe();
15969
+ if (composedSignal && composedSignal.aborted && composedSignal.reason instanceof AxiosError) {
15970
+ const canceledError = composedSignal.reason;
15971
+ canceledError.config = config;
15972
+ request && (canceledError.request = request);
15973
+ err !== canceledError && (canceledError.cause = err);
15974
+ throw canceledError;
15975
+ }
15698
15976
  if (err && err.name === "TypeError" && /Load failed|fetch/i.test(err.message)) {
15699
15977
  throw Object.assign(new AxiosError("Network Error", AxiosError.ERR_NETWORK, config, request, err && err.response), {
15700
15978
  cause: err.cause || err
@@ -15734,11 +16012,13 @@ var require_axios = __commonJS({
15734
16012
  if (fn) {
15735
16013
  try {
15736
16014
  Object.defineProperty(fn, "name", {
16015
+ __proto__: null,
15737
16016
  value
15738
16017
  });
15739
16018
  } catch (e) {
15740
16019
  }
15741
16020
  Object.defineProperty(fn, "adapterName", {
16021
+ __proto__: null,
15742
16022
  value
15743
16023
  });
15744
16024
  }
@@ -15805,14 +16085,24 @@ var require_axios = __commonJS({
15805
16085
  const adapter = adapters.getAdapter(config.adapter || defaults.adapter, config);
15806
16086
  return adapter(config).then(function onAdapterResolution(response) {
15807
16087
  throwIfCancellationRequested(config);
15808
- response.data = transformData.call(config, config.transformResponse, response);
16088
+ config.response = response;
16089
+ try {
16090
+ response.data = transformData.call(config, config.transformResponse, response);
16091
+ } finally {
16092
+ delete config.response;
16093
+ }
15809
16094
  response.headers = AxiosHeaders.from(response.headers);
15810
16095
  return response;
15811
16096
  }, function onAdapterRejection(reason) {
15812
16097
  if (!isCancel(reason)) {
15813
16098
  throwIfCancellationRequested(config);
15814
16099
  if (reason && reason.response) {
15815
- reason.response.data = transformData.call(config, config.transformResponse, reason.response);
16100
+ config.response = reason.response;
16101
+ try {
16102
+ reason.response.data = transformData.call(config, config.transformResponse, reason.response);
16103
+ } finally {
16104
+ delete config.response;
16105
+ }
15816
16106
  reason.response.headers = AxiosHeaders.from(reason.response.headers);
15817
16107
  }
15818
16108
  }
@@ -15855,7 +16145,7 @@ var require_axios = __commonJS({
15855
16145
  let i = keys.length;
15856
16146
  while (i-- > 0) {
15857
16147
  const opt = keys[i];
15858
- const validator2 = schema[opt];
16148
+ const validator2 = Object.prototype.hasOwnProperty.call(schema, opt) ? schema[opt] : void 0;
15859
16149
  if (validator2) {
15860
16150
  const value = options[opt];
15861
16151
  const result = value === void 0 || validator2(value, opt, options);
@@ -15966,7 +16256,7 @@ var require_axios = __commonJS({
15966
16256
  }, true);
15967
16257
  config.method = (config.method || this.defaults.method || "get").toLowerCase();
15968
16258
  let contextHeaders = headers && utils$1.merge(headers.common, headers[config.method]);
15969
- headers && utils$1.forEach(["delete", "get", "head", "post", "put", "patch", "common"], (method) => {
16259
+ headers && utils$1.forEach(["delete", "get", "head", "post", "put", "patch", "query", "common"], (method) => {
15970
16260
  delete headers[method];
15971
16261
  });
15972
16262
  config.headers = AxiosHeaders.concat(contextHeaders, headers);
@@ -16042,7 +16332,7 @@ var require_axios = __commonJS({
16042
16332
  }));
16043
16333
  };
16044
16334
  });
16045
- utils$1.forEach(["post", "put", "patch"], function forEachMethodWithData(method) {
16335
+ utils$1.forEach(["post", "put", "patch", "query"], function forEachMethodWithData(method) {
16046
16336
  function generateHTTPMethod(isForm) {
16047
16337
  return function httpMethod(url2, data, config) {
16048
16338
  return this.request(mergeConfig(config || {}, {
@@ -16056,7 +16346,9 @@ var require_axios = __commonJS({
16056
16346
  };
16057
16347
  }
16058
16348
  Axios.prototype[method] = generateHTTPMethod();
16059
- Axios.prototype[method + "Form"] = generateHTTPMethod(true);
16349
+ if (method !== "query") {
16350
+ Axios.prototype[method + "Form"] = generateHTTPMethod(true);
16351
+ }
16060
16352
  });
16061
16353
  var CancelToken = class _CancelToken {
16062
16354
  constructor(executor) {
@@ -22520,7 +22812,7 @@ var createDefaultLogger = (executionContext) => {
22520
22812
  return new DefaultLogger(executionContext);
22521
22813
  };
22522
22814
  var SDK_NAME = "@aws/durable-execution-sdk-js";
22523
- var SDK_VERSION = "1.1.1";
22815
+ var SDK_VERSION = "1.1.2";
22524
22816
  var defaultLambdaClient;
22525
22817
  var DurableExecutionApiClient = class {
22526
22818
  client;
@@ -23074,7 +23366,7 @@ mime-types/index.js:
23074
23366
  *)
23075
23367
 
23076
23368
  axios/dist/node/axios.cjs:
23077
- (*! Axios v1.15.1 Copyright (c) 2026 Matt Zabriskie and contributors *)
23369
+ (*! Axios v1.16.0 Copyright (c) 2026 Matt Zabriskie and contributors *)
23078
23370
 
23079
23371
  safe-buffer/index.js:
23080
23372
  (*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)