diff --git a/sdks/node/dist/api.js b/sdks/node/dist/api.js index 4d2a26e77..a7a72f860 100644 --- a/sdks/node/dist/api.js +++ b/sdks/node/dist/api.js @@ -34,7 +34,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru var require_delayed_stream = __commonJS({ "node_modules/delayed-stream/lib/delayed_stream.js"(exports2, module2) { var Stream = require("stream").Stream; - var util3 = require("util"); + var util4 = require("util"); module2.exports = DelayedStream; function DelayedStream() { this.source = null; @@ -45,7 +45,7 @@ var require_delayed_stream = __commonJS({ this._released = false; this._bufferedEvents = []; } - util3.inherits(DelayedStream, Stream); + util4.inherits(DelayedStream, Stream); DelayedStream.create = function(source, options) { var delayedStream = new this(); options = options || {}; @@ -124,7 +124,7 @@ var require_delayed_stream = __commonJS({ // node_modules/combined-stream/lib/combined_stream.js var require_combined_stream = __commonJS({ "node_modules/combined-stream/lib/combined_stream.js"(exports2, module2) { - var util3 = require("util"); + var util4 = require("util"); var Stream = require("stream").Stream; var DelayedStream = require_delayed_stream(); module2.exports = CombinedStream; @@ -140,7 +140,7 @@ var require_combined_stream = __commonJS({ this._insideLoop = false; this._pendingNext = false; } - util3.inherits(CombinedStream, Stream); + util4.inherits(CombinedStream, Stream); CombinedStream.create = function(options) { var combinedStream = new this(); options = options || {}; @@ -8972,9 +8972,9 @@ var require_iterate = __commonJS({ var async = require_async(); var abort = require_abort(); module2.exports = iterate; - function iterate(list, iterator, state, callback) { + function iterate(list, iterator2, state, callback) { var key = state["keyedList"] ? state["keyedList"][state.index] : state.index; - state.jobs[key] = runJob(iterator, key, list[key], function(error, output) { + state.jobs[key] = runJob(iterator2, key, list[key], function(error, output) { if (!(key in state.jobs)) { return; } @@ -8987,12 +8987,12 @@ var require_iterate = __commonJS({ callback(error, state.results); }); } - function runJob(iterator, key, item, callback) { + function runJob(iterator2, key, item, callback) { var aborter; - if (iterator.length == 2) { - aborter = iterator(item, async(callback)); + if (iterator2.length == 2) { + aborter = iterator2(item, async(callback)); } else { - aborter = iterator(item, key, async(callback)); + aborter = iterator2(item, key, async(callback)); } return aborter; } @@ -9045,10 +9045,10 @@ var require_parallel = __commonJS({ var initState = require_state(); var terminator = require_terminator(); module2.exports = parallel; - function parallel(list, iterator, callback) { + function parallel(list, iterator2, callback) { var state = initState(list); while (state.index < (state["keyedList"] || list).length) { - iterate(list, iterator, state, function(error, result) { + iterate(list, iterator2, state, function(error, result) { if (error) { callback(error, result); return; @@ -9074,16 +9074,16 @@ var require_serialOrdered = __commonJS({ module2.exports = serialOrdered; module2.exports.ascending = ascending; module2.exports.descending = descending; - function serialOrdered(list, iterator, sortMethod, callback) { + function serialOrdered(list, iterator2, sortMethod, callback) { var state = initState(list, sortMethod); - iterate(list, iterator, state, function iteratorHandler(error, result) { + iterate(list, iterator2, state, function iteratorHandler(error, result) { if (error) { callback(error, result); return; } state.index++; if (state.index < (state["keyedList"] || list).length) { - iterate(list, iterator, state, iteratorHandler); + iterate(list, iterator2, state, iteratorHandler); return; } callback(null, state.results); @@ -9104,8 +9104,8 @@ var require_serial = __commonJS({ "node_modules/asynckit/serial.js"(exports2, module2) { var serialOrdered = require_serialOrdered(); module2.exports = serial; - function serial(list, iterator, callback) { - return serialOrdered(list, iterator, null, callback); + function serial(list, iterator2, callback) { + return serialOrdered(list, iterator2, null, callback); } } }); @@ -9121,2869 +9121,3332 @@ var require_asynckit = __commonJS({ } }); -// node_modules/form-data/lib/populate.js -var require_populate = __commonJS({ - "node_modules/form-data/lib/populate.js"(exports2, module2) { - module2.exports = function(dst, src) { - Object.keys(src).forEach(function(prop) { - dst[prop] = dst[prop] || src[prop]; - }); - return dst; +// node_modules/es-object-atoms/index.js +var require_es_object_atoms = __commonJS({ + "node_modules/es-object-atoms/index.js"(exports2, module2) { + "use strict"; + module2.exports = Object; + } +}); + +// node_modules/es-errors/index.js +var require_es_errors = __commonJS({ + "node_modules/es-errors/index.js"(exports2, module2) { + "use strict"; + module2.exports = Error; + } +}); + +// node_modules/es-errors/eval.js +var require_eval = __commonJS({ + "node_modules/es-errors/eval.js"(exports2, module2) { + "use strict"; + module2.exports = EvalError; + } +}); + +// node_modules/es-errors/range.js +var require_range = __commonJS({ + "node_modules/es-errors/range.js"(exports2, module2) { + "use strict"; + module2.exports = RangeError; + } +}); + +// node_modules/es-errors/ref.js +var require_ref = __commonJS({ + "node_modules/es-errors/ref.js"(exports2, module2) { + "use strict"; + module2.exports = ReferenceError; + } +}); + +// node_modules/es-errors/syntax.js +var require_syntax = __commonJS({ + "node_modules/es-errors/syntax.js"(exports2, module2) { + "use strict"; + module2.exports = SyntaxError; + } +}); + +// node_modules/es-errors/type.js +var require_type = __commonJS({ + "node_modules/es-errors/type.js"(exports2, module2) { + "use strict"; + module2.exports = TypeError; + } +}); + +// node_modules/es-errors/uri.js +var require_uri = __commonJS({ + "node_modules/es-errors/uri.js"(exports2, module2) { + "use strict"; + module2.exports = URIError; + } +}); + +// node_modules/math-intrinsics/abs.js +var require_abs = __commonJS({ + "node_modules/math-intrinsics/abs.js"(exports2, module2) { + "use strict"; + module2.exports = Math.abs; + } +}); + +// node_modules/math-intrinsics/floor.js +var require_floor = __commonJS({ + "node_modules/math-intrinsics/floor.js"(exports2, module2) { + "use strict"; + module2.exports = Math.floor; + } +}); + +// node_modules/math-intrinsics/max.js +var require_max = __commonJS({ + "node_modules/math-intrinsics/max.js"(exports2, module2) { + "use strict"; + module2.exports = Math.max; + } +}); + +// node_modules/math-intrinsics/min.js +var require_min = __commonJS({ + "node_modules/math-intrinsics/min.js"(exports2, module2) { + "use strict"; + module2.exports = Math.min; + } +}); + +// node_modules/math-intrinsics/pow.js +var require_pow = __commonJS({ + "node_modules/math-intrinsics/pow.js"(exports2, module2) { + "use strict"; + module2.exports = Math.pow; + } +}); + +// node_modules/math-intrinsics/round.js +var require_round = __commonJS({ + "node_modules/math-intrinsics/round.js"(exports2, module2) { + "use strict"; + module2.exports = Math.round; + } +}); + +// node_modules/math-intrinsics/isNaN.js +var require_isNaN = __commonJS({ + "node_modules/math-intrinsics/isNaN.js"(exports2, module2) { + "use strict"; + module2.exports = Number.isNaN || function isNaN2(a) { + return a !== a; }; } }); -// node_modules/form-data/lib/form_data.js -var require_form_data = __commonJS({ - "node_modules/form-data/lib/form_data.js"(exports2, module2) { - var CombinedStream = require_combined_stream(); - var util3 = require("util"); - var path = require("path"); - var http2 = require("http"); - var https2 = require("https"); - var parseUrl = require("url").parse; - var fs = require("fs"); - var Stream = require("stream").Stream; - var mime = require_mime_types(); - var asynckit = require_asynckit(); - var populate = require_populate(); - module2.exports = FormData3; - util3.inherits(FormData3, CombinedStream); - function FormData3(options) { - if (!(this instanceof FormData3)) { - return new FormData3(options); +// node_modules/math-intrinsics/sign.js +var require_sign = __commonJS({ + "node_modules/math-intrinsics/sign.js"(exports2, module2) { + "use strict"; + var $isNaN = require_isNaN(); + module2.exports = function sign(number) { + if ($isNaN(number) || number === 0) { + return number; } - this._overheadLength = 0; - this._valueLength = 0; - this._valuesToMeasure = []; - CombinedStream.call(this); - options = options || {}; - for (var option in options) { - this[option] = options[option]; + return number < 0 ? -1 : 1; + }; + } +}); + +// node_modules/gopd/gOPD.js +var require_gOPD = __commonJS({ + "node_modules/gopd/gOPD.js"(exports2, module2) { + "use strict"; + module2.exports = Object.getOwnPropertyDescriptor; + } +}); + +// node_modules/gopd/index.js +var require_gopd = __commonJS({ + "node_modules/gopd/index.js"(exports2, module2) { + "use strict"; + var $gOPD = require_gOPD(); + if ($gOPD) { + try { + $gOPD([], "length"); + } catch (e) { + $gOPD = null; } } - FormData3.LINE_BREAK = "\r\n"; - FormData3.DEFAULT_CONTENT_TYPE = "application/octet-stream"; - FormData3.prototype.append = function(field, value, options) { - options = options || {}; - if (typeof options == "string") { - options = { filename: options }; + module2.exports = $gOPD; + } +}); + +// node_modules/es-define-property/index.js +var require_es_define_property = __commonJS({ + "node_modules/es-define-property/index.js"(exports2, module2) { + "use strict"; + var $defineProperty = Object.defineProperty || false; + if ($defineProperty) { + try { + $defineProperty({}, "a", { value: 1 }); + } catch (e) { + $defineProperty = false; } - var append2 = CombinedStream.prototype.append.bind(this); - if (typeof value == "number") { - value = "" + value; + } + module2.exports = $defineProperty; + } +}); + +// node_modules/has-symbols/shams.js +var require_shams = __commonJS({ + "node_modules/has-symbols/shams.js"(exports2, module2) { + "use strict"; + module2.exports = function hasSymbols() { + if (typeof Symbol !== "function" || typeof Object.getOwnPropertySymbols !== "function") { + return false; } - if (util3.isArray(value)) { - this._error(new Error("Arrays are not supported.")); - return; + if (typeof Symbol.iterator === "symbol") { + return true; } - var header = this._multiPartHeader(field, value, options); - var footer = this._multiPartFooter(); - append2(header); - append2(value); - append2(footer); - this._trackLength(header, value, options); - }; - FormData3.prototype._trackLength = function(header, value, options) { - var valueLength = 0; - if (options.knownLength != null) { - valueLength += +options.knownLength; - } else if (Buffer.isBuffer(value)) { - valueLength = value.length; - } else if (typeof value === "string") { - valueLength = Buffer.byteLength(value); + var obj = {}; + var sym = Symbol("test"); + var symObj = Object(sym); + if (typeof sym === "string") { + return false; } - this._valueLength += valueLength; - this._overheadLength += Buffer.byteLength(header) + FormData3.LINE_BREAK.length; - if (!value || !value.path && !(value.readable && value.hasOwnProperty("httpVersion")) && !(value instanceof Stream)) { - return; + if (Object.prototype.toString.call(sym) !== "[object Symbol]") { + return false; } - if (!options.knownLength) { - this._valuesToMeasure.push(value); + if (Object.prototype.toString.call(symObj) !== "[object Symbol]") { + return false; } - }; - FormData3.prototype._lengthRetriever = function(value, callback) { - if (value.hasOwnProperty("fd")) { - if (value.end != void 0 && value.end != Infinity && value.start != void 0) { - callback(null, value.end + 1 - (value.start ? value.start : 0)); - } else { - fs.stat(value.path, function(err, stat) { - var fileSize; - if (err) { - callback(err); - return; - } - fileSize = stat.size - (value.start ? value.start : 0); - callback(null, fileSize); - }); - } - } else if (value.hasOwnProperty("httpVersion")) { - callback(null, +value.headers["content-length"]); - } else if (value.hasOwnProperty("httpModule")) { - value.on("response", function(response) { - value.pause(); - callback(null, +response.headers["content-length"]); - }); - value.resume(); - } else { - callback("Unknown stream"); + var symVal = 42; + obj[sym] = symVal; + for (var _ in obj) { + return false; } - }; - FormData3.prototype._multiPartHeader = function(field, value, options) { - if (typeof options.header == "string") { - return options.header; + if (typeof Object.keys === "function" && Object.keys(obj).length !== 0) { + return false; } - var contentDisposition = this._getContentDisposition(value, options); - var contentType = this._getContentType(value, options); - var contents = ""; - var headers = { - // add custom disposition as third element or keep it two elements if not - "Content-Disposition": ["form-data", 'name="' + field + '"'].concat(contentDisposition || []), - // if no content type. allow it to be empty array - "Content-Type": [].concat(contentType || []) - }; - if (typeof options.header == "object") { - populate(headers, options.header); + if (typeof Object.getOwnPropertyNames === "function" && Object.getOwnPropertyNames(obj).length !== 0) { + return false; } - var header; - for (var prop in headers) { - if (!headers.hasOwnProperty(prop)) continue; - header = headers[prop]; - if (header == null) { - continue; - } - if (!Array.isArray(header)) { - header = [header]; - } - if (header.length) { - contents += prop + ": " + header.join("; ") + FormData3.LINE_BREAK; - } + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { + return false; } - return "--" + this.getBoundary() + FormData3.LINE_BREAK + contents + FormData3.LINE_BREAK; - }; - FormData3.prototype._getContentDisposition = function(value, options) { - var filename, contentDisposition; - if (typeof options.filepath === "string") { - filename = path.normalize(options.filepath).replace(/\\/g, "/"); - } else if (options.filename || value.name || value.path) { - filename = path.basename(options.filename || value.name || value.path); - } else if (value.readable && value.hasOwnProperty("httpVersion")) { - filename = path.basename(value.client._httpMessage.path || ""); + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { + return false; } - if (filename) { - contentDisposition = 'filename="' + filename + '"'; + if (typeof Object.getOwnPropertyDescriptor === "function") { + var descriptor = ( + /** @type {PropertyDescriptor} */ + Object.getOwnPropertyDescriptor(obj, sym) + ); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { + return false; + } } - return contentDisposition; + return true; }; - FormData3.prototype._getContentType = function(value, options) { - var contentType = options.contentType; - if (!contentType && value.name) { - contentType = mime.lookup(value.name); - } - if (!contentType && value.path) { - contentType = mime.lookup(value.path); - } - if (!contentType && value.readable && value.hasOwnProperty("httpVersion")) { - contentType = value.headers["content-type"]; + } +}); + +// node_modules/has-symbols/index.js +var require_has_symbols = __commonJS({ + "node_modules/has-symbols/index.js"(exports2, module2) { + "use strict"; + var origSymbol = typeof Symbol !== "undefined" && Symbol; + var hasSymbolSham = require_shams(); + module2.exports = function hasNativeSymbols() { + if (typeof origSymbol !== "function") { + return false; } - if (!contentType && (options.filepath || options.filename)) { - contentType = mime.lookup(options.filepath || options.filename); + if (typeof Symbol !== "function") { + return false; } - if (!contentType && typeof value == "object") { - contentType = FormData3.DEFAULT_CONTENT_TYPE; + if (typeof origSymbol("foo") !== "symbol") { + return false; } - return contentType; - }; - FormData3.prototype._multiPartFooter = function() { - return function(next) { - var footer = FormData3.LINE_BREAK; - var lastPart = this._streams.length === 0; - if (lastPart) { - footer += this._lastBoundary(); - } - next(footer); - }.bind(this); - }; - FormData3.prototype._lastBoundary = function() { - return "--" + this.getBoundary() + "--" + FormData3.LINE_BREAK; - }; - FormData3.prototype.getHeaders = function(userHeaders) { - var header; - var formHeaders = { - "content-type": "multipart/form-data; boundary=" + this.getBoundary() - }; - for (header in userHeaders) { - if (userHeaders.hasOwnProperty(header)) { - formHeaders[header.toLowerCase()] = userHeaders[header]; - } + if (typeof Symbol("bar") !== "symbol") { + return false; } - return formHeaders; - }; - FormData3.prototype.setBoundary = function(boundary) { - this._boundary = boundary; + return hasSymbolSham(); }; - FormData3.prototype.getBoundary = function() { - if (!this._boundary) { - this._generateBoundary(); + } +}); + +// node_modules/get-proto/Reflect.getPrototypeOf.js +var require_Reflect_getPrototypeOf = __commonJS({ + "node_modules/get-proto/Reflect.getPrototypeOf.js"(exports2, module2) { + "use strict"; + module2.exports = typeof Reflect !== "undefined" && Reflect.getPrototypeOf || null; + } +}); + +// node_modules/get-proto/Object.getPrototypeOf.js +var require_Object_getPrototypeOf = __commonJS({ + "node_modules/get-proto/Object.getPrototypeOf.js"(exports2, module2) { + "use strict"; + var $Object = require_es_object_atoms(); + module2.exports = $Object.getPrototypeOf || null; + } +}); + +// node_modules/function-bind/implementation.js +var require_implementation = __commonJS({ + "node_modules/function-bind/implementation.js"(exports2, module2) { + "use strict"; + var ERROR_MESSAGE = "Function.prototype.bind called on incompatible "; + var toStr = Object.prototype.toString; + var max = Math.max; + var funcType = "[object Function]"; + var concatty = function concatty2(a, b) { + var arr = []; + for (var i = 0; i < a.length; i += 1) { + arr[i] = a[i]; } - return this._boundary; - }; - FormData3.prototype.getBuffer = function() { - var dataBuffer = new Buffer.alloc(0); - var boundary = this.getBoundary(); - for (var i = 0, len = this._streams.length; i < len; i++) { - if (typeof this._streams[i] !== "function") { - if (Buffer.isBuffer(this._streams[i])) { - dataBuffer = Buffer.concat([dataBuffer, this._streams[i]]); - } else { - dataBuffer = Buffer.concat([dataBuffer, Buffer.from(this._streams[i])]); - } - if (typeof this._streams[i] !== "string" || this._streams[i].substring(2, boundary.length + 2) !== boundary) { - dataBuffer = Buffer.concat([dataBuffer, Buffer.from(FormData3.LINE_BREAK)]); - } - } + for (var j = 0; j < b.length; j += 1) { + arr[j + a.length] = b[j]; } - return Buffer.concat([dataBuffer, Buffer.from(this._lastBoundary())]); + return arr; }; - FormData3.prototype._generateBoundary = function() { - var boundary = "--------------------------"; - for (var i = 0; i < 24; i++) { - boundary += Math.floor(Math.random() * 10).toString(16); + var slicy = function slicy2(arrLike, offset) { + var arr = []; + for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { + arr[j] = arrLike[i]; } - this._boundary = boundary; + return arr; }; - FormData3.prototype.getLengthSync = function() { - var knownLength = this._overheadLength + this._valueLength; - if (this._streams.length) { - knownLength += this._lastBoundary().length; - } - if (!this.hasKnownLength()) { - this._error(new Error("Cannot calculate proper length in synchronous way.")); + var joiny = function(arr, joiner) { + var str = ""; + for (var i = 0; i < arr.length; i += 1) { + str += arr[i]; + if (i + 1 < arr.length) { + str += joiner; + } } - return knownLength; + return str; }; - FormData3.prototype.hasKnownLength = function() { - var hasKnownLength = true; - if (this._valuesToMeasure.length) { - hasKnownLength = false; + module2.exports = function bind2(that) { + var target = this; + if (typeof target !== "function" || toStr.apply(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); } - return hasKnownLength; - }; - FormData3.prototype.getLength = function(cb) { - var knownLength = this._overheadLength + this._valueLength; - if (this._streams.length) { - knownLength += this._lastBoundary().length; + var args = slicy(arguments, 1); + var bound; + var binder = function() { + if (this instanceof bound) { + var result = target.apply( + this, + concatty(args, arguments) + ); + if (Object(result) === result) { + return result; + } + return this; + } + return target.apply( + that, + concatty(args, arguments) + ); + }; + var boundLength = max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs[i] = "$" + i; } - if (!this._valuesToMeasure.length) { - process.nextTick(cb.bind(this, null, knownLength)); - return; + bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder); + if (target.prototype) { + var Empty = function Empty2() { + }; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; } - asynckit.parallel(this._valuesToMeasure, this._lengthRetriever, function(err, values) { - if (err) { - cb(err); - return; - } - values.forEach(function(length) { - knownLength += length; - }); - cb(null, knownLength); - }); + return bound; }; - FormData3.prototype.submit = function(params, cb) { - var request, options, defaults2 = { method: "post" }; - if (typeof params == "string") { - params = parseUrl(params); - options = populate({ - port: params.port, - path: params.pathname, - host: params.hostname, - protocol: params.protocol - }, defaults2); - } else { - options = populate(params, defaults2); - if (!options.port) { - options.port = options.protocol == "https:" ? 443 : 80; - } - } - options.headers = this.getHeaders(params.headers); - if (options.protocol == "https:") { - request = https2.request(options); - } else { - request = http2.request(options); - } - this.getLength(function(err, length) { - if (err && err !== "Unknown stream") { - this._error(err); - return; - } - if (length) { - request.setHeader("Content-Length", length); - } - this.pipe(request); - if (cb) { - var onResponse; - var callback = function(error, responce) { - request.removeListener("error", callback); - request.removeListener("response", onResponse); - return cb.call(this, error, responce); - }; - onResponse = callback.bind(this, null); - request.on("error", callback); - request.on("response", onResponse); - } - }.bind(this)); - return request; - }; - FormData3.prototype._error = function(err) { - if (!this.error) { - this.error = err; - this.pause(); - this.emit("error", err); + } +}); + +// node_modules/function-bind/index.js +var require_function_bind = __commonJS({ + "node_modules/function-bind/index.js"(exports2, module2) { + "use strict"; + var implementation = require_implementation(); + module2.exports = Function.prototype.bind || implementation; + } +}); + +// node_modules/call-bind-apply-helpers/functionCall.js +var require_functionCall = __commonJS({ + "node_modules/call-bind-apply-helpers/functionCall.js"(exports2, module2) { + "use strict"; + module2.exports = Function.prototype.call; + } +}); + +// node_modules/call-bind-apply-helpers/functionApply.js +var require_functionApply = __commonJS({ + "node_modules/call-bind-apply-helpers/functionApply.js"(exports2, module2) { + "use strict"; + module2.exports = Function.prototype.apply; + } +}); + +// node_modules/call-bind-apply-helpers/reflectApply.js +var require_reflectApply = __commonJS({ + "node_modules/call-bind-apply-helpers/reflectApply.js"(exports2, module2) { + "use strict"; + module2.exports = typeof Reflect !== "undefined" && Reflect && Reflect.apply; + } +}); + +// node_modules/call-bind-apply-helpers/actualApply.js +var require_actualApply = __commonJS({ + "node_modules/call-bind-apply-helpers/actualApply.js"(exports2, module2) { + "use strict"; + var bind2 = require_function_bind(); + var $apply = require_functionApply(); + var $call = require_functionCall(); + var $reflectApply = require_reflectApply(); + module2.exports = $reflectApply || bind2.call($call, $apply); + } +}); + +// node_modules/call-bind-apply-helpers/index.js +var require_call_bind_apply_helpers = __commonJS({ + "node_modules/call-bind-apply-helpers/index.js"(exports2, module2) { + "use strict"; + var bind2 = require_function_bind(); + var $TypeError = require_type(); + var $call = require_functionCall(); + var $actualApply = require_actualApply(); + module2.exports = function callBindBasic(args) { + if (args.length < 1 || typeof args[0] !== "function") { + throw new $TypeError("a function is required"); } - }; - FormData3.prototype.toString = function() { - return "[object FormData]"; + return $actualApply(bind2, $call, args); }; } }); -// node_modules/proxy-from-env/index.js -var require_proxy_from_env = __commonJS({ - "node_modules/proxy-from-env/index.js"(exports2) { +// node_modules/dunder-proto/get.js +var require_get = __commonJS({ + "node_modules/dunder-proto/get.js"(exports2, module2) { "use strict"; - var parseUrl = require("url").parse; - var DEFAULT_PORTS = { - ftp: 21, - gopher: 70, - http: 80, - https: 443, - ws: 80, - wss: 443 - }; - var stringEndsWith = String.prototype.endsWith || function(s) { - return s.length <= this.length && this.indexOf(s, this.length - s.length) !== -1; - }; - function getProxyForUrl(url2) { - var parsedUrl = typeof url2 === "string" ? parseUrl(url2) : url2 || {}; - var proto = parsedUrl.protocol; - var hostname = parsedUrl.host; - var port = parsedUrl.port; - if (typeof hostname !== "string" || !hostname || typeof proto !== "string") { - return ""; - } - proto = proto.split(":", 1)[0]; - hostname = hostname.replace(/:\d*$/, ""); - port = parseInt(port) || DEFAULT_PORTS[proto] || 0; - if (!shouldProxy(hostname, port)) { - return ""; - } - var proxy = getEnv("npm_config_" + proto + "_proxy") || getEnv(proto + "_proxy") || getEnv("npm_config_proxy") || getEnv("all_proxy"); - if (proxy && proxy.indexOf("://") === -1) { - proxy = proto + "://" + proxy; + var callBind = require_call_bind_apply_helpers(); + var gOPD = require_gopd(); + var hasProtoAccessor; + try { + hasProtoAccessor = /** @type {{ __proto__?: typeof Array.prototype }} */ + [].__proto__ === Array.prototype; + } catch (e) { + if (!e || typeof e !== "object" || !("code" in e) || e.code !== "ERR_PROTO_ACCESS") { + throw e; } - return proxy; } - function shouldProxy(hostname, port) { - var NO_PROXY = (getEnv("npm_config_no_proxy") || getEnv("no_proxy")).toLowerCase(); - if (!NO_PROXY) { - return true; + var desc = !!hasProtoAccessor && gOPD && gOPD( + Object.prototype, + /** @type {keyof typeof Object.prototype} */ + "__proto__" + ); + var $Object = Object; + var $getPrototypeOf = $Object.getPrototypeOf; + module2.exports = desc && typeof desc.get === "function" ? callBind([desc.get]) : typeof $getPrototypeOf === "function" ? ( + /** @type {import('./get')} */ + function getDunder(value) { + return $getPrototypeOf(value == null ? value : $Object(value)); } - if (NO_PROXY === "*") { - return false; + ) : false; + } +}); + +// node_modules/get-proto/index.js +var require_get_proto = __commonJS({ + "node_modules/get-proto/index.js"(exports2, module2) { + "use strict"; + var reflectGetProto = require_Reflect_getPrototypeOf(); + var originalGetProto = require_Object_getPrototypeOf(); + var getDunderProto = require_get(); + module2.exports = reflectGetProto ? function getProto(O) { + return reflectGetProto(O); + } : originalGetProto ? function getProto(O) { + if (!O || typeof O !== "object" && typeof O !== "function") { + throw new TypeError("getProto: not an object"); } - return NO_PROXY.split(/[,\s]/).every(function(proxy) { - if (!proxy) { - return true; - } - var parsedProxy = proxy.match(/^(.+):(\d+)$/); - var parsedProxyHostname = parsedProxy ? parsedProxy[1] : proxy; - var parsedProxyPort = parsedProxy ? parseInt(parsedProxy[2]) : 0; - if (parsedProxyPort && parsedProxyPort !== port) { - return true; - } - if (!/^[.*]/.test(parsedProxyHostname)) { - return hostname !== parsedProxyHostname; - } - if (parsedProxyHostname.charAt(0) === "*") { - parsedProxyHostname = parsedProxyHostname.slice(1); - } - return !stringEndsWith.call(hostname, parsedProxyHostname); - }); - } - function getEnv(key) { - return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || ""; - } - exports2.getProxyForUrl = getProxyForUrl; + return originalGetProto(O); + } : getDunderProto ? function getProto(O) { + return getDunderProto(O); + } : null; } }); -// node_modules/ms/index.js -var require_ms = __commonJS({ - "node_modules/ms/index.js"(exports2, module2) { - var s = 1e3; - var m = s * 60; - var h = m * 60; - var d = h * 24; - var w = d * 7; - var y = d * 365.25; - module2.exports = function(val, options) { - options = options || {}; - var type = typeof val; - if (type === "string" && val.length > 0) { - return parse(val); - } else if (type === "number" && isFinite(val)) { - return options.long ? fmtLong(val) : fmtShort(val); +// node_modules/hasown/index.js +var require_hasown = __commonJS({ + "node_modules/hasown/index.js"(exports2, module2) { + "use strict"; + var call = Function.prototype.call; + var $hasOwn = Object.prototype.hasOwnProperty; + var bind2 = require_function_bind(); + module2.exports = bind2.call(call, $hasOwn); + } +}); + +// node_modules/get-intrinsic/index.js +var require_get_intrinsic = __commonJS({ + "node_modules/get-intrinsic/index.js"(exports2, module2) { + "use strict"; + var undefined2; + var $Object = require_es_object_atoms(); + var $Error = require_es_errors(); + var $EvalError = require_eval(); + var $RangeError = require_range(); + var $ReferenceError = require_ref(); + var $SyntaxError = require_syntax(); + var $TypeError = require_type(); + var $URIError = require_uri(); + var abs = require_abs(); + var floor = require_floor(); + var max = require_max(); + var min = require_min(); + var pow = require_pow(); + var round = require_round(); + var sign = require_sign(); + var $Function = Function; + var getEvalledConstructor = function(expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ").constructor;")(); + } catch (e) { } - throw new Error( - "val is not a non-empty string or a valid number. val=" + JSON.stringify(val) - ); }; - function parse(str) { - str = String(str); - if (str.length > 100) { - return; - } - var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec( - str - ); - if (!match) { - return; + var $gOPD = require_gopd(); + var $defineProperty = require_es_define_property(); + var throwTypeError = function() { + throw new $TypeError(); + }; + var ThrowTypeError = $gOPD ? function() { + try { + arguments.callee; + return throwTypeError; + } catch (calleeThrows) { + try { + return $gOPD(arguments, "callee").get; + } catch (gOPDthrows) { + return throwTypeError; + } } - var n = parseFloat(match[1]); - var type = (match[2] || "ms").toLowerCase(); - switch (type) { - case "years": - case "year": - case "yrs": - case "yr": - case "y": - return n * y; - case "weeks": - case "week": - case "w": - return n * w; - case "days": - case "day": - case "d": - return n * d; - case "hours": - case "hour": - case "hrs": - case "hr": - case "h": - return n * h; - case "minutes": - case "minute": - case "mins": - case "min": - case "m": - return n * m; - case "seconds": - case "second": - case "secs": - case "sec": - case "s": - return n * s; - case "milliseconds": - case "millisecond": - case "msecs": - case "msec": - case "ms": - return n; - default: - return void 0; + }() : throwTypeError; + var hasSymbols = require_has_symbols()(); + var getProto = require_get_proto(); + var $ObjectGPO = require_Object_getPrototypeOf(); + var $ReflectGPO = require_Reflect_getPrototypeOf(); + var $apply = require_functionApply(); + var $call = require_functionCall(); + var needsEval = {}; + var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined2 : getProto(Uint8Array); + var INTRINSICS = { + __proto__: null, + "%AggregateError%": typeof AggregateError === "undefined" ? undefined2 : AggregateError, + "%Array%": Array, + "%ArrayBuffer%": typeof ArrayBuffer === "undefined" ? undefined2 : ArrayBuffer, + "%ArrayIteratorPrototype%": hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined2, + "%AsyncFromSyncIteratorPrototype%": undefined2, + "%AsyncFunction%": needsEval, + "%AsyncGenerator%": needsEval, + "%AsyncGeneratorFunction%": needsEval, + "%AsyncIteratorPrototype%": needsEval, + "%Atomics%": typeof Atomics === "undefined" ? undefined2 : Atomics, + "%BigInt%": typeof BigInt === "undefined" ? undefined2 : BigInt, + "%BigInt64Array%": typeof BigInt64Array === "undefined" ? undefined2 : BigInt64Array, + "%BigUint64Array%": typeof BigUint64Array === "undefined" ? undefined2 : BigUint64Array, + "%Boolean%": Boolean, + "%DataView%": typeof DataView === "undefined" ? undefined2 : DataView, + "%Date%": Date, + "%decodeURI%": decodeURI, + "%decodeURIComponent%": decodeURIComponent, + "%encodeURI%": encodeURI, + "%encodeURIComponent%": encodeURIComponent, + "%Error%": $Error, + "%eval%": eval, + // eslint-disable-line no-eval + "%EvalError%": $EvalError, + "%Float16Array%": typeof Float16Array === "undefined" ? undefined2 : Float16Array, + "%Float32Array%": typeof Float32Array === "undefined" ? undefined2 : Float32Array, + "%Float64Array%": typeof Float64Array === "undefined" ? undefined2 : Float64Array, + "%FinalizationRegistry%": typeof FinalizationRegistry === "undefined" ? undefined2 : FinalizationRegistry, + "%Function%": $Function, + "%GeneratorFunction%": needsEval, + "%Int8Array%": typeof Int8Array === "undefined" ? undefined2 : Int8Array, + "%Int16Array%": typeof Int16Array === "undefined" ? undefined2 : Int16Array, + "%Int32Array%": typeof Int32Array === "undefined" ? undefined2 : Int32Array, + "%isFinite%": isFinite, + "%isNaN%": isNaN, + "%IteratorPrototype%": hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined2, + "%JSON%": typeof JSON === "object" ? JSON : undefined2, + "%Map%": typeof Map === "undefined" ? undefined2 : Map, + "%MapIteratorPrototype%": typeof Map === "undefined" || !hasSymbols || !getProto ? undefined2 : getProto((/* @__PURE__ */ new Map())[Symbol.iterator]()), + "%Math%": Math, + "%Number%": Number, + "%Object%": $Object, + "%Object.getOwnPropertyDescriptor%": $gOPD, + "%parseFloat%": parseFloat, + "%parseInt%": parseInt, + "%Promise%": typeof Promise === "undefined" ? undefined2 : Promise, + "%Proxy%": typeof Proxy === "undefined" ? undefined2 : Proxy, + "%RangeError%": $RangeError, + "%ReferenceError%": $ReferenceError, + "%Reflect%": typeof Reflect === "undefined" ? undefined2 : Reflect, + "%RegExp%": RegExp, + "%Set%": typeof Set === "undefined" ? undefined2 : Set, + "%SetIteratorPrototype%": typeof Set === "undefined" || !hasSymbols || !getProto ? undefined2 : getProto((/* @__PURE__ */ new Set())[Symbol.iterator]()), + "%SharedArrayBuffer%": typeof SharedArrayBuffer === "undefined" ? undefined2 : SharedArrayBuffer, + "%String%": String, + "%StringIteratorPrototype%": hasSymbols && getProto ? getProto(""[Symbol.iterator]()) : undefined2, + "%Symbol%": hasSymbols ? Symbol : undefined2, + "%SyntaxError%": $SyntaxError, + "%ThrowTypeError%": ThrowTypeError, + "%TypedArray%": TypedArray, + "%TypeError%": $TypeError, + "%Uint8Array%": typeof Uint8Array === "undefined" ? undefined2 : Uint8Array, + "%Uint8ClampedArray%": typeof Uint8ClampedArray === "undefined" ? undefined2 : Uint8ClampedArray, + "%Uint16Array%": typeof Uint16Array === "undefined" ? undefined2 : Uint16Array, + "%Uint32Array%": typeof Uint32Array === "undefined" ? undefined2 : Uint32Array, + "%URIError%": $URIError, + "%WeakMap%": typeof WeakMap === "undefined" ? undefined2 : WeakMap, + "%WeakRef%": typeof WeakRef === "undefined" ? undefined2 : WeakRef, + "%WeakSet%": typeof WeakSet === "undefined" ? undefined2 : WeakSet, + "%Function.prototype.call%": $call, + "%Function.prototype.apply%": $apply, + "%Object.defineProperty%": $defineProperty, + "%Object.getPrototypeOf%": $ObjectGPO, + "%Math.abs%": abs, + "%Math.floor%": floor, + "%Math.max%": max, + "%Math.min%": min, + "%Math.pow%": pow, + "%Math.round%": round, + "%Math.sign%": sign, + "%Reflect.getPrototypeOf%": $ReflectGPO + }; + if (getProto) { + try { + null.error; + } catch (e) { + errorProto = getProto(getProto(e)); + INTRINSICS["%Error.prototype%"] = errorProto; } } - function fmtShort(ms) { - var msAbs = Math.abs(ms); - if (msAbs >= d) { - return Math.round(ms / d) + "d"; - } - if (msAbs >= h) { - return Math.round(ms / h) + "h"; + var errorProto; + var doEval = function doEval2(name) { + var value; + if (name === "%AsyncFunction%") { + value = getEvalledConstructor("async function () {}"); + } else if (name === "%GeneratorFunction%") { + value = getEvalledConstructor("function* () {}"); + } else if (name === "%AsyncGeneratorFunction%") { + value = getEvalledConstructor("async function* () {}"); + } else if (name === "%AsyncGenerator%") { + var fn = doEval2("%AsyncGeneratorFunction%"); + if (fn) { + value = fn.prototype; + } + } else if (name === "%AsyncIteratorPrototype%") { + var gen = doEval2("%AsyncGenerator%"); + if (gen && getProto) { + value = getProto(gen.prototype); + } } - if (msAbs >= m) { - return Math.round(ms / m) + "m"; + INTRINSICS[name] = value; + return value; + }; + var LEGACY_ALIASES = { + __proto__: null, + "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"], + "%ArrayPrototype%": ["Array", "prototype"], + "%ArrayProto_entries%": ["Array", "prototype", "entries"], + "%ArrayProto_forEach%": ["Array", "prototype", "forEach"], + "%ArrayProto_keys%": ["Array", "prototype", "keys"], + "%ArrayProto_values%": ["Array", "prototype", "values"], + "%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"], + "%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"], + "%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"], + "%BooleanPrototype%": ["Boolean", "prototype"], + "%DataViewPrototype%": ["DataView", "prototype"], + "%DatePrototype%": ["Date", "prototype"], + "%ErrorPrototype%": ["Error", "prototype"], + "%EvalErrorPrototype%": ["EvalError", "prototype"], + "%Float32ArrayPrototype%": ["Float32Array", "prototype"], + "%Float64ArrayPrototype%": ["Float64Array", "prototype"], + "%FunctionPrototype%": ["Function", "prototype"], + "%Generator%": ["GeneratorFunction", "prototype"], + "%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"], + "%Int8ArrayPrototype%": ["Int8Array", "prototype"], + "%Int16ArrayPrototype%": ["Int16Array", "prototype"], + "%Int32ArrayPrototype%": ["Int32Array", "prototype"], + "%JSONParse%": ["JSON", "parse"], + "%JSONStringify%": ["JSON", "stringify"], + "%MapPrototype%": ["Map", "prototype"], + "%NumberPrototype%": ["Number", "prototype"], + "%ObjectPrototype%": ["Object", "prototype"], + "%ObjProto_toString%": ["Object", "prototype", "toString"], + "%ObjProto_valueOf%": ["Object", "prototype", "valueOf"], + "%PromisePrototype%": ["Promise", "prototype"], + "%PromiseProto_then%": ["Promise", "prototype", "then"], + "%Promise_all%": ["Promise", "all"], + "%Promise_reject%": ["Promise", "reject"], + "%Promise_resolve%": ["Promise", "resolve"], + "%RangeErrorPrototype%": ["RangeError", "prototype"], + "%ReferenceErrorPrototype%": ["ReferenceError", "prototype"], + "%RegExpPrototype%": ["RegExp", "prototype"], + "%SetPrototype%": ["Set", "prototype"], + "%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"], + "%StringPrototype%": ["String", "prototype"], + "%SymbolPrototype%": ["Symbol", "prototype"], + "%SyntaxErrorPrototype%": ["SyntaxError", "prototype"], + "%TypedArrayPrototype%": ["TypedArray", "prototype"], + "%TypeErrorPrototype%": ["TypeError", "prototype"], + "%Uint8ArrayPrototype%": ["Uint8Array", "prototype"], + "%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"], + "%Uint16ArrayPrototype%": ["Uint16Array", "prototype"], + "%Uint32ArrayPrototype%": ["Uint32Array", "prototype"], + "%URIErrorPrototype%": ["URIError", "prototype"], + "%WeakMapPrototype%": ["WeakMap", "prototype"], + "%WeakSetPrototype%": ["WeakSet", "prototype"] + }; + var bind2 = require_function_bind(); + var hasOwn = require_hasown(); + var $concat = bind2.call($call, Array.prototype.concat); + var $spliceApply = bind2.call($apply, Array.prototype.splice); + var $replace = bind2.call($call, String.prototype.replace); + var $strSlice = bind2.call($call, String.prototype.slice); + var $exec = bind2.call($call, RegExp.prototype.exec); + var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; + var reEscapeChar = /\\(\\)?/g; + var stringToPath = function stringToPath2(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === "%" && last !== "%") { + throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`"); + } else if (last === "%" && first !== "%") { + throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`"); } - if (msAbs >= s) { - return Math.round(ms / s) + "s"; + var result = []; + $replace(string, rePropName, function(match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, "$1") : number || match; + }); + return result; + }; + var getBaseIntrinsic = function getBaseIntrinsic2(name, allowMissing) { + var intrinsicName = name; + var alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName]; + intrinsicName = "%" + alias[0] + "%"; } - return ms + "ms"; - } - function fmtLong(ms) { - var msAbs = Math.abs(ms); - if (msAbs >= d) { - return plural(ms, msAbs, d, "day"); + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } + if (typeof value === "undefined" && !allowMissing) { + throw new $TypeError("intrinsic " + name + " exists, but is not available. Please file an issue!"); + } + return { + alias, + name: intrinsicName, + value + }; } - if (msAbs >= h) { - return plural(ms, msAbs, h, "hour"); + throw new $SyntaxError("intrinsic " + name + " does not exist!"); + }; + module2.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== "string" || name.length === 0) { + throw new $TypeError("intrinsic name must be a non-empty string"); } - if (msAbs >= m) { - return plural(ms, msAbs, m, "minute"); + if (arguments.length > 1 && typeof allowMissing !== "boolean") { + throw new $TypeError('"allowMissing" argument must be a boolean'); } - if (msAbs >= s) { - return plural(ms, msAbs, s, "second"); + if ($exec(/^%?[^%]*%?$/, name) === null) { + throw new $SyntaxError("`%` may not be present anywhere but at the beginning and end of the intrinsic name"); } - return ms + " ms"; - } - function plural(ms, msAbs, n, name) { - var isPlural = msAbs >= n * 1.5; - return Math.round(ms / n) + " " + name + (isPlural ? "s" : ""); - } - } -}); - -// node_modules/debug/src/common.js -var require_common = __commonJS({ - "node_modules/debug/src/common.js"(exports2, module2) { - function setup(env) { - createDebug.debug = createDebug; - createDebug.default = createDebug; - createDebug.coerce = coerce; - createDebug.disable = disable; - createDebug.enable = enable; - createDebug.enabled = enabled; - createDebug.humanize = require_ms(); - createDebug.destroy = destroy; - Object.keys(env).forEach((key) => { - createDebug[key] = env[key]; - }); - createDebug.names = []; - createDebug.skips = []; - createDebug.formatters = {}; - function selectColor(namespace) { - let hash = 0; - for (let i = 0; i < namespace.length; i++) { - hash = (hash << 5) - hash + namespace.charCodeAt(i); - hash |= 0; - } - return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; + var parts = stringToPath(name); + var intrinsicBaseName = parts.length > 0 ? parts[0] : ""; + var intrinsic = getBaseIntrinsic("%" + intrinsicBaseName + "%", allowMissing); + var intrinsicRealName = intrinsic.name; + var value = intrinsic.value; + var skipFurtherCaching = false; + var alias = intrinsic.alias; + if (alias) { + intrinsicBaseName = alias[0]; + $spliceApply(parts, $concat([0, 1], alias)); } - createDebug.selectColor = selectColor; - function createDebug(namespace) { - let prevTime; - let enableOverride = null; - let namespacesCache; - let enabledCache; - function debug(...args) { - if (!debug.enabled) { - return; - } - const self2 = debug; - const curr = Number(/* @__PURE__ */ new Date()); - const ms = curr - (prevTime || curr); - self2.diff = ms; - self2.prev = prevTime; - self2.curr = curr; - prevTime = curr; - args[0] = createDebug.coerce(args[0]); - if (typeof args[0] !== "string") { - args.unshift("%O"); - } - let index = 0; - args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => { - if (match === "%%") { - return "%"; - } - index++; - const formatter = createDebug.formatters[format]; - if (typeof formatter === "function") { - const val = args[index]; - match = formatter.call(self2, val); - args.splice(index, 1); - index--; - } - return match; - }); - createDebug.formatArgs.call(self2, args); - const logFn = self2.log || createDebug.log; - logFn.apply(self2, args); + for (var i = 1, isOwn = true; i < parts.length; i += 1) { + var part = parts[i]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ((first === '"' || first === "'" || first === "`" || (last === '"' || last === "'" || last === "`")) && first !== last) { + throw new $SyntaxError("property names with quotes must have matching quotes"); } - debug.namespace = namespace; - debug.useColors = createDebug.useColors(); - debug.color = createDebug.selectColor(namespace); - debug.extend = extend2; - debug.destroy = createDebug.destroy; - Object.defineProperty(debug, "enabled", { - enumerable: true, - configurable: false, - get: () => { - if (enableOverride !== null) { - return enableOverride; - } - if (namespacesCache !== createDebug.namespaces) { - namespacesCache = createDebug.namespaces; - enabledCache = createDebug.enabled(namespace); - } - return enabledCache; - }, - set: (v) => { - enableOverride = v; - } - }); - if (typeof createDebug.init === "function") { - createDebug.init(debug); + if (part === "constructor" || !isOwn) { + skipFurtherCaching = true; } - return debug; - } - function extend2(namespace, delimiter) { - const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace); - newDebug.log = this.log; - return newDebug; - } - function enable(namespaces) { - createDebug.save(namespaces); - createDebug.namespaces = namespaces; - createDebug.names = []; - createDebug.skips = []; - let i; - const split = (typeof namespaces === "string" ? namespaces : "").split(/[\s,]+/); - const len = split.length; - for (i = 0; i < len; i++) { - if (!split[i]) { - continue; + intrinsicBaseName += "." + part; + intrinsicRealName = "%" + intrinsicBaseName + "%"; + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName]; + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError("base intrinsic for " + name + " exists, but the property is not available."); + } + return void undefined2; } - namespaces = split[i].replace(/\*/g, ".*?"); - if (namespaces[0] === "-") { - createDebug.skips.push(new RegExp("^" + namespaces.slice(1) + "$")); + if ($gOPD && i + 1 >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc; + if (isOwn && "get" in desc && !("originalValue" in desc.get)) { + value = desc.get; + } else { + value = value[part]; + } } else { - createDebug.names.push(new RegExp("^" + namespaces + "$")); - } - } - } - function disable() { - const namespaces = [ - ...createDebug.names.map(toNamespace), - ...createDebug.skips.map(toNamespace).map((namespace) => "-" + namespace) - ].join(","); - createDebug.enable(""); - return namespaces; - } - function enabled(name) { - if (name[name.length - 1] === "*") { - return true; - } - let i; - let len; - for (i = 0, len = createDebug.skips.length; i < len; i++) { - if (createDebug.skips[i].test(name)) { - return false; + isOwn = hasOwn(value, part); + value = value[part]; } - } - for (i = 0, len = createDebug.names.length; i < len; i++) { - if (createDebug.names[i].test(name)) { - return true; + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value; } } - return false; - } - function toNamespace(regexp) { - return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, "*"); } - function coerce(val) { - if (val instanceof Error) { - return val.stack || val.message; + return value; + }; + } +}); + +// node_modules/has-tostringtag/shams.js +var require_shams2 = __commonJS({ + "node_modules/has-tostringtag/shams.js"(exports2, module2) { + "use strict"; + var hasSymbols = require_shams(); + module2.exports = function hasToStringTagShams() { + return hasSymbols() && !!Symbol.toStringTag; + }; + } +}); + +// node_modules/es-set-tostringtag/index.js +var require_es_set_tostringtag = __commonJS({ + "node_modules/es-set-tostringtag/index.js"(exports2, module2) { + "use strict"; + var GetIntrinsic = require_get_intrinsic(); + var $defineProperty = GetIntrinsic("%Object.defineProperty%", true); + var hasToStringTag = require_shams2()(); + var hasOwn = require_hasown(); + var $TypeError = require_type(); + var toStringTag2 = hasToStringTag ? Symbol.toStringTag : null; + module2.exports = function setToStringTag(object, value) { + var overrideIfSet = arguments.length > 2 && !!arguments[2] && arguments[2].force; + var nonConfigurable = arguments.length > 2 && !!arguments[2] && arguments[2].nonConfigurable; + if (typeof overrideIfSet !== "undefined" && typeof overrideIfSet !== "boolean" || typeof nonConfigurable !== "undefined" && typeof nonConfigurable !== "boolean") { + throw new $TypeError("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans"); + } + if (toStringTag2 && (overrideIfSet || !hasOwn(object, toStringTag2))) { + if ($defineProperty) { + $defineProperty(object, toStringTag2, { + configurable: !nonConfigurable, + enumerable: false, + value, + writable: false + }); + } else { + object[toStringTag2] = value; } - return val; - } - function destroy() { - console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."); } - createDebug.enable(createDebug.load()); - return createDebug; - } - module2.exports = setup; + }; } }); -// node_modules/debug/src/browser.js -var require_browser = __commonJS({ - "node_modules/debug/src/browser.js"(exports2, module2) { - exports2.formatArgs = formatArgs; - exports2.save = save; - exports2.load = load; - exports2.useColors = useColors; - exports2.storage = localstorage(); - exports2.destroy = /* @__PURE__ */ (() => { - let warned = false; - return () => { - if (!warned) { - warned = true; - console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."); - } - }; - })(); - exports2.colors = [ - "#0000CC", - "#0000FF", - "#0033CC", - "#0033FF", - "#0066CC", - "#0066FF", - "#0099CC", - "#0099FF", - "#00CC00", - "#00CC33", - "#00CC66", - "#00CC99", - "#00CCCC", - "#00CCFF", - "#3300CC", - "#3300FF", - "#3333CC", - "#3333FF", - "#3366CC", - "#3366FF", - "#3399CC", - "#3399FF", - "#33CC00", - "#33CC33", - "#33CC66", - "#33CC99", - "#33CCCC", - "#33CCFF", - "#6600CC", - "#6600FF", - "#6633CC", - "#6633FF", - "#66CC00", - "#66CC33", - "#9900CC", - "#9900FF", - "#9933CC", - "#9933FF", - "#99CC00", - "#99CC33", - "#CC0000", - "#CC0033", - "#CC0066", - "#CC0099", - "#CC00CC", - "#CC00FF", - "#CC3300", - "#CC3333", - "#CC3366", - "#CC3399", - "#CC33CC", - "#CC33FF", - "#CC6600", - "#CC6633", - "#CC9900", - "#CC9933", - "#CCCC00", - "#CCCC33", - "#FF0000", - "#FF0033", - "#FF0066", - "#FF0099", - "#FF00CC", - "#FF00FF", - "#FF3300", - "#FF3333", - "#FF3366", - "#FF3399", - "#FF33CC", - "#FF33FF", - "#FF6600", - "#FF6633", - "#FF9900", - "#FF9933", - "#FFCC00", - "#FFCC33" - ]; - function useColors() { - if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) { - return true; - } - if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { - return false; - } - let m; - return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773 - typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31? - // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages - typeof navigator !== "undefined" && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker - typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/); - } - function formatArgs(args) { - args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module2.exports.humanize(this.diff); - if (!this.useColors) { - return; - } - const c = "color: " + this.color; - args.splice(1, 0, c, "color: inherit"); - let index = 0; - let lastC = 0; - args[0].replace(/%[a-zA-Z%]/g, (match) => { - if (match === "%%") { - return; - } - index++; - if (match === "%c") { - lastC = index; - } - }); - args.splice(lastC, 0, c); - } - exports2.log = console.debug || console.log || (() => { - }); - function save(namespaces) { - try { - if (namespaces) { - exports2.storage.setItem("debug", namespaces); - } else { - exports2.storage.removeItem("debug"); - } - } catch (error) { - } - } - function load() { - let r; - try { - r = exports2.storage.getItem("debug"); - } catch (error) { - } - if (!r && typeof process !== "undefined" && "env" in process) { - r = process.env.DEBUG; - } - return r; - } - function localstorage() { - try { - return localStorage; - } catch (error) { - } - } - module2.exports = require_common()(exports2); - var { formatters } = module2.exports; - formatters.j = function(v) { - try { - return JSON.stringify(v); - } catch (error) { - return "[UnexpectedJSONParseError]: " + error.message; - } - }; - } -}); - -// node_modules/has-flag/index.js -var require_has_flag = __commonJS({ - "node_modules/has-flag/index.js"(exports2, module2) { +// node_modules/form-data/lib/populate.js +var require_populate = __commonJS({ + "node_modules/form-data/lib/populate.js"(exports2, module2) { "use strict"; - module2.exports = (flag, argv = process.argv) => { - const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--"; - const position = argv.indexOf(prefix + flag); - const terminatorPosition = argv.indexOf("--"); - return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition); + module2.exports = function(dst, src) { + Object.keys(src).forEach(function(prop) { + dst[prop] = dst[prop] || src[prop]; + }); + return dst; }; } }); -// node_modules/supports-color/index.js -var require_supports_color = __commonJS({ - "node_modules/supports-color/index.js"(exports2, module2) { +// node_modules/form-data/lib/form_data.js +var require_form_data = __commonJS({ + "node_modules/form-data/lib/form_data.js"(exports2, module2) { "use strict"; - var os = require("os"); - var tty = require("tty"); - var hasFlag = require_has_flag(); - var { env } = process; - var forceColor; - if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) { - forceColor = 0; - } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) { - forceColor = 1; + var CombinedStream = require_combined_stream(); + var util4 = require("util"); + var path = require("path"); + var http3 = require("http"); + var https2 = require("https"); + var parseUrl2 = require("url").parse; + var fs = require("fs"); + var Stream = require("stream").Stream; + var crypto3 = require("crypto"); + var mime = require_mime_types(); + var asynckit = require_asynckit(); + var setToStringTag = require_es_set_tostringtag(); + var hasOwn = require_hasown(); + var populate = require_populate(); + function escapeHeaderParam(str) { + return String(str).replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/"/g, "%22"); } - if ("FORCE_COLOR" in env) { - if (env.FORCE_COLOR === "true") { - forceColor = 1; - } else if (env.FORCE_COLOR === "false") { - forceColor = 0; - } else { - forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3); + function FormData3(options) { + if (!(this instanceof FormData3)) { + return new FormData3(options); } - } - function translateLevel(level) { - if (level === 0) { - return false; + this._overheadLength = 0; + this._valueLength = 0; + this._valuesToMeasure = []; + CombinedStream.call(this); + options = options || {}; + for (var option in options) { + this[option] = options[option]; } - return { - level, - hasBasic: true, - has256: level >= 2, - has16m: level >= 3 - }; } - function supportsColor(haveStream, streamIsTTY) { - if (forceColor === 0) { - return 0; + util4.inherits(FormData3, CombinedStream); + FormData3.LINE_BREAK = "\r\n"; + FormData3.DEFAULT_CONTENT_TYPE = "application/octet-stream"; + FormData3.prototype.append = function(field, value, options) { + options = options || {}; + if (typeof options === "string") { + options = { filename: options }; } - if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) { - return 3; + var append2 = CombinedStream.prototype.append.bind(this); + if (typeof value === "number" || value == null) { + value = String(value); } - if (hasFlag("color=256")) { - return 2; + if (Array.isArray(value)) { + this._error(new Error("Arrays are not supported.")); + return; } - if (haveStream && !streamIsTTY && forceColor === void 0) { - return 0; + var header = this._multiPartHeader(field, value, options); + var footer = this._multiPartFooter(); + append2(header); + append2(value); + append2(footer); + this._trackLength(header, value, options); + }; + FormData3.prototype._trackLength = function(header, value, options) { + var valueLength = 0; + if (options.knownLength != null) { + valueLength += Number(options.knownLength); + } else if (Buffer.isBuffer(value)) { + valueLength = value.length; + } else if (typeof value === "string") { + valueLength = Buffer.byteLength(value); } - const min = forceColor || 0; - if (env.TERM === "dumb") { - return min; + this._valueLength += valueLength; + this._overheadLength += Buffer.byteLength(header) + FormData3.LINE_BREAK.length; + if (!value || !value.path && !(value.readable && hasOwn(value, "httpVersion")) && !(value instanceof Stream)) { + return; } - if (process.platform === "win32") { - const osRelease = os.release().split("."); - if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) { - return Number(osRelease[2]) >= 14931 ? 3 : 2; - } - return 1; + if (!options.knownLength) { + this._valuesToMeasure.push(value); } - if ("CI" in env) { - if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign) => sign in env) || env.CI_NAME === "codeship") { - return 1; + }; + FormData3.prototype._lengthRetriever = function(value, callback) { + if (hasOwn(value, "fd")) { + if (value.end != void 0 && value.end != Infinity && value.start != void 0) { + callback(null, value.end + 1 - (value.start ? value.start : 0)); + } else { + fs.stat(value.path, function(err, stat) { + if (err) { + callback(err); + return; + } + var fileSize = stat.size - (value.start ? value.start : 0); + callback(null, fileSize); + }); } - return min; + } else if (hasOwn(value, "httpVersion")) { + callback(null, Number(value.headers["content-length"])); + } else if (hasOwn(value, "httpModule")) { + value.on("response", function(response) { + value.pause(); + callback(null, Number(response.headers["content-length"])); + }); + value.resume(); + } else { + callback("Unknown stream"); } - if ("TEAMCITY_VERSION" in env) { - return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0; + }; + FormData3.prototype._multiPartHeader = function(field, value, options) { + if (typeof options.header === "string") { + return options.header; } - if (env.COLORTERM === "truecolor") { - return 3; + var contentDisposition = this._getContentDisposition(value, options); + var contentType = this._getContentType(value, options); + var contents = ""; + var headers = { + // add custom disposition as third element or keep it two elements if not + "Content-Disposition": ["form-data", 'name="' + escapeHeaderParam(field) + '"'].concat(contentDisposition || []), + // if no content type. allow it to be empty array + "Content-Type": [].concat(contentType || []) + }; + if (typeof options.header === "object") { + populate(headers, options.header); } - if ("TERM_PROGRAM" in env) { - const version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10); - switch (env.TERM_PROGRAM) { - case "iTerm.app": - return version >= 3 ? 3 : 2; - case "Apple_Terminal": - return 2; + var header; + for (var prop in headers) { + if (hasOwn(headers, prop)) { + header = headers[prop]; + if (header == null) { + continue; + } + if (!Array.isArray(header)) { + header = [header]; + } + if (header.length) { + contents += prop + ": " + header.join("; ") + FormData3.LINE_BREAK; + } } } - if (/-256(color)?$/i.test(env.TERM)) { - return 2; - } - if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) { - return 1; + return "--" + this.getBoundary() + FormData3.LINE_BREAK + contents + FormData3.LINE_BREAK; + }; + FormData3.prototype._getContentDisposition = function(value, options) { + var filename; + if (typeof options.filepath === "string") { + filename = path.normalize(options.filepath).replace(/\\/g, "/"); + } else if (options.filename || value && (value.name || value.path)) { + filename = path.basename(options.filename || value && (value.name || value.path)); + } else if (value && value.readable && hasOwn(value, "httpVersion")) { + filename = path.basename(value.client._httpMessage.path || ""); } - if ("COLORTERM" in env) { - return 1; + if (filename) { + return 'filename="' + escapeHeaderParam(filename) + '"'; } - return min; - } - function getSupportLevel(stream4) { - const level = supportsColor(stream4, stream4 && stream4.isTTY); - return translateLevel(level); - } - module2.exports = { - supportsColor: getSupportLevel, - stdout: translateLevel(supportsColor(true, tty.isatty(1))), - stderr: translateLevel(supportsColor(true, tty.isatty(2))) }; - } -}); - -// node_modules/debug/src/node.js -var require_node = __commonJS({ - "node_modules/debug/src/node.js"(exports2, module2) { - var tty = require("tty"); - var util3 = require("util"); - exports2.init = init; - exports2.log = log; - exports2.formatArgs = formatArgs; - exports2.save = save; - exports2.load = load; - exports2.useColors = useColors; - exports2.destroy = util3.deprecate( - () => { - }, - "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`." - ); - exports2.colors = [6, 2, 3, 4, 5, 1]; - try { - const supportsColor = require_supports_color(); - if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) { - exports2.colors = [ - 20, - 21, - 26, - 27, - 32, - 33, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 56, - 57, - 62, - 63, - 68, - 69, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 92, - 93, - 98, - 99, - 112, - 113, - 128, - 129, - 134, - 135, - 148, - 149, - 160, - 161, - 162, - 163, - 164, - 165, - 166, - 167, - 168, - 169, - 170, - 171, - 172, - 173, - 178, - 179, - 184, - 185, - 196, - 197, - 198, - 199, - 200, - 201, - 202, - 203, - 204, - 205, - 206, - 207, - 208, - 209, - 214, - 215, - 220, - 221 - ]; - } - } catch (error) { - } - exports2.inspectOpts = Object.keys(process.env).filter((key) => { - return /^debug_/i.test(key); - }).reduce((obj, key) => { - const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_, k) => { - return k.toUpperCase(); - }); - let val = process.env[key]; - if (/^(yes|on|true|enabled)$/i.test(val)) { - val = true; - } else if (/^(no|off|false|disabled)$/i.test(val)) { - val = false; - } else if (val === "null") { - val = null; - } else { - val = Number(val); + FormData3.prototype._getContentType = function(value, options) { + var contentType = options.contentType; + if (!contentType && value && value.name) { + contentType = mime.lookup(value.name); } - obj[prop] = val; - return obj; - }, {}); - function useColors() { - return "colors" in exports2.inspectOpts ? Boolean(exports2.inspectOpts.colors) : tty.isatty(process.stderr.fd); - } - function formatArgs(args) { - const { namespace: name, useColors: useColors2 } = this; - if (useColors2) { - const c = this.color; - const colorCode = "\x1B[3" + (c < 8 ? c : "8;5;" + c); - const prefix = ` ${colorCode};1m${name} \x1B[0m`; - args[0] = prefix + args[0].split("\n").join("\n" + prefix); - args.push(colorCode + "m+" + module2.exports.humanize(this.diff) + "\x1B[0m"); - } else { - args[0] = getDate() + name + " " + args[0]; + if (!contentType && value && value.path) { + contentType = mime.lookup(value.path); } - } - function getDate() { - if (exports2.inspectOpts.hideDate) { - return ""; + if (!contentType && value && value.readable && hasOwn(value, "httpVersion")) { + contentType = value.headers["content-type"]; } - return (/* @__PURE__ */ new Date()).toISOString() + " "; - } - function log(...args) { - return process.stderr.write(util3.formatWithOptions(exports2.inspectOpts, ...args) + "\n"); - } - function save(namespaces) { - if (namespaces) { - process.env.DEBUG = namespaces; - } else { - delete process.env.DEBUG; + if (!contentType && (options.filepath || options.filename)) { + contentType = mime.lookup(options.filepath || options.filename); } - } - function load() { - return process.env.DEBUG; - } - function init(debug) { - debug.inspectOpts = {}; - const keys = Object.keys(exports2.inspectOpts); - for (let i = 0; i < keys.length; i++) { - debug.inspectOpts[keys[i]] = exports2.inspectOpts[keys[i]]; + if (!contentType && value && typeof value === "object") { + contentType = FormData3.DEFAULT_CONTENT_TYPE; } - } - module2.exports = require_common()(exports2); - var { formatters } = module2.exports; - formatters.o = function(v) { - this.inspectOpts.colors = this.useColors; - return util3.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" "); + return contentType; }; - formatters.O = function(v) { - this.inspectOpts.colors = this.useColors; - return util3.inspect(v, this.inspectOpts); + FormData3.prototype._multiPartFooter = function() { + return function(next) { + var footer = FormData3.LINE_BREAK; + var lastPart = this._streams.length === 0; + if (lastPart) { + footer += this._lastBoundary(); + } + next(footer); + }.bind(this); }; - } -}); - -// node_modules/debug/src/index.js -var require_src = __commonJS({ - "node_modules/debug/src/index.js"(exports2, module2) { - if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) { - module2.exports = require_browser(); - } else { - module2.exports = require_node(); - } - } -}); - -// node_modules/follow-redirects/debug.js -var require_debug = __commonJS({ - "node_modules/follow-redirects/debug.js"(exports2, module2) { - var debug; - module2.exports = function() { - if (!debug) { - try { - debug = require_src()("follow-redirects"); - } catch (error) { - } - if (typeof debug !== "function") { - debug = function() { - }; + FormData3.prototype._lastBoundary = function() { + return "--" + this.getBoundary() + "--" + FormData3.LINE_BREAK; + }; + FormData3.prototype.getHeaders = function(userHeaders) { + var header; + var formHeaders = { + "content-type": "multipart/form-data; boundary=" + this.getBoundary() + }; + for (header in userHeaders) { + if (hasOwn(userHeaders, header)) { + formHeaders[header.toLowerCase()] = userHeaders[header]; } } - debug.apply(null, arguments); + return formHeaders; }; - } -}); - -// node_modules/follow-redirects/index.js -var require_follow_redirects = __commonJS({ - "node_modules/follow-redirects/index.js"(exports2, module2) { - var url2 = require("url"); - var URL2 = url2.URL; - var http2 = require("http"); - var https2 = require("https"); - var Writable = require("stream").Writable; - var assert = require("assert"); - var debug = require_debug(); - var useNativeURL = false; - try { - assert(new URL2()); - } catch (error) { - useNativeURL = error.code === "ERR_INVALID_URL"; - } - var preservedUrlFields = [ - "auth", - "host", - "hostname", - "href", - "path", - "pathname", - "port", - "protocol", - "query", - "search", - "hash" - ]; - var events = ["abort", "aborted", "connect", "error", "socket", "timeout"]; - var eventHandlers = /* @__PURE__ */ Object.create(null); - events.forEach(function(event) { - eventHandlers[event] = function(arg1, arg2, arg3) { - this._redirectable.emit(event, arg1, arg2, arg3); - }; - }); - var InvalidUrlError = createErrorType( - "ERR_INVALID_URL", - "Invalid URL", - TypeError - ); - var RedirectionError = createErrorType( - "ERR_FR_REDIRECTION_FAILURE", - "Redirected request failed" - ); - var TooManyRedirectsError = createErrorType( - "ERR_FR_TOO_MANY_REDIRECTS", - "Maximum number of redirects exceeded", - RedirectionError - ); - var MaxBodyLengthExceededError = createErrorType( - "ERR_FR_MAX_BODY_LENGTH_EXCEEDED", - "Request body larger than maxBodyLength limit" - ); - var WriteAfterEndError = createErrorType( - "ERR_STREAM_WRITE_AFTER_END", - "write after end" - ); - var destroy = Writable.prototype.destroy || noop2; - function RedirectableRequest(options, responseCallback) { - Writable.call(this); - this._sanitizeOptions(options); - this._options = options; - this._ended = false; - this._ending = false; - this._redirectCount = 0; - this._redirects = []; - this._requestBodyLength = 0; - this._requestBodyBuffers = []; - if (responseCallback) { - this.on("response", responseCallback); + FormData3.prototype.setBoundary = function(boundary) { + if (typeof boundary !== "string") { + throw new TypeError("FormData boundary must be a string"); } - var self2 = this; - this._onNativeResponse = function(response) { - try { - self2._processResponse(response); - } catch (cause) { - self2.emit("error", cause instanceof RedirectionError ? cause : new RedirectionError({ cause })); + this._boundary = boundary; + }; + FormData3.prototype.getBoundary = function() { + if (!this._boundary) { + this._generateBoundary(); + } + return this._boundary; + }; + FormData3.prototype.getBuffer = function() { + var dataBuffer = new Buffer.alloc(0); + var boundary = this.getBoundary(); + for (var i = 0, len = this._streams.length; i < len; i++) { + if (typeof this._streams[i] !== "function") { + if (Buffer.isBuffer(this._streams[i])) { + dataBuffer = Buffer.concat([dataBuffer, this._streams[i]]); + } else { + dataBuffer = Buffer.concat([dataBuffer, Buffer.from(this._streams[i])]); + } + if (typeof this._streams[i] !== "string" || this._streams[i].substring(2, boundary.length + 2) !== boundary) { + dataBuffer = Buffer.concat([dataBuffer, Buffer.from(FormData3.LINE_BREAK)]); + } } - }; - this._performRequest(); - } - RedirectableRequest.prototype = Object.create(Writable.prototype); - RedirectableRequest.prototype.abort = function() { - destroyRequest(this._currentRequest); - this._currentRequest.abort(); - this.emit("abort"); + } + return Buffer.concat([dataBuffer, Buffer.from(this._lastBoundary())]); }; - RedirectableRequest.prototype.destroy = function(error) { - destroyRequest(this._currentRequest, error); - destroy.call(this, error); - return this; + FormData3.prototype._generateBoundary = function() { + this._boundary = "--------------------------" + crypto3.randomBytes(12).toString("hex"); }; - RedirectableRequest.prototype.write = function(data, encoding, callback) { - if (this._ending) { - throw new WriteAfterEndError(); + FormData3.prototype.getLengthSync = function() { + var knownLength = this._overheadLength + this._valueLength; + if (this._streams.length) { + knownLength += this._lastBoundary().length; } - if (!isString2(data) && !isBuffer2(data)) { - throw new TypeError("data should be a string, Buffer or Uint8Array"); + if (!this.hasKnownLength()) { + this._error(new Error("Cannot calculate proper length in synchronous way.")); } - if (isFunction2(encoding)) { - callback = encoding; - encoding = null; + return knownLength; + }; + FormData3.prototype.hasKnownLength = function() { + var hasKnownLength = true; + if (this._valuesToMeasure.length) { + hasKnownLength = false; } - if (data.length === 0) { - if (callback) { - callback(); - } - return; + return hasKnownLength; + }; + FormData3.prototype.getLength = function(cb) { + var knownLength = this._overheadLength + this._valueLength; + if (this._streams.length) { + knownLength += this._lastBoundary().length; } - if (this._requestBodyLength + data.length <= this._options.maxBodyLength) { - this._requestBodyLength += data.length; - this._requestBodyBuffers.push({ data, encoding }); - this._currentRequest.write(data, encoding, callback); - } else { - this.emit("error", new MaxBodyLengthExceededError()); - this.abort(); + if (!this._valuesToMeasure.length) { + process.nextTick(cb.bind(this, null, knownLength)); + return; } + asynckit.parallel(this._valuesToMeasure, this._lengthRetriever, function(err, values) { + if (err) { + cb(err); + return; + } + values.forEach(function(length) { + knownLength += length; + }); + cb(null, knownLength); + }); }; - RedirectableRequest.prototype.end = function(data, encoding, callback) { - if (isFunction2(data)) { - callback = data; - data = encoding = null; - } else if (isFunction2(encoding)) { - callback = encoding; - encoding = null; - } - if (!data) { - this._ended = this._ending = true; - this._currentRequest.end(null, null, callback); + FormData3.prototype.submit = function(params, cb) { + var request; + var options; + var defaults2 = { method: "post" }; + if (typeof params === "string") { + params = parseUrl2(params); + options = populate({ + port: params.port, + path: params.pathname, + host: params.hostname, + protocol: params.protocol + }, defaults2); } else { - var self2 = this; - var currentRequest = this._currentRequest; - this.write(data, encoding, function() { - self2._ended = true; - currentRequest.end(null, null, callback); - }); - this._ending = true; + options = populate(params, defaults2); + if (!options.port) { + options.port = options.protocol === "https:" ? 443 : 80; + } } - }; - RedirectableRequest.prototype.setHeader = function(name, value) { - this._options.headers[name] = value; - this._currentRequest.setHeader(name, value); - }; - RedirectableRequest.prototype.removeHeader = function(name) { - delete this._options.headers[name]; - this._currentRequest.removeHeader(name); - }; - RedirectableRequest.prototype.setTimeout = function(msecs, callback) { - var self2 = this; - function destroyOnTimeout(socket) { - socket.setTimeout(msecs); - socket.removeListener("timeout", socket.destroy); - socket.addListener("timeout", socket.destroy); + options.headers = this.getHeaders(params.headers); + if (options.protocol === "https:") { + request = https2.request(options); + } else { + request = http3.request(options); } - function startTimer(socket) { - if (self2._timeout) { - clearTimeout(self2._timeout); + this.getLength(function(err, length) { + if (err && err !== "Unknown stream") { + this._error(err); + return; } - self2._timeout = setTimeout(function() { - self2.emit("timeout"); - clearTimer(); - }, msecs); - destroyOnTimeout(socket); - } - function clearTimer() { - if (self2._timeout) { - clearTimeout(self2._timeout); - self2._timeout = null; - } - self2.removeListener("abort", clearTimer); - self2.removeListener("error", clearTimer); - self2.removeListener("response", clearTimer); - self2.removeListener("close", clearTimer); - if (callback) { - self2.removeListener("timeout", callback); + if (length) { + request.setHeader("Content-Length", length); } - if (!self2.socket) { - self2._currentRequest.removeListener("socket", startTimer); + this.pipe(request); + if (cb) { + var onResponse; + var callback = function(error, responce) { + request.removeListener("error", callback); + request.removeListener("response", onResponse); + return cb.call(this, error, responce); + }; + onResponse = callback.bind(this, null); + request.on("error", callback); + request.on("response", onResponse); } + }.bind(this)); + return request; + }; + FormData3.prototype._error = function(err) { + if (!this.error) { + this.error = err; + this.pause(); + this.emit("error", err); } - if (callback) { - this.on("timeout", callback); - } - if (this.socket) { - startTimer(this.socket); - } else { - this._currentRequest.once("socket", startTimer); + }; + FormData3.prototype.toString = function() { + return "[object FormData]"; + }; + setToStringTag(FormData3.prototype, "FormData"); + module2.exports = FormData3; + } +}); + +// node_modules/ms/index.js +var require_ms = __commonJS({ + "node_modules/ms/index.js"(exports2, module2) { + var s = 1e3; + var m = s * 60; + var h = m * 60; + var d = h * 24; + var w = d * 7; + var y = d * 365.25; + module2.exports = function(val, options) { + options = options || {}; + var type = typeof val; + if (type === "string" && val.length > 0) { + return parse(val); + } else if (type === "number" && isFinite(val)) { + return options.long ? fmtLong(val) : fmtShort(val); } - this.on("socket", destroyOnTimeout); - this.on("abort", clearTimer); - this.on("error", clearTimer); - this.on("response", clearTimer); - this.on("close", clearTimer); - return this; + throw new Error( + "val is not a non-empty string or a valid number. val=" + JSON.stringify(val) + ); }; - [ - "flushHeaders", - "getHeader", - "setNoDelay", - "setSocketKeepAlive" - ].forEach(function(method) { - RedirectableRequest.prototype[method] = function(a, b) { - return this._currentRequest[method](a, b); - }; - }); - ["aborted", "connection", "socket"].forEach(function(property) { - Object.defineProperty(RedirectableRequest.prototype, property, { - get: function() { - return this._currentRequest[property]; - } - }); - }); - RedirectableRequest.prototype._sanitizeOptions = function(options) { - if (!options.headers) { - options.headers = {}; + function parse(str) { + str = String(str); + if (str.length > 100) { + return; } - if (options.host) { - if (!options.hostname) { - options.hostname = options.host; - } - delete options.host; + var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec( + str + ); + if (!match) { + return; } - if (!options.pathname && options.path) { - var searchPos = options.path.indexOf("?"); - if (searchPos < 0) { - options.pathname = options.path; - } else { - options.pathname = options.path.substring(0, searchPos); - options.search = options.path.substring(searchPos); - } + var n = parseFloat(match[1]); + var type = (match[2] || "ms").toLowerCase(); + switch (type) { + case "years": + case "year": + case "yrs": + case "yr": + case "y": + return n * y; + case "weeks": + case "week": + case "w": + return n * w; + case "days": + case "day": + case "d": + return n * d; + case "hours": + case "hour": + case "hrs": + case "hr": + case "h": + return n * h; + case "minutes": + case "minute": + case "mins": + case "min": + case "m": + return n * m; + case "seconds": + case "second": + case "secs": + case "sec": + case "s": + return n * s; + case "milliseconds": + case "millisecond": + case "msecs": + case "msec": + case "ms": + return n; + default: + return void 0; } - }; - RedirectableRequest.prototype._performRequest = function() { - var protocol = this._options.protocol; - var nativeProtocol = this._options.nativeProtocols[protocol]; - if (!nativeProtocol) { - throw new TypeError("Unsupported protocol " + protocol); + } + function fmtShort(ms) { + var msAbs = Math.abs(ms); + if (msAbs >= d) { + return Math.round(ms / d) + "d"; } - if (this._options.agents) { - var scheme = protocol.slice(0, -1); - this._options.agent = this._options.agents[scheme]; + if (msAbs >= h) { + return Math.round(ms / h) + "h"; } - var request = this._currentRequest = nativeProtocol.request(this._options, this._onNativeResponse); - request._redirectable = this; - for (var event of events) { - request.on(event, eventHandlers[event]); + if (msAbs >= m) { + return Math.round(ms / m) + "m"; } - this._currentUrl = /^\//.test(this._options.path) ? url2.format(this._options) : ( - // When making a request to a proxy, […] - // a client MUST send the target URI in absolute-form […]. - this._options.path - ); - if (this._isRedirect) { - var i = 0; - var self2 = this; - var buffers = this._requestBodyBuffers; - (function writeNext(error) { - if (request === self2._currentRequest) { - if (error) { - self2.emit("error", error); - } else if (i < buffers.length) { - var buffer = buffers[i++]; - if (!request.finished) { - request.write(buffer.data, buffer.encoding, writeNext); - } - } else if (self2._ended) { - request.end(); - } - } - })(); + if (msAbs >= s) { + return Math.round(ms / s) + "s"; } - }; - RedirectableRequest.prototype._processResponse = function(response) { - var statusCode = response.statusCode; - if (this._options.trackRedirects) { - this._redirects.push({ - url: this._currentUrl, - headers: response.headers, - statusCode - }); + return ms + "ms"; + } + function fmtLong(ms) { + var msAbs = Math.abs(ms); + if (msAbs >= d) { + return plural(ms, msAbs, d, "day"); } - var location = response.headers.location; - if (!location || this._options.followRedirects === false || statusCode < 300 || statusCode >= 400) { - response.responseUrl = this._currentUrl; - response.redirects = this._redirects; - this.emit("response", response); - this._requestBodyBuffers = []; - return; + if (msAbs >= h) { + return plural(ms, msAbs, h, "hour"); } - destroyRequest(this._currentRequest); - response.destroy(); - if (++this._redirectCount > this._options.maxRedirects) { - throw new TooManyRedirectsError(); + if (msAbs >= m) { + return plural(ms, msAbs, m, "minute"); } - var requestHeaders; - var beforeRedirect = this._options.beforeRedirect; - if (beforeRedirect) { - requestHeaders = Object.assign({ - // The Host header was set by nativeProtocol.request - Host: response.req.getHeader("host") - }, this._options.headers); + if (msAbs >= s) { + return plural(ms, msAbs, s, "second"); } - var method = this._options.method; - if ((statusCode === 301 || statusCode === 302) && this._options.method === "POST" || // RFC7231§6.4.4: The 303 (See Other) status code indicates that - // the server is redirecting the user agent to a different resource […] - // A user agent can perform a retrieval request targeting that URI - // (a GET or HEAD request if using HTTP) […] - statusCode === 303 && !/^(?:GET|HEAD)$/.test(this._options.method)) { - this._options.method = "GET"; - this._requestBodyBuffers = []; - removeMatchingHeaders(/^content-/i, this._options.headers); - } - var currentHostHeader = removeMatchingHeaders(/^host$/i, this._options.headers); - var currentUrlParts = parseUrl(this._currentUrl); - var currentHost = currentHostHeader || currentUrlParts.host; - var currentUrl = /^\w+:/.test(location) ? this._currentUrl : url2.format(Object.assign(currentUrlParts, { host: currentHost })); - var redirectUrl = resolveUrl(location, currentUrl); - debug("redirecting to", redirectUrl.href); - this._isRedirect = true; - spreadUrlObject(redirectUrl, this._options); - if (redirectUrl.protocol !== currentUrlParts.protocol && redirectUrl.protocol !== "https:" || redirectUrl.host !== currentHost && !isSubdomain(redirectUrl.host, currentHost)) { - removeMatchingHeaders(/^(?:(?:proxy-)?authorization|cookie)$/i, this._options.headers); - } - if (isFunction2(beforeRedirect)) { - var responseDetails = { - headers: response.headers, - statusCode - }; - var requestDetails = { - url: currentUrl, - method, - headers: requestHeaders - }; - beforeRedirect(this._options, responseDetails, requestDetails); - this._sanitizeOptions(this._options); + return ms + " ms"; + } + function plural(ms, msAbs, n, name) { + var isPlural = msAbs >= n * 1.5; + return Math.round(ms / n) + " " + name + (isPlural ? "s" : ""); + } + } +}); + +// node_modules/debug/src/common.js +var require_common = __commonJS({ + "node_modules/debug/src/common.js"(exports2, module2) { + function setup(env) { + createDebug.debug = createDebug; + createDebug.default = createDebug; + createDebug.coerce = coerce; + createDebug.disable = disable; + createDebug.enable = enable; + createDebug.enabled = enabled; + createDebug.humanize = require_ms(); + createDebug.destroy = destroy; + Object.keys(env).forEach((key) => { + createDebug[key] = env[key]; + }); + createDebug.names = []; + createDebug.skips = []; + createDebug.formatters = {}; + function selectColor(namespace) { + let hash = 0; + for (let i = 0; i < namespace.length; i++) { + hash = (hash << 5) - hash + namespace.charCodeAt(i); + hash |= 0; + } + return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; } - this._performRequest(); - }; - function wrap(protocols) { - var exports3 = { - maxRedirects: 21, - maxBodyLength: 10 * 1024 * 1024 - }; - var nativeProtocols = {}; - Object.keys(protocols).forEach(function(scheme) { - var protocol = scheme + ":"; - var nativeProtocol = nativeProtocols[protocol] = protocols[scheme]; - var wrappedProtocol = exports3[scheme] = Object.create(nativeProtocol); - function request(input, options, callback) { - if (isURL(input)) { - input = spreadUrlObject(input); - } else if (isString2(input)) { - input = spreadUrlObject(parseUrl(input)); - } else { - callback = options; - options = validateUrl(input); - input = { protocol }; - } - if (isFunction2(options)) { - callback = options; - options = null; + createDebug.selectColor = selectColor; + function createDebug(namespace) { + let prevTime; + let enableOverride = null; + let namespacesCache; + let enabledCache; + function debug(...args) { + if (!debug.enabled) { + return; } - options = Object.assign({ - maxRedirects: exports3.maxRedirects, - maxBodyLength: exports3.maxBodyLength - }, input, options); - options.nativeProtocols = nativeProtocols; - if (!isString2(options.host) && !isString2(options.hostname)) { - options.hostname = "::1"; + const self2 = debug; + const curr = Number(/* @__PURE__ */ new Date()); + const ms = curr - (prevTime || curr); + self2.diff = ms; + self2.prev = prevTime; + self2.curr = curr; + prevTime = curr; + args[0] = createDebug.coerce(args[0]); + if (typeof args[0] !== "string") { + args.unshift("%O"); } - assert.equal(options.protocol, protocol, "protocol mismatch"); - debug("options", options); - return new RedirectableRequest(options, callback); - } - function get(input, options, callback) { - var wrappedRequest = wrappedProtocol.request(input, options, callback); - wrappedRequest.end(); - return wrappedRequest; + let index = 0; + args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => { + if (match === "%%") { + return "%"; + } + index++; + const formatter = createDebug.formatters[format]; + if (typeof formatter === "function") { + const val = args[index]; + match = formatter.call(self2, val); + args.splice(index, 1); + index--; + } + return match; + }); + createDebug.formatArgs.call(self2, args); + const logFn = self2.log || createDebug.log; + logFn.apply(self2, args); } - Object.defineProperties(wrappedProtocol, { - request: { value: request, configurable: true, enumerable: true, writable: true }, - get: { value: get, configurable: true, enumerable: true, writable: true } + debug.namespace = namespace; + debug.useColors = createDebug.useColors(); + debug.color = createDebug.selectColor(namespace); + debug.extend = extend2; + debug.destroy = createDebug.destroy; + Object.defineProperty(debug, "enabled", { + enumerable: true, + configurable: false, + get: () => { + if (enableOverride !== null) { + return enableOverride; + } + if (namespacesCache !== createDebug.namespaces) { + namespacesCache = createDebug.namespaces; + enabledCache = createDebug.enabled(namespace); + } + return enabledCache; + }, + set: (v) => { + enableOverride = v; + } }); - }); - return exports3; - } - function noop2() { - } - function parseUrl(input) { - var parsed; - if (useNativeURL) { - parsed = new URL2(input); - } else { - parsed = validateUrl(url2.parse(input)); - if (!isString2(parsed.protocol)) { - throw new InvalidUrlError({ input }); + if (typeof createDebug.init === "function") { + createDebug.init(debug); } + return debug; } - return parsed; - } - function resolveUrl(relative, base) { - return useNativeURL ? new URL2(relative, base) : parseUrl(url2.resolve(base, relative)); - } - function validateUrl(input) { - if (/^\[/.test(input.hostname) && !/^\[[:0-9a-f]+\]$/i.test(input.hostname)) { - throw new InvalidUrlError({ input: input.href || input }); + function extend2(namespace, delimiter) { + const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace); + newDebug.log = this.log; + return newDebug; } - if (/^\[/.test(input.host) && !/^\[[:0-9a-f]+\](:\d+)?$/i.test(input.host)) { - throw new InvalidUrlError({ input: input.href || input }); + function enable(namespaces) { + createDebug.save(namespaces); + createDebug.namespaces = namespaces; + createDebug.names = []; + createDebug.skips = []; + let i; + const split = (typeof namespaces === "string" ? namespaces : "").split(/[\s,]+/); + const len = split.length; + for (i = 0; i < len; i++) { + if (!split[i]) { + continue; + } + namespaces = split[i].replace(/\*/g, ".*?"); + if (namespaces[0] === "-") { + createDebug.skips.push(new RegExp("^" + namespaces.slice(1) + "$")); + } else { + createDebug.names.push(new RegExp("^" + namespaces + "$")); + } + } } - return input; - } - function spreadUrlObject(urlObject, target) { - var spread3 = target || {}; - for (var key of preservedUrlFields) { - spread3[key] = urlObject[key]; + function disable() { + const namespaces = [ + ...createDebug.names.map(toNamespace), + ...createDebug.skips.map(toNamespace).map((namespace) => "-" + namespace) + ].join(","); + createDebug.enable(""); + return namespaces; } - if (spread3.hostname.startsWith("[")) { - spread3.hostname = spread3.hostname.slice(1, -1); + function enabled(name) { + if (name[name.length - 1] === "*") { + return true; + } + let i; + let len; + for (i = 0, len = createDebug.skips.length; i < len; i++) { + if (createDebug.skips[i].test(name)) { + return false; + } + } + for (i = 0, len = createDebug.names.length; i < len; i++) { + if (createDebug.names[i].test(name)) { + return true; + } + } + return false; } - if (spread3.port !== "") { - spread3.port = Number(spread3.port); + function toNamespace(regexp) { + return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, "*"); } - spread3.path = spread3.search ? spread3.pathname + spread3.search : spread3.pathname; - return spread3; - } - function removeMatchingHeaders(regex, headers) { - var lastValue; - for (var header in headers) { - if (regex.test(header)) { - lastValue = headers[header]; - delete headers[header]; + function coerce(val) { + if (val instanceof Error) { + return val.stack || val.message; } + return val; } - return lastValue === null || typeof lastValue === "undefined" ? void 0 : String(lastValue).trim(); - } - function createErrorType(code, message, baseClass) { - function CustomError(properties) { - Error.captureStackTrace(this, this.constructor); - Object.assign(this, properties || {}); - this.code = code; - this.message = this.cause ? message + ": " + this.cause.message : message; + function destroy() { + console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."); } - CustomError.prototype = new (baseClass || Error)(); - Object.defineProperties(CustomError.prototype, { - constructor: { - value: CustomError, - enumerable: false - }, - name: { - value: "Error [" + code + "]", - enumerable: false - } - }); - return CustomError; + createDebug.enable(createDebug.load()); + return createDebug; } - function destroyRequest(request, error) { - for (var event of events) { - request.removeListener(event, eventHandlers[event]); + module2.exports = setup; + } +}); + +// node_modules/debug/src/browser.js +var require_browser = __commonJS({ + "node_modules/debug/src/browser.js"(exports2, module2) { + exports2.formatArgs = formatArgs; + exports2.save = save; + exports2.load = load; + exports2.useColors = useColors; + exports2.storage = localstorage(); + exports2.destroy = /* @__PURE__ */ (() => { + let warned = false; + return () => { + if (!warned) { + warned = true; + console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."); + } + }; + })(); + exports2.colors = [ + "#0000CC", + "#0000FF", + "#0033CC", + "#0033FF", + "#0066CC", + "#0066FF", + "#0099CC", + "#0099FF", + "#00CC00", + "#00CC33", + "#00CC66", + "#00CC99", + "#00CCCC", + "#00CCFF", + "#3300CC", + "#3300FF", + "#3333CC", + "#3333FF", + "#3366CC", + "#3366FF", + "#3399CC", + "#3399FF", + "#33CC00", + "#33CC33", + "#33CC66", + "#33CC99", + "#33CCCC", + "#33CCFF", + "#6600CC", + "#6600FF", + "#6633CC", + "#6633FF", + "#66CC00", + "#66CC33", + "#9900CC", + "#9900FF", + "#9933CC", + "#9933FF", + "#99CC00", + "#99CC33", + "#CC0000", + "#CC0033", + "#CC0066", + "#CC0099", + "#CC00CC", + "#CC00FF", + "#CC3300", + "#CC3333", + "#CC3366", + "#CC3399", + "#CC33CC", + "#CC33FF", + "#CC6600", + "#CC6633", + "#CC9900", + "#CC9933", + "#CCCC00", + "#CCCC33", + "#FF0000", + "#FF0033", + "#FF0066", + "#FF0099", + "#FF00CC", + "#FF00FF", + "#FF3300", + "#FF3333", + "#FF3366", + "#FF3399", + "#FF33CC", + "#FF33FF", + "#FF6600", + "#FF6633", + "#FF9900", + "#FF9933", + "#FFCC00", + "#FFCC33" + ]; + function useColors() { + if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) { + return true; } - request.on("error", noop2); - request.destroy(error); - } - function isSubdomain(subdomain, domain) { - assert(isString2(subdomain) && isString2(domain)); - var dot = subdomain.length - domain.length - 1; - return dot > 0 && subdomain[dot] === "." && subdomain.endsWith(domain); + if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { + return false; + } + let m; + return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773 + typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31? + // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages + typeof navigator !== "undefined" && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker + typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/); } - function isString2(value) { - return typeof value === "string" || value instanceof String; + function formatArgs(args) { + args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module2.exports.humanize(this.diff); + if (!this.useColors) { + return; + } + const c = "color: " + this.color; + args.splice(1, 0, c, "color: inherit"); + let index = 0; + let lastC = 0; + args[0].replace(/%[a-zA-Z%]/g, (match) => { + if (match === "%%") { + return; + } + index++; + if (match === "%c") { + lastC = index; + } + }); + args.splice(lastC, 0, c); } - function isFunction2(value) { - return typeof value === "function"; + exports2.log = console.debug || console.log || (() => { + }); + function save(namespaces) { + try { + if (namespaces) { + exports2.storage.setItem("debug", namespaces); + } else { + exports2.storage.removeItem("debug"); + } + } catch (error) { + } } - function isBuffer2(value) { - return typeof value === "object" && "length" in value; + function load() { + let r; + try { + r = exports2.storage.getItem("debug"); + } catch (error) { + } + if (!r && typeof process !== "undefined" && "env" in process) { + r = process.env.DEBUG; + } + return r; } - function isURL(value) { - return URL2 && value instanceof URL2; + function localstorage() { + try { + return localStorage; + } catch (error) { + } } - module2.exports = wrap({ http: http2, https: https2 }); - module2.exports.wrap = wrap; - } -}); - -// node_modules/es-object-atoms/index.js -var require_es_object_atoms = __commonJS({ - "node_modules/es-object-atoms/index.js"(exports2, module2) { - "use strict"; - module2.exports = Object; - } -}); - -// node_modules/es-errors/index.js -var require_es_errors = __commonJS({ - "node_modules/es-errors/index.js"(exports2, module2) { - "use strict"; - module2.exports = Error; - } -}); - -// node_modules/es-errors/eval.js -var require_eval = __commonJS({ - "node_modules/es-errors/eval.js"(exports2, module2) { - "use strict"; - module2.exports = EvalError; - } -}); - -// node_modules/es-errors/range.js -var require_range = __commonJS({ - "node_modules/es-errors/range.js"(exports2, module2) { - "use strict"; - module2.exports = RangeError; + module2.exports = require_common()(exports2); + var { formatters } = module2.exports; + formatters.j = function(v) { + try { + return JSON.stringify(v); + } catch (error) { + return "[UnexpectedJSONParseError]: " + error.message; + } + }; } }); -// node_modules/es-errors/ref.js -var require_ref = __commonJS({ - "node_modules/es-errors/ref.js"(exports2, module2) { +// node_modules/has-flag/index.js +var require_has_flag = __commonJS({ + "node_modules/has-flag/index.js"(exports2, module2) { "use strict"; - module2.exports = ReferenceError; + module2.exports = (flag, argv = process.argv) => { + const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--"; + const position = argv.indexOf(prefix + flag); + const terminatorPosition = argv.indexOf("--"); + return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition); + }; } }); -// node_modules/es-errors/syntax.js -var require_syntax = __commonJS({ - "node_modules/es-errors/syntax.js"(exports2, module2) { +// node_modules/supports-color/index.js +var require_supports_color = __commonJS({ + "node_modules/supports-color/index.js"(exports2, module2) { "use strict"; - module2.exports = SyntaxError; - } -}); - -// node_modules/es-errors/type.js -var require_type = __commonJS({ - "node_modules/es-errors/type.js"(exports2, module2) { - "use strict"; - module2.exports = TypeError; - } -}); - -// node_modules/es-errors/uri.js -var require_uri = __commonJS({ - "node_modules/es-errors/uri.js"(exports2, module2) { - "use strict"; - module2.exports = URIError; - } -}); - -// node_modules/math-intrinsics/abs.js -var require_abs = __commonJS({ - "node_modules/math-intrinsics/abs.js"(exports2, module2) { - "use strict"; - module2.exports = Math.abs; - } -}); - -// node_modules/math-intrinsics/floor.js -var require_floor = __commonJS({ - "node_modules/math-intrinsics/floor.js"(exports2, module2) { - "use strict"; - module2.exports = Math.floor; - } -}); - -// node_modules/math-intrinsics/max.js -var require_max = __commonJS({ - "node_modules/math-intrinsics/max.js"(exports2, module2) { - "use strict"; - module2.exports = Math.max; - } -}); - -// node_modules/math-intrinsics/min.js -var require_min = __commonJS({ - "node_modules/math-intrinsics/min.js"(exports2, module2) { - "use strict"; - module2.exports = Math.min; - } -}); - -// node_modules/math-intrinsics/pow.js -var require_pow = __commonJS({ - "node_modules/math-intrinsics/pow.js"(exports2, module2) { - "use strict"; - module2.exports = Math.pow; - } -}); - -// node_modules/math-intrinsics/round.js -var require_round = __commonJS({ - "node_modules/math-intrinsics/round.js"(exports2, module2) { - "use strict"; - module2.exports = Math.round; - } -}); - -// node_modules/math-intrinsics/isNaN.js -var require_isNaN = __commonJS({ - "node_modules/math-intrinsics/isNaN.js"(exports2, module2) { - "use strict"; - module2.exports = Number.isNaN || function isNaN2(a) { - return a !== a; - }; - } -}); - -// node_modules/math-intrinsics/sign.js -var require_sign = __commonJS({ - "node_modules/math-intrinsics/sign.js"(exports2, module2) { - "use strict"; - var $isNaN = require_isNaN(); - module2.exports = function sign(number) { - if ($isNaN(number) || number === 0) { - return number; - } - return number < 0 ? -1 : 1; - }; - } -}); - -// node_modules/gopd/gOPD.js -var require_gOPD = __commonJS({ - "node_modules/gopd/gOPD.js"(exports2, module2) { - "use strict"; - module2.exports = Object.getOwnPropertyDescriptor; - } -}); - -// node_modules/gopd/index.js -var require_gopd = __commonJS({ - "node_modules/gopd/index.js"(exports2, module2) { - "use strict"; - var $gOPD = require_gOPD(); - if ($gOPD) { - try { - $gOPD([], "length"); - } catch (e) { - $gOPD = null; - } + var os = require("os"); + var tty = require("tty"); + var hasFlag = require_has_flag(); + var { env } = process; + var forceColor; + if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) { + forceColor = 0; + } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) { + forceColor = 1; } - module2.exports = $gOPD; - } -}); - -// node_modules/es-define-property/index.js -var require_es_define_property = __commonJS({ - "node_modules/es-define-property/index.js"(exports2, module2) { - "use strict"; - var $defineProperty = Object.defineProperty || false; - if ($defineProperty) { - try { - $defineProperty({}, "a", { value: 1 }); - } catch (e) { - $defineProperty = false; + if ("FORCE_COLOR" in env) { + if (env.FORCE_COLOR === "true") { + forceColor = 1; + } else if (env.FORCE_COLOR === "false") { + forceColor = 0; + } else { + forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3); } } - module2.exports = $defineProperty; - } -}); - -// node_modules/has-symbols/shams.js -var require_shams = __commonJS({ - "node_modules/has-symbols/shams.js"(exports2, module2) { - "use strict"; - module2.exports = function hasSymbols() { - if (typeof Symbol !== "function" || typeof Object.getOwnPropertySymbols !== "function") { + function translateLevel(level) { + if (level === 0) { return false; } - if (typeof Symbol.iterator === "symbol") { - return true; + return { + level, + hasBasic: true, + has256: level >= 2, + has16m: level >= 3 + }; + } + function supportsColor(haveStream, streamIsTTY) { + if (forceColor === 0) { + return 0; } - var obj = {}; - var sym = Symbol("test"); - var symObj = Object(sym); - if (typeof sym === "string") { - return false; + if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) { + return 3; } - if (Object.prototype.toString.call(sym) !== "[object Symbol]") { - return false; + if (hasFlag("color=256")) { + return 2; } - if (Object.prototype.toString.call(symObj) !== "[object Symbol]") { - return false; + if (haveStream && !streamIsTTY && forceColor === void 0) { + return 0; } - var symVal = 42; - obj[sym] = symVal; - for (var _ in obj) { - return false; + const min = forceColor || 0; + if (env.TERM === "dumb") { + return min; } - if (typeof Object.keys === "function" && Object.keys(obj).length !== 0) { - return false; + if (process.platform === "win32") { + const osRelease = os.release().split("."); + if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) { + return Number(osRelease[2]) >= 14931 ? 3 : 2; + } + return 1; } - if (typeof Object.getOwnPropertyNames === "function" && Object.getOwnPropertyNames(obj).length !== 0) { - return false; + if ("CI" in env) { + if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign) => sign in env) || env.CI_NAME === "codeship") { + return 1; + } + return min; } - var syms = Object.getOwnPropertySymbols(obj); - if (syms.length !== 1 || syms[0] !== sym) { - return false; + if ("TEAMCITY_VERSION" in env) { + return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0; } - if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { - return false; + if (env.COLORTERM === "truecolor") { + return 3; } - if (typeof Object.getOwnPropertyDescriptor === "function") { - var descriptor = ( - /** @type {PropertyDescriptor} */ - Object.getOwnPropertyDescriptor(obj, sym) - ); - if (descriptor.value !== symVal || descriptor.enumerable !== true) { - return false; + if ("TERM_PROGRAM" in env) { + const version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10); + switch (env.TERM_PROGRAM) { + case "iTerm.app": + return version >= 3 ? 3 : 2; + case "Apple_Terminal": + return 2; } } - return true; + if (/-256(color)?$/i.test(env.TERM)) { + return 2; + } + if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) { + return 1; + } + if ("COLORTERM" in env) { + return 1; + } + return min; + } + function getSupportLevel(stream4) { + const level = supportsColor(stream4, stream4 && stream4.isTTY); + return translateLevel(level); + } + module2.exports = { + supportsColor: getSupportLevel, + stdout: translateLevel(supportsColor(true, tty.isatty(1))), + stderr: translateLevel(supportsColor(true, tty.isatty(2))) }; } }); -// node_modules/has-symbols/index.js -var require_has_symbols = __commonJS({ - "node_modules/has-symbols/index.js"(exports2, module2) { - "use strict"; - var origSymbol = typeof Symbol !== "undefined" && Symbol; - var hasSymbolSham = require_shams(); - module2.exports = function hasNativeSymbols() { - if (typeof origSymbol !== "function") { - return false; - } - if (typeof Symbol !== "function") { - return false; - } - if (typeof origSymbol("foo") !== "symbol") { - return false; +// node_modules/debug/src/node.js +var require_node = __commonJS({ + "node_modules/debug/src/node.js"(exports2, module2) { + var tty = require("tty"); + var util4 = require("util"); + exports2.init = init; + exports2.log = log; + exports2.formatArgs = formatArgs; + exports2.save = save; + exports2.load = load; + exports2.useColors = useColors; + exports2.destroy = util4.deprecate( + () => { + }, + "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`." + ); + exports2.colors = [6, 2, 3, 4, 5, 1]; + try { + const supportsColor = require_supports_color(); + if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) { + exports2.colors = [ + 20, + 21, + 26, + 27, + 32, + 33, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 56, + 57, + 62, + 63, + 68, + 69, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 92, + 93, + 98, + 99, + 112, + 113, + 128, + 129, + 134, + 135, + 148, + 149, + 160, + 161, + 162, + 163, + 164, + 165, + 166, + 167, + 168, + 169, + 170, + 171, + 172, + 173, + 178, + 179, + 184, + 185, + 196, + 197, + 198, + 199, + 200, + 201, + 202, + 203, + 204, + 205, + 206, + 207, + 208, + 209, + 214, + 215, + 220, + 221 + ]; } - if (typeof Symbol("bar") !== "symbol") { - return false; + } catch (error) { + } + exports2.inspectOpts = Object.keys(process.env).filter((key) => { + return /^debug_/i.test(key); + }).reduce((obj, key) => { + const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_, k) => { + return k.toUpperCase(); + }); + let val = process.env[key]; + if (/^(yes|on|true|enabled)$/i.test(val)) { + val = true; + } else if (/^(no|off|false|disabled)$/i.test(val)) { + val = false; + } else if (val === "null") { + val = null; + } else { + val = Number(val); } - return hasSymbolSham(); + obj[prop] = val; + return obj; + }, {}); + function useColors() { + return "colors" in exports2.inspectOpts ? Boolean(exports2.inspectOpts.colors) : tty.isatty(process.stderr.fd); + } + function formatArgs(args) { + const { namespace: name, useColors: useColors2 } = this; + if (useColors2) { + const c = this.color; + const colorCode = "\x1B[3" + (c < 8 ? c : "8;5;" + c); + const prefix = ` ${colorCode};1m${name} \x1B[0m`; + args[0] = prefix + args[0].split("\n").join("\n" + prefix); + args.push(colorCode + "m+" + module2.exports.humanize(this.diff) + "\x1B[0m"); + } else { + args[0] = getDate() + name + " " + args[0]; + } + } + function getDate() { + if (exports2.inspectOpts.hideDate) { + return ""; + } + return (/* @__PURE__ */ new Date()).toISOString() + " "; + } + function log(...args) { + return process.stderr.write(util4.formatWithOptions(exports2.inspectOpts, ...args) + "\n"); + } + function save(namespaces) { + if (namespaces) { + process.env.DEBUG = namespaces; + } else { + delete process.env.DEBUG; + } + } + function load() { + return process.env.DEBUG; + } + function init(debug) { + debug.inspectOpts = {}; + const keys = Object.keys(exports2.inspectOpts); + for (let i = 0; i < keys.length; i++) { + debug.inspectOpts[keys[i]] = exports2.inspectOpts[keys[i]]; + } + } + module2.exports = require_common()(exports2); + var { formatters } = module2.exports; + formatters.o = function(v) { + this.inspectOpts.colors = this.useColors; + return util4.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" "); + }; + formatters.O = function(v) { + this.inspectOpts.colors = this.useColors; + return util4.inspect(v, this.inspectOpts); }; } }); -// node_modules/get-proto/Reflect.getPrototypeOf.js -var require_Reflect_getPrototypeOf = __commonJS({ - "node_modules/get-proto/Reflect.getPrototypeOf.js"(exports2, module2) { - "use strict"; - module2.exports = typeof Reflect !== "undefined" && Reflect.getPrototypeOf || null; +// node_modules/debug/src/index.js +var require_src = __commonJS({ + "node_modules/debug/src/index.js"(exports2, module2) { + if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) { + module2.exports = require_browser(); + } else { + module2.exports = require_node(); + } } }); -// node_modules/get-proto/Object.getPrototypeOf.js -var require_Object_getPrototypeOf = __commonJS({ - "node_modules/get-proto/Object.getPrototypeOf.js"(exports2, module2) { +// node_modules/agent-base/dist/src/promisify.js +var require_promisify = __commonJS({ + "node_modules/agent-base/dist/src/promisify.js"(exports2) { "use strict"; - var $Object = require_es_object_atoms(); - module2.exports = $Object.getPrototypeOf || null; + Object.defineProperty(exports2, "__esModule", { value: true }); + function promisify(fn) { + return function(req, opts) { + return new Promise((resolve, reject) => { + fn.call(this, req, opts, (err, rtn) => { + if (err) { + reject(err); + } else { + resolve(rtn); + } + }); + }); + }; + } + exports2.default = promisify; } }); -// node_modules/function-bind/implementation.js -var require_implementation = __commonJS({ - "node_modules/function-bind/implementation.js"(exports2, module2) { +// node_modules/agent-base/dist/src/index.js +var require_src2 = __commonJS({ + "node_modules/agent-base/dist/src/index.js"(exports2, module2) { "use strict"; - var ERROR_MESSAGE = "Function.prototype.bind called on incompatible "; - var toStr = Object.prototype.toString; - var max = Math.max; - var funcType = "[object Function]"; - var concatty = function concatty2(a, b) { - var arr = []; - for (var i = 0; i < a.length; i += 1) { - arr[i] = a[i]; - } - for (var j = 0; j < b.length; j += 1) { - arr[j + a.length] = b[j]; - } - return arr; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; }; - var slicy = function slicy2(arrLike, offset) { - var arr = []; - for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { - arr[j] = arrLike[i]; - } - return arr; - }; - var joiny = function(arr, joiner) { - var str = ""; - for (var i = 0; i < arr.length; i += 1) { - str += arr[i]; - if (i + 1 < arr.length) { - str += joiner; + var events_1 = require("events"); + var debug_1 = __importDefault(require_src()); + var promisify_1 = __importDefault(require_promisify()); + var debug = debug_1.default("agent-base"); + function isAgent(v) { + return Boolean(v) && typeof v.addRequest === "function"; + } + function isSecureEndpoint() { + const { stack } = new Error(); + if (typeof stack !== "string") + return false; + return stack.split("\n").some((l) => l.indexOf("(https.js:") !== -1 || l.indexOf("node:https:") !== -1); + } + function createAgent(callback, opts) { + return new createAgent.Agent(callback, opts); + } + (function(createAgent2) { + class Agent extends events_1.EventEmitter { + constructor(callback, _opts) { + super(); + let opts = _opts; + if (typeof callback === "function") { + this.callback = callback; + } else if (callback) { + opts = callback; + } + this.timeout = null; + if (opts && typeof opts.timeout === "number") { + this.timeout = opts.timeout; + } + this.maxFreeSockets = 1; + this.maxSockets = 1; + this.maxTotalSockets = Infinity; + this.sockets = {}; + this.freeSockets = {}; + this.requests = {}; + this.options = {}; } - } - return str; - }; - module2.exports = function bind2(that) { - var target = this; - if (typeof target !== "function" || toStr.apply(target) !== funcType) { - throw new TypeError(ERROR_MESSAGE + target); - } - var args = slicy(arguments, 1); - var bound; - var binder = function() { - if (this instanceof bound) { - var result = target.apply( - this, - concatty(args, arguments) - ); - if (Object(result) === result) { - return result; + get defaultPort() { + if (typeof this.explicitDefaultPort === "number") { + return this.explicitDefaultPort; } - return this; + return isSecureEndpoint() ? 443 : 80; + } + set defaultPort(v) { + this.explicitDefaultPort = v; + } + get protocol() { + if (typeof this.explicitProtocol === "string") { + return this.explicitProtocol; + } + return isSecureEndpoint() ? "https:" : "http:"; + } + set protocol(v) { + this.explicitProtocol = v; + } + callback(req, opts, fn) { + throw new Error('"agent-base" has no default implementation, you must subclass and override `callback()`'); + } + /** + * Called by node-core's "_http_client.js" module when creating + * a new HTTP request with this Agent instance. + * + * @api public + */ + addRequest(req, _opts) { + const opts = Object.assign({}, _opts); + if (typeof opts.secureEndpoint !== "boolean") { + opts.secureEndpoint = isSecureEndpoint(); + } + if (opts.host == null) { + opts.host = "localhost"; + } + if (opts.port == null) { + opts.port = opts.secureEndpoint ? 443 : 80; + } + if (opts.protocol == null) { + opts.protocol = opts.secureEndpoint ? "https:" : "http:"; + } + if (opts.host && opts.path) { + delete opts.path; + } + delete opts.agent; + delete opts.hostname; + delete opts._defaultAgent; + delete opts.defaultPort; + delete opts.createConnection; + req._last = true; + req.shouldKeepAlive = false; + let timedOut = false; + let timeoutId = null; + const timeoutMs = opts.timeout || this.timeout; + const onerror = (err) => { + if (req._hadError) + return; + req.emit("error", err); + req._hadError = true; + }; + const ontimeout = () => { + timeoutId = null; + timedOut = true; + const err = new Error(`A "socket" was not created for HTTP request before ${timeoutMs}ms`); + err.code = "ETIMEOUT"; + onerror(err); + }; + const callbackError = (err) => { + if (timedOut) + return; + if (timeoutId !== null) { + clearTimeout(timeoutId); + timeoutId = null; + } + onerror(err); + }; + const onsocket = (socket) => { + if (timedOut) + return; + if (timeoutId != null) { + clearTimeout(timeoutId); + timeoutId = null; + } + if (isAgent(socket)) { + debug("Callback returned another Agent instance %o", socket.constructor.name); + socket.addRequest(req, opts); + return; + } + if (socket) { + socket.once("free", () => { + this.freeSocket(socket, opts); + }); + req.onSocket(socket); + return; + } + const err = new Error(`no Duplex stream was returned to agent-base for \`${req.method} ${req.path}\``); + onerror(err); + }; + if (typeof this.callback !== "function") { + onerror(new Error("`callback` is not defined")); + return; + } + if (!this.promisifiedCallback) { + if (this.callback.length >= 3) { + debug("Converting legacy callback function to promise"); + this.promisifiedCallback = promisify_1.default(this.callback); + } else { + this.promisifiedCallback = this.callback; + } + } + if (typeof timeoutMs === "number" && timeoutMs > 0) { + timeoutId = setTimeout(ontimeout, timeoutMs); + } + if ("port" in opts && typeof opts.port !== "number") { + opts.port = Number(opts.port); + } + try { + debug("Resolving socket for %o request: %o", opts.protocol, `${req.method} ${req.path}`); + Promise.resolve(this.promisifiedCallback(req, opts)).then(onsocket, callbackError); + } catch (err) { + Promise.reject(err).catch(callbackError); + } + } + freeSocket(socket, opts) { + debug("Freeing socket %o %o", socket.constructor.name, opts); + socket.destroy(); + } + destroy() { + debug("Destroying agent %o", this.constructor.name); } - return target.apply( - that, - concatty(args, arguments) - ); - }; - var boundLength = max(0, target.length - args.length); - var boundArgs = []; - for (var i = 0; i < boundLength; i++) { - boundArgs[i] = "$" + i; - } - bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder); - if (target.prototype) { - var Empty = function Empty2() { - }; - Empty.prototype = target.prototype; - bound.prototype = new Empty(); - Empty.prototype = null; } - return bound; - }; - } -}); - -// node_modules/function-bind/index.js -var require_function_bind = __commonJS({ - "node_modules/function-bind/index.js"(exports2, module2) { - "use strict"; - var implementation = require_implementation(); - module2.exports = Function.prototype.bind || implementation; - } -}); - -// node_modules/call-bind-apply-helpers/functionCall.js -var require_functionCall = __commonJS({ - "node_modules/call-bind-apply-helpers/functionCall.js"(exports2, module2) { - "use strict"; - module2.exports = Function.prototype.call; + createAgent2.Agent = Agent; + createAgent2.prototype = createAgent2.Agent.prototype; + })(createAgent || (createAgent = {})); + module2.exports = createAgent; } }); -// node_modules/call-bind-apply-helpers/functionApply.js -var require_functionApply = __commonJS({ - "node_modules/call-bind-apply-helpers/functionApply.js"(exports2, module2) { +// node_modules/https-proxy-agent/dist/parse-proxy-response.js +var require_parse_proxy_response = __commonJS({ + "node_modules/https-proxy-agent/dist/parse-proxy-response.js"(exports2) { "use strict"; - module2.exports = Function.prototype.apply; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var debug_1 = __importDefault(require_src()); + var debug = debug_1.default("https-proxy-agent:parse-proxy-response"); + function parseProxyResponse(socket) { + return new Promise((resolve, reject) => { + let buffersLength = 0; + const buffers = []; + function read() { + const b = socket.read(); + if (b) + ondata(b); + else + socket.once("readable", read); + } + function cleanup() { + socket.removeListener("end", onend); + socket.removeListener("error", onerror); + socket.removeListener("close", onclose); + socket.removeListener("readable", read); + } + function onclose(err) { + debug("onclose had error %o", err); + } + function onend() { + debug("onend"); + } + function onerror(err) { + cleanup(); + debug("onerror %o", err); + reject(err); + } + function ondata(b) { + buffers.push(b); + buffersLength += b.length; + const buffered = Buffer.concat(buffers, buffersLength); + const endOfHeaders = buffered.indexOf("\r\n\r\n"); + if (endOfHeaders === -1) { + debug("have not received end of HTTP headers yet..."); + read(); + return; + } + const firstLine = buffered.toString("ascii", 0, buffered.indexOf("\r\n")); + const statusCode = +firstLine.split(" ")[1]; + debug("got proxy server response: %o", firstLine); + resolve({ + statusCode, + buffered + }); + } + socket.on("error", onerror); + socket.on("close", onclose); + socket.on("end", onend); + read(); + }); + } + exports2.default = parseProxyResponse; } }); -// node_modules/call-bind-apply-helpers/reflectApply.js -var require_reflectApply = __commonJS({ - "node_modules/call-bind-apply-helpers/reflectApply.js"(exports2, module2) { +// node_modules/https-proxy-agent/dist/agent.js +var require_agent = __commonJS({ + "node_modules/https-proxy-agent/dist/agent.js"(exports2) { "use strict"; - module2.exports = typeof Reflect !== "undefined" && Reflect && Reflect.apply; + var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var net_1 = __importDefault(require("net")); + var tls_1 = __importDefault(require("tls")); + var url_1 = __importDefault(require("url")); + var assert_1 = __importDefault(require("assert")); + var debug_1 = __importDefault(require_src()); + var agent_base_1 = require_src2(); + var parse_proxy_response_1 = __importDefault(require_parse_proxy_response()); + var debug = debug_1.default("https-proxy-agent:agent"); + var HttpsProxyAgent2 = class extends agent_base_1.Agent { + constructor(_opts) { + let opts; + if (typeof _opts === "string") { + opts = url_1.default.parse(_opts); + } else { + opts = _opts; + } + if (!opts) { + throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!"); + } + debug("creating new HttpsProxyAgent instance: %o", opts); + super(opts); + const proxy = Object.assign({}, opts); + this.secureProxy = opts.secureProxy || isHTTPS(proxy.protocol); + proxy.host = proxy.hostname || proxy.host; + if (typeof proxy.port === "string") { + proxy.port = parseInt(proxy.port, 10); + } + if (!proxy.port && proxy.host) { + proxy.port = this.secureProxy ? 443 : 80; + } + if (this.secureProxy && !("ALPNProtocols" in proxy)) { + proxy.ALPNProtocols = ["http 1.1"]; + } + if (proxy.host && proxy.path) { + delete proxy.path; + delete proxy.pathname; + } + this.proxy = proxy; + } + /** + * Called when the node-core HTTP client library is creating a + * new HTTP request. + * + * @api protected + */ + callback(req, opts) { + return __awaiter(this, void 0, void 0, function* () { + const { proxy, secureProxy } = this; + let socket; + if (secureProxy) { + debug("Creating `tls.Socket`: %o", proxy); + socket = tls_1.default.connect(proxy); + } else { + debug("Creating `net.Socket`: %o", proxy); + socket = net_1.default.connect(proxy); + } + const headers = Object.assign({}, proxy.headers); + const hostname = `${opts.host}:${opts.port}`; + let payload = `CONNECT ${hostname} HTTP/1.1\r +`; + if (proxy.auth) { + headers["Proxy-Authorization"] = `Basic ${Buffer.from(proxy.auth).toString("base64")}`; + } + let { host, port, secureEndpoint } = opts; + if (!isDefaultPort(port, secureEndpoint)) { + host += `:${port}`; + } + headers.Host = host; + headers.Connection = "close"; + for (const name of Object.keys(headers)) { + payload += `${name}: ${headers[name]}\r +`; + } + const proxyResponsePromise = parse_proxy_response_1.default(socket); + socket.write(`${payload}\r +`); + const { statusCode, buffered } = yield proxyResponsePromise; + if (statusCode === 200) { + req.once("socket", resume); + if (opts.secureEndpoint) { + debug("Upgrading socket connection to TLS"); + const servername = opts.servername || opts.host; + return tls_1.default.connect(Object.assign(Object.assign({}, omit(opts, "host", "hostname", "path", "port")), { + socket, + servername + })); + } + return socket; + } + socket.destroy(); + const fakeSocket = new net_1.default.Socket({ writable: false }); + fakeSocket.readable = true; + req.once("socket", (s) => { + debug("replaying proxy buffer for failed request"); + assert_1.default(s.listenerCount("data") > 0); + s.push(buffered); + s.push(null); + }); + return fakeSocket; + }); + } + }; + exports2.default = HttpsProxyAgent2; + function resume(socket) { + socket.resume(); + } + function isDefaultPort(port, secure) { + return Boolean(!secure && port === 80 || secure && port === 443); + } + function isHTTPS(protocol) { + return typeof protocol === "string" ? /^https:?$/i.test(protocol) : false; + } + function omit(obj, ...keys) { + const ret = {}; + let key; + for (key in obj) { + if (!keys.includes(key)) { + ret[key] = obj[key]; + } + } + return ret; + } } }); -// node_modules/call-bind-apply-helpers/actualApply.js -var require_actualApply = __commonJS({ - "node_modules/call-bind-apply-helpers/actualApply.js"(exports2, module2) { +// node_modules/https-proxy-agent/dist/index.js +var require_dist = __commonJS({ + "node_modules/https-proxy-agent/dist/index.js"(exports2, module2) { "use strict"; - var bind2 = require_function_bind(); - var $apply = require_functionApply(); - var $call = require_functionCall(); - var $reflectApply = require_reflectApply(); - module2.exports = $reflectApply || bind2.call($call, $apply); + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + var agent_1 = __importDefault(require_agent()); + function createHttpsProxyAgent(opts) { + return new agent_1.default(opts); + } + (function(createHttpsProxyAgent2) { + createHttpsProxyAgent2.HttpsProxyAgent = agent_1.default; + createHttpsProxyAgent2.prototype = agent_1.default.prototype; + })(createHttpsProxyAgent || (createHttpsProxyAgent = {})); + module2.exports = createHttpsProxyAgent; } }); -// node_modules/call-bind-apply-helpers/index.js -var require_call_bind_apply_helpers = __commonJS({ - "node_modules/call-bind-apply-helpers/index.js"(exports2, module2) { - "use strict"; - var bind2 = require_function_bind(); - var $TypeError = require_type(); - var $call = require_functionCall(); - var $actualApply = require_actualApply(); - module2.exports = function callBindBasic(args) { - if (args.length < 1 || typeof args[0] !== "function") { - throw new $TypeError("a function is required"); +// node_modules/follow-redirects/debug.js +var require_debug = __commonJS({ + "node_modules/follow-redirects/debug.js"(exports2, module2) { + var debug; + module2.exports = function() { + if (!debug) { + try { + debug = require_src()("follow-redirects"); + } catch (error) { + } + if (typeof debug !== "function") { + debug = function() { + }; + } } - return $actualApply(bind2, $call, args); + debug.apply(null, arguments); }; } }); -// node_modules/dunder-proto/get.js -var require_get = __commonJS({ - "node_modules/dunder-proto/get.js"(exports2, module2) { - "use strict"; - var callBind = require_call_bind_apply_helpers(); - var gOPD = require_gopd(); - var hasProtoAccessor; - try { - hasProtoAccessor = /** @type {{ __proto__?: typeof Array.prototype }} */ - [].__proto__ === Array.prototype; - } catch (e) { - if (!e || typeof e !== "object" || !("code" in e) || e.code !== "ERR_PROTO_ACCESS") { - throw e; +// node_modules/follow-redirects/index.js +var require_follow_redirects = __commonJS({ + "node_modules/follow-redirects/index.js"(exports2, module2) { + var url2 = require("url"); + var URL2 = url2.URL; + var http3 = require("http"); + var https2 = require("https"); + var Writable = require("stream").Writable; + var assert = require("assert"); + var debug = require_debug(); + (function detectUnsupportedEnvironment() { + var looksLikeNode = typeof process !== "undefined"; + var looksLikeBrowser = typeof window !== "undefined" && typeof document !== "undefined"; + var looksLikeV8 = isFunction3(Error.captureStackTrace); + if (!looksLikeNode && (looksLikeBrowser || !looksLikeV8)) { + console.warn("The follow-redirects package should be excluded from browser builds."); } + })(); + var useNativeURL = false; + try { + assert(new URL2("")); + } catch (error) { + useNativeURL = error.code === "ERR_INVALID_URL"; } - var desc = !!hasProtoAccessor && gOPD && gOPD( - Object.prototype, - /** @type {keyof typeof Object.prototype} */ - "__proto__" + var sensitiveHeaders = [ + "Authorization", + "Proxy-Authorization", + "Cookie" + ]; + var preservedUrlFields = [ + "auth", + "host", + "hostname", + "href", + "path", + "pathname", + "port", + "protocol", + "query", + "search", + "hash" + ]; + var events = ["abort", "aborted", "connect", "error", "socket", "timeout"]; + var eventHandlers = /* @__PURE__ */ Object.create(null); + events.forEach(function(event) { + eventHandlers[event] = function(arg1, arg2, arg3) { + this._redirectable.emit(event, arg1, arg2, arg3); + }; + }); + var InvalidUrlError = createErrorType( + "ERR_INVALID_URL", + "Invalid URL", + TypeError ); - var $Object = Object; - var $getPrototypeOf = $Object.getPrototypeOf; - module2.exports = desc && typeof desc.get === "function" ? callBind([desc.get]) : typeof $getPrototypeOf === "function" ? ( - /** @type {import('./get')} */ - function getDunder(value) { - return $getPrototypeOf(value == null ? value : $Object(value)); - } - ) : false; - } -}); - -// node_modules/get-proto/index.js -var require_get_proto = __commonJS({ - "node_modules/get-proto/index.js"(exports2, module2) { - "use strict"; - var reflectGetProto = require_Reflect_getPrototypeOf(); - var originalGetProto = require_Object_getPrototypeOf(); - var getDunderProto = require_get(); - module2.exports = reflectGetProto ? function getProto(O) { - return reflectGetProto(O); - } : originalGetProto ? function getProto(O) { - if (!O || typeof O !== "object" && typeof O !== "function") { - throw new TypeError("getProto: not an object"); - } - return originalGetProto(O); - } : getDunderProto ? function getProto(O) { - return getDunderProto(O); - } : null; - } -}); - -// node_modules/hasown/index.js -var require_hasown = __commonJS({ - "node_modules/hasown/index.js"(exports2, module2) { - "use strict"; - var call = Function.prototype.call; - var $hasOwn = Object.prototype.hasOwnProperty; - var bind2 = require_function_bind(); - module2.exports = bind2.call(call, $hasOwn); - } -}); - -// node_modules/get-intrinsic/index.js -var require_get_intrinsic = __commonJS({ - "node_modules/get-intrinsic/index.js"(exports2, module2) { - "use strict"; - var undefined2; - var $Object = require_es_object_atoms(); - var $Error = require_es_errors(); - var $EvalError = require_eval(); - var $RangeError = require_range(); - var $ReferenceError = require_ref(); - var $SyntaxError = require_syntax(); - var $TypeError = require_type(); - var $URIError = require_uri(); - var abs = require_abs(); - var floor = require_floor(); - var max = require_max(); - var min = require_min(); - var pow = require_pow(); - var round = require_round(); - var sign = require_sign(); - var $Function = Function; - var getEvalledConstructor = function(expressionSyntax) { - try { - return $Function('"use strict"; return (' + expressionSyntax + ").constructor;")(); - } catch (e) { + var RedirectionError = createErrorType( + "ERR_FR_REDIRECTION_FAILURE", + "Redirected request failed" + ); + var TooManyRedirectsError = createErrorType( + "ERR_FR_TOO_MANY_REDIRECTS", + "Maximum number of redirects exceeded", + RedirectionError + ); + var MaxBodyLengthExceededError = createErrorType( + "ERR_FR_MAX_BODY_LENGTH_EXCEEDED", + "Request body larger than maxBodyLength limit" + ); + var WriteAfterEndError = createErrorType( + "ERR_STREAM_WRITE_AFTER_END", + "write after end" + ); + var destroy = Writable.prototype.destroy || noop2; + function RedirectableRequest(options, responseCallback) { + Writable.call(this); + this._sanitizeOptions(options); + this._options = options; + this._ended = false; + this._ending = false; + this._redirectCount = 0; + this._redirects = []; + this._requestBodyLength = 0; + this._requestBodyBuffers = []; + if (responseCallback) { + this.on("response", responseCallback); } + var self2 = this; + this._onNativeResponse = function(response) { + try { + self2._processResponse(response); + } catch (cause) { + self2.emit("error", cause instanceof RedirectionError ? cause : new RedirectionError({ cause })); + } + }; + this._headerFilter = new RegExp("^(?:" + sensitiveHeaders.concat(options.sensitiveHeaders).map(escapeRegex).join("|") + ")$", "i"); + this._performRequest(); + } + RedirectableRequest.prototype = Object.create(Writable.prototype); + RedirectableRequest.prototype.abort = function() { + destroyRequest(this._currentRequest); + this._currentRequest.abort(); + this.emit("abort"); }; - var $gOPD = require_gopd(); - var $defineProperty = require_es_define_property(); - var throwTypeError = function() { - throw new $TypeError(); + RedirectableRequest.prototype.destroy = function(error) { + destroyRequest(this._currentRequest, error); + destroy.call(this, error); + return this; }; - var ThrowTypeError = $gOPD ? function() { - try { - arguments.callee; - return throwTypeError; - } catch (calleeThrows) { - try { - return $gOPD(arguments, "callee").get; - } catch (gOPDthrows) { - return throwTypeError; + RedirectableRequest.prototype.write = function(data, encoding, callback) { + if (this._ending) { + throw new WriteAfterEndError(); + } + if (!isString2(data) && !isBuffer2(data)) { + throw new TypeError("data should be a string, Buffer or Uint8Array"); + } + if (isFunction3(encoding)) { + callback = encoding; + encoding = null; + } + if (data.length === 0) { + if (callback) { + callback(); } + return; + } + if (this._requestBodyLength + data.length <= this._options.maxBodyLength) { + this._requestBodyLength += data.length; + this._requestBodyBuffers.push({ data, encoding }); + this._currentRequest.write(data, encoding, callback); + } else { + this.emit("error", new MaxBodyLengthExceededError()); + this.abort(); } - }() : throwTypeError; - var hasSymbols = require_has_symbols()(); - var getProto = require_get_proto(); - var $ObjectGPO = require_Object_getPrototypeOf(); - var $ReflectGPO = require_Reflect_getPrototypeOf(); - var $apply = require_functionApply(); - var $call = require_functionCall(); - var needsEval = {}; - var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined2 : getProto(Uint8Array); - var INTRINSICS = { - __proto__: null, - "%AggregateError%": typeof AggregateError === "undefined" ? undefined2 : AggregateError, - "%Array%": Array, - "%ArrayBuffer%": typeof ArrayBuffer === "undefined" ? undefined2 : ArrayBuffer, - "%ArrayIteratorPrototype%": hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined2, - "%AsyncFromSyncIteratorPrototype%": undefined2, - "%AsyncFunction%": needsEval, - "%AsyncGenerator%": needsEval, - "%AsyncGeneratorFunction%": needsEval, - "%AsyncIteratorPrototype%": needsEval, - "%Atomics%": typeof Atomics === "undefined" ? undefined2 : Atomics, - "%BigInt%": typeof BigInt === "undefined" ? undefined2 : BigInt, - "%BigInt64Array%": typeof BigInt64Array === "undefined" ? undefined2 : BigInt64Array, - "%BigUint64Array%": typeof BigUint64Array === "undefined" ? undefined2 : BigUint64Array, - "%Boolean%": Boolean, - "%DataView%": typeof DataView === "undefined" ? undefined2 : DataView, - "%Date%": Date, - "%decodeURI%": decodeURI, - "%decodeURIComponent%": decodeURIComponent, - "%encodeURI%": encodeURI, - "%encodeURIComponent%": encodeURIComponent, - "%Error%": $Error, - "%eval%": eval, - // eslint-disable-line no-eval - "%EvalError%": $EvalError, - "%Float16Array%": typeof Float16Array === "undefined" ? undefined2 : Float16Array, - "%Float32Array%": typeof Float32Array === "undefined" ? undefined2 : Float32Array, - "%Float64Array%": typeof Float64Array === "undefined" ? undefined2 : Float64Array, - "%FinalizationRegistry%": typeof FinalizationRegistry === "undefined" ? undefined2 : FinalizationRegistry, - "%Function%": $Function, - "%GeneratorFunction%": needsEval, - "%Int8Array%": typeof Int8Array === "undefined" ? undefined2 : Int8Array, - "%Int16Array%": typeof Int16Array === "undefined" ? undefined2 : Int16Array, - "%Int32Array%": typeof Int32Array === "undefined" ? undefined2 : Int32Array, - "%isFinite%": isFinite, - "%isNaN%": isNaN, - "%IteratorPrototype%": hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined2, - "%JSON%": typeof JSON === "object" ? JSON : undefined2, - "%Map%": typeof Map === "undefined" ? undefined2 : Map, - "%MapIteratorPrototype%": typeof Map === "undefined" || !hasSymbols || !getProto ? undefined2 : getProto((/* @__PURE__ */ new Map())[Symbol.iterator]()), - "%Math%": Math, - "%Number%": Number, - "%Object%": $Object, - "%Object.getOwnPropertyDescriptor%": $gOPD, - "%parseFloat%": parseFloat, - "%parseInt%": parseInt, - "%Promise%": typeof Promise === "undefined" ? undefined2 : Promise, - "%Proxy%": typeof Proxy === "undefined" ? undefined2 : Proxy, - "%RangeError%": $RangeError, - "%ReferenceError%": $ReferenceError, - "%Reflect%": typeof Reflect === "undefined" ? undefined2 : Reflect, - "%RegExp%": RegExp, - "%Set%": typeof Set === "undefined" ? undefined2 : Set, - "%SetIteratorPrototype%": typeof Set === "undefined" || !hasSymbols || !getProto ? undefined2 : getProto((/* @__PURE__ */ new Set())[Symbol.iterator]()), - "%SharedArrayBuffer%": typeof SharedArrayBuffer === "undefined" ? undefined2 : SharedArrayBuffer, - "%String%": String, - "%StringIteratorPrototype%": hasSymbols && getProto ? getProto(""[Symbol.iterator]()) : undefined2, - "%Symbol%": hasSymbols ? Symbol : undefined2, - "%SyntaxError%": $SyntaxError, - "%ThrowTypeError%": ThrowTypeError, - "%TypedArray%": TypedArray, - "%TypeError%": $TypeError, - "%Uint8Array%": typeof Uint8Array === "undefined" ? undefined2 : Uint8Array, - "%Uint8ClampedArray%": typeof Uint8ClampedArray === "undefined" ? undefined2 : Uint8ClampedArray, - "%Uint16Array%": typeof Uint16Array === "undefined" ? undefined2 : Uint16Array, - "%Uint32Array%": typeof Uint32Array === "undefined" ? undefined2 : Uint32Array, - "%URIError%": $URIError, - "%WeakMap%": typeof WeakMap === "undefined" ? undefined2 : WeakMap, - "%WeakRef%": typeof WeakRef === "undefined" ? undefined2 : WeakRef, - "%WeakSet%": typeof WeakSet === "undefined" ? undefined2 : WeakSet, - "%Function.prototype.call%": $call, - "%Function.prototype.apply%": $apply, - "%Object.defineProperty%": $defineProperty, - "%Object.getPrototypeOf%": $ObjectGPO, - "%Math.abs%": abs, - "%Math.floor%": floor, - "%Math.max%": max, - "%Math.min%": min, - "%Math.pow%": pow, - "%Math.round%": round, - "%Math.sign%": sign, - "%Reflect.getPrototypeOf%": $ReflectGPO }; - if (getProto) { - try { - null.error; - } catch (e) { - errorProto = getProto(getProto(e)); - INTRINSICS["%Error.prototype%"] = errorProto; + RedirectableRequest.prototype.end = function(data, encoding, callback) { + if (isFunction3(data)) { + callback = data; + data = encoding = null; + } else if (isFunction3(encoding)) { + callback = encoding; + encoding = null; } - } - var errorProto; - var doEval = function doEval2(name) { - var value; - if (name === "%AsyncFunction%") { - value = getEvalledConstructor("async function () {}"); - } else if (name === "%GeneratorFunction%") { - value = getEvalledConstructor("function* () {}"); - } else if (name === "%AsyncGeneratorFunction%") { - value = getEvalledConstructor("async function* () {}"); - } else if (name === "%AsyncGenerator%") { - var fn = doEval2("%AsyncGeneratorFunction%"); - if (fn) { - value = fn.prototype; - } - } else if (name === "%AsyncIteratorPrototype%") { - var gen = doEval2("%AsyncGenerator%"); - if (gen && getProto) { - value = getProto(gen.prototype); - } + if (!data) { + this._ended = this._ending = true; + this._currentRequest.end(null, null, callback); + } else { + var self2 = this; + var currentRequest = this._currentRequest; + this.write(data, encoding, function() { + self2._ended = true; + currentRequest.end(null, null, callback); + }); + this._ending = true; } - INTRINSICS[name] = value; - return value; }; - var LEGACY_ALIASES = { - __proto__: null, - "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"], - "%ArrayPrototype%": ["Array", "prototype"], - "%ArrayProto_entries%": ["Array", "prototype", "entries"], - "%ArrayProto_forEach%": ["Array", "prototype", "forEach"], - "%ArrayProto_keys%": ["Array", "prototype", "keys"], - "%ArrayProto_values%": ["Array", "prototype", "values"], - "%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"], - "%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"], - "%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"], - "%BooleanPrototype%": ["Boolean", "prototype"], - "%DataViewPrototype%": ["DataView", "prototype"], - "%DatePrototype%": ["Date", "prototype"], - "%ErrorPrototype%": ["Error", "prototype"], - "%EvalErrorPrototype%": ["EvalError", "prototype"], - "%Float32ArrayPrototype%": ["Float32Array", "prototype"], - "%Float64ArrayPrototype%": ["Float64Array", "prototype"], - "%FunctionPrototype%": ["Function", "prototype"], - "%Generator%": ["GeneratorFunction", "prototype"], - "%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"], - "%Int8ArrayPrototype%": ["Int8Array", "prototype"], - "%Int16ArrayPrototype%": ["Int16Array", "prototype"], - "%Int32ArrayPrototype%": ["Int32Array", "prototype"], - "%JSONParse%": ["JSON", "parse"], - "%JSONStringify%": ["JSON", "stringify"], - "%MapPrototype%": ["Map", "prototype"], - "%NumberPrototype%": ["Number", "prototype"], - "%ObjectPrototype%": ["Object", "prototype"], - "%ObjProto_toString%": ["Object", "prototype", "toString"], - "%ObjProto_valueOf%": ["Object", "prototype", "valueOf"], - "%PromisePrototype%": ["Promise", "prototype"], - "%PromiseProto_then%": ["Promise", "prototype", "then"], - "%Promise_all%": ["Promise", "all"], - "%Promise_reject%": ["Promise", "reject"], - "%Promise_resolve%": ["Promise", "resolve"], - "%RangeErrorPrototype%": ["RangeError", "prototype"], - "%ReferenceErrorPrototype%": ["ReferenceError", "prototype"], - "%RegExpPrototype%": ["RegExp", "prototype"], - "%SetPrototype%": ["Set", "prototype"], - "%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"], - "%StringPrototype%": ["String", "prototype"], - "%SymbolPrototype%": ["Symbol", "prototype"], - "%SyntaxErrorPrototype%": ["SyntaxError", "prototype"], - "%TypedArrayPrototype%": ["TypedArray", "prototype"], - "%TypeErrorPrototype%": ["TypeError", "prototype"], - "%Uint8ArrayPrototype%": ["Uint8Array", "prototype"], - "%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"], - "%Uint16ArrayPrototype%": ["Uint16Array", "prototype"], - "%Uint32ArrayPrototype%": ["Uint32Array", "prototype"], - "%URIErrorPrototype%": ["URIError", "prototype"], - "%WeakMapPrototype%": ["WeakMap", "prototype"], - "%WeakSetPrototype%": ["WeakSet", "prototype"] + RedirectableRequest.prototype.setHeader = function(name, value) { + this._options.headers[name] = value; + this._currentRequest.setHeader(name, value); }; - var bind2 = require_function_bind(); - var hasOwn = require_hasown(); - var $concat = bind2.call($call, Array.prototype.concat); - var $spliceApply = bind2.call($apply, Array.prototype.splice); - var $replace = bind2.call($call, String.prototype.replace); - var $strSlice = bind2.call($call, String.prototype.slice); - var $exec = bind2.call($call, RegExp.prototype.exec); - var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; - var reEscapeChar = /\\(\\)?/g; - var stringToPath = function stringToPath2(string) { - var first = $strSlice(string, 0, 1); - var last = $strSlice(string, -1); - if (first === "%" && last !== "%") { - throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`"); - } else if (last === "%" && first !== "%") { - throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`"); - } - var result = []; - $replace(string, rePropName, function(match, number, quote, subString) { - result[result.length] = quote ? $replace(subString, reEscapeChar, "$1") : number || match; - }); - return result; + RedirectableRequest.prototype.removeHeader = function(name) { + delete this._options.headers[name]; + this._currentRequest.removeHeader(name); }; - var getBaseIntrinsic = function getBaseIntrinsic2(name, allowMissing) { - var intrinsicName = name; - var alias; - if (hasOwn(LEGACY_ALIASES, intrinsicName)) { - alias = LEGACY_ALIASES[intrinsicName]; - intrinsicName = "%" + alias[0] + "%"; + RedirectableRequest.prototype.setTimeout = function(msecs, callback) { + var self2 = this; + function destroyOnTimeout(socket) { + socket.setTimeout(msecs); + socket.removeListener("timeout", socket.destroy); + socket.addListener("timeout", socket.destroy); } - if (hasOwn(INTRINSICS, intrinsicName)) { - var value = INTRINSICS[intrinsicName]; - if (value === needsEval) { - value = doEval(intrinsicName); - } - if (typeof value === "undefined" && !allowMissing) { - throw new $TypeError("intrinsic " + name + " exists, but is not available. Please file an issue!"); + function startTimer(socket) { + if (self2._timeout) { + clearTimeout(self2._timeout); } - return { - alias, - name: intrinsicName, - value - }; - } - throw new $SyntaxError("intrinsic " + name + " does not exist!"); - }; - module2.exports = function GetIntrinsic(name, allowMissing) { - if (typeof name !== "string" || name.length === 0) { - throw new $TypeError("intrinsic name must be a non-empty string"); + self2._timeout = setTimeout(function() { + self2.emit("timeout"); + clearTimer(); + }, msecs); + destroyOnTimeout(socket); } - if (arguments.length > 1 && typeof allowMissing !== "boolean") { - throw new $TypeError('"allowMissing" argument must be a boolean'); + function clearTimer() { + if (self2._timeout) { + clearTimeout(self2._timeout); + self2._timeout = null; + } + self2.removeListener("abort", clearTimer); + self2.removeListener("error", clearTimer); + self2.removeListener("response", clearTimer); + self2.removeListener("close", clearTimer); + if (callback) { + self2.removeListener("timeout", callback); + } + if (!self2.socket) { + self2._currentRequest.removeListener("socket", startTimer); + } } - if ($exec(/^%?[^%]*%?$/, name) === null) { - throw new $SyntaxError("`%` may not be present anywhere but at the beginning and end of the intrinsic name"); + if (callback) { + this.on("timeout", callback); } - var parts = stringToPath(name); - var intrinsicBaseName = parts.length > 0 ? parts[0] : ""; - var intrinsic = getBaseIntrinsic("%" + intrinsicBaseName + "%", allowMissing); - var intrinsicRealName = intrinsic.name; - var value = intrinsic.value; - var skipFurtherCaching = false; - var alias = intrinsic.alias; - if (alias) { - intrinsicBaseName = alias[0]; - $spliceApply(parts, $concat([0, 1], alias)); + if (this.socket) { + startTimer(this.socket); + } else { + this._currentRequest.once("socket", startTimer); } - for (var i = 1, isOwn = true; i < parts.length; i += 1) { - var part = parts[i]; - var first = $strSlice(part, 0, 1); - var last = $strSlice(part, -1); - if ((first === '"' || first === "'" || first === "`" || (last === '"' || last === "'" || last === "`")) && first !== last) { - throw new $SyntaxError("property names with quotes must have matching quotes"); - } - if (part === "constructor" || !isOwn) { - skipFurtherCaching = true; + this.on("socket", destroyOnTimeout); + this.on("abort", clearTimer); + this.on("error", clearTimer); + this.on("response", clearTimer); + this.on("close", clearTimer); + return this; + }; + [ + "flushHeaders", + "getHeader", + "setNoDelay", + "setSocketKeepAlive" + ].forEach(function(method) { + RedirectableRequest.prototype[method] = function(a, b) { + return this._currentRequest[method](a, b); + }; + }); + ["aborted", "connection", "socket"].forEach(function(property) { + Object.defineProperty(RedirectableRequest.prototype, property, { + get: function() { + return this._currentRequest[property]; } - intrinsicBaseName += "." + part; - intrinsicRealName = "%" + intrinsicBaseName + "%"; - if (hasOwn(INTRINSICS, intrinsicRealName)) { - value = INTRINSICS[intrinsicRealName]; - } else if (value != null) { - if (!(part in value)) { - if (!allowMissing) { - throw new $TypeError("base intrinsic for " + name + " exists, but the property is not available."); - } - return void undefined2; - } - if ($gOPD && i + 1 >= parts.length) { - var desc = $gOPD(value, part); - isOwn = !!desc; - if (isOwn && "get" in desc && !("originalValue" in desc.get)) { - value = desc.get; - } else { - value = value[part]; - } - } else { - isOwn = hasOwn(value, part); - value = value[part]; - } - if (isOwn && !skipFurtherCaching) { - INTRINSICS[intrinsicRealName] = value; - } + }); + }); + RedirectableRequest.prototype._sanitizeOptions = function(options) { + if (!options.headers) { + options.headers = {}; + } else if (Array.isArray(options.headers)) { + var headerList = options.headers; + options.headers = {}; + for (var i = 0; i < headerList.length; i += 2) { + options.headers[headerList[i]] = headerList[i + 1]; } } - return value; - }; - } -}); - -// node_modules/define-data-property/index.js -var require_define_data_property = __commonJS({ - "node_modules/define-data-property/index.js"(exports2, module2) { - "use strict"; - var $defineProperty = require_es_define_property(); - var $SyntaxError = require_syntax(); - var $TypeError = require_type(); - var gopd = require_gopd(); - module2.exports = function defineDataProperty(obj, property, value) { - if (!obj || typeof obj !== "object" && typeof obj !== "function") { - throw new $TypeError("`obj` must be an object or a function`"); + if (!isArray2(options.sensitiveHeaders)) { + options.sensitiveHeaders = []; } - if (typeof property !== "string" && typeof property !== "symbol") { - throw new $TypeError("`property` must be a string or a symbol`"); + if (options.host) { + if (!options.hostname) { + options.hostname = options.host; + } + delete options.host; } - if (arguments.length > 3 && typeof arguments[3] !== "boolean" && arguments[3] !== null) { - throw new $TypeError("`nonEnumerable`, if provided, must be a boolean or null"); + if (!options.pathname && options.path) { + var searchPos = options.path.indexOf("?"); + if (searchPos < 0) { + options.pathname = options.path; + } else { + options.pathname = options.path.substring(0, searchPos); + options.search = options.path.substring(searchPos); + } } - if (arguments.length > 4 && typeof arguments[4] !== "boolean" && arguments[4] !== null) { - throw new $TypeError("`nonWritable`, if provided, must be a boolean or null"); + }; + RedirectableRequest.prototype._performRequest = function() { + var protocol = this._options.protocol; + var nativeProtocol = this._options.nativeProtocols[protocol]; + if (!nativeProtocol) { + throw new TypeError("Unsupported protocol " + protocol); } - if (arguments.length > 5 && typeof arguments[5] !== "boolean" && arguments[5] !== null) { - throw new $TypeError("`nonConfigurable`, if provided, must be a boolean or null"); + if (this._options.agents) { + var scheme = protocol.slice(0, -1); + this._options.agent = this._options.agents[scheme]; } - if (arguments.length > 6 && typeof arguments[6] !== "boolean") { - throw new $TypeError("`loose`, if provided, must be a boolean"); + var request = this._currentRequest = nativeProtocol.request(this._options, this._onNativeResponse); + request._redirectable = this; + for (var event of events) { + request.on(event, eventHandlers[event]); } - var nonEnumerable = arguments.length > 3 ? arguments[3] : null; - var nonWritable = arguments.length > 4 ? arguments[4] : null; - var nonConfigurable = arguments.length > 5 ? arguments[5] : null; - var loose = arguments.length > 6 ? arguments[6] : false; - var desc = !!gopd && gopd(obj, property); - if ($defineProperty) { - $defineProperty(obj, property, { - configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable, - enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable, - value, - writable: nonWritable === null && desc ? desc.writable : !nonWritable - }); - } else if (loose || !nonEnumerable && !nonWritable && !nonConfigurable) { - obj[property] = value; - } else { - throw new $SyntaxError("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable."); + this._currentUrl = /^\//.test(this._options.path) ? url2.format(this._options) : ( + // When making a request to a proxy, […] + // a client MUST send the target URI in absolute-form […]. + this._options.path + ); + if (this._isRedirect) { + var i = 0; + var self2 = this; + var buffers = this._requestBodyBuffers; + (function writeNext(error) { + if (request === self2._currentRequest) { + if (error) { + self2.emit("error", error); + } else if (i < buffers.length) { + var buffer = buffers[i++]; + if (!request.finished) { + request.write(buffer.data, buffer.encoding, writeNext); + } + } else if (self2._ended) { + request.end(); + } + } + })(); } }; - } -}); - -// node_modules/has-property-descriptors/index.js -var require_has_property_descriptors = __commonJS({ - "node_modules/has-property-descriptors/index.js"(exports2, module2) { - "use strict"; - var $defineProperty = require_es_define_property(); - var hasPropertyDescriptors = function hasPropertyDescriptors2() { - return !!$defineProperty; - }; - hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() { - if (!$defineProperty) { - return null; + RedirectableRequest.prototype._processResponse = function(response) { + var statusCode = response.statusCode; + if (this._options.trackRedirects) { + this._redirects.push({ + url: this._currentUrl, + headers: response.headers, + statusCode + }); } - try { - return $defineProperty([], "length", { value: 1 }).length !== 1; - } catch (e) { - return true; + var location = response.headers.location; + if (!location || this._options.followRedirects === false || statusCode < 300 || statusCode >= 400) { + response.responseUrl = this._currentUrl; + response.redirects = this._redirects; + this.emit("response", response); + this._requestBodyBuffers = []; + return; } - }; - module2.exports = hasPropertyDescriptors; - } -}); - -// node_modules/set-function-length/index.js -var require_set_function_length = __commonJS({ - "node_modules/set-function-length/index.js"(exports2, module2) { - "use strict"; - var GetIntrinsic = require_get_intrinsic(); - var define = require_define_data_property(); - var hasDescriptors = require_has_property_descriptors()(); - var gOPD = require_gopd(); - var $TypeError = require_type(); - var $floor = GetIntrinsic("%Math.floor%"); - module2.exports = function setFunctionLength(fn, length) { - if (typeof fn !== "function") { - throw new $TypeError("`fn` is not a function"); + destroyRequest(this._currentRequest); + response.destroy(); + if (++this._redirectCount > this._options.maxRedirects) { + throw new TooManyRedirectsError(); } - if (typeof length !== "number" || length < 0 || length > 4294967295 || $floor(length) !== length) { - throw new $TypeError("`length` must be a positive 32-bit integer"); + var requestHeaders; + var beforeRedirect = this._options.beforeRedirect; + if (beforeRedirect) { + requestHeaders = Object.assign({ + // The Host header was set by nativeProtocol.request + Host: response.req.getHeader("host") + }, this._options.headers); } - var loose = arguments.length > 2 && !!arguments[2]; - var functionLengthIsConfigurable = true; - var functionLengthIsWritable = true; - if ("length" in fn && gOPD) { - var desc = gOPD(fn, "length"); - if (desc && !desc.configurable) { - functionLengthIsConfigurable = false; - } - if (desc && !desc.writable) { - functionLengthIsWritable = false; - } + var method = this._options.method; + if ((statusCode === 301 || statusCode === 302) && this._options.method === "POST" || // RFC7231§6.4.4: The 303 (See Other) status code indicates that + // the server is redirecting the user agent to a different resource […] + // A user agent can perform a retrieval request targeting that URI + // (a GET or HEAD request if using HTTP) […] + statusCode === 303 && !/^(?:GET|HEAD)$/.test(this._options.method)) { + this._options.method = "GET"; + this._requestBodyBuffers = []; + removeMatchingHeaders(/^content-/i, this._options.headers); } - if (functionLengthIsConfigurable || functionLengthIsWritable || !loose) { - if (hasDescriptors) { - define( - /** @type {Parameters[0]} */ - fn, - "length", - length, - true, - true - ); - } else { - define( - /** @type {Parameters[0]} */ - fn, - "length", - length - ); - } + var currentHostHeader = removeMatchingHeaders(/^host$/i, this._options.headers); + var currentUrlParts = parseUrl2(this._currentUrl); + var currentHost = currentHostHeader || currentUrlParts.host; + var currentUrl = /^\w+:/.test(location) ? this._currentUrl : url2.format(Object.assign(currentUrlParts, { host: currentHost })); + var redirectUrl = resolveUrl(location, currentUrl); + debug("redirecting to", redirectUrl.href); + this._isRedirect = true; + spreadUrlObject(redirectUrl, this._options); + if (redirectUrl.protocol !== currentUrlParts.protocol && redirectUrl.protocol !== "https:" || redirectUrl.host !== currentHost && !isSubdomain(redirectUrl.host, currentHost)) { + removeMatchingHeaders(this._headerFilter, this._options.headers); } - return fn; - }; - } -}); - -// node_modules/call-bind/index.js -var require_call_bind = __commonJS({ - "node_modules/call-bind/index.js"(exports2, module2) { - "use strict"; - var bind2 = require_function_bind(); - var GetIntrinsic = require_get_intrinsic(); - var setFunctionLength = require_set_function_length(); - var $TypeError = require_type(); - var $apply = GetIntrinsic("%Function.prototype.apply%"); - var $call = GetIntrinsic("%Function.prototype.call%"); - var $reflectApply = GetIntrinsic("%Reflect.apply%", true) || bind2.call($call, $apply); - var $defineProperty = require_es_define_property(); - var $max = GetIntrinsic("%Math.max%"); - module2.exports = function callBind(originalFunction) { - if (typeof originalFunction !== "function") { - throw new $TypeError("a function is required"); + if (isFunction3(beforeRedirect)) { + var responseDetails = { + headers: response.headers, + statusCode + }; + var requestDetails = { + url: currentUrl, + method, + headers: requestHeaders + }; + beforeRedirect(this._options, responseDetails, requestDetails); + this._sanitizeOptions(this._options); } - var func = $reflectApply(bind2, $call, arguments); - return setFunctionLength( - func, - 1 + $max(0, originalFunction.length - (arguments.length - 1)), - true - ); - }; - var applyBind = function applyBind2() { - return $reflectApply(bind2, $apply, arguments); + this._performRequest(); }; - if ($defineProperty) { - $defineProperty(module2.exports, "apply", { value: applyBind }); - } else { - module2.exports.apply = applyBind; + function wrap(protocols) { + var exports3 = { + maxRedirects: 21, + maxBodyLength: 10 * 1024 * 1024 + }; + var nativeProtocols = {}; + Object.keys(protocols).forEach(function(scheme) { + var protocol = scheme + ":"; + var nativeProtocol = nativeProtocols[protocol] = protocols[scheme]; + var wrappedProtocol = exports3[scheme] = Object.create(nativeProtocol); + function request(input, options, callback) { + if (isURL(input)) { + input = spreadUrlObject(input); + } else if (isString2(input)) { + input = spreadUrlObject(parseUrl2(input)); + } else { + callback = options; + options = validateUrl(input); + input = { protocol }; + } + if (isFunction3(options)) { + callback = options; + options = null; + } + options = Object.assign({ + maxRedirects: exports3.maxRedirects, + maxBodyLength: exports3.maxBodyLength + }, input, options); + options.nativeProtocols = nativeProtocols; + if (!isString2(options.host) && !isString2(options.hostname)) { + options.hostname = "::1"; + } + assert.equal(options.protocol, protocol, "protocol mismatch"); + debug("options", options); + return new RedirectableRequest(options, callback); + } + function get(input, options, callback) { + var wrappedRequest = wrappedProtocol.request(input, options, callback); + wrappedRequest.end(); + return wrappedRequest; + } + Object.defineProperties(wrappedProtocol, { + request: { value: request, configurable: true, enumerable: true, writable: true }, + get: { value: get, configurable: true, enumerable: true, writable: true } + }); + }); + return exports3; } - } -}); - -// node_modules/call-bind/callBound.js -var require_callBound = __commonJS({ - "node_modules/call-bind/callBound.js"(exports2, module2) { - "use strict"; - var GetIntrinsic = require_get_intrinsic(); - var callBind = require_call_bind(); - var $indexOf = callBind(GetIntrinsic("String.prototype.indexOf")); - module2.exports = function callBoundIntrinsic(name, allowMissing) { - var intrinsic = GetIntrinsic(name, !!allowMissing); - if (typeof intrinsic === "function" && $indexOf(name, ".prototype.") > -1) { - return callBind(intrinsic); - } - return intrinsic; - }; - } -}); - -// node_modules/object-inspect/util.inspect.js -var require_util_inspect = __commonJS({ - "node_modules/object-inspect/util.inspect.js"(exports2, module2) { - module2.exports = require("util").inspect; - } -}); - -// node_modules/object-inspect/index.js -var require_object_inspect = __commonJS({ - "node_modules/object-inspect/index.js"(exports2, module2) { - var hasMap = typeof Map === "function" && Map.prototype; - var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null; - var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === "function" ? mapSizeDescriptor.get : null; - var mapForEach = hasMap && Map.prototype.forEach; - var hasSet = typeof Set === "function" && Set.prototype; - var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null; - var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === "function" ? setSizeDescriptor.get : null; - var setForEach = hasSet && Set.prototype.forEach; - var hasWeakMap = typeof WeakMap === "function" && WeakMap.prototype; - var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null; - var hasWeakSet = typeof WeakSet === "function" && WeakSet.prototype; - var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null; - var hasWeakRef = typeof WeakRef === "function" && WeakRef.prototype; - var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null; - var booleanValueOf = Boolean.prototype.valueOf; - var objectToString = Object.prototype.toString; - var functionToString = Function.prototype.toString; - var $match = String.prototype.match; - var $slice = String.prototype.slice; - var $replace = String.prototype.replace; - var $toUpperCase = String.prototype.toUpperCase; - var $toLowerCase = String.prototype.toLowerCase; - var $test = RegExp.prototype.test; - var $concat = Array.prototype.concat; - var $join = Array.prototype.join; - var $arrSlice = Array.prototype.slice; - var $floor = Math.floor; - var bigIntValueOf = typeof BigInt === "function" ? BigInt.prototype.valueOf : null; - var gOPS = Object.getOwnPropertySymbols; - var symToString = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? Symbol.prototype.toString : null; - var hasShammedSymbols = typeof Symbol === "function" && typeof Symbol.iterator === "object"; - var toStringTag = typeof Symbol === "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? "object" : "symbol") ? Symbol.toStringTag : null; - var isEnumerable = Object.prototype.propertyIsEnumerable; - var gPO = (typeof Reflect === "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(O) { - return O.__proto__; - } : null); - function addNumericSeparator(num, str) { - if (num === Infinity || num === -Infinity || num !== num || num && num > -1e3 && num < 1e3 || $test.call(/e/, str)) { - return str; - } - var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g; - if (typeof num === "number") { - var int = num < 0 ? -$floor(-num) : $floor(num); - if (int !== num) { - var intStr = String(int); - var dec = $slice.call(str, intStr.length + 1); - return $replace.call(intStr, sepRegex, "$&_") + "." + $replace.call($replace.call(dec, /([0-9]{3})/g, "$&_"), /_$/, ""); + function noop2() { + } + function parseUrl2(input) { + var parsed; + if (useNativeURL) { + parsed = new URL2(input); + } else { + parsed = validateUrl(url2.parse(input)); + if (!isString2(parsed.protocol)) { + throw new InvalidUrlError({ input }); } } - return $replace.call(str, sepRegex, "$&_"); + return parsed; } - var utilInspect = require_util_inspect(); - var inspectCustom = utilInspect.custom; - var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null; - module2.exports = function inspect_(obj, options, depth, seen) { - var opts = options || {}; - if (has(opts, "quoteStyle") && (opts.quoteStyle !== "single" && opts.quoteStyle !== "double")) { - throw new TypeError('option "quoteStyle" must be "single" or "double"'); - } - if (has(opts, "maxStringLength") && (typeof opts.maxStringLength === "number" ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity : opts.maxStringLength !== null)) { - throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`'); - } - var customInspect = has(opts, "customInspect") ? opts.customInspect : true; - if (typeof customInspect !== "boolean" && customInspect !== "symbol") { - throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`"); + function resolveUrl(relative, base) { + return useNativeURL ? new URL2(relative, base) : parseUrl2(url2.resolve(base, relative)); + } + function validateUrl(input) { + if (/^\[/.test(input.hostname) && !/^\[[:0-9a-f]+\]$/i.test(input.hostname)) { + throw new InvalidUrlError({ input: input.href || input }); } - if (has(opts, "indent") && opts.indent !== null && opts.indent !== " " && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)) { - throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`'); + if (/^\[/.test(input.host) && !/^\[[:0-9a-f]+\](:\d+)?$/i.test(input.host)) { + throw new InvalidUrlError({ input: input.href || input }); } - if (has(opts, "numericSeparator") && typeof opts.numericSeparator !== "boolean") { - throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`'); + return input; + } + function spreadUrlObject(urlObject, target) { + var spread3 = target || {}; + for (var key of preservedUrlFields) { + spread3[key] = urlObject[key]; } - var numericSeparator = opts.numericSeparator; - if (typeof obj === "undefined") { - return "undefined"; + if (spread3.hostname.startsWith("[")) { + spread3.hostname = spread3.hostname.slice(1, -1); } - if (obj === null) { - return "null"; + if (spread3.port !== "") { + spread3.port = Number(spread3.port); } - if (typeof obj === "boolean") { - return obj ? "true" : "false"; + spread3.path = spread3.search ? spread3.pathname + spread3.search : spread3.pathname; + return spread3; + } + function removeMatchingHeaders(regex, headers) { + var lastValue; + for (var header in headers) { + if (regex.test(header)) { + lastValue = headers[header]; + delete headers[header]; + } } - if (typeof obj === "string") { - return inspectString(obj, opts); + return lastValue === null || typeof lastValue === "undefined" ? void 0 : String(lastValue).trim(); + } + function createErrorType(code, message, baseClass) { + function CustomError(properties) { + if (isFunction3(Error.captureStackTrace)) { + Error.captureStackTrace(this, this.constructor); + } + Object.assign(this, properties || {}); + this.code = code; + this.message = this.cause ? message + ": " + this.cause.message : message; } - if (typeof obj === "number") { - if (obj === 0) { - return Infinity / obj > 0 ? "0" : "-0"; + CustomError.prototype = new (baseClass || Error)(); + Object.defineProperties(CustomError.prototype, { + constructor: { + value: CustomError, + enumerable: false + }, + name: { + value: "Error [" + code + "]", + enumerable: false } - var str = String(obj); - return numericSeparator ? addNumericSeparator(obj, str) : str; + }); + return CustomError; + } + function destroyRequest(request, error) { + for (var event of events) { + request.removeListener(event, eventHandlers[event]); } - if (typeof obj === "bigint") { - var bigIntStr = String(obj) + "n"; - return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr; + request.on("error", noop2); + request.destroy(error); + } + function isSubdomain(subdomain, domain) { + assert(isString2(subdomain) && isString2(domain)); + var dot = subdomain.length - domain.length - 1; + return dot > 0 && subdomain[dot] === "." && subdomain.endsWith(domain); + } + function isArray2(value) { + return value instanceof Array; + } + function isString2(value) { + return typeof value === "string" || value instanceof String; + } + function isFunction3(value) { + return typeof value === "function"; + } + function isBuffer2(value) { + return typeof value === "object" && "length" in value; + } + function isURL(value) { + return URL2 && value instanceof URL2; + } + function escapeRegex(regex) { + return regex.replace(/[[\]\\/()*+?.^$|]/g, "\\$&"); + } + module2.exports = wrap({ http: http3, https: https2 }); + module2.exports.wrap = wrap; + } +}); + +// node_modules/define-data-property/index.js +var require_define_data_property = __commonJS({ + "node_modules/define-data-property/index.js"(exports2, module2) { + "use strict"; + var $defineProperty = require_es_define_property(); + var $SyntaxError = require_syntax(); + var $TypeError = require_type(); + var gopd = require_gopd(); + module2.exports = function defineDataProperty(obj, property, value) { + if (!obj || typeof obj !== "object" && typeof obj !== "function") { + throw new $TypeError("`obj` must be an object or a function`"); } - var maxDepth = typeof opts.depth === "undefined" ? 5 : opts.depth; - if (typeof depth === "undefined") { - depth = 0; + if (typeof property !== "string" && typeof property !== "symbol") { + throw new $TypeError("`property` must be a string or a symbol`"); } - if (depth >= maxDepth && maxDepth > 0 && typeof obj === "object") { - return isArray2(obj) ? "[Array]" : "[Object]"; + if (arguments.length > 3 && typeof arguments[3] !== "boolean" && arguments[3] !== null) { + throw new $TypeError("`nonEnumerable`, if provided, must be a boolean or null"); } - var indent = getIndent(opts, depth); - if (typeof seen === "undefined") { - seen = []; - } else if (indexOf(seen, obj) >= 0) { - return "[Circular]"; + if (arguments.length > 4 && typeof arguments[4] !== "boolean" && arguments[4] !== null) { + throw new $TypeError("`nonWritable`, if provided, must be a boolean or null"); } - function inspect(value, from, noIndent) { - if (from) { - seen = $arrSlice.call(seen); - seen.push(from); - } - if (noIndent) { - var newOpts = { - depth: opts.depth - }; - if (has(opts, "quoteStyle")) { - newOpts.quoteStyle = opts.quoteStyle; - } - return inspect_(value, newOpts, depth + 1, seen); - } - return inspect_(value, opts, depth + 1, seen); + if (arguments.length > 5 && typeof arguments[5] !== "boolean" && arguments[5] !== null) { + throw new $TypeError("`nonConfigurable`, if provided, must be a boolean or null"); } - if (typeof obj === "function" && !isRegExp2(obj)) { - var name = nameOf(obj); - var keys = arrObjKeys(obj, inspect); - return "[Function" + (name ? ": " + name : " (anonymous)") + "]" + (keys.length > 0 ? " { " + $join.call(keys, ", ") + " }" : ""); + if (arguments.length > 6 && typeof arguments[6] !== "boolean") { + throw new $TypeError("`loose`, if provided, must be a boolean"); } - if (isSymbol(obj)) { - var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, "$1") : symToString.call(obj); - return typeof obj === "object" && !hasShammedSymbols ? markBoxed(symString) : symString; + var nonEnumerable = arguments.length > 3 ? arguments[3] : null; + var nonWritable = arguments.length > 4 ? arguments[4] : null; + var nonConfigurable = arguments.length > 5 ? arguments[5] : null; + var loose = arguments.length > 6 ? arguments[6] : false; + var desc = !!gopd && gopd(obj, property); + if ($defineProperty) { + $defineProperty(obj, property, { + configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable, + enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable, + value, + writable: nonWritable === null && desc ? desc.writable : !nonWritable + }); + } else if (loose || !nonEnumerable && !nonWritable && !nonConfigurable) { + obj[property] = value; + } else { + throw new $SyntaxError("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable."); } - if (isElement(obj)) { - var s = "<" + $toLowerCase.call(String(obj.nodeName)); - var attrs = obj.attributes || []; - for (var i = 0; i < attrs.length; i++) { - s += " " + attrs[i].name + "=" + wrapQuotes(quote(attrs[i].value), "double", opts); - } - s += ">"; - if (obj.childNodes && obj.childNodes.length) { - s += "..."; - } - s += ""; - return s; + }; + } +}); + +// node_modules/has-property-descriptors/index.js +var require_has_property_descriptors = __commonJS({ + "node_modules/has-property-descriptors/index.js"(exports2, module2) { + "use strict"; + var $defineProperty = require_es_define_property(); + var hasPropertyDescriptors = function hasPropertyDescriptors2() { + return !!$defineProperty; + }; + hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() { + if (!$defineProperty) { + return null; } - if (isArray2(obj)) { - if (obj.length === 0) { - return "[]"; - } - var xs = arrObjKeys(obj, inspect); - if (indent && !singleLineValues(xs)) { - return "[" + indentedJoin(xs, indent) + "]"; - } - return "[ " + $join.call(xs, ", ") + " ]"; + try { + return $defineProperty([], "length", { value: 1 }).length !== 1; + } catch (e) { + return true; } - if (isError(obj)) { - var parts = arrObjKeys(obj, inspect); - if (!("cause" in Error.prototype) && "cause" in obj && !isEnumerable.call(obj, "cause")) { - return "{ [" + String(obj) + "] " + $join.call($concat.call("[cause]: " + inspect(obj.cause), parts), ", ") + " }"; + }; + module2.exports = hasPropertyDescriptors; + } +}); + +// node_modules/set-function-length/index.js +var require_set_function_length = __commonJS({ + "node_modules/set-function-length/index.js"(exports2, module2) { + "use strict"; + var GetIntrinsic = require_get_intrinsic(); + var define = require_define_data_property(); + var hasDescriptors = require_has_property_descriptors()(); + var gOPD = require_gopd(); + var $TypeError = require_type(); + var $floor = GetIntrinsic("%Math.floor%"); + module2.exports = function setFunctionLength(fn, length) { + if (typeof fn !== "function") { + throw new $TypeError("`fn` is not a function"); + } + if (typeof length !== "number" || length < 0 || length > 4294967295 || $floor(length) !== length) { + throw new $TypeError("`length` must be a positive 32-bit integer"); + } + var loose = arguments.length > 2 && !!arguments[2]; + var functionLengthIsConfigurable = true; + var functionLengthIsWritable = true; + if ("length" in fn && gOPD) { + var desc = gOPD(fn, "length"); + if (desc && !desc.configurable) { + functionLengthIsConfigurable = false; } - if (parts.length === 0) { - return "[" + String(obj) + "]"; + if (desc && !desc.writable) { + functionLengthIsWritable = false; } - return "{ [" + String(obj) + "] " + $join.call(parts, ", ") + " }"; } - if (typeof obj === "object" && customInspect) { - if (inspectSymbol && typeof obj[inspectSymbol] === "function" && utilInspect) { - return utilInspect(obj, { depth: maxDepth - depth }); - } else if (customInspect !== "symbol" && typeof obj.inspect === "function") { - return obj.inspect(); + if (functionLengthIsConfigurable || functionLengthIsWritable || !loose) { + if (hasDescriptors) { + define( + /** @type {Parameters[0]} */ + fn, + "length", + length, + true, + true + ); + } else { + define( + /** @type {Parameters[0]} */ + fn, + "length", + length + ); } } - if (isMap(obj)) { - var mapParts = []; - if (mapForEach) { - mapForEach.call(obj, function(value, key) { - mapParts.push(inspect(key, obj, true) + " => " + inspect(value, obj)); - }); - } - return collectionOf("Map", mapSize.call(obj), mapParts, indent); + return fn; + }; + } +}); + +// node_modules/call-bind/index.js +var require_call_bind = __commonJS({ + "node_modules/call-bind/index.js"(exports2, module2) { + "use strict"; + var bind2 = require_function_bind(); + var GetIntrinsic = require_get_intrinsic(); + var setFunctionLength = require_set_function_length(); + var $TypeError = require_type(); + var $apply = GetIntrinsic("%Function.prototype.apply%"); + var $call = GetIntrinsic("%Function.prototype.call%"); + var $reflectApply = GetIntrinsic("%Reflect.apply%", true) || bind2.call($call, $apply); + var $defineProperty = require_es_define_property(); + var $max = GetIntrinsic("%Math.max%"); + module2.exports = function callBind(originalFunction) { + if (typeof originalFunction !== "function") { + throw new $TypeError("a function is required"); } - if (isSet(obj)) { - var setParts = []; - if (setForEach) { - setForEach.call(obj, function(value) { - setParts.push(inspect(value, obj)); - }); - } - return collectionOf("Set", setSize.call(obj), setParts, indent); + var func = $reflectApply(bind2, $call, arguments); + return setFunctionLength( + func, + 1 + $max(0, originalFunction.length - (arguments.length - 1)), + true + ); + }; + var applyBind = function applyBind2() { + return $reflectApply(bind2, $apply, arguments); + }; + if ($defineProperty) { + $defineProperty(module2.exports, "apply", { value: applyBind }); + } else { + module2.exports.apply = applyBind; + } + } +}); + +// node_modules/call-bind/callBound.js +var require_callBound = __commonJS({ + "node_modules/call-bind/callBound.js"(exports2, module2) { + "use strict"; + var GetIntrinsic = require_get_intrinsic(); + var callBind = require_call_bind(); + var $indexOf = callBind(GetIntrinsic("String.prototype.indexOf")); + module2.exports = function callBoundIntrinsic(name, allowMissing) { + var intrinsic = GetIntrinsic(name, !!allowMissing); + if (typeof intrinsic === "function" && $indexOf(name, ".prototype.") > -1) { + return callBind(intrinsic); } - if (isWeakMap(obj)) { - return weakCollectionOf("WeakMap"); + return intrinsic; + }; + } +}); + +// node_modules/object-inspect/util.inspect.js +var require_util_inspect = __commonJS({ + "node_modules/object-inspect/util.inspect.js"(exports2, module2) { + module2.exports = require("util").inspect; + } +}); + +// node_modules/object-inspect/index.js +var require_object_inspect = __commonJS({ + "node_modules/object-inspect/index.js"(exports2, module2) { + var hasMap = typeof Map === "function" && Map.prototype; + var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null; + var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === "function" ? mapSizeDescriptor.get : null; + var mapForEach = hasMap && Map.prototype.forEach; + var hasSet = typeof Set === "function" && Set.prototype; + var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null; + var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === "function" ? setSizeDescriptor.get : null; + var setForEach = hasSet && Set.prototype.forEach; + var hasWeakMap = typeof WeakMap === "function" && WeakMap.prototype; + var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null; + var hasWeakSet = typeof WeakSet === "function" && WeakSet.prototype; + var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null; + var hasWeakRef = typeof WeakRef === "function" && WeakRef.prototype; + var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null; + var booleanValueOf = Boolean.prototype.valueOf; + var objectToString = Object.prototype.toString; + var functionToString = Function.prototype.toString; + var $match = String.prototype.match; + var $slice = String.prototype.slice; + var $replace = String.prototype.replace; + var $toUpperCase = String.prototype.toUpperCase; + var $toLowerCase = String.prototype.toLowerCase; + var $test = RegExp.prototype.test; + var $concat = Array.prototype.concat; + var $join = Array.prototype.join; + var $arrSlice = Array.prototype.slice; + var $floor = Math.floor; + var bigIntValueOf = typeof BigInt === "function" ? BigInt.prototype.valueOf : null; + var gOPS = Object.getOwnPropertySymbols; + var symToString = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? Symbol.prototype.toString : null; + var hasShammedSymbols = typeof Symbol === "function" && typeof Symbol.iterator === "object"; + var toStringTag2 = typeof Symbol === "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? "object" : "symbol") ? Symbol.toStringTag : null; + var isEnumerable = Object.prototype.propertyIsEnumerable; + var gPO = (typeof Reflect === "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(O) { + return O.__proto__; + } : null); + function addNumericSeparator(num, str) { + if (num === Infinity || num === -Infinity || num !== num || num && num > -1e3 && num < 1e3 || $test.call(/e/, str)) { + return str; } - if (isWeakSet(obj)) { - return weakCollectionOf("WeakSet"); + var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g; + if (typeof num === "number") { + var int = num < 0 ? -$floor(-num) : $floor(num); + if (int !== num) { + var intStr = String(int); + var dec = $slice.call(str, intStr.length + 1); + return $replace.call(intStr, sepRegex, "$&_") + "." + $replace.call($replace.call(dec, /([0-9]{3})/g, "$&_"), /_$/, ""); + } } - if (isWeakRef(obj)) { - return weakCollectionOf("WeakRef"); + return $replace.call(str, sepRegex, "$&_"); + } + var utilInspect = require_util_inspect(); + var inspectCustom = utilInspect.custom; + var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null; + module2.exports = function inspect_(obj, options, depth, seen) { + var opts = options || {}; + if (has(opts, "quoteStyle") && (opts.quoteStyle !== "single" && opts.quoteStyle !== "double")) { + throw new TypeError('option "quoteStyle" must be "single" or "double"'); } - if (isNumber2(obj)) { - return markBoxed(inspect(Number(obj))); + if (has(opts, "maxStringLength") && (typeof opts.maxStringLength === "number" ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity : opts.maxStringLength !== null)) { + throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`'); } - if (isBigInt(obj)) { - return markBoxed(inspect(bigIntValueOf.call(obj))); + var customInspect = has(opts, "customInspect") ? opts.customInspect : true; + if (typeof customInspect !== "boolean" && customInspect !== "symbol") { + throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`"); } - if (isBoolean2(obj)) { - return markBoxed(booleanValueOf.call(obj)); + if (has(opts, "indent") && opts.indent !== null && opts.indent !== " " && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)) { + throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`'); } - if (isString2(obj)) { - return markBoxed(inspect(String(obj))); + if (has(opts, "numericSeparator") && typeof opts.numericSeparator !== "boolean") { + throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`'); } - if (typeof window !== "undefined" && obj === window) { - return "{ [object Window] }"; + var numericSeparator = opts.numericSeparator; + if (typeof obj === "undefined") { + return "undefined"; } - if (typeof globalThis !== "undefined" && obj === globalThis || typeof global !== "undefined" && obj === global) { - return "{ [object globalThis] }"; + if (obj === null) { + return "null"; + } + if (typeof obj === "boolean") { + return obj ? "true" : "false"; + } + if (typeof obj === "string") { + return inspectString(obj, opts); + } + if (typeof obj === "number") { + if (obj === 0) { + return Infinity / obj > 0 ? "0" : "-0"; + } + var str = String(obj); + return numericSeparator ? addNumericSeparator(obj, str) : str; + } + if (typeof obj === "bigint") { + var bigIntStr = String(obj) + "n"; + return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr; + } + var maxDepth = typeof opts.depth === "undefined" ? 5 : opts.depth; + if (typeof depth === "undefined") { + depth = 0; + } + if (depth >= maxDepth && maxDepth > 0 && typeof obj === "object") { + return isArray2(obj) ? "[Array]" : "[Object]"; + } + var indent = getIndent(opts, depth); + if (typeof seen === "undefined") { + seen = []; + } else if (indexOf(seen, obj) >= 0) { + return "[Circular]"; + } + function inspect(value, from, noIndent) { + if (from) { + seen = $arrSlice.call(seen); + seen.push(from); + } + if (noIndent) { + var newOpts = { + depth: opts.depth + }; + if (has(opts, "quoteStyle")) { + newOpts.quoteStyle = opts.quoteStyle; + } + return inspect_(value, newOpts, depth + 1, seen); + } + return inspect_(value, opts, depth + 1, seen); + } + if (typeof obj === "function" && !isRegExp2(obj)) { + var name = nameOf(obj); + var keys = arrObjKeys(obj, inspect); + return "[Function" + (name ? ": " + name : " (anonymous)") + "]" + (keys.length > 0 ? " { " + $join.call(keys, ", ") + " }" : ""); + } + if (isSymbol(obj)) { + var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, "$1") : symToString.call(obj); + return typeof obj === "object" && !hasShammedSymbols ? markBoxed(symString) : symString; + } + if (isElement(obj)) { + var s = "<" + $toLowerCase.call(String(obj.nodeName)); + var attrs = obj.attributes || []; + for (var i = 0; i < attrs.length; i++) { + s += " " + attrs[i].name + "=" + wrapQuotes(quote(attrs[i].value), "double", opts); + } + s += ">"; + if (obj.childNodes && obj.childNodes.length) { + s += "..."; + } + s += ""; + return s; + } + if (isArray2(obj)) { + if (obj.length === 0) { + return "[]"; + } + var xs = arrObjKeys(obj, inspect); + if (indent && !singleLineValues(xs)) { + return "[" + indentedJoin(xs, indent) + "]"; + } + return "[ " + $join.call(xs, ", ") + " ]"; + } + if (isError(obj)) { + var parts = arrObjKeys(obj, inspect); + if (!("cause" in Error.prototype) && "cause" in obj && !isEnumerable.call(obj, "cause")) { + return "{ [" + String(obj) + "] " + $join.call($concat.call("[cause]: " + inspect(obj.cause), parts), ", ") + " }"; + } + if (parts.length === 0) { + return "[" + String(obj) + "]"; + } + return "{ [" + String(obj) + "] " + $join.call(parts, ", ") + " }"; + } + if (typeof obj === "object" && customInspect) { + if (inspectSymbol && typeof obj[inspectSymbol] === "function" && utilInspect) { + return utilInspect(obj, { depth: maxDepth - depth }); + } else if (customInspect !== "symbol" && typeof obj.inspect === "function") { + return obj.inspect(); + } + } + if (isMap(obj)) { + var mapParts = []; + if (mapForEach) { + mapForEach.call(obj, function(value, key) { + mapParts.push(inspect(key, obj, true) + " => " + inspect(value, obj)); + }); + } + return collectionOf("Map", mapSize.call(obj), mapParts, indent); + } + if (isSet2(obj)) { + var setParts = []; + if (setForEach) { + setForEach.call(obj, function(value) { + setParts.push(inspect(value, obj)); + }); + } + return collectionOf("Set", setSize.call(obj), setParts, indent); + } + if (isWeakMap(obj)) { + return weakCollectionOf("WeakMap"); + } + if (isWeakSet(obj)) { + return weakCollectionOf("WeakSet"); + } + if (isWeakRef(obj)) { + return weakCollectionOf("WeakRef"); + } + if (isNumber2(obj)) { + return markBoxed(inspect(Number(obj))); + } + if (isBigInt(obj)) { + return markBoxed(inspect(bigIntValueOf.call(obj))); + } + if (isBoolean2(obj)) { + return markBoxed(booleanValueOf.call(obj)); + } + if (isString2(obj)) { + return markBoxed(inspect(String(obj))); + } + if (typeof window !== "undefined" && obj === window) { + return "{ [object Window] }"; + } + if (typeof globalThis !== "undefined" && obj === globalThis || typeof global !== "undefined" && obj === global) { + return "{ [object globalThis] }"; } if (!isDate2(obj) && !isRegExp2(obj)) { var ys = arrObjKeys(obj, inspect); var isPlainObject2 = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object; var protoTag = obj instanceof Object ? "" : "null prototype"; - var stringTag = !isPlainObject2 && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? "Object" : ""; + var stringTag = !isPlainObject2 && toStringTag2 && Object(obj) === obj && toStringTag2 in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? "Object" : ""; var constructorTag = isPlainObject2 || typeof obj.constructor !== "function" ? "" : obj.constructor.name ? obj.constructor.name + " " : ""; var tag = constructorTag + (stringTag || protoTag ? "[" + $join.call($concat.call([], stringTag || [], protoTag || []), ": ") + "] " : ""); if (ys.length === 0) { @@ -12004,25 +12467,25 @@ var require_object_inspect = __commonJS({ return $replace.call(String(s), /"/g, """); } function isArray2(obj) { - return toStr(obj) === "[object Array]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj)); + return toStr(obj) === "[object Array]" && (!toStringTag2 || !(typeof obj === "object" && toStringTag2 in obj)); } function isDate2(obj) { - return toStr(obj) === "[object Date]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj)); + return toStr(obj) === "[object Date]" && (!toStringTag2 || !(typeof obj === "object" && toStringTag2 in obj)); } function isRegExp2(obj) { - return toStr(obj) === "[object RegExp]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj)); + return toStr(obj) === "[object RegExp]" && (!toStringTag2 || !(typeof obj === "object" && toStringTag2 in obj)); } function isError(obj) { - return toStr(obj) === "[object Error]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj)); + return toStr(obj) === "[object Error]" && (!toStringTag2 || !(typeof obj === "object" && toStringTag2 in obj)); } function isString2(obj) { - return toStr(obj) === "[object String]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj)); + return toStr(obj) === "[object String]" && (!toStringTag2 || !(typeof obj === "object" && toStringTag2 in obj)); } function isNumber2(obj) { - return toStr(obj) === "[object Number]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj)); + return toStr(obj) === "[object Number]" && (!toStringTag2 || !(typeof obj === "object" && toStringTag2 in obj)); } function isBoolean2(obj) { - return toStr(obj) === "[object Boolean]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj)); + return toStr(obj) === "[object Boolean]" && (!toStringTag2 || !(typeof obj === "object" && toStringTag2 in obj)); } function isSymbol(obj) { if (hasShammedSymbols) { @@ -12125,7 +12588,7 @@ var require_object_inspect = __commonJS({ } return false; } - function isSet(x) { + function isSet2(x) { if (!setSize || !x || typeof x !== "object") { return false; } @@ -13375,6 +13838,84 @@ function bind(fn, thisArg) { // node_modules/axios/lib/utils.js var { toString } = Object.prototype; var { getPrototypeOf } = Object; +var { iterator, toStringTag } = Symbol; +var hasOwnProperty = (({ hasOwnProperty: hasOwnProperty2 }) => (obj, prop) => hasOwnProperty2.call(obj, prop))(Object.prototype); +var isUnsafeObjectKey = (prop) => typeof prop === "string" && (prop === "__proto__" || prop === "constructor" || prop === "prototype"); +var isPrototypeBoundary = (obj, prototype2, source) => obj === Object.prototype || !source && prototype2 === null; +var isSafeAndFullyMutable = (obj) => { + if (!Object.isExtensible(obj)) { + return false; + } + const props = Object.getOwnPropertyNames(obj); + if (Object.getOwnPropertySymbols) { + props.push(...Object.getOwnPropertySymbols(obj)); + } + return props.every((prop) => { + if (isUnsafeObjectKey(prop)) { + return false; + } + const descriptor = Object.getOwnPropertyDescriptor(obj, prop); + return !!descriptor && descriptor.configurable && descriptor.writable === true; + }); +}; +var hasOwnInPrototypeChain = (thing, prop) => { + let obj = thing; + const seen = []; + while (obj != null) { + if (seen.indexOf(obj) !== -1) { + return false; + } + seen.push(obj); + const prototype2 = getPrototypeOf(obj); + if (isPrototypeBoundary(obj, prototype2, obj === thing)) { + return false; + } + if (hasOwnProperty(obj, prop)) { + return true; + } + obj = prototype2; + } + return false; +}; +var getSafeProp = (obj, prop) => obj != null && hasOwnInPrototypeChain(obj, prop) ? obj[prop] : void 0; +var toSafeFlatObject = (thing) => { + if (thing == null || typeof thing !== "object" && typeof thing !== "function") { + return thing; + } + const sourcePrototype = getPrototypeOf(thing); + if (sourcePrototype === null && isSafeAndFullyMutable(thing)) { + return thing; + } + const result = /* @__PURE__ */ Object.create(null); + const merged = /* @__PURE__ */ Object.create(null); + const seen = []; + let current = thing; + while (current != null) { + if (seen.indexOf(current) !== -1) { + break; + } + seen.push(current); + const prototype2 = current === thing ? sourcePrototype : getPrototypeOf(current); + if (isPrototypeBoundary(current, prototype2, current === thing)) { + break; + } + const props = Object.getOwnPropertyNames(current); + if (Object.getOwnPropertySymbols) { + props.push(...Object.getOwnPropertySymbols(current)); + } + for (const prop of props) { + if (isUnsafeObjectKey(prop)) { + continue; + } + if (!hasOwnProperty(merged, prop)) { + result[prop] = thing[prop]; + merged[prop] = true; + } + } + current = prototype2; + } + return result; +}; var kindOf = /* @__PURE__ */ ((cache) => (thing) => { const str = toString.call(thing); return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase()); @@ -13383,377 +13924,1009 @@ var kindOfTest = (type) => { type = type.toLowerCase(); return (thing) => kindOf(thing) === type; }; -var typeOfTest = (type) => (thing) => typeof thing === type; -var { isArray } = Array; -var isUndefined = typeOfTest("undefined"); -function isBuffer(val) { - return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val); -} -var isArrayBuffer = kindOfTest("ArrayBuffer"); -function isArrayBufferView(val) { - let result; - if (typeof ArrayBuffer !== "undefined" && ArrayBuffer.isView) { - result = ArrayBuffer.isView(val); - } else { - result = val && val.buffer && isArrayBuffer(val.buffer); +var typeOfTest = (type) => (thing) => typeof thing === type; +var { isArray } = Array; +var isUndefined = typeOfTest("undefined"); +function isBuffer(val) { + return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val); +} +var isArrayBuffer = kindOfTest("ArrayBuffer"); +function isArrayBufferView(val) { + let result; + if (typeof ArrayBuffer !== "undefined" && ArrayBuffer.isView) { + result = ArrayBuffer.isView(val); + } else { + result = val && val.buffer && isArrayBuffer(val.buffer); + } + return result; +} +var isString = typeOfTest("string"); +var isFunction = typeOfTest("function"); +var isNumber = typeOfTest("number"); +var isObject = (thing) => thing !== null && typeof thing === "object"; +var isBoolean = (thing) => thing === true || thing === false; +var isPlainObject = (val) => { + if (!isObject(val)) { + return false; + } + const prototype2 = getPrototypeOf(val); + return (prototype2 === null || prototype2 === Object.prototype || getPrototypeOf(prototype2) === null) && // Treat safe own/inherited Symbol.toStringTag or Symbol.iterator members as + // evidence the value is tagged/iterable, while ignoring members reachable + // only through shared or terminal prototype boundaries. + !hasOwnInPrototypeChain(val, toStringTag) && !hasOwnInPrototypeChain(val, iterator); +}; +var isEmptyObject = (val) => { + if (!isObject(val) || isBuffer(val)) { + return false; + } + try { + return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype; + } catch (e) { + return false; + } +}; +var isDate = kindOfTest("Date"); +var isFile = kindOfTest("File"); +var isReactNativeBlob = (value) => { + return !!(value && typeof value.uri !== "undefined"); +}; +var isReactNative = (formData2) => formData2 && typeof formData2.getParts !== "undefined"; +var isBlob = kindOfTest("Blob"); +var isFileList = kindOfTest("FileList"); +var isSet = kindOfTest("Set"); +var isStream = (val) => isObject(val) && isFunction(val.pipe); +function getGlobal() { + if (typeof globalThis !== "undefined") return globalThis; + if (typeof self !== "undefined") return self; + if (typeof window !== "undefined") return window; + if (typeof global !== "undefined") return global; + return {}; +} +var G = getGlobal(); +var FormDataCtor = typeof G.FormData !== "undefined" ? G.FormData : void 0; +var isFormData = (thing) => { + if (!thing) return false; + if (FormDataCtor && thing instanceof FormDataCtor) return true; + const proto = getPrototypeOf(thing); + if (!proto || proto === Object.prototype) return false; + if (!isFunction(thing.append)) return false; + const kind = kindOf(thing); + return kind === "formdata" || // detect form-data instance + kind === "object" && isFunction(thing.toString) && thing.toString() === "[object FormData]"; +}; +var isURLSearchParams = kindOfTest("URLSearchParams"); +var [isReadableStream, isRequest, isResponse, isHeaders] = [ + "ReadableStream", + "Request", + "Response", + "Headers" +].map(kindOfTest); +var trim = (str) => { + return str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ""); +}; +function forEach(obj, fn, { allOwnKeys = false } = {}) { + if (obj === null || typeof obj === "undefined") { + return; + } + let i; + let l; + if (typeof obj !== "object") { + obj = [obj]; + } + if (isArray(obj)) { + for (i = 0, l = obj.length; i < l; i++) { + fn.call(null, obj[i], i, obj); + } + } else { + if (isBuffer(obj)) { + return; + } + const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj); + const len = keys.length; + let key; + for (i = 0; i < len; i++) { + key = keys[i]; + fn.call(null, obj[key], key, obj); + } + } +} +function findKey(obj, key) { + if (isBuffer(obj)) { + return null; + } + key = key.toLowerCase(); + const keys = Object.keys(obj); + let i = keys.length; + let _key; + while (i-- > 0) { + _key = keys[i]; + if (key === _key.toLowerCase()) { + return _key; + } + } + return null; +} +var _global = (() => { + if (typeof globalThis !== "undefined") return globalThis; + return typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : global; +})(); +var isContextDefined = (context) => !isUndefined(context) && context !== _global; +function merge(...objs) { + const { caseless, skipUndefined } = isContextDefined(this) && this || {}; + const result = {}; + const assignValue = (val, key) => { + if (key === "__proto__" || key === "constructor" || key === "prototype") { + return; + } + const targetKey = caseless && typeof key === "string" && findKey(result, key) || key; + const existing = hasOwnProperty(result, targetKey) ? result[targetKey] : void 0; + if (isPlainObject(existing) && isPlainObject(val)) { + result[targetKey] = merge(existing, val); + } else if (isPlainObject(val)) { + result[targetKey] = merge({}, val); + } else if (isArray(val)) { + result[targetKey] = val.slice(); + } else if (!skipUndefined || !isUndefined(val)) { + result[targetKey] = val; + } + }; + for (let i = 0, l = objs.length; i < l; i++) { + const source = objs[i]; + if (!source || isBuffer(source)) { + continue; + } + forEach(source, assignValue); + if (typeof source !== "object" || isArray(source)) { + continue; + } + const symbols = Object.getOwnPropertySymbols(source); + for (let j = 0; j < symbols.length; j++) { + const symbol = symbols[j]; + if (propertyIsEnumerable.call(source, symbol)) { + assignValue(source[symbol], symbol); + } + } + } + return result; +} +var extend = (a, b, thisArg, { allOwnKeys } = {}) => { + forEach( + b, + (val, key) => { + if (thisArg && isFunction(val)) { + Object.defineProperty(a, key, { + // Null-proto descriptor so a polluted Object.prototype.get cannot + // hijack defineProperty's accessor-vs-data resolution. + __proto__: null, + value: bind(val, thisArg), + writable: true, + enumerable: true, + configurable: true + }); + } else { + Object.defineProperty(a, key, { + __proto__: null, + value: val, + writable: true, + enumerable: true, + configurable: true + }); + } + }, + { allOwnKeys } + ); + return a; +}; +var stripBOM = (content) => { + if (content.charCodeAt(0) === 65279) { + content = content.slice(1); + } + return content; +}; +var inherits = (constructor, superConstructor, props, descriptors) => { + constructor.prototype = Object.create(superConstructor.prototype, descriptors); + Object.defineProperty(constructor.prototype, "constructor", { + __proto__: null, + value: constructor, + writable: true, + enumerable: false, + configurable: true + }); + Object.defineProperty(constructor, "super", { + __proto__: null, + value: superConstructor.prototype + }); + props && Object.assign(constructor.prototype, props); +}; +var toFlatObject = (sourceObj, destObj, filter2, propFilter) => { + let props; + let i; + let prop; + const merged = {}; + destObj = destObj || {}; + if (sourceObj == null) return destObj; + do { + props = Object.getOwnPropertyNames(sourceObj); + i = props.length; + while (i-- > 0) { + prop = props[i]; + if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) { + destObj[prop] = sourceObj[prop]; + merged[prop] = true; + } + } + sourceObj = filter2 !== false && getPrototypeOf(sourceObj); + } while (sourceObj && (!filter2 || filter2(sourceObj, destObj)) && sourceObj !== Object.prototype); + return destObj; +}; +var endsWith = (str, searchString, position) => { + str = String(str); + if (position === void 0 || position > str.length) { + position = str.length; + } + position -= searchString.length; + const lastIndex = str.indexOf(searchString, position); + return lastIndex !== -1 && lastIndex === position; +}; +var toArray = (thing) => { + if (!thing) return null; + if (isArray(thing)) return thing; + let i = thing.length; + if (!isNumber(i)) return null; + const arr = new Array(i); + while (i-- > 0) { + arr[i] = thing[i]; + } + return arr; +}; +var isTypedArray = /* @__PURE__ */ ((TypedArray) => { + return (thing) => { + return TypedArray && thing instanceof TypedArray; + }; +})(typeof Uint8Array !== "undefined" && getPrototypeOf(Uint8Array)); +var forEachEntry = (obj, fn) => { + const generator = obj && obj[iterator]; + const _iterator = generator.call(obj); + let result; + while ((result = _iterator.next()) && !result.done) { + const pair = result.value; + fn.call(obj, pair[0], pair[1]); + } +}; +var matchAll = (regExp, str) => { + let matches; + const arr = []; + while ((matches = regExp.exec(str)) !== null) { + arr.push(matches); + } + return arr; +}; +var isHTMLForm = kindOfTest("HTMLFormElement"); +var toCamelCase = (str) => { + return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function replacer(m, p1, p2) { + return p1.toUpperCase() + p2; + }); +}; +var { propertyIsEnumerable } = Object.prototype; +var isRegExp = kindOfTest("RegExp"); +var reduceDescriptors = (obj, reducer) => { + const descriptors = Object.getOwnPropertyDescriptors(obj); + const reducedDescriptors = {}; + forEach(descriptors, (descriptor, name) => { + let ret; + if ((ret = reducer(descriptor, name, obj)) !== false) { + reducedDescriptors[name] = ret || descriptor; + } + }); + Object.defineProperties(obj, reducedDescriptors); +}; +var freezeMethods = (obj) => { + reduceDescriptors(obj, (descriptor, name) => { + if (isFunction(obj) && ["arguments", "caller", "callee"].includes(name)) { + return false; + } + const value = obj[name]; + if (!isFunction(value)) return; + descriptor.enumerable = false; + if ("writable" in descriptor) { + descriptor.writable = false; + return; + } + if (!descriptor.set) { + descriptor.set = () => { + throw Error("Can not rewrite read-only method '" + name + "'"); + }; + } + }); +}; +var toObjectSet = (arrayOrString, delimiter) => { + const obj = {}; + const define = (arr) => { + arr.forEach((value) => { + obj[value] = true; + }); + }; + isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter)); + return obj; +}; +var noop = () => { +}; +var toFiniteNumber = (value, defaultValue) => { + return value != null && Number.isFinite(value = +value) ? value : defaultValue; +}; +function isSpecCompliantForm(thing) { + return !!(thing && isFunction(thing.append) && thing[toStringTag] === "FormData" && thing[iterator]); +} +var toJSONObject = (obj) => { + const visited = /* @__PURE__ */ new WeakSet(); + const visit = (source) => { + if (isObject(source)) { + if (visited.has(source)) { + return; + } + if (isBuffer(source)) { + return source; + } + if (!("toJSON" in source)) { + visited.add(source); + let target; + if (isSet(source)) { + target = []; + for (const value of source) { + const reducedValue = visit(value); + !isUndefined(reducedValue) && target.push(reducedValue); + } + } else { + target = isArray(source) ? [] : {}; + forEach(source, (value, key) => { + const reducedValue = visit(value); + !isUndefined(reducedValue) && (target[key] = reducedValue); + }); + } + visited.delete(source); + return target; + } + } + return source; + }; + return visit(obj); +}; +var isAsyncFn = kindOfTest("AsyncFunction"); +var isThenable = (thing) => thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch); +var _setImmediate = ((setImmediateSupported, postMessageSupported) => { + if (setImmediateSupported) { + return setImmediate; + } + return postMessageSupported ? ((token, callbacks) => { + _global.addEventListener( + "message", + ({ source, data }) => { + if (source === _global && data === token) { + callbacks.length && callbacks.shift()(); + } + }, + false + ); + return (cb) => { + callbacks.push(cb); + _global.postMessage(token, "*"); + }; + })(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb); +})(typeof setImmediate === "function", isFunction(_global.postMessage)); +var asap = typeof queueMicrotask !== "undefined" ? queueMicrotask.bind(_global) : typeof process !== "undefined" && process.nextTick || _setImmediate; +var isIterable = (thing) => thing != null && isFunction(thing[iterator]); +var isSafeIterable = (thing) => thing != null && hasOwnInPrototypeChain(thing, iterator) && isIterable(thing); +var utils_default = { + isArray, + isArrayBuffer, + isBuffer, + isFormData, + isArrayBufferView, + isString, + isNumber, + isBoolean, + isObject, + isPlainObject, + isEmptyObject, + isReadableStream, + isRequest, + isResponse, + isHeaders, + isUndefined, + isDate, + isFile, + isReactNativeBlob, + isReactNative, + isBlob, + isRegExp, + isFunction, + isStream, + isURLSearchParams, + isTypedArray, + isFileList, + forEach, + merge, + extend, + trim, + stripBOM, + inherits, + toFlatObject, + kindOf, + kindOfTest, + endsWith, + toArray, + forEachEntry, + matchAll, + isHTMLForm, + hasOwnProperty, + hasOwnProp: hasOwnProperty, + // an alias to avoid ESLint no-prototype-builtins detection + hasOwnInPrototypeChain, + getSafeProp, + toSafeFlatObject, + reduceDescriptors, + freezeMethods, + toObjectSet, + toCamelCase, + noop, + toFiniteNumber, + findKey, + global: _global, + isContextDefined, + isSpecCompliantForm, + toJSONObject, + isAsyncFn, + isThenable, + setImmediate: _setImmediate, + asap, + isIterable, + isSafeIterable +}; + +// node_modules/axios/lib/helpers/parseHeaders.js +var ignoreDuplicateOf = utils_default.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" +]); +var parseHeaders_default = (rawHeaders) => { + const parsed = {}; + let key; + let val; + let i; + rawHeaders && rawHeaders.split("\n").forEach(function parser(line) { + i = line.indexOf(":"); + key = line.substring(0, i).trim().toLowerCase(); + val = line.substring(i + 1).trim(); + const hasKey = utils_default.hasOwnProp(parsed, key); + if (!key || hasKey && utils_default.hasOwnProp(ignoreDuplicateOf, key)) { + return; + } + if (key === "set-cookie") { + if (hasKey) { + parsed[key].push(val); + } else { + parsed[key] = [val]; + } + } else { + parsed[key] = hasKey ? parsed[key] + ", " + val : val; + } + }); + return parsed; +}; + +// node_modules/axios/lib/helpers/sanitizeHeaderValue.js +function trimSPorHTAB(str) { + let start = 0; + let end = str.length; + while (start < end) { + const code = str.charCodeAt(start); + if (code !== 9 && code !== 32) { + break; + } + start += 1; } - return result; + while (end > start) { + const code = str.charCodeAt(end - 1); + if (code !== 9 && code !== 32) { + break; + } + end -= 1; + } + return start === 0 && end === str.length ? str : str.slice(start, end); } -var isString = typeOfTest("string"); -var isFunction = typeOfTest("function"); -var isNumber = typeOfTest("number"); -var isObject = (thing) => thing !== null && typeof thing === "object"; -var isBoolean = (thing) => thing === true || thing === false; -var isPlainObject = (val) => { - if (kindOf(val) !== "object") { - return false; +var INVALID_UNICODE_HEADER_VALUE_CHARS = new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+", "g"); +var INVALID_BYTE_STRING_HEADER_VALUE_CHARS = new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+", "g"); +function sanitizeValue(value, invalidChars) { + if (utils_default.isArray(value)) { + return value.map((item) => sanitizeValue(item, invalidChars)); } - const prototype3 = getPrototypeOf(val); - return (prototype3 === null || prototype3 === Object.prototype || Object.getPrototypeOf(prototype3) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val); -}; -var isDate = kindOfTest("Date"); -var isFile = kindOfTest("File"); -var isBlob = kindOfTest("Blob"); -var isFileList = kindOfTest("FileList"); -var isStream = (val) => isObject(val) && isFunction(val.pipe); -var isFormData = (thing) => { - let kind; - return thing && (typeof FormData === "function" && thing instanceof FormData || isFunction(thing.append) && ((kind = kindOf(thing)) === "formdata" || // detect form-data instance - kind === "object" && isFunction(thing.toString) && thing.toString() === "[object FormData]")); -}; -var isURLSearchParams = kindOfTest("URLSearchParams"); -var [isReadableStream, isRequest, isResponse, isHeaders] = ["ReadableStream", "Request", "Response", "Headers"].map(kindOfTest); -var trim = (str) => str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ""); -function forEach(obj, fn, { allOwnKeys = false } = {}) { - if (obj === null || typeof obj === "undefined") { - return; + return trimSPorHTAB(String(value).replace(invalidChars, "")); +} +var sanitizeHeaderValue = (value) => sanitizeValue(value, INVALID_UNICODE_HEADER_VALUE_CHARS); +var sanitizeByteStringHeaderValue = (value) => sanitizeValue(value, INVALID_BYTE_STRING_HEADER_VALUE_CHARS); +function toByteStringHeaderObject(headers) { + const byteStringHeaders = /* @__PURE__ */ Object.create(null); + utils_default.forEach(headers.toJSON(), (value, header) => { + byteStringHeaders[header] = sanitizeByteStringHeaderValue(value); + }); + return byteStringHeaders; +} + +// node_modules/axios/lib/core/AxiosHeaders.js +var $internals = Symbol("internals"); +function normalizeHeader(header) { + return header && String(header).trim().toLowerCase(); +} +function normalizeValue(value) { + if (value === false || value == null) { + return value; } - let i; - let l; - if (typeof obj !== "object") { - obj = [obj]; + return utils_default.isArray(value) ? value.map(normalizeValue) : sanitizeHeaderValue(String(value)); +} +function parseTokens(str) { + const tokens = /* @__PURE__ */ Object.create(null); + const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g; + let match; + while (match = tokensRE.exec(str)) { + tokens[match[1]] = match[2]; } - if (isArray(obj)) { - for (i = 0, l = obj.length; i < l; i++) { - fn.call(null, obj[i], i, obj); - } - } else { - const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj); - const len = keys.length; - let key; - for (i = 0; i < len; i++) { - key = keys[i]; - fn.call(null, obj[key], key, obj); + return tokens; +} +var parameterNameRE = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/; +function trimOWS(value) { + let start = 0; + let end = value.length; + while (start < end) { + const code = value.charCodeAt(start); + if (code !== 9 && code !== 32) { + break; } + start += 1; } -} -function findKey(obj, key) { - key = key.toLowerCase(); - const keys = Object.keys(obj); - let i = keys.length; - let _key; - while (i-- > 0) { - _key = keys[i]; - if (key === _key.toLowerCase()) { - return _key; + while (end > start) { + const code = value.charCodeAt(end - 1); + if (code !== 9 && code !== 32) { + break; } + end -= 1; } - return null; + return start === 0 && end === value.length ? value : value.slice(start, end); } -var _global = (() => { - if (typeof globalThis !== "undefined") return globalThis; - return typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : global; -})(); -var isContextDefined = (context) => !isUndefined(context) && context !== _global; -function merge() { - const { caseless } = isContextDefined(this) && this || {}; - const result = {}; - const assignValue = (val, key) => { - const targetKey = caseless && findKey(result, key) || key; - if (isPlainObject(result[targetKey]) && isPlainObject(val)) { - result[targetKey] = merge(result[targetKey], val); - } else if (isPlainObject(val)) { - result[targetKey] = merge({}, val); - } else if (isArray(val)) { - result[targetKey] = val.slice(); - } else { - result[targetKey] = val; +function decodeQuotedString(value) { + const last = value.length - 1; + if (last < 1 || value.charCodeAt(0) !== 34 || value.charCodeAt(last) !== 34) { + return value; + } + let decoded = ""; + for (let i = 1; i < last; i++) { + const code = value.charCodeAt(i); + if (code === 34) { + return value; } - }; - for (let i = 0, l = arguments.length; i < l; i++) { - arguments[i] && forEach(arguments[i], assignValue); + if (code === 92) { + i += 1; + if (i >= last) { + return value; + } + } + decoded += value[i]; } - return result; + return decoded; } -var extend = (a, b, thisArg, { allOwnKeys } = {}) => { - forEach(b, (val, key) => { - if (thisArg && isFunction(val)) { - a[key] = bind(val, thisArg); - } else { - a[key] = val; +function parseParameters(value) { + const parameters = /* @__PURE__ */ Object.create(null); + const str = String(value); + let start = 0; + let quoted = false; + let escaped = false; + function parseParameter(end) { + const part = trimOWS(str.slice(start, end)); + const equals = part.indexOf("="); + if (equals < 1) { + return; } - }, { allOwnKeys }); - return a; -}; -var stripBOM = (content) => { - if (content.charCodeAt(0) === 65279) { - content = content.slice(1); + const name = trimOWS(part.slice(0, equals)); + if (!parameterNameRE.test(name)) { + return; + } + const normalizedName = name.toLowerCase(); + if (normalizedName === "__proto__" || normalizedName === "constructor" || normalizedName === "prototype") { + return; + } + const parameterValue = trimOWS(part.slice(equals + 1)); + parameters[normalizedName] = decodeQuotedString(parameterValue); } - return content; -}; -var inherits = (constructor, superConstructor, props, descriptors2) => { - constructor.prototype = Object.create(superConstructor.prototype, descriptors2); - constructor.prototype.constructor = constructor; - Object.defineProperty(constructor, "super", { - value: superConstructor.prototype - }); - props && Object.assign(constructor.prototype, props); -}; -var toFlatObject = (sourceObj, destObj, filter2, propFilter) => { - let props; - let i; - let prop; - const merged = {}; - destObj = destObj || {}; - if (sourceObj == null) return destObj; - do { - props = Object.getOwnPropertyNames(sourceObj); - i = props.length; - while (i-- > 0) { - prop = props[i]; - if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) { - destObj[prop] = sourceObj[prop]; - merged[prop] = true; + for (let i = 0; i < str.length; i++) { + const code = str.charCodeAt(i); + if (quoted) { + if (escaped) { + escaped = false; + } else if (code === 92) { + escaped = true; + } else if (code === 34) { + quoted = false; } + } else if (code === 34) { + quoted = true; + } else if (code === 44 || code === 59) { + parseParameter(i); + start = i + 1; } - sourceObj = filter2 !== false && getPrototypeOf(sourceObj); - } while (sourceObj && (!filter2 || filter2(sourceObj, destObj)) && sourceObj !== Object.prototype); - return destObj; -}; -var endsWith = (str, searchString, position) => { - str = String(str); - if (position === void 0 || position > str.length) { - position = str.length; } - position -= searchString.length; - const lastIndex = str.indexOf(searchString, position); - return lastIndex !== -1 && lastIndex === position; -}; -var toArray = (thing) => { - if (!thing) return null; - if (isArray(thing)) return thing; - let i = thing.length; - if (!isNumber(i)) return null; - const arr = new Array(i); - while (i-- > 0) { - arr[i] = thing[i]; + parseParameter(str.length); + return parameters; +} +var isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim()); +function matchHeaderValue(context, value, header, filter2, isHeaderNameFilter) { + if (utils_default.isFunction(filter2)) { + return filter2.call(this, value, header); } - return arr; -}; -var isTypedArray = /* @__PURE__ */ ((TypedArray) => { - return (thing) => { - return TypedArray && thing instanceof TypedArray; - }; -})(typeof Uint8Array !== "undefined" && getPrototypeOf(Uint8Array)); -var forEachEntry = (obj, fn) => { - const generator = obj && obj[Symbol.iterator]; - const iterator = generator.call(obj); - let result; - while ((result = iterator.next()) && !result.done) { - const pair = result.value; - fn.call(obj, pair[0], pair[1]); + if (isHeaderNameFilter) { + value = header; } -}; -var matchAll = (regExp, str) => { - let matches; - const arr = []; - while ((matches = regExp.exec(str)) !== null) { - arr.push(matches); + if (!utils_default.isString(value)) return; + if (utils_default.isString(filter2)) { + return value.indexOf(filter2) !== -1; } - return arr; -}; -var isHTMLForm = kindOfTest("HTMLFormElement"); -var toCamelCase = (str) => { - return str.toLowerCase().replace( - /[-_\s]([a-z\d])(\w*)/g, - function replacer(m, p1, p2) { - return p1.toUpperCase() + p2; + if (utils_default.isRegExp(filter2)) { + return filter2.test(value); + } +} +function formatHeader(header) { + return header.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => { + return char.toUpperCase() + str; + }); +} +function buildAccessors(obj, header) { + const accessorName = utils_default.toCamelCase(" " + header); + ["get", "set", "has"].forEach((methodName) => { + Object.defineProperty(obj, methodName + accessorName, { + // Null-proto descriptor so a polluted Object.prototype.get cannot turn + // this data descriptor into an accessor descriptor on the way in. + __proto__: null, + value: function(arg1, arg2, arg3) { + return this[methodName].call(this, header, arg1, arg2, arg3); + }, + configurable: true + }); + }); +} +var AxiosHeaders = class { + constructor(headers) { + headers && this.set(headers); + } + set(header, valueOrRewrite, rewrite) { + const self2 = this; + function setHeader(_value, _header, _rewrite) { + const lHeader = normalizeHeader(_header); + if (!lHeader) { + return; + } + const key = utils_default.findKey(self2, lHeader); + if (!key || self2[key] === void 0 || _rewrite === true || _rewrite === void 0 && self2[key] !== false) { + self2[key || _header] = normalizeValue(_value); + } + } + const setHeaders = (headers, _rewrite) => utils_default.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite)); + if (utils_default.isPlainObject(header) || header instanceof this.constructor) { + setHeaders(header, valueOrRewrite); + } else if (utils_default.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) { + setHeaders(parseHeaders_default(header), valueOrRewrite); + } else if (utils_default.isObject(header) && utils_default.isSafeIterable(header)) { + let obj = /* @__PURE__ */ Object.create(null), dest, key; + for (const entry of header) { + if (!utils_default.isArray(entry)) { + throw new TypeError("Object iterator must return a key-value pair"); + } + key = entry[0]; + if (utils_default.hasOwnProp(obj, key)) { + dest = obj[key]; + obj[key] = utils_default.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]]; + } else { + obj[key] = entry[1]; + } + } + setHeaders(obj, valueOrRewrite); + } else { + header != null && setHeader(valueOrRewrite, header, rewrite); + } + return this; + } + get(header, parser) { + header = normalizeHeader(header); + if (header) { + const key = utils_default.findKey(this, header); + if (key) { + const value = this[key]; + if (!parser) { + return value; + } + if (parser === true) { + return parseTokens(value); + } + if (utils_default.isFunction(parser)) { + return parser.call(this, value, key); + } + if (utils_default.isRegExp(parser)) { + return parser.exec(value); + } + throw new TypeError("parser must be boolean|regexp|function"); + } } - ); -}; -var hasOwnProperty = (({ hasOwnProperty: hasOwnProperty2 }) => (obj, prop) => hasOwnProperty2.call(obj, prop))(Object.prototype); -var isRegExp = kindOfTest("RegExp"); -var reduceDescriptors = (obj, reducer) => { - const descriptors2 = Object.getOwnPropertyDescriptors(obj); - const reducedDescriptors = {}; - forEach(descriptors2, (descriptor, name) => { - let ret; - if ((ret = reducer(descriptor, name, obj)) !== false) { - reducedDescriptors[name] = ret || descriptor; + } + has(header, matcher) { + header = normalizeHeader(header); + if (header) { + const key = utils_default.findKey(this, header); + return !!(key && this[key] !== void 0 && (!matcher || matchHeaderValue(this, this[key], key, matcher))); } - }); - Object.defineProperties(obj, reducedDescriptors); -}; -var freezeMethods = (obj) => { - reduceDescriptors(obj, (descriptor, name) => { - if (isFunction(obj) && ["arguments", "caller", "callee"].indexOf(name) !== -1) { - return false; + return false; + } + delete(header, matcher) { + const self2 = this; + let deleted = false; + function deleteHeader(_header) { + _header = normalizeHeader(_header); + if (_header) { + const key = utils_default.findKey(self2, _header); + if (key && (!matcher || matchHeaderValue(self2, self2[key], key, matcher))) { + delete self2[key]; + deleted = true; + } + } } - const value = obj[name]; - if (!isFunction(value)) return; - descriptor.enumerable = false; - if ("writable" in descriptor) { - descriptor.writable = false; - return; + if (utils_default.isArray(header)) { + header.forEach(deleteHeader); + } else { + deleteHeader(header); } - if (!descriptor.set) { - descriptor.set = () => { - throw Error("Can not rewrite read-only method '" + name + "'"); - }; + return deleted; + } + clear(matcher) { + const keys = Object.keys(this); + let i = keys.length; + let deleted = false; + while (i--) { + const key = keys[i]; + if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) { + delete this[key]; + deleted = true; + } } - }); -}; -var toObjectSet = (arrayOrString, delimiter) => { - const obj = {}; - const define = (arr) => { - arr.forEach((value) => { - obj[value] = true; - }); - }; - isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter)); - return obj; -}; -var noop = () => { -}; -var toFiniteNumber = (value, defaultValue) => { - return value != null && Number.isFinite(value = +value) ? value : defaultValue; -}; -function isSpecCompliantForm(thing) { - return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === "FormData" && thing[Symbol.iterator]); -} -var toJSONObject = (obj) => { - const stack = new Array(10); - const visit = (source, i) => { - if (isObject(source)) { - if (stack.indexOf(source) >= 0) { + return deleted; + } + normalize(format) { + const self2 = this; + const headers = {}; + utils_default.forEach(this, (value, header) => { + const key = utils_default.findKey(headers, header); + if (key) { + self2[key] = normalizeValue(value); + delete self2[header]; return; } - if (!("toJSON" in source)) { - stack[i] = source; - const target = isArray(source) ? [] : {}; - forEach(source, (value, key) => { - const reducedValue = visit(value, i + 1); - !isUndefined(reducedValue) && (target[key] = reducedValue); - }); - stack[i] = void 0; - return target; + const normalized = format ? formatHeader(header) : String(header).trim(); + if (normalized !== header) { + delete self2[header]; } - } - return source; - }; - return visit(obj, 0); -}; -var isAsyncFn = kindOfTest("AsyncFunction"); -var isThenable = (thing) => thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch); -var _setImmediate = ((setImmediateSupported, postMessageSupported) => { - if (setImmediateSupported) { - return setImmediate; + self2[normalized] = normalizeValue(value); + headers[normalized] = true; + }); + return this; } - return postMessageSupported ? ((token, callbacks) => { - _global.addEventListener("message", ({ source, data }) => { - if (source === _global && data === token) { - callbacks.length && callbacks.shift()(); - } - }, false); - return (cb) => { - callbacks.push(cb); - _global.postMessage(token, "*"); + concat(...targets) { + return this.constructor.concat(this, ...targets); + } + toJSON(asStrings) { + const obj = /* @__PURE__ */ Object.create(null); + utils_default.forEach(this, (value, header) => { + value != null && value !== false && (obj[header] = asStrings && utils_default.isArray(value) ? value.join(", ") : value); + }); + return obj; + } + [Symbol.iterator]() { + return Object.entries(this.toJSON())[Symbol.iterator](); + } + toString() { + return Object.entries(this.toJSON()).map(([header, value]) => header + ": " + value).join("\n"); + } + getSetCookie() { + const value = this.get("set-cookie"); + return utils_default.isArray(value) ? value : value == null || value === false ? [] : [value]; + } + get [Symbol.toStringTag]() { + return "AxiosHeaders"; + } + static from(thing) { + return thing instanceof this ? thing : new this(thing); + } + static parseParameters(value) { + return parseParameters(value); + } + static concat(first, ...targets) { + const computed = new this(first); + targets.forEach((target) => computed.set(target)); + return computed; + } + static accessor(header) { + const internals = this[$internals] = this[$internals] = { + accessors: {} }; - })(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb); -})( - typeof setImmediate === "function", - isFunction(_global.postMessage) -); -var asap = typeof queueMicrotask !== "undefined" ? queueMicrotask.bind(_global) : typeof process !== "undefined" && process.nextTick || _setImmediate; -var utils_default = { - isArray, - isArrayBuffer, - isBuffer, - isFormData, - isArrayBufferView, - isString, - isNumber, - isBoolean, - isObject, - isPlainObject, - isReadableStream, - isRequest, - isResponse, - isHeaders, - isUndefined, - isDate, - isFile, - isBlob, - isRegExp, - isFunction, - isStream, - isURLSearchParams, - isTypedArray, - isFileList, - forEach, - merge, - extend, - trim, - stripBOM, - inherits, - toFlatObject, - kindOf, - kindOfTest, - endsWith, - toArray, - forEachEntry, - matchAll, - isHTMLForm, - hasOwnProperty, - hasOwnProp: hasOwnProperty, - // an alias to avoid ESLint no-prototype-builtins detection - reduceDescriptors, - freezeMethods, - toObjectSet, - toCamelCase, - noop, - toFiniteNumber, - findKey, - global: _global, - isContextDefined, - isSpecCompliantForm, - toJSONObject, - isAsyncFn, - isThenable, - setImmediate: _setImmediate, - asap + const accessors = internals.accessors; + const prototype2 = this.prototype; + function defineAccessor(_header) { + const lHeader = normalizeHeader(_header); + if (!accessors[lHeader]) { + buildAccessors(prototype2, _header); + accessors[lHeader] = true; + } + } + utils_default.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header); + return this; + } }; +AxiosHeaders.accessor([ + "Content-Type", + "Content-Length", + "Accept", + "Accept-Encoding", + "User-Agent", + "Authorization" +]); +utils_default.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => { + let mapped = key[0].toUpperCase() + key.slice(1); + return { + get: () => value, + set(headerValue) { + this[mapped] = headerValue; + } + }; +}); +utils_default.freezeMethods(AxiosHeaders); +var AxiosHeaders_default = AxiosHeaders; // node_modules/axios/lib/core/AxiosError.js -function AxiosError(message, code, config, request, response) { - Error.call(this); - if (Error.captureStackTrace) { - Error.captureStackTrace(this, this.constructor); - } else { - this.stack = new Error().stack; - } - this.message = message; - this.name = "AxiosError"; - code && (this.code = code); - config && (this.config = config); - request && (this.request = request); - if (response) { - this.response = response; - this.status = response.status ? response.status : null; +var REDACTED = "[REDACTED ****]"; +function hasOwnOrPrototypeToJSON(source) { + if (utils_default.hasOwnProp(source, "toJSON")) { + return true; + } + let prototype2 = Object.getPrototypeOf(source); + while (prototype2 && prototype2 !== Object.prototype) { + if (utils_default.hasOwnProp(prototype2, "toJSON")) { + return true; + } + prototype2 = Object.getPrototypeOf(prototype2); + } + return false; +} +function redactConfig(config, redactKeys) { + const lowerKeys = new Set(redactKeys.map((k) => String(k).toLowerCase())); + const seen = []; + const visit = (source) => { + if (source === null || typeof source !== "object") return source; + if (utils_default.isBuffer(source)) return source; + if (seen.indexOf(source) !== -1) return void 0; + if (source instanceof AxiosHeaders_default) { + source = source.toJSON(); + } + seen.push(source); + let result; + if (utils_default.isArray(source)) { + result = []; + source.forEach((v, i) => { + const reducedValue = visit(v); + if (!utils_default.isUndefined(reducedValue)) { + result[i] = reducedValue; + } + }); + } else { + if (!utils_default.isPlainObject(source) && hasOwnOrPrototypeToJSON(source)) { + seen.pop(); + return source; + } + result = /* @__PURE__ */ Object.create(null); + for (const [key, value] of Object.entries(source)) { + const reducedValue = lowerKeys.has(key.toLowerCase()) ? REDACTED : visit(value); + if (!utils_default.isUndefined(reducedValue)) { + result[key] = reducedValue; + } + } + } + seen.pop(); + return result; + }; + return visit(config); +} +function stringifySafely(value) { + try { + return String(value); + } catch (err) { + return ""; } } -utils_default.inherits(AxiosError, Error, { - toJSON: function toJSON() { +function aggregateErrorMessage(error) { + const message = error.errors.map((entry) => { + try { + return entry && entry.message ? stringifySafely(entry.message) : stringifySafely(entry); + } catch (err) { + return ""; + } + }).filter(Boolean).join("; "); + return message || error.name || "AggregateError"; +} +var AxiosError = class _AxiosError extends Error { + static from(error, code, config, request, response, customProps) { + let message = error.message; + if (!message && utils_default.isArray(error.errors) && error.errors.length) { + message = aggregateErrorMessage(error); + } + const axiosError = new _AxiosError(message, code || error.code, config, request, response); + Object.defineProperty(axiosError, "cause", { + __proto__: null, + value: error, + writable: true, + enumerable: false, + configurable: true + }); + axiosError.name = error.name; + if (error.status != null && axiosError.status == null) { + axiosError.status = error.status; + } + customProps && Object.assign(axiosError, customProps); + return axiosError; + } + /** + * Create an Error with the specified message, config, error code, request and response. + * + * @param {string} message The error message. + * @param {string} [code] The error code (for example, 'ECONNABORTED'). + * @param {Object} [config] The config. + * @param {Object} [request] The request. + * @param {Object} [response] The response. + * + * @returns {Error} The created error. + */ + constructor(message, code, config, request, response) { + super(message); + Object.defineProperty(this, "message", { + // Null-proto descriptor so a polluted Object.prototype.get cannot turn + // this data descriptor into an accessor descriptor on the way in. + __proto__: null, + value: message, + enumerable: true, + writable: true, + configurable: true + }); + this.name = "AxiosError"; + this.isAxiosError = true; + code && (this.code = code); + config && (this.config = config); + request && (this.request = request); + if (response) { + this.response = response; + this.status = response.status; + } + } + toJSON() { + const config = this.config; + const redactKeys = config && utils_default.hasOwnProp(config, "redact") ? config.redact : void 0; + const serializedConfig = utils_default.isArray(redactKeys) && redactKeys.length > 0 ? redactConfig(config, redactKeys) : utils_default.toJSONObject(config); return { // Standard message: this.message, @@ -13767,53 +14940,44 @@ utils_default.inherits(AxiosError, Error, { columnNumber: this.columnNumber, stack: this.stack, // Axios - config: utils_default.toJSONObject(this.config), + config: serializedConfig, code: this.code, status: this.status }; } -}); -var prototype = AxiosError.prototype; -var descriptors = {}; -[ - "ERR_BAD_OPTION_VALUE", - "ERR_BAD_OPTION", - "ECONNABORTED", - "ETIMEDOUT", - "ERR_NETWORK", - "ERR_FR_TOO_MANY_REDIRECTS", - "ERR_DEPRECATED", - "ERR_BAD_RESPONSE", - "ERR_BAD_REQUEST", - "ERR_CANCELED", - "ERR_NOT_SUPPORT", - "ERR_INVALID_URL" - // eslint-disable-next-line func-names -].forEach((code) => { - descriptors[code] = { value: code }; -}); -Object.defineProperties(AxiosError, descriptors); -Object.defineProperty(prototype, "isAxiosError", { value: true }); -AxiosError.from = (error, code, config, request, response, customProps) => { - const axiosError = Object.create(prototype); - utils_default.toFlatObject(error, axiosError, function filter2(obj) { - return obj !== Error.prototype; - }, (prop) => { - return prop !== "isAxiosError"; - }); - AxiosError.call(axiosError, error.message, code, config, request, response); - axiosError.cause = error; - axiosError.name = error.name; - customProps && Object.assign(axiosError, customProps); - return axiosError; }; +AxiosError.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE"; +AxiosError.ERR_BAD_OPTION = "ERR_BAD_OPTION"; +AxiosError.ECONNABORTED = "ECONNABORTED"; +AxiosError.ETIMEDOUT = "ETIMEDOUT"; +AxiosError.ECONNREFUSED = "ECONNREFUSED"; +AxiosError.ERR_NETWORK = "ERR_NETWORK"; +AxiosError.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS"; +AxiosError.ERR_DEPRECATED = "ERR_DEPRECATED"; +AxiosError.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE"; +AxiosError.ERR_BAD_REQUEST = "ERR_BAD_REQUEST"; +AxiosError.ERR_CANCELED = "ERR_CANCELED"; +AxiosError.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT"; +AxiosError.ERR_INVALID_URL = "ERR_INVALID_URL"; +AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED = "ERR_FORM_DATA_DEPTH_EXCEEDED"; var AxiosError_default = AxiosError; // node_modules/axios/lib/platform/node/classes/FormData.js var import_form_data = __toESM(require_form_data(), 1); var FormData_default = import_form_data.default; +// node_modules/axios/lib/platform/node/classes/Buffer.js +var Buffer_default = { + isBufferAvailable() { + return typeof Buffer !== "undefined"; + }, + from(value) { + return Buffer.from(value); + } +}; + // node_modules/axios/lib/helpers/toFormData.js +var DEFAULT_FORM_DATA_MAX_DEPTH = 100; function isVisitable(thing) { return utils_default.isPlainObject(thing) || utils_default.isArray(thing); } @@ -13838,19 +15002,18 @@ function toFormData(obj, formData2, options) { throw new TypeError("target must be an object"); } formData2 = formData2 || new (FormData_default || FormData)(); - options = utils_default.toFlatObject(options, { - metaTokens: true, - dots: false, - indexes: false - }, false, function defined(option, source) { - return !utils_default.isUndefined(source[option]); - }); - const metaTokens = options.metaTokens; - const visitor = options.visitor || defaultVisitor; - const dots = options.dots; - const indexes = options.indexes; - const _Blob = options.Blob || typeof Blob !== "undefined" && Blob; + const option = (name, fallback) => { + const value = utils_default.getSafeProp(options, name); + return utils_default.isUndefined(value) ? fallback : value; + }; + const metaTokens = option("metaTokens", true); + const visitor = option("visitor") || defaultVisitor; + const dots = option("dots", false); + const indexes = option("indexes", false); + const _Blob = option("Blob") || typeof Blob !== "undefined" && Blob; + const maxDepth = option("maxDepth", DEFAULT_FORM_DATA_MAX_DEPTH); const useBlob = _Blob && utils_default.isSpecCompliantForm(formData2); + const stack = []; if (!utils_default.isFunction(visitor)) { throw new TypeError("visitor must be a function"); } @@ -13859,20 +15022,61 @@ function toFormData(obj, formData2, options) { if (utils_default.isDate(value)) { return value.toISOString(); } + if (utils_default.isBoolean(value)) { + return value.toString(); + } if (!useBlob && utils_default.isBlob(value)) { throw new AxiosError_default("Blob is not supported. Use a Buffer instead."); } if (utils_default.isArrayBuffer(value) || utils_default.isTypedArray(value)) { - return useBlob && typeof Blob === "function" ? new Blob([value]) : Buffer.from(value); + if (useBlob && typeof _Blob === "function") { + return new _Blob([value]); + } + if (Buffer_default && Buffer_default.isBufferAvailable()) { + return Buffer_default.from(value); + } + throw new AxiosError_default( + "Blob is not supported. Use a Buffer instead.", + AxiosError_default.ERR_NOT_SUPPORT + ); } return value; } + function throwIfMaxDepthExceeded(depth) { + if (depth > maxDepth) { + throw new AxiosError_default( + "Object is too deeply nested (" + depth + " levels). Max depth: " + maxDepth, + AxiosError_default.ERR_FORM_DATA_DEPTH_EXCEEDED + ); + } + } + function stringifyWithDepthLimit(value, depth) { + if (maxDepth === Infinity) { + return JSON.stringify(value); + } + const ancestors = []; + return JSON.stringify(value, function limitDepth(_key, currentValue) { + if (!utils_default.isObject(currentValue)) { + return currentValue; + } + while (ancestors.length && ancestors[ancestors.length - 1] !== this) { + ancestors.pop(); + } + ancestors.push(currentValue); + throwIfMaxDepthExceeded(depth + ancestors.length - 1); + return currentValue; + }); + } function defaultVisitor(value, key, path) { let arr = value; + if (utils_default.isReactNative(formData2) && utils_default.isReactNativeBlob(value)) { + formData2.append(renderKey(path, key, dots), convertValue(value)); + return false; + } if (value && !path && typeof value === "object") { if (utils_default.endsWith(key, "{}")) { key = metaTokens ? key : key.slice(0, -2); - value = JSON.stringify(value); + value = stringifyWithDepthLimit(value, 1); } else if (utils_default.isArray(value) && isFlatArray(value) || (utils_default.isFileList(value) || utils_default.endsWith(key, "[]")) && (arr = utils_default.toArray(value))) { key = removeBrackets(key); arr.forEach(function each(el, index) { @@ -13891,28 +15095,22 @@ function toFormData(obj, formData2, options) { formData2.append(renderKey(path, key, dots), convertValue(value)); return false; } - const stack = []; const exposedHelpers = Object.assign(predicates, { defaultVisitor, convertValue, isVisitable }); - function build(value, path) { + function build(value, path, depth = 0) { if (utils_default.isUndefined(value)) return; + throwIfMaxDepthExceeded(depth); if (stack.indexOf(value) !== -1) { - throw Error("Circular reference detected in " + path.join(".")); + throw new Error("Circular reference detected in " + path.join(".")); } stack.push(value); utils_default.forEach(value, function each(el, key) { - const result = !(utils_default.isUndefined(el) || el === null) && visitor.call( - formData2, - el, - utils_default.isString(key) ? key.trim() : key, - path, - exposedHelpers - ); + const result = !(utils_default.isUndefined(el) || el === null) && visitor.call(formData2, el, utils_default.isString(key) ? key.trim() : key, path, exposedHelpers); if (result === true) { - build(el, path ? path.concat(key) : [key]); + build(el, path ? path.concat(key) : [key], depth + 1); } }); stack.pop(); @@ -13933,10 +15131,9 @@ function encode(str) { "(": "%28", ")": "%29", "~": "%7E", - "%20": "+", - "%00": "\0" + "%20": "+" }; - return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) { + return encodeURIComponent(str).replace(/[!'()~]|%20/g, function replacer(match) { return charMap[match]; }); } @@ -13944,14 +15141,12 @@ function AxiosURLSearchParams(params, options) { this._pairs = []; params && toFormData_default(params, this, options); } -var prototype2 = AxiosURLSearchParams.prototype; -prototype2.append = function append(name, value) { +var prototype = AxiosURLSearchParams.prototype; +prototype.append = function append(name, value) { this._pairs.push([name, value]); }; -prototype2.toString = function toString2(encoder) { - const _encode = encoder ? function(value) { - return encoder.call(this, value, encode); - } : encode; +prototype.toString = function toString2(encoder) { + const _encode = encoder ? (value) => encoder.call(this, value, encode) : encode; return this._pairs.map(function each(pair) { return _encode(pair[0]) + "=" + _encode(pair[1]); }, "").join("&"); @@ -13960,24 +15155,23 @@ var AxiosURLSearchParams_default = AxiosURLSearchParams; // node_modules/axios/lib/helpers/buildURL.js function encode2(val) { - return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]"); + return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+"); } function buildURL(url2, params, options) { if (!params) { return url2; } - const _encode = options && options.encode || encode2; - if (utils_default.isFunction(options)) { - options = { - serialize: options - }; - } - const serializeFn = options && options.serialize; + url2 = url2 || ""; + const _options = utils_default.isFunction(options) ? { + serialize: options + } : options; + const _encode = utils_default.getSafeProp(_options, "encode") || encode2; + const serializeFn = utils_default.getSafeProp(_options, "serialize"); let serializedParams; if (serializeFn) { - serializedParams = serializeFn(params, options); + serializedParams = serializeFn(params, _options); } else { - serializedParams = utils_default.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams_default(params, options).toString(_encode); + serializedParams = utils_default.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams_default(params, _options).toString(_encode); } if (serializedParams) { const hashmarkIndex = url2.indexOf("#"); @@ -13990,37 +15184,99 @@ function buildURL(url2, params, options) { } // node_modules/axios/lib/core/InterceptorManager.js +var $internals2 = Symbol("internals"); +function countHandlers(handlers) { + return handlers ? handlers.length : 0; +} +function trimHandlers(handlers) { + if (!handlers) { + return; + } + while (handlers.length && handlers[handlers.length - 1] === null) { + handlers.pop(); + } +} +function syncHandlerEntries(manager, internals) { + const handlers = manager.handlers; + const length = countHandlers(handlers); + if (handlers !== internals.handlersRef) { + internals.handlersRef = handlers; + internals.handlerEntries.clear(); + } else if (length !== internals.handlersLength) { + if (!length) { + internals.handlerEntries.clear(); + } else { + internals.handlerEntries.forEach(function removeStaleEntry(entry, id) { + if (handlers[entry.index] !== entry.handler) { + internals.handlerEntries.delete(id); + } + }); + } + } + internals.handlersLength = length; +} var InterceptorManager = class { constructor() { this.handlers = []; + this[$internals2] = { + handlersRef: this.handlers, + handlersLength: this.handlers.length, + handlerEntries: /* @__PURE__ */ new Map(), + iterationDepth: 0, + nextId: 0 + }; } /** * Add a new interceptor to the stack * * @param {Function} fulfilled The function to handle `then` for a `Promise` * @param {Function} rejected The function to handle `reject` for a `Promise` + * @param {Object} options The options for the interceptor, synchronous and runWhen * * @return {Number} An ID used to remove interceptor later */ use(fulfilled, rejected, options) { - this.handlers.push({ + const handler = { fulfilled, rejected, synchronous: options ? options.synchronous : false, runWhen: options ? options.runWhen : null + }; + const internals = this[$internals2]; + if (this.handlers == null) { + this.handlers = []; + } + syncHandlerEntries(this, internals); + const id = internals.nextId++; + this.handlers.push(handler); + internals.handlerEntries.set(id, { + handler, + index: this.handlers.length - 1 }); - return this.handlers.length - 1; + internals.handlersLength = this.handlers.length; + return id; } /** * Remove an interceptor from the stack * * @param {Number} id The ID that was returned by `use` * - * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise + * @returns {void} */ eject(id) { - if (this.handlers[id]) { - this.handlers[id] = null; + const internals = this[$internals2]; + syncHandlerEntries(this, internals); + const entry = internals.handlerEntries.get(id); + if (entry) { + internals.handlerEntries.delete(id); + if (this.handlers[entry.index] !== entry.handler) { + return; + } + this.handlers[entry.index] = null; + if (!internals.iterationDepth) { + trimHandlers(this.handlers); + internals.handlersLength = this.handlers.length; + } } } /** @@ -14031,6 +15287,7 @@ var InterceptorManager = class { clear() { if (this.handlers) { this.handlers = []; + syncHandlerEntries(this, this[$internals2]); } } /** @@ -14044,11 +15301,22 @@ var InterceptorManager = class { * @returns {void} */ forEach(fn) { - utils_default.forEach(this.handlers, function forEachHandler(h) { - if (h !== null) { - fn(h); + const internals = this[$internals2]; + syncHandlerEntries(this, internals); + internals.iterationDepth++; + try { + utils_default.forEach(this.handlers, function forEachHandler(h) { + if (h !== null) { + fn(h); + } + }); + } finally { + if (!--internals.iterationDepth) { + syncHandlerEntries(this, internals); + trimHandlers(this.handlers); + internals.handlersLength = countHandlers(this.handlers); } - }); + } } }; var InterceptorManager_default = InterceptorManager; @@ -14057,7 +15325,10 @@ var InterceptorManager_default = InterceptorManager; var transitional_default = { silentJSONParsing: true, forcedJSONParsing: true, - clarifyTimeoutError: false + clarifyTimeoutError: false, + legacyInterceptorReqResOrdering: true, + advertiseZstdAcceptEncoding: false, + validateStatusUndefinedResolves: true }; // node_modules/axios/lib/platform/node/index.js @@ -14106,461 +15377,235 @@ __export(utils_exports, { navigator: () => _navigator, origin: () => origin }); -var hasBrowserEnv = typeof window !== "undefined" && typeof document !== "undefined"; -var _navigator = typeof navigator === "object" && navigator || void 0; -var hasStandardBrowserEnv = hasBrowserEnv && (!_navigator || ["ReactNative", "NativeScript", "NS"].indexOf(_navigator.product) < 0); -var hasStandardBrowserWebWorkerEnv = (() => { - return typeof WorkerGlobalScope !== "undefined" && // eslint-disable-next-line no-undef - self instanceof WorkerGlobalScope && typeof self.importScripts === "function"; -})(); -var origin = hasBrowserEnv && window.location.href || "http://localhost"; - -// node_modules/axios/lib/platform/index.js -var platform_default = { - ...utils_exports, - ...node_default -}; - -// node_modules/axios/lib/helpers/toURLEncodedForm.js -function toURLEncodedForm(data, options) { - return toFormData_default(data, new platform_default.classes.URLSearchParams(), Object.assign({ - visitor: function(value, key, path, helpers) { - if (platform_default.isNode && utils_default.isBuffer(value)) { - this.append(key, value.toString("base64")); - return false; - } - return helpers.defaultVisitor.apply(this, arguments); - } - }, options)); -} - -// node_modules/axios/lib/helpers/formDataToJSON.js -function parsePropPath(name) { - return utils_default.matchAll(/\w+|\[(\w*)]/g, name).map((match) => { - return match[0] === "[]" ? "" : match[1] || match[0]; - }); -} -function arrayToObject(arr) { - const obj = {}; - const keys = Object.keys(arr); - let i; - const len = keys.length; - let key; - for (i = 0; i < len; i++) { - key = keys[i]; - obj[key] = arr[key]; - } - return obj; -} -function formDataToJSON(formData2) { - function buildPath(path, value, target, index) { - let name = path[index++]; - if (name === "__proto__") return true; - const isNumericKey = Number.isFinite(+name); - const isLast = index >= path.length; - name = !name && utils_default.isArray(target) ? target.length : name; - if (isLast) { - if (utils_default.hasOwnProp(target, name)) { - target[name] = [target[name], value]; - } else { - target[name] = value; - } - return !isNumericKey; - } - if (!target[name] || !utils_default.isObject(target[name])) { - target[name] = []; - } - const result = buildPath(path, value, target[name], index); - if (result && utils_default.isArray(target[name])) { - target[name] = arrayToObject(target[name]); - } - return !isNumericKey; - } - if (utils_default.isFormData(formData2) && utils_default.isFunction(formData2.entries)) { - const obj = {}; - utils_default.forEachEntry(formData2, (name, value) => { - buildPath(parsePropPath(name), value, obj, 0); - }); - return obj; - } - return null; -} -var formDataToJSON_default = formDataToJSON; - -// node_modules/axios/lib/defaults/index.js -function stringifySafely(rawValue, parser, encoder) { - if (utils_default.isString(rawValue)) { - try { - (parser || JSON.parse)(rawValue); - return utils_default.trim(rawValue); - } catch (e) { - if (e.name !== "SyntaxError") { - throw e; - } - } - } - return (encoder || JSON.stringify)(rawValue); -} -var defaults = { - transitional: transitional_default, - adapter: ["xhr", "http", "fetch"], - transformRequest: [function transformRequest(data, headers) { - const contentType = headers.getContentType() || ""; - const hasJSONContentType = contentType.indexOf("application/json") > -1; - const isObjectPayload = utils_default.isObject(data); - if (isObjectPayload && utils_default.isHTMLForm(data)) { - data = new FormData(data); - } - const isFormData2 = utils_default.isFormData(data); - if (isFormData2) { - return hasJSONContentType ? JSON.stringify(formDataToJSON_default(data)) : data; - } - if (utils_default.isArrayBuffer(data) || utils_default.isBuffer(data) || utils_default.isStream(data) || utils_default.isFile(data) || utils_default.isBlob(data) || utils_default.isReadableStream(data)) { - return data; - } - if (utils_default.isArrayBufferView(data)) { - return data.buffer; - } - if (utils_default.isURLSearchParams(data)) { - headers.setContentType("application/x-www-form-urlencoded;charset=utf-8", false); - return data.toString(); - } - let isFileList2; - if (isObjectPayload) { - if (contentType.indexOf("application/x-www-form-urlencoded") > -1) { - return toURLEncodedForm(data, this.formSerializer).toString(); - } - if ((isFileList2 = utils_default.isFileList(data)) || contentType.indexOf("multipart/form-data") > -1) { - const _FormData = this.env && this.env.FormData; - return toFormData_default( - isFileList2 ? { "files[]": data } : data, - _FormData && new _FormData(), - this.formSerializer - ); - } - } - if (isObjectPayload || hasJSONContentType) { - headers.setContentType("application/json", false); - return stringifySafely(data); - } - return data; - }], - transformResponse: [function transformResponse(data) { - const transitional2 = this.transitional || defaults.transitional; - const forcedJSONParsing = transitional2 && transitional2.forcedJSONParsing; - const JSONRequested = this.responseType === "json"; - if (utils_default.isResponse(data) || utils_default.isReadableStream(data)) { - return data; - } - if (data && utils_default.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) { - const silentJSONParsing = transitional2 && transitional2.silentJSONParsing; - const strictJSONParsing = !silentJSONParsing && JSONRequested; - try { - return JSON.parse(data); - } catch (e) { - if (strictJSONParsing) { - if (e.name === "SyntaxError") { - throw AxiosError_default.from(e, AxiosError_default.ERR_BAD_RESPONSE, this, null, this.response); - } - throw e; - } - } - } - return data; - }], - /** - * A timeout in milliseconds to abort a request. If set to 0 (default) a - * timeout is not created. - */ - timeout: 0, - xsrfCookieName: "XSRF-TOKEN", - xsrfHeaderName: "X-XSRF-TOKEN", - maxContentLength: -1, - maxBodyLength: -1, - env: { - FormData: platform_default.classes.FormData, - Blob: platform_default.classes.Blob - }, - validateStatus: function validateStatus(status) { - return status >= 200 && status < 300; - }, - headers: { - common: { - "Accept": "application/json, text/plain, */*", - "Content-Type": void 0 - } - } -}; -utils_default.forEach(["delete", "get", "head", "post", "put", "patch"], (method) => { - defaults.headers[method] = {}; -}); -var defaults_default = defaults; - -// node_modules/axios/lib/helpers/parseHeaders.js -var ignoreDuplicateOf = utils_default.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" -]); -var parseHeaders_default = (rawHeaders) => { - const parsed = {}; - let key; - let val; - let i; - rawHeaders && rawHeaders.split("\n").forEach(function parser(line) { - i = line.indexOf(":"); - key = line.substring(0, i).trim().toLowerCase(); - val = line.substring(i + 1).trim(); - if (!key || parsed[key] && ignoreDuplicateOf[key]) { - return; - } - if (key === "set-cookie") { - if (parsed[key]) { - parsed[key].push(val); - } else { - parsed[key] = [val]; - } - } else { - parsed[key] = parsed[key] ? parsed[key] + ", " + val : val; - } - }); - return parsed; +var hasBrowserEnv = typeof window !== "undefined" && typeof document !== "undefined"; +var _navigator = typeof navigator === "object" && navigator || void 0; +var hasStandardBrowserEnv = hasBrowserEnv && (!_navigator || ["ReactNative", "NativeScript", "NS"].indexOf(_navigator.product) < 0); +var hasStandardBrowserWebWorkerEnv = (() => { + return typeof WorkerGlobalScope !== "undefined" && // eslint-disable-next-line no-undef + self instanceof WorkerGlobalScope && typeof self.importScripts === "function"; +})(); +var origin = hasBrowserEnv && window.location.href || "http://localhost"; + +// node_modules/axios/lib/platform/index.js +var platform_default = { + ...utils_exports, + ...node_default }; -// node_modules/axios/lib/core/AxiosHeaders.js -var $internals = Symbol("internals"); -function normalizeHeader(header) { - return header && String(header).trim().toLowerCase(); +// node_modules/axios/lib/helpers/toURLEncodedForm.js +function toURLEncodedForm(data, options) { + return toFormData_default(data, new platform_default.classes.URLSearchParams(), { + visitor: function(value, key, path, helpers) { + if (platform_default.isNode && utils_default.isBuffer(value)) { + this.append(key, value.toString("base64")); + return false; + } + return helpers.defaultVisitor.apply(this, arguments); + }, + ...options + }); } -function normalizeValue(value) { - if (value === false || value == null) { - return value; + +// node_modules/axios/lib/helpers/formDataToJSON.js +var MAX_DEPTH = DEFAULT_FORM_DATA_MAX_DEPTH; +function throwIfDepthExceeded(index) { + if (index > MAX_DEPTH) { + throw new AxiosError_default( + "FormData field is too deeply nested (" + index + " levels). Max depth: " + MAX_DEPTH, + AxiosError_default.ERR_FORM_DATA_DEPTH_EXCEEDED + ); } - return utils_default.isArray(value) ? value.map(normalizeValue) : String(value); } -function parseTokens(str) { - const tokens = /* @__PURE__ */ Object.create(null); - const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g; +function parsePropPath(name) { + const path = []; + const pattern = /[^.[\]]+|\[([^.[\]]*)]/g; let match; - while (match = tokensRE.exec(str)) { - tokens[match[1]] = match[2]; + while ((match = pattern.exec(name)) !== null) { + throwIfDepthExceeded(path.length); + path.push(match[0] === "[]" ? "" : match[1] || match[0]); } - return tokens; + return path; } -var isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim()); -function matchHeaderValue(context, value, header, filter2, isHeaderNameFilter) { - if (utils_default.isFunction(filter2)) { - return filter2.call(this, value, header); - } - if (isHeaderNameFilter) { - value = header; - } - if (!utils_default.isString(value)) return; - if (utils_default.isString(filter2)) { - return value.indexOf(filter2) !== -1; - } - if (utils_default.isRegExp(filter2)) { - return filter2.test(value); +function arrayToObject(arr) { + const obj = {}; + const keys = Object.keys(arr); + let i; + const len = keys.length; + let key; + for (i = 0; i < len; i++) { + key = keys[i]; + obj[key] = arr[key]; } + return obj; } -function formatHeader(header) { - return header.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => { - return char.toUpperCase() + str; - }); -} -function buildAccessors(obj, header) { - const accessorName = utils_default.toCamelCase(" " + header); - ["get", "set", "has"].forEach((methodName) => { - Object.defineProperty(obj, methodName + accessorName, { - value: function(arg1, arg2, arg3) { - return this[methodName].call(this, header, arg1, arg2, arg3); - }, - configurable: true - }); - }); -} -var AxiosHeaders = class { - constructor(headers) { - headers && this.set(headers); - } - set(header, valueOrRewrite, rewrite) { - const self2 = this; - function setHeader(_value, _header, _rewrite) { - const lHeader = normalizeHeader(_header); - if (!lHeader) { - throw new Error("header name must be a non-empty string"); - } - const key = utils_default.findKey(self2, lHeader); - if (!key || self2[key] === void 0 || _rewrite === true || _rewrite === void 0 && self2[key] !== false) { - self2[key || _header] = normalizeValue(_value); +function formDataToJSON(formData2) { + function buildPath(path, value, target, index) { + throwIfDepthExceeded(index); + let name = path[index++]; + if (name === "__proto__") return true; + const isNumericKey = Number.isFinite(+name); + const isLast = index >= path.length; + name = !name && utils_default.isArray(target) ? target.length : name; + if (isLast) { + if (utils_default.hasOwnProp(target, name)) { + target[name] = utils_default.isArray(target[name]) ? target[name].concat(value) : [target[name], value]; + } else { + target[name] = value; } + return !isNumericKey; } - const setHeaders = (headers, _rewrite) => utils_default.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite)); - if (utils_default.isPlainObject(header) || header instanceof this.constructor) { - setHeaders(header, valueOrRewrite); - } else if (utils_default.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) { - setHeaders(parseHeaders_default(header), valueOrRewrite); - } else if (utils_default.isHeaders(header)) { - for (const [key, value] of header.entries()) { - setHeader(value, key, rewrite); - } - } else { - header != null && setHeader(valueOrRewrite, header, rewrite); + if (!utils_default.hasOwnProp(target, name) || !utils_default.isObject(target[name])) { + target[name] = []; } - return this; - } - get(header, parser) { - header = normalizeHeader(header); - if (header) { - const key = utils_default.findKey(this, header); - if (key) { - const value = this[key]; - if (!parser) { - return value; - } - if (parser === true) { - return parseTokens(value); - } - if (utils_default.isFunction(parser)) { - return parser.call(this, value, key); - } - if (utils_default.isRegExp(parser)) { - return parser.exec(value); - } - throw new TypeError("parser must be boolean|regexp|function"); - } + const result = buildPath(path, value, target[name], index); + if (result && utils_default.isArray(target[name])) { + target[name] = arrayToObject(target[name]); } + return !isNumericKey; } - has(header, matcher) { - header = normalizeHeader(header); - if (header) { - const key = utils_default.findKey(this, header); - return !!(key && this[key] !== void 0 && (!matcher || matchHeaderValue(this, this[key], key, matcher))); - } - return false; + if (utils_default.isFormData(formData2) && utils_default.isFunction(formData2.entries)) { + const obj = {}; + utils_default.forEachEntry(formData2, (name, value) => { + buildPath(parsePropPath(name), value, obj, 0); + }); + return obj; } - delete(header, matcher) { - const self2 = this; - let deleted = false; - function deleteHeader(_header) { - _header = normalizeHeader(_header); - if (_header) { - const key = utils_default.findKey(self2, _header); - if (key && (!matcher || matchHeaderValue(self2, self2[key], key, matcher))) { - delete self2[key]; - deleted = true; - } + return null; +} +var formDataToJSON_default = formDataToJSON; + +// node_modules/axios/lib/core/methodList.js +var methodList = Object.freeze([ + "get", + "delete", + "head", + "options", + "post", + "put", + "patch", + "purge", + "link", + "unlink", + "query" +]); +var methodList_default = methodList; + +// node_modules/axios/lib/defaults/index.js +var own = (obj, key) => obj != null && utils_default.hasOwnProp(obj, key) ? obj[key] : void 0; +function stringifySafely2(rawValue, parser, encoder) { + if (utils_default.isString(rawValue)) { + try { + (parser || JSON.parse)(rawValue); + return utils_default.trim(rawValue); + } catch (e) { + if (e.name !== "SyntaxError") { + throw e; } } - if (utils_default.isArray(header)) { - header.forEach(deleteHeader); - } else { - deleteHeader(header); - } - return deleted; } - clear(matcher) { - const keys = Object.keys(this); - let i = keys.length; - let deleted = false; - while (i--) { - const key = keys[i]; - if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) { - delete this[key]; - deleted = true; + return (encoder || JSON.stringify)(rawValue); +} +var defaults = { + transitional: transitional_default, + adapter: ["xhr", "http", "fetch"], + transformRequest: [ + function transformRequest(data, headers) { + const contentType = headers.getContentType() || ""; + const hasJSONContentType = contentType.indexOf("application/json") > -1; + const isObjectPayload = utils_default.isObject(data); + if (isObjectPayload && utils_default.isHTMLForm(data)) { + data = new FormData(data); + } + const isFormData2 = utils_default.isFormData(data); + if (isFormData2) { + return hasJSONContentType ? JSON.stringify(formDataToJSON_default(data)) : data; + } + if (utils_default.isArrayBuffer(data) || utils_default.isBuffer(data) || utils_default.isStream(data) || utils_default.isFile(data) || utils_default.isBlob(data) || utils_default.isReadableStream(data)) { + return data; } - } - return deleted; - } - normalize(format) { - const self2 = this; - const headers = {}; - utils_default.forEach(this, (value, header) => { - const key = utils_default.findKey(headers, header); - if (key) { - self2[key] = normalizeValue(value); - delete self2[header]; - return; + if (utils_default.isArrayBufferView(data)) { + return data.buffer; } - const normalized = format ? formatHeader(header) : String(header).trim(); - if (normalized !== header) { - delete self2[header]; + if (utils_default.isURLSearchParams(data)) { + headers.setContentType("application/x-www-form-urlencoded;charset=utf-8", false); + return data.toString(); } - self2[normalized] = normalizeValue(value); - headers[normalized] = true; - }); - return this; - } - concat(...targets) { - return this.constructor.concat(this, ...targets); - } - toJSON(asStrings) { - const obj = /* @__PURE__ */ Object.create(null); - utils_default.forEach(this, (value, header) => { - value != null && value !== false && (obj[header] = asStrings && utils_default.isArray(value) ? value.join(", ") : value); - }); - return obj; - } - [Symbol.iterator]() { - return Object.entries(this.toJSON())[Symbol.iterator](); - } - toString() { - return Object.entries(this.toJSON()).map(([header, value]) => header + ": " + value).join("\n"); - } - get [Symbol.toStringTag]() { - return "AxiosHeaders"; - } - static from(thing) { - return thing instanceof this ? thing : new this(thing); - } - static concat(first, ...targets) { - const computed = new this(first); - targets.forEach((target) => computed.set(target)); - return computed; - } - static accessor(header) { - const internals = this[$internals] = this[$internals] = { - accessors: {} - }; - const accessors = internals.accessors; - const prototype3 = this.prototype; - function defineAccessor(_header) { - const lHeader = normalizeHeader(_header); - if (!accessors[lHeader]) { - buildAccessors(prototype3, _header); - accessors[lHeader] = true; + let isFileList2; + if (isObjectPayload) { + const formSerializer = own(this, "formSerializer"); + if (contentType.indexOf("application/x-www-form-urlencoded") > -1) { + return toURLEncodedForm(data, formSerializer).toString(); + } + if ((isFileList2 = utils_default.isFileList(data)) || contentType.indexOf("multipart/form-data") > -1) { + const env = own(this, "env"); + const _FormData = env && env.FormData; + return toFormData_default( + isFileList2 ? { "files[]": data } : data, + _FormData && new _FormData(), + formSerializer + ); + } } + if (isObjectPayload || hasJSONContentType) { + headers.setContentType("application/json", false); + return stringifySafely2(data); + } + return data; + } + ], + transformResponse: [ + function transformResponse(data) { + const transitional2 = own(this, "transitional") || defaults.transitional; + const forcedJSONParsing = transitional2 && transitional2.forcedJSONParsing; + const responseType = own(this, "responseType"); + const JSONRequested = responseType === "json"; + if (utils_default.isResponse(data) || utils_default.isReadableStream(data)) { + return data; + } + if (data && utils_default.isString(data) && (forcedJSONParsing && !responseType || JSONRequested)) { + const silentJSONParsing = transitional2 && transitional2.silentJSONParsing; + const strictJSONParsing = !silentJSONParsing && JSONRequested; + try { + return JSON.parse(data, own(this, "parseReviver")); + } catch (e) { + if (strictJSONParsing) { + if (e.name === "SyntaxError") { + throw AxiosError_default.from(e, AxiosError_default.ERR_BAD_RESPONSE, this, null, own(this, "response")); + } + throw e; + } + } + } + return data; + } + ], + /** + * A timeout in milliseconds to abort a request. If set to 0 (default) a + * timeout is not created. + */ + timeout: 0, + xsrfCookieName: "XSRF-TOKEN", + xsrfHeaderName: "X-XSRF-TOKEN", + maxContentLength: -1, + maxBodyLength: -1, + env: { + FormData: platform_default.classes.FormData, + Blob: platform_default.classes.Blob + }, + validateStatus: function validateStatus(status) { + return status >= 200 && status < 300; + }, + headers: { + common: { + Accept: "application/json, text/plain, */*", + "Content-Type": void 0 } - utils_default.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header); - return this; } }; -AxiosHeaders.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]); -utils_default.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => { - let mapped = key[0].toUpperCase() + key.slice(1); - return { - get: () => value, - set(headerValue) { - this[mapped] = headerValue; - } - }; +utils_default.forEach(methodList_default, (method) => { + defaults.headers[method] = {}; }); -utils_default.freezeMethods(AxiosHeaders); -var AxiosHeaders_default = AxiosHeaders; +var defaults_default = defaults; // node_modules/axios/lib/core/transformData.js function transformData(fns, response) { @@ -14581,13 +15626,22 @@ function isCancel(value) { } // node_modules/axios/lib/cancel/CanceledError.js -function CanceledError(message, config, request) { - AxiosError_default.call(this, message == null ? "canceled" : message, AxiosError_default.ERR_CANCELED, config, request); - this.name = "CanceledError"; -} -utils_default.inherits(CanceledError, AxiosError_default, { - __CANCEL__: true -}); +var CanceledError = class extends AxiosError_default { + /** + * A `CanceledError` is an object that is thrown when an operation is canceled. + * + * @param {string=} message The message. + * @param {Object=} config The config. + * @param {Object=} request The request. + * + * @returns {CanceledError} The created error. + */ + constructor(message, config, request) { + super(message == null ? "canceled" : message, AxiosError_default.ERR_CANCELED, config, request); + this.name = "CanceledError"; + this.__CANCEL__ = true; + } +}; var CanceledError_default = CanceledError; // node_modules/axios/lib/core/settle.js @@ -14598,7 +15652,7 @@ function settle(resolve, reject, response) { } else { reject(new AxiosError_default( "Request failed with status code " + response.status, - [AxiosError_default.ERR_BAD_REQUEST, AxiosError_default.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4], + response.status >= 400 && response.status < 500 ? AxiosError_default.ERR_BAD_REQUEST : AxiosError_default.ERR_BAD_RESPONSE, response.config, response.request, response @@ -14608,42 +15662,170 @@ function settle(resolve, reject, response) { // node_modules/axios/lib/helpers/isAbsoluteURL.js function isAbsoluteURL(url2) { + if (typeof url2 !== "string") { + return false; + } return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url2); } // node_modules/axios/lib/helpers/combineURLs.js function combineURLs(baseURL, relativeURL) { - return relativeURL ? baseURL.replace(/\/?\/$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL; + if (!relativeURL) { + return baseURL; + } + let end = baseURL.length; + while (end > 0 && baseURL.charCodeAt(end - 1) === 47) { + end--; + } + return baseURL.slice(0, end) + "/" + relativeURL.replace(/^\/+/, ""); +} + +// node_modules/axios/lib/helpers/normalizeURLForProtocolCheck.js +var urlParserControlCharacters = /[\t\n\r]/g; +function normalizeURLForProtocolCheck(url2) { + if (typeof url2 !== "string") { + return url2; + } + let start = 0; + while (start < url2.length && url2.charCodeAt(start) <= 32) { + start++; + } + return url2.slice(start).replace(urlParserControlCharacters, ""); } // node_modules/axios/lib/core/buildFullPath.js -function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) { +var malformedHttpProtocol = /^https?:(?!\/\/)/i; +function redactFragment(fragment) { + if (!fragment) { + return fragment; + } + return fragment.replace(/(^|&)([^=&]*=)?[^&]+/g, (match, separator, parameterName = "") => { + return `${separator}${parameterName}${REDACTED}`; + }); +} +function redactSensitiveURLParts(url2) { + const redactedURL = url2.replace(/^(https?:\/{0,2})[^/?#]*@/i, `$1${REDACTED}@`); + const fragmentIndex = redactedURL.indexOf("#"); + const urlWithoutFragment = fragmentIndex === -1 ? redactedURL : redactedURL.slice(0, fragmentIndex); + const redactedURLWithoutFragment = urlWithoutFragment.replace( + /([?&][^=&#]*=)[^&#]*/g, + `$1${REDACTED}` + ); + if (fragmentIndex === -1) { + return redactedURLWithoutFragment; + } + return `${redactedURLWithoutFragment}#${redactFragment(redactedURL.slice(fragmentIndex + 1))}`; +} +function assertValidHttpProtocolURL(url2, config) { + if (typeof url2 === "string") { + const normalizedURL = normalizeURLForProtocolCheck(url2); + if (malformedHttpProtocol.test(normalizedURL)) { + throw new AxiosError_default( + `Invalid URL ${JSON.stringify(redactSensitiveURLParts(normalizedURL))}: missing "//" after protocol`, + AxiosError_default.ERR_INVALID_URL, + config + ); + } + } +} +function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls, config) { + assertValidHttpProtocolURL(requestedURL, config); let isRelativeUrl = !isAbsoluteURL(requestedURL); - if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) { + if (baseURL && (isRelativeUrl || allowAbsoluteUrls === false)) { + assertValidHttpProtocolURL(baseURL, config); return combineURLs(baseURL, requestedURL); } return requestedURL; } +// node_modules/proxy-from-env/index.js +var DEFAULT_PORTS = { + ftp: 21, + gopher: 70, + http: 80, + https: 443, + ws: 80, + wss: 443 +}; +function parseUrl(urlString) { + try { + return new URL(urlString); + } catch { + return null; + } +} +function getProxyForUrl(url2) { + var parsedUrl = (typeof url2 === "string" ? parseUrl(url2) : url2) || {}; + var proto = parsedUrl.protocol; + var hostname = parsedUrl.host; + var port = parsedUrl.port; + if (typeof hostname !== "string" || !hostname || typeof proto !== "string") { + return ""; + } + proto = proto.split(":", 1)[0]; + hostname = hostname.replace(/:\d*$/, ""); + port = parseInt(port) || DEFAULT_PORTS[proto] || 0; + if (!shouldProxy(hostname, port)) { + return ""; + } + var proxy = getEnv(proto + "_proxy") || getEnv("all_proxy"); + if (proxy && proxy.indexOf("://") === -1) { + proxy = proto + "://" + proxy; + } + return proxy; +} +function shouldProxy(hostname, port) { + var NO_PROXY = getEnv("no_proxy").toLowerCase(); + if (!NO_PROXY) { + return true; + } + if (NO_PROXY === "*") { + return false; + } + return NO_PROXY.split(/[,\s]/).every(function(proxy) { + if (!proxy) { + return true; + } + var parsedProxy = proxy.match(/^(.+):(\d+)$/); + var parsedProxyHostname = parsedProxy ? parsedProxy[1] : proxy; + var parsedProxyPort = parsedProxy ? parseInt(parsedProxy[2]) : 0; + if (parsedProxyPort && parsedProxyPort !== port) { + return true; + } + if (!/^[.*]/.test(parsedProxyHostname)) { + return hostname !== parsedProxyHostname; + } + if (parsedProxyHostname.charAt(0) === "*") { + parsedProxyHostname = parsedProxyHostname.slice(1); + } + return !hostname.endsWith(parsedProxyHostname); + }); +} +function getEnv(key) { + return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || ""; +} + // node_modules/axios/lib/adapters/http.js -var import_proxy_from_env = __toESM(require_proxy_from_env(), 1); +var import_https_proxy_agent = __toESM(require_dist(), 1); var import_http = __toESM(require("http"), 1); var import_https = __toESM(require("https"), 1); -var import_util2 = __toESM(require("util"), 1); +var import_http22 = __toESM(require("http2"), 1); +var import_util3 = __toESM(require("util"), 1); +var import_path = require("path"); var import_follow_redirects = __toESM(require_follow_redirects(), 1); var import_zlib = __toESM(require("zlib"), 1); // node_modules/axios/lib/env/data.js -var VERSION = "1.8.4"; +var VERSION = "1.20.0"; // node_modules/axios/lib/helpers/parseProtocol.js function parseProtocol(url2) { - const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url2); + const match = /^([-+\w]{1,25}):(?:\/\/)?/.exec(url2); return match && match[1] || ""; } // node_modules/axios/lib/helpers/fromDataURI.js -var DATA_URL_PATTERN = /^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/; +var DATA_URL_PATTERN = /^([^,;/]+\/[^,;/]+)?((?:;[^,;=]+=[^,;]+)*)(;base64)?,([\s\S]*)$/; function fromDataURI(uri, asBlob, options) { const _Blob = options && options.Blob || platform_default.classes.Blob; const protocol = parseProtocol(uri); @@ -14656,10 +15838,17 @@ function fromDataURI(uri, asBlob, options) { if (!match) { throw new AxiosError_default("Invalid URL", AxiosError_default.ERR_INVALID_URL); } - const mime = match[1]; - const isBase64 = match[2]; - const body = match[3]; - const buffer = Buffer.from(decodeURIComponent(body), isBase64 ? "base64" : "utf8"); + const type = match[1]; + const params = match[2]; + const encoding = match[3] ? "base64" : "utf8"; + const body = match[4]; + let mime = ""; + if (type) { + mime = params ? type + params : type; + } else if (params) { + mime = "text/plain" + params; + } + const buffer = encoding === "base64" ? Buffer.from(body, "base64") : Buffer.from(decodeURIComponent(body), encoding); if (asBlob) { if (!_Blob) { throw new AxiosError_default("Blob is not supported", AxiosError_default.ERR_NOT_SUPPORT); @@ -14674,21 +15863,40 @@ function fromDataURI(uri, asBlob, options) { // node_modules/axios/lib/adapters/http.js var import_stream4 = __toESM(require("stream"), 1); +// node_modules/axios/lib/core/setFormDataHeaders.js +var FORM_DATA_CONTENT_HEADERS = ["content-type", "content-length"]; +function setFormDataHeaders(headers, formHeaders, policy) { + if (policy !== "content-only") { + headers.set(formHeaders); + return; + } + Object.entries(formHeaders || {}).forEach(([key, val]) => { + if (FORM_DATA_CONTENT_HEADERS.includes(key.toLowerCase())) { + headers.set(key, val); + } + }); +} + // node_modules/axios/lib/helpers/AxiosTransformStream.js var import_stream = __toESM(require("stream"), 1); var kInternals = Symbol("internals"); var AxiosTransformStream = class extends import_stream.default.Transform { constructor(options) { - options = utils_default.toFlatObject(options, { - maxRate: 0, - chunkSize: 64 * 1024, - minChunkSize: 100, - timeWindow: 500, - ticksRate: 2, - samplesCount: 15 - }, null, (prop, source) => { - return !utils_default.isUndefined(source[prop]); - }); + options = utils_default.toFlatObject( + options, + { + maxRate: 0, + chunkSize: 64 * 1024, + minChunkSize: 100, + timeWindow: 500, + ticksRate: 2, + samplesCount: 15 + }, + null, + (prop, source) => { + return !utils_default.isUndefined(source[prop]); + } + ); super({ readableHighWaterMark: options.chunkSize }); @@ -14771,9 +15979,12 @@ var AxiosTransformStream = class extends import_stream.default.Transform { chunkRemainder = _chunk.subarray(maxChunkSize); _chunk = _chunk.subarray(0, maxChunkSize); } - pushChunk(_chunk, chunkRemainder ? () => { - process.nextTick(_callback, null, chunkRemainder); - } : _callback); + pushChunk( + _chunk, + chunkRemainder ? () => { + process.nextTick(_callback, null, chunkRemainder); + } : _callback + ); }; transformChunk(chunk, function transformNextChunk(err, _chunk) { if (err) { @@ -14825,7 +16036,8 @@ var FormDataPart = class { if (isStringValue) { value = textEncoder.encode(String(value).replace(/\r?\n|\r\n?/g, CRLF)); } else { - headers += `Content-Type: ${value.type || "application/octet-stream"}${CRLF}`; + const safeType = String(value.type || "application/octet-stream").replace(/[\r\n]/g, ""); + headers += `Content-Type: ${safeType}${CRLF}`; } this.headers = textEncoder.encode(headers + CRLF); this.contentLength = isStringValue ? value.byteLength : value.size; @@ -14844,11 +16056,14 @@ var FormDataPart = class { yield CRLF_BYTES; } static escapeName(name) { - return String(name).replace(/[\r\n"]/g, (match) => ({ - "\r": "%0D", - "\n": "%0A", - '"': "%22" - })[match]); + return String(name).replace( + /[\r\n"]/g, + (match) => ({ + "\r": "%0D", + "\n": "%0A", + '"': "%22" + })[match] + ); } }; var formDataToStream = (form, headersHandler, options) => { @@ -14858,13 +16073,13 @@ var formDataToStream = (form, headersHandler, options) => { boundary = tag + "-" + platform_default.generateString(size, BOUNDARY_ALPHABET) } = options || {}; if (!utils_default.isFormData(form)) { - throw TypeError("FormData instance required"); + throw new TypeError("FormData instance required"); } if (boundary.length < 1 || boundary.length > 70) { - throw Error("boundary must be 10-70 characters long"); + throw new Error("boundary must be 1-70 characters long"); } const boundaryBytes = textEncoder.encode("--" + boundary + CRLF); - const footerBytes = textEncoder.encode("--" + boundary + "--" + CRLF + CRLF); + const footerBytes = textEncoder.encode("--" + boundary + "--" + CRLF); let contentLength = footerBytes.byteLength; const parts = Array.from(form.entries()).map(([name, value]) => { const part = new FormDataPart(name, value); @@ -14880,13 +16095,15 @@ var formDataToStream = (form, headersHandler, options) => { computedHeaders["Content-Length"] = contentLength; } headersHandler && headersHandler(computedHeaders); - return import_stream2.Readable.from(async function* () { - for (const part of parts) { - yield boundaryBytes; - yield* part.encode(); - } - yield footerBytes; - }()); + return import_stream2.Readable.from( + async function* () { + for (const part of parts) { + yield boundaryBytes; + yield* part.encode(); + } + yield footerBytes; + }() + ); }; var formDataToStream_default = formDataToStream; @@ -14912,6 +16129,89 @@ var ZlibHeaderTransformStream = class extends import_stream3.default.Transform { }; var ZlibHeaderTransformStream_default = ZlibHeaderTransformStream; +// node_modules/axios/lib/helpers/Http2Sessions.js +var import_http2 = __toESM(require("http2"), 1); +var import_util2 = __toESM(require("util"), 1); +var Http2Sessions = class { + constructor() { + this.sessions = /* @__PURE__ */ Object.create(null); + } + getSession(authority, options) { + options = Object.assign( + /* @__PURE__ */ Object.create(null), + { + sessionTimeout: 1e3 + }, + options + ); + let authoritySessions = this.sessions[authority]; + if (authoritySessions) { + let len = authoritySessions.length; + for (let i = 0; i < len; i++) { + const [sessionHandle, sessionOptions] = authoritySessions[i]; + if (!sessionHandle.destroyed && !sessionHandle.closed && import_util2.default.isDeepStrictEqual(sessionOptions, options)) { + return sessionHandle; + } + } + } + const session = import_http2.default.connect(authority, options); + let removed; + let timer; + const removeSession = () => { + if (removed) { + return; + } + removed = true; + if (timer) { + clearTimeout(timer); + timer = null; + } + let entries = authoritySessions, len = entries.length, i = len; + while (i--) { + if (entries[i][0] === session) { + if (len === 1) { + delete this.sessions[authority]; + } else { + entries.splice(i, 1); + } + if (!session.closed) { + session.close(); + } + return; + } + } + }; + const originalRequestFn = session.request; + const { sessionTimeout } = options; + if (sessionTimeout != null) { + let streamsCount = 0; + session.request = function() { + const stream4 = originalRequestFn.apply(this, arguments); + streamsCount++; + if (timer) { + clearTimeout(timer); + timer = null; + } + stream4.once("close", () => { + if (!--streamsCount) { + timer = setTimeout(() => { + timer = null; + removeSession(); + }, sessionTimeout); + } + }); + return stream4; + }; + } + session.once("close", removeSession); + session.once("error", removeSession); + let entry = [session, options]; + authoritySessions ? authoritySessions.push(entry) : authoritySessions = this.sessions[authority] = [entry]; + return session; + } +}; +var Http2Sessions_default = Http2Sessions; + // node_modules/axios/lib/helpers/callbackify.js var callbackify = (fn, reducer) => { return utils_default.isAsyncFn(fn) ? function(...args) { @@ -14927,6 +16227,330 @@ var callbackify = (fn, reducer) => { }; var callbackify_default = callbackify; +// node_modules/axios/lib/helpers/shouldBypassProxy.js +var LOOPBACK_HOSTNAMES = /* @__PURE__ */ new Set(["localhost", "0.0.0.0"]); +var trimTrailingDots = (value) => { + let end = value.length; + while (end && value.charCodeAt(end - 1) === 46) { + end--; + } + return end === value.length ? value : value.slice(0, end); +}; +var isIPv4Loopback = (host) => { + const parts = host.split("."); + if (parts.length !== 4) return false; + if (parts[0] !== "127") return false; + return parts.every((p) => /^\d+$/.test(p) && Number(p) >= 0 && Number(p) <= 255); +}; +var parseIPv4Octet = (text) => { + if (/^0[xX][0-9a-fA-F]+$/.test(text)) { + const n = parseInt(text.slice(2), 16); + return Number.isFinite(n) ? n : null; + } + if (text.length > 1 && /^0[0-7]+$/.test(text)) { + const n = parseInt(text, 8); + return Number.isFinite(n) ? n : null; + } + if (text.length > 1 && /^0[0-9]+$/.test(text)) { + return null; + } + if (/^[0-9]+$/.test(text)) { + const n = parseInt(text, 10); + return Number.isFinite(n) ? n : null; + } + return null; +}; +var normalizeIPAddress = (host) => { + if (typeof host !== "string" || !host || host.indexOf(":") !== -1) { + return host; + } + let h = host; + if (h.charAt(0) === "[" && h.charAt(h.length - 1) === "]") { + h = h.slice(1, -1); + } + h = trimTrailingDots(h); + if (!/^[0-9.xXa-fA-F]+$/.test(h)) return host; + const parts = h.split("."); + if (parts.some((p) => p === "")) return host; + if (parts.length === 4) { + const octets = parts.map(parseIPv4Octet); + if (octets.some((n) => n === null || n < 0 || n > 255)) return host; + return octets.join("."); + } + if (parts.length > 4) { + return host; + } + if (parts.length === 1) return host; + const literalOctets = parts.slice(0, -1); + const tail = parts[parts.length - 1]; + const tailSlots = 4 - literalOctets.length; + const tailValue = parseIPv4Octet(tail); + if (tailValue === null) return host; + const maxTail = (1 << 8 * tailSlots) - 1; + if (tailValue < 0 || tailValue > maxTail) return host; + const tailOctets = new Array(tailSlots).fill(0); + for (let i = tailSlots - 1, v = tailValue; i >= 0; i--, v >>= 8) { + tailOctets[i] = v & 255; + } + const literal = literalOctets.map(parseIPv4Octet); + if (literal.some((n) => n === null || n < 0 || n > 255)) return host; + return [...literal, ...tailOctets].join("."); +}; +var isIPv6ZeroGroup = (group) => /^0{1,4}$/.test(group); +var isIPv6Unspecified = (host) => { + if (host === "::") return true; + const compressionIndex = host.indexOf("::"); + if (compressionIndex !== -1) { + if (compressionIndex !== host.lastIndexOf("::")) return false; + const left = host.slice(0, compressionIndex); + const right = host.slice(compressionIndex + 2); + const leftGroups = left ? left.split(":") : []; + const rightGroups = right ? right.split(":") : []; + const explicitGroups = leftGroups.length + rightGroups.length; + return explicitGroups < 8 && leftGroups.every(isIPv6ZeroGroup) && rightGroups.every(isIPv6ZeroGroup); + } + const groups = host.split(":"); + return groups.length === 8 && groups.every(isIPv6ZeroGroup); +}; +var isIPv6Loopback = (host) => { + if (host === "::1") return true; + const v4MappedDotted = host.match(/^::ffff:(\d+\.\d+\.\d+\.\d+)$/i); + if (v4MappedDotted) return isIPv4Loopback(v4MappedDotted[1]); + const v4MappedHex = host.match(/^::ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i); + if (v4MappedHex) { + const high = parseInt(v4MappedHex[1], 16); + return high >= 32512 && high <= 32767; + } + const groups = host.split(":"); + if (groups.length === 8) { + for (let i = 0; i < 7; i++) { + if (!/^0+$/.test(groups[i])) return false; + } + return /^0*1$/.test(groups[7]); + } + return false; +}; +var isLoopback = (host) => { + if (!host) return false; + if (LOOPBACK_HOSTNAMES.has(host)) return true; + if (isIPv4Loopback(host)) return true; + if (isIPv6Unspecified(host)) return true; + return isIPv6Loopback(host); +}; +var DEFAULT_PORTS2 = { + http: 80, + https: 443, + ws: 80, + wss: 443, + ftp: 21 +}; +var parseNoProxyEntry = (entry) => { + let entryHost = entry; + let entryPort = 0; + if (entryHost.charAt(0) === "[") { + const bracketIndex = entryHost.indexOf("]"); + if (bracketIndex !== -1) { + const host = entryHost.slice(1, bracketIndex); + const rest = entryHost.slice(bracketIndex + 1); + if (rest.charAt(0) === ":" && /^\d+$/.test(rest.slice(1))) { + entryPort = Number.parseInt(rest.slice(1), 10); + } + return [host, entryPort]; + } + } + const firstColon = entryHost.indexOf(":"); + const lastColon = entryHost.lastIndexOf(":"); + if (firstColon !== -1 && firstColon === lastColon && /^\d+$/.test(entryHost.slice(lastColon + 1))) { + entryPort = Number.parseInt(entryHost.slice(lastColon + 1), 10); + entryHost = entryHost.slice(0, lastColon); + } + return [entryHost, entryPort]; +}; +var IPV4_MAPPED_DOTTED_RE = /^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:(\d+\.\d+\.\d+\.\d+)$/i; +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; +var unmapIPv4MappedIPv6 = (host) => { + if (typeof host !== "string" || host.indexOf(":") === -1) return host; + const dotted = host.match(IPV4_MAPPED_DOTTED_RE); + if (dotted) return dotted[1]; + const hex = host.match(IPV4_MAPPED_HEX_RE); + if (hex) { + const high = parseInt(hex[1], 16); + const low = parseInt(hex[2], 16); + return `${high >> 8}.${high & 255}.${low >> 8}.${low & 255}`; + } + return host; +}; +var IPV4_OCTET_RE = /^(?:0|[1-9]\d{0,2})$/; +var ipv4ToBytes = (host) => { + const parts = host.split("."); + return parts.length === 4 && parts.every((part) => IPV4_OCTET_RE.test(part) && Number(part) <= 255) ? parts.map(Number) : null; +}; +var IPV6_GROUP_RE = /^[0-9a-f]{1,4}$/i; +var ipv6ToBytes = (host) => { + const halves = host.split("::"); + if (halves.length > 2) { + return null; + } + const groups = halves[0] ? halves[0].split(":") : []; + if (halves.length === 2) { + const rear = halves[1] ? halves[1].split(":") : []; + const missing = 8 - groups.length - rear.length; + if (missing < 1) { + return null; + } + groups.push(...new Array(missing).fill("0"), ...rear); + } + if (groups.length !== 8 || groups.some((group) => !IPV6_GROUP_RE.test(group))) { + return null; + } + return groups.flatMap((group) => { + const value = Number.parseInt(group, 16); + return [value >> 8 & 255, value & 255]; + }); +}; +var ipToBytes = (host) => { + if (typeof host !== "string" || !host) { + return null; + } + return host.indexOf(":") !== -1 ? ipv6ToBytes(host) : ipv4ToBytes(host); +}; +var normalizeNoProxyHost = (hostname) => { + if (!hostname) { + return hostname; + } + if (hostname.charAt(0) === "[" && hostname.charAt(hostname.length - 1) === "]") { + hostname = hostname.slice(1, -1); + } + const trimmed = trimTrailingDots(hostname); + const ipv4 = normalizeIPAddress(trimmed); + if (ipv4 !== trimmed) { + return ipv4; + } + return unmapIPv4MappedIPv6(trimmed); +}; +var normalizeCidrBase = (input) => { + let base = input; + const startsBracket = base.charAt(0) === "["; + const endsBracket = base.charAt(base.length - 1) === "]"; + const hasBracket = base.includes("[") || base.includes("]"); + if (startsBracket || endsBracket) { + if (!startsBracket || !endsBracket) { + return null; + } + base = base.slice(1, -1); + if (base.indexOf(":") === -1 || base.includes("[") || base.includes("]")) { + return null; + } + } else if (hasBracket) { + return null; + } + if (!base || base.charAt(base.length - 1) === ".") { + return null; + } + const wasIPv6 = base.indexOf(":") !== -1; + if (wasIPv6) { + try { + base = new URL(`http://[${base}]/`).hostname.slice(1, -1); + } catch (_err) { + return null; + } + } else { + base = normalizeIPAddress(base); + if (!ipv4ToBytes(base)) { + return null; + } + } + return { normalized: unmapIPv4MappedIPv6(base), wasIPv6 }; +}; +var CIDR_ENTRY_RE = /^(.+)\/(0|[1-9]\d{0,2})$/; +var parseCidrEntry = (entry) => { + if (entry.indexOf("/") === -1) { + return void 0; + } + const match = CIDR_ENTRY_RE.exec(entry); + if (!match) { + return null; + } + let prefix = Number(match[2]); + const parsedBase = normalizeCidrBase(match[1]); + if (!parsedBase) { + return null; + } + const { normalized, wasIPv6 } = parsedBase; + if (wasIPv6 && normalized.indexOf(":") === -1) { + if (prefix < 96) { + return null; + } + prefix -= 96; + } + const bytes = ipToBytes(normalized); + if (!bytes || prefix > bytes.length * 8) { + return null; + } + return { bytes, prefix }; +}; +var isInSubnet = (addressBytes, networkBytes, prefix) => { + const fullBytes = prefix >> 3; + for (let i = 0; i < fullBytes; i++) { + if (addressBytes[i] !== networkBytes[i]) { + return false; + } + } + const remainingBits = prefix & 7; + if (remainingBits) { + const mask = 255 << 8 - remainingBits & 255; + if ((addressBytes[fullBytes] & mask) !== (networkBytes[fullBytes] & mask)) { + return false; + } + } + return true; +}; +function shouldBypassProxy(location) { + let parsed; + try { + parsed = new URL(location); + } catch (_err) { + return false; + } + const noProxy = (process.env.no_proxy || process.env.NO_PROXY || "").toLowerCase(); + if (!noProxy) { + return false; + } + if (noProxy === "*") { + return true; + } + const port = Number.parseInt(parsed.port, 10) || DEFAULT_PORTS2[parsed.protocol.split(":", 1)[0]] || 0; + const hostname = normalizeNoProxyHost(parsed.hostname.toLowerCase()); + const hostnameBytes = ipToBytes(hostname); + return noProxy.split(/[\s,]+/).some((entry) => { + if (!entry) { + return false; + } + if (entry === "*") { + return true; + } + const cidr = parseCidrEntry(entry); + if (cidr !== void 0) { + return cidr !== null && !!hostnameBytes && hostnameBytes.length === cidr.bytes.length && isInSubnet(hostnameBytes, cidr.bytes, cidr.prefix); + } + let [entryHost, entryPort] = parseNoProxyEntry(entry); + entryHost = normalizeNoProxyHost(entryHost); + if (!entryHost) { + return false; + } + if (entryPort && entryPort !== port) { + return false; + } + if (entryHost.charAt(0) === "*") { + entryHost = entryHost.slice(1); + } + if (entryHost.charAt(0) === ".") { + return hostname.endsWith(entryHost); + } + return hostname === entryHost || isLoopback(hostname) && isLoopback(entryHost); + }); +} + // node_modules/axios/lib/helpers/speedometer.js function speedometer(samplesCount, min) { samplesCount = samplesCount || 10; @@ -14976,7 +16600,7 @@ function throttle(fn, freq) { clearTimeout(timer); timer = null; } - fn.apply(null, args); + fn(...args); }; const throttled = (...args) => { const now = Date.now(); @@ -14994,7 +16618,8 @@ function throttle(fn, freq) { } }; const flush = () => lastArgs && invoke(lastArgs); - return [throttled, flush]; + const flushWith = (...args) => invoke(args); + return [throttled, flush, flushWith]; } var throttle_default = throttle; @@ -15003,19 +16628,22 @@ var progressEventReducer = (listener, isDownloadStream, freq = 3) => { let bytesNotified = 0; const _speedometer = speedometer_default(50, 250); return throttle_default((e) => { - const loaded = e.loaded; + if (!e || !utils_default.isNumber(e.loaded)) { + return; + } + const rawLoaded = e.loaded; const total = e.lengthComputable ? e.total : void 0; - const progressBytes = loaded - bytesNotified; + const loaded = Math.max(0, total != null ? Math.min(rawLoaded, total) : rawLoaded); + const progressBytes = Math.max(0, loaded - bytesNotified); const rate = _speedometer(progressBytes); - const inRange = loaded <= total; - bytesNotified = loaded; + bytesNotified = Math.max(bytesNotified, loaded); const data = { loaded, total, progress: total ? loaded / total : void 0, bytes: progressBytes, rate: rate ? rate : void 0, - estimated: rate && total && inRange ? (total - loaded) / rate : void 0, + estimated: rate && total ? (total - loaded) / rate : void 0, event: e, lengthComputable: total != null, [isDownloadStream ? "download" : "upload"]: true @@ -15025,13 +16653,119 @@ var progressEventReducer = (listener, isDownloadStream, freq = 3) => { }; var progressEventDecorator = (total, throttled) => { const lengthComputable = total != null; - return [(loaded) => throttled[0]({ - lengthComputable, - total, - loaded - }), throttled[1]]; + return [ + (loaded) => throttled[0]({ + lengthComputable, + total, + loaded + }), + throttled[1] + ]; +}; +var asyncDecorator = (fn, scheduler = utils_default.asap) => (...args) => scheduler(() => fn(...args)); + +// node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js +var isHexDigit = (charCode) => charCode >= 48 && charCode <= 57 || charCode >= 65 && charCode <= 70 || charCode >= 97 && charCode <= 102; +var isPercentEncodedByte = (str, i, len) => i + 2 < len && isHexDigit(str.charCodeAt(i + 1)) && isHexDigit(str.charCodeAt(i + 2)); +var hexValue = (charCode) => charCode <= 57 ? charCode - 48 : (charCode & 223) - 55; +var isBase64Char = (charCode) => charCode >= 65 && charCode <= 90 || // A-Z +charCode >= 97 && charCode <= 122 || // a-z +charCode >= 48 && charCode <= 57 || // 0-9 +charCode === 43 || // + +charCode === 47 || // / +charCode === 45 || // - (base64url) +charCode === 95; +var isBase64Whitespace = (charCode) => charCode === 9 || charCode === 10 || charCode === 12 || charCode === 13 || charCode === 32; +var base64Bytes = (significant) => { + const groups = Math.floor(significant / 4); + const remainder = significant % 4; + return groups * 3 + (remainder === 2 ? 1 : remainder === 3 ? 2 : 0); +}; +var estimateBase64BufferAllocation = (body) => { + const len = body.length; + let padding = 0; + if (len > 0 && body.charCodeAt(len - 1) === 61) { + padding++; + if (len > 1 && body.charCodeAt(len - 2) === 61) { + padding++; + } + } + return Math.floor((len - padding) * 3 / 4); +}; +var estimatePercentDecodedBase64Bytes = (body) => { + const len = body.length; + let significant = 0; + let padding = 0; + let invalid = false; + for (let i = 0; i < len; i++) { + let code = body.charCodeAt(i); + if (code === 37 && isPercentEncodedByte(body, i, len)) { + code = hexValue(body.charCodeAt(i + 1)) * 16 + hexValue(body.charCodeAt(i + 2)); + i += 2; + } + if (isBase64Whitespace(code)) { + continue; + } + if (code === 61) { + padding++; + continue; + } + if (!isBase64Char(code) || padding > 0) { + invalid = true; + continue; + } + significant++; + } + if (invalid || padding > 2 || padding > 0 && (significant + padding) % 4 !== 0 || significant % 4 === 1) { + return estimateBase64BufferAllocation(body); + } + return base64Bytes(significant); +}; +var estimateDataURLBytes = (url2, estimateBase64) => { + if (!url2 || typeof url2 !== "string") return 0; + if (!url2.startsWith("data:")) return 0; + const comma = url2.indexOf(","); + if (comma < 0) return 0; + const meta = url2.slice(5, comma); + const body = url2.slice(comma + 1); + const isBase64 = /;base64/i.test(meta); + if (isBase64) { + return estimateBase64(body); + } + let bytes = 0; + for (let i = 0, len = body.length; i < len; i++) { + const c = body.charCodeAt(i); + if (c === 37 && isPercentEncodedByte(body, i, len)) { + bytes += 1; + i += 2; + } else if (c < 128) { + bytes += 1; + } else if (c < 2048) { + bytes += 2; + } else if (c >= 55296 && c <= 56319 && i + 1 < len) { + const next = body.charCodeAt(i + 1); + if (next >= 56320 && next <= 57343) { + bytes += 4; + i++; + } else { + bytes += 3; + } + } else { + bytes += 3; + } + } + return bytes; }; -var asyncDecorator = (fn) => (...args) => utils_default.asap(() => fn(...args)); +function estimateDataURLDecodedBytes(url2) { + const fragmentIndex = typeof url2 === "string" ? url2.indexOf("#") : -1; + return estimateDataURLBytes( + fragmentIndex === -1 ? url2 : url2.slice(0, fragmentIndex), + estimatePercentDecodedBase64Bytes + ); +} +function estimateDataURLBufferAllocation(url2) { + return estimateDataURLBytes(url2, estimateBase64BufferAllocation); +} // node_modules/axios/lib/adapters/http.js var zlibOptions = { @@ -15042,56 +16776,234 @@ var brotliOptions = { flush: import_zlib.default.constants.BROTLI_OPERATION_FLUSH, finishFlush: import_zlib.default.constants.BROTLI_OPERATION_FLUSH }; +var zstdOptions = { + flush: import_zlib.default.constants.ZSTD_e_flush, + finishFlush: import_zlib.default.constants.ZSTD_e_flush +}; var isBrotliSupported = utils_default.isFunction(import_zlib.default.createBrotliDecompress); +var isZstdSupported = utils_default.isFunction(import_zlib.default.createZstdDecompress); +var ACCEPT_ENCODING = "gzip, compress, deflate" + (isBrotliSupported ? ", br" : ""); +var ACCEPT_ENCODING_WITH_ZSTD = ACCEPT_ENCODING + (isZstdSupported ? ", zstd" : ""); +var scheduleProgress = typeof process !== "undefined" && process.nextTick ? process.nextTick.bind(process) : utils_default.asap; var { http: httpFollow, https: httpsFollow } = import_follow_redirects.default; var isHttps = /https:?/; +var kAxiosSocketListener = Symbol("axios.http.socketListener"); +var kAxiosCurrentReq = Symbol("axios.http.currentReq"); +function handleSocketError(err) { + const current = this[kAxiosCurrentReq]; + if (current && !current.destroyed) { + current.destroy(err); + } +} +var kAxiosInstalledTunnel = Symbol("axios.http.installedTunnel"); +var tunnelingAgentCache = /* @__PURE__ */ new Map(); +var tunnelingAgentCacheUser = /* @__PURE__ */ new WeakMap(); +var NODE_NATIVE_ENV_PROXY_SUPPORT = { + 22: 21, + 24: 5 +}; +function isNodeNativeEnvProxySupported(nodeVersion = process.versions && process.versions.node) { + if (!nodeVersion) { + return false; + } + const [major, minor] = nodeVersion.split(".").map((part) => Number(part)); + if (!Number.isInteger(major) || !Number.isInteger(minor)) { + return false; + } + if (major > 24) { + return true; + } + return NODE_NATIVE_ENV_PROXY_SUPPORT[major] != null && minor >= NODE_NATIVE_ENV_PROXY_SUPPORT[major]; +} +function isNodeEnvProxyEnabled(agent, nodeVersion = process.versions && process.versions.node) { + if (!isNodeNativeEnvProxySupported(nodeVersion)) { + return false; + } + const agentOptions = agent && agent.options; + return Boolean( + agentOptions && utils_default.hasOwnProp(agentOptions, "proxyEnv") && agentOptions.proxyEnv != null + ); +} +function getProxyEnvAgent(options, configHttpAgent, configHttpsAgent) { + return isHttps.test(options.protocol) ? configHttpsAgent || import_https.default.globalAgent : configHttpAgent || import_http.default.globalAgent; +} +function getTunnelingAgent(agentOptions, userHttpsAgent) { + const key = agentOptions.protocol + "//" + agentOptions.hostname + ":" + (agentOptions.port || "") + "#" + (agentOptions.auth || ""); + const cache = userHttpsAgent ? tunnelingAgentCacheUser.get(userHttpsAgent) || tunnelingAgentCacheUser.set(userHttpsAgent, /* @__PURE__ */ new Map()).get(userHttpsAgent) : tunnelingAgentCache; + let agent = cache.get(key); + if (agent) return agent; + const merged = userHttpsAgent && userHttpsAgent.options ? { ...userHttpsAgent.options, ...agentOptions } : agentOptions; + agent = new import_https_proxy_agent.default(merged); + if (userHttpsAgent && userHttpsAgent.options) { + const originTLSOptions = { ...userHttpsAgent.options }; + const callback = agent.callback; + agent.callback = function axiosTunnelingAgentCallback(req, opts) { + return callback.call(this, req, { ...originTLSOptions, ...opts }); + }; + } + agent[kAxiosInstalledTunnel] = true; + cache.set(key, agent); + return agent; +} var supportedProtocols = platform_default.protocols.map((protocol) => { return protocol + ":"; }); +var decodeURIComponentSafe = (value) => { + if (!utils_default.isString(value)) { + return value; + } + try { + return decodeURIComponent(value); + } catch (error) { + return value; + } +}; var flushOnFinish = (stream4, [throttled, flush]) => { stream4.on("end", flush).on("error", flush); return throttled; }; -function dispatchBeforeRedirect(options, responseDetails) { +var http2Sessions = new Http2Sessions_default(); +function dispatchBeforeRedirect(options, responseDetails, requestDetails) { if (options.beforeRedirects.proxy) { options.beforeRedirects.proxy(options); } + if (options.beforeRedirects.auth) { + options.beforeRedirects.auth(options); + } + if (options.beforeRedirects.sensitiveHeaders) { + options.beforeRedirects.sensitiveHeaders(options, requestDetails); + } if (options.beforeRedirects.config) { - options.beforeRedirects.config(options, responseDetails); + options.beforeRedirects.config(options, responseDetails, requestDetails); + } +} +function stripMatchingHeaders(headers, sensitiveSet) { + if (!headers) { + return; + } + Object.keys(headers).forEach((header) => { + if (sensitiveSet.has(header.toLowerCase())) { + delete headers[header]; + } + }); +} +function isSameOriginRedirect(redirectOptions, requestDetails) { + if (!requestDetails) { + return false; + } + try { + return new URL(requestDetails.url).origin === new URL(redirectOptions.href).origin; + } catch (e) { + return false; } } -function setProxy(options, configProxy, location) { +function setProxy(options, configProxy, location, isRedirect, configHttpsAgent, configHttpAgent, allowEnvProxy = true) { let proxy = configProxy; - if (!proxy && proxy !== false) { - const proxyUrl = import_proxy_from_env.default.getProxyForUrl(location); + const proxyEnvAgent = getProxyEnvAgent(options, configHttpAgent, configHttpsAgent); + if (!proxy && proxy !== false && allowEnvProxy && !isNodeEnvProxyEnabled(proxyEnvAgent)) { + const proxyUrl = getProxyForUrl(location); if (proxyUrl) { - proxy = new URL(proxyUrl); + if (!shouldBypassProxy(location)) { + proxy = new URL(proxyUrl); + } } } - if (proxy) { - if (proxy.username) { - proxy.auth = (proxy.username || "") + ":" + (proxy.password || ""); - } - if (proxy.auth) { - if (proxy.auth.username || proxy.auth.password) { - proxy.auth = (proxy.auth.username || "") + ":" + (proxy.auth.password || ""); + if (isRedirect && options.headers) { + for (const name of Object.keys(options.headers)) { + if (name.toLowerCase() === "proxy-authorization") { + delete options.headers[name]; } - const base64 = Buffer.from(proxy.auth, "utf8").toString("base64"); - options.headers["Proxy-Authorization"] = "Basic " + base64; } - options.headers.host = options.hostname + (options.port ? ":" + options.port : ""); - const proxyHost = proxy.hostname || proxy.host; - options.hostname = proxyHost; - options.host = proxyHost; - options.port = proxy.port; - options.path = location; - if (proxy.protocol) { - options.protocol = proxy.protocol.includes(":") ? proxy.protocol : `${proxy.protocol}:`; + } + if (isRedirect && options.agent && options.agent[kAxiosInstalledTunnel]) { + options.agent = void 0; + } + if (proxy) { + const isProxyURL = proxy instanceof URL; + const readProxyField = (key) => isProxyURL || utils_default.hasOwnProp(proxy, key) ? proxy[key] : void 0; + const proxyUsername = readProxyField("username"); + const proxyPassword = readProxyField("password"); + let proxyAuth = utils_default.hasOwnProp(proxy, "auth") ? proxy.auth : void 0; + if (proxyUsername) { + proxyAuth = (proxyUsername || "") + ":" + (proxyPassword || ""); + } + if (proxyAuth) { + const authIsObject = typeof proxyAuth === "object"; + const authUsername = authIsObject && utils_default.hasOwnProp(proxyAuth, "username") ? proxyAuth.username : void 0; + const authPassword = authIsObject && utils_default.hasOwnProp(proxyAuth, "password") ? proxyAuth.password : void 0; + const validProxyAuth = Boolean(authUsername || authPassword); + if (validProxyAuth) { + proxyAuth = (authUsername || "") + ":" + (authPassword || ""); + } else if (authIsObject) { + throw new AxiosError_default("Invalid proxy authorization", AxiosError_default.ERR_BAD_OPTION, { proxy }); + } + } + const targetIsHttps = isHttps.test(options.protocol); + if (targetIsHttps) { + if (!(configHttpsAgent instanceof import_https_proxy_agent.default)) { + const proxyHost = readProxyField("hostname") || readProxyField("host"); + const proxyPort = readProxyField("port"); + const rawProxyProtocol = readProxyField("protocol"); + const normalizedProtocol = rawProxyProtocol ? rawProxyProtocol.includes(":") ? rawProxyProtocol : `${rawProxyProtocol}:` : "http:"; + const proxyHostForURL = proxyHost && proxyHost.includes(":") && !proxyHost.startsWith("[") ? `[${proxyHost}]` : proxyHost; + const proxyURL = new URL( + `${normalizedProtocol}//${proxyHostForURL}${proxyPort ? ":" + proxyPort : ""}` + ); + const agentOptions = { + protocol: proxyURL.protocol, + hostname: proxyURL.hostname.replace(/^\[|\]$/g, ""), + port: proxyURL.port, + auth: proxyAuth && typeof proxyAuth === "string" ? proxyAuth : void 0 + }; + if (proxyURL.protocol === "https:") { + agentOptions.ALPNProtocols = ["http/1.1"]; + } + const tunnelingAgent = getTunnelingAgent(agentOptions, configHttpsAgent); + options.agent = tunnelingAgent; + if (options.agents) { + options.agents.https = tunnelingAgent; + } + } + } else { + if (proxyAuth) { + const base64 = Buffer.from(proxyAuth, "utf8").toString("base64"); + options.headers["Proxy-Authorization"] = "Basic " + base64; + } + let hasUserHostHeader = false; + for (const name of Object.keys(options.headers)) { + if (name.toLowerCase() === "host") { + hasUserHostHeader = true; + break; + } + } + if (!hasUserHostHeader) { + options.headers.host = options.hostname + (options.port ? ":" + options.port : ""); + } + const proxyHost = readProxyField("hostname") || readProxyField("host"); + options.hostname = proxyHost; + options.host = proxyHost; + options.port = readProxyField("port"); + options.path = location; + const proxyProtocol = readProxyField("protocol"); + if (proxyProtocol) { + options.protocol = proxyProtocol.includes(":") ? proxyProtocol : `${proxyProtocol}:`; + } } } options.beforeRedirects.proxy = function beforeRedirect(redirectOptions) { - setProxy(redirectOptions, configProxy, redirectOptions.href); + setProxy( + redirectOptions, + configProxy, + redirectOptions.href, + true, + configHttpsAgent, + configHttpAgent, + allowEnvProxy + ); }; + return Boolean( + proxy || configProxy !== false && allowEnvProxy && isNodeEnvProxyEnabled(proxyEnvAgent) + ); } var isHttpAdapterSupported = typeof process !== "undefined" && utils_default.kindOf(process) === "process"; var wrapAsync = (asyncExecutor) => { @@ -15116,7 +17028,7 @@ var wrapAsync = (asyncExecutor) => { }; var resolveFamily = ({ address, family }) => { if (!utils_default.isString(address)) { - throw TypeError("address must be a string"); + throw new AxiosError_default("address must be a string", AxiosError_default.ERR_BAD_OPTION_VALUE); } return { address, @@ -15124,57 +17036,193 @@ var resolveFamily = ({ address, family }) => { }; }; var buildAddressEntry = (address, family) => resolveFamily(utils_default.isObject(address) ? address : { address, family }); +var normalizedLookupCache = /* @__PURE__ */ new WeakMap(); +var normalizeLookup = (lookup) => { + let normalized = normalizedLookupCache.get(lookup); + if (normalized) { + return normalized; + } + const callbackLookup = callbackify_default(lookup, (value) => utils_default.isArray(value) ? value : [value]); + normalized = (hostname, opt, cb) => { + callbackLookup(hostname, opt, (err, arg0, arg1) => { + if (err) { + return cb(err); + } + let addresses; + try { + addresses = utils_default.isArray(arg0) ? arg0.map((addr) => buildAddressEntry(addr)) : [buildAddressEntry(arg0, arg1)]; + } catch (error) { + return cb(error); + } + opt.all ? cb(err, addresses) : cb(err, addresses[0].address, addresses[0].family); + }); + }; + normalizedLookupCache.set(lookup, normalized); + return normalized; +}; +var http2Transport = { + request(options, cb) { + const authority = options.protocol + "//" + options.hostname + ":" + (options.port || (options.protocol === "https:" ? 443 : 80)); + const { http2Options, headers } = options; + const session = http2Sessions.getSession(authority, http2Options); + const { HTTP2_HEADER_SCHEME, HTTP2_HEADER_METHOD, HTTP2_HEADER_PATH, HTTP2_HEADER_STATUS } = import_http22.default.constants; + const http2Headers = { + [HTTP2_HEADER_SCHEME]: options.protocol.replace(":", ""), + [HTTP2_HEADER_METHOD]: options.method, + [HTTP2_HEADER_PATH]: options.path + }; + utils_default.forEach(headers, (header, name) => { + name.charAt(0) !== ":" && (http2Headers[name] = header); + }); + const req = session.request(http2Headers); + req.once("response", (responseHeaders) => { + const response = req; + responseHeaders = Object.assign({}, responseHeaders); + const status = responseHeaders[HTTP2_HEADER_STATUS]; + delete responseHeaders[HTTP2_HEADER_STATUS]; + response.headers = responseHeaders; + response.statusCode = +status; + cb(response); + }); + return req; + } +}; var http_default = isHttpAdapterSupported && function httpAdapter(config) { return wrapAsync(async function dispatchHttpRequest(resolve, reject, onDone) { - let { data, lookup, family } = config; - const { responseType, responseEncoding } = config; - const method = config.method.toUpperCase(); + const own2 = (key) => utils_default.getSafeProp(config, key); + const transitional2 = own2("transitional") || transitional_default; + let data = own2("data"); + let lookup = own2("lookup"); + let family = own2("family"); + let httpVersion = own2("httpVersion"); + if (httpVersion === void 0) httpVersion = 1; + const rawHttpVersion = httpVersion; + let http2Options = own2("http2Options"); + const httpAgent = own2("httpAgent"); + const httpsAgent = own2("httpsAgent"); + const configProxy = own2("proxy"); + const responseType = own2("responseType"); + const responseEncoding = own2("responseEncoding"); + const socketPath = own2("socketPath"); + const method = own2("method").toUpperCase(); + const maxRedirects = own2("maxRedirects"); + const maxBodyLength = own2("maxBodyLength"); + const maxContentLength = own2("maxContentLength"); + const decompress = own2("decompress"); let isDone; let rejected = false; let req; + let connectPhaseTimer; + try { + httpVersion = +httpVersion; + } catch (err) { + throw new AxiosError_default( + "Invalid protocol version: value is not a number", + AxiosError_default.ERR_BAD_OPTION_VALUE, + config + ); + } + if (Number.isNaN(httpVersion)) { + throw new AxiosError_default( + `Invalid protocol version: '${rawHttpVersion}' is not a number`, + AxiosError_default.ERR_BAD_OPTION_VALUE, + config + ); + } + if (httpVersion !== 1 && httpVersion !== 2) { + throw new AxiosError_default( + `Unsupported protocol version '${httpVersion}'`, + AxiosError_default.ERR_BAD_OPTION_VALUE, + config + ); + } + const isHttp2 = httpVersion === 2; if (lookup) { - const _lookup = callbackify_default(lookup, (value) => utils_default.isArray(value) ? value : [value]); - lookup = (hostname, opt, cb) => { - _lookup(hostname, opt, (err, arg0, arg1) => { - if (err) { - return cb(err); - } - const addresses = utils_default.isArray(arg0) ? arg0.map((addr) => buildAddressEntry(addr)) : [buildAddressEntry(arg0, arg1)]; - opt.all ? cb(err, addresses) : cb(err, addresses[0].address, addresses[0].family); - }); - }; + lookup = normalizeLookup(lookup); + } + const abortEmitter = new import_events.EventEmitter(); + function abort(reason) { + try { + abortEmitter.emit( + "abort", + !reason || reason.type ? new CanceledError_default(null, config, req) : reason + ); + } catch (err) { + } + } + function clearConnectPhaseTimer() { + if (connectPhaseTimer) { + clearTimeout(connectPhaseTimer); + connectPhaseTimer = null; + } + } + function createTimeoutError() { + const configTimeout = own2("timeout"); + let timeoutErrorMessage = configTimeout ? "timeout of " + configTimeout + "ms exceeded" : "timeout exceeded"; + const configTimeoutErrorMessage = own2("timeoutErrorMessage"); + if (configTimeoutErrorMessage) { + timeoutErrorMessage = configTimeoutErrorMessage; + } + return new AxiosError_default( + timeoutErrorMessage, + transitional2.clarifyTimeoutError ? AxiosError_default.ETIMEDOUT : AxiosError_default.ECONNABORTED, + config, + req + ); } - const emitter = new import_events.EventEmitter(); + abortEmitter.once("abort", reject); const onFinished = () => { + clearConnectPhaseTimer(); if (config.cancelToken) { config.cancelToken.unsubscribe(abort); } if (config.signal) { config.signal.removeEventListener("abort", abort); } - emitter.removeAllListeners(); + abortEmitter.removeAllListeners(); }; - onDone((value, isRejected) => { - isDone = true; - if (isRejected) { - rejected = true; - onFinished(); - } - }); - function abort(reason) { - emitter.emit("abort", !reason || reason.type ? new CanceledError_default(null, config, req) : reason); - } - emitter.once("abort", reject); if (config.cancelToken || config.signal) { config.cancelToken && config.cancelToken.subscribe(abort); if (config.signal) { config.signal.aborted ? abort() : config.signal.addEventListener("abort", abort); } } - const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls); - const parsed = new URL(fullPath, platform_default.hasBrowserEnv ? platform_default.origin : void 0); + onDone((response, isRejected) => { + isDone = true; + clearConnectPhaseTimer(); + if (isRejected) { + rejected = true; + onFinished(); + return; + } + const { data: data2 } = response; + if (data2 instanceof import_stream4.default.Readable || data2 instanceof import_stream4.default.Duplex) { + const offListeners = import_stream4.default.finished(data2, () => { + offListeners(); + onFinished(); + }); + } else { + onFinished(); + } + }); + const fullPath = buildFullPath(own2("baseURL"), own2("url"), own2("allowAbsoluteUrls"), config); + const urlBase = socketPath ? "http://localhost" : platform_default.hasBrowserEnv ? platform_default.origin : void 0; + const parsed = new URL(fullPath, urlBase); const protocol = parsed.protocol || supportedProtocols[0]; if (protocol === "data:") { + if (maxContentLength > -1) { + const dataUrl = String(own2("url") || fullPath || ""); + const estimated = estimateDataURLBufferAllocation(dataUrl); + if (estimated > maxContentLength) { + return reject( + new AxiosError_default( + "maxContentLength size of " + maxContentLength + " exceeded", + AxiosError_default.ERR_BAD_RESPONSE, + config + ) + ); + } + } let convertedData; if (method !== "GET") { return settle(resolve, reject, { @@ -15185,7 +17233,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) { }); } try { - convertedData = fromDataURI(config.url, responseType === "blob", { + convertedData = fromDataURI(own2("url"), responseType === "blob", { Blob: config.env && config.env.Blob }); } catch (err) { @@ -15208,11 +17256,9 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) { }); } if (supportedProtocols.indexOf(protocol) === -1) { - return reject(new AxiosError_default( - "Unsupported protocol " + protocol, - AxiosError_default.ERR_BAD_REQUEST, - config - )); + return reject( + new AxiosError_default("Unsupported protocol " + protocol, AxiosError_default.ERR_BAD_REQUEST, config) + ); } const headers = AxiosHeaders_default.from(config.headers).normalize(); headers.set("User-Agent", "axios/" + VERSION, false); @@ -15222,17 +17268,21 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) { let maxDownloadRate = void 0; if (utils_default.isSpecCompliantForm(data)) { const userBoundary = headers.getContentType(/boundary=([-_\w\d]{10,70})/i); - data = formDataToStream_default(data, (formHeaders) => { - headers.set(formHeaders); - }, { - tag: `axios-${VERSION}-boundary`, - boundary: userBoundary && userBoundary[1] || void 0 - }); - } else if (utils_default.isFormData(data) && utils_default.isFunction(data.getHeaders)) { - headers.set(data.getHeaders()); + data = formDataToStream_default( + data, + (formHeaders) => { + headers.set(formHeaders); + }, + { + tag: `axios-${VERSION}-boundary`, + boundary: userBoundary && userBoundary[1] || void 0 + } + ); + } else if (utils_default.isFormData(data) && utils_default.isFunction(data.getHeaders) && data.getHeaders !== Object.prototype.getHeaders) { + setFormDataHeaders(headers, data.getHeaders(), own2("formDataHeaderPolicy")); if (!headers.hasContentLength()) { try { - const knownLength = await import_util2.default.promisify(data.getLength).call(data); + const knownLength = await import_util3.default.promisify(data.getLength).call(data); Number.isFinite(knownLength) && knownLength >= 0 && headers.setContentLength(knownLength); } catch (e) { } @@ -15248,19 +17298,23 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) { } else if (utils_default.isString(data)) { data = Buffer.from(data, "utf-8"); } else { - return reject(new AxiosError_default( - "Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream", - AxiosError_default.ERR_BAD_REQUEST, - config - )); + return reject( + new AxiosError_default( + "Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream", + AxiosError_default.ERR_BAD_REQUEST, + config + ) + ); } headers.setContentLength(data.length, false); - if (config.maxBodyLength > -1 && data.length > config.maxBodyLength) { - return reject(new AxiosError_default( - "Request body larger than maxBodyLength limit", - AxiosError_default.ERR_BAD_REQUEST, - config - )); + if (maxBodyLength > -1 && data.length > maxBodyLength) { + return reject( + new AxiosError_default( + "Request body larger than maxBodyLength limit", + AxiosError_default.ERR_BAD_REQUEST, + config + ) + ); } } const contentLength = utils_default.toFiniteNumber(headers.getContentLength()); @@ -15274,26 +17328,36 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) { if (!utils_default.isStream(data)) { data = import_stream4.default.Readable.from(data, { objectMode: false }); } - data = import_stream4.default.pipeline([data, new AxiosTransformStream_default({ - maxRate: utils_default.toFiniteNumber(maxUploadRate) - })], utils_default.noop); - onUploadProgress && data.on("progress", flushOnFinish( - data, - progressEventDecorator( - contentLength, - progressEventReducer(asyncDecorator(onUploadProgress), false, 3) + data = import_stream4.default.pipeline( + [ + data, + new AxiosTransformStream_default({ + maxRate: utils_default.toFiniteNumber(maxUploadRate) + }) + ], + utils_default.noop + ); + onUploadProgress && data.on( + "progress", + flushOnFinish( + data, + progressEventDecorator( + contentLength, + progressEventReducer(asyncDecorator(onUploadProgress, scheduleProgress), false, 3) + ) ) - )); + ); } let auth = void 0; - if (config.auth) { - const username = config.auth.username || ""; - const password = config.auth.password || ""; + const configAuth = own2("auth"); + if (configAuth) { + const username = utils_default.getSafeProp(configAuth, "username") || ""; + const password = utils_default.getSafeProp(configAuth, "password") || ""; auth = username + ":" + password; } - if (!auth && parsed.username) { - const urlUsername = parsed.username; - const urlPassword = parsed.password; + if (!auth && (parsed.username || parsed.password)) { + const urlUsername = decodeURIComponentSafe(parsed.username); + const urlPassword = decodeURIComponentSafe(parsed.password); auth = urlUsername + ":" + urlPassword; } auth && headers.delete("authorization"); @@ -15301,84 +17365,197 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) { try { path = buildURL( parsed.pathname + parsed.search, - config.params, - config.paramsSerializer + own2("params"), + own2("paramsSerializer") ).replace(/^\?/, ""); } catch (err) { - const customErr = new Error(err.message); - customErr.config = config; - customErr.url = config.url; - customErr.exists = true; - return reject(customErr); + return reject( + AxiosError_default.from(err, AxiosError_default.ERR_BAD_REQUEST, config, null, null, { + url: own2("url"), + exists: true + }) + ); } headers.set( "Accept-Encoding", - "gzip, compress, deflate" + (isBrotliSupported ? ", br" : ""), + utils_default.hasOwnProp(transitional2, "advertiseZstdAcceptEncoding") && transitional2.advertiseZstdAcceptEncoding === true ? ACCEPT_ENCODING_WITH_ZSTD : ACCEPT_ENCODING, false ); - const options = { + if (isHttp2 && lookup) { + http2Options = Object.assign(/* @__PURE__ */ Object.create(null), http2Options, { lookup }); + } + const options = Object.assign(/* @__PURE__ */ Object.create(null), { path, method, - headers: headers.toJSON(), - agents: { http: config.httpAgent, https: config.httpsAgent }, + headers: toByteStringHeaderObject(headers), + agents: { http: httpAgent, https: httpsAgent }, auth, protocol, family, beforeRedirect: dispatchBeforeRedirect, - beforeRedirects: {} - }; + beforeRedirects: /* @__PURE__ */ Object.create(null), + http2Options, + createConnection: void 0 + }); !utils_default.isUndefined(lookup) && (options.lookup = lookup); - if (config.socketPath) { - options.socketPath = config.socketPath; + let proxyApplied = false; + if (socketPath) { + if (typeof socketPath !== "string") { + return reject( + new AxiosError_default("socketPath must be a string", AxiosError_default.ERR_BAD_OPTION_VALUE, config) + ); + } + const allowedSocketPaths = own2("allowedSocketPaths"); + if (allowedSocketPaths != null) { + const allowed = Array.isArray(allowedSocketPaths) ? allowedSocketPaths : [allowedSocketPaths]; + const resolvedSocket = (0, import_path.resolve)(socketPath); + const isAllowed = allowed.some( + (entry) => typeof entry === "string" && (0, import_path.resolve)(entry) === resolvedSocket + ); + if (!isAllowed) { + return reject( + new AxiosError_default( + `socketPath "${socketPath}" is not permitted by allowedSocketPaths`, + AxiosError_default.ERR_BAD_OPTION_VALUE, + config + ) + ); + } + } + options.socketPath = socketPath; } else { options.hostname = parsed.hostname.startsWith("[") ? parsed.hostname.slice(1, -1) : parsed.hostname; options.port = parsed.port; - setProxy(options, config.proxy, protocol + "//" + parsed.hostname + (parsed.port ? ":" + parsed.port : "") + options.path); + proxyApplied = setProxy( + options, + configProxy, + protocol + "//" + parsed.hostname + (parsed.port ? ":" + parsed.port : "") + options.path, + false, + httpsAgent, + httpAgent, + // The HTTP/2 transport connects independently of HTTP/1 agents, so it + // cannot apply either axios-resolved or agent-local environment proxies. + // Explicit proxy config is still processed and rejected below. + !isHttp2 + ); } let transport; + let isNativeTransport = false; + let transportEnforcesMaxBodyLength = false; const isHttpsRequest = isHttps.test(options.protocol); - options.agent = isHttpsRequest ? config.httpsAgent : config.httpAgent; - if (config.transport) { - transport = config.transport; - } else if (config.maxRedirects === 0) { - transport = isHttpsRequest ? import_https.default : import_http.default; - } else { - if (config.maxRedirects) { - options.maxRedirects = config.maxRedirects; + if (options.agent == null) { + options.agent = isHttpsRequest ? httpsAgent : httpAgent; + } + if (isHttp2) { + if (proxyApplied) { + return reject( + new AxiosError_default( + "HTTP/2 requests with a proxy are not supported", + AxiosError_default.ERR_NOT_SUPPORT, + config + ) + ); } - if (config.beforeRedirect) { - options.beforeRedirects.config = config.beforeRedirect; + transport = http2Transport; + } else { + const configTransport = own2("transport"); + if (configTransport) { + transport = configTransport; + } else if (maxRedirects === 0) { + transport = isHttpsRequest ? import_https.default : import_http.default; + isNativeTransport = true; + } else { + transportEnforcesMaxBodyLength = true; + options.sensitiveHeaders = []; + if (maxRedirects) { + options.maxRedirects = maxRedirects; + } + const configBeforeRedirect = own2("beforeRedirect"); + if (configBeforeRedirect) { + options.beforeRedirects.config = configBeforeRedirect; + } + if (auth) { + const requestOrigin = parsed.origin; + const authToRestore = auth; + options.beforeRedirects.auth = function beforeRedirectAuth(redirectOptions) { + try { + if (new URL(redirectOptions.href).origin === requestOrigin) { + redirectOptions.auth = authToRestore; + } + } catch (e) { + } + }; + } + const sensitiveHeaders = own2("sensitiveHeaders"); + if (sensitiveHeaders != null) { + if (!utils_default.isArray(sensitiveHeaders)) { + return reject( + new AxiosError_default( + "sensitiveHeaders must be an array of strings", + AxiosError_default.ERR_BAD_OPTION_VALUE, + config + ) + ); + } + const sensitiveSet = /* @__PURE__ */ new Set(); + for (const header of sensitiveHeaders) { + if (!utils_default.isString(header)) { + return reject( + new AxiosError_default( + "sensitiveHeaders must be an array of strings", + AxiosError_default.ERR_BAD_OPTION_VALUE, + config + ) + ); + } + sensitiveSet.add(header.toLowerCase()); + } + if (sensitiveSet.size) { + options.sensitiveHeaders = Array.from(sensitiveSet); + options.beforeRedirects.sensitiveHeaders = function beforeRedirectSensitiveHeaders(redirectOptions, requestDetails) { + if (!isSameOriginRedirect(redirectOptions, requestDetails)) { + stripMatchingHeaders(redirectOptions.headers, sensitiveSet); + } + }; + } + } + transport = isHttpsRequest ? httpsFollow : httpFollow; } - transport = isHttpsRequest ? httpsFollow : httpFollow; } - if (config.maxBodyLength > -1) { - options.maxBodyLength = config.maxBodyLength; + if (maxBodyLength > -1) { + options.maxBodyLength = maxBodyLength; } else { options.maxBodyLength = Infinity; } - if (config.insecureHTTPParser) { - options.insecureHTTPParser = config.insecureHTTPParser; - } + options.insecureHTTPParser = Boolean(own2("insecureHTTPParser")); req = transport.request(options, function handleResponse(res) { + clearConnectPhaseTimer(); if (req.destroyed) return; const streams = [res]; - const responseLength = +res.headers["content-length"]; + const responseLength = utils_default.toFiniteNumber(res.headers["content-length"]); if (onDownloadProgress || maxDownloadRate) { const transformStream = new AxiosTransformStream_default({ maxRate: utils_default.toFiniteNumber(maxDownloadRate) }); - onDownloadProgress && transformStream.on("progress", flushOnFinish( - transformStream, - progressEventDecorator( - responseLength, - progressEventReducer(asyncDecorator(onDownloadProgress), true, 3) + onDownloadProgress && transformStream.on( + "progress", + flushOnFinish( + transformStream, + progressEventDecorator( + responseLength, + progressEventReducer( + asyncDecorator(onDownloadProgress, scheduleProgress), + true, + 3 + ) + ) ) - )); + ); streams.push(transformStream); } let responseStream = res; const lastRequest = res.req || req; - if (config.decompress !== false && res.headers["content-encoding"]) { + if (decompress !== false && res.headers["content-encoding"]) { if (method === "HEAD" || res.statusCode === 204) { delete res.headers["content-encoding"]; } @@ -15401,13 +17578,16 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) { streams.push(import_zlib.default.createBrotliDecompress(brotliOptions)); delete res.headers["content-encoding"]; } + break; + case "zstd": + if (isZstdSupported) { + streams.push(import_zlib.default.createZstdDecompress(zstdOptions)); + delete res.headers["content-encoding"]; + } + break; } } responseStream = streams.length > 1 ? import_stream4.default.pipeline(streams, utils_default.noop) : streams[0]; - const offListeners = import_stream4.default.finished(responseStream, () => { - offListeners(); - onFinished(); - }); const response = { status: res.statusCode, statusText: res.statusMessage, @@ -15416,6 +17596,28 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) { request: lastRequest }; if (responseType === "stream") { + if (maxContentLength > -1) { + const limit = maxContentLength; + const source = responseStream; + async function* enforceMaxContentLength() { + let totalResponseBytes = 0; + for await (const chunk of source) { + totalResponseBytes += chunk.length; + if (totalResponseBytes > limit) { + throw new AxiosError_default( + "maxContentLength size of " + limit + " exceeded", + AxiosError_default.ERR_BAD_RESPONSE, + config, + lastRequest + ); + } + yield chunk; + } + } + responseStream = import_stream4.default.Readable.from(enforceMaxContentLength(), { + objectMode: false + }); + } response.data = responseStream; settle(resolve, reject, response); } else { @@ -15424,15 +17626,17 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) { responseStream.on("data", function handleStreamData(chunk) { responseBuffer.push(chunk); totalResponseBytes += chunk.length; - if (config.maxContentLength > -1 && totalResponseBytes > config.maxContentLength) { + if (maxContentLength > -1 && totalResponseBytes > maxContentLength) { rejected = true; responseStream.destroy(); - reject(new AxiosError_default( - "maxContentLength size of " + config.maxContentLength + " exceeded", - AxiosError_default.ERR_BAD_RESPONSE, - config, - lastRequest - )); + abort( + new AxiosError_default( + "maxContentLength size of " + maxContentLength + " exceeded", + AxiosError_default.ERR_BAD_RESPONSE, + config, + lastRequest + ) + ); } }); responseStream.on("aborted", function handlerStreamAborted() { @@ -15443,14 +17647,15 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) { "stream has been aborted", AxiosError_default.ERR_BAD_RESPONSE, config, - lastRequest + lastRequest, + response ); responseStream.destroy(err); reject(err); }); responseStream.on("error", function handleStreamError(err) { - if (req.destroyed) return; - reject(AxiosError_default.from(err, null, config, lastRequest)); + if (rejected) return; + reject(AxiosError_default.from(err, null, config, lastRequest, response)); }); responseStream.on("end", function handleStreamEnd() { try { @@ -15468,49 +17673,67 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) { settle(resolve, reject, response); }); } - emitter.once("abort", (err) => { + abortEmitter.once("abort", (err) => { if (!responseStream.destroyed) { responseStream.emit("error", err); responseStream.destroy(); } }); }); - emitter.once("abort", (err) => { - reject(err); - req.destroy(err); + abortEmitter.once("abort", (err) => { + if (req.close) { + req.close(); + } else { + req.destroy(err); + } }); req.on("error", function handleRequestError(err) { reject(AxiosError_default.from(err, null, config, req)); }); + const boundSockets = /* @__PURE__ */ new Set(); req.on("socket", function handleRequestSocket(socket) { - socket.setKeepAlive(true, 1e3 * 60); + if (typeof socket.setKeepAlive === "function") { + socket.setKeepAlive(true, 1e3 * 60); + } + if (!socket[kAxiosSocketListener]) { + socket.on("error", handleSocketError); + socket[kAxiosSocketListener] = true; + } + socket[kAxiosCurrentReq] = req; + boundSockets.add(socket); + }); + req.once("close", function clearCurrentReq() { + clearConnectPhaseTimer(); + for (const socket of boundSockets) { + if (socket[kAxiosCurrentReq] === req) { + socket[kAxiosCurrentReq] = null; + } + } + boundSockets.clear(); }); - if (config.timeout) { - const timeout = parseInt(config.timeout, 10); + if (own2("timeout")) { + const timeout = parseInt(own2("timeout"), 10); if (Number.isNaN(timeout)) { - reject(new AxiosError_default( - "error trying to parse `config.timeout` to int", - AxiosError_default.ERR_BAD_OPTION_VALUE, - config, - req - )); + abort( + new AxiosError_default( + "error trying to parse `config.timeout` to int", + AxiosError_default.ERR_BAD_OPTION_VALUE, + config, + req + ) + ); return; } - req.setTimeout(timeout, function handleRequestTimeout() { + const handleTimeout = function handleTimeout2() { if (isDone) return; - let timeoutErrorMessage = config.timeout ? "timeout of " + config.timeout + "ms exceeded" : "timeout exceeded"; - const transitional2 = config.transitional || transitional_default; - if (config.timeoutErrorMessage) { - timeoutErrorMessage = config.timeoutErrorMessage; - } - reject(new AxiosError_default( - timeoutErrorMessage, - transitional2.clarifyTimeoutError ? AxiosError_default.ETIMEDOUT : AxiosError_default.ECONNABORTED, - config, - req - )); - abort(); - }); + abort(createTimeoutError()); + }; + if (isNativeTransport && timeout > 0) { + connectPhaseTimer = setTimeout(handleTimeout, timeout); + } + req.setTimeout(timeout, handleTimeout); + } else { + req.setTimeout(0); } if (utils_default.isStream(data)) { let ended = false; @@ -15527,9 +17750,40 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) { abort(new CanceledError_default("Request stream has been aborted", config, req)); } }); - data.pipe(req); + let uploadStream = data; + if (maxBodyLength > -1 && !transportEnforcesMaxBodyLength) { + const limit = maxBodyLength; + let bytesSent = 0; + uploadStream = import_stream4.default.pipeline( + [ + data, + new import_stream4.default.Transform({ + transform(chunk, _enc, cb) { + bytesSent += chunk.length; + if (bytesSent > limit) { + return cb( + new AxiosError_default( + "Request body larger than maxBodyLength limit", + AxiosError_default.ERR_BAD_REQUEST, + config, + req + ) + ); + } + cb(null, chunk); + } + }) + ], + utils_default.noop + ); + uploadStream.on("error", (err) => { + if (!req.destroyed) req.destroy(err); + }); + } + uploadStream.pipe(req); } else { - req.end(data); + data && req.write(data); + req.end(); } }); }; @@ -15547,20 +17801,44 @@ var isURLSameOrigin_default = platform_default.hasStandardBrowserEnv ? /* @__PUR var cookies_default = platform_default.hasStandardBrowserEnv ? ( // Standard browser envs support document.cookie { - write(name, value, expires, path, domain, secure) { - const cookie = [name + "=" + encodeURIComponent(value)]; - utils_default.isNumber(expires) && cookie.push("expires=" + new Date(expires).toGMTString()); - utils_default.isString(path) && cookie.push("path=" + path); - utils_default.isString(domain) && cookie.push("domain=" + domain); - secure === true && cookie.push("secure"); + write(name, value, expires, path, domain, secure, sameSite) { + if (typeof document === "undefined") return; + const cookie = [`${name}=${encodeURIComponent(value)}`]; + if (utils_default.isNumber(expires)) { + cookie.push(`expires=${new Date(expires).toUTCString()}`); + } + if (utils_default.isString(path)) { + cookie.push(`path=${path}`); + } + if (utils_default.isString(domain)) { + cookie.push(`domain=${domain}`); + } + if (secure === true) { + cookie.push("secure"); + } + if (utils_default.isString(sameSite)) { + cookie.push(`SameSite=${sameSite}`); + } document.cookie = cookie.join("; "); }, read(name) { - const match = document.cookie.match(new RegExp("(^|;\\s*)(" + name + ")=([^;]*)")); - return match ? decodeURIComponent(match[3]) : null; + if (typeof document === "undefined") return null; + const cookies = document.cookie.split(";"); + for (let i = 0; i < cookies.length; i++) { + const cookie = cookies[i].replace(/^\s+/, ""); + const eq = cookie.indexOf("="); + if (eq !== -1 && cookie.slice(0, eq) === name) { + try { + return decodeURIComponent(cookie.slice(eq + 1)); + } catch (e) { + return cookie.slice(eq + 1); + } + } + } + return null; }, remove(name) { - this.write(name, "", Date.now() - 864e5); + this.write(name, "", Date.now() - 864e5, "/"); } } ) : ( @@ -15578,9 +17856,29 @@ var cookies_default = platform_default.hasStandardBrowserEnv ? ( // node_modules/axios/lib/core/mergeConfig.js var headersToObject = (thing) => thing instanceof AxiosHeaders_default ? { ...thing } : thing; +var ownEnumerableKeys = (thing) => { + if (Object.getOwnPropertySymbols && Object.getOwnPropertyDescriptor) { + return Object.keys(thing).concat( + Object.getOwnPropertySymbols(thing).filter( + (symbol) => Object.getOwnPropertyDescriptor(thing, symbol).enumerable + ) + ); + } + return Object.keys(thing); +}; function mergeConfig(config1, config2) { + config1 = config1 || {}; config2 = config2 || {}; - const config = {}; + const config = /* @__PURE__ */ Object.create(null); + Object.defineProperty(config, "hasOwnProperty", { + // Null-proto descriptor so a polluted Object.prototype.get cannot turn + // this data descriptor into an accessor descriptor on the way in. + __proto__: null, + value: Object.prototype.hasOwnProperty, + enumerable: false, + writable: true, + configurable: true + }); function getMergedValue(target, source, prop, caseless) { if (utils_default.isPlainObject(target) && utils_default.isPlainObject(source)) { return utils_default.merge.call({ caseless }, target, source); @@ -15610,10 +17908,27 @@ function mergeConfig(config1, config2) { return getMergedValue(void 0, a); } } + function getMergedTransitionalOption(prop) { + const transitional2 = utils_default.hasOwnProp(config2, "transitional") ? config2.transitional : void 0; + if (!utils_default.isUndefined(transitional2)) { + if (utils_default.isPlainObject(transitional2)) { + if (utils_default.hasOwnProp(transitional2, prop)) { + return transitional2[prop]; + } + } else { + return void 0; + } + } + const transitional1 = utils_default.hasOwnProp(config1, "transitional") ? config1.transitional : void 0; + if (utils_default.isPlainObject(transitional1) && utils_default.hasOwnProp(transitional1, prop)) { + return transitional1[prop]; + } + return void 0; + } function mergeDirectKeys(a, b, prop) { - if (prop in config2) { + if (utils_default.hasOwnProp(config2, prop)) { return getMergedValue(a, b); - } else if (prop in config1) { + } else if (utils_default.hasOwnProp(config1, prop)) { return getMergedValue(void 0, a); } } @@ -15626,7 +17941,7 @@ function mergeConfig(config1, config2) { transformResponse: defaultToConfig2, paramsSerializer: defaultToConfig2, timeout: defaultToConfig2, - timeoutMessage: defaultToConfig2, + timeoutErrorMessage: defaultToConfig2, withCredentials: defaultToConfig2, withXSRFToken: defaultToConfig2, adapter: defaultToConfig2, @@ -15644,42 +17959,78 @@ function mergeConfig(config1, config2) { httpsAgent: defaultToConfig2, cancelToken: defaultToConfig2, socketPath: defaultToConfig2, + allowedSocketPaths: defaultToConfig2, responseEncoding: defaultToConfig2, validateStatus: mergeDirectKeys, headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true) }; - utils_default.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) { - const merge2 = mergeMap[prop] || mergeDeepProperties; - const configValue = merge2(config1[prop], config2[prop], prop); + utils_default.forEach(ownEnumerableKeys({ ...config1, ...config2 }), function computeConfigValue(prop) { + if (prop === "__proto__" || prop === "constructor" || prop === "prototype") return; + const merge2 = utils_default.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties; + const a = utils_default.hasOwnProp(config1, prop) ? config1[prop] : void 0; + const b = utils_default.hasOwnProp(config2, prop) ? config2[prop] : void 0; + const configValue = merge2(a, b, prop); utils_default.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config[prop] = configValue); }); + if (utils_default.hasOwnProp(config2, "validateStatus") && utils_default.isUndefined(config2.validateStatus) && getMergedTransitionalOption("validateStatusUndefinedResolves") === false) { + if (utils_default.hasOwnProp(config1, "validateStatus")) { + config.validateStatus = getMergedValue(void 0, config1.validateStatus); + } else { + delete config.validateStatus; + } + } return config; } // node_modules/axios/lib/helpers/resolveConfig.js -var resolveConfig_default = (config) => { +var encodeUTF8 = (str) => encodeURIComponent(str).replace( + /%([0-9A-F]{2})/gi, + (_, hex) => String.fromCharCode(parseInt(hex, 16)) +); +function resolveConfig(config) { const newConfig = mergeConfig({}, config); - let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig; + const own2 = (key) => utils_default.hasOwnProp(newConfig, key) ? newConfig[key] : void 0; + const data = own2("data"); + let withXSRFToken = own2("withXSRFToken"); + const xsrfHeaderName = own2("xsrfHeaderName"); + const xsrfCookieName = own2("xsrfCookieName"); + let headers = own2("headers"); + const auth = own2("auth"); + const baseURL = own2("baseURL"); + const allowAbsoluteUrls = own2("allowAbsoluteUrls"); + const url2 = own2("url"); newConfig.headers = headers = AxiosHeaders_default.from(headers); - newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config.params, config.paramsSerializer); + newConfig.url = buildURL( + buildFullPath(baseURL, url2, allowAbsoluteUrls, newConfig), + own2("params"), + own2("paramsSerializer") + ); if (auth) { - headers.set( - "Authorization", - "Basic " + btoa((auth.username || "") + ":" + (auth.password ? unescape(encodeURIComponent(auth.password)) : "")) - ); + const username = utils_default.getSafeProp(auth, "username") || ""; + const password = utils_default.getSafeProp(auth, "password") || ""; + try { + headers.set( + "Authorization", + "Basic " + btoa(username + ":" + (password ? encodeUTF8(password) : "")) + ); + } catch (e) { + throw AxiosError_default.from(e, AxiosError_default.ERR_BAD_OPTION_VALUE, config); + } } - let contentType; if (utils_default.isFormData(data)) { - if (platform_default.hasStandardBrowserEnv || platform_default.hasStandardBrowserWebWorkerEnv) { + const getHeaders = utils_default.getSafeProp(data, "getHeaders"); + if (platform_default.hasStandardBrowserEnv || platform_default.hasStandardBrowserWebWorkerEnv || utils_default.isReactNative(data)) { headers.setContentType(void 0); - } else if ((contentType = headers.getContentType()) !== false) { - const [type, ...tokens] = contentType ? contentType.split(";").map((token) => token.trim()).filter(Boolean) : []; - headers.setContentType([type || "multipart/form-data", ...tokens].join("; ")); + } else if (utils_default.isFunction(getHeaders)) { + setFormDataHeaders(headers, getHeaders.call(data), own2("formDataHeaderPolicy")); } } if (platform_default.hasStandardBrowserEnv) { - withXSRFToken && utils_default.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig)); - if (withXSRFToken || withXSRFToken !== false && isURLSameOrigin_default(newConfig.url)) { + if (utils_default.isFunction(withXSRFToken)) { + withXSRFToken = withXSRFToken(newConfig); + } + const shouldSendXSRF = withXSRFToken === true || withXSRFToken == null && isURLSameOrigin_default(newConfig.url); + if (shouldSendXSRF) { const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies_default.read(xsrfCookieName); if (xsrfValue) { headers.set(xsrfHeaderName, xsrfValue); @@ -15687,7 +18038,8 @@ var resolveConfig_default = (config) => { } } return newConfig; -}; +} +var resolveConfig_default = resolveConfig; // node_modules/axios/lib/adapters/xhr.js var isXHRAdapterSupported = typeof XMLHttpRequest !== "undefined"; @@ -15699,7 +18051,7 @@ var xhr_default = isXHRAdapterSupported && function(config) { let { responseType, onUploadProgress, onDownloadProgress } = _config; let onCanceled; let uploadThrottled, downloadThrottled; - let flushUpload, flushDownload; + let flushUpload, flushDownload, flushDownloadWithEvent; function done() { flushUpload && flushUpload(); flushDownload && flushDownload(); @@ -15709,7 +18061,27 @@ var xhr_default = isXHRAdapterSupported && function(config) { let request = new XMLHttpRequest(); request.open(_config.method.toUpperCase(), _config.url, true); request.timeout = _config.timeout; - function onloadend() { + function onloadend(event) { + if (!request) { + return; + } + if (request.status === 0 && (parseProtocol(normalizeURLForProtocolCheck(_config.url)) || parseProtocol(platform_default.origin)) !== "file" && !(request.responseURL && request.responseURL.startsWith("file:"))) { + reject(new AxiosError_default("Request aborted", AxiosError_default.ECONNABORTED, config, request)); + done(); + request = null; + return; + } + try { + if (event) { + flushDownloadWithEvent && flushDownloadWithEvent(event); + } else { + flushDownload && flushDownload(); + } + } catch (err) { + setTimeout(() => { + throw err; + }); + } if (!request) { return; } @@ -15725,13 +18097,17 @@ var xhr_default = isXHRAdapterSupported && function(config) { config, request }; - settle(function _resolve(value) { - resolve(value); - done(); - }, function _reject(err) { - reject(err); - done(); - }, response); + settle( + function _resolve(value) { + resolve(value); + done(); + }, + function _reject(err) { + reject(err); + done(); + }, + response + ); request = null; } if ("onloadend" in request) { @@ -15741,7 +18117,7 @@ var xhr_default = isXHRAdapterSupported && function(config) { if (!request || request.readyState !== 4) { return; } - if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf("file:") === 0)) { + if (request.status === 0 && !(request.responseURL && request.responseURL.startsWith("file:"))) { return; } setTimeout(onloadend); @@ -15752,10 +18128,15 @@ var xhr_default = isXHRAdapterSupported && function(config) { return; } reject(new AxiosError_default("Request aborted", AxiosError_default.ECONNABORTED, config, request)); + done(); request = null; }; - request.onerror = function handleError() { - reject(new AxiosError_default("Network Error", AxiosError_default.ERR_NETWORK, config, request)); + request.onerror = function handleError(event) { + const msg = event && event.message ? event.message : "Network Error"; + const err = new AxiosError_default(msg, AxiosError_default.ERR_NETWORK, config, request); + err.event = event || null; + reject(err); + done(); request = null; }; request.ontimeout = function handleTimeout() { @@ -15764,17 +18145,20 @@ var xhr_default = isXHRAdapterSupported && function(config) { if (_config.timeoutErrorMessage) { timeoutErrorMessage = _config.timeoutErrorMessage; } - reject(new AxiosError_default( - timeoutErrorMessage, - transitional2.clarifyTimeoutError ? AxiosError_default.ETIMEDOUT : AxiosError_default.ECONNABORTED, - config, - request - )); + reject( + new AxiosError_default( + timeoutErrorMessage, + transitional2.clarifyTimeoutError ? AxiosError_default.ETIMEDOUT : AxiosError_default.ECONNABORTED, + config, + request + ) + ); + done(); request = null; }; requestData === void 0 && requestHeaders.setContentType(null); if ("setRequestHeader" in request) { - utils_default.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) { + utils_default.forEach(toByteStringHeaderObject(requestHeaders), function setRequestHeader(val, key) { request.setRequestHeader(key, val); }); } @@ -15785,7 +18169,10 @@ var xhr_default = isXHRAdapterSupported && function(config) { request.responseType = _config.responseType; } if (onDownloadProgress) { - [downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true); + [downloadThrottled, flushDownload, flushDownloadWithEvent] = progressEventReducer( + onDownloadProgress, + true + ); request.addEventListener("progress", downloadThrottled); } if (onUploadProgress && request.upload) { @@ -15800,6 +18187,7 @@ var xhr_default = isXHRAdapterSupported && function(config) { } reject(!cancel || cancel.type ? new CanceledError_default(null, config, request) : cancel); request.abort(); + done(); request = null; }; _config.cancelToken && _config.cancelToken.subscribe(onCanceled); @@ -15808,8 +18196,15 @@ var xhr_default = isXHRAdapterSupported && function(config) { } } const protocol = parseProtocol(_config.url); - if (protocol && platform_default.protocols.indexOf(protocol) === -1) { - reject(new AxiosError_default("Unsupported protocol " + protocol + ":", AxiosError_default.ERR_BAD_REQUEST, config)); + if (protocol && !platform_default.protocols.includes(protocol)) { + reject( + new AxiosError_default( + "Unsupported protocol " + protocol + ":", + AxiosError_default.ERR_BAD_REQUEST, + config + ) + ); + done(); return; } request.send(requestData || null); @@ -15818,37 +18213,50 @@ var xhr_default = isXHRAdapterSupported && function(config) { // node_modules/axios/lib/helpers/composeSignals.js var composeSignals = (signals, timeout) => { - const { length } = signals = signals ? signals.filter(Boolean) : []; - if (timeout || length) { - let controller = new AbortController(); - let aborted; - const onabort = function(reason) { - if (!aborted) { - aborted = true; - unsubscribe(); - const err = reason instanceof Error ? reason : this.reason; - controller.abort(err instanceof AxiosError_default ? err : new CanceledError_default(err instanceof Error ? err.message : err)); - } - }; - let timer = timeout && setTimeout(() => { - timer = null; - onabort(new AxiosError_default(`timeout ${timeout} of ms exceeded`, AxiosError_default.ETIMEDOUT)); - }, timeout); - const unsubscribe = () => { - if (signals) { - timer && clearTimeout(timer); - timer = null; - signals.forEach((signal2) => { - signal2.unsubscribe ? signal2.unsubscribe(onabort) : signal2.removeEventListener("abort", onabort); - }); - signals = null; - } - }; - signals.forEach((signal2) => signal2.addEventListener("abort", onabort)); - const { signal } = controller; - signal.unsubscribe = () => utils_default.asap(unsubscribe); - return signal; + signals = signals ? signals.filter(Boolean) : []; + if (!timeout && !signals.length) { + return; } + const controller = new AbortController(); + let aborted = false; + const onabort = function(reason) { + if (!aborted) { + aborted = true; + unsubscribe(); + const err = reason instanceof Error ? reason : this.reason; + controller.abort( + err instanceof AxiosError_default ? err : new CanceledError_default(err instanceof Error ? err.message : err) + ); + } + }; + let timer = timeout && setTimeout(() => { + timer = null; + onabort(new AxiosError_default(`timeout of ${timeout}ms exceeded`, AxiosError_default.ETIMEDOUT)); + }, timeout); + const unsubscribe = () => { + if (!signals) { + return; + } + timer && clearTimeout(timer); + timer = null; + signals.forEach((signal2) => { + signal2.unsubscribe ? signal2.unsubscribe(onabort) : signal2.removeEventListener("abort", onabort); + }); + signals = null; + }; + signals.forEach((signal2) => { + if (aborted) { + return; + } + if (signal2.aborted) { + onabort.call(signal2); + return; + } + signal2.addEventListener("abort", onabort, { once: true }); + }); + const { signal } = controller; + signal.unsubscribe = () => utils_default.asap(unsubscribe); + return signal; }; var composeSignals_default = composeSignals; @@ -15891,7 +18299,7 @@ var readStream = async function* (stream4) { } }; var trackStream = (stream4, chunkSize, onProgress, onFinish) => { - const iterator = readBytes(stream4, chunkSize); + const iterator2 = readBytes(stream4, chunkSize); let bytes = 0; let done; let _onFinish = (e) => { @@ -15900,39 +18308,66 @@ var trackStream = (stream4, chunkSize, onProgress, onFinish) => { onFinish && onFinish(e); } }; - return new ReadableStream({ - async pull(controller) { - try { - const { done: done2, value } = await iterator.next(); - if (done2) { - _onFinish(); - controller.close(); - return; - } - let len = value.byteLength; - if (onProgress) { - let loadedBytes = bytes += len; - onProgress(loadedBytes); + return new ReadableStream( + { + async pull(controller) { + try { + const { done: done2, value } = await iterator2.next(); + if (done2) { + _onFinish(); + controller.close(); + return; + } + let len = value.byteLength; + if (onProgress) { + let loadedBytes = bytes += len; + onProgress(loadedBytes); + } + controller.enqueue(new Uint8Array(value)); + } catch (err) { + _onFinish(err); + throw err; } - controller.enqueue(new Uint8Array(value)); - } catch (err) { - _onFinish(err); - throw err; + }, + cancel(reason) { + _onFinish(reason); + return iterator2.return(); } }, - cancel(reason) { - _onFinish(reason); - return iterator.return(); + { + highWaterMark: 2 } - }, { - highWaterMark: 2 - }); + ); }; // node_modules/axios/lib/adapters/fetch.js -var isFetchSupported = typeof fetch === "function" && typeof Request === "function" && typeof Response === "function"; -var isReadableStreamSupported = isFetchSupported && typeof ReadableStream === "function"; -var encodeText = isFetchSupported && (typeof TextEncoder === "function" ? /* @__PURE__ */ ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) : async (str) => new Uint8Array(await new Response(str).arrayBuffer())); +var DEFAULT_CHUNK_SIZE = 64 * 1024; +var DEFAULT_REQUEST_OPTIONS = { + cache: "default", + redirect: "follow", + referrer: "about:client", + referrerPolicy: "", + mode: "cors", + integrity: "", + keepalive: false, + priority: "auto", + window: null +}; +var { isFunction: isFunction2 } = utils_default; +var encodeUTF82 = (str) => encodeURIComponent(str).replace( + /%([0-9A-F]{2})/gi, + (_, hex) => String.fromCharCode(parseInt(hex, 16)) +); +var decodeURIComponentSafe2 = (value) => { + if (!utils_default.isString(value)) { + return value; + } + try { + return decodeURIComponent(value); + } catch (error) { + return value; + } +}; var test = (fn, ...args) => { try { return !!fn(...args); @@ -15940,210 +18375,489 @@ var test = (fn, ...args) => { return false; } }; -var supportsRequestStream = isReadableStreamSupported && test(() => { - let duplexAccessed = false; - const hasContentType = new Request(platform_default.origin, { - body: new ReadableStream(), - method: "POST", - get duplex() { - duplexAccessed = true; - return "half"; - } - }).headers.has("Content-Type"); - return duplexAccessed && !hasContentType; -}); -var DEFAULT_CHUNK_SIZE = 64 * 1024; -var supportsResponseStream = isReadableStreamSupported && test(() => utils_default.isReadableStream(new Response("").body)); -var resolvers = { - stream: supportsResponseStream && ((res) => res.body) -}; -isFetchSupported && ((res) => { - ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((type) => { - !resolvers[type] && (resolvers[type] = utils_default.isFunction(res[type]) ? (res2) => res2[type]() : (_, config) => { - throw new AxiosError_default(`Response type '${type}' is not supported`, AxiosError_default.ERR_NOT_SUPPORT, config); - }); - }); -})(new Response()); -var getBodyLength = async (body) => { - if (body == null) { - return 0; +var maybeWithAuthCredentials = (url2) => { + const protocolIndex = url2.indexOf("://"); + let urlToCheck = url2; + if (protocolIndex !== -1) { + urlToCheck = urlToCheck.slice(protocolIndex + 3); } - if (utils_default.isBlob(body)) { - return body.size; + return urlToCheck.includes("@") || urlToCheck.includes(":"); +}; +var factory = (env) => { + const globalObject = utils_default.global !== void 0 && utils_default.global !== null ? utils_default.global : globalThis; + const { ReadableStream: ReadableStream2, TextEncoder: TextEncoder2 } = globalObject; + env = utils_default.merge.call( + { + skipUndefined: true + }, + { + Request: globalObject.Request, + Response: globalObject.Response + }, + env + ); + const { fetch: envFetch, Request, Response } = env; + const isFetchSupported = envFetch ? isFunction2(envFetch) : typeof fetch === "function"; + const isRequestSupported = isFunction2(Request); + const isResponseSupported = isFunction2(Response); + if (!isFetchSupported) { + return false; } - if (utils_default.isSpecCompliantForm(body)) { - const _request = new Request(platform_default.origin, { + const isReadableStreamSupported = isFetchSupported && isFunction2(ReadableStream2); + const encodeText = isFetchSupported && (typeof TextEncoder2 === "function" ? /* @__PURE__ */ ((encoder) => (str) => encoder.encode(str))(new TextEncoder2()) : async (str) => new Uint8Array(await new Request(str).arrayBuffer())); + const supportsRequestStream = isRequestSupported && isReadableStreamSupported && test(() => { + let duplexAccessed = false; + const request = new Request(platform_default.origin, { + body: new ReadableStream2(), method: "POST", - body + get duplex() { + duplexAccessed = true; + return "half"; + } }); - return (await _request.arrayBuffer()).byteLength; - } - if (utils_default.isArrayBufferView(body) || utils_default.isArrayBuffer(body)) { - return body.byteLength; - } - if (utils_default.isURLSearchParams(body)) { - body = body + ""; - } - if (utils_default.isString(body)) { - return (await encodeText(body)).byteLength; - } -}; -var resolveBodyLength = async (headers, body) => { - const length = utils_default.toFiniteNumber(headers.getContentLength()); - return length == null ? getBodyLength(body) : length; -}; -var fetch_default = isFetchSupported && (async (config) => { - let { - url: url2, - method, - data, - signal, - cancelToken, - timeout, - onDownloadProgress, - onUploadProgress, - responseType, - headers, - withCredentials = "same-origin", - fetchOptions - } = resolveConfig_default(config); - responseType = responseType ? (responseType + "").toLowerCase() : "text"; - let composedSignal = composeSignals_default([signal, cancelToken && cancelToken.toAbortSignal()], timeout); - let request; - const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => { - composedSignal.unsubscribe(); + const hasContentType = request.headers.has("Content-Type"); + if (request.body != null) { + request.body.cancel(); + } + return duplexAccessed && !hasContentType; }); - let requestContentLength; - try { - if (onUploadProgress && supportsRequestStream && method !== "get" && method !== "head" && (requestContentLength = await resolveBodyLength(headers, data)) !== 0) { - let _request = new Request(url2, { + const supportsResponseStream = isResponseSupported && isReadableStreamSupported && test(() => utils_default.isReadableStream(new Response("").body)); + const resolvers = { + stream: supportsResponseStream && ((res) => res.body) + }; + isFetchSupported && (() => { + ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((type) => { + !resolvers[type] && (resolvers[type] = (res, config) => { + let method = res && res[type]; + if (method) { + return method.call(res); + } + throw new AxiosError_default( + `Response type '${type}' is not supported`, + AxiosError_default.ERR_NOT_SUPPORT, + config + ); + }); + }); + })(); + const getBodyLength = async (body) => { + if (body == null) { + return 0; + } + if (utils_default.isBlob(body)) { + return body.size; + } + if (utils_default.isSpecCompliantForm(body)) { + const _request = new Request(platform_default.origin, { method: "POST", - body: data, - duplex: "half" + body }); - let contentTypeHeader; - if (utils_default.isFormData(data) && (contentTypeHeader = _request.headers.get("content-type"))) { - headers.setContentType(contentTypeHeader); - } - if (_request.body) { - const [onProgress, flush] = progressEventDecorator( - requestContentLength, - progressEventReducer(asyncDecorator(onUploadProgress)) - ); - data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush); - } + return (await _request.arrayBuffer()).byteLength; + } + if (utils_default.isArrayBufferView(body) || utils_default.isArrayBuffer(body)) { + return body.byteLength; } - if (!utils_default.isString(withCredentials)) { - withCredentials = withCredentials ? "include" : "omit"; + if (utils_default.isURLSearchParams(body)) { + body = body + ""; } - const isCredentialsSupported = "credentials" in Request.prototype; - request = new Request(url2, { - ...fetchOptions, - signal: composedSignal, - method: method.toUpperCase(), - headers: headers.normalize().toJSON(), - body: data, - duplex: "half", - credentials: isCredentialsSupported ? withCredentials : void 0 + if (utils_default.isString(body)) { + return (await encodeText(body)).byteLength; + } + }; + const resolveBodyLength = async (headers, body) => { + const length = utils_default.toFiniteNumber(headers.getContentLength()); + return length == null ? getBodyLength(body) : length; + }; + return async (config) => { + let { + url: url2, + method, + data, + signal, + cancelToken, + timeout, + onDownloadProgress, + onUploadProgress, + responseType, + headers, + withCredentials = "same-origin", + fetchOptions, + maxContentLength, + maxBodyLength, + maxRedirects + } = resolveConfig_default(config); + const hasMaxContentLength = utils_default.isNumber(maxContentLength) && maxContentLength > -1; + const hasMaxBodyLength = utils_default.isNumber(maxBodyLength) && maxBodyLength > -1; + const own2 = (key) => utils_default.hasOwnProp(config, key) ? config[key] : void 0; + let _fetch = envFetch || fetch; + responseType = responseType ? (responseType + "").toLowerCase() : "text"; + let composedSignal = composeSignals_default( + [signal, cancelToken && cancelToken.toAbortSignal()], + timeout + ); + let request = null; + const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => { + composedSignal.unsubscribe(); }); - let response = await fetch(request); - const isStreamResponse = supportsResponseStream && (responseType === "stream" || responseType === "response"); - if (supportsResponseStream && (onDownloadProgress || isStreamResponse && unsubscribe)) { - const options = {}; - ["status", "statusText", "headers"].forEach((prop) => { - options[prop] = response[prop]; - }); - const responseContentLength = utils_default.toFiniteNumber(response.headers.get("content-length")); - const [onProgress, flush] = onDownloadProgress && progressEventDecorator( - responseContentLength, - progressEventReducer(asyncDecorator(onDownloadProgress), true) - ) || []; - response = new Response( - trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => { - flush && flush(); - unsubscribe && unsubscribe(); - }), - options - ); - } - responseType = responseType || "text"; - let responseData = await resolvers[utils_default.findKey(resolvers, responseType) || "text"](response, config); - !isStreamResponse && unsubscribe && unsubscribe(); - return await new Promise((resolve, reject) => { - settle(resolve, reject, { - data: responseData, - headers: AxiosHeaders_default.from(response.headers), - status: response.status, - statusText: response.statusText, - config, - request + let requestContentLength; + let pendingBodyError = null; + const maxBodyLengthError = () => new AxiosError_default( + "Request body larger than maxBodyLength limit", + AxiosError_default.ERR_BAD_REQUEST, + config, + request + ); + try { + let auth = void 0; + const configAuth = own2("auth"); + if (configAuth) { + const username = utils_default.getSafeProp(configAuth, "username") || ""; + const password = utils_default.getSafeProp(configAuth, "password") || ""; + auth = { + username, + password + }; + } + if (maybeWithAuthCredentials(url2)) { + const parsedURL = new URL(url2, platform_default.origin); + if (!auth && (parsedURL.username || parsedURL.password)) { + const urlUsername = decodeURIComponentSafe2(parsedURL.username); + const urlPassword = decodeURIComponentSafe2(parsedURL.password); + auth = { + username: urlUsername, + password: urlPassword + }; + } + if (parsedURL.username || parsedURL.password) { + parsedURL.username = ""; + parsedURL.password = ""; + url2 = parsedURL.href; + } + } + if (auth) { + headers.delete("authorization"); + headers.set( + "Authorization", + "Basic " + btoa(encodeUTF82((auth.username || "") + ":" + (auth.password || ""))) + ); + } + if (hasMaxContentLength && typeof url2 === "string" && url2.startsWith("data:")) { + const estimated = estimateDataURLDecodedBytes(url2); + if (estimated > maxContentLength) { + throw new AxiosError_default( + "maxContentLength size of " + maxContentLength + " exceeded", + AxiosError_default.ERR_BAD_RESPONSE, + config, + request + ); + } + } + if (hasMaxBodyLength && method !== "get" && method !== "head") { + const outboundLength = await getBodyLength(data); + if (typeof outboundLength === "number" && isFinite(outboundLength)) { + requestContentLength = outboundLength; + if (outboundLength > maxBodyLength) { + throw maxBodyLengthError(); + } + } + } + const mustEnforceStreamBody = hasMaxBodyLength && (utils_default.isReadableStream(data) || utils_default.isStream(data)); + const trackRequestStream = (stream4, onProgress, flush) => trackStream( + stream4, + DEFAULT_CHUNK_SIZE, + (loadedBytes) => { + if (hasMaxBodyLength && loadedBytes > maxBodyLength) { + throw pendingBodyError = maxBodyLengthError(); + } + onProgress && onProgress(loadedBytes); + }, + flush + ); + if (supportsRequestStream && method !== "get" && method !== "head" && (onUploadProgress || mustEnforceStreamBody)) { + requestContentLength = requestContentLength == null ? await resolveBodyLength(headers, data) : requestContentLength; + if (requestContentLength !== 0 || mustEnforceStreamBody) { + let _request = new Request(url2, { + method: "POST", + body: data, + duplex: "half" + }); + let contentTypeHeader; + if (utils_default.isFormData(data) && (contentTypeHeader = _request.headers.get("content-type"))) { + headers.setContentType(contentTypeHeader); + } + if (_request.body) { + const [onProgress, flush] = onUploadProgress && progressEventDecorator( + requestContentLength, + progressEventReducer(asyncDecorator(onUploadProgress)) + ) || []; + data = trackRequestStream(_request.body, onProgress, flush); + } + } + } else if (mustEnforceStreamBody && !isRequestSupported && isReadableStreamSupported && method !== "get" && method !== "head") { + data = trackRequestStream(data); + } else if (mustEnforceStreamBody && isRequestSupported && !supportsRequestStream && method !== "get" && method !== "head") { + throw new AxiosError_default( + "Stream request bodies are not supported by the current fetch implementation", + AxiosError_default.ERR_NOT_SUPPORT, + config, + request + ); + } + if (!utils_default.isString(withCredentials)) { + withCredentials = withCredentials ? "include" : "omit"; + } + const isCredentialsSupported = isRequestSupported && "credentials" in Request.prototype; + if (utils_default.isFormData(data)) { + const contentType = headers.getContentType(); + if (contentType && /^multipart\/form-data/i.test(contentType) && !/boundary=/i.test(contentType)) { + headers.delete("content-type"); + } + } + headers.set("User-Agent", "axios/" + VERSION, false); + const safeFetchOptions = fetchOptions == null ? fetchOptions : Object.assign(/* @__PURE__ */ Object.create(null), fetchOptions); + if (safeFetchOptions) { + delete safeFetchOptions.body; + delete safeFetchOptions.headers; + delete safeFetchOptions.method; + delete safeFetchOptions.signal; + delete safeFetchOptions.duplex; + delete safeFetchOptions.credentials; + } + const resolvedOptions = Object.assign(/* @__PURE__ */ Object.create(null), safeFetchOptions, { + signal: composedSignal, + method: method.toUpperCase(), + headers: toByteStringHeaderObject(headers.normalize()), + body: data, + duplex: "half", + credentials: isCredentialsSupported ? withCredentials : void 0 }); - }); - } catch (err) { - unsubscribe && unsubscribe(); - if (err && err.name === "TypeError" && /fetch/i.test(err.message)) { - throw Object.assign( - new AxiosError_default("Network Error", AxiosError_default.ERR_NETWORK, config, request), - { - cause: err.cause || err + if (isRequestSupported) { + utils_default.forEach(DEFAULT_REQUEST_OPTIONS, (value, key) => { + if (resolvedOptions[key] === void 0) { + resolvedOptions[key] = value; + } + }); + if (resolvedOptions.signal === void 0) { + resolvedOptions.signal = null; + } + if (resolvedOptions.body === void 0) { + resolvedOptions.body = null; + } + } + if (maxRedirects === 0) { + resolvedOptions.redirect = "manual"; + if (safeFetchOptions) { + safeFetchOptions.redirect = "manual"; + } + } + request = isRequestSupported && new Request(url2, resolvedOptions); + let response = await (isRequestSupported ? _fetch(request, safeFetchOptions) : _fetch(url2, resolvedOptions)); + const responseHeaders = AxiosHeaders_default.from(response.headers); + if (hasMaxContentLength) { + const declaredLength = utils_default.toFiniteNumber(responseHeaders.getContentLength()); + if (declaredLength != null && declaredLength > maxContentLength) { + throw new AxiosError_default( + "maxContentLength size of " + maxContentLength + " exceeded", + AxiosError_default.ERR_BAD_RESPONSE, + config, + request + ); } + } + const isStreamResponse = supportsResponseStream && (responseType === "stream" || responseType === "response"); + if (supportsResponseStream && response.body && (onDownloadProgress || hasMaxContentLength || isStreamResponse && unsubscribe)) { + const options = {}; + ["status", "statusText", "headers"].forEach((prop) => { + options[prop] = response[prop]; + }); + const responseContentLength = utils_default.toFiniteNumber(responseHeaders.getContentLength()); + const [onProgress, flush] = onDownloadProgress && progressEventDecorator( + responseContentLength, + progressEventReducer(asyncDecorator(onDownloadProgress), true) + ) || []; + let bytesRead = 0; + const onChunkProgress = (loadedBytes) => { + if (hasMaxContentLength) { + bytesRead = loadedBytes; + if (bytesRead > maxContentLength) { + throw new AxiosError_default( + "maxContentLength size of " + maxContentLength + " exceeded", + AxiosError_default.ERR_BAD_RESPONSE, + config, + request + ); + } + } + onProgress && onProgress(loadedBytes); + }; + response = new Response( + trackStream(response.body, DEFAULT_CHUNK_SIZE, onChunkProgress, () => { + flush && flush(); + unsubscribe && unsubscribe(); + }), + options + ); + } + responseType = responseType || "text"; + let responseData = await resolvers[utils_default.findKey(resolvers, responseType) || "text"]( + response, + config ); + if (hasMaxContentLength && !supportsResponseStream && !isStreamResponse) { + let materializedSize; + if (responseData != null) { + if (typeof responseData.byteLength === "number") { + materializedSize = responseData.byteLength; + } else if (typeof responseData.size === "number") { + materializedSize = responseData.size; + } else if (typeof responseData === "string") { + materializedSize = typeof TextEncoder2 === "function" ? new TextEncoder2().encode(responseData).byteLength : responseData.length; + } + } + if (typeof materializedSize === "number" && materializedSize > maxContentLength) { + throw new AxiosError_default( + "maxContentLength size of " + maxContentLength + " exceeded", + AxiosError_default.ERR_BAD_RESPONSE, + config, + request + ); + } + } + !isStreamResponse && unsubscribe && unsubscribe(); + return await new Promise((resolve, reject) => { + settle(resolve, reject, { + data: responseData, + headers: AxiosHeaders_default.from(response.headers), + status: response.status, + statusText: response.statusText, + config, + request + }); + }); + } catch (err) { + unsubscribe && unsubscribe(); + if (composedSignal && composedSignal.aborted && composedSignal.reason instanceof AxiosError_default) { + const canceledError = composedSignal.reason; + canceledError.config = config; + request && (canceledError.request = request); + if (err !== canceledError) { + Object.defineProperty(canceledError, "cause", { + __proto__: null, + value: err, + writable: true, + enumerable: false, + configurable: true + }); + } + throw canceledError; + } + if (pendingBodyError) { + request && !pendingBodyError.request && (pendingBodyError.request = request); + throw pendingBodyError; + } + if (err instanceof AxiosError_default) { + request && !err.request && (err.request = request); + throw err; + } + if (err && err.name === "TypeError" && /Load failed|fetch/i.test(err.message)) { + const networkError = new AxiosError_default( + "Network Error", + AxiosError_default.ERR_NETWORK, + config, + request, + err && err.response + ); + Object.defineProperty(networkError, "cause", { + __proto__: null, + value: err.cause || err, + writable: true, + enumerable: false, + configurable: true + }); + throw networkError; + } + throw AxiosError_default.from(err, err && err.code, config, request, err && err.response); } - throw AxiosError_default.from(err, err && err.code, config, request); + }; +}; +var seedCache = /* @__PURE__ */ new Map(); +var getFetch = (config) => { + let env = config && config.env || {}; + const { fetch: fetch2, Request, Response } = env; + const seeds = [Request, Response, fetch2]; + let len = seeds.length, i = len, seed, target, map = seedCache; + while (i--) { + seed = seeds[i]; + target = map.get(seed); + target === void 0 && map.set(seed, target = i ? /* @__PURE__ */ new Map() : factory(env)); + map = target; } -}); + return target; +}; +var adapter = getFetch(); // node_modules/axios/lib/adapters/adapters.js var knownAdapters = { http: http_default, xhr: xhr_default, - fetch: fetch_default + fetch: { + get: getFetch + } }; utils_default.forEach(knownAdapters, (fn, value) => { if (fn) { try { - Object.defineProperty(fn, "name", { value }); + Object.defineProperty(fn, "name", { __proto__: null, value }); } catch (e) { } - Object.defineProperty(fn, "adapterName", { value }); + Object.defineProperty(fn, "adapterName", { __proto__: null, value }); } }); var renderReason = (reason) => `- ${reason}`; -var isResolvedHandle = (adapter) => utils_default.isFunction(adapter) || adapter === null || adapter === false; +var isResolvedHandle = (adapter2) => utils_default.isFunction(adapter2) || adapter2 === null || adapter2 === false; +function getAdapter(adapters, config) { + adapters = utils_default.isArray(adapters) ? adapters : [adapters]; + const { length } = adapters; + let nameOrAdapter; + let adapter2; + const rejectedReasons = {}; + for (let i = 0; i < length; i++) { + nameOrAdapter = adapters[i]; + let id; + adapter2 = nameOrAdapter; + if (!isResolvedHandle(nameOrAdapter)) { + adapter2 = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()]; + if (adapter2 === void 0) { + throw new AxiosError_default(`Unknown adapter '${id}'`); + } + } + if (adapter2 && (utils_default.isFunction(adapter2) || (adapter2 = adapter2.get(config)))) { + break; + } + rejectedReasons[id || "#" + i] = adapter2; + } + if (!adapter2) { + const reasons = Object.entries(rejectedReasons).map( + ([id, state]) => `adapter ${id} ` + (state === false ? "is not supported by the environment" : "is not available in the build") + ); + let s = length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified"; + throw new AxiosError_default( + `There is no suitable adapter to dispatch the request ` + s, + AxiosError_default.ERR_NOT_SUPPORT + ); + } + return adapter2; +} var adapters_default = { - getAdapter: (adapters) => { - adapters = utils_default.isArray(adapters) ? adapters : [adapters]; - const { length } = adapters; - let nameOrAdapter; - let adapter; - const rejectedReasons = {}; - for (let i = 0; i < length; i++) { - nameOrAdapter = adapters[i]; - let id; - adapter = nameOrAdapter; - if (!isResolvedHandle(nameOrAdapter)) { - adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()]; - if (adapter === void 0) { - throw new AxiosError_default(`Unknown adapter '${id}'`); - } - } - if (adapter) { - break; - } - rejectedReasons[id || "#" + i] = adapter; - } - if (!adapter) { - const reasons = Object.entries(rejectedReasons).map( - ([id, state]) => `adapter ${id} ` + (state === false ? "is not supported by the environment" : "is not available in the build") - ); - let s = length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified"; - throw new AxiosError_default( - `There is no suitable adapter to dispatch the request ` + s, - "ERR_NOT_SUPPORT" - ); - } - return adapter; - }, + /** + * Resolve an adapter from a list of adapter names or functions. + * @type {Function} + */ + getAdapter, + /** + * Exposes all known adapters + * @type {Object} + */ adapters: knownAdapters }; @@ -16156,40 +18870,47 @@ function throwIfCancellationRequested(config) { throw new CanceledError_default(null, config); } } -function dispatchRequest(config) { +function dispatchRequest(_config) { + const config = utils_default.toSafeFlatObject(_config); throwIfCancellationRequested(config); - config.headers = AxiosHeaders_default.from(config.headers); - config.data = transformData.call( - config, - config.transformRequest - ); + config.headers = AxiosHeaders_default.from(utils_default.getSafeProp(config, "headers")); + config.data = transformData.call(config, config.transformRequest); if (["post", "put", "patch"].indexOf(config.method) !== -1) { config.headers.setContentType("application/x-www-form-urlencoded", false); } - const adapter = adapters_default.getAdapter(config.adapter || defaults_default.adapter); - return adapter(config).then(function onAdapterResolution(response) { - throwIfCancellationRequested(config); - response.data = transformData.call( - config, - config.transformResponse, - response - ); - response.headers = AxiosHeaders_default.from(response.headers); - return response; - }, function onAdapterRejection(reason) { - if (!isCancel(reason)) { + const adapter2 = adapters_default.getAdapter(config.adapter || defaults_default.adapter, config); + return adapter2(config).then( + function onAdapterResolution(response) { throwIfCancellationRequested(config); - if (reason && reason.response) { - reason.response.data = transformData.call( - config, - config.transformResponse, - reason.response - ); - reason.response.headers = AxiosHeaders_default.from(reason.response.headers); + config.response = response; + try { + response.data = transformData.call(config, config.transformResponse, response); + } finally { + delete config.response; + } + response.headers = AxiosHeaders_default.from(response.headers); + return response; + }, + function onAdapterRejection(reason) { + if (!isCancel(reason)) { + throwIfCancellationRequested(config); + if (reason && reason.response) { + config.response = reason.response; + try { + reason.response.data = transformData.call( + config, + config.transformResponse, + reason.response + ); + } finally { + delete config.response; + } + reason.response.headers = AxiosHeaders_default.from(reason.response.headers); + } } + return Promise.reject(reason); } - return Promise.reject(reason); - }); + ); } // node_modules/axios/lib/helpers/validator.js @@ -16230,19 +18951,22 @@ validators.spelling = function spelling(correctSpelling) { }; }; function assertOptions(options, schema, allowUnknown) { - if (typeof options !== "object") { + if (typeof options !== "object" || options === null) { throw new AxiosError_default("options must be an object", AxiosError_default.ERR_BAD_OPTION_VALUE); } const keys = Object.keys(options); let i = keys.length; while (i-- > 0) { const opt = keys[i]; - const validator = schema[opt]; + const validator = Object.prototype.hasOwnProperty.call(schema, opt) ? schema[opt] : void 0; if (validator) { const value = options[opt]; const result = value === void 0 || validator(value, opt, options); if (result !== true) { - throw new AxiosError_default("option " + opt + " must be " + result, AxiosError_default.ERR_BAD_OPTION_VALUE); + throw new AxiosError_default( + "option " + opt + " must be " + result, + AxiosError_default.ERR_BAD_OPTION_VALUE + ); } continue; } @@ -16260,7 +18984,7 @@ var validator_default = { var validators2 = validator_default.validators; var Axios = class { constructor(instanceConfig) { - this.defaults = instanceConfig; + this.defaults = instanceConfig || {}; this.interceptors = { request: new InterceptorManager_default(), response: new InterceptorManager_default() @@ -16279,14 +19003,24 @@ var Axios = class { return await this._request(configOrUrl, config); } catch (err) { if (err instanceof Error) { - let dummy = {}; - Error.captureStackTrace ? Error.captureStackTrace(dummy) : dummy = new Error(); - const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, "") : ""; try { + let dummy = {}; + Error.captureStackTrace ? Error.captureStackTrace(dummy) : dummy = new Error(); + const dummyStack = dummy.stack; + let stack = ""; + if (typeof dummyStack === "string") { + const firstNewlineIndex = dummyStack.indexOf("\n"); + stack = firstNewlineIndex === -1 ? "" : dummyStack.slice(firstNewlineIndex + 1); + } if (!err.stack) { err.stack = stack; - } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ""))) { - err.stack += "\n" + stack; + } else if (stack) { + const firstNewlineIndex = stack.indexOf("\n"); + const secondNewlineIndex = firstNewlineIndex === -1 ? -1 : stack.indexOf("\n", firstNewlineIndex + 1); + const stackWithoutTwoTopLines = secondNewlineIndex === -1 ? "" : stack.slice(secondNewlineIndex + 1); + if (!String(err.stack).endsWith(stackWithoutTwoTopLines)) { + err.stack += "\n" + stack; + } } } catch (e) { } @@ -16304,11 +19038,18 @@ var Axios = class { config = mergeConfig(this.defaults, config); const { transitional: transitional2, paramsSerializer, headers } = config; if (transitional2 !== void 0) { - validator_default.assertOptions(transitional2, { - silentJSONParsing: validators2.transitional(validators2.boolean), - forcedJSONParsing: validators2.transitional(validators2.boolean), - clarifyTimeoutError: validators2.transitional(validators2.boolean) - }, false); + validator_default.assertOptions( + transitional2, + { + silentJSONParsing: validators2.transitional(validators2.boolean), + forcedJSONParsing: validators2.transitional(validators2.boolean), + clarifyTimeoutError: validators2.transitional(validators2.boolean), + legacyInterceptorReqResOrdering: validators2.transitional(validators2.boolean), + advertiseZstdAcceptEncoding: validators2.transitional(validators2.boolean), + validateStatusUndefinedResolves: validators2.transitional(validators2.boolean) + }, + false + ); } if (paramsSerializer != null) { if (utils_default.isFunction(paramsSerializer)) { @@ -16316,10 +19057,14 @@ var Axios = class { serialize: paramsSerializer }; } else { - validator_default.assertOptions(paramsSerializer, { - encode: validators2.function, - serialize: validators2.function - }, true); + validator_default.assertOptions( + paramsSerializer, + { + encode: validators2.function, + serialize: validators2.function + }, + true + ); } } if (config.allowAbsoluteUrls !== void 0) { @@ -16328,21 +19073,19 @@ var Axios = class { } else { config.allowAbsoluteUrls = true; } - validator_default.assertOptions(config, { - baseUrl: validators2.spelling("baseURL"), - withXsrfToken: validators2.spelling("withXSRFToken") - }, true); - config.method = (config.method || this.defaults.method || "get").toLowerCase(); - let contextHeaders = headers && utils_default.merge( - headers.common, - headers[config.method] - ); - headers && utils_default.forEach( - ["delete", "get", "head", "post", "put", "patch", "common"], - (method) => { - delete headers[method]; - } + validator_default.assertOptions( + config, + { + baseUrl: validators2.spelling("baseURL"), + withXsrfToken: validators2.spelling("withXSRFToken") + }, + true ); + config.method = (utils_default.getSafeProp(config, "method") || utils_default.getSafeProp(this.defaults, "method") || "get").toLowerCase(); + let contextHeaders = headers && utils_default.merge(headers.common, headers[config.method]); + headers && utils_default.forEach(methodList_default.concat("common"), (method) => { + delete headers[method]; + }); config.headers = AxiosHeaders_default.concat(contextHeaders, headers); const requestInterceptorChain = []; let synchronousRequestInterceptors = true; @@ -16351,7 +19094,13 @@ var Axios = class { return; } synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous; - requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected); + const transitional3 = config.transitional || transitional_default; + const legacyInterceptorReqResOrdering = transitional3 && transitional3.legacyInterceptorReqResOrdering; + if (legacyInterceptorReqResOrdering) { + requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected); + } else { + requestInterceptorChain.push(interceptor.fulfilled, interceptor.rejected); + } }); const responseInterceptorChain = []; this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) { @@ -16362,8 +19111,8 @@ var Axios = class { let len; if (!synchronousRequestInterceptors) { const chain = [dispatchRequest.bind(this), void 0]; - chain.unshift.apply(chain, requestInterceptorChain); - chain.push.apply(chain, responseInterceptorChain); + chain.unshift(...requestInterceptorChain); + chain.push(...responseInterceptorChain); len = chain.length; promise = Promise.resolve(config); while (i < len) { @@ -16373,21 +19122,35 @@ var Axios = class { } len = requestInterceptorChain.length; let newConfig = config; - i = 0; while (i < len) { const onFulfilled = requestInterceptorChain[i++]; const onRejected = requestInterceptorChain[i++]; try { - newConfig = onFulfilled(newConfig); + newConfig = onFulfilled ? onFulfilled(newConfig) : newConfig; } catch (error) { - onRejected.call(this, error); + if (!onRejected) { + promise = Promise.reject(error); + break; + } + try { + const rejectedResult = onRejected.call(this, error); + if (utils_default.isThenable(rejectedResult)) { + promise = Promise.resolve(rejectedResult).then( + () => dispatchRequest.call(this, newConfig) + ); + } + } catch (rejectedError) { + promise = Promise.reject(rejectedError); + } break; } } - try { - promise = dispatchRequest.call(this, newConfig); - } catch (error) { - return Promise.reject(error); + if (!promise) { + try { + promise = dispatchRequest.call(this, newConfig); + } catch (error) { + promise = Promise.reject(error); + } } i = 0; len = responseInterceptorChain.length; @@ -16398,34 +19161,40 @@ var Axios = class { } getUri(config) { config = mergeConfig(this.defaults, config); - const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls); + const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls, config); return buildURL(fullPath, config.params, config.paramsSerializer); } }; utils_default.forEach(["delete", "get", "head", "options"], function forEachMethodNoData(method) { Axios.prototype[method] = function(url2, config) { - return this.request(mergeConfig(config || {}, { - method, - url: url2, - data: (config || {}).data - })); + return this.request( + mergeConfig(config || {}, { + method, + url: url2, + data: config && utils_default.hasOwnProp(config, "data") ? config.data : void 0 + }) + ); }; }); -utils_default.forEach(["post", "put", "patch"], function forEachMethodWithData(method) { +utils_default.forEach(["post", "put", "patch", "query"], function forEachMethodWithData(method) { function generateHTTPMethod(isForm) { return function httpMethod(url2, data, config) { - return this.request(mergeConfig(config || {}, { - method, - headers: isForm ? { - "Content-Type": "multipart/form-data" - } : {}, - url: url2, - data - })); + return this.request( + mergeConfig(config || {}, { + method, + headers: isForm ? { + "Content-Type": "multipart/form-data" + } : {}, + url: url2, + data + }) + ); }; } Axios.prototype[method] = generateHTTPMethod(); - Axios.prototype[method + "Form"] = generateHTTPMethod(true); + if (method !== "query") { + Axios.prototype[method + "Form"] = generateHTTPMethod(true); + } }); var Axios_default = Axios; @@ -16577,14 +19346,22 @@ var HttpStatusCode = { Gone: 410, LengthRequired: 411, PreconditionFailed: 412, + /** + * @deprecated Use `ContentTooLarge` instead. + */ PayloadTooLarge: 413, + ContentTooLarge: 413, UriTooLong: 414, UnsupportedMediaType: 415, RangeNotSatisfiable: 416, ExpectationFailed: 417, ImATeapot: 418, MisdirectedRequest: 421, + /** + * @deprecated Use `UnprocessableContent` instead. + */ UnprocessableEntity: 422, + UnprocessableContent: 422, Locked: 423, FailedDependency: 424, TooEarly: 425, @@ -16603,10 +19380,19 @@ var HttpStatusCode = { InsufficientStorage: 507, LoopDetected: 508, NotExtended: 510, - NetworkAuthenticationRequired: 511 + NetworkAuthenticationRequired: 511, + WebServerReturnsAnUnknownError: 520, + WebServerIsDown: 521, + ConnectionTimedOut: 522, + OriginIsUnreachable: 523, + TimeoutOccurred: 524, + SslHandshakeFailed: 525, + InvalidSslCertificate: 526 }; Object.entries(HttpStatusCode).forEach(([key, value]) => { - HttpStatusCode[value] = key; + if (HttpStatusCode[value] === void 0) { + HttpStatusCode[value] = key; + } }); var HttpStatusCode_default = HttpStatusCode; @@ -16616,7 +19402,7 @@ function createInstance(defaultConfig) { const instance = bind(Axios_default.prototype.request, context); utils_default.extend(instance, Axios_default.prototype, context, { allOwnKeys: true }); utils_default.extend(instance, context, null, { allOwnKeys: true }); - instance.create = function create(instanceConfig) { + instance.create = function create2(instanceConfig) { return createInstance(mergeConfig(defaultConfig, instanceConfig)); }; return instance; @@ -16659,8 +19445,9 @@ var { AxiosHeaders: AxiosHeaders2, HttpStatusCode: HttpStatusCode2, formToJSON, - getAdapter, - mergeConfig: mergeConfig2 + getAdapter: getAdapter2, + mergeConfig: mergeConfig2, + create } = axios_default; // model/accountCreateRequest.ts diff --git a/sdks/node/package-lock.json b/sdks/node/package-lock.json index dcc03ad23..b5e09a420 100644 --- a/sdks/node/package-lock.json +++ b/sdks/node/package-lock.json @@ -8,7 +8,7 @@ "name": "@dropbox/sign", "version": "1.11-dev", "dependencies": { - "axios": "^1.8.2", + "axios": "^1.20.0", "bluebird": "^3.7.2", "form-data": "^4.0.0", "qs": "^6.10.3" @@ -1485,6 +1485,18 @@ "node": ">=0.4.0" } }, + "node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "license": "MIT", + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, "node_modules/ansi-escapes": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", @@ -1564,13 +1576,15 @@ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, "node_modules/axios": { - "version": "1.8.4", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.8.4.tgz", - "integrity": "sha512-eBSYY4Y68NNlHbHBMdeDmKNtDgXWhQsJcGqzO3iLUM0GraQFSS9cVgPX5I9b3lbdFKyYoAEGAZF1DwhTaljNAw==", + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.20.0.tgz", + "integrity": "sha512-r8aOh8j9cGKpgQAqpzrUHnSIc6a59Y3Xf/cv8sy1DrHCkZHzQGEuoq1tARk6qSyDdtQGSDgpb9kFlruzPvrgwg==", + "license": "MIT", "dependencies": { - "follow-redirects": "^1.15.6", - "form-data": "^4.0.0", - "proxy-from-env": "^1.1.0" + "follow-redirects": "^1.16.0", + "form-data": "^4.0.6", + "https-proxy-agent": "^5.0.1", + "proxy-from-env": "^2.1.0" } }, "node_modules/axios-mock-adapter": { @@ -2048,7 +2062,6 @@ "version": "4.3.6", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz", "integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==", - "dev": true, "dependencies": { "ms": "2.1.2" }, @@ -2250,6 +2263,21 @@ "node": ">= 0.4" } }, + "node_modules/es-set-tostringtag": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/es5-ext": { "version": "0.10.64", "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.64.tgz", @@ -2532,15 +2560,16 @@ } }, "node_modules/follow-redirects": { - "version": "1.15.6", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", - "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.16.1.tgz", + "integrity": "sha512-FNvFGzoMLWmE6Yj9spb/zjd7yiNCHiAW9/Tg9CXrQ8wuu32HtlJOwWO11OJafl5FfY3DxTdQ0vj42zU1kvv5jg==", "funding": [ { "type": "individual", "url": "https://github.com/sponsors/RubenVerborgh" } ], + "license": "MIT", "engines": { "node": ">=4.0" }, @@ -2551,13 +2580,16 @@ } }, "node_modules/form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.6.tgz", + "integrity": "sha512-vKatAh4SlVfgbv+YtmhiRjhEMJsYpsG1Y2rMQtR+SVSbytsSD1YGzDIcrAJmdFec88u/+VoGmxnl+80gL1tRCQ==", + "license": "MIT", "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" + "es-set-tostringtag": "^2.1.0", + "hasown": "^2.0.4", + "mime-types": "^2.1.35" }, "engines": { "node": ">= 6" @@ -2747,10 +2779,26 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/hasown": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", - "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.4.tgz", + "integrity": "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==", + "license": "MIT", "dependencies": { "function-bind": "^1.1.2" }, @@ -2770,6 +2818,19 @@ "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", "dev": true }, + "node_modules/https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "license": "MIT", + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/human-signals": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", @@ -3840,8 +3901,7 @@ "node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "node_modules/natural-compare": { "version": "1.4.0", @@ -4136,9 +4196,13 @@ } }, "node_modules/proxy-from-env": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", - "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-2.1.0.tgz", + "integrity": "sha512-cJ+oHTW1VAEa8cJslgmUZrc+sjRKgAKl3Zyse6+PV38hZe/V6Z14TbCuXcan9F9ghlz4QrFr2c92TNF82UkYHA==", + "license": "MIT", + "engines": { + "node": ">=10" + } }, "node_modules/pure-rand": { "version": "6.1.0", diff --git a/sdks/node/package.json b/sdks/node/package.json index 69a7be449..fafd30cb1 100644 --- a/sdks/node/package.json +++ b/sdks/node/package.json @@ -18,7 +18,7 @@ }, "author": "Dropbox Sign", "dependencies": { - "axios": "^1.8.2", + "axios": "^1.20.0", "bluebird": "^3.7.2", "form-data": "^4.0.0", "qs": "^6.10.3" diff --git a/sdks/node/templates/package.mustache b/sdks/node/templates/package.mustache index 7b289f620..385522e01 100644 --- a/sdks/node/templates/package.mustache +++ b/sdks/node/templates/package.mustache @@ -18,7 +18,7 @@ }, "author": "Dropbox Sign", "dependencies": { - "axios": "^1.8.2", + "axios": "^1.20.0", "bluebird": "^3.7.2", "form-data": "^4.0.0", "qs": "^6.10.3"