diff --git a/dist/index.js b/dist/index.js index 26a3db0..fd91bb3 100644 --- a/dist/index.js +++ b/dist/index.js @@ -5,6 +5,7 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __getProtoOf = Object.getPrototypeOf; var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); var __esm = (fn, res) => function __init() { return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res; }; @@ -47,6 +48,7 @@ var require_utils = __commonJS({ } return JSON.stringify(input); } + __name(toCommandValue, "toCommandValue"); exports2.toCommandValue = toCommandValue; function toCommandProperties(annotationProperties) { if (!Object.keys(annotationProperties).length) { @@ -61,6 +63,7 @@ var require_utils = __commonJS({ endColumn: annotationProperties.endColumn }; } + __name(toCommandProperties, "toCommandProperties"); exports2.toCommandProperties = toCommandProperties; } }); @@ -71,9 +74,9 @@ var require_command = __commonJS({ "use strict"; var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { + Object.defineProperty(o, k2, { enumerable: true, get: /* @__PURE__ */ __name(function() { return m[k]; - } }); + }, "get") }); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; @@ -100,13 +103,18 @@ var require_command = __commonJS({ const cmd = new Command(command, properties, message); process.stdout.write(cmd.toString() + os2.EOL); } + __name(issueCommand, "issueCommand"); exports2.issueCommand = issueCommand; function issue(name, message = "") { issueCommand(name, {}, message); } + __name(issue, "issue"); exports2.issue = issue; var CMD_STRING = "::"; var Command = class { + static { + __name(this, "Command"); + } constructor(command, properties, message) { if (!command) { command = "missing.command"; @@ -141,9 +149,11 @@ var require_command = __commonJS({ function escapeData(s) { return utils_1.toCommandValue(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A"); } + __name(escapeData, "escapeData"); function escapeProperty(s) { return utils_1.toCommandValue(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/:/g, "%3A").replace(/,/g, "%2C"); } + __name(escapeProperty, "escapeProperty"); } }); @@ -161,6 +171,7 @@ var init_rng = __esm({ import_crypto = __toESM(require("crypto")); rnds8Pool = new Uint8Array(256); poolPtr = rnds8Pool.length; + __name(rng, "rng"); } }); @@ -180,6 +191,7 @@ var validate_default; var init_validate = __esm({ "node_modules/uuid/dist/esm-node/validate.js"() { init_regex(); + __name(validate, "validate"); validate_default = validate; } }); @@ -200,6 +212,7 @@ var init_stringify = __esm({ for (let i = 0; i < 256; ++i) { byteToHex.push((i + 256).toString(16).substr(1)); } + __name(stringify, "stringify"); stringify_default = stringify; } }); @@ -260,6 +273,7 @@ var init_v1 = __esm({ init_stringify(); _lastMSecs = 0; _lastNSecs = 0; + __name(v1, "v1"); v1_default = v1; } }); @@ -293,6 +307,7 @@ var parse_default; var init_parse = __esm({ "node_modules/uuid/dist/esm-node/parse.js"() { init_validate(); + __name(parse, "parse"); parse_default = parse; } }); @@ -332,6 +347,7 @@ function v35_default(name, version2, hashfunc) { } return stringify_default(bytes); } + __name(generateUUID, "generateUUID"); try { generateUUID.name = name; } catch (err) { @@ -345,8 +361,10 @@ var init_v35 = __esm({ "node_modules/uuid/dist/esm-node/v35.js"() { init_stringify(); init_parse(); + __name(stringToBytes, "stringToBytes"); DNS = "6ba7b810-9dad-11d1-80b4-00c04fd430c8"; URL2 = "6ba7b811-9dad-11d1-80b4-00c04fd430c8"; + __name(v35_default, "default"); } }); @@ -363,6 +381,7 @@ var import_crypto2, md5_default; var init_md5 = __esm({ "node_modules/uuid/dist/esm-node/md5.js"() { import_crypto2 = __toESM(require("crypto")); + __name(md5, "md5"); md5_default = md5; } }); @@ -398,6 +417,7 @@ var init_v4 = __esm({ "node_modules/uuid/dist/esm-node/v4.js"() { init_rng(); init_stringify(); + __name(v4, "v4"); v4_default = v4; } }); @@ -415,6 +435,7 @@ var import_crypto3, sha1_default; var init_sha1 = __esm({ "node_modules/uuid/dist/esm-node/sha1.js"() { import_crypto3 = __toESM(require("crypto")); + __name(sha1, "sha1"); sha1_default = sha1; } }); @@ -449,6 +470,7 @@ var version_default; var init_version = __esm({ "node_modules/uuid/dist/esm-node/version.js"() { init_validate(); + __name(version, "version"); version_default = version; } }); @@ -486,9 +508,9 @@ var require_file_command = __commonJS({ "use strict"; var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { + Object.defineProperty(o, k2, { enumerable: true, get: /* @__PURE__ */ __name(function() { return m[k]; - } }); + }, "get") }); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; @@ -525,6 +547,7 @@ var require_file_command = __commonJS({ encoding: "utf8" }); } + __name(issueFileCommand, "issueFileCommand"); exports2.issueFileCommand = issueFileCommand; function prepareKeyValueMessage(key, value) { const delimiter = `ghadelimiter_${uuid_1.v4()}`; @@ -537,6 +560,7 @@ var require_file_command = __commonJS({ } return `${key}<<${delimiter}${os2.EOL}${convertedValue}${os2.EOL}${delimiter}`; } + __name(prepareKeyValueMessage, "prepareKeyValueMessage"); exports2.prepareKeyValueMessage = prepareKeyValueMessage; } }); @@ -570,6 +594,7 @@ var require_proxy = __commonJS({ return void 0; } } + __name(getProxyUrl, "getProxyUrl"); exports2.getProxyUrl = getProxyUrl; function checkBypass(reqUrl) { if (!reqUrl.hostname) { @@ -602,11 +627,13 @@ var require_proxy = __commonJS({ } return false; } + __name(checkBypass, "checkBypass"); exports2.checkBypass = checkBypass; function isLoopbackAddress(host) { const hostLower = host.toLowerCase(); return hostLower === "localhost" || hostLower.startsWith("127.") || hostLower.startsWith("[::1]") || hostLower.startsWith("[0:0:0:0:0:0:0:1]"); } + __name(isLoopbackAddress, "isLoopbackAddress"); } }); @@ -630,6 +657,7 @@ var require_tunnel = __commonJS({ agent.request = http.request; return agent; } + __name(httpOverHttp, "httpOverHttp"); function httpsOverHttp(options) { var agent = new TunnelingAgent(options); agent.request = http.request; @@ -637,11 +665,13 @@ var require_tunnel = __commonJS({ agent.defaultPort = 443; return agent; } + __name(httpsOverHttp, "httpsOverHttp"); function httpOverHttps(options) { var agent = new TunnelingAgent(options); agent.request = https.request; return agent; } + __name(httpOverHttps, "httpOverHttps"); function httpsOverHttps(options) { var agent = new TunnelingAgent(options); agent.request = https.request; @@ -649,6 +679,7 @@ var require_tunnel = __commonJS({ agent.defaultPort = 443; return agent; } + __name(httpsOverHttps, "httpsOverHttps"); function TunnelingAgent(options) { var self2 = this; self2.options = options || {}; @@ -656,7 +687,7 @@ var require_tunnel = __commonJS({ self2.maxSockets = self2.options.maxSockets || http.Agent.defaultMaxSockets; self2.requests = []; self2.sockets = []; - self2.on("free", function onFree(socket, host, port, localAddress) { + self2.on("free", /* @__PURE__ */ __name(function onFree(socket, host, port, localAddress) { var options2 = toOptions(host, port, localAddress); for (var i = 0, len = self2.requests.length; i < len; ++i) { var pending = self2.requests[i]; @@ -668,10 +699,11 @@ var require_tunnel = __commonJS({ } socket.destroy(); self2.removeSocket(socket); - }); + }, "onFree")); } + __name(TunnelingAgent, "TunnelingAgent"); util.inherits(TunnelingAgent, events.EventEmitter); - TunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) { + TunnelingAgent.prototype.addRequest = /* @__PURE__ */ __name(function addRequest(req, host, port, localAddress) { var self2 = this; var options = mergeOptions({ request: req }, self2.options, toOptions(host, port, localAddress)); if (self2.sockets.length >= this.maxSockets) { @@ -686,15 +718,17 @@ var require_tunnel = __commonJS({ function onFree() { self2.emit("free", socket, options); } + __name(onFree, "onFree"); function onCloseOrRemove(err) { self2.removeSocket(socket); socket.removeListener("free", onFree); socket.removeListener("close", onCloseOrRemove); socket.removeListener("agentRemove", onCloseOrRemove); } + __name(onCloseOrRemove, "onCloseOrRemove"); }); - }; - TunnelingAgent.prototype.createSocket = function createSocket(options, cb) { + }, "addRequest"); + TunnelingAgent.prototype.createSocket = /* @__PURE__ */ __name(function createSocket(options, cb) { var self2 = this; var placeholder = {}; self2.sockets.push(placeholder); @@ -724,11 +758,13 @@ var require_tunnel = __commonJS({ function onResponse(res) { res.upgrade = true; } + __name(onResponse, "onResponse"); function onUpgrade(res, socket, head) { process.nextTick(function() { onConnect(res, socket, head); }); } + __name(onUpgrade, "onUpgrade"); function onConnect(res, socket, head) { connectReq.removeAllListeners(); socket.removeAllListeners(); @@ -757,6 +793,7 @@ var require_tunnel = __commonJS({ self2.sockets[self2.sockets.indexOf(placeholder)] = socket; return cb(socket); } + __name(onConnect, "onConnect"); function onError(cause) { connectReq.removeAllListeners(); debug( @@ -769,8 +806,9 @@ var require_tunnel = __commonJS({ options.request.emit("error", error); self2.removeSocket(placeholder); } - }; - TunnelingAgent.prototype.removeSocket = function removeSocket(socket) { + __name(onError, "onError"); + }, "createSocket"); + TunnelingAgent.prototype.removeSocket = /* @__PURE__ */ __name(function removeSocket(socket) { var pos = this.sockets.indexOf(socket); if (pos === -1) { return; @@ -782,7 +820,7 @@ var require_tunnel = __commonJS({ pending.request.onSocket(socket2); }); } - }; + }, "removeSocket"); function createSecureSocket(options, cb) { var self2 = this; TunnelingAgent.prototype.createSocket.call(self2, options, function(socket) { @@ -796,6 +834,7 @@ var require_tunnel = __commonJS({ cb(secureSocket); }); } + __name(createSecureSocket, "createSecureSocket"); function toOptions(host, port, localAddress) { if (typeof host === "string") { return { @@ -806,6 +845,7 @@ var require_tunnel = __commonJS({ } return host; } + __name(toOptions, "toOptions"); function mergeOptions(target) { for (var i = 1, len = arguments.length; i < len; ++i) { var overrides = arguments[i]; @@ -821,9 +861,10 @@ var require_tunnel = __commonJS({ } return target; } + __name(mergeOptions, "mergeOptions"); var debug; if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) { - debug = function() { + debug = /* @__PURE__ */ __name(function() { var args = Array.prototype.slice.call(arguments); if (typeof args[0] === "string") { args[0] = "TUNNEL: " + args[0]; @@ -831,10 +872,10 @@ var require_tunnel = __commonJS({ args.unshift("TUNNEL:"); } console.error.apply(console, args); - }; + }, "debug"); } else { - debug = function() { - }; + debug = /* @__PURE__ */ __name(function() { + }, "debug"); } exports2.debug = debug; } @@ -921,6 +962,9 @@ var require_errors = __commonJS({ "node_modules/undici/lib/core/errors.js"(exports2, module2) { "use strict"; var UndiciError = class extends Error { + static { + __name(this, "UndiciError"); + } constructor(message) { super(message); this.name = "UndiciError"; @@ -928,6 +972,9 @@ var require_errors = __commonJS({ } }; var ConnectTimeoutError = class _ConnectTimeoutError extends UndiciError { + static { + __name(this, "ConnectTimeoutError"); + } constructor(message) { super(message); Error.captureStackTrace(this, _ConnectTimeoutError); @@ -937,6 +984,9 @@ var require_errors = __commonJS({ } }; var HeadersTimeoutError = class _HeadersTimeoutError extends UndiciError { + static { + __name(this, "HeadersTimeoutError"); + } constructor(message) { super(message); Error.captureStackTrace(this, _HeadersTimeoutError); @@ -946,6 +996,9 @@ var require_errors = __commonJS({ } }; var HeadersOverflowError = class _HeadersOverflowError extends UndiciError { + static { + __name(this, "HeadersOverflowError"); + } constructor(message) { super(message); Error.captureStackTrace(this, _HeadersOverflowError); @@ -955,6 +1008,9 @@ var require_errors = __commonJS({ } }; var BodyTimeoutError = class _BodyTimeoutError extends UndiciError { + static { + __name(this, "BodyTimeoutError"); + } constructor(message) { super(message); Error.captureStackTrace(this, _BodyTimeoutError); @@ -964,6 +1020,9 @@ var require_errors = __commonJS({ } }; var ResponseStatusCodeError = class _ResponseStatusCodeError extends UndiciError { + static { + __name(this, "ResponseStatusCodeError"); + } constructor(message, statusCode, headers, body) { super(message); Error.captureStackTrace(this, _ResponseStatusCodeError); @@ -977,6 +1036,9 @@ var require_errors = __commonJS({ } }; var InvalidArgumentError = class _InvalidArgumentError extends UndiciError { + static { + __name(this, "InvalidArgumentError"); + } constructor(message) { super(message); Error.captureStackTrace(this, _InvalidArgumentError); @@ -986,6 +1048,9 @@ var require_errors = __commonJS({ } }; var InvalidReturnValueError = class _InvalidReturnValueError extends UndiciError { + static { + __name(this, "InvalidReturnValueError"); + } constructor(message) { super(message); Error.captureStackTrace(this, _InvalidReturnValueError); @@ -995,6 +1060,9 @@ var require_errors = __commonJS({ } }; var RequestAbortedError = class _RequestAbortedError extends UndiciError { + static { + __name(this, "RequestAbortedError"); + } constructor(message) { super(message); Error.captureStackTrace(this, _RequestAbortedError); @@ -1004,6 +1072,9 @@ var require_errors = __commonJS({ } }; var InformationalError = class _InformationalError extends UndiciError { + static { + __name(this, "InformationalError"); + } constructor(message) { super(message); Error.captureStackTrace(this, _InformationalError); @@ -1013,6 +1084,9 @@ var require_errors = __commonJS({ } }; var RequestContentLengthMismatchError = class _RequestContentLengthMismatchError extends UndiciError { + static { + __name(this, "RequestContentLengthMismatchError"); + } constructor(message) { super(message); Error.captureStackTrace(this, _RequestContentLengthMismatchError); @@ -1022,6 +1096,9 @@ var require_errors = __commonJS({ } }; var ResponseContentLengthMismatchError = class _ResponseContentLengthMismatchError extends UndiciError { + static { + __name(this, "ResponseContentLengthMismatchError"); + } constructor(message) { super(message); Error.captureStackTrace(this, _ResponseContentLengthMismatchError); @@ -1031,6 +1108,9 @@ var require_errors = __commonJS({ } }; var ClientDestroyedError = class _ClientDestroyedError extends UndiciError { + static { + __name(this, "ClientDestroyedError"); + } constructor(message) { super(message); Error.captureStackTrace(this, _ClientDestroyedError); @@ -1040,6 +1120,9 @@ var require_errors = __commonJS({ } }; var ClientClosedError = class _ClientClosedError extends UndiciError { + static { + __name(this, "ClientClosedError"); + } constructor(message) { super(message); Error.captureStackTrace(this, _ClientClosedError); @@ -1049,6 +1132,9 @@ var require_errors = __commonJS({ } }; var SocketError = class _SocketError extends UndiciError { + static { + __name(this, "SocketError"); + } constructor(message, socket) { super(message); Error.captureStackTrace(this, _SocketError); @@ -1059,6 +1145,9 @@ var require_errors = __commonJS({ } }; var NotSupportedError = class _NotSupportedError extends UndiciError { + static { + __name(this, "NotSupportedError"); + } constructor(message) { super(message); Error.captureStackTrace(this, _NotSupportedError); @@ -1068,6 +1157,9 @@ var require_errors = __commonJS({ } }; var BalancedPoolMissingUpstreamError = class extends UndiciError { + static { + __name(this, "BalancedPoolMissingUpstreamError"); + } constructor(message) { super(message); Error.captureStackTrace(this, NotSupportedError); @@ -1077,6 +1169,9 @@ var require_errors = __commonJS({ } }; var HTTPParserError = class _HTTPParserError extends Error { + static { + __name(this, "HTTPParserError"); + } constructor(message, code, data) { super(message); Error.captureStackTrace(this, _HTTPParserError); @@ -1086,6 +1181,9 @@ var require_errors = __commonJS({ } }; var ResponseExceededMaxSizeError = class _ResponseExceededMaxSizeError extends UndiciError { + static { + __name(this, "ResponseExceededMaxSizeError"); + } constructor(message) { super(message); Error.captureStackTrace(this, _ResponseExceededMaxSizeError); @@ -1095,6 +1193,9 @@ var require_errors = __commonJS({ } }; var RequestRetryError = class _RequestRetryError extends UndiciError { + static { + __name(this, "RequestRetryError"); + } constructor(message, code, { headers, data }) { super(message); Error.captureStackTrace(this, _RequestRetryError); @@ -1263,12 +1364,15 @@ var require_util = __commonJS({ var [nodeMajor, nodeMinor] = process.versions.node.split(".").map((v) => Number(v)); function nop() { } + __name(nop, "nop"); function isStream(obj) { return obj && typeof obj === "object" && typeof obj.pipe === "function" && typeof obj.on === "function"; } + __name(isStream, "isStream"); function isBlobLike(object) { return Blob2 && object instanceof Blob2 || object && typeof object === "object" && (typeof object.stream === "function" || typeof object.arrayBuffer === "function") && /^(Blob|File)$/.test(object[Symbol.toStringTag]); } + __name(isBlobLike, "isBlobLike"); function buildURL(url, queryParams) { if (url.includes("?") || url.includes("#")) { throw new Error('Query params cannot be passed when url already contains "?" or "#".'); @@ -1279,6 +1383,7 @@ var require_util = __commonJS({ } return url; } + __name(buildURL, "buildURL"); function parseURL(url) { if (typeof url === "string") { url = new URL(url); @@ -1322,6 +1427,7 @@ var require_util = __commonJS({ } return url; } + __name(parseURL, "parseURL"); function parseOrigin(url) { url = parseURL(url); if (url.pathname !== "/" || url.search || url.hash) { @@ -1329,6 +1435,7 @@ var require_util = __commonJS({ } return url; } + __name(parseOrigin, "parseOrigin"); function getHostname(host) { if (host[0] === "[") { const idx2 = host.indexOf("]"); @@ -1339,6 +1446,7 @@ var require_util = __commonJS({ if (idx === -1) return host; return host.substring(0, idx); } + __name(getHostname, "getHostname"); function getServerName(host) { if (!host) { return null; @@ -1350,15 +1458,19 @@ var require_util = __commonJS({ } return servername; } + __name(getServerName, "getServerName"); function deepClone(obj) { return JSON.parse(JSON.stringify(obj)); } + __name(deepClone, "deepClone"); function isAsyncIterable(obj) { return !!(obj != null && typeof obj[Symbol.asyncIterator] === "function"); } + __name(isAsyncIterable, "isAsyncIterable"); function isIterable(obj) { return !!(obj != null && (typeof obj[Symbol.iterator] === "function" || typeof obj[Symbol.asyncIterator] === "function")); } + __name(isIterable, "isIterable"); function bodyLength(body) { if (body == null) { return 0; @@ -1372,13 +1484,16 @@ var require_util = __commonJS({ } return null; } + __name(bodyLength, "bodyLength"); function isDestroyed(stream2) { return !stream2 || !!(stream2.destroyed || stream2[kDestroyed]); } + __name(isDestroyed, "isDestroyed"); function isReadableAborted(stream2) { const state = stream2 && stream2._readableState; return isDestroyed(stream2) && state && !state.endEmitted; } + __name(isReadableAborted, "isReadableAborted"); function destroy(stream2, err) { if (stream2 == null || !isStream(stream2) || isDestroyed(stream2)) { return; @@ -1397,14 +1512,17 @@ var require_util = __commonJS({ stream2[kDestroyed] = true; } } + __name(destroy, "destroy"); var KEEPALIVE_TIMEOUT_EXPR = /timeout=(\d+)/; function parseKeepAliveTimeout(val) { const m = val.toString().match(KEEPALIVE_TIMEOUT_EXPR); return m ? parseInt(m[1], 10) * 1e3 : null; } + __name(parseKeepAliveTimeout, "parseKeepAliveTimeout"); function headerNameToString(value) { return headerNameLowerCasedRecord[value] || value.toLowerCase(); } + __name(headerNameToString, "headerNameToString"); function parseHeaders(headers, obj = {}) { if (!Array.isArray(headers)) return headers; for (let i = 0; i < headers.length; i += 2) { @@ -1429,6 +1547,7 @@ var require_util = __commonJS({ } return obj; } + __name(parseHeaders, "parseHeaders"); function parseRawHeaders(headers) { const ret = []; let hasContentLength = false; @@ -1450,9 +1569,11 @@ var require_util = __commonJS({ } return ret; } + __name(parseRawHeaders, "parseRawHeaders"); function isBuffer(buffer) { return buffer instanceof Uint8Array || Buffer.isBuffer(buffer); } + __name(isBuffer, "isBuffer"); function validateHandler(handler, method, upgrade) { if (!handler || typeof handler !== "object") { throw new InvalidArgumentError("handler must be an object"); @@ -1482,19 +1603,23 @@ var require_util = __commonJS({ } } } + __name(validateHandler, "validateHandler"); function isDisturbed(body) { return !!(body && (stream.isDisturbed ? stream.isDisturbed(body) || body[kBodyUsed] : body[kBodyUsed] || body.readableDidRead || body._readableState && body._readableState.dataEmitted || isReadableAborted(body))); } + __name(isDisturbed, "isDisturbed"); function isErrored(body) { return !!(body && (stream.isErrored ? stream.isErrored(body) : /state: 'errored'/.test( nodeUtil.inspect(body) ))); } + __name(isErrored, "isErrored"); function isReadable(body) { return !!(body && (stream.isReadable ? stream.isReadable(body) : /state: 'readable'/.test( nodeUtil.inspect(body) ))); } + __name(isReadable, "isReadable"); function getSocketInfo(socket) { return { localAddress: socket.localAddress, @@ -1507,11 +1632,13 @@ var require_util = __commonJS({ bytesRead: socket.bytesRead }; } + __name(getSocketInfo, "getSocketInfo"); async function* convertIterableToBuffer(iterable) { for await (const chunk of iterable) { yield Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk); } } + __name(convertIterableToBuffer, "convertIterableToBuffer"); var ReadableStream; function ReadableStreamFrom(iterable) { if (!ReadableStream) { @@ -1545,9 +1672,11 @@ var require_util = __commonJS({ 0 ); } + __name(ReadableStreamFrom, "ReadableStreamFrom"); function isFormDataLike(object) { return object && typeof object === "object" && typeof object.append === "function" && typeof object.delete === "function" && typeof object.get === "function" && typeof object.getAll === "function" && typeof object.has === "function" && typeof object.set === "function" && object[Symbol.toStringTag] === "FormData"; } + __name(isFormDataLike, "isFormDataLike"); function throwIfAborted(signal) { if (!signal) { return; @@ -1562,6 +1691,7 @@ var require_util = __commonJS({ } } } + __name(throwIfAborted, "throwIfAborted"); function addAbortListener(signal, listener) { if ("addEventListener" in signal) { signal.addEventListener("abort", listener, { once: true }); @@ -1570,6 +1700,7 @@ var require_util = __commonJS({ signal.addListener("abort", listener); return () => signal.removeListener("abort", listener); } + __name(addAbortListener, "addAbortListener"); var hasToWellFormed = !!String.prototype.toWellFormed; function toUSVString(val) { if (hasToWellFormed) { @@ -1579,6 +1710,7 @@ var require_util = __commonJS({ } return `${val}`; } + __name(toUSVString, "toUSVString"); function parseRangeHeader(range) { if (range == null || range === "") return { start: 0, end: null, size: null }; const m = range ? range.match(/^bytes (\d+)-(\d+)\/(\d+)?$/) : null; @@ -1588,6 +1720,7 @@ var require_util = __commonJS({ size: m[3] ? parseInt(m[3]) : null } : null; } + __name(parseRangeHeader, "parseRangeHeader"); var kEnumerableProperty = /* @__PURE__ */ Object.create(null); kEnumerableProperty.enumerable = true; module2.exports = { @@ -1665,6 +1798,7 @@ var require_timers = __commonJS({ refreshTimeout(); } } + __name(onTimeout, "onTimeout"); function refreshTimeout() { if (fastNowTimeout && fastNowTimeout.refresh) { fastNowTimeout.refresh(); @@ -1676,7 +1810,11 @@ var require_timers = __commonJS({ } } } + __name(refreshTimeout, "refreshTimeout"); var Timeout = class { + static { + __name(this, "Timeout"); + } constructor(callback, delay, opaque) { this.callback = callback; this.delay = delay; @@ -1743,6 +1881,7 @@ var require_sbmh = __commonJS({ this._occ[needle[i]] = needleLength - 1 - i; } } + __name(SBMH, "SBMH"); inherits(SBMH, EventEmitter); SBMH.prototype.reset = function() { this._lookbehind_size = 0; @@ -1858,6 +1997,7 @@ var require_PartStream = __commonJS({ function PartStream(opts) { ReadableStream.call(this, opts); } + __name(PartStream, "PartStream"); inherits(PartStream, ReadableStream); PartStream.prototype._read = function(n) { }; @@ -1869,7 +2009,7 @@ var require_PartStream = __commonJS({ var require_getLimit = __commonJS({ "node_modules/@fastify/busboy/lib/utils/getLimit.js"(exports2, module2) { "use strict"; - module2.exports = function getLimit(limits, name, defaultLimit) { + module2.exports = /* @__PURE__ */ __name(function getLimit(limits, name, defaultLimit) { if (!limits || limits[name] === void 0 || limits[name] === null) { return defaultLimit; } @@ -1877,7 +2017,7 @@ var require_getLimit = __commonJS({ throw new TypeError("Limit " + name + " is not a valid number"); } return limits[name]; - }; + }, "getLimit"); } }); @@ -1921,6 +2061,7 @@ var require_HeaderParser = __commonJS({ } }); } + __name(HeaderParser, "HeaderParser"); inherits(HeaderParser, EventEmitter); HeaderParser.prototype.push = function(data) { const r = this.ss.push(data); @@ -1993,8 +2134,8 @@ var require_Dicer = __commonJS({ var DASH = 45; var B_ONEDASH = Buffer.from("-"); var B_CRLF = Buffer.from("\r\n"); - var EMPTY_FN = function() { - }; + var EMPTY_FN = /* @__PURE__ */ __name(function() { + }, "EMPTY_FN"); function Dicer(cfg) { if (!(this instanceof Dicer)) { return new Dicer(cfg); @@ -2029,6 +2170,7 @@ var require_Dicer = __commonJS({ self2._part.emit("header", header); }); } + __name(Dicer, "Dicer"); inherits(Dicer, WritableStream); Dicer.prototype.emit = function(ev) { if (ev === "finish" && !this._realFinish) { @@ -2266,8 +2408,9 @@ var require_decodeText = __commonJS({ } } } + __name(getDecoder, "getDecoder"); var decoders = { - utf8: (data, sourceEncoding) => { + utf8: /* @__PURE__ */ __name((data, sourceEncoding) => { if (data.length === 0) { return ""; } @@ -2275,8 +2418,8 @@ var require_decodeText = __commonJS({ data = Buffer.from(data, sourceEncoding); } return data.utf8Slice(0, data.length); - }, - latin1: (data, sourceEncoding) => { + }, "utf8"), + latin1: /* @__PURE__ */ __name((data, sourceEncoding) => { if (data.length === 0) { return ""; } @@ -2284,8 +2427,8 @@ var require_decodeText = __commonJS({ return data; } return data.latin1Slice(0, data.length); - }, - utf16le: (data, sourceEncoding) => { + }, "latin1"), + utf16le: /* @__PURE__ */ __name((data, sourceEncoding) => { if (data.length === 0) { return ""; } @@ -2293,8 +2436,8 @@ var require_decodeText = __commonJS({ data = Buffer.from(data, sourceEncoding); } return data.ucs2Slice(0, data.length); - }, - base64: (data, sourceEncoding) => { + }, "utf16le"), + base64: /* @__PURE__ */ __name((data, sourceEncoding) => { if (data.length === 0) { return ""; } @@ -2302,8 +2445,8 @@ var require_decodeText = __commonJS({ data = Buffer.from(data, sourceEncoding); } return data.base64Slice(0, data.length); - }, - other: (data, sourceEncoding) => { + }, "base64"), + other: /* @__PURE__ */ __name((data, sourceEncoding) => { if (data.length === 0) { return ""; } @@ -2317,7 +2460,7 @@ var require_decodeText = __commonJS({ } } return typeof data === "string" ? data : data.toString(); - } + }, "other") }; function decodeText(text, sourceEncoding, destEncoding) { if (text) { @@ -2325,6 +2468,7 @@ var require_decodeText = __commonJS({ } return text; } + __name(decodeText, "decodeText"); module2.exports = decodeText; } }); @@ -2824,6 +2968,7 @@ var require_parseParams = __commonJS({ function encodedReplacer(match) { return EncodedLookup[match]; } + __name(encodedReplacer, "encodedReplacer"); var STATE_KEY = 0; var STATE_VALUE = 1; var STATE_CHARSET = 2; @@ -2923,6 +3068,7 @@ var require_parseParams = __commonJS({ } return res; } + __name(parseParams, "parseParams"); module2.exports = parseParams; } }); @@ -2931,7 +3077,7 @@ var require_parseParams = __commonJS({ var require_basename = __commonJS({ "node_modules/@fastify/busboy/lib/utils/basename.js"(exports2, module2) { "use strict"; - module2.exports = function basename(path2) { + module2.exports = /* @__PURE__ */ __name(function basename(path2) { if (typeof path2 !== "string") { return ""; } @@ -2944,7 +3090,7 @@ var require_basename = __commonJS({ } } return path2 === ".." || path2 === "." ? "" : path2; - }; + }, "basename"); } }); @@ -2988,6 +3134,7 @@ var require_multipart = __commonJS({ self2.end(); } } + __name(checkFinished, "checkFinished"); if (typeof boundary !== "string") { throw new Error("Multipart: Boundary not found"); } @@ -3024,7 +3171,7 @@ var require_multipart = __commonJS({ self2._cb = void 0; cb(); } - }).on("part", function onPart(part) { + }).on("part", /* @__PURE__ */ __name(function onPart(part) { if (++self2._nparts > partsLimit) { self2.parser.removeListener("part", onPart); self2.parser.on("part", skipPart); @@ -3125,7 +3272,7 @@ var require_multipart = __commonJS({ } }; boy.emit("file", fieldname, file, filename, encoding, contype); - onData = function(data) { + onData = /* @__PURE__ */ __name(function(data) { if ((nsize += data.length) > fileSizeLimit) { const extralen = fileSizeLimit - nsize + data.length; if (extralen > 0) { @@ -3140,11 +3287,11 @@ var require_multipart = __commonJS({ self2._pause = true; } file.bytesRead = nsize; - }; - onEnd = function() { + }, "onData"); + onEnd = /* @__PURE__ */ __name(function() { curFile = void 0; file.push(null); - }; + }, "onEnd"); } else { if (nfields === fieldsLimit) { if (!boy.hitFieldsLimit) { @@ -3158,7 +3305,7 @@ var require_multipart = __commonJS({ let buffer = ""; let truncated = false; curField = part; - onData = function(data) { + onData = /* @__PURE__ */ __name(function(data) { if ((nsize += data.length) > fieldSizeLimit) { const extralen = fieldSizeLimit - (nsize - data.length); buffer += data.toString("binary", 0, extralen); @@ -3167,8 +3314,8 @@ var require_multipart = __commonJS({ } else { buffer += data.toString("binary"); } - }; - onEnd = function() { + }, "onData"); + onEnd = /* @__PURE__ */ __name(function() { curField = void 0; if (buffer.length) { buffer = decodeText(buffer, "binary", charset); @@ -3176,7 +3323,7 @@ var require_multipart = __commonJS({ boy.emit("field", fieldname, buffer, false, truncated, encoding, contype); --nends; checkFinished(); - }; + }, "onEnd"); } part._readableState.sync = false; part.on("data", onData); @@ -3186,13 +3333,14 @@ var require_multipart = __commonJS({ curFile.emit("error", err); } }); - }).on("error", function(err) { + }, "onPart")).on("error", function(err) { boy.emit("error", err); }).on("finish", function() { finished = true; checkFinished(); }); } + __name(Multipart, "Multipart"); Multipart.prototype.write = function(chunk, cb) { const r = this.parser.write(chunk); if (r && !this._pause) { @@ -3216,11 +3364,13 @@ var require_multipart = __commonJS({ function skipPart(part) { part.resume(); } + __name(skipPart, "skipPart"); function FileStream(opts) { Readable.call(this, opts); this.bytesRead = 0; this.truncated = false; } + __name(FileStream, "FileStream"); inherits(FileStream, Readable); FileStream.prototype._read = function(n) { }; @@ -3366,6 +3516,7 @@ var require_Decoder = __commonJS({ function Decoder() { this.buffer = void 0; } + __name(Decoder, "Decoder"); Decoder.prototype.write = function(str) { str = str.replace(RE_PLUS, " "); let res = ""; @@ -3446,6 +3597,7 @@ var require_urlencoded = __commonJS({ this._valTrunc = false; this._hitLimit = false; } + __name(UrlEncoded, "UrlEncoded"); UrlEncoded.prototype.write = function(data, cb) { if (this._fields === this.fieldsLimit) { if (!this.boy.hitFieldsLimit) { @@ -3658,6 +3810,7 @@ var require_main = __commonJS({ this._parser = this.getParserByHeaders(headers); this._finished = false; } + __name(Busboy, "Busboy"); inherits(Busboy, WritableStream); Busboy.prototype.emit = function(ev) { if (ev === "finish") { @@ -3860,7 +4013,7 @@ var require_constants2 = __commonJS({ var channel; var structuredClone = globalThis.structuredClone ?? // https://github.com/nodejs/node/blob/b27ae24dcc4251bad726d9d84baf678d1f707fed/lib/internal/structured_clone.js // structuredClone was added in v17.0.0, but fetch supports v16.8 - function structuredClone2(value, options = void 0) { + /* @__PURE__ */ __name(function structuredClone2(value, options = void 0) { if (arguments.length === 0) { throw new TypeError("missing argument"); } @@ -3871,7 +4024,7 @@ var require_constants2 = __commonJS({ channel.port2.unref(); channel.port1.postMessage(value, options?.transfer); return receiveMessageOnPort(channel.port2).message; - }; + }, "structuredClone"); module2.exports = { DOMException: DOMException2, structuredClone, @@ -3908,6 +4061,7 @@ var require_global = __commonJS({ function getGlobalOrigin() { return globalThis[globalOrigin]; } + __name(getGlobalOrigin, "getGlobalOrigin"); function setGlobalOrigin(newOrigin) { if (newOrigin === void 0) { Object.defineProperty(globalThis, globalOrigin, { @@ -3929,6 +4083,7 @@ var require_global = __commonJS({ configurable: false }); } + __name(setGlobalOrigin, "setGlobalOrigin"); module2.exports = { getGlobalOrigin, setGlobalOrigin @@ -3959,6 +4114,7 @@ var require_util2 = __commonJS({ const length = urlList.length; return length === 0 ? null : urlList[length - 1].toString(); } + __name(responseURL, "responseURL"); function responseLocationURL(response, requestFragment) { if (!redirectStatusSet.has(response.status)) { return null; @@ -3972,9 +4128,11 @@ var require_util2 = __commonJS({ } return location; } + __name(responseLocationURL, "responseLocationURL"); function requestCurrentURL(request) { return request.urlList[request.urlList.length - 1]; } + __name(requestCurrentURL, "requestCurrentURL"); function requestBadPort(request) { const url = requestCurrentURL(request); if (urlIsHttpHttpsScheme(url) && badPortsSet.has(url.port)) { @@ -3982,9 +4140,11 @@ var require_util2 = __commonJS({ } return "allowed"; } + __name(requestBadPort, "requestBadPort"); function isErrorLike(object) { return object instanceof Error || (object?.constructor?.name === "Error" || object?.constructor?.name === "DOMException"); } + __name(isErrorLike, "isErrorLike"); function isValidReasonPhrase(statusText) { for (let i = 0; i < statusText.length; ++i) { const c = statusText.charCodeAt(i); @@ -3996,6 +4156,7 @@ var require_util2 = __commonJS({ } return true; } + __name(isValidReasonPhrase, "isValidReasonPhrase"); function isTokenCharCode(c) { switch (c) { case 34: @@ -4020,6 +4181,7 @@ var require_util2 = __commonJS({ return c >= 33 && c <= 126; } } + __name(isTokenCharCode, "isTokenCharCode"); function isValidHTTPToken(characters) { if (characters.length === 0) { return false; @@ -4031,9 +4193,11 @@ var require_util2 = __commonJS({ } return true; } + __name(isValidHTTPToken, "isValidHTTPToken"); function isValidHeaderName(potentialValue) { return isValidHTTPToken(potentialValue); } + __name(isValidHeaderName, "isValidHeaderName"); function isValidHeaderValue(potentialValue) { if (potentialValue.startsWith(" ") || potentialValue.startsWith(" ") || potentialValue.endsWith(" ") || potentialValue.endsWith(" ")) { return false; @@ -4043,6 +4207,7 @@ var require_util2 = __commonJS({ } return true; } + __name(isValidHeaderValue, "isValidHeaderValue"); function setRequestReferrerPolicyOnRedirect(request, actualResponse) { const { headersList } = actualResponse; const policyHeader = (headersList.get("referrer-policy") ?? "").split(","); @@ -4060,20 +4225,25 @@ var require_util2 = __commonJS({ request.referrerPolicy = policy; } } + __name(setRequestReferrerPolicyOnRedirect, "setRequestReferrerPolicyOnRedirect"); function crossOriginResourcePolicyCheck() { return "allowed"; } + __name(crossOriginResourcePolicyCheck, "crossOriginResourcePolicyCheck"); function corsCheck() { return "success"; } + __name(corsCheck, "corsCheck"); function TAOCheck() { return "success"; } + __name(TAOCheck, "TAOCheck"); function appendFetchMetadata(httpRequest) { let header = null; header = httpRequest.mode; httpRequest.headersList.set("sec-fetch-mode", header); } + __name(appendFetchMetadata, "appendFetchMetadata"); function appendRequestOriginHeader(request) { let serializedOrigin = request.origin; if (request.responseTainting === "cors" || request.mode === "websocket") { @@ -4104,9 +4274,11 @@ var require_util2 = __commonJS({ } } } + __name(appendRequestOriginHeader, "appendRequestOriginHeader"); function coarsenedSharedCurrentTime(crossOriginIsolatedCapability) { return performance2.now(); } + __name(coarsenedSharedCurrentTime, "coarsenedSharedCurrentTime"); function createOpaqueTimingInfo(timingInfo) { return { startTime: timingInfo.startTime ?? 0, @@ -4122,16 +4294,19 @@ var require_util2 = __commonJS({ finalConnectionTimingInfo: null }; } + __name(createOpaqueTimingInfo, "createOpaqueTimingInfo"); function makePolicyContainer() { return { referrerPolicy: "strict-origin-when-cross-origin" }; } + __name(makePolicyContainer, "makePolicyContainer"); function clonePolicyContainer(policyContainer) { return { referrerPolicy: policyContainer.referrerPolicy }; } + __name(clonePolicyContainer, "clonePolicyContainer"); function determineRequestsReferrer(request) { const policy = request.referrerPolicy; assert(policy); @@ -4177,6 +4352,7 @@ var require_util2 = __commonJS({ return isNonPotentiallyTrustWorthy ? "no-referrer" : referrerOrigin; } } + __name(determineRequestsReferrer, "determineRequestsReferrer"); function stripURLForReferrer(url, originOnly) { assert(url instanceof URL); if (url.protocol === "file:" || url.protocol === "about:" || url.protocol === "blank:") { @@ -4191,6 +4367,7 @@ var require_util2 = __commonJS({ } return url; } + __name(stripURLForReferrer, "stripURLForReferrer"); function isURLPotentiallyTrustworthy(url) { if (!(url instanceof URL)) { return false; @@ -4212,7 +4389,9 @@ var require_util2 = __commonJS({ } return false; } + __name(isOriginPotentiallyTrustworthy, "isOriginPotentiallyTrustworthy"); } + __name(isURLPotentiallyTrustworthy, "isURLPotentiallyTrustworthy"); function bytesMatch(bytes, metadataList) { if (crypto4 === void 0) { return true; @@ -4243,6 +4422,7 @@ var require_util2 = __commonJS({ } return false; } + __name(bytesMatch, "bytesMatch"); var parseHashWithOptions = /(?sha256|sha384|sha512)-((?[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i; function parseMetadata(metadata) { const result = []; @@ -4263,6 +4443,7 @@ var require_util2 = __commonJS({ } return result; } + __name(parseMetadata, "parseMetadata"); function getStrongestMetadata(metadataList) { let algorithm = metadataList[0].algo; if (algorithm[3] === "5") { @@ -4281,6 +4462,7 @@ var require_util2 = __commonJS({ } return algorithm; } + __name(getStrongestMetadata, "getStrongestMetadata"); function filterMetadataListByAlgorithm(metadataList, algorithm) { if (metadataList.length === 1) { return metadataList; @@ -4294,6 +4476,7 @@ var require_util2 = __commonJS({ metadataList.length = pos; return metadataList; } + __name(filterMetadataListByAlgorithm, "filterMetadataListByAlgorithm"); function compareBase64Mixed(actualValue, expectedValue) { if (actualValue.length !== expectedValue.length) { return false; @@ -4308,8 +4491,10 @@ var require_util2 = __commonJS({ } return true; } + __name(compareBase64Mixed, "compareBase64Mixed"); function tryUpgradeRequestToAPotentiallyTrustworthyURL(request) { } + __name(tryUpgradeRequestToAPotentiallyTrustworthyURL, "tryUpgradeRequestToAPotentiallyTrustworthyURL"); function sameOrigin(A, B) { if (A.origin === B.origin && A.origin === "null") { return true; @@ -4319,6 +4504,7 @@ var require_util2 = __commonJS({ } return false; } + __name(sameOrigin, "sameOrigin"); function createDeferredPromise() { let res; let rej; @@ -4328,12 +4514,15 @@ var require_util2 = __commonJS({ }); return { promise, resolve: res, reject: rej }; } + __name(createDeferredPromise, "createDeferredPromise"); function isAborted(fetchParams) { return fetchParams.controller.state === "aborted"; } + __name(isAborted, "isAborted"); function isCancelled(fetchParams) { return fetchParams.controller.state === "aborted" || fetchParams.controller.state === "terminated"; } + __name(isCancelled, "isCancelled"); var normalizeMethodRecord = { delete: "DELETE", DELETE: "DELETE", @@ -4352,6 +4541,7 @@ var require_util2 = __commonJS({ function normalizeMethod(method) { return normalizeMethodRecord[method.toLowerCase()] ?? method; } + __name(normalizeMethod, "normalizeMethod"); function serializeJavascriptValueToJSONString(value) { const result = JSON.stringify(value); if (result === void 0) { @@ -4360,6 +4550,7 @@ var require_util2 = __commonJS({ assert(typeof result === "string"); return result; } + __name(serializeJavascriptValueToJSONString, "serializeJavascriptValueToJSONString"); var esIteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())); function makeIterator(iterator, name, kind) { const object = { @@ -4391,6 +4582,7 @@ var require_util2 = __commonJS({ Object.setPrototypeOf(i, esIteratorPrototype); return Object.setPrototypeOf({}, i); } + __name(makeIterator, "makeIterator"); function iteratorResult(pair, kind) { let result; switch (kind) { @@ -4409,6 +4601,7 @@ var require_util2 = __commonJS({ } return { value: result, done: false }; } + __name(iteratorResult, "iteratorResult"); async function fullyReadBody(body, processBody, processBodyError) { const successSteps = processBody; const errorSteps = processBodyError; @@ -4426,6 +4619,7 @@ var require_util2 = __commonJS({ errorSteps(e); } } + __name(fullyReadBody, "fullyReadBody"); var ReadableStream = globalThis.ReadableStream; function isReadableStreamLike(stream) { if (!ReadableStream) { @@ -4433,6 +4627,7 @@ var require_util2 = __commonJS({ } return stream instanceof ReadableStream || stream[Symbol.toStringTag] === "ReadableStream" && typeof stream.tee === "function"; } + __name(isReadableStreamLike, "isReadableStreamLike"); var MAXIMUM_ARGUMENT_LENGTH = 65535; function isomorphicDecode(input) { if (input.length < MAXIMUM_ARGUMENT_LENGTH) { @@ -4440,6 +4635,7 @@ var require_util2 = __commonJS({ } return input.reduce((previous, current) => previous + String.fromCharCode(current), ""); } + __name(isomorphicDecode, "isomorphicDecode"); function readableStreamClose(controller) { try { controller.close(); @@ -4449,12 +4645,14 @@ var require_util2 = __commonJS({ } } } + __name(readableStreamClose, "readableStreamClose"); function isomorphicEncode(input) { for (let i = 0; i < input.length; i++) { assert(input.charCodeAt(i) <= 255); } return input; } + __name(isomorphicEncode, "isomorphicEncode"); async function readAllBytes(reader) { const bytes = []; let byteLength = 0; @@ -4470,22 +4668,26 @@ var require_util2 = __commonJS({ byteLength += chunk.length; } } + __name(readAllBytes, "readAllBytes"); function urlIsLocal(url) { assert("protocol" in url); const protocol = url.protocol; return protocol === "about:" || protocol === "blob:" || protocol === "data:"; } + __name(urlIsLocal, "urlIsLocal"); function urlHasHttpsScheme(url) { if (typeof url === "string") { return url.startsWith("https:"); } return url.protocol === "https:"; } + __name(urlHasHttpsScheme, "urlHasHttpsScheme"); function urlIsHttpHttpsScheme(url) { assert("protocol" in url); const protocol = url.protocol; return protocol === "http:" || protocol === "https:"; } + __name(urlIsHttpHttpsScheme, "urlIsHttpHttpsScheme"); var hasOwn = Object.hasOwn || ((dict, key) => Object.prototype.hasOwnProperty.call(dict, key)); module2.exports = { isAborted, @@ -4968,6 +5170,7 @@ var require_dataURL = __commonJS({ } return { mimeType: mimeTypeRecord, body }; } + __name(dataURLProcessor, "dataURLProcessor"); function URLSerializer(url, excludeFragment = false) { if (!excludeFragment) { return url.href; @@ -4976,6 +5179,7 @@ var require_dataURL = __commonJS({ const hashLength = url.hash.length; return hashLength === 0 ? href : href.substring(0, href.length - hashLength); } + __name(URLSerializer, "URLSerializer"); function collectASequenceOfCodePoints(condition, input, position) { let result = ""; while (position.position < input.length && condition(input[position.position])) { @@ -4984,6 +5188,7 @@ var require_dataURL = __commonJS({ } return result; } + __name(collectASequenceOfCodePoints, "collectASequenceOfCodePoints"); function collectASequenceOfCodePointsFast(char, input, position) { const idx = input.indexOf(char, position.position); const start = position.position; @@ -4994,10 +5199,12 @@ var require_dataURL = __commonJS({ position.position = idx; return input.slice(start, position.position); } + __name(collectASequenceOfCodePointsFast, "collectASequenceOfCodePointsFast"); function stringPercentDecode(input) { const bytes = encoder.encode(input); return percentDecode(bytes); } + __name(stringPercentDecode, "stringPercentDecode"); function percentDecode(input) { const output = []; for (let i = 0; i < input.length; i++) { @@ -5015,6 +5222,7 @@ var require_dataURL = __commonJS({ } return Uint8Array.from(output); } + __name(percentDecode, "percentDecode"); function parseMIMEType(input) { input = removeHTTPWhitespace(input, true, true); const position = { position: 0 }; @@ -5097,6 +5305,7 @@ var require_dataURL = __commonJS({ } return mimeType; } + __name(parseMIMEType, "parseMIMEType"); function forgivingBase64(data) { data = data.replace(/[\u0009\u000A\u000C\u000D\u0020]/g, ""); if (data.length % 4 === 0) { @@ -5115,6 +5324,7 @@ var require_dataURL = __commonJS({ } return bytes; } + __name(forgivingBase64, "forgivingBase64"); function collectAnHTTPQuotedString(input, position, extractValue) { const positionStart = position.position; let value = ""; @@ -5148,6 +5358,7 @@ var require_dataURL = __commonJS({ } return input.slice(positionStart, position.position); } + __name(collectAnHTTPQuotedString, "collectAnHTTPQuotedString"); function serializeAMimeType(mimeType) { assert(mimeType !== "failure"); const { parameters, essence } = mimeType; @@ -5165,9 +5376,11 @@ var require_dataURL = __commonJS({ } return serialization; } + __name(serializeAMimeType, "serializeAMimeType"); function isHTTPWhiteSpace(char) { return char === "\r" || char === "\n" || char === " " || char === " "; } + __name(isHTTPWhiteSpace, "isHTTPWhiteSpace"); function removeHTTPWhitespace(str, leading = true, trailing = true) { let lead = 0; let trail = str.length - 1; @@ -5179,9 +5392,11 @@ var require_dataURL = __commonJS({ } return str.slice(lead, trail + 1); } + __name(removeHTTPWhitespace, "removeHTTPWhitespace"); function isASCIIWhitespace(char) { return char === "\r" || char === "\n" || char === " " || char === "\f" || char === " "; } + __name(isASCIIWhitespace, "isASCIIWhitespace"); function removeASCIIWhitespace(str, leading = true, trailing = true) { let lead = 0; let trail = str.length - 1; @@ -5193,6 +5408,7 @@ var require_dataURL = __commonJS({ } return str.slice(lead, trail + 1); } + __name(removeASCIIWhitespace, "removeASCIIWhitespace"); module2.exports = { dataURLProcessor, URLSerializer, @@ -5219,6 +5435,9 @@ var require_file = __commonJS({ var { kEnumerableProperty } = require_util(); var encoder = new TextEncoder(); var File = class _File extends Blob2 { + static { + __name(this, "File"); + } constructor(fileBits, fileName, options = {}) { webidl.argumentLengthCheck(arguments, 2, { header: "File constructor" }); fileBits = webidl.converters["sequence"](fileBits); @@ -5259,6 +5478,9 @@ var require_file = __commonJS({ } }; var FileLike = class _FileLike { + static { + __name(this, "FileLike"); + } constructor(blobLike, fileName, options = {}) { const n = fileName; const t = options.type; @@ -5344,14 +5566,14 @@ var require_file = __commonJS({ }, { key: "endings", - converter: (value) => { + converter: /* @__PURE__ */ __name((value) => { value = webidl.converters.DOMString(value); value = value.toLowerCase(); if (value !== "native") { value = "transparent"; } return value; - }, + }, "converter"), defaultValue: "transparent" } ]); @@ -5378,6 +5600,7 @@ var require_file = __commonJS({ } return bytes; } + __name(processBlobParts, "processBlobParts"); function convertLineEndingsNative(s) { let nativeLineEnding = "\n"; if (process.platform === "win32") { @@ -5385,9 +5608,11 @@ var require_file = __commonJS({ } return s.replace(/\r?\n/g, nativeLineEnding); } + __name(convertLineEndingsNative, "convertLineEndingsNative"); function isFileLike(object) { return NativeFile && object instanceof NativeFile || object instanceof File || object && (typeof object.stream === "function" || typeof object.arrayBuffer === "function") && object[Symbol.toStringTag] === "File"; } + __name(isFileLike, "isFileLike"); module2.exports = { File, FileLike, isFileLike }; } }); @@ -5403,6 +5628,9 @@ var require_formdata = __commonJS({ var { Blob: Blob2, File: NativeFile } = require("buffer"); var File = NativeFile ?? UndiciFile; var FormData = class _FormData { + static { + __name(this, "FormData"); + } constructor(form) { if (form !== void 0) { throw webidl.errors.conversionFailed({ @@ -5544,6 +5772,7 @@ var require_formdata = __commonJS({ } return { name, value }; } + __name(makeEntry, "makeEntry"); module2.exports = { FormData }; } }); @@ -5618,8 +5847,8 @@ var require_body = __commonJS({ const boundary = `----formdata-undici-0${`${Math.floor(Math.random() * 1e11)}`.padStart(11, "0")}`; const prefix = `--${boundary}\r Content-Disposition: form-data`; - const escape = (str) => str.replace(/\n/g, "%0A").replace(/\r/g, "%0D").replace(/"/g, "%22"); - const normalizeLinefeeds = (value) => value.replace(/\r?\n|\r/g, "\r\n"); + const escape = /* @__PURE__ */ __name((str) => str.replace(/\n/g, "%0A").replace(/\r/g, "%0D").replace(/"/g, "%22"), "escape"); + const normalizeLinefeeds = /* @__PURE__ */ __name((value) => value.replace(/\r?\n|\r/g, "\r\n"), "normalizeLinefeeds"); const blobParts = []; const rn = new Uint8Array([13, 10]); length = 0; @@ -5652,7 +5881,7 @@ Content-Type: ${value.type || "application/octet-stream"}\r length = null; } source = object; - action = async function* () { + action = /* @__PURE__ */ __name(async function* () { for (const part of blobParts) { if (part.stream) { yield* part.stream(); @@ -5660,7 +5889,7 @@ Content-Type: ${value.type || "application/octet-stream"}\r yield part; } } - }; + }, "action"); type = "multipart/form-data; boundary=" + boundary; } else if (isBlobLike(object)) { source = object; @@ -5710,6 +5939,7 @@ Content-Type: ${value.type || "application/octet-stream"}\r const body = { stream, source, length }; return [body, type]; } + __name(extractBody, "extractBody"); function safelyExtractBody(object, keepalive = false) { if (!ReadableStream) { ReadableStream = require("stream/web").ReadableStream; @@ -5720,6 +5950,7 @@ Content-Type: ${value.type || "application/octet-stream"}\r } return extractBody(object, keepalive); } + __name(safelyExtractBody, "safelyExtractBody"); function cloneBody(body) { const [out1, out2] = body.stream.tee(); const out2Clone = structuredClone(out2, { transfer: [out2] }); @@ -5731,6 +5962,7 @@ Content-Type: ${value.type || "application/octet-stream"}\r source: body.source }; } + __name(cloneBody, "cloneBody"); async function* consumeBody(body) { if (body) { if (isUint8Array(body)) { @@ -5748,11 +5980,13 @@ Content-Type: ${value.type || "application/octet-stream"}\r } } } + __name(consumeBody, "consumeBody"); function throwIfAborted(state) { if (state.aborted) { throw new DOMException2("The operation was aborted.", "AbortError"); } } + __name(throwIfAborted, "throwIfAborted"); function bodyMixinMethods(instance) { const methods = { blob() { @@ -5861,9 +6095,11 @@ Content-Type: ${value.type || "application/octet-stream"}\r }; return methods; } + __name(bodyMixinMethods, "bodyMixinMethods"); function mixinBody(prototype) { Object.assign(prototype.prototype, bodyMixinMethods(prototype)); } + __name(mixinBody, "mixinBody"); async function specConsumeBody(object, convertBytesToJSValue, instance) { webidl.brandCheck(object, instance); throwIfAborted(object[kState]); @@ -5871,14 +6107,14 @@ Content-Type: ${value.type || "application/octet-stream"}\r throw new TypeError("Body is unusable"); } const promise = createDeferredPromise(); - const errorSteps = (error) => promise.reject(error); - const successSteps = (data) => { + const errorSteps = /* @__PURE__ */ __name((error) => promise.reject(error), "errorSteps"); + const successSteps = /* @__PURE__ */ __name((data) => { try { promise.resolve(convertBytesToJSValue(data)); } catch (e) { errorSteps(e); } - }; + }, "successSteps"); if (object[kState].body == null) { successSteps(new Uint8Array()); return promise.promise; @@ -5886,9 +6122,11 @@ Content-Type: ${value.type || "application/octet-stream"}\r await fullyReadBody(object[kState].body, successSteps, errorSteps); return promise.promise; } + __name(specConsumeBody, "specConsumeBody"); function bodyUnusable(body) { return body != null && (body.stream.locked || util.isDisturbed(body.stream)); } + __name(bodyUnusable, "bodyUnusable"); function utf8DecodeBytes(buffer) { if (buffer.length === 0) { return ""; @@ -5899,9 +6137,11 @@ Content-Type: ${value.type || "application/octet-stream"}\r const output = textDecoder.decode(buffer); return output; } + __name(utf8DecodeBytes, "utf8DecodeBytes"); function parseJSONFromBytes(bytes) { return JSON.parse(utf8DecodeBytes(bytes)); } + __name(parseJSONFromBytes, "parseJSONFromBytes"); function bodyMimeType(object) { const { headersList } = object[kState]; const contentType = headersList.get("content-type"); @@ -5910,6 +6150,7 @@ Content-Type: ${value.type || "application/octet-stream"}\r } return parseMIMEType(contentType); } + __name(bodyMimeType, "bodyMimeType"); module2.exports = { extractBody, safelyExtractBody, @@ -5951,6 +6192,9 @@ var require_request = __commonJS({ channels.error = { hasSubscribers: false }; } var Request = class _Request { + static { + __name(this, "Request"); + } constructor(origin, { path: path2, method, @@ -6004,9 +6248,9 @@ var require_request = __commonJS({ this.body = body; const rState = this.body._readableState; if (!rState || !rState.autoDestroy) { - this.endHandler = function autoDestroy() { + this.endHandler = /* @__PURE__ */ __name(function autoDestroy() { util.destroy(this); - }; + }, "autoDestroy"); this.body.on("end", this.endHandler); } this.errorHandler = (err) => { @@ -6232,6 +6476,7 @@ var require_request = __commonJS({ return skipAppend ? val : `${key}: ${val}\r `; } + __name(processHeaderValue, "processHeaderValue"); function processHeader(request, key, val, skipAppend = false) { if (val && (typeof val === "object" && !Array.isArray(val))) { throw new InvalidArgumentError(`invalid ${key} header`); @@ -6285,6 +6530,7 @@ var require_request = __commonJS({ } } } + __name(processHeader, "processHeader"); module2.exports = Request; } }); @@ -6295,6 +6541,9 @@ var require_dispatcher = __commonJS({ "use strict"; var EventEmitter = require("events"); var Dispatcher = class extends EventEmitter { + static { + __name(this, "Dispatcher"); + } dispatch() { throw new Error("not implemented"); } @@ -6326,6 +6575,9 @@ var require_dispatcher_base = __commonJS({ var kOnClosed = Symbol("onClosed"); var kInterceptedDispatch = Symbol("Intercepted Dispatch"); var DispatcherBase = class extends Dispatcher { + static { + __name(this, "DispatcherBase"); + } constructor() { super(); this[kDestroyed] = false; @@ -6378,13 +6630,13 @@ var require_dispatcher_base = __commonJS({ } this[kClosed] = true; this[kOnClosed].push(callback); - const onClosed = () => { + const onClosed = /* @__PURE__ */ __name(() => { const callbacks = this[kOnClosed]; this[kOnClosed] = null; for (let i = 0; i < callbacks.length; i++) { callbacks[i](null, null); } - }; + }, "onClosed"); this[kClose]().then(() => this.destroy()).then(() => { queueMicrotask(onClosed); }); @@ -6421,13 +6673,13 @@ var require_dispatcher_base = __commonJS({ this[kDestroyed] = true; this[kOnDestroyed] = this[kOnDestroyed] || []; this[kOnDestroyed].push(callback); - const onDestroyed = () => { + const onDestroyed = /* @__PURE__ */ __name(() => { const callbacks = this[kOnDestroyed]; this[kOnDestroyed] = null; for (let i = 0; i < callbacks.length; i++) { callbacks[i](null, null); } - }; + }, "onDestroyed"); this[kDestroy](err).then(() => { queueMicrotask(onDestroyed); }); @@ -6484,6 +6736,9 @@ var require_connect = __commonJS({ var SessionCache; if (global.FinalizationRegistry && !process.env.NODE_V8_COVERAGE) { SessionCache = class WeakSessionCache { + static { + __name(this, "WeakSessionCache"); + } constructor(maxCachedSessions) { this._maxCachedSessions = maxCachedSessions; this._sessionCache = /* @__PURE__ */ new Map(); @@ -6511,6 +6766,9 @@ var require_connect = __commonJS({ }; } else { SessionCache = class SimpleSessionCache { + static { + __name(this, "SimpleSessionCache"); + } constructor(maxCachedSessions) { this._maxCachedSessions = maxCachedSessions; this._sessionCache = /* @__PURE__ */ new Map(); @@ -6538,7 +6796,7 @@ var require_connect = __commonJS({ const sessionCache = new SessionCache(maxCachedSessions == null ? 100 : maxCachedSessions); timeout = timeout == null ? 1e4 : timeout; allowH2 = allowH2 != null ? allowH2 : false; - return function connect({ hostname, host, protocol, port, servername, localAddress, httpSocket }, callback) { + return /* @__PURE__ */ __name(function connect({ hostname, host, protocol, port, servername, localAddress, httpSocket }, callback) { let socket; if (protocol === "https:") { if (!tls) { @@ -6597,8 +6855,9 @@ var require_connect = __commonJS({ } }); return socket; - }; + }, "connect"); } + __name(buildConnector, "buildConnector"); function setupTimeout(onConnectTimeout2, timeout) { if (!timeout) { return () => { @@ -6621,9 +6880,11 @@ var require_connect = __commonJS({ clearImmediate(s2); }; } + __name(setupTimeout, "setupTimeout"); function onConnectTimeout(socket) { util.destroy(socket, new ConnectTimeoutError()); } + __name(onConnectTimeout, "onConnectTimeout"); module2.exports = buildConnector; } }); @@ -6644,6 +6905,7 @@ var require_utils2 = __commonJS({ }); return res; } + __name(enumToMap, "enumToMap"); exports2.enumToMap = enumToMap; } }); @@ -6981,6 +7243,9 @@ var require_RedirectHandler = __commonJS({ var redirectableStatusCodes = [300, 301, 302, 303, 307, 308]; var kBody = Symbol("body"); var BodyAsyncIterable = class { + static { + __name(this, "BodyAsyncIterable"); + } constructor(body) { this[kBody] = body; this[kBodyUsed] = false; @@ -6992,6 +7257,9 @@ var require_RedirectHandler = __commonJS({ } }; var RedirectHandler = class { + static { + __name(this, "RedirectHandler"); + } constructor(dispatch, maxRedirections, opts, handler) { if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) { throw new InvalidArgumentError("maxRedirections must be a positive number"); @@ -7083,6 +7351,7 @@ var require_RedirectHandler = __commonJS({ } } } + __name(parseLocation, "parseLocation"); function shouldRemoveHeader(header, removeContent, unknownOrigin) { if (header.length === 4) { return util.headerNameToString(header) === "host"; @@ -7096,6 +7365,7 @@ var require_RedirectHandler = __commonJS({ } return false; } + __name(shouldRemoveHeader, "shouldRemoveHeader"); function cleanRequestHeaders(headers, removeContent, unknownOrigin) { const ret = []; if (Array.isArray(headers)) { @@ -7115,6 +7385,7 @@ var require_RedirectHandler = __commonJS({ } return ret; } + __name(cleanRequestHeaders, "cleanRequestHeaders"); module2.exports = RedirectHandler; } }); @@ -7126,7 +7397,7 @@ var require_redirectInterceptor = __commonJS({ var RedirectHandler = require_RedirectHandler(); function createRedirectInterceptor({ maxRedirections: defaultMaxRedirections }) { return (dispatch) => { - return function Intercept(opts, handler) { + return /* @__PURE__ */ __name(function Intercept(opts, handler) { const { maxRedirections = defaultMaxRedirections } = opts; if (!maxRedirections) { return dispatch(opts, handler); @@ -7134,9 +7405,10 @@ var require_redirectInterceptor = __commonJS({ const redirectHandler = new RedirectHandler(dispatch, maxRedirections, opts, handler); opts = { ...opts, maxRedirections: 0 }; return dispatch(opts, redirectHandler); - }; + }, "Intercept"); }; } + __name(createRedirectInterceptor, "createRedirectInterceptor"); module2.exports = createRedirectInterceptor; } }); @@ -7268,6 +7540,9 @@ var require_client = __commonJS({ channels.connected = { hasSubscribers: false }; } var Client = class extends DispatcherBase { + static { + __name(this, "Client"); + } /** * * @param {string|URL} url @@ -7475,13 +7750,13 @@ var require_client = __commonJS({ const request = requests[i]; errorRequest(this, request, err); } - const callback = () => { + const callback = /* @__PURE__ */ __name(() => { if (this[kClosedResolve]) { this[kClosedResolve](); this[kClosedResolve] = null; } resolve(); - }; + }, "callback"); if (this[kHTTP2Session] != null) { util.destroy(this[kHTTP2Session], err); this[kHTTP2Session] = null; @@ -7501,6 +7776,7 @@ var require_client = __commonJS({ this[kSocket][kError] = err; onError(this[kClient], err); } + __name(onHttp2SessionError, "onHttp2SessionError"); function onHttp2FrameError(type, code, id) { const err = new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`); if (id === 0) { @@ -7508,10 +7784,12 @@ var require_client = __commonJS({ onError(this[kClient], err); } } + __name(onHttp2FrameError, "onHttp2FrameError"); function onHttp2SessionEnd() { util.destroy(this, new SocketError("other side closed")); util.destroy(this[kSocket], new SocketError("other side closed")); } + __name(onHttp2SessionEnd, "onHttp2SessionEnd"); function onHTTP2GoAway(code) { const client = this[kClient]; const err = new InformationalError(`HTTP/2: "GOAWAY" frame received with code ${code}`); @@ -7539,6 +7817,7 @@ var require_client = __commonJS({ ); resume(client); } + __name(onHTTP2GoAway, "onHTTP2GoAway"); var constants = require_constants3(); var createRedirectInterceptor = require_redirectInterceptor(); var EMPTY_BUF = Buffer.alloc(0); @@ -7553,45 +7832,46 @@ var require_client = __commonJS({ return await WebAssembly.instantiate(mod, { env: { /* eslint-disable camelcase */ - wasm_on_url: (p, at, len) => { + wasm_on_url: /* @__PURE__ */ __name((p, at, len) => { return 0; - }, - wasm_on_status: (p, at, len) => { + }, "wasm_on_url"), + wasm_on_status: /* @__PURE__ */ __name((p, at, len) => { assert.strictEqual(currentParser.ptr, p); const start = at - currentBufferPtr + currentBufferRef.byteOffset; return currentParser.onStatus(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; - }, - wasm_on_message_begin: (p) => { + }, "wasm_on_status"), + wasm_on_message_begin: /* @__PURE__ */ __name((p) => { assert.strictEqual(currentParser.ptr, p); return currentParser.onMessageBegin() || 0; - }, - wasm_on_header_field: (p, at, len) => { + }, "wasm_on_message_begin"), + wasm_on_header_field: /* @__PURE__ */ __name((p, at, len) => { assert.strictEqual(currentParser.ptr, p); const start = at - currentBufferPtr + currentBufferRef.byteOffset; return currentParser.onHeaderField(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; - }, - wasm_on_header_value: (p, at, len) => { + }, "wasm_on_header_field"), + wasm_on_header_value: /* @__PURE__ */ __name((p, at, len) => { assert.strictEqual(currentParser.ptr, p); const start = at - currentBufferPtr + currentBufferRef.byteOffset; return currentParser.onHeaderValue(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; - }, - wasm_on_headers_complete: (p, statusCode, upgrade, shouldKeepAlive) => { + }, "wasm_on_header_value"), + wasm_on_headers_complete: /* @__PURE__ */ __name((p, statusCode, upgrade, shouldKeepAlive) => { assert.strictEqual(currentParser.ptr, p); return currentParser.onHeadersComplete(statusCode, Boolean(upgrade), Boolean(shouldKeepAlive)) || 0; - }, - wasm_on_body: (p, at, len) => { + }, "wasm_on_headers_complete"), + wasm_on_body: /* @__PURE__ */ __name((p, at, len) => { assert.strictEqual(currentParser.ptr, p); const start = at - currentBufferPtr + currentBufferRef.byteOffset; return currentParser.onBody(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; - }, - wasm_on_message_complete: (p) => { + }, "wasm_on_body"), + wasm_on_message_complete: /* @__PURE__ */ __name((p) => { assert.strictEqual(currentParser.ptr, p); return currentParser.onMessageComplete() || 0; - } + }, "wasm_on_message_complete") /* eslint-enable camelcase */ } }); } + __name(lazyllhttp, "lazyllhttp"); var llhttpInstance = null; var llhttpPromise = lazyllhttp(); llhttpPromise.catch(); @@ -7603,6 +7883,9 @@ var require_client = __commonJS({ var TIMEOUT_BODY = 2; var TIMEOUT_IDLE = 3; var Parser = class { + static { + __name(this, "Parser"); + } constructor(client, socket, { exports: exports3 }) { assert(Number.isFinite(client[kMaxHeadersSize]) && client[kMaxHeadersSize] > 0); this.llhttp = exports3; @@ -7967,12 +8250,14 @@ var require_client = __commonJS({ util.destroy(socket, new InformationalError("socket idle timeout")); } } + __name(onParserTimeout, "onParserTimeout"); function onSocketReadable() { const { [kParser]: parser } = this; if (parser) { parser.readMore(); } } + __name(onSocketReadable, "onSocketReadable"); function onSocketError(err) { const { [kClient]: client, [kParser]: parser } = this; assert(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); @@ -7985,6 +8270,7 @@ var require_client = __commonJS({ this[kError] = err; onError(this[kClient], err); } + __name(onSocketError, "onSocketError"); function onError(client, err) { if (client[kRunning] === 0 && err.code !== "UND_ERR_INFO" && err.code !== "UND_ERR_SOCKET") { assert(client[kPendingIdx] === client[kRunningIdx]); @@ -7996,6 +8282,7 @@ var require_client = __commonJS({ assert(client[kSize] === 0); } } + __name(onError, "onError"); function onSocketEnd() { const { [kParser]: parser, [kClient]: client } = this; if (client[kHTTPConnVersion] !== "h2") { @@ -8006,6 +8293,7 @@ var require_client = __commonJS({ } util.destroy(this, new SocketError("other side closed", util.getSocketInfo(this))); } + __name(onSocketEnd, "onSocketEnd"); function onSocketClose() { const { [kClient]: client, [kParser]: parser } = this; if (client[kHTTPConnVersion] === "h1" && parser) { @@ -8034,6 +8322,7 @@ var require_client = __commonJS({ client.emit("disconnect", client[kUrl], [client], err); resume(client); } + __name(onSocketClose, "onSocketClose"); async function connect(client) { assert(!client[kConnecting]); assert(!client[kSocket]); @@ -8092,7 +8381,7 @@ var require_client = __commonJS({ }); } const session = http2.connect(client[kUrl], { - createConnection: () => socket, + createConnection: /* @__PURE__ */ __name(() => socket, "createConnection"), peerMaxConcurrentStreams: client[kHTTP2SessionState].maxConcurrentStreams }); client[kHTTPConnVersion] = "h2"; @@ -8170,10 +8459,12 @@ var require_client = __commonJS({ } resume(client); } + __name(connect, "connect"); function emitDrain(client) { client[kNeedDrain] = 0; client.emit("drain", client[kUrl], [client]); } + __name(emitDrain, "emitDrain"); function resume(client, sync) { if (client[kResuming] === 2) { return; @@ -8187,6 +8478,7 @@ var require_client = __commonJS({ client[kRunningIdx] = 0; } } + __name(resume, "resume"); function _resume(client, sync) { while (true) { if (client.destroyed) { @@ -8275,9 +8567,11 @@ var require_client = __commonJS({ } } } + __name(_resume, "_resume"); function shouldSendContentLength(method) { return method !== "GET" && method !== "HEAD" && method !== "OPTIONS" && method !== "TRACE" && method !== "CONNECT"; } + __name(shouldSendContentLength, "shouldSendContentLength"); function write(client, request) { if (client[kHTTPConnVersion] === "h2") { writeH2(client, client[kHTTP2Session], request); @@ -8395,6 +8689,7 @@ upgrade: ${upgrade}\r } return true; } + __name(write, "write"); function writeH2(client, session, request) { const { body, method, path: path2, host, upgrade, expectContinue, signal, headers: reqHeaders } = request; let headers; @@ -8573,13 +8868,16 @@ upgrade: ${upgrade}\r assert(false); } } + __name(writeBodyH2, "writeBodyH2"); } + __name(writeH2, "writeH2"); function writeStream({ h2stream, body, client, request, socket, contentLength, header, expectsPayload }) { assert(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined"); if (client[kHTTPConnVersion] === "h2") { let onPipeData = function(chunk) { request.onBodySent(chunk); }; + __name(onPipeData, "onPipeData"); const pipe = pipeline( body, h2stream, @@ -8601,7 +8899,7 @@ upgrade: ${upgrade}\r } let finished = false; const writer = new AsyncWriter({ socket, request, contentLength, client, expectsPayload, header }); - const onData = function(chunk) { + const onData = /* @__PURE__ */ __name(function(chunk) { if (finished) { return; } @@ -8612,23 +8910,23 @@ upgrade: ${upgrade}\r } catch (err) { util.destroy(this, err); } - }; - const onDrain = function() { + }, "onData"); + const onDrain = /* @__PURE__ */ __name(function() { if (finished) { return; } if (body.resume) { body.resume(); } - }; - const onAbort = function() { + }, "onDrain"); + const onAbort = /* @__PURE__ */ __name(function() { if (finished) { return; } const err = new RequestAbortedError(); queueMicrotask(() => onFinished(err)); - }; - const onFinished = function(err) { + }, "onAbort"); + const onFinished = /* @__PURE__ */ __name(function(err) { if (finished) { return; } @@ -8649,13 +8947,14 @@ upgrade: ${upgrade}\r } else { util.destroy(body); } - }; + }, "onFinished"); body.on("data", onData).on("end", onFinished).on("error", onFinished).on("close", onAbort); if (body.resume) { body.resume(); } socket.on("drain", onDrain).on("error", onFinished); } + __name(writeStream, "writeStream"); async function writeBlob({ h2stream, body, client, request, socket, contentLength, header, expectsPayload }) { assert(contentLength === body.size, "blob body must have content length"); const isH2 = client[kHTTPConnVersion] === "h2"; @@ -8686,6 +8985,7 @@ upgrade: ${upgrade}\r util.destroy(isH2 ? h2stream : socket, err); } } + __name(writeBlob, "writeBlob"); async function writeIterable({ h2stream, body, client, request, socket, contentLength, header, expectsPayload }) { assert(contentLength !== 0 || client[kRunning] === 0, "iterator body cannot be pipelined"); let callback = null; @@ -8696,14 +8996,15 @@ upgrade: ${upgrade}\r cb(); } } - const waitForDrain = () => new Promise((resolve, reject) => { + __name(onDrain, "onDrain"); + const waitForDrain = /* @__PURE__ */ __name(() => new Promise((resolve, reject) => { assert(callback === null); if (socket[kError]) { reject(socket[kError]); } else { callback = resolve; } - }); + }), "waitForDrain"); if (client[kHTTPConnVersion] === "h2") { h2stream.on("close", onDrain).on("drain", onDrain); try { @@ -8744,7 +9045,11 @@ upgrade: ${upgrade}\r socket.off("close", onDrain).off("drain", onDrain); } } + __name(writeIterable, "writeIterable"); var AsyncWriter = class { + static { + __name(this, "AsyncWriter"); + } constructor({ socket, request, contentLength, client, expectsPayload, header }) { this.socket = socket; this.request = request; @@ -8858,6 +9163,7 @@ ${len.toString(16)}\r client.emit("error", err2); } } + __name(errorRequest, "errorRequest"); module2.exports = Client; } }); @@ -8869,6 +9175,9 @@ var require_fixed_queue = __commonJS({ var kSize = 2048; var kMask = kSize - 1; var FixedCircularBuffer = class { + static { + __name(this, "FixedCircularBuffer"); + } constructor() { this.bottom = 0; this.top = 0; @@ -8895,6 +9204,9 @@ var require_fixed_queue = __commonJS({ } }; module2.exports = class FixedQueue { + static { + __name(this, "FixedQueue"); + } constructor() { this.head = this.tail = new FixedCircularBuffer(); } @@ -8925,6 +9237,9 @@ var require_pool_stats = __commonJS({ var { kFree, kConnected, kPending, kQueued, kRunning, kSize } = require_symbols(); var kPool = Symbol("pool"); var PoolStats = class { + static { + __name(this, "PoolStats"); + } constructor(pool) { this[kPool] = pool; } @@ -8972,13 +9287,16 @@ var require_pool_base = __commonJS({ var kRemoveClient = Symbol("remove client"); var kStats = Symbol("stats"); var PoolBase = class extends DispatcherBase { + static { + __name(this, "PoolBase"); + } constructor() { super(); this[kQueue] = new FixedQueue(); this[kClients] = []; this[kQueued] = 0; const pool = this; - this[kOnDrain] = function onDrain(origin, targets) { + this[kOnDrain] = /* @__PURE__ */ __name(function onDrain(origin, targets) { const queue = pool[kQueue]; let needDrain = false; while (!needDrain) { @@ -8997,7 +9315,7 @@ var require_pool_base = __commonJS({ if (pool[kClosedResolve] && queue.isEmpty()) { Promise.all(pool[kClients].map((c) => c.close())).then(pool[kClosedResolve]); } - }; + }, "onDrain"); this[kOnConnect] = (origin, targets) => { pool.emit("connect", origin, [pool, ...targets]); }; @@ -9130,7 +9448,11 @@ var require_pool = __commonJS({ function defaultFactory(origin, opts) { return new Client(origin, opts); } + __name(defaultFactory, "defaultFactory"); var Pool = class extends PoolBase { + static { + __name(this, "Pool"); + } constructor(origin, { connections, factory = defaultFactory, @@ -9219,10 +9541,15 @@ var require_balanced_pool = __commonJS({ if (b === 0) return a; return getGreatestCommonDivisor(b, a % b); } + __name(getGreatestCommonDivisor, "getGreatestCommonDivisor"); function defaultFactory(origin, opts) { return new Pool(origin, opts); } + __name(defaultFactory, "defaultFactory"); var BalancedPool = class extends PoolBase { + static { + __name(this, "BalancedPool"); + } constructor(upstreams = [], { factory = defaultFactory, ...opts } = {}) { super(); this[kOptions] = opts; @@ -9329,6 +9656,9 @@ var require_dispatcher_weakref = __commonJS({ "use strict"; var { kConnected, kSize } = require_symbols(); var CompatWeakRef = class { + static { + __name(this, "CompatWeakRef"); + } constructor(value) { this.value = value; } @@ -9337,6 +9667,9 @@ var require_dispatcher_weakref = __commonJS({ } }; var CompatFinalizer = class { + static { + __name(this, "CompatFinalizer"); + } constructor(finalizer) { this.finalizer = finalizer; } @@ -9388,7 +9721,11 @@ var require_agent = __commonJS({ function defaultFactory(origin, opts) { return opts && opts.connections === 1 ? new Client(origin, opts) : new Pool(origin, opts); } + __name(defaultFactory, "defaultFactory"); var Agent = class extends DispatcherBase { + static { + __name(this, "Agent"); + } constructor({ factory = defaultFactory, maxRedirections = 0, connect, ...options } = {}) { super(); if (typeof factory !== "function") { @@ -9498,9 +9835,12 @@ var require_readable = __commonJS({ var kBody = Symbol("kBody"); var kAbort = Symbol("abort"); var kContentType = Symbol("kContentType"); - var noop = () => { - }; + var noop = /* @__PURE__ */ __name(() => { + }, "noop"); module2.exports = class BodyReadable extends Readable { + static { + __name(this, "BodyReadable"); + } constructor({ resume, abort, @@ -9640,9 +9980,11 @@ var require_readable = __commonJS({ function isLocked(self2) { return self2[kBody] && self2[kBody].locked === true || self2[kConsume]; } + __name(isLocked, "isLocked"); function isUnusable(self2) { return util.isDisturbed(self2) || isLocked(self2); } + __name(isUnusable, "isUnusable"); async function consume(stream, type) { if (isUnusable(stream)) { throw new TypeError("unusable"); @@ -9667,6 +10009,7 @@ var require_readable = __commonJS({ process.nextTick(consumeStart, stream[kConsume]); }); } + __name(consume, "consume"); function consumeStart(consume2) { if (consume2.body === null) { return; @@ -9686,6 +10029,7 @@ var require_readable = __commonJS({ while (consume2.stream.read() != null) { } } + __name(consumeStart, "consumeStart"); function consumeEnd(consume2) { const { type, body, resolve, stream, length } = consume2; try { @@ -9712,10 +10056,12 @@ var require_readable = __commonJS({ stream.destroy(err); } } + __name(consumeEnd, "consumeEnd"); function consumePush(consume2, chunk) { consume2.length += chunk.length; consume2.body.push(chunk); } + __name(consumePush, "consumePush"); function consumeFinish(consume2, err) { if (consume2.body === null) { return; @@ -9732,6 +10078,7 @@ var require_readable = __commonJS({ consume2.length = 0; consume2.body = null; } + __name(consumeFinish, "consumeFinish"); } }); @@ -9774,6 +10121,7 @@ var require_util3 = __commonJS({ } process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ""}`, statusCode, headers)); } + __name(getResolveErrorBodyCallback, "getResolveErrorBodyCallback"); module2.exports = { getResolveErrorBodyCallback }; } }); @@ -9792,6 +10140,7 @@ var require_abort_signal = __commonJS({ self2.onError(new RequestAbortedError()); } } + __name(abort, "abort"); function addSignal(self2, signal) { self2[kSignal] = null; self2[kListener] = null; @@ -9808,6 +10157,7 @@ var require_abort_signal = __commonJS({ }; addAbortListener(self2[kSignal], self2[kListener]); } + __name(addSignal, "addSignal"); function removeSignal(self2) { if (!self2[kSignal]) { return; @@ -9820,6 +10170,7 @@ var require_abort_signal = __commonJS({ self2[kSignal] = null; self2[kListener] = null; } + __name(removeSignal, "removeSignal"); module2.exports = { addSignal, removeSignal @@ -9841,6 +10192,9 @@ var require_api_request = __commonJS({ var { AsyncResource } = require("async_hooks"); var { addSignal, removeSignal } = require_abort_signal(); var RequestHandler = class extends AsyncResource { + static { + __name(this, "RequestHandler"); + } constructor(opts, callback) { if (!opts || typeof opts !== "object") { throw new InvalidArgumentError("invalid opts"); @@ -9976,6 +10330,7 @@ var require_api_request = __commonJS({ queueMicrotask(() => callback(err, { opaque })); } } + __name(request, "request"); module2.exports = request; module2.exports.RequestHandler = RequestHandler; } @@ -9996,6 +10351,9 @@ var require_api_stream = __commonJS({ var { AsyncResource } = require("async_hooks"); var { addSignal, removeSignal } = require_abort_signal(); var StreamHandler = class extends AsyncResource { + static { + __name(this, "StreamHandler"); + } constructor(opts, factory, callback) { if (!opts || typeof opts !== "object") { throw new InvalidArgumentError("invalid opts"); @@ -10151,6 +10509,7 @@ var require_api_stream = __commonJS({ queueMicrotask(() => callback(err, { opaque })); } } + __name(stream, "stream"); module2.exports = stream; } }); @@ -10175,6 +10534,9 @@ var require_api_pipeline = __commonJS({ var assert = require("assert"); var kResume = Symbol("resume"); var PipelineRequest = class extends Readable { + static { + __name(this, "PipelineRequest"); + } constructor() { super({ autoDestroy: true }); this[kResume] = null; @@ -10192,6 +10554,9 @@ var require_api_pipeline = __commonJS({ } }; var PipelineResponse = class extends Readable { + static { + __name(this, "PipelineResponse"); + } constructor(resume) { super({ autoDestroy: true }); this[kResume] = resume; @@ -10207,6 +10572,9 @@ var require_api_pipeline = __commonJS({ } }; var PipelineHandler = class extends AsyncResource { + static { + __name(this, "PipelineHandler"); + } constructor(opts, handler) { if (!opts || typeof opts !== "object") { throw new InvalidArgumentError("invalid opts"); @@ -10235,21 +10603,21 @@ var require_api_pipeline = __commonJS({ this.ret = new Duplex({ readableObjectMode: opts.objectMode, autoDestroy: true, - read: () => { + read: /* @__PURE__ */ __name(() => { const { body } = this; if (body && body.resume) { body.resume(); } - }, - write: (chunk, encoding, callback) => { + }, "read"), + write: /* @__PURE__ */ __name((chunk, encoding, callback) => { const { req } = this; if (req.push(chunk, encoding) || req._readableState.destroyed) { callback(); } else { req[kResume] = callback; } - }, - destroy: (err, callback) => { + }, "write"), + destroy: /* @__PURE__ */ __name((err, callback) => { const { body, req, res, ret, abort } = this; if (!err && !ret._readableState.endEmitted) { err = new RequestAbortedError(); @@ -10262,7 +10630,7 @@ var require_api_pipeline = __commonJS({ util.destroy(res, err); removeSignal(this); callback(err); - } + }, "destroy") }).on("prefinish", () => { const { req } = this; req.push(null); @@ -10349,6 +10717,7 @@ var require_api_pipeline = __commonJS({ return new PassThrough().destroy(err); } } + __name(pipeline, "pipeline"); module2.exports = pipeline; } }); @@ -10363,6 +10732,9 @@ var require_api_upgrade = __commonJS({ var { addSignal, removeSignal } = require_abort_signal(); var assert = require("assert"); var UpgradeHandler = class extends AsyncResource { + static { + __name(this, "UpgradeHandler"); + } constructor(opts, callback) { if (!opts || typeof opts !== "object") { throw new InvalidArgumentError("invalid opts"); @@ -10439,6 +10811,7 @@ var require_api_upgrade = __commonJS({ queueMicrotask(() => callback(err, { opaque })); } } + __name(upgrade, "upgrade"); module2.exports = upgrade; } }); @@ -10452,6 +10825,9 @@ var require_api_connect = __commonJS({ var util = require_util(); var { addSignal, removeSignal } = require_abort_signal(); var ConnectHandler = class extends AsyncResource { + static { + __name(this, "ConnectHandler"); + } constructor(opts, callback) { if (!opts || typeof opts !== "object") { throw new InvalidArgumentError("invalid opts"); @@ -10526,6 +10902,7 @@ var require_api_connect = __commonJS({ queueMicrotask(() => callback(err, { opaque })); } } + __name(connect, "connect"); module2.exports = connect; } }); @@ -10548,6 +10925,9 @@ var require_mock_errors = __commonJS({ "use strict"; var { UndiciError } = require_errors(); var MockNotMatchedError = class _MockNotMatchedError extends UndiciError { + static { + __name(this, "MockNotMatchedError"); + } constructor(message) { super(message); Error.captureStackTrace(this, _MockNotMatchedError); @@ -10621,6 +11001,7 @@ var require_mock_utils = __commonJS({ } return false; } + __name(matchValue, "matchValue"); function lowerCaseEntries(headers) { return Object.fromEntries( Object.entries(headers).map(([headerName, headerValue]) => { @@ -10628,6 +11009,7 @@ var require_mock_utils = __commonJS({ }) ); } + __name(lowerCaseEntries, "lowerCaseEntries"); function getHeaderByName(headers, key) { if (Array.isArray(headers)) { for (let i = 0; i < headers.length; i += 2) { @@ -10642,6 +11024,7 @@ var require_mock_utils = __commonJS({ return lowerCaseEntries(headers)[key.toLocaleLowerCase()]; } } + __name(getHeaderByName, "getHeaderByName"); function buildHeadersFromArray(headers) { const clone = headers.slice(); const entries = []; @@ -10650,6 +11033,7 @@ var require_mock_utils = __commonJS({ } return Object.fromEntries(entries); } + __name(buildHeadersFromArray, "buildHeadersFromArray"); function matchHeaders(mockDispatch2, headers) { if (typeof mockDispatch2.headers === "function") { if (Array.isArray(headers)) { @@ -10671,6 +11055,7 @@ var require_mock_utils = __commonJS({ } return true; } + __name(matchHeaders, "matchHeaders"); function safeUrl(path2) { if (typeof path2 !== "string") { return path2; @@ -10683,6 +11068,7 @@ var require_mock_utils = __commonJS({ qp.sort(); return [...pathSegments, qp.toString()].join("?"); } + __name(safeUrl, "safeUrl"); function matchKey(mockDispatch2, { path: path2, method, body, headers }) { const pathMatch = matchValue(mockDispatch2.path, path2); const methodMatch = matchValue(mockDispatch2.method, method); @@ -10690,6 +11076,7 @@ var require_mock_utils = __commonJS({ const headersMatch = matchHeaders(mockDispatch2, headers); return pathMatch && methodMatch && bodyMatch && headersMatch; } + __name(matchKey, "matchKey"); function getResponseData(data) { if (Buffer.isBuffer(data)) { return data; @@ -10699,6 +11086,7 @@ var require_mock_utils = __commonJS({ return data.toString(); } } + __name(getResponseData, "getResponseData"); function getMockDispatch(mockDispatches, key) { const basePath = key.query ? buildURL(key.path, key.query) : key.path; const resolvedPath = typeof basePath === "string" ? safeUrl(basePath) : basePath; @@ -10720,6 +11108,7 @@ var require_mock_utils = __commonJS({ } return matchedMockDispatches[0]; } + __name(getMockDispatch, "getMockDispatch"); function addMockDispatch(mockDispatches, key, data) { const baseData = { timesInvoked: 0, times: 1, persist: false, consumed: false }; const replyData = typeof data === "function" ? { callback: data } : { ...data }; @@ -10727,6 +11116,7 @@ var require_mock_utils = __commonJS({ mockDispatches.push(newMockDispatch); return newMockDispatch; } + __name(addMockDispatch, "addMockDispatch"); function deleteMockDispatch(mockDispatches, key) { const index = mockDispatches.findIndex((dispatch) => { if (!dispatch.consumed) { @@ -10738,6 +11128,7 @@ var require_mock_utils = __commonJS({ mockDispatches.splice(index, 1); } } + __name(deleteMockDispatch, "deleteMockDispatch"); function buildKey(opts) { const { path: path2, method, body, headers, query } = opts; return { @@ -10748,6 +11139,7 @@ var require_mock_utils = __commonJS({ query }; } + __name(buildKey, "buildKey"); function generateKeyValues(data) { return Object.entries(data).reduce((keyValuePairs, [key, value]) => [ ...keyValuePairs, @@ -10755,9 +11147,11 @@ var require_mock_utils = __commonJS({ Array.isArray(value) ? value.map((x) => Buffer.from(`${x}`)) : Buffer.from(`${value}`) ], []); } + __name(generateKeyValues, "generateKeyValues"); function getStatusText(statusCode) { return STATUS_CODES[statusCode] || "unknown"; } + __name(getStatusText, "getStatusText"); async function getResponse(body) { const buffers = []; for await (const data of body) { @@ -10765,6 +11159,7 @@ var require_mock_utils = __commonJS({ } return Buffer.concat(buffers).toString("utf8"); } + __name(getResponse, "getResponse"); function mockDispatch(opts, handler) { const key = buildKey(opts); const mockDispatch2 = getMockDispatch(this[kDispatches], key); @@ -10804,15 +11199,18 @@ var require_mock_utils = __commonJS({ handler.onComplete(responseTrailers); deleteMockDispatch(mockDispatches, key); } + __name(handleReply, "handleReply"); function resume() { } + __name(resume, "resume"); return true; } + __name(mockDispatch, "mockDispatch"); function buildMockDispatch() { const agent = this[kMockAgent]; const origin = this[kOrigin]; const originalDispatch = this[kOriginalDispatch]; - return function dispatch(opts, handler) { + return /* @__PURE__ */ __name(function dispatch(opts, handler) { if (agent.isMockActive) { try { mockDispatch.call(this, opts, handler); @@ -10834,8 +11232,9 @@ var require_mock_utils = __commonJS({ } else { originalDispatch.call(this, opts, handler); } - }; + }, "dispatch"); } + __name(buildMockDispatch, "buildMockDispatch"); function checkNetConnect(netConnect, origin) { const url = new URL(origin); if (netConnect === true) { @@ -10845,12 +11244,14 @@ var require_mock_utils = __commonJS({ } return false; } + __name(checkNetConnect, "checkNetConnect"); function buildMockOptions(opts) { if (opts) { const { agent, ...mockOptions } = opts; return mockOptions; } } + __name(buildMockOptions, "buildMockOptions"); module2.exports = { getResponseData, getMockDispatch, @@ -10886,6 +11287,9 @@ var require_mock_interceptor = __commonJS({ var { InvalidArgumentError } = require_errors(); var { buildURL } = require_util(); var MockScope = class { + static { + __name(this, "MockScope"); + } constructor(mockDispatch) { this[kMockDispatch] = mockDispatch; } @@ -10918,6 +11322,9 @@ var require_mock_interceptor = __commonJS({ } }; var MockInterceptor = class { + static { + __name(this, "MockInterceptor"); + } constructor(opts, mockDispatches) { if (typeof opts !== "object") { throw new InvalidArgumentError("opts must be an object"); @@ -10968,7 +11375,7 @@ var require_mock_interceptor = __commonJS({ */ reply(replyData) { if (typeof replyData === "function") { - const wrappedDefaultsCallback = (opts) => { + const wrappedDefaultsCallback = /* @__PURE__ */ __name((opts) => { const resolvedData = replyData(opts); if (typeof resolvedData !== "object") { throw new InvalidArgumentError("reply options callback must return an object"); @@ -10978,7 +11385,7 @@ var require_mock_interceptor = __commonJS({ return { ...this.createMockScopeDispatchData(statusCode2, data2, responseOptions2) }; - }; + }, "wrappedDefaultsCallback"); const newMockDispatch2 = addMockDispatch(this[kDispatches], this[kDispatchKey], wrappedDefaultsCallback); return new MockScope(newMockDispatch2); } @@ -11051,6 +11458,9 @@ var require_mock_client = __commonJS({ var Symbols = require_symbols(); var { InvalidArgumentError } = require_errors(); var MockClient = class extends Client { + static { + __name(this, "MockClient"); + } constructor(origin, opts) { super(origin, opts); if (!opts || !opts.agent || typeof opts.agent.dispatch !== "function") { @@ -11104,6 +11514,9 @@ var require_mock_pool = __commonJS({ var Symbols = require_symbols(); var { InvalidArgumentError } = require_errors(); var MockPool = class extends Pool { + static { + __name(this, "MockPool"); + } constructor(origin, opts) { super(origin, opts); if (!opts || !opts.agent || typeof opts.agent.dispatch !== "function") { @@ -11154,6 +11567,9 @@ var require_pluralizer = __commonJS({ this: "these" }; module2.exports = class Pluralizer { + static { + __name(this, "Pluralizer"); + } constructor(singular, plural) { this.singular = singular; this.plural = plural; @@ -11175,6 +11591,9 @@ var require_pending_interceptors_formatter = __commonJS({ var { Transform } = require("stream"); var { Console } = require("console"); module2.exports = class PendingInterceptorsFormatter { + static { + __name(this, "PendingInterceptorsFormatter"); + } constructor({ disableColors } = {}) { this.transform = new Transform({ transform(chunk, _enc, cb) { @@ -11232,6 +11651,9 @@ var require_mock_agent = __commonJS({ var Pluralizer = require_pluralizer(); var PendingInterceptorsFormatter = require_pending_interceptors_formatter(); var FakeWeakRef = class { + static { + __name(this, "FakeWeakRef"); + } constructor(value) { this.value = value; } @@ -11240,6 +11662,9 @@ var require_mock_agent = __commonJS({ } }; var MockAgent = class extends Dispatcher { + static { + __name(this, "MockAgent"); + } constructor(opts) { super(opts); this[kNetConnect] = true; @@ -11366,6 +11791,7 @@ var require_proxy_agent = __commonJS({ function defaultProtocolPort(protocol) { return protocol === "https:" ? 443 : 80; } + __name(defaultProtocolPort, "defaultProtocolPort"); function buildProxyOptions(opts) { if (typeof opts === "string") { opts = { uri: opts }; @@ -11378,10 +11804,15 @@ var require_proxy_agent = __commonJS({ protocol: opts.protocol || "https" }; } + __name(buildProxyOptions, "buildProxyOptions"); function defaultFactory(origin, opts) { return new Pool(origin, opts); } + __name(defaultFactory, "defaultFactory"); var ProxyAgent = class extends DispatcherBase { + static { + __name(this, "ProxyAgent"); + } constructor(opts) { super(opts); this[kProxy] = buildProxyOptions(opts); @@ -11416,7 +11847,7 @@ var require_proxy_agent = __commonJS({ this[kClient] = clientFactory(resolvedUrl, { connect }); this[kAgent] = new Agent({ ...opts, - connect: async (opts2, callback) => { + connect: /* @__PURE__ */ __name(async (opts2, callback) => { let requestedHost = opts2.host; if (!opts2.port) { requestedHost += `:${defaultProtocolPort(opts2.protocol)}`; @@ -11451,7 +11882,7 @@ var require_proxy_agent = __commonJS({ } catch (err) { callback(err); } - } + }, "connect") }); } dispatch(opts, handler) { @@ -11488,12 +11919,14 @@ var require_proxy_agent = __commonJS({ } return headers; } + __name(buildHeaders, "buildHeaders"); function throwIfProxyAuthIsSent(headers) { const existProxyAuth = headers && Object.keys(headers).find((key) => key.toLowerCase() === "proxy-authorization"); if (existProxyAuth) { throw new InvalidArgumentError("Proxy-Authorization should be sent in ProxyAgent constructor"); } } + __name(throwIfProxyAuthIsSent, "throwIfProxyAuthIsSent"); module2.exports = ProxyAgent; } }); @@ -11510,7 +11943,11 @@ var require_RetryHandler = __commonJS({ const diff = new Date(retryAfter).getTime() - current; return diff; } + __name(calculateRetryAfterHeader, "calculateRetryAfterHeader"); var RetryHandler = class _RetryHandler { + static { + __name(this, "RetryHandler"); + } constructor(opts, handlers) { const { retryOptions, ...dispatchOpts } = opts; const { @@ -11759,6 +12196,7 @@ var require_RetryHandler = __commonJS({ this.handler.onError(err3); } } + __name(onRetry, "onRetry"); } }; module2.exports = RetryHandler; @@ -11786,9 +12224,11 @@ var require_global2 = __commonJS({ configurable: false }); } + __name(setGlobalDispatcher, "setGlobalDispatcher"); function getGlobalDispatcher() { return globalThis[globalDispatcher]; } + __name(getGlobalDispatcher, "getGlobalDispatcher"); module2.exports = { setGlobalDispatcher, getGlobalDispatcher @@ -11801,6 +12241,9 @@ var require_DecoratorHandler = __commonJS({ "node_modules/undici/lib/handler/DecoratorHandler.js"(exports2, module2) { "use strict"; module2.exports = class DecoratorHandler { + static { + __name(this, "DecoratorHandler"); + } constructor(handler) { this.handler = handler; } @@ -11848,6 +12291,7 @@ var require_headers = __commonJS({ function isHTTPWhiteSpaceCharCode(code) { return code === 10 || code === 13 || code === 9 || code === 32; } + __name(isHTTPWhiteSpaceCharCode, "isHTTPWhiteSpaceCharCode"); function headerValueNormalize(potentialValue) { let i = 0; let j = potentialValue.length; @@ -11855,6 +12299,7 @@ var require_headers = __commonJS({ while (j > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(i))) ++i; return i === 0 && j === potentialValue.length ? potentialValue : potentialValue.substring(i, j); } + __name(headerValueNormalize, "headerValueNormalize"); function fill(headers, object) { if (Array.isArray(object)) { for (let i = 0; i < object.length; ++i) { @@ -11880,6 +12325,7 @@ var require_headers = __commonJS({ }); } } + __name(fill, "fill"); function appendHeader(headers, name, value) { value = headerValueNormalize(value); if (!isValidHeaderName(name)) { @@ -11901,7 +12347,11 @@ var require_headers = __commonJS({ } return headers[kHeadersList].append(name, value); } + __name(appendHeader, "appendHeader"); var HeadersList = class _HeadersList { + static { + __name(this, "HeadersList"); + } /** @type {[string, string][]|null} */ cookies = null; constructor(init) { @@ -11982,6 +12432,9 @@ var require_headers = __commonJS({ } }; var Headers2 = class _Headers { + static { + __name(this, "Headers"); + } constructor(init = void 0) { if (init === kConstruct) { return; @@ -12248,6 +12701,9 @@ var require_response = __commonJS({ var ReadableStream = globalThis.ReadableStream || require("stream/web").ReadableStream; var textEncoder = new TextEncoder("utf-8"); var Response = class _Response { + static { + __name(this, "Response"); + } // Creates network error Response. static error() { const relevantRealm = { settingsObject: {} }; @@ -12424,6 +12880,7 @@ var require_response = __commonJS({ } return newResponse; } + __name(cloneResponse, "cloneResponse"); function makeResponse(init) { return { aborted: false, @@ -12440,6 +12897,7 @@ var require_response = __commonJS({ urlList: init.urlList ? [...init.urlList] : [] }; } + __name(makeResponse, "makeResponse"); function makeNetworkError(reason) { const isError = isErrorLike(reason); return makeResponse({ @@ -12449,6 +12907,7 @@ var require_response = __commonJS({ aborted: reason && reason.name === "AbortError" }); } + __name(makeNetworkError, "makeNetworkError"); function makeFilteredResponse(response, state) { state = { internalResponse: response, @@ -12465,6 +12924,7 @@ var require_response = __commonJS({ } }); } + __name(makeFilteredResponse, "makeFilteredResponse"); function filterResponse(response, type) { if (type === "basic") { return makeFilteredResponse(response, { @@ -12496,10 +12956,12 @@ var require_response = __commonJS({ assert(false); } } + __name(filterResponse, "filterResponse"); function makeAppropriateNetworkError(fetchParams, err = null) { assert(isCancelled(fetchParams)); return isAborted(fetchParams) ? makeNetworkError(Object.assign(new DOMException2("The operation was aborted.", "AbortError"), { cause: err })) : makeNetworkError(Object.assign(new DOMException2("Request was cancelled."), { cause: err })); } + __name(makeAppropriateNetworkError, "makeAppropriateNetworkError"); function initializeResponse(response, init, body) { if (init.status !== null && (init.status < 200 || init.status > 599)) { throw new RangeError('init["status"] must be in the range of 200 to 599, inclusive.'); @@ -12531,6 +12993,7 @@ var require_response = __commonJS({ } } } + __name(initializeResponse, "initializeResponse"); webidl.converters.ReadableStream = webidl.interfaceConverter( ReadableStream ); @@ -12633,6 +13096,9 @@ var require_request2 = __commonJS({ signal.removeEventListener("abort", abort); }); var Request = class _Request { + static { + __name(this, "Request"); + } // https://fetch.spec.whatwg.org/#dom-request constructor(input, init = {}) { if (input === kConstruct) { @@ -12825,12 +13291,12 @@ var require_request2 = __commonJS({ } else { this[kAbortController] = ac; const acRef = new WeakRef(ac); - const abort = function() { + const abort = /* @__PURE__ */ __name(function() { const ac2 = acRef.deref(); if (ac2 !== void 0) { ac2.abort(this.reason); } - }; + }, "abort"); try { if (typeof getMaxListeners === "function" && getMaxListeners(signal) === defaultMaxListeners) { setMaxListeners(100, signal); @@ -13105,6 +13571,7 @@ var require_request2 = __commonJS({ request.url = request.urlList[0]; return request; } + __name(makeRequest, "makeRequest"); function cloneRequest(request) { const newRequest = makeRequest({ ...request, body: null }); if (request.body != null) { @@ -13112,6 +13579,7 @@ var require_request2 = __commonJS({ } return newRequest; } + __name(cloneRequest, "cloneRequest"); Object.defineProperties(Request.prototype, { method: kEnumerableProperty, url: kEnumerableProperty, @@ -13301,6 +13769,9 @@ var require_fetch = __commonJS({ var resolveObjectURL; var ReadableStream = globalThis.ReadableStream; var Fetch = class extends EE { + static { + __name(this, "Fetch"); + } constructor(dispatcher) { super(); this.dispatcher = dispatcher; @@ -13363,8 +13834,8 @@ var require_fetch = __commonJS({ abortFetch(p, request, responseObject, requestObject.signal.reason); } ); - const handleFetchDone = (response) => finalizeAndReportTiming(response, "fetch"); - const processResponse = (response) => { + const handleFetchDone = /* @__PURE__ */ __name((response) => finalizeAndReportTiming(response, "fetch"), "handleFetchDone"); + const processResponse = /* @__PURE__ */ __name((response) => { if (locallyAborted) { return Promise.resolve(); } @@ -13385,7 +13856,7 @@ var require_fetch = __commonJS({ responseObject[kHeaders][kGuard] = "immutable"; responseObject[kHeaders][kRealm] = relevantRealm; p.resolve(responseObject); - }; + }, "processResponse"); controller = fetching({ request, processResponseEndOfBody: handleFetchDone, @@ -13395,6 +13866,7 @@ var require_fetch = __commonJS({ }); return p.promise; } + __name(fetch2, "fetch"); function finalizeAndReportTiming(response, initiatorType = "other") { if (response.type === "error" && response.aborted) { return; @@ -13427,11 +13899,13 @@ var require_fetch = __commonJS({ cacheState ); } + __name(finalizeAndReportTiming, "finalizeAndReportTiming"); function markResourceTiming(timingInfo, originalURL, initiatorType, globalThis2, cacheState) { if (nodeMajor > 18 || nodeMajor === 18 && nodeMinor >= 2) { performance.markResourceTiming(timingInfo, originalURL.href, initiatorType, globalThis2, cacheState); } } + __name(markResourceTiming, "markResourceTiming"); function abortFetch(p, request, responseObject, error) { if (!error) { error = new DOMException2("The operation was aborted.", "AbortError"); @@ -13458,6 +13932,7 @@ var require_fetch = __commonJS({ }); } } + __name(abortFetch, "abortFetch"); function fetching({ request, processRequestBodyChunkLength, @@ -13523,6 +13998,7 @@ var require_fetch = __commonJS({ }); return fetchParams.controller; } + __name(fetching, "fetching"); async function mainFetch(fetchParams, recursive = false) { const request = fetchParams.request; let response = null; @@ -13602,24 +14078,25 @@ var require_fetch = __commonJS({ fetchParams.controller.dump = true; } if (request.integrity) { - const processBodyError = (reason) => fetchFinale(fetchParams, makeNetworkError(reason)); + const processBodyError = /* @__PURE__ */ __name((reason) => fetchFinale(fetchParams, makeNetworkError(reason)), "processBodyError"); if (request.responseTainting === "opaque" || response.body == null) { processBodyError(response.error); return; } - const processBody = (bytes) => { + const processBody = /* @__PURE__ */ __name((bytes) => { if (!bytesMatch(bytes, request.integrity)) { processBodyError("integrity mismatch"); return; } response.body = safelyExtractBody(bytes)[0]; fetchFinale(fetchParams, response); - }; + }, "processBody"); await fullyReadBody(response.body, processBody, processBodyError); } else { fetchFinale(fetchParams, response); } } + __name(mainFetch, "mainFetch"); function schemeFetch(fetchParams) { if (isCancelled(fetchParams) && fetchParams.request.redirectCount === 0) { return Promise.resolve(makeAppropriateNetworkError(fetchParams)); @@ -13683,12 +14160,14 @@ var require_fetch = __commonJS({ } } } + __name(schemeFetch, "schemeFetch"); function finalizeResponse(fetchParams, response) { fetchParams.request.done = true; if (fetchParams.processResponseDone != null) { queueMicrotask(() => fetchParams.processResponseDone(response)); } } + __name(finalizeResponse, "finalizeResponse"); function fetchFinale(fetchParams, response) { if (response.type === "error") { response.urlList = [fetchParams.request.urlList[0]]; @@ -13696,21 +14175,21 @@ var require_fetch = __commonJS({ startTime: fetchParams.timingInfo.startTime }); } - const processResponseEndOfBody = () => { + const processResponseEndOfBody = /* @__PURE__ */ __name(() => { fetchParams.request.done = true; if (fetchParams.processResponseEndOfBody != null) { queueMicrotask(() => fetchParams.processResponseEndOfBody(response)); } - }; + }, "processResponseEndOfBody"); if (fetchParams.processResponse != null) { queueMicrotask(() => fetchParams.processResponse(response)); } if (response.body == null) { processResponseEndOfBody(); } else { - const identityTransformAlgorithm = (chunk, controller) => { + const identityTransformAlgorithm = /* @__PURE__ */ __name((chunk, controller) => { controller.enqueue(chunk); - }; + }, "identityTransformAlgorithm"); const transformStream = new TransformStream({ start() { }, @@ -13728,8 +14207,8 @@ var require_fetch = __commonJS({ response.body = { stream: response.body.stream.pipeThrough(transformStream) }; } if (fetchParams.processResponseConsumeBody != null) { - const processBody = (nullOrBytes) => fetchParams.processResponseConsumeBody(response, nullOrBytes); - const processBodyError = (failure) => fetchParams.processResponseConsumeBody(response, failure); + const processBody = /* @__PURE__ */ __name((nullOrBytes) => fetchParams.processResponseConsumeBody(response, nullOrBytes), "processBody"); + const processBodyError = /* @__PURE__ */ __name((failure) => fetchParams.processResponseConsumeBody(response, failure), "processBodyError"); if (response.body == null) { queueMicrotask(() => processBody(null)); } else { @@ -13738,6 +14217,7 @@ var require_fetch = __commonJS({ return Promise.resolve(); } } + __name(fetchFinale, "fetchFinale"); async function httpFetch(fetchParams) { const request = fetchParams.request; let response = null; @@ -13782,6 +14262,7 @@ var require_fetch = __commonJS({ response.timingInfo = timingInfo; return response; } + __name(httpFetch, "httpFetch"); function httpRedirectFetch(fetchParams, response) { const request = fetchParams.request; const actualResponse = response.internalResponse ? response.internalResponse : response; @@ -13841,6 +14322,7 @@ var require_fetch = __commonJS({ setRequestReferrerPolicyOnRedirect(request, actualResponse); return mainFetch(fetchParams, true); } + __name(httpRedirectFetch, "httpRedirectFetch"); async function httpNetworkOrCacheFetch(fetchParams, isAuthenticationFetch = false, isNewConnectionFetch = false) { const request = fetchParams.request; let httpFetchParams = null; @@ -13961,6 +14443,7 @@ var require_fetch = __commonJS({ } return response; } + __name(httpNetworkOrCacheFetch, "httpNetworkOrCacheFetch"); async function httpNetworkFetch(fetchParams, includeCredentials = false, forceNewConnection = false) { assert(!fetchParams.controller.connection || fetchParams.controller.connection.destroyed); fetchParams.controller.connection = { @@ -13988,22 +14471,22 @@ var require_fetch = __commonJS({ if (request.body == null && fetchParams.processRequestEndOfBody) { queueMicrotask(() => fetchParams.processRequestEndOfBody()); } else if (request.body != null) { - const processBodyChunk = async function* (bytes) { + const processBodyChunk = /* @__PURE__ */ __name(async function* (bytes) { if (isCancelled(fetchParams)) { return; } yield bytes; fetchParams.processRequestBodyChunkLength?.(bytes.byteLength); - }; - const processEndOfBody = () => { + }, "processBodyChunk"); + const processEndOfBody = /* @__PURE__ */ __name(() => { if (isCancelled(fetchParams)) { return; } if (fetchParams.processRequestEndOfBody) { fetchParams.processRequestEndOfBody(); } - }; - const processBodyError = (e) => { + }, "processEndOfBody"); + const processBodyError = /* @__PURE__ */ __name((e) => { if (isCancelled(fetchParams)) { return; } @@ -14012,7 +14495,7 @@ var require_fetch = __commonJS({ } else { fetchParams.controller.terminate(e); } - }; + }, "processBodyError"); requestBody = async function* () { try { for await (const bytes of request.body.stream) { @@ -14040,12 +14523,12 @@ var require_fetch = __commonJS({ } return makeNetworkError(err); } - const pullAlgorithm = () => { + const pullAlgorithm = /* @__PURE__ */ __name(() => { fetchParams.controller.resume(); - }; - const cancelAlgorithm = (reason) => { + }, "pullAlgorithm"); + const cancelAlgorithm = /* @__PURE__ */ __name((reason) => { fetchParams.controller.abort(reason); - }; + }, "cancelAlgorithm"); if (!ReadableStream) { ReadableStream = require("stream/web").ReadableStream; } @@ -14125,6 +14608,7 @@ var require_fetch = __commonJS({ } fetchParams.controller.connection.destroy(); } + __name(onAborted, "onAborted"); return response; async function dispatch({ body }) { const url = requestCurrentURL(request); @@ -14259,7 +14743,9 @@ var require_fetch = __commonJS({ } )); } + __name(dispatch, "dispatch"); } + __name(httpNetworkFetch, "httpNetworkFetch"); module2.exports = { fetch: fetch2, Fetch, @@ -14291,6 +14777,9 @@ var require_progressevent = __commonJS({ var { webidl } = require_webidl(); var kState = Symbol("ProgressEvent state"); var ProgressEvent = class _ProgressEvent extends Event { + static { + __name(this, "ProgressEvent"); + } constructor(type, eventInitDict = {}) { type = webidl.converters.DOMString(type); eventInitDict = webidl.converters.ProgressEventInit(eventInitDict ?? {}); @@ -14632,6 +15121,7 @@ var require_encoding = __commonJS({ return "failure"; } } + __name(getEncoding, "getEncoding"); module2.exports = { getEncoding }; @@ -14729,6 +15219,7 @@ var require_util4 = __commonJS({ } })(); } + __name(readOperation, "readOperation"); function fireAProgressEvent(e, reader) { const event = new ProgressEvent(e, { bubbles: false, @@ -14736,6 +15227,7 @@ var require_util4 = __commonJS({ }); reader.dispatchEvent(event); } + __name(fireAProgressEvent, "fireAProgressEvent"); function packageData(bytes, type, mimeType, encodingName) { switch (type) { case "DataURL": { @@ -14783,6 +15275,7 @@ var require_util4 = __commonJS({ } } } + __name(packageData, "packageData"); function decode(ioQueue, encoding) { const bytes = combineByteSequences(ioQueue); const BOMEncoding = BOMSniffing(bytes); @@ -14794,6 +15287,7 @@ var require_util4 = __commonJS({ const sliced = bytes.slice(slice); return new TextDecoder(encoding).decode(sliced); } + __name(decode, "decode"); function BOMSniffing(ioQueue) { const [a, b, c] = ioQueue; if (a === 239 && b === 187 && c === 191) { @@ -14805,6 +15299,7 @@ var require_util4 = __commonJS({ } return null; } + __name(BOMSniffing, "BOMSniffing"); function combineByteSequences(sequences) { const size = sequences.reduce((a, b) => { return a + b.byteLength; @@ -14816,6 +15311,7 @@ var require_util4 = __commonJS({ return a; }, new Uint8Array(size)); } + __name(combineByteSequences, "combineByteSequences"); module2.exports = { staticPropertyDescriptors, readOperation, @@ -14843,6 +15339,9 @@ var require_filereader = __commonJS({ var { webidl } = require_webidl(); var { kEnumerableProperty } = require_util(); var FileReader = class _FileReader extends EventTarget { + static { + __name(this, "FileReader"); + } constructor() { super(); this[kState] = "empty"; @@ -15105,6 +15604,7 @@ var require_util5 = __commonJS({ const serializedB = URLSerializer(B, excludeFragment); return serializedA === serializedB; } + __name(urlEquals, "urlEquals"); function fieldValues(header) { assert(header !== null); const values = []; @@ -15119,6 +15619,7 @@ var require_util5 = __commonJS({ } return values; } + __name(fieldValues, "fieldValues"); module2.exports = { urlEquals, fieldValues @@ -15143,6 +15644,9 @@ var require_cache = __commonJS({ var assert = require("assert"); var { getGlobalDispatcher } = require_global2(); var Cache = class _Cache { + static { + __name(this, "Cache"); + } /** * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-request-response-list * @type {requestResponseList} @@ -15667,6 +16171,9 @@ var require_cachestorage = __commonJS({ var { webidl } = require_webidl(); var { kEnumerableProperty } = require_util(); var CacheStorage = class _CacheStorage { + static { + __name(this, "CacheStorage"); + } /** * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-name-to-cache-map * @type {Map parseSetCookie(Array.isArray(pair) ? pair[1] : pair)); } + __name(getSetCookies, "getSetCookies"); function setCookie(headers, cookie) { webidl.argumentLengthCheck(arguments, 2, { header: "setCookie" }); webidl.brandCheck(headers, Headers2, { strict: false }); @@ -16128,6 +16649,7 @@ var require_cookies = __commonJS({ headers.append("Set-Cookie", stringify2(cookie)); } } + __name(setCookie, "setCookie"); webidl.converters.DeleteCookieAttributes = webidl.dictionaryConverter([ { converter: webidl.nullableConverter(webidl.converters.DOMString), @@ -16273,6 +16795,9 @@ var require_events = __commonJS({ var { kEnumerableProperty } = require_util(); var { MessagePort } = require("worker_threads"); var MessageEvent = class _MessageEvent extends Event { + static { + __name(this, "MessageEvent"); + } #eventInit; constructor(type, eventInitDict = {}) { webidl.argumentLengthCheck(arguments, 1, { header: "MessageEvent constructor" }); @@ -16319,6 +16844,9 @@ var require_events = __commonJS({ } }; var CloseEvent = class _CloseEvent extends Event { + static { + __name(this, "CloseEvent"); + } #eventInit; constructor(type, eventInitDict = {}) { webidl.argumentLengthCheck(arguments, 1, { header: "CloseEvent constructor" }); @@ -16341,6 +16869,9 @@ var require_events = __commonJS({ } }; var ErrorEvent = class _ErrorEvent extends Event { + static { + __name(this, "ErrorEvent"); + } #eventInit; constructor(type, eventInitDict) { webidl.argumentLengthCheck(arguments, 1, { header: "ErrorEvent constructor" }); @@ -16518,16 +17049,20 @@ var require_util7 = __commonJS({ function isEstablished(ws) { return ws[kReadyState] === states.OPEN; } + __name(isEstablished, "isEstablished"); function isClosing(ws) { return ws[kReadyState] === states.CLOSING; } + __name(isClosing, "isClosing"); function isClosed(ws) { return ws[kReadyState] === states.CLOSED; } + __name(isClosed, "isClosed"); function fireEvent(e, target, eventConstructor = Event, eventInitDict) { const event = new eventConstructor(e, eventInitDict); target.dispatchEvent(event); } + __name(fireEvent, "fireEvent"); function websocketMessageReceived(ws, type, data) { if (ws[kReadyState] !== states.OPEN) { return; @@ -16552,6 +17087,7 @@ var require_util7 = __commonJS({ data: dataForEvent }); } + __name(websocketMessageReceived, "websocketMessageReceived"); function isValidSubprotocol(protocol) { if (protocol.length === 0) { return false; @@ -16565,6 +17101,7 @@ var require_util7 = __commonJS({ } return true; } + __name(isValidSubprotocol, "isValidSubprotocol"); function isValidStatusCode(code) { if (code >= 1e3 && code < 1015) { return code !== 1004 && // reserved @@ -16573,6 +17110,7 @@ var require_util7 = __commonJS({ } return code >= 3e3 && code <= 4999; } + __name(isValidStatusCode, "isValidStatusCode"); function failWebsocketConnection(ws, reason) { const { [kController]: controller, [kResponse]: response } = ws; controller.abort(); @@ -16585,6 +17123,7 @@ var require_util7 = __commonJS({ }); } } + __name(failWebsocketConnection, "failWebsocketConnection"); module2.exports = { isEstablished, isClosing, @@ -16701,11 +17240,13 @@ var require_connection = __commonJS({ }); return controller; } + __name(establishWebSocketConnection, "establishWebSocketConnection"); function onSocketData(chunk) { if (!this.ws[kByteParser].write(chunk)) { this.pause(); } } + __name(onSocketData, "onSocketData"); function onSocketClose() { const { ws } = this; const wasClean = ws[kSentClose] && ws[kReceivedClose]; @@ -16732,6 +17273,7 @@ var require_connection = __commonJS({ }); } } + __name(onSocketClose, "onSocketClose"); function onSocketError(error) { const { ws } = this; ws[kReadyState] = states.CLOSING; @@ -16740,6 +17282,7 @@ var require_connection = __commonJS({ } this.destroy(); } + __name(onSocketError, "onSocketError"); module2.exports = { establishWebSocketConnection }; @@ -16757,6 +17300,9 @@ var require_frame = __commonJS({ } catch { } var WebsocketFrameSend = class { + static { + __name(this, "WebsocketFrameSend"); + } /** * @param {Buffer|undefined} data */ @@ -16817,6 +17363,9 @@ var require_receiver = __commonJS({ channels.ping = diagnosticsChannel.channel("undici:websocket:ping"); channels.pong = diagnosticsChannel.channel("undici:websocket:pong"); var ByteParser = class extends Writable { + static { + __name(this, "ByteParser"); + } #buffers = []; #byteOffset = 0; #state = parserStates.INFO; @@ -17066,6 +17615,9 @@ var require_websocket = __commonJS({ var { types } = require("util"); var experimentalWarned = false; var WebSocket = class _WebSocket extends EventTarget { + static { + __name(this, "WebSocket"); + } #events = { open: null, error: null, @@ -17341,9 +17893,9 @@ var require_websocket = __commonJS({ #onConnectionEstablished(response) { this[kResponse] = response; const parser = new ByteParser(this); - parser.on("drain", function onParserDrain() { + parser.on("drain", /* @__PURE__ */ __name(function onParserDrain() { this.ws[kResponse].socket.resume(); - }); + }, "onParserDrain")); response.socket.ws = this; this[kByteParser] = parser; this[kReadyState] = states.OPEN; @@ -17411,7 +17963,7 @@ var require_websocket = __commonJS({ }, { key: "dispatcher", - converter: (V) => V, + converter: /* @__PURE__ */ __name((V) => V, "converter"), get defaultValue() { return getGlobalDispatcher(); } @@ -17527,11 +18079,12 @@ var require_undici = __commonJS({ }, handler); }; } + __name(makeDispatcher, "makeDispatcher"); module2.exports.setGlobalDispatcher = setGlobalDispatcher; module2.exports.getGlobalDispatcher = getGlobalDispatcher; if (util.nodeMajor > 16 || util.nodeMajor === 16 && util.nodeMinor >= 8) { let fetchImpl = null; - module2.exports.fetch = async function fetch2(resource) { + module2.exports.fetch = /* @__PURE__ */ __name(async function fetch2(resource) { if (!fetchImpl) { fetchImpl = require_fetch().fetch; } @@ -17543,7 +18096,7 @@ var require_undici = __commonJS({ } throw err; } - }; + }, "fetch"); module2.exports.Headers = require_headers().Headers; module2.exports.Response = require_response().Response; module2.exports.Request = require_request2().Request; @@ -17591,9 +18144,9 @@ var require_lib = __commonJS({ if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { + desc = { enumerable: true, get: /* @__PURE__ */ __name(function() { return m[k]; - } }; + }, "get") }; } Object.defineProperty(o, k2, desc); } : function(o, m, k, k2) { @@ -17620,6 +18173,7 @@ var require_lib = __commonJS({ resolve(value); }); } + __name(adopt, "adopt"); return new (P || (P = Promise))(function(resolve, reject) { function fulfilled(value) { try { @@ -17628,6 +18182,7 @@ var require_lib = __commonJS({ reject(e); } } + __name(fulfilled, "fulfilled"); function rejected(value) { try { step(generator["throw"](value)); @@ -17635,9 +18190,11 @@ var require_lib = __commonJS({ reject(e); } } + __name(rejected, "rejected"); function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + __name(step, "step"); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; @@ -17691,6 +18248,7 @@ var require_lib = __commonJS({ const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); return proxyUrl ? proxyUrl.href : ""; } + __name(getProxyUrl, "getProxyUrl"); exports2.getProxyUrl = getProxyUrl; var HttpRedirectCodes = [ HttpCodes.MovedPermanently, @@ -17708,6 +18266,9 @@ var require_lib = __commonJS({ var ExponentialBackoffCeiling = 10; var ExponentialBackoffTimeSlice = 5; var HttpClientError = class _HttpClientError extends Error { + static { + __name(this, "HttpClientError"); + } constructor(message, statusCode) { super(message); this.name = "HttpClientError"; @@ -17717,6 +18278,9 @@ var require_lib = __commonJS({ }; exports2.HttpClientError = HttpClientError; var HttpClientResponse = class { + static { + __name(this, "HttpClientResponse"); + } constructor(message) { this.message = message; } @@ -17752,8 +18316,12 @@ var require_lib = __commonJS({ const parsedUrl = new URL(requestUrl); return parsedUrl.protocol === "https:"; } + __name(isHttps, "isHttps"); exports2.isHttps = isHttps; var HttpClient = class { + static { + __name(this, "HttpClient"); + } constructor(userAgent, handlers, requestOptions) { this._ignoreSslError = false; this._allowRedirects = true; @@ -17960,6 +18528,7 @@ var require_lib = __commonJS({ resolve(res); } } + __name(callbackForResult, "callbackForResult"); this.requestRawWithCallback(info2, data, callbackForResult); }); }); @@ -17984,6 +18553,7 @@ var require_lib = __commonJS({ onResult(err, res); } } + __name(handleResult, "handleResult"); const req = info2.httpModule.request(info2.options, (msg) => { const res = new HttpClientResponse(msg); handleResult(void 0, res); @@ -18163,6 +18733,7 @@ var require_lib = __commonJS({ } return value; } + __name(dateTimeDeserializer, "dateTimeDeserializer"); let obj; let contents; try { @@ -18198,7 +18769,7 @@ var require_lib = __commonJS({ } }; exports2.HttpClient = HttpClient; - var lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}); + var lowercaseKeys = /* @__PURE__ */ __name((obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}), "lowercaseKeys"); } }); @@ -18212,6 +18783,7 @@ var require_auth = __commonJS({ resolve(value); }); } + __name(adopt, "adopt"); return new (P || (P = Promise))(function(resolve, reject) { function fulfilled(value) { try { @@ -18220,6 +18792,7 @@ var require_auth = __commonJS({ reject(e); } } + __name(fulfilled, "fulfilled"); function rejected(value) { try { step(generator["throw"](value)); @@ -18227,15 +18800,20 @@ var require_auth = __commonJS({ reject(e); } } + __name(rejected, "rejected"); function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + __name(step, "step"); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.PersonalAccessTokenCredentialHandler = exports2.BearerCredentialHandler = exports2.BasicCredentialHandler = void 0; var BasicCredentialHandler = class { + static { + __name(this, "BasicCredentialHandler"); + } constructor(username, password) { this.username = username; this.password = password; @@ -18258,6 +18836,9 @@ var require_auth = __commonJS({ }; exports2.BasicCredentialHandler = BasicCredentialHandler; var BearerCredentialHandler = class { + static { + __name(this, "BearerCredentialHandler"); + } constructor(token) { this.token = token; } @@ -18281,6 +18862,9 @@ var require_auth = __commonJS({ }; exports2.BearerCredentialHandler = BearerCredentialHandler; var PersonalAccessTokenCredentialHandler = class { + static { + __name(this, "PersonalAccessTokenCredentialHandler"); + } constructor(token) { this.token = token; } @@ -18316,6 +18900,7 @@ var require_oidc_utils = __commonJS({ resolve(value); }); } + __name(adopt, "adopt"); return new (P || (P = Promise))(function(resolve, reject) { function fulfilled(value) { try { @@ -18324,6 +18909,7 @@ var require_oidc_utils = __commonJS({ reject(e); } } + __name(fulfilled, "fulfilled"); function rejected(value) { try { step(generator["throw"](value)); @@ -18331,9 +18917,11 @@ var require_oidc_utils = __commonJS({ reject(e); } } + __name(rejected, "rejected"); function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + __name(step, "step"); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; @@ -18343,6 +18931,9 @@ var require_oidc_utils = __commonJS({ var auth_1 = require_auth(); var core_1 = require_core(); var OidcClient = class _OidcClient { + static { + __name(this, "OidcClient"); + } static createHttpClient(allowRetry = true, maxRetry = 10) { const requestOptions = { allowRetries: allowRetry, @@ -18414,6 +19005,7 @@ var require_summary = __commonJS({ resolve(value); }); } + __name(adopt, "adopt"); return new (P || (P = Promise))(function(resolve, reject) { function fulfilled(value) { try { @@ -18422,6 +19014,7 @@ var require_summary = __commonJS({ reject(e); } } + __name(fulfilled, "fulfilled"); function rejected(value) { try { step(generator["throw"](value)); @@ -18429,9 +19022,11 @@ var require_summary = __commonJS({ reject(e); } } + __name(rejected, "rejected"); function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + __name(step, "step"); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; @@ -18443,6 +19038,9 @@ var require_summary = __commonJS({ exports2.SUMMARY_ENV_VAR = "GITHUB_STEP_SUMMARY"; exports2.SUMMARY_DOCS_URL = "https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary"; var Summary = class { + static { + __name(this, "Summary"); + } constructor() { this._buffer = ""; } @@ -18704,9 +19302,9 @@ var require_path_utils = __commonJS({ "use strict"; var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { + Object.defineProperty(o, k2, { enumerable: true, get: /* @__PURE__ */ __name(function() { return m[k]; - } }); + }, "get") }); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; @@ -18731,14 +19329,17 @@ var require_path_utils = __commonJS({ function toPosixPath(pth) { return pth.replace(/[\\]/g, "/"); } + __name(toPosixPath, "toPosixPath"); exports2.toPosixPath = toPosixPath; function toWin32Path(pth) { return pth.replace(/[/]/g, "\\"); } + __name(toWin32Path, "toWin32Path"); exports2.toWin32Path = toWin32Path; function toPlatformPath(pth) { return pth.replace(/[/\\]/g, path2.sep); } + __name(toPlatformPath, "toPlatformPath"); exports2.toPlatformPath = toPlatformPath; } }); @@ -18749,9 +19350,9 @@ var require_core = __commonJS({ "use strict"; var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { + Object.defineProperty(o, k2, { enumerable: true, get: /* @__PURE__ */ __name(function() { return m[k]; - } }); + }, "get") }); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; @@ -18776,6 +19377,7 @@ var require_core = __commonJS({ resolve(value); }); } + __name(adopt, "adopt"); return new (P || (P = Promise))(function(resolve, reject) { function fulfilled(value) { try { @@ -18784,6 +19386,7 @@ var require_core = __commonJS({ reject(e); } } + __name(fulfilled, "fulfilled"); function rejected(value) { try { step(generator["throw"](value)); @@ -18791,9 +19394,11 @@ var require_core = __commonJS({ reject(e); } } + __name(rejected, "rejected"); function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + __name(step, "step"); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; @@ -18819,10 +19424,12 @@ var require_core = __commonJS({ } command_1.issueCommand("set-env", { name }, convertedVal); } + __name(exportVariable, "exportVariable"); exports2.exportVariable = exportVariable; function setSecret(secret) { command_1.issueCommand("add-mask", {}, secret); } + __name(setSecret, "setSecret"); exports2.setSecret = setSecret; function addPath(inputPath) { const filePath = process.env["GITHUB_PATH"] || ""; @@ -18833,6 +19440,7 @@ var require_core = __commonJS({ } process.env["PATH"] = `${inputPath}${path2.delimiter}${process.env["PATH"]}`; } + __name(addPath, "addPath"); exports2.addPath = addPath; function getInput(name, options) { const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; @@ -18844,6 +19452,7 @@ var require_core = __commonJS({ } return val.trim(); } + __name(getInput, "getInput"); exports2.getInput = getInput; function getMultilineInput2(name, options) { const inputs = getInput(name, options).split("\n").filter((x) => x !== ""); @@ -18852,6 +19461,7 @@ var require_core = __commonJS({ } return inputs.map((input) => input.trim()); } + __name(getMultilineInput2, "getMultilineInput"); exports2.getMultilineInput = getMultilineInput2; function getBooleanInput(name, options) { const trueValue = ["true", "True", "TRUE"]; @@ -18864,6 +19474,7 @@ var require_core = __commonJS({ throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name} Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); } + __name(getBooleanInput, "getBooleanInput"); exports2.getBooleanInput = getBooleanInput; function setOutput2(name, value) { const filePath = process.env["GITHUB_OUTPUT"] || ""; @@ -18873,47 +19484,58 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); process.stdout.write(os2.EOL); command_1.issueCommand("set-output", { name }, utils_1.toCommandValue(value)); } + __name(setOutput2, "setOutput"); exports2.setOutput = setOutput2; function setCommandEcho(enabled) { command_1.issue("echo", enabled ? "on" : "off"); } + __name(setCommandEcho, "setCommandEcho"); exports2.setCommandEcho = setCommandEcho; function setFailed2(message) { process.exitCode = ExitCode.Failure; error(message); } + __name(setFailed2, "setFailed"); exports2.setFailed = setFailed2; function isDebug() { return process.env["RUNNER_DEBUG"] === "1"; } + __name(isDebug, "isDebug"); exports2.isDebug = isDebug; function debug(message) { command_1.issueCommand("debug", {}, message); } + __name(debug, "debug"); exports2.debug = debug; function error(message, properties = {}) { command_1.issueCommand("error", utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); } + __name(error, "error"); exports2.error = error; function warning(message, properties = {}) { command_1.issueCommand("warning", utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); } + __name(warning, "warning"); exports2.warning = warning; function notice(message, properties = {}) { command_1.issueCommand("notice", utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); } + __name(notice, "notice"); exports2.notice = notice; function info2(message) { process.stdout.write(message + os2.EOL); } + __name(info2, "info"); exports2.info = info2; function startGroup(name) { command_1.issue("group", name); } + __name(startGroup, "startGroup"); exports2.startGroup = startGroup; function endGroup() { command_1.issue("endgroup"); } + __name(endGroup, "endGroup"); exports2.endGroup = endGroup; function group(name, fn) { return __awaiter2(this, void 0, void 0, function* () { @@ -18927,6 +19549,7 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); return result; }); } + __name(group, "group"); exports2.group = group; function saveState(name, value) { const filePath = process.env["GITHUB_STATE"] || ""; @@ -18935,35 +19558,38 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); } command_1.issueCommand("save-state", { name }, utils_1.toCommandValue(value)); } + __name(saveState, "saveState"); exports2.saveState = saveState; function getState(name) { return process.env[`STATE_${name}`] || ""; } + __name(getState, "getState"); exports2.getState = getState; function getIDToken(aud) { return __awaiter2(this, void 0, void 0, function* () { return yield oidc_utils_1.OidcClient.getIDToken(aud); }); } + __name(getIDToken, "getIDToken"); exports2.getIDToken = getIDToken; var summary_1 = require_summary(); - Object.defineProperty(exports2, "summary", { enumerable: true, get: function() { + Object.defineProperty(exports2, "summary", { enumerable: true, get: /* @__PURE__ */ __name(function() { return summary_1.summary; - } }); + }, "get") }); var summary_2 = require_summary(); - Object.defineProperty(exports2, "markdownSummary", { enumerable: true, get: function() { + Object.defineProperty(exports2, "markdownSummary", { enumerable: true, get: /* @__PURE__ */ __name(function() { return summary_2.markdownSummary; - } }); + }, "get") }); var path_utils_1 = require_path_utils(); - Object.defineProperty(exports2, "toPosixPath", { enumerable: true, get: function() { + Object.defineProperty(exports2, "toPosixPath", { enumerable: true, get: /* @__PURE__ */ __name(function() { return path_utils_1.toPosixPath; - } }); - Object.defineProperty(exports2, "toWin32Path", { enumerable: true, get: function() { + }, "get") }); + Object.defineProperty(exports2, "toWin32Path", { enumerable: true, get: /* @__PURE__ */ __name(function() { return path_utils_1.toWin32Path; - } }); - Object.defineProperty(exports2, "toPlatformPath", { enumerable: true, get: function() { + }, "get") }); + Object.defineProperty(exports2, "toPlatformPath", { enumerable: true, get: /* @__PURE__ */ __name(function() { return path_utils_1.toPlatformPath; - } }); + }, "get") }); } }); @@ -18973,9 +19599,9 @@ var require_io_util = __commonJS({ "use strict"; var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { + Object.defineProperty(o, k2, { enumerable: true, get: /* @__PURE__ */ __name(function() { return m[k]; - } }); + }, "get") }); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; @@ -19000,6 +19626,7 @@ var require_io_util = __commonJS({ resolve(value); }); } + __name(adopt, "adopt"); return new (P || (P = Promise))(function(resolve, reject) { function fulfilled(value) { try { @@ -19008,6 +19635,7 @@ var require_io_util = __commonJS({ reject(e); } } + __name(fulfilled, "fulfilled"); function rejected(value) { try { step(generator["throw"](value)); @@ -19015,9 +19643,11 @@ var require_io_util = __commonJS({ reject(e); } } + __name(rejected, "rejected"); function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + __name(step, "step"); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; @@ -19043,6 +19673,7 @@ var require_io_util = __commonJS({ return true; }); } + __name(exists, "exists"); exports2.exists = exists; function isDirectory(fsPath, useStat = false) { return __awaiter2(this, void 0, void 0, function* () { @@ -19050,6 +19681,7 @@ var require_io_util = __commonJS({ return stats.isDirectory(); }); } + __name(isDirectory, "isDirectory"); exports2.isDirectory = isDirectory; function isRooted(p) { p = normalizeSeparators(p); @@ -19061,6 +19693,7 @@ var require_io_util = __commonJS({ } return p.startsWith("/"); } + __name(isRooted, "isRooted"); exports2.isRooted = isRooted; function tryGetExecutablePath(filePath, extensions) { return __awaiter2(this, void 0, void 0, function* () { @@ -19120,6 +19753,7 @@ var require_io_util = __commonJS({ return ""; }); } + __name(tryGetExecutablePath, "tryGetExecutablePath"); exports2.tryGetExecutablePath = tryGetExecutablePath; function normalizeSeparators(p) { p = p || ""; @@ -19129,13 +19763,16 @@ var require_io_util = __commonJS({ } return p.replace(/\/\/+/g, "/"); } + __name(normalizeSeparators, "normalizeSeparators"); function isUnixExecutable(stats) { return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); } + __name(isUnixExecutable, "isUnixExecutable"); function getCmdPath() { var _a2; return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; } + __name(getCmdPath, "getCmdPath"); exports2.getCmdPath = getCmdPath; } }); @@ -19146,9 +19783,9 @@ var require_io = __commonJS({ "use strict"; var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { + Object.defineProperty(o, k2, { enumerable: true, get: /* @__PURE__ */ __name(function() { return m[k]; - } }); + }, "get") }); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; @@ -19173,6 +19810,7 @@ var require_io = __commonJS({ resolve(value); }); } + __name(adopt, "adopt"); return new (P || (P = Promise))(function(resolve, reject) { function fulfilled(value) { try { @@ -19181,6 +19819,7 @@ var require_io = __commonJS({ reject(e); } } + __name(fulfilled, "fulfilled"); function rejected(value) { try { step(generator["throw"](value)); @@ -19188,9 +19827,11 @@ var require_io = __commonJS({ reject(e); } } + __name(rejected, "rejected"); function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + __name(step, "step"); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; @@ -19225,6 +19866,7 @@ var require_io = __commonJS({ } }); } + __name(cp, "cp"); exports2.cp = cp; function mv(source, dest, options = {}) { return __awaiter2(this, void 0, void 0, function* () { @@ -19246,6 +19888,7 @@ var require_io = __commonJS({ yield ioUtil.rename(source, dest); }); } + __name(mv, "mv"); exports2.mv = mv; function rmRF(inputPath) { return __awaiter2(this, void 0, void 0, function* () { @@ -19266,6 +19909,7 @@ var require_io = __commonJS({ } }); } + __name(rmRF, "rmRF"); exports2.rmRF = rmRF; function mkdirP2(fsPath) { return __awaiter2(this, void 0, void 0, function* () { @@ -19273,6 +19917,7 @@ var require_io = __commonJS({ yield ioUtil.mkdir(fsPath, { recursive: true }); }); } + __name(mkdirP2, "mkdirP"); exports2.mkdirP = mkdirP2; function which(tool, check) { return __awaiter2(this, void 0, void 0, function* () { @@ -19297,6 +19942,7 @@ var require_io = __commonJS({ return ""; }); } + __name(which, "which"); exports2.which = which; function findInPath(tool) { return __awaiter2(this, void 0, void 0, function* () { @@ -19339,6 +19985,7 @@ var require_io = __commonJS({ return matches; }); } + __name(findInPath, "findInPath"); exports2.findInPath = findInPath; function readCopyOptions(options) { const force = options.force == null ? true : options.force; @@ -19346,6 +19993,7 @@ var require_io = __commonJS({ const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); return { force, recursive, copySourceDirectory }; } + __name(readCopyOptions, "readCopyOptions"); function cpDirRecursive(sourceDir, destDir, currentDepth, force) { return __awaiter2(this, void 0, void 0, function* () { if (currentDepth >= 255) @@ -19366,6 +20014,7 @@ var require_io = __commonJS({ yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); }); } + __name(cpDirRecursive, "cpDirRecursive"); function copyFile(srcFile, destFile, force) { return __awaiter2(this, void 0, void 0, function* () { if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { @@ -19385,6 +20034,7 @@ var require_io = __commonJS({ } }); } + __name(copyFile, "copyFile"); } }); @@ -19394,9 +20044,9 @@ var require_toolrunner = __commonJS({ "use strict"; var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { + Object.defineProperty(o, k2, { enumerable: true, get: /* @__PURE__ */ __name(function() { return m[k]; - } }); + }, "get") }); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; @@ -19421,6 +20071,7 @@ var require_toolrunner = __commonJS({ resolve(value); }); } + __name(adopt, "adopt"); return new (P || (P = Promise))(function(resolve, reject) { function fulfilled(value) { try { @@ -19429,6 +20080,7 @@ var require_toolrunner = __commonJS({ reject(e); } } + __name(fulfilled, "fulfilled"); function rejected(value) { try { step(generator["throw"](value)); @@ -19436,9 +20088,11 @@ var require_toolrunner = __commonJS({ reject(e); } } + __name(rejected, "rejected"); function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + __name(step, "step"); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; @@ -19453,6 +20107,9 @@ var require_toolrunner = __commonJS({ var timers_1 = require("timers"); var IS_WINDOWS = process.platform === "win32"; var ToolRunner = class extends events.EventEmitter { + static { + __name(this, "ToolRunner"); + } constructor(toolPath, args, options) { super(); if (!toolPath) { @@ -19774,6 +20431,7 @@ var require_toolrunner = __commonJS({ arg += c; escaped = false; } + __name(append, "append"); for (let i = 0; i < argString.length; i++) { const c = argString.charAt(i); if (c === '"') { @@ -19806,8 +20464,12 @@ var require_toolrunner = __commonJS({ } return args; } + __name(argStringToArray, "argStringToArray"); exports2.argStringToArray = argStringToArray; var ExecState = class _ExecState extends events.EventEmitter { + static { + __name(this, "ExecState"); + } constructor(options, toolPath) { super(); this.processClosed = false; @@ -19878,9 +20540,9 @@ var require_exec = __commonJS({ "use strict"; var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { + Object.defineProperty(o, k2, { enumerable: true, get: /* @__PURE__ */ __name(function() { return m[k]; - } }); + }, "get") }); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; @@ -19905,6 +20567,7 @@ var require_exec = __commonJS({ resolve(value); }); } + __name(adopt, "adopt"); return new (P || (P = Promise))(function(resolve, reject) { function fulfilled(value) { try { @@ -19913,6 +20576,7 @@ var require_exec = __commonJS({ reject(e); } } + __name(fulfilled, "fulfilled"); function rejected(value) { try { step(generator["throw"](value)); @@ -19920,9 +20584,11 @@ var require_exec = __commonJS({ reject(e); } } + __name(rejected, "rejected"); function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + __name(step, "step"); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; @@ -19942,6 +20608,7 @@ var require_exec = __commonJS({ return runner.exec(); }); } + __name(exec2, "exec"); exports2.exec = exec2; function getExecOutput(commandLine, args, options) { var _a, _b; @@ -19952,18 +20619,18 @@ var require_exec = __commonJS({ const stderrDecoder = new string_decoder_1.StringDecoder("utf8"); const originalStdoutListener = (_a = options === null || options === void 0 ? void 0 : options.listeners) === null || _a === void 0 ? void 0 : _a.stdout; const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr; - const stdErrListener = (data) => { + const stdErrListener = /* @__PURE__ */ __name((data) => { stderr += stderrDecoder.write(data); if (originalStdErrListener) { originalStdErrListener(data); } - }; - const stdOutListener = (data) => { + }, "stdErrListener"); + const stdOutListener = /* @__PURE__ */ __name((data) => { stdout += stdoutDecoder.write(data); if (originalStdoutListener) { originalStdoutListener(data); } - }; + }, "stdOutListener"); const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { stdout: stdOutListener, stderr: stdErrListener }); const exitCode = yield exec2(commandLine, args, Object.assign(Object.assign({}, options), { listeners })); stdout += stdoutDecoder.end(); @@ -19975,6 +20642,7 @@ var require_exec = __commonJS({ }; }); } + __name(getExecOutput, "getExecOutput"); exports2.getExecOutput = getExecOutput; } }); @@ -19992,6 +20660,7 @@ var require_config = __commonJS({ function getUploadChunkSize() { return 8 * 1024 * 1024; } + __name(getUploadChunkSize, "getUploadChunkSize"); exports2.getUploadChunkSize = getUploadChunkSize; function getRuntimeToken() { const token = process.env["ACTIONS_RUNTIME_TOKEN"]; @@ -20000,6 +20669,7 @@ var require_config = __commonJS({ } return token; } + __name(getRuntimeToken, "getRuntimeToken"); exports2.getRuntimeToken = getRuntimeToken; function getResultsServiceUrl() { const resultsUrl = process.env["ACTIONS_RESULTS_URL"]; @@ -20008,6 +20678,7 @@ var require_config = __commonJS({ } return new URL(resultsUrl).origin; } + __name(getResultsServiceUrl, "getResultsServiceUrl"); exports2.getResultsServiceUrl = getResultsServiceUrl; function isGhes() { const ghUrl = new URL(process.env["GITHUB_SERVER_URL"] || "https://github.com"); @@ -20016,6 +20687,7 @@ var require_config = __commonJS({ const isGheHost = hostname.endsWith(".GHE.COM") || hostname.endsWith(".GHE.LOCALHOST"); return !isGitHubHost && !isGheHost; } + __name(isGhes, "isGhes"); exports2.isGhes = isGhes; function getGitHubWorkspaceDir() { const ghWorkspaceDir = process.env["GITHUB_WORKSPACE"]; @@ -20024,6 +20696,7 @@ var require_config = __commonJS({ } return ghWorkspaceDir; } + __name(getGitHubWorkspaceDir, "getGitHubWorkspaceDir"); exports2.getGitHubWorkspaceDir = getGitHubWorkspaceDir; function getConcurrency() { const numCPUs = os_1.default.cpus().length; @@ -20033,6 +20706,7 @@ var require_config = __commonJS({ const concurrency = 16 * numCPUs; return concurrency > 300 ? 300 : concurrency; } + __name(getConcurrency, "getConcurrency"); exports2.getConcurrency = getConcurrency; } }); @@ -20053,10 +20727,12 @@ var require_json_typings = __commonJS({ } return t; } + __name(typeofJsonValue, "typeofJsonValue"); exports2.typeofJsonValue = typeofJsonValue; function isJsonObject(value) { return value !== null && typeof value == "object" && !Array.isArray(value); } + __name(isJsonObject, "isJsonObject"); exports2.isJsonObject = isJsonObject; } }); @@ -20120,6 +20796,7 @@ var require_base64 = __commonJS({ throw Error(`invalid base64 string.`); return bytes.subarray(0, bytePos); } + __name(base64decode, "base64decode"); exports2.base64decode = base64decode; function base64encode(bytes) { let base64 = "", groupPos = 0, b, p = 0; @@ -20151,6 +20828,7 @@ var require_base64 = __commonJS({ } return base64; } + __name(base64encode, "base64encode"); exports2.base64encode = base64encode; } }); @@ -20161,7 +20839,7 @@ var require_protobufjs_utf8 = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.utf8read = void 0; - var fromCharCodes = (chunk) => String.fromCharCode.apply(String, chunk); + var fromCharCodes = /* @__PURE__ */ __name((chunk) => String.fromCharCode.apply(String, chunk), "fromCharCodes"); function utf8read(bytes) { if (bytes.length < 1) return ""; @@ -20191,6 +20869,7 @@ var require_protobufjs_utf8 = __commonJS({ } return fromCharCodes(chunk.slice(0, i)); } + __name(utf8read, "utf8read"); exports2.utf8read = utf8read; } }); @@ -20220,11 +20899,12 @@ var require_binary_format_contract = __commonJS({ return []; }; UnknownFieldHandler2.last = (message, fieldNo) => UnknownFieldHandler2.list(message, fieldNo).slice(-1)[0]; - const is = (message) => message && Array.isArray(message[UnknownFieldHandler2.symbol]); + const is = /* @__PURE__ */ __name((message) => message && Array.isArray(message[UnknownFieldHandler2.symbol]), "is"); })(UnknownFieldHandler = exports2.UnknownFieldHandler || (exports2.UnknownFieldHandler = {})); function mergeBinaryOptions(a, b) { return Object.assign(Object.assign({}, a), b); } + __name(mergeBinaryOptions, "mergeBinaryOptions"); exports2.mergeBinaryOptions = mergeBinaryOptions; var WireType; (function(WireType2) { @@ -20272,6 +20952,7 @@ var require_goog_varint = __commonJS({ } throw new Error("invalid varint"); } + __name(varint64read, "varint64read"); exports2.varint64read = varint64read; function varint64write(lo, hi, bytes) { for (let i = 0; i < 28; i = i + 7) { @@ -20300,6 +20981,7 @@ var require_goog_varint = __commonJS({ } bytes.push(hi >>> 31 & 1); } + __name(varint64write, "varint64write"); exports2.varint64write = varint64write; var TWO_PWR_32_DBL = (1 << 16) * (1 << 16); function int64fromString(dec) { @@ -20318,12 +21000,14 @@ var require_goog_varint = __commonJS({ lowBits = lowBits % TWO_PWR_32_DBL; } } + __name(add1e6digit, "add1e6digit"); add1e6digit(-24, -18); add1e6digit(-18, -12); add1e6digit(-12, -6); add1e6digit(-6); return [minus, lowBits, highBits]; } + __name(int64fromString, "int64fromString"); exports2.int64fromString = int64fromString; function int64toString(bitsLow, bitsHigh) { if (bitsHigh >>> 0 <= 2097151) { @@ -20351,6 +21035,7 @@ var require_goog_varint = __commonJS({ } return partial; } + __name(decimalFrom1e7, "decimalFrom1e7"); return decimalFrom1e7( digitC, /*needLeadingZeros=*/ @@ -20367,6 +21052,7 @@ var require_goog_varint = __commonJS({ 1 ); } + __name(int64toString, "int64toString"); exports2.int64toString = int64toString; function varint32write(value, bytes) { if (value >= 0) { @@ -20383,6 +21069,7 @@ var require_goog_varint = __commonJS({ bytes.push(1); } } + __name(varint32write, "varint32write"); exports2.varint32write = varint32write; function varint32read() { let b = this.buf[this.pos++]; @@ -20418,6 +21105,7 @@ var require_goog_varint = __commonJS({ this.assertBounds(); return result >>> 0; } + __name(varint32read, "varint32read"); exports2.varint32read = varint32read; } }); @@ -20442,16 +21130,21 @@ var require_pb_long = __commonJS({ V: dv } : void 0; } + __name(detectBi, "detectBi"); exports2.detectBi = detectBi; detectBi(); function assertBi(bi) { if (!bi) throw new Error("BigInt unavailable, see https://github.com/timostamm/protobuf-ts/blob/v1.0.8/MANUAL.md#bigint-support"); } + __name(assertBi, "assertBi"); var RE_DECIMAL_STR = /^-?[0-9]+$/; var TWO_PWR_32_DBL = 4294967296; var HALF_2_PWR_32 = 2147483648; var SharedPbLong = class { + static { + __name(this, "SharedPbLong"); + } /** * Create a new instance with the given bits. */ @@ -20476,6 +21169,9 @@ var require_pb_long = __commonJS({ } }; var PbULong = class _PbULong extends SharedPbLong { + static { + __name(this, "PbULong"); + } /** * Create instance from a `string`, `number` or `bigint`. */ @@ -20544,6 +21240,9 @@ var require_pb_long = __commonJS({ exports2.PbULong = PbULong; PbULong.ZERO = new PbULong(0, 0); var PbLong = class _PbLong extends SharedPbLong { + static { + __name(this, "PbLong"); + } /** * Create instance from a `string`, `number` or `bigint`. */ @@ -20651,13 +21350,17 @@ var require_binary_reader = __commonJS({ var goog_varint_1 = require_goog_varint(); var defaultsRead = { readUnknownField: true, - readerFactory: (bytes) => new BinaryReader(bytes) + readerFactory: /* @__PURE__ */ __name((bytes) => new BinaryReader(bytes), "readerFactory") }; function binaryReadOptions(options) { return options ? Object.assign(Object.assign({}, defaultsRead), options) : defaultsRead; } + __name(binaryReadOptions, "binaryReadOptions"); exports2.binaryReadOptions = binaryReadOptions; var BinaryReader = class { + static { + __name(this, "BinaryReader"); + } constructor(buf, textDecoder) { this.varint64 = goog_varint_1.varint64read; this.uint32 = goog_varint_1.varint32read; @@ -20828,10 +21531,12 @@ var require_assert = __commonJS({ throw new Error(msg); } } + __name(assert, "assert"); exports2.assert = assert; function assertNever(value, msg) { throw new Error(msg !== null && msg !== void 0 ? msg : "Unexpected object: " + value); } + __name(assertNever, "assertNever"); exports2.assertNever = assertNever; var FLOAT32_MAX = 34028234663852886e22; var FLOAT32_MIN = -34028234663852886e22; @@ -20844,6 +21549,7 @@ var require_assert = __commonJS({ if (!Number.isInteger(arg) || arg > INT32_MAX || arg < INT32_MIN) throw new Error("invalid int 32: " + arg); } + __name(assertInt32, "assertInt32"); exports2.assertInt32 = assertInt32; function assertUInt32(arg) { if (typeof arg !== "number") @@ -20851,6 +21557,7 @@ var require_assert = __commonJS({ if (!Number.isInteger(arg) || arg > UINT32_MAX || arg < 0) throw new Error("invalid uint 32: " + arg); } + __name(assertUInt32, "assertUInt32"); exports2.assertUInt32 = assertUInt32; function assertFloat32(arg) { if (typeof arg !== "number") @@ -20860,6 +21567,7 @@ var require_assert = __commonJS({ if (arg > FLOAT32_MAX || arg < FLOAT32_MIN) throw new Error("invalid float 32: " + arg); } + __name(assertFloat32, "assertFloat32"); exports2.assertFloat32 = assertFloat32; } }); @@ -20875,13 +21583,17 @@ var require_binary_writer = __commonJS({ var assert_1 = require_assert(); var defaultsWrite = { writeUnknownFields: true, - writerFactory: () => new BinaryWriter() + writerFactory: /* @__PURE__ */ __name(() => new BinaryWriter(), "writerFactory") }; function binaryWriteOptions(options) { return options ? Object.assign(Object.assign({}, defaultsWrite), options) : defaultsWrite; } + __name(binaryWriteOptions, "binaryWriteOptions"); exports2.binaryWriteOptions = binaryWriteOptions; var BinaryWriter = class { + static { + __name(this, "BinaryWriter"); + } constructor(textEncoder) { this.stack = []; this.textEncoder = textEncoder !== null && textEncoder !== void 0 ? textEncoder : new TextEncoder(); @@ -21107,10 +21819,12 @@ var require_json_format_contract = __commonJS({ function jsonReadOptions(options) { return options ? Object.assign(Object.assign({}, defaultsRead), options) : defaultsRead; } + __name(jsonReadOptions, "jsonReadOptions"); exports2.jsonReadOptions = jsonReadOptions; function jsonWriteOptions(options) { return options ? Object.assign(Object.assign({}, defaultsWrite), options) : defaultsWrite; } + __name(jsonWriteOptions, "jsonWriteOptions"); exports2.jsonWriteOptions = jsonWriteOptions; function mergeJsonOptions(a, b) { var _a, _b; @@ -21118,6 +21832,7 @@ var require_json_format_contract = __commonJS({ c.typeRegistry = [...(_a = a === null || a === void 0 ? void 0 : a.typeRegistry) !== null && _a !== void 0 ? _a : [], ...(_b = b === null || b === void 0 ? void 0 : b.typeRegistry) !== null && _b !== void 0 ? _b : []]; return c; } + __name(mergeJsonOptions, "mergeJsonOptions"); exports2.mergeJsonOptions = mergeJsonOptions; } }); @@ -21159,6 +21874,7 @@ var require_lower_camel_case = __commonJS({ } return sb.join(""); } + __name(lowerCamelCase, "lowerCamelCase"); exports2.lowerCamelCase = lowerCamelCase; } }); @@ -21208,12 +21924,14 @@ var require_reflection_info = __commonJS({ field.opt = (_d = field.opt) !== null && _d !== void 0 ? _d : field.repeat ? false : field.oneof ? false : field.kind == "message"; return field; } + __name(normalizeFieldInfo, "normalizeFieldInfo"); exports2.normalizeFieldInfo = normalizeFieldInfo; function readFieldOptions(messageType, fieldName, extensionName, extensionType) { var _a; const options = (_a = messageType.fields.find((m, i) => m.localName == fieldName || i == fieldName)) === null || _a === void 0 ? void 0 : _a.options; return options && options[extensionName] ? extensionType.fromJson(options[extensionName]) : void 0; } + __name(readFieldOptions, "readFieldOptions"); exports2.readFieldOptions = readFieldOptions; function readFieldOption(messageType, fieldName, extensionName, extensionType) { var _a; @@ -21227,6 +21945,7 @@ var require_reflection_info = __commonJS({ } return extensionType ? extensionType.fromJson(optionVal) : optionVal; } + __name(readFieldOption, "readFieldOption"); exports2.readFieldOption = readFieldOption; function readMessageOption(messageType, extensionName, extensionType) { const options = messageType.options; @@ -21236,6 +21955,7 @@ var require_reflection_info = __commonJS({ } return extensionType ? extensionType.fromJson(optionVal) : optionVal; } + __name(readMessageOption, "readMessageOption"); exports2.readMessageOption = readMessageOption; } }); @@ -21261,10 +21981,12 @@ var require_oneof = __commonJS({ return false; } } + __name(isOneofGroup, "isOneofGroup"); exports2.isOneofGroup = isOneofGroup; function getOneofValue(oneof, kind) { return oneof[kind]; } + __name(getOneofValue, "getOneofValue"); exports2.getOneofValue = getOneofValue; function setOneofValue(oneof, kind, value) { if (oneof.oneofKind !== void 0) { @@ -21275,6 +21997,7 @@ var require_oneof = __commonJS({ oneof[kind] = value; } } + __name(setOneofValue, "setOneofValue"); exports2.setOneofValue = setOneofValue; function setUnknownOneofValue(oneof, kind, value) { if (oneof.oneofKind !== void 0) { @@ -21285,6 +22008,7 @@ var require_oneof = __commonJS({ oneof[kind] = value; } } + __name(setUnknownOneofValue, "setUnknownOneofValue"); exports2.setUnknownOneofValue = setUnknownOneofValue; function clearOneofValue(oneof) { if (oneof.oneofKind !== void 0) { @@ -21292,6 +22016,7 @@ var require_oneof = __commonJS({ } oneof.oneofKind = void 0; } + __name(clearOneofValue, "clearOneofValue"); exports2.clearOneofValue = clearOneofValue; function getSelectedOneofValue(oneof) { if (oneof.oneofKind === void 0) { @@ -21299,6 +22024,7 @@ var require_oneof = __commonJS({ } return oneof[oneof.oneofKind]; } + __name(getSelectedOneofValue, "getSelectedOneofValue"); exports2.getSelectedOneofValue = getSelectedOneofValue; } }); @@ -21312,6 +22038,9 @@ var require_reflection_type_check = __commonJS({ var reflection_info_1 = require_reflection_info(); var oneof_1 = require_oneof(); var ReflectionTypeCheck = class { + static { + __name(this, "ReflectionTypeCheck"); + } constructor(info2) { var _a; this.fields = (_a = info2.fields) !== null && _a !== void 0 ? _a : []; @@ -21543,6 +22272,7 @@ var require_reflection_long_convert = __commonJS({ return long.toString(); } } + __name(reflectionLongConvert, "reflectionLongConvert"); exports2.reflectionLongConvert = reflectionLongConvert; } }); @@ -21560,6 +22290,9 @@ var require_reflection_json_reader = __commonJS({ var assert_1 = require_assert(); var reflection_long_convert_1 = require_reflection_long_convert(); var ReflectionJsonReader = class { + static { + __name(this, "ReflectionJsonReader"); + } constructor(info2) { this.info = info2; } @@ -21845,6 +22578,9 @@ var require_reflection_json_writer = __commonJS({ var reflection_info_1 = require_reflection_info(); var assert_1 = require_assert(); var ReflectionJsonWriter = class { + static { + __name(this, "ReflectionJsonWriter"); + } constructor(info2) { var _a; this.fields = (_a = info2.fields) !== null && _a !== void 0 ? _a : []; @@ -22076,6 +22812,7 @@ var require_reflection_scalar_default = __commonJS({ return 0; } } + __name(reflectionScalarDefault, "reflectionScalarDefault"); exports2.reflectionScalarDefault = reflectionScalarDefault; } }); @@ -22091,6 +22828,9 @@ var require_reflection_binary_reader = __commonJS({ var reflection_long_convert_1 = require_reflection_long_convert(); var reflection_scalar_default_1 = require_reflection_scalar_default(); var ReflectionBinaryReader = class { + static { + __name(this, "ReflectionBinaryReader"); + } constructor(info2) { this.info = info2; } @@ -22265,6 +23005,9 @@ var require_reflection_binary_writer = __commonJS({ var assert_1 = require_assert(); var pb_long_1 = require_pb_long(); var ReflectionBinaryWriter = class { + static { + __name(this, "ReflectionBinaryWriter"); + } constructor(info2) { this.info = info2; } @@ -22506,6 +23249,7 @@ var require_reflection_create = __commonJS({ } return msg; } + __name(reflectionCreate, "reflectionCreate"); exports2.reflectionCreate = reflectionCreate; } }); @@ -22576,6 +23320,7 @@ var require_reflection_merge_partial = __commonJS({ } } } + __name(reflectionMergePartial, "reflectionMergePartial"); exports2.reflectionMergePartial = reflectionMergePartial; } }); @@ -22616,6 +23361,7 @@ var require_reflection_equals = __commonJS({ } return true; } + __name(reflectionEquals, "reflectionEquals"); exports2.reflectionEquals = reflectionEquals; var objectValues = Object.values; function primitiveEq(type, a, b) { @@ -22632,6 +23378,7 @@ var require_reflection_equals = __commonJS({ return false; return true; } + __name(primitiveEq, "primitiveEq"); function repeatedPrimitiveEq(type, a, b) { if (a.length !== b.length) return false; @@ -22640,6 +23387,7 @@ var require_reflection_equals = __commonJS({ return false; return true; } + __name(repeatedPrimitiveEq, "repeatedPrimitiveEq"); function repeatedMsgEq(type, a, b) { if (a.length !== b.length) return false; @@ -22648,6 +23396,7 @@ var require_reflection_equals = __commonJS({ return false; return true; } + __name(repeatedMsgEq, "repeatedMsgEq"); } }); @@ -22673,6 +23422,9 @@ var require_message_type = __commonJS({ var binary_reader_1 = require_binary_reader(); var baseDescriptors = Object.getOwnPropertyDescriptors(Object.getPrototypeOf({})); var MessageType = class { + static { + __name(this, "MessageType"); + } constructor(name, fields, options) { this.defaultCheckDepth = 16; this.typeName = name; @@ -22838,6 +23590,7 @@ var require_reflection_contains_message_type = __commonJS({ function containsMessageType(msg) { return msg[message_type_contract_1.MESSAGE_TYPE] != null; } + __name(containsMessageType, "containsMessageType"); exports2.containsMessageType = containsMessageType; } }); @@ -22875,6 +23628,7 @@ var require_enum_object = __commonJS({ } return true; } + __name(isEnumObject, "isEnumObject"); exports2.isEnumObject = isEnumObject; function listEnumValues(enumObject) { if (!isEnumObject(enumObject)) @@ -22885,14 +23639,17 @@ var require_enum_object = __commonJS({ values.push({ name, number }); return values; } + __name(listEnumValues, "listEnumValues"); exports2.listEnumValues = listEnumValues; function listEnumNames(enumObject) { return listEnumValues(enumObject).map((val) => val.name); } + __name(listEnumNames, "listEnumNames"); exports2.listEnumNames = listEnumNames; function listEnumNumbers(enumObject) { return listEnumValues(enumObject).map((val) => val.number).filter((num, index, arr) => arr.indexOf(num) == index); } + __name(listEnumNumbers, "listEnumNumbers"); exports2.listEnumNumbers = listEnumNumbers; } }); @@ -22903,183 +23660,183 @@ var require_commonjs = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); var json_typings_1 = require_json_typings(); - Object.defineProperty(exports2, "typeofJsonValue", { enumerable: true, get: function() { + Object.defineProperty(exports2, "typeofJsonValue", { enumerable: true, get: /* @__PURE__ */ __name(function() { return json_typings_1.typeofJsonValue; - } }); - Object.defineProperty(exports2, "isJsonObject", { enumerable: true, get: function() { + }, "get") }); + Object.defineProperty(exports2, "isJsonObject", { enumerable: true, get: /* @__PURE__ */ __name(function() { return json_typings_1.isJsonObject; - } }); + }, "get") }); var base64_1 = require_base64(); - Object.defineProperty(exports2, "base64decode", { enumerable: true, get: function() { + Object.defineProperty(exports2, "base64decode", { enumerable: true, get: /* @__PURE__ */ __name(function() { return base64_1.base64decode; - } }); - Object.defineProperty(exports2, "base64encode", { enumerable: true, get: function() { + }, "get") }); + Object.defineProperty(exports2, "base64encode", { enumerable: true, get: /* @__PURE__ */ __name(function() { return base64_1.base64encode; - } }); + }, "get") }); var protobufjs_utf8_1 = require_protobufjs_utf8(); - Object.defineProperty(exports2, "utf8read", { enumerable: true, get: function() { + Object.defineProperty(exports2, "utf8read", { enumerable: true, get: /* @__PURE__ */ __name(function() { return protobufjs_utf8_1.utf8read; - } }); + }, "get") }); var binary_format_contract_1 = require_binary_format_contract(); - Object.defineProperty(exports2, "WireType", { enumerable: true, get: function() { + Object.defineProperty(exports2, "WireType", { enumerable: true, get: /* @__PURE__ */ __name(function() { return binary_format_contract_1.WireType; - } }); - Object.defineProperty(exports2, "mergeBinaryOptions", { enumerable: true, get: function() { + }, "get") }); + Object.defineProperty(exports2, "mergeBinaryOptions", { enumerable: true, get: /* @__PURE__ */ __name(function() { return binary_format_contract_1.mergeBinaryOptions; - } }); - Object.defineProperty(exports2, "UnknownFieldHandler", { enumerable: true, get: function() { + }, "get") }); + Object.defineProperty(exports2, "UnknownFieldHandler", { enumerable: true, get: /* @__PURE__ */ __name(function() { return binary_format_contract_1.UnknownFieldHandler; - } }); + }, "get") }); var binary_reader_1 = require_binary_reader(); - Object.defineProperty(exports2, "BinaryReader", { enumerable: true, get: function() { + Object.defineProperty(exports2, "BinaryReader", { enumerable: true, get: /* @__PURE__ */ __name(function() { return binary_reader_1.BinaryReader; - } }); - Object.defineProperty(exports2, "binaryReadOptions", { enumerable: true, get: function() { + }, "get") }); + Object.defineProperty(exports2, "binaryReadOptions", { enumerable: true, get: /* @__PURE__ */ __name(function() { return binary_reader_1.binaryReadOptions; - } }); + }, "get") }); var binary_writer_1 = require_binary_writer(); - Object.defineProperty(exports2, "BinaryWriter", { enumerable: true, get: function() { + Object.defineProperty(exports2, "BinaryWriter", { enumerable: true, get: /* @__PURE__ */ __name(function() { return binary_writer_1.BinaryWriter; - } }); - Object.defineProperty(exports2, "binaryWriteOptions", { enumerable: true, get: function() { + }, "get") }); + Object.defineProperty(exports2, "binaryWriteOptions", { enumerable: true, get: /* @__PURE__ */ __name(function() { return binary_writer_1.binaryWriteOptions; - } }); + }, "get") }); var pb_long_1 = require_pb_long(); - Object.defineProperty(exports2, "PbLong", { enumerable: true, get: function() { + Object.defineProperty(exports2, "PbLong", { enumerable: true, get: /* @__PURE__ */ __name(function() { return pb_long_1.PbLong; - } }); - Object.defineProperty(exports2, "PbULong", { enumerable: true, get: function() { + }, "get") }); + Object.defineProperty(exports2, "PbULong", { enumerable: true, get: /* @__PURE__ */ __name(function() { return pb_long_1.PbULong; - } }); + }, "get") }); var json_format_contract_1 = require_json_format_contract(); - Object.defineProperty(exports2, "jsonReadOptions", { enumerable: true, get: function() { + Object.defineProperty(exports2, "jsonReadOptions", { enumerable: true, get: /* @__PURE__ */ __name(function() { return json_format_contract_1.jsonReadOptions; - } }); - Object.defineProperty(exports2, "jsonWriteOptions", { enumerable: true, get: function() { + }, "get") }); + Object.defineProperty(exports2, "jsonWriteOptions", { enumerable: true, get: /* @__PURE__ */ __name(function() { return json_format_contract_1.jsonWriteOptions; - } }); - Object.defineProperty(exports2, "mergeJsonOptions", { enumerable: true, get: function() { + }, "get") }); + Object.defineProperty(exports2, "mergeJsonOptions", { enumerable: true, get: /* @__PURE__ */ __name(function() { return json_format_contract_1.mergeJsonOptions; - } }); + }, "get") }); var message_type_contract_1 = require_message_type_contract(); - Object.defineProperty(exports2, "MESSAGE_TYPE", { enumerable: true, get: function() { + Object.defineProperty(exports2, "MESSAGE_TYPE", { enumerable: true, get: /* @__PURE__ */ __name(function() { return message_type_contract_1.MESSAGE_TYPE; - } }); + }, "get") }); var message_type_1 = require_message_type(); - Object.defineProperty(exports2, "MessageType", { enumerable: true, get: function() { + Object.defineProperty(exports2, "MessageType", { enumerable: true, get: /* @__PURE__ */ __name(function() { return message_type_1.MessageType; - } }); + }, "get") }); var reflection_info_1 = require_reflection_info(); - Object.defineProperty(exports2, "ScalarType", { enumerable: true, get: function() { + Object.defineProperty(exports2, "ScalarType", { enumerable: true, get: /* @__PURE__ */ __name(function() { return reflection_info_1.ScalarType; - } }); - Object.defineProperty(exports2, "LongType", { enumerable: true, get: function() { + }, "get") }); + Object.defineProperty(exports2, "LongType", { enumerable: true, get: /* @__PURE__ */ __name(function() { return reflection_info_1.LongType; - } }); - Object.defineProperty(exports2, "RepeatType", { enumerable: true, get: function() { + }, "get") }); + Object.defineProperty(exports2, "RepeatType", { enumerable: true, get: /* @__PURE__ */ __name(function() { return reflection_info_1.RepeatType; - } }); - Object.defineProperty(exports2, "normalizeFieldInfo", { enumerable: true, get: function() { + }, "get") }); + Object.defineProperty(exports2, "normalizeFieldInfo", { enumerable: true, get: /* @__PURE__ */ __name(function() { return reflection_info_1.normalizeFieldInfo; - } }); - Object.defineProperty(exports2, "readFieldOptions", { enumerable: true, get: function() { + }, "get") }); + Object.defineProperty(exports2, "readFieldOptions", { enumerable: true, get: /* @__PURE__ */ __name(function() { return reflection_info_1.readFieldOptions; - } }); - Object.defineProperty(exports2, "readFieldOption", { enumerable: true, get: function() { + }, "get") }); + Object.defineProperty(exports2, "readFieldOption", { enumerable: true, get: /* @__PURE__ */ __name(function() { return reflection_info_1.readFieldOption; - } }); - Object.defineProperty(exports2, "readMessageOption", { enumerable: true, get: function() { + }, "get") }); + Object.defineProperty(exports2, "readMessageOption", { enumerable: true, get: /* @__PURE__ */ __name(function() { return reflection_info_1.readMessageOption; - } }); + }, "get") }); var reflection_type_check_1 = require_reflection_type_check(); - Object.defineProperty(exports2, "ReflectionTypeCheck", { enumerable: true, get: function() { + Object.defineProperty(exports2, "ReflectionTypeCheck", { enumerable: true, get: /* @__PURE__ */ __name(function() { return reflection_type_check_1.ReflectionTypeCheck; - } }); + }, "get") }); var reflection_create_1 = require_reflection_create(); - Object.defineProperty(exports2, "reflectionCreate", { enumerable: true, get: function() { + Object.defineProperty(exports2, "reflectionCreate", { enumerable: true, get: /* @__PURE__ */ __name(function() { return reflection_create_1.reflectionCreate; - } }); + }, "get") }); var reflection_scalar_default_1 = require_reflection_scalar_default(); - Object.defineProperty(exports2, "reflectionScalarDefault", { enumerable: true, get: function() { + Object.defineProperty(exports2, "reflectionScalarDefault", { enumerable: true, get: /* @__PURE__ */ __name(function() { return reflection_scalar_default_1.reflectionScalarDefault; - } }); + }, "get") }); var reflection_merge_partial_1 = require_reflection_merge_partial(); - Object.defineProperty(exports2, "reflectionMergePartial", { enumerable: true, get: function() { + Object.defineProperty(exports2, "reflectionMergePartial", { enumerable: true, get: /* @__PURE__ */ __name(function() { return reflection_merge_partial_1.reflectionMergePartial; - } }); + }, "get") }); var reflection_equals_1 = require_reflection_equals(); - Object.defineProperty(exports2, "reflectionEquals", { enumerable: true, get: function() { + Object.defineProperty(exports2, "reflectionEquals", { enumerable: true, get: /* @__PURE__ */ __name(function() { return reflection_equals_1.reflectionEquals; - } }); + }, "get") }); var reflection_binary_reader_1 = require_reflection_binary_reader(); - Object.defineProperty(exports2, "ReflectionBinaryReader", { enumerable: true, get: function() { + Object.defineProperty(exports2, "ReflectionBinaryReader", { enumerable: true, get: /* @__PURE__ */ __name(function() { return reflection_binary_reader_1.ReflectionBinaryReader; - } }); + }, "get") }); var reflection_binary_writer_1 = require_reflection_binary_writer(); - Object.defineProperty(exports2, "ReflectionBinaryWriter", { enumerable: true, get: function() { + Object.defineProperty(exports2, "ReflectionBinaryWriter", { enumerable: true, get: /* @__PURE__ */ __name(function() { return reflection_binary_writer_1.ReflectionBinaryWriter; - } }); + }, "get") }); var reflection_json_reader_1 = require_reflection_json_reader(); - Object.defineProperty(exports2, "ReflectionJsonReader", { enumerable: true, get: function() { + Object.defineProperty(exports2, "ReflectionJsonReader", { enumerable: true, get: /* @__PURE__ */ __name(function() { return reflection_json_reader_1.ReflectionJsonReader; - } }); + }, "get") }); var reflection_json_writer_1 = require_reflection_json_writer(); - Object.defineProperty(exports2, "ReflectionJsonWriter", { enumerable: true, get: function() { + Object.defineProperty(exports2, "ReflectionJsonWriter", { enumerable: true, get: /* @__PURE__ */ __name(function() { return reflection_json_writer_1.ReflectionJsonWriter; - } }); + }, "get") }); var reflection_contains_message_type_1 = require_reflection_contains_message_type(); - Object.defineProperty(exports2, "containsMessageType", { enumerable: true, get: function() { + Object.defineProperty(exports2, "containsMessageType", { enumerable: true, get: /* @__PURE__ */ __name(function() { return reflection_contains_message_type_1.containsMessageType; - } }); + }, "get") }); var oneof_1 = require_oneof(); - Object.defineProperty(exports2, "isOneofGroup", { enumerable: true, get: function() { + Object.defineProperty(exports2, "isOneofGroup", { enumerable: true, get: /* @__PURE__ */ __name(function() { return oneof_1.isOneofGroup; - } }); - Object.defineProperty(exports2, "setOneofValue", { enumerable: true, get: function() { + }, "get") }); + Object.defineProperty(exports2, "setOneofValue", { enumerable: true, get: /* @__PURE__ */ __name(function() { return oneof_1.setOneofValue; - } }); - Object.defineProperty(exports2, "getOneofValue", { enumerable: true, get: function() { + }, "get") }); + Object.defineProperty(exports2, "getOneofValue", { enumerable: true, get: /* @__PURE__ */ __name(function() { return oneof_1.getOneofValue; - } }); - Object.defineProperty(exports2, "clearOneofValue", { enumerable: true, get: function() { + }, "get") }); + Object.defineProperty(exports2, "clearOneofValue", { enumerable: true, get: /* @__PURE__ */ __name(function() { return oneof_1.clearOneofValue; - } }); - Object.defineProperty(exports2, "getSelectedOneofValue", { enumerable: true, get: function() { + }, "get") }); + Object.defineProperty(exports2, "getSelectedOneofValue", { enumerable: true, get: /* @__PURE__ */ __name(function() { return oneof_1.getSelectedOneofValue; - } }); + }, "get") }); var enum_object_1 = require_enum_object(); - Object.defineProperty(exports2, "listEnumValues", { enumerable: true, get: function() { + Object.defineProperty(exports2, "listEnumValues", { enumerable: true, get: /* @__PURE__ */ __name(function() { return enum_object_1.listEnumValues; - } }); - Object.defineProperty(exports2, "listEnumNames", { enumerable: true, get: function() { + }, "get") }); + Object.defineProperty(exports2, "listEnumNames", { enumerable: true, get: /* @__PURE__ */ __name(function() { return enum_object_1.listEnumNames; - } }); - Object.defineProperty(exports2, "listEnumNumbers", { enumerable: true, get: function() { + }, "get") }); + Object.defineProperty(exports2, "listEnumNumbers", { enumerable: true, get: /* @__PURE__ */ __name(function() { return enum_object_1.listEnumNumbers; - } }); - Object.defineProperty(exports2, "isEnumObject", { enumerable: true, get: function() { + }, "get") }); + Object.defineProperty(exports2, "isEnumObject", { enumerable: true, get: /* @__PURE__ */ __name(function() { return enum_object_1.isEnumObject; - } }); + }, "get") }); var lower_camel_case_1 = require_lower_camel_case(); - Object.defineProperty(exports2, "lowerCamelCase", { enumerable: true, get: function() { + Object.defineProperty(exports2, "lowerCamelCase", { enumerable: true, get: /* @__PURE__ */ __name(function() { return lower_camel_case_1.lowerCamelCase; - } }); + }, "get") }); var assert_1 = require_assert(); - Object.defineProperty(exports2, "assert", { enumerable: true, get: function() { + Object.defineProperty(exports2, "assert", { enumerable: true, get: /* @__PURE__ */ __name(function() { return assert_1.assert; - } }); - Object.defineProperty(exports2, "assertNever", { enumerable: true, get: function() { + }, "get") }); + Object.defineProperty(exports2, "assertNever", { enumerable: true, get: /* @__PURE__ */ __name(function() { return assert_1.assertNever; - } }); - Object.defineProperty(exports2, "assertInt32", { enumerable: true, get: function() { + }, "get") }); + Object.defineProperty(exports2, "assertInt32", { enumerable: true, get: /* @__PURE__ */ __name(function() { return assert_1.assertInt32; - } }); - Object.defineProperty(exports2, "assertUInt32", { enumerable: true, get: function() { + }, "get") }); + Object.defineProperty(exports2, "assertUInt32", { enumerable: true, get: /* @__PURE__ */ __name(function() { return assert_1.assertUInt32; - } }); - Object.defineProperty(exports2, "assertFloat32", { enumerable: true, get: function() { + }, "get") }); + Object.defineProperty(exports2, "assertFloat32", { enumerable: true, get: /* @__PURE__ */ __name(function() { return assert_1.assertFloat32; - } }); + }, "get") }); } }); @@ -23097,6 +23854,9 @@ var require_timestamp = __commonJS({ var runtime_6 = require_commonjs(); var runtime_7 = require_commonjs(); var Timestamp$Type = class extends runtime_7.MessageType { + static { + __name(this, "Timestamp$Type"); + } constructor() { super("google.protobuf.Timestamp", [ { @@ -23246,6 +24006,9 @@ var require_wrappers = __commonJS({ var runtime_6 = require_commonjs(); var runtime_7 = require_commonjs(); var DoubleValue$Type = class extends runtime_7.MessageType { + static { + __name(this, "DoubleValue$Type"); + } constructor() { super("google.protobuf.DoubleValue", [ { @@ -23310,6 +24073,9 @@ var require_wrappers = __commonJS({ }; exports2.DoubleValue = new DoubleValue$Type(); var FloatValue$Type = class extends runtime_7.MessageType { + static { + __name(this, "FloatValue$Type"); + } constructor() { super("google.protobuf.FloatValue", [ { @@ -23374,6 +24140,9 @@ var require_wrappers = __commonJS({ }; exports2.FloatValue = new FloatValue$Type(); var Int64Value$Type = class extends runtime_7.MessageType { + static { + __name(this, "Int64Value$Type"); + } constructor() { super("google.protobuf.Int64Value", [ { @@ -23438,6 +24207,9 @@ var require_wrappers = __commonJS({ }; exports2.Int64Value = new Int64Value$Type(); var UInt64Value$Type = class extends runtime_7.MessageType { + static { + __name(this, "UInt64Value$Type"); + } constructor() { super("google.protobuf.UInt64Value", [ { @@ -23502,6 +24274,9 @@ var require_wrappers = __commonJS({ }; exports2.UInt64Value = new UInt64Value$Type(); var Int32Value$Type = class extends runtime_7.MessageType { + static { + __name(this, "Int32Value$Type"); + } constructor() { super("google.protobuf.Int32Value", [ { @@ -23566,6 +24341,9 @@ var require_wrappers = __commonJS({ }; exports2.Int32Value = new Int32Value$Type(); var UInt32Value$Type = class extends runtime_7.MessageType { + static { + __name(this, "UInt32Value$Type"); + } constructor() { super("google.protobuf.UInt32Value", [ { @@ -23630,6 +24408,9 @@ var require_wrappers = __commonJS({ }; exports2.UInt32Value = new UInt32Value$Type(); var BoolValue$Type = class extends runtime_7.MessageType { + static { + __name(this, "BoolValue$Type"); + } constructor() { super("google.protobuf.BoolValue", [ { @@ -23694,6 +24475,9 @@ var require_wrappers = __commonJS({ }; exports2.BoolValue = new BoolValue$Type(); var StringValue$Type = class extends runtime_7.MessageType { + static { + __name(this, "StringValue$Type"); + } constructor() { super("google.protobuf.StringValue", [ { @@ -23758,6 +24542,9 @@ var require_wrappers = __commonJS({ }; exports2.StringValue = new StringValue$Type(); var BytesValue$Type = class extends runtime_7.MessageType { + static { + __name(this, "BytesValue$Type"); + } constructor() { super("google.protobuf.BytesValue", [ { @@ -23842,12 +24629,14 @@ var require_reflection_info2 = __commonJS({ m.idempotency = (_c = m.idempotency) !== null && _c !== void 0 ? _c : void 0; return m; } + __name(normalizeMethodInfo, "normalizeMethodInfo"); exports2.normalizeMethodInfo = normalizeMethodInfo; function readMethodOptions(service, methodName, extensionName, extensionType) { var _a; const options = (_a = service.methods.find((m, i) => m.localName === methodName || i === methodName)) === null || _a === void 0 ? void 0 : _a.options; return options && options[extensionName] ? extensionType.fromJson(options[extensionName]) : void 0; } + __name(readMethodOptions, "readMethodOptions"); exports2.readMethodOptions = readMethodOptions; function readMethodOption(service, methodName, extensionName, extensionType) { var _a; @@ -23861,6 +24650,7 @@ var require_reflection_info2 = __commonJS({ } return extensionType ? extensionType.fromJson(optionVal) : optionVal; } + __name(readMethodOption, "readMethodOption"); exports2.readMethodOption = readMethodOption; function readServiceOption(service, extensionName, extensionType) { const options = service.options; @@ -23873,6 +24663,7 @@ var require_reflection_info2 = __commonJS({ } return extensionType ? extensionType.fromJson(optionVal) : optionVal; } + __name(readServiceOption, "readServiceOption"); exports2.readServiceOption = readServiceOption; } }); @@ -23885,6 +24676,9 @@ var require_service_type = __commonJS({ exports2.ServiceType = void 0; var reflection_info_1 = require_reflection_info2(); var ServiceType = class { + static { + __name(this, "ServiceType"); + } constructor(typeName, methods, options) { this.typeName = typeName; this.methods = methods.map((i) => reflection_info_1.normalizeMethodInfo(i, this)); @@ -23902,6 +24696,9 @@ var require_rpc_error = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.RpcError = void 0; var RpcError = class extends Error { + static { + __name(this, "RpcError"); + } constructor(message, code = "UNKNOWN", meta) { super(message); this.name = "RpcError"; @@ -23967,6 +24764,7 @@ var require_rpc_options = __commonJS({ } return o; } + __name(mergeRpcOptions, "mergeRpcOptions"); exports2.mergeRpcOptions = mergeRpcOptions; function copy(a, into) { if (!a) @@ -23981,6 +24779,7 @@ var require_rpc_options = __commonJS({ c[k] = v; } } + __name(copy, "copy"); } }); @@ -23997,6 +24796,9 @@ var require_deferred = __commonJS({ DeferredState2[DeferredState2["RESOLVED"] = 2] = "RESOLVED"; })(DeferredState = exports2.DeferredState || (exports2.DeferredState = {})); var Deferred = class { + static { + __name(this, "Deferred"); + } /** * @param preventUnhandledRejectionWarning - prevents the warning * "Unhandled Promise rejection" by adding a noop rejection handler. @@ -24078,6 +24880,9 @@ var require_rpc_output_stream = __commonJS({ var deferred_1 = require_deferred(); var runtime_1 = require_commonjs(); var RpcOutputStreamController = class { + static { + __name(this, "RpcOutputStreamController"); + } constructor() { this._lis = { nxt: [], @@ -24193,7 +24998,7 @@ var require_rpc_output_stream = __commonJS({ else if (this._closed !== false) this.pushIt(this._closed); return { - next: () => { + next: /* @__PURE__ */ __name(() => { let state = this._itState; runtime_1.assert(state, "bad state"); runtime_1.assert(!state.p, "iterator contract broken"); @@ -24202,7 +25007,7 @@ var require_rpc_output_stream = __commonJS({ return "value" in first ? Promise.resolve(first) : Promise.reject(first); state.p = new deferred_1.Deferred(); return state.p.promise; - } + }, "next") }; } // "push" a new iterator result. @@ -24235,6 +25040,7 @@ var require_unary_call = __commonJS({ resolve(value); }); } + __name(adopt, "adopt"); return new (P || (P = Promise))(function(resolve, reject) { function fulfilled(value) { try { @@ -24243,6 +25049,7 @@ var require_unary_call = __commonJS({ reject(e); } } + __name(fulfilled, "fulfilled"); function rejected(value) { try { step(generator["throw"](value)); @@ -24250,15 +25057,20 @@ var require_unary_call = __commonJS({ reject(e); } } + __name(rejected, "rejected"); function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + __name(step, "step"); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.UnaryCall = void 0; var UnaryCall = class { + static { + __name(this, "UnaryCall"); + } constructor(method, requestHeaders, request, headers, response, status, trailers) { this.method = method; this.requestHeaders = requestHeaders; @@ -24304,6 +25116,7 @@ var require_server_streaming_call = __commonJS({ resolve(value); }); } + __name(adopt, "adopt"); return new (P || (P = Promise))(function(resolve, reject) { function fulfilled(value) { try { @@ -24312,6 +25125,7 @@ var require_server_streaming_call = __commonJS({ reject(e); } } + __name(fulfilled, "fulfilled"); function rejected(value) { try { step(generator["throw"](value)); @@ -24319,15 +25133,20 @@ var require_server_streaming_call = __commonJS({ reject(e); } } + __name(rejected, "rejected"); function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + __name(step, "step"); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ServerStreamingCall = void 0; var ServerStreamingCall = class { + static { + __name(this, "ServerStreamingCall"); + } constructor(method, requestHeaders, request, headers, response, status, trailers) { this.method = method; this.requestHeaders = requestHeaders; @@ -24374,6 +25193,7 @@ var require_client_streaming_call = __commonJS({ resolve(value); }); } + __name(adopt, "adopt"); return new (P || (P = Promise))(function(resolve, reject) { function fulfilled(value) { try { @@ -24382,6 +25202,7 @@ var require_client_streaming_call = __commonJS({ reject(e); } } + __name(fulfilled, "fulfilled"); function rejected(value) { try { step(generator["throw"](value)); @@ -24389,15 +25210,20 @@ var require_client_streaming_call = __commonJS({ reject(e); } } + __name(rejected, "rejected"); function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + __name(step, "step"); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ClientStreamingCall = void 0; var ClientStreamingCall = class { + static { + __name(this, "ClientStreamingCall"); + } constructor(method, requestHeaders, request, headers, response, status, trailers) { this.method = method; this.requestHeaders = requestHeaders; @@ -24443,6 +25269,7 @@ var require_duplex_streaming_call = __commonJS({ resolve(value); }); } + __name(adopt, "adopt"); return new (P || (P = Promise))(function(resolve, reject) { function fulfilled(value) { try { @@ -24451,6 +25278,7 @@ var require_duplex_streaming_call = __commonJS({ reject(e); } } + __name(fulfilled, "fulfilled"); function rejected(value) { try { step(generator["throw"](value)); @@ -24458,15 +25286,20 @@ var require_duplex_streaming_call = __commonJS({ reject(e); } } + __name(rejected, "rejected"); function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + __name(step, "step"); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DuplexStreamingCall = void 0; var DuplexStreamingCall = class { + static { + __name(this, "DuplexStreamingCall"); + } constructor(method, requestHeaders, request, headers, response, status, trailers) { this.method = method; this.requestHeaders = requestHeaders; @@ -24511,6 +25344,7 @@ var require_test_transport = __commonJS({ resolve(value); }); } + __name(adopt, "adopt"); return new (P || (P = Promise))(function(resolve, reject) { function fulfilled(value) { try { @@ -24519,6 +25353,7 @@ var require_test_transport = __commonJS({ reject(e); } } + __name(fulfilled, "fulfilled"); function rejected(value) { try { step(generator["throw"](value)); @@ -24526,9 +25361,11 @@ var require_test_transport = __commonJS({ reject(e); } } + __name(rejected, "rejected"); function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + __name(step, "step"); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; @@ -24543,6 +25380,9 @@ var require_test_transport = __commonJS({ var client_streaming_call_1 = require_client_streaming_call(); var duplex_streaming_call_1 = require_duplex_streaming_call(); var TestTransport = class _TestTransport { + static { + __name(this, "TestTransport"); + } /** * Initialize with mock data. Omitted fields have default value. */ @@ -24738,7 +25578,11 @@ var require_test_transport = __commonJS({ } }); } + __name(delay, "delay"); var TestInputStream = class { + static { + __name(this, "TestInputStream"); + } constructor(data, abort) { this._completed = false; this._sent = []; @@ -24783,55 +25627,60 @@ var require_rpc_interceptor = __commonJS({ function stackIntercept(kind, transport, method, options, input) { var _a, _b, _c, _d; if (kind == "unary") { - let tail = (mtd, inp, opt) => transport.unary(mtd, inp, opt); + let tail = /* @__PURE__ */ __name((mtd, inp, opt) => transport.unary(mtd, inp, opt), "tail"); for (const curr of ((_a = options.interceptors) !== null && _a !== void 0 ? _a : []).filter((i) => i.interceptUnary).reverse()) { const next = tail; - tail = (mtd, inp, opt) => curr.interceptUnary(next, mtd, inp, opt); + tail = /* @__PURE__ */ __name((mtd, inp, opt) => curr.interceptUnary(next, mtd, inp, opt), "tail"); } return tail(method, input, options); } if (kind == "serverStreaming") { - let tail = (mtd, inp, opt) => transport.serverStreaming(mtd, inp, opt); + let tail = /* @__PURE__ */ __name((mtd, inp, opt) => transport.serverStreaming(mtd, inp, opt), "tail"); for (const curr of ((_b = options.interceptors) !== null && _b !== void 0 ? _b : []).filter((i) => i.interceptServerStreaming).reverse()) { const next = tail; - tail = (mtd, inp, opt) => curr.interceptServerStreaming(next, mtd, inp, opt); + tail = /* @__PURE__ */ __name((mtd, inp, opt) => curr.interceptServerStreaming(next, mtd, inp, opt), "tail"); } return tail(method, input, options); } if (kind == "clientStreaming") { - let tail = (mtd, opt) => transport.clientStreaming(mtd, opt); + let tail = /* @__PURE__ */ __name((mtd, opt) => transport.clientStreaming(mtd, opt), "tail"); for (const curr of ((_c = options.interceptors) !== null && _c !== void 0 ? _c : []).filter((i) => i.interceptClientStreaming).reverse()) { const next = tail; - tail = (mtd, opt) => curr.interceptClientStreaming(next, mtd, opt); + tail = /* @__PURE__ */ __name((mtd, opt) => curr.interceptClientStreaming(next, mtd, opt), "tail"); } return tail(method, options); } if (kind == "duplex") { - let tail = (mtd, opt) => transport.duplex(mtd, opt); + let tail = /* @__PURE__ */ __name((mtd, opt) => transport.duplex(mtd, opt), "tail"); for (const curr of ((_d = options.interceptors) !== null && _d !== void 0 ? _d : []).filter((i) => i.interceptDuplex).reverse()) { const next = tail; - tail = (mtd, opt) => curr.interceptDuplex(next, mtd, opt); + tail = /* @__PURE__ */ __name((mtd, opt) => curr.interceptDuplex(next, mtd, opt), "tail"); } return tail(method, options); } runtime_1.assertNever(kind); } + __name(stackIntercept, "stackIntercept"); exports2.stackIntercept = stackIntercept; function stackUnaryInterceptors(transport, method, input, options) { return stackIntercept("unary", transport, method, options, input); } + __name(stackUnaryInterceptors, "stackUnaryInterceptors"); exports2.stackUnaryInterceptors = stackUnaryInterceptors; function stackServerStreamingInterceptors(transport, method, input, options) { return stackIntercept("serverStreaming", transport, method, options, input); } + __name(stackServerStreamingInterceptors, "stackServerStreamingInterceptors"); exports2.stackServerStreamingInterceptors = stackServerStreamingInterceptors; function stackClientStreamingInterceptors(transport, method, options) { return stackIntercept("clientStreaming", transport, method, options); } + __name(stackClientStreamingInterceptors, "stackClientStreamingInterceptors"); exports2.stackClientStreamingInterceptors = stackClientStreamingInterceptors; function stackDuplexStreamingInterceptors(transport, method, options) { return stackIntercept("duplex", transport, method, options); } + __name(stackDuplexStreamingInterceptors, "stackDuplexStreamingInterceptors"); exports2.stackDuplexStreamingInterceptors = stackDuplexStreamingInterceptors; } }); @@ -24843,6 +25692,9 @@ var require_server_call_context = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ServerCallContextController = void 0; var ServerCallContextController = class { + static { + __name(this, "ServerCallContextController"); + } constructor(method, headers, deadline, sendResponseHeadersFn, defaultStatus = { code: "OK", detail: "" }) { this._cancelled = false; this._listeners = []; @@ -24908,78 +25760,78 @@ var require_commonjs2 = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); var service_type_1 = require_service_type(); - Object.defineProperty(exports2, "ServiceType", { enumerable: true, get: function() { + Object.defineProperty(exports2, "ServiceType", { enumerable: true, get: /* @__PURE__ */ __name(function() { return service_type_1.ServiceType; - } }); + }, "get") }); var reflection_info_1 = require_reflection_info2(); - Object.defineProperty(exports2, "readMethodOptions", { enumerable: true, get: function() { + Object.defineProperty(exports2, "readMethodOptions", { enumerable: true, get: /* @__PURE__ */ __name(function() { return reflection_info_1.readMethodOptions; - } }); - Object.defineProperty(exports2, "readMethodOption", { enumerable: true, get: function() { + }, "get") }); + Object.defineProperty(exports2, "readMethodOption", { enumerable: true, get: /* @__PURE__ */ __name(function() { return reflection_info_1.readMethodOption; - } }); - Object.defineProperty(exports2, "readServiceOption", { enumerable: true, get: function() { + }, "get") }); + Object.defineProperty(exports2, "readServiceOption", { enumerable: true, get: /* @__PURE__ */ __name(function() { return reflection_info_1.readServiceOption; - } }); + }, "get") }); var rpc_error_1 = require_rpc_error(); - Object.defineProperty(exports2, "RpcError", { enumerable: true, get: function() { + Object.defineProperty(exports2, "RpcError", { enumerable: true, get: /* @__PURE__ */ __name(function() { return rpc_error_1.RpcError; - } }); + }, "get") }); var rpc_options_1 = require_rpc_options(); - Object.defineProperty(exports2, "mergeRpcOptions", { enumerable: true, get: function() { + Object.defineProperty(exports2, "mergeRpcOptions", { enumerable: true, get: /* @__PURE__ */ __name(function() { return rpc_options_1.mergeRpcOptions; - } }); + }, "get") }); var rpc_output_stream_1 = require_rpc_output_stream(); - Object.defineProperty(exports2, "RpcOutputStreamController", { enumerable: true, get: function() { + Object.defineProperty(exports2, "RpcOutputStreamController", { enumerable: true, get: /* @__PURE__ */ __name(function() { return rpc_output_stream_1.RpcOutputStreamController; - } }); + }, "get") }); var test_transport_1 = require_test_transport(); - Object.defineProperty(exports2, "TestTransport", { enumerable: true, get: function() { + Object.defineProperty(exports2, "TestTransport", { enumerable: true, get: /* @__PURE__ */ __name(function() { return test_transport_1.TestTransport; - } }); + }, "get") }); var deferred_1 = require_deferred(); - Object.defineProperty(exports2, "Deferred", { enumerable: true, get: function() { + Object.defineProperty(exports2, "Deferred", { enumerable: true, get: /* @__PURE__ */ __name(function() { return deferred_1.Deferred; - } }); - Object.defineProperty(exports2, "DeferredState", { enumerable: true, get: function() { + }, "get") }); + Object.defineProperty(exports2, "DeferredState", { enumerable: true, get: /* @__PURE__ */ __name(function() { return deferred_1.DeferredState; - } }); + }, "get") }); var duplex_streaming_call_1 = require_duplex_streaming_call(); - Object.defineProperty(exports2, "DuplexStreamingCall", { enumerable: true, get: function() { + Object.defineProperty(exports2, "DuplexStreamingCall", { enumerable: true, get: /* @__PURE__ */ __name(function() { return duplex_streaming_call_1.DuplexStreamingCall; - } }); + }, "get") }); var client_streaming_call_1 = require_client_streaming_call(); - Object.defineProperty(exports2, "ClientStreamingCall", { enumerable: true, get: function() { + Object.defineProperty(exports2, "ClientStreamingCall", { enumerable: true, get: /* @__PURE__ */ __name(function() { return client_streaming_call_1.ClientStreamingCall; - } }); + }, "get") }); var server_streaming_call_1 = require_server_streaming_call(); - Object.defineProperty(exports2, "ServerStreamingCall", { enumerable: true, get: function() { + Object.defineProperty(exports2, "ServerStreamingCall", { enumerable: true, get: /* @__PURE__ */ __name(function() { return server_streaming_call_1.ServerStreamingCall; - } }); + }, "get") }); var unary_call_1 = require_unary_call(); - Object.defineProperty(exports2, "UnaryCall", { enumerable: true, get: function() { + Object.defineProperty(exports2, "UnaryCall", { enumerable: true, get: /* @__PURE__ */ __name(function() { return unary_call_1.UnaryCall; - } }); + }, "get") }); var rpc_interceptor_1 = require_rpc_interceptor(); - Object.defineProperty(exports2, "stackIntercept", { enumerable: true, get: function() { + Object.defineProperty(exports2, "stackIntercept", { enumerable: true, get: /* @__PURE__ */ __name(function() { return rpc_interceptor_1.stackIntercept; - } }); - Object.defineProperty(exports2, "stackDuplexStreamingInterceptors", { enumerable: true, get: function() { + }, "get") }); + Object.defineProperty(exports2, "stackDuplexStreamingInterceptors", { enumerable: true, get: /* @__PURE__ */ __name(function() { return rpc_interceptor_1.stackDuplexStreamingInterceptors; - } }); - Object.defineProperty(exports2, "stackClientStreamingInterceptors", { enumerable: true, get: function() { + }, "get") }); + Object.defineProperty(exports2, "stackClientStreamingInterceptors", { enumerable: true, get: /* @__PURE__ */ __name(function() { return rpc_interceptor_1.stackClientStreamingInterceptors; - } }); - Object.defineProperty(exports2, "stackServerStreamingInterceptors", { enumerable: true, get: function() { + }, "get") }); + Object.defineProperty(exports2, "stackServerStreamingInterceptors", { enumerable: true, get: /* @__PURE__ */ __name(function() { return rpc_interceptor_1.stackServerStreamingInterceptors; - } }); - Object.defineProperty(exports2, "stackUnaryInterceptors", { enumerable: true, get: function() { + }, "get") }); + Object.defineProperty(exports2, "stackUnaryInterceptors", { enumerable: true, get: /* @__PURE__ */ __name(function() { return rpc_interceptor_1.stackUnaryInterceptors; - } }); + }, "get") }); var server_call_context_1 = require_server_call_context(); - Object.defineProperty(exports2, "ServerCallContextController", { enumerable: true, get: function() { + Object.defineProperty(exports2, "ServerCallContextController", { enumerable: true, get: /* @__PURE__ */ __name(function() { return server_call_context_1.ServerCallContextController; - } }); + }, "get") }); } }); @@ -24999,6 +25851,9 @@ var require_artifact = __commonJS({ var wrappers_2 = require_wrappers(); var timestamp_1 = require_timestamp(); var CreateArtifactRequest$Type = class extends runtime_5.MessageType { + static { + __name(this, "CreateArtifactRequest$Type"); + } constructor() { super("github.actions.results.api.v1.CreateArtifactRequest", [ { @@ -25022,7 +25877,7 @@ var require_artifact = __commonJS({ T: 9 /*ScalarType.STRING*/ }, - { no: 4, name: "expires_at", kind: "message", T: () => timestamp_1.Timestamp }, + { no: 4, name: "expires_at", kind: "message", T: /* @__PURE__ */ __name(() => timestamp_1.Timestamp, "T") }, { no: 5, name: "version", @@ -25094,6 +25949,9 @@ var require_artifact = __commonJS({ }; exports2.CreateArtifactRequest = new CreateArtifactRequest$Type(); var CreateArtifactResponse$Type = class extends runtime_5.MessageType { + static { + __name(this, "CreateArtifactResponse$Type"); + } constructor() { super("github.actions.results.api.v1.CreateArtifactResponse", [ { @@ -25156,6 +26014,9 @@ var require_artifact = __commonJS({ }; exports2.CreateArtifactResponse = new CreateArtifactResponse$Type(); var FinalizeArtifactRequest$Type = class extends runtime_5.MessageType { + static { + __name(this, "FinalizeArtifactRequest$Type"); + } constructor() { super("github.actions.results.api.v1.FinalizeArtifactRequest", [ { @@ -25186,7 +26047,7 @@ var require_artifact = __commonJS({ T: 3 /*ScalarType.INT64*/ }, - { no: 5, name: "hash", kind: "message", T: () => wrappers_2.StringValue } + { no: 5, name: "hash", kind: "message", T: /* @__PURE__ */ __name(() => wrappers_2.StringValue, "T") } ]); } create(value) { @@ -25251,6 +26112,9 @@ var require_artifact = __commonJS({ }; exports2.FinalizeArtifactRequest = new FinalizeArtifactRequest$Type(); var FinalizeArtifactResponse$Type = class extends runtime_5.MessageType { + static { + __name(this, "FinalizeArtifactResponse$Type"); + } constructor() { super("github.actions.results.api.v1.FinalizeArtifactResponse", [ { @@ -25313,6 +26177,9 @@ var require_artifact = __commonJS({ }; exports2.FinalizeArtifactResponse = new FinalizeArtifactResponse$Type(); var ListArtifactsRequest$Type = class extends runtime_5.MessageType { + static { + __name(this, "ListArtifactsRequest$Type"); + } constructor() { super("github.actions.results.api.v1.ListArtifactsRequest", [ { @@ -25329,8 +26196,8 @@ var require_artifact = __commonJS({ T: 9 /*ScalarType.STRING*/ }, - { no: 3, name: "name_filter", kind: "message", T: () => wrappers_2.StringValue }, - { no: 4, name: "id_filter", kind: "message", T: () => wrappers_1.Int64Value } + { no: 3, name: "name_filter", kind: "message", T: /* @__PURE__ */ __name(() => wrappers_2.StringValue, "T") }, + { no: 4, name: "id_filter", kind: "message", T: /* @__PURE__ */ __name(() => wrappers_1.Int64Value, "T") } ]); } create(value) { @@ -25389,9 +26256,12 @@ var require_artifact = __commonJS({ }; exports2.ListArtifactsRequest = new ListArtifactsRequest$Type(); var ListArtifactsResponse$Type = class extends runtime_5.MessageType { + static { + __name(this, "ListArtifactsResponse$Type"); + } constructor() { super("github.actions.results.api.v1.ListArtifactsResponse", [ - { no: 1, name: "artifacts", kind: "message", repeat: 1, T: () => exports2.ListArtifactsResponse_MonolithArtifact } + { no: 1, name: "artifacts", kind: "message", repeat: 1, T: /* @__PURE__ */ __name(() => exports2.ListArtifactsResponse_MonolithArtifact, "T") } ]); } create(value) { @@ -25432,6 +26302,9 @@ var require_artifact = __commonJS({ }; exports2.ListArtifactsResponse = new ListArtifactsResponse$Type(); var ListArtifactsResponse_MonolithArtifact$Type = class extends runtime_5.MessageType { + static { + __name(this, "ListArtifactsResponse_MonolithArtifact$Type"); + } constructor() { super("github.actions.results.api.v1.ListArtifactsResponse.MonolithArtifact", [ { @@ -25469,7 +26342,7 @@ var require_artifact = __commonJS({ T: 3 /*ScalarType.INT64*/ }, - { no: 6, name: "created_at", kind: "message", T: () => timestamp_1.Timestamp } + { no: 6, name: "created_at", kind: "message", T: /* @__PURE__ */ __name(() => timestamp_1.Timestamp, "T") } ]); } create(value) { @@ -25540,6 +26413,9 @@ var require_artifact = __commonJS({ }; exports2.ListArtifactsResponse_MonolithArtifact = new ListArtifactsResponse_MonolithArtifact$Type(); var GetSignedArtifactURLRequest$Type = class extends runtime_5.MessageType { + static { + __name(this, "GetSignedArtifactURLRequest$Type"); + } constructor() { super("github.actions.results.api.v1.GetSignedArtifactURLRequest", [ { @@ -25615,6 +26491,9 @@ var require_artifact = __commonJS({ }; exports2.GetSignedArtifactURLRequest = new GetSignedArtifactURLRequest$Type(); var GetSignedArtifactURLResponse$Type = class extends runtime_5.MessageType { + static { + __name(this, "GetSignedArtifactURLResponse$Type"); + } constructor() { super("github.actions.results.api.v1.GetSignedArtifactURLResponse", [ { @@ -25664,6 +26543,9 @@ var require_artifact = __commonJS({ }; exports2.GetSignedArtifactURLResponse = new GetSignedArtifactURLResponse$Type(); var DeleteArtifactRequest$Type = class extends runtime_5.MessageType { + static { + __name(this, "DeleteArtifactRequest$Type"); + } constructor() { super("github.actions.results.api.v1.DeleteArtifactRequest", [ { @@ -25739,6 +26621,9 @@ var require_artifact = __commonJS({ }; exports2.DeleteArtifactRequest = new DeleteArtifactRequest$Type(); var DeleteArtifactResponse$Type = class extends runtime_5.MessageType { + static { + __name(this, "DeleteArtifactResponse$Type"); + } constructor() { super("github.actions.results.api.v1.DeleteArtifactResponse", [ { @@ -25828,6 +26713,7 @@ var require_hooks = __commonJS({ resolve(value); }); } + __name(adopt, "adopt"); return new (P || (P = Promise))(function(resolve, reject) { function fulfilled(value) { try { @@ -25836,6 +26722,7 @@ var require_hooks = __commonJS({ reject(e); } } + __name(fulfilled, "fulfilled"); function rejected(value) { try { step(generator["throw"](value)); @@ -25843,9 +26730,11 @@ var require_hooks = __commonJS({ reject(e); } } + __name(rejected, "rejected"); function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + __name(step, "step"); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; @@ -25934,10 +26823,12 @@ var require_hooks = __commonJS({ }; return serverHook; } + __name(chainHooks, "chainHooks"); exports2.chainHooks = chainHooks; function isHook(object) { return "requestReceived" in object || "requestPrepared" in object || "requestSent" in object || "requestRouted" in object || "responsePrepared" in object || "responseSent" in object || "error" in object; } + __name(isHook, "isHook"); exports2.isHook = isHook; } }); @@ -25949,6 +26840,9 @@ var require_errors2 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.isValidErrorCode = exports2.httpStatusFromErrorCode = exports2.TwirpErrorCode = exports2.BadRouteError = exports2.InternalServerErrorWith = exports2.InternalServerError = exports2.RequiredArgumentError = exports2.InvalidArgumentError = exports2.NotFoundError = exports2.TwirpError = void 0; var TwirpError = class _TwirpError extends Error { + static { + __name(this, "TwirpError"); + } constructor(code, msg) { super(msg); this.code = TwirpErrorCode.Internal; @@ -26021,12 +26915,18 @@ var require_errors2 = __commonJS({ }; exports2.TwirpError = TwirpError; var NotFoundError = class extends TwirpError { + static { + __name(this, "NotFoundError"); + } constructor(msg) { super(TwirpErrorCode.NotFound, msg); } }; exports2.NotFoundError = NotFoundError; var InvalidArgumentError = class extends TwirpError { + static { + __name(this, "InvalidArgumentError"); + } constructor(argument, validationMsg) { super(TwirpErrorCode.InvalidArgument, argument + " " + validationMsg); this.withMeta("argument", argument); @@ -26034,18 +26934,27 @@ var require_errors2 = __commonJS({ }; exports2.InvalidArgumentError = InvalidArgumentError; var RequiredArgumentError = class extends InvalidArgumentError { + static { + __name(this, "RequiredArgumentError"); + } constructor(argument) { super(argument, "is required"); } }; exports2.RequiredArgumentError = RequiredArgumentError; var InternalServerError = class extends TwirpError { + static { + __name(this, "InternalServerError"); + } constructor(msg) { super(TwirpErrorCode.Internal, msg); } }; exports2.InternalServerError = InternalServerError; var InternalServerErrorWith = class extends InternalServerError { + static { + __name(this, "InternalServerErrorWith"); + } constructor(err) { super(err.message); this.withMeta("cause", err.name); @@ -26054,6 +26963,9 @@ var require_errors2 = __commonJS({ }; exports2.InternalServerErrorWith = InternalServerErrorWith; var BadRouteError = class extends TwirpError { + static { + __name(this, "BadRouteError"); + } constructor(msg, method, url) { super(TwirpErrorCode.BadRoute, msg); this.withMeta("twirp_invalid_route", method + " " + url); @@ -26123,10 +27035,12 @@ var require_errors2 = __commonJS({ return 0; } } + __name(httpStatusFromErrorCode, "httpStatusFromErrorCode"); exports2.httpStatusFromErrorCode = httpStatusFromErrorCode; function isValidErrorCode(code) { return httpStatusFromErrorCode(code) != 0; } + __name(isValidErrorCode, "isValidErrorCode"); exports2.isValidErrorCode = isValidErrorCode; } }); @@ -26141,6 +27055,7 @@ var require_request3 = __commonJS({ resolve(value); }); } + __name(adopt, "adopt"); return new (P || (P = Promise))(function(resolve, reject) { function fulfilled(value) { try { @@ -26149,6 +27064,7 @@ var require_request3 = __commonJS({ reject(e); } } + __name(fulfilled, "fulfilled"); function rejected(value) { try { step(generator["throw"](value)); @@ -26156,9 +27072,11 @@ var require_request3 = __commonJS({ reject(e); } } + __name(rejected, "rejected"); function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + __name(step, "step"); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; @@ -26181,6 +27099,7 @@ var require_request3 = __commonJS({ return TwirpContentType.Unknown; } } + __name(getContentType, "getContentType"); exports2.getContentType = getContentType; function validateRequest(ctx, request, pathPrefix) { if (request.method !== "POST") { @@ -26203,6 +27122,7 @@ var require_request3 = __commonJS({ } return Object.assign(Object.assign({}, path2), { mimeContentType, contentType: ctx.contentType }); } + __name(validateRequest, "validateRequest"); exports2.validateRequest = validateRequest; function getRequestData(req) { return new Promise((resolve, reject) => { @@ -26229,6 +27149,7 @@ var require_request3 = __commonJS({ }); }); } + __name(getRequestData, "getRequestData"); exports2.getRequestData = getRequestData; function parseTwirpPath(path2) { const parts = path2.split("/"); @@ -26245,6 +27166,7 @@ var require_request3 = __commonJS({ prefix: parts.slice(0, parts.length - 2).join("/") }; } + __name(parseTwirpPath, "parseTwirpPath"); exports2.parseTwirpPath = parseTwirpPath; } }); @@ -26259,6 +27181,7 @@ var require_server = __commonJS({ resolve(value); }); } + __name(adopt, "adopt"); return new (P || (P = Promise))(function(resolve, reject) { function fulfilled(value) { try { @@ -26267,6 +27190,7 @@ var require_server = __commonJS({ reject(e); } } + __name(fulfilled, "fulfilled"); function rejected(value) { try { step(generator["throw"](value)); @@ -26274,9 +27198,11 @@ var require_server = __commonJS({ reject(e); } } + __name(rejected, "rejected"); function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + __name(step, "step"); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; @@ -26286,6 +27212,9 @@ var require_server = __commonJS({ var request_1 = require_request3(); var errors_1 = require_errors2(); var TwirpServer = class { + static { + __name(this, "TwirpServer"); + } constructor(options) { this.pathPrefix = "/twirp"; this.hooks = []; @@ -26382,13 +27311,13 @@ var require_server = __commonJS({ yield this.invokeHook("requestReceived", ctx); const { method, mimeContentType } = request_1.validateRequest(ctx, req, this.pathPrefix || ""); const handler = this.matchRoute(method, { - onMatch: (ctx2) => { + onMatch: /* @__PURE__ */ __name((ctx2) => { return this.invokeHook("requestRouted", ctx2); - }, - onNotFound: () => { + }, "onMatch"), + onNotFound: /* @__PURE__ */ __name(() => { const msg = `no handler for path ${req.url}`; throw new errors_1.BadRouteError(msg, req.method || "", req.url || ""); - } + }, "onNotFound") }); const body = yield request_1.getRequestData(req); const response = yield handler(ctx, this.service, body, this.interceptors); @@ -26441,6 +27370,7 @@ var require_server = __commonJS({ res.statusCode = errors_1.httpStatusFromErrorCode(twirpError.code); res.end(twirpError.toJSON()); } + __name(writeError, "writeError"); exports2.writeError = writeError; function mustBeTwirpError(err) { if (err instanceof errors_1.TwirpError) { @@ -26448,6 +27378,7 @@ var require_server = __commonJS({ } return new errors_1.InternalServerErrorWith(err); } + __name(mustBeTwirpError, "mustBeTwirpError"); } }); @@ -26461,6 +27392,7 @@ var require_interceptors = __commonJS({ resolve(value); }); } + __name(adopt, "adopt"); return new (P || (P = Promise))(function(resolve, reject) { function fulfilled(value) { try { @@ -26469,6 +27401,7 @@ var require_interceptors = __commonJS({ reject(e); } } + __name(fulfilled, "fulfilled"); function rejected(value) { try { step(generator["throw"](value)); @@ -26476,9 +27409,11 @@ var require_interceptors = __commonJS({ reject(e); } } + __name(rejected, "rejected"); function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + __name(step, "step"); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; @@ -26502,6 +27437,7 @@ var require_interceptors = __commonJS({ return first(ctx, request, next); }); } + __name(chainInterceptors, "chainInterceptors"); exports2.chainInterceptors = chainInterceptors; } }); @@ -26528,28 +27464,34 @@ var require_dot_object = __commonJS({ } return v; } + __name(_process, "_process"); function parseKey(key, val) { if (key[0] === "-" && Array.isArray(val) && /^-\d+$/.test(key)) { return val.length + parseInt(key, 10); } return key; } + __name(parseKey, "parseKey"); function isIndex(k) { return /^\d+$/.test(k); } + __name(isIndex, "isIndex"); function isObject(val) { return Object.prototype.toString.call(val) === "[object Object]"; } + __name(isObject, "isObject"); function isArrayOrObject(val) { return Object(val) === val; } + __name(isArrayOrObject, "isArrayOrObject"); function isEmptyObject(val) { return Object.keys(val).length === 0; } + __name(isEmptyObject, "isEmptyObject"); var blacklist = ["__proto__", "prototype", "constructor"]; - var blacklistFilter = function(part) { + var blacklistFilter = /* @__PURE__ */ __name(function(part) { return blacklist.indexOf(part) === -1; - }; + }, "blacklistFilter"); function parsePath(path2, sep) { if (path2.indexOf("[") >= 0) { path2 = path2.replace(/\[/g, sep).replace(/]/g, ""); @@ -26561,6 +27503,7 @@ var require_dot_object = __commonJS({ } return parts; } + __name(parsePath, "parsePath"); var hasOwnProperty = Object.prototype.hasOwnProperty; function DotObject(separator, override, useArray, useBrackets) { if (!(this instanceof DotObject)) { @@ -26576,12 +27519,14 @@ var require_dot_object = __commonJS({ this.keepArray = false; this.cleanup = []; } + __name(DotObject, "DotObject"); var dotDefault = new DotObject(".", false, true, true); function wrap(method) { return function() { return dotDefault[method].apply(dotDefault, arguments); }; } + __name(wrap, "wrap"); DotObject.prototype._fill = function(a, obj, v, mod) { var k = a.shift(); if (a.length > 0) { @@ -26843,22 +27788,22 @@ var require_dot_object = __commonJS({ DotObject.dot = wrap("dot"); ["override", "overwrite"].forEach(function(prop) { Object.defineProperty(DotObject, prop, { - get: function() { + get: /* @__PURE__ */ __name(function() { return dotDefault.override; - }, - set: function(val) { + }, "get"), + set: /* @__PURE__ */ __name(function(val) { dotDefault.override = !!val; - } + }, "set") }); }); ["useArray", "keepArray", "useBrackets"].forEach(function(prop) { Object.defineProperty(DotObject, prop, { - get: function() { + get: /* @__PURE__ */ __name(function() { return dotDefault[prop]; - }, - set: function(val) { + }, "get"), + set: /* @__PURE__ */ __name(function(val) { dotDefault[prop] = val; - } + }, "set") }); }); DotObject._process = _process; @@ -26872,9 +27817,9 @@ var require_http_client = __commonJS({ "use strict"; var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { + Object.defineProperty(o, k2, { enumerable: true, get: /* @__PURE__ */ __name(function() { return m[k]; - } }); + }, "get") }); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; @@ -26899,6 +27844,7 @@ var require_http_client = __commonJS({ resolve(value); }); } + __name(adopt, "adopt"); return new (P || (P = Promise))(function(resolve, reject) { function fulfilled(value) { try { @@ -26907,6 +27853,7 @@ var require_http_client = __commonJS({ reject(e); } } + __name(fulfilled, "fulfilled"); function rejected(value) { try { step(generator["throw"](value)); @@ -26914,9 +27861,11 @@ var require_http_client = __commonJS({ reject(e); } } + __name(rejected, "rejected"); function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + __name(step, "step"); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; @@ -26926,7 +27875,7 @@ var require_http_client = __commonJS({ var https = __importStar2(require("https")); var url_1 = require("url"); var errors_1 = require_errors2(); - var NodeHttpRPC = (options) => ({ + var NodeHttpRPC = /* @__PURE__ */ __name((options) => ({ request(service, method, contentType, data) { let client; return new Promise((resolve, rejected) => { @@ -26963,13 +27912,14 @@ var require_http_client = __commonJS({ req.end(requestData); }); } - }); + }), "NodeHttpRPC"); exports2.NodeHttpRPC = NodeHttpRPC; function wrapErrorResponseToTwirpError(errorResponse) { return errors_1.TwirpError.fromObject(JSON.parse(errorResponse)); } + __name(wrapErrorResponseToTwirpError, "wrapErrorResponseToTwirpError"); exports2.wrapErrorResponseToTwirpError = wrapErrorResponseToTwirpError; - var FetchRPC = (options) => ({ + var FetchRPC = /* @__PURE__ */ __name((options) => ({ request(service, method, contentType, data) { return __awaiter2(this, void 0, void 0, function* () { const headers = new Headers(options.headers); @@ -26984,7 +27934,7 @@ var require_http_client = __commonJS({ throw errors_1.TwirpError.fromObject(yield response.json()); }); } - }); + }), "FetchRPC"); exports2.FetchRPC = FetchRPC; } }); @@ -26995,9 +27945,9 @@ var require_gateway = __commonJS({ "use strict"; var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { + Object.defineProperty(o, k2, { enumerable: true, get: /* @__PURE__ */ __name(function() { return m[k]; - } }); + }, "get") }); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; @@ -27022,6 +27972,7 @@ var require_gateway = __commonJS({ resolve(value); }); } + __name(adopt, "adopt"); return new (P || (P = Promise))(function(resolve, reject) { function fulfilled(value) { try { @@ -27030,6 +27981,7 @@ var require_gateway = __commonJS({ reject(e); } } + __name(fulfilled, "fulfilled"); function rejected(value) { try { step(generator["throw"](value)); @@ -27037,9 +27989,11 @@ var require_gateway = __commonJS({ reject(e); } } + __name(rejected, "rejected"); function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + __name(step, "step"); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; @@ -27071,6 +28025,9 @@ var require_gateway = __commonJS({ Pattern2["DELETE"] = "delete"; })(Pattern = exports2.Pattern || (exports2.Pattern = {})); var Gateway = class { + static { + __name(this, "Gateway"); + } constructor(routes) { this.routes = routes; } @@ -27218,9 +28175,9 @@ var require_twirp = __commonJS({ "use strict"; var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { + Object.defineProperty(o, k2, { enumerable: true, get: /* @__PURE__ */ __name(function() { return m[k]; - } }); + }, "get") }); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; @@ -27238,9 +28195,9 @@ var require_twirp = __commonJS({ __exportStar2(require_gateway(), exports2); __exportStar2(require_http_client(), exports2); var request_1 = require_request3(); - Object.defineProperty(exports2, "TwirpContentType", { enumerable: true, get: function() { + Object.defineProperty(exports2, "TwirpContentType", { enumerable: true, get: /* @__PURE__ */ __name(function() { return request_1.TwirpContentType; - } }); + }, "get") }); } }); @@ -27254,6 +28211,7 @@ var require_artifact_twirp = __commonJS({ resolve(value); }); } + __name(adopt, "adopt"); return new (P || (P = Promise))(function(resolve, reject) { function fulfilled(value) { try { @@ -27262,6 +28220,7 @@ var require_artifact_twirp = __commonJS({ reject(e); } } + __name(fulfilled, "fulfilled"); function rejected(value) { try { step(generator["throw"](value)); @@ -27269,9 +28228,11 @@ var require_artifact_twirp = __commonJS({ reject(e); } } + __name(rejected, "rejected"); function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + __name(step, "step"); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; @@ -27280,6 +28241,9 @@ var require_artifact_twirp = __commonJS({ var twirp_ts_1 = require_twirp(); var artifact_1 = require_artifact(); var ArtifactServiceClientJSON = class { + static { + __name(this, "ArtifactServiceClientJSON"); + } constructor(rpc) { this.rpc = rpc; this.CreateArtifact.bind(this); @@ -27339,6 +28303,9 @@ var require_artifact_twirp = __commonJS({ }; exports2.ArtifactServiceClientJSON = ArtifactServiceClientJSON; var ArtifactServiceClientProtobuf = class { + static { + __name(this, "ArtifactServiceClientProtobuf"); + } constructor(rpc) { this.rpc = rpc; this.CreateArtifact.bind(this); @@ -27398,6 +28365,7 @@ var require_artifact_twirp = __commonJS({ matchRoute: matchArtifactServiceRoute }); } + __name(createArtifactServiceServer, "createArtifactServiceServer"); exports2.createArtifactServiceServer = createArtifactServiceServer; function matchArtifactServiceRoute(method, events) { switch (method) { @@ -27437,6 +28405,7 @@ var require_artifact_twirp = __commonJS({ throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.BadRoute, msg); } } + __name(matchArtifactServiceRoute, "matchArtifactServiceRoute"); function handleArtifactServiceCreateArtifactRequest(ctx, service, data, interceptors) { switch (ctx.contentType) { case twirp_ts_1.TwirpContentType.JSON: @@ -27448,6 +28417,7 @@ var require_artifact_twirp = __commonJS({ throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.BadRoute, msg); } } + __name(handleArtifactServiceCreateArtifactRequest, "handleArtifactServiceCreateArtifactRequest"); function handleArtifactServiceFinalizeArtifactRequest(ctx, service, data, interceptors) { switch (ctx.contentType) { case twirp_ts_1.TwirpContentType.JSON: @@ -27459,6 +28429,7 @@ var require_artifact_twirp = __commonJS({ throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.BadRoute, msg); } } + __name(handleArtifactServiceFinalizeArtifactRequest, "handleArtifactServiceFinalizeArtifactRequest"); function handleArtifactServiceListArtifactsRequest(ctx, service, data, interceptors) { switch (ctx.contentType) { case twirp_ts_1.TwirpContentType.JSON: @@ -27470,6 +28441,7 @@ var require_artifact_twirp = __commonJS({ throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.BadRoute, msg); } } + __name(handleArtifactServiceListArtifactsRequest, "handleArtifactServiceListArtifactsRequest"); function handleArtifactServiceGetSignedArtifactURLRequest(ctx, service, data, interceptors) { switch (ctx.contentType) { case twirp_ts_1.TwirpContentType.JSON: @@ -27481,6 +28453,7 @@ var require_artifact_twirp = __commonJS({ throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.BadRoute, msg); } } + __name(handleArtifactServiceGetSignedArtifactURLRequest, "handleArtifactServiceGetSignedArtifactURLRequest"); function handleArtifactServiceDeleteArtifactRequest(ctx, service, data, interceptors) { switch (ctx.contentType) { case twirp_ts_1.TwirpContentType.JSON: @@ -27492,6 +28465,7 @@ var require_artifact_twirp = __commonJS({ throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.BadRoute, msg); } } + __name(handleArtifactServiceDeleteArtifactRequest, "handleArtifactServiceDeleteArtifactRequest"); function handleArtifactServiceCreateArtifactJSON(ctx, service, data, interceptors) { return __awaiter2(this, void 0, void 0, function* () { let request; @@ -27521,6 +28495,7 @@ var require_artifact_twirp = __commonJS({ })); }); } + __name(handleArtifactServiceCreateArtifactJSON, "handleArtifactServiceCreateArtifactJSON"); function handleArtifactServiceFinalizeArtifactJSON(ctx, service, data, interceptors) { return __awaiter2(this, void 0, void 0, function* () { let request; @@ -27550,6 +28525,7 @@ var require_artifact_twirp = __commonJS({ })); }); } + __name(handleArtifactServiceFinalizeArtifactJSON, "handleArtifactServiceFinalizeArtifactJSON"); function handleArtifactServiceListArtifactsJSON(ctx, service, data, interceptors) { return __awaiter2(this, void 0, void 0, function* () { let request; @@ -27579,6 +28555,7 @@ var require_artifact_twirp = __commonJS({ })); }); } + __name(handleArtifactServiceListArtifactsJSON, "handleArtifactServiceListArtifactsJSON"); function handleArtifactServiceGetSignedArtifactURLJSON(ctx, service, data, interceptors) { return __awaiter2(this, void 0, void 0, function* () { let request; @@ -27608,6 +28585,7 @@ var require_artifact_twirp = __commonJS({ })); }); } + __name(handleArtifactServiceGetSignedArtifactURLJSON, "handleArtifactServiceGetSignedArtifactURLJSON"); function handleArtifactServiceDeleteArtifactJSON(ctx, service, data, interceptors) { return __awaiter2(this, void 0, void 0, function* () { let request; @@ -27637,6 +28615,7 @@ var require_artifact_twirp = __commonJS({ })); }); } + __name(handleArtifactServiceDeleteArtifactJSON, "handleArtifactServiceDeleteArtifactJSON"); function handleArtifactServiceCreateArtifactProtobuf(ctx, service, data, interceptors) { return __awaiter2(this, void 0, void 0, function* () { let request; @@ -27660,6 +28639,7 @@ var require_artifact_twirp = __commonJS({ return Buffer.from(artifact_1.CreateArtifactResponse.toBinary(response)); }); } + __name(handleArtifactServiceCreateArtifactProtobuf, "handleArtifactServiceCreateArtifactProtobuf"); function handleArtifactServiceFinalizeArtifactProtobuf(ctx, service, data, interceptors) { return __awaiter2(this, void 0, void 0, function* () { let request; @@ -27683,6 +28663,7 @@ var require_artifact_twirp = __commonJS({ return Buffer.from(artifact_1.FinalizeArtifactResponse.toBinary(response)); }); } + __name(handleArtifactServiceFinalizeArtifactProtobuf, "handleArtifactServiceFinalizeArtifactProtobuf"); function handleArtifactServiceListArtifactsProtobuf(ctx, service, data, interceptors) { return __awaiter2(this, void 0, void 0, function* () { let request; @@ -27706,6 +28687,7 @@ var require_artifact_twirp = __commonJS({ return Buffer.from(artifact_1.ListArtifactsResponse.toBinary(response)); }); } + __name(handleArtifactServiceListArtifactsProtobuf, "handleArtifactServiceListArtifactsProtobuf"); function handleArtifactServiceGetSignedArtifactURLProtobuf(ctx, service, data, interceptors) { return __awaiter2(this, void 0, void 0, function* () { let request; @@ -27729,6 +28711,7 @@ var require_artifact_twirp = __commonJS({ return Buffer.from(artifact_1.GetSignedArtifactURLResponse.toBinary(response)); }); } + __name(handleArtifactServiceGetSignedArtifactURLProtobuf, "handleArtifactServiceGetSignedArtifactURLProtobuf"); function handleArtifactServiceDeleteArtifactProtobuf(ctx, service, data, interceptors) { return __awaiter2(this, void 0, void 0, function* () { let request; @@ -27752,6 +28735,7 @@ var require_artifact_twirp = __commonJS({ return Buffer.from(artifact_1.DeleteArtifactResponse.toBinary(response)); }); } + __name(handleArtifactServiceDeleteArtifactProtobuf, "handleArtifactServiceDeleteArtifactProtobuf"); } }); @@ -27763,9 +28747,9 @@ var require_generated = __commonJS({ if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { + desc = { enumerable: true, get: /* @__PURE__ */ __name(function() { return m[k]; - } }; + }, "get") }; } Object.defineProperty(o, k2, desc); } : function(o, m, k, k2) { @@ -27791,9 +28775,9 @@ var require_retention = __commonJS({ if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { + desc = { enumerable: true, get: /* @__PURE__ */ __name(function() { return m[k]; - } }; + }, "get") }; } Object.defineProperty(o, k2, desc); } : function(o, m, k, k2) { @@ -27831,6 +28815,7 @@ var require_retention = __commonJS({ expirationDate.setDate(expirationDate.getDate() + retentionDays); return generated_1.Timestamp.fromDate(expirationDate); } + __name(getExpiration, "getExpiration"); exports2.getExpiration = getExpiration; function getRetentionDays() { const retentionDays = process.env["GITHUB_RETENTION_DAYS"]; @@ -27843,6 +28828,7 @@ var require_retention = __commonJS({ } return days; } + __name(getRetentionDays, "getRetentionDays"); } }); @@ -27884,6 +28870,7 @@ These characters are not allowed in the artifact name due to limitations with ce } (0, core_1.info)(`Artifact name is valid!`); } + __name(validateArtifactName, "validateArtifactName"); exports2.validateArtifactName = validateArtifactName; function validateFilePath(path2) { if (!path2) { @@ -27900,6 +28887,7 @@ The following characters are not allowed in files that are uploaded due to limit } } } + __name(validateFilePath, "validateFilePath"); exports2.validateFilePath = validateFilePath; } }); @@ -27985,6 +28973,7 @@ var require_user_agent = __commonJS({ function getUserAgentString() { return `@actions/artifact-${packageJson.version}`; } + __name(getUserAgentString, "getUserAgentString"); exports2.getUserAgentString = getUserAgentString; } }); @@ -27996,6 +28985,9 @@ var require_errors3 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.UsageError = exports2.NetworkError = exports2.GHESNotSupportedError = exports2.ArtifactNotFoundError = exports2.InvalidResponseError = exports2.FilesNotFoundError = void 0; var FilesNotFoundError = class extends Error { + static { + __name(this, "FilesNotFoundError"); + } constructor(files = []) { let message = "No files were found to upload"; if (files.length > 0) { @@ -28008,6 +29000,9 @@ var require_errors3 = __commonJS({ }; exports2.FilesNotFoundError = FilesNotFoundError; var InvalidResponseError = class extends Error { + static { + __name(this, "InvalidResponseError"); + } constructor(message) { super(message); this.name = "InvalidResponseError"; @@ -28015,6 +29010,9 @@ var require_errors3 = __commonJS({ }; exports2.InvalidResponseError = InvalidResponseError; var ArtifactNotFoundError = class extends Error { + static { + __name(this, "ArtifactNotFoundError"); + } constructor(message = "Artifact not found") { super(message); this.name = "ArtifactNotFoundError"; @@ -28022,6 +29020,9 @@ var require_errors3 = __commonJS({ }; exports2.ArtifactNotFoundError = ArtifactNotFoundError; var GHESNotSupportedError = class extends Error { + static { + __name(this, "GHESNotSupportedError"); + } constructor(message = "@actions/artifact v2.0.0+, upload-artifact@v4+ and download-artifact@v4+ are not currently supported on GHES.") { super(message); this.name = "GHESNotSupportedError"; @@ -28029,6 +29030,9 @@ var require_errors3 = __commonJS({ }; exports2.GHESNotSupportedError = GHESNotSupportedError; var NetworkError = class extends Error { + static { + __name(this, "NetworkError"); + } constructor(code) { const message = `Unable to make request: ${code} If you are using self-hosted runners, please make sure your runner has access to all GitHub endpoints: https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/about-self-hosted-runners#communication-between-self-hosted-runners-and-github`; @@ -28050,6 +29054,9 @@ If you are using self-hosted runners, please make sure your runner has access to ].includes(code); }; var UsageError = class extends Error { + static { + __name(this, "UsageError"); + } constructor() { const message = `Artifact storage quota has been hit. Unable to upload any new artifacts. Usage is recalculated every 6-12 hours. More info on storage limits: https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions#calculating-minute-and-storage-spending`; @@ -28076,6 +29083,7 @@ var require_artifact_twirp_client = __commonJS({ resolve(value); }); } + __name(adopt, "adopt"); return new (P || (P = Promise))(function(resolve, reject) { function fulfilled(value) { try { @@ -28084,6 +29092,7 @@ var require_artifact_twirp_client = __commonJS({ reject(e); } } + __name(fulfilled, "fulfilled"); function rejected(value) { try { step(generator["throw"](value)); @@ -28091,9 +29100,11 @@ var require_artifact_twirp_client = __commonJS({ reject(e); } } + __name(rejected, "rejected"); function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + __name(step, "step"); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; @@ -28107,6 +29118,9 @@ var require_artifact_twirp_client = __commonJS({ var user_agent_1 = require_user_agent(); var errors_1 = require_errors3(); var ArtifactHttpClient = class { + static { + __name(this, "ArtifactHttpClient"); + } constructor(userAgent, maxAttempts, baseRetryIntervalMilliseconds, retryMultiplier) { this.maxAttempts = 5; this.baseRetryIntervalMilliseconds = 3e3; @@ -28236,6 +29250,7 @@ var require_artifact_twirp_client = __commonJS({ const client = new ArtifactHttpClient((0, user_agent_1.getUserAgentString)(), options === null || options === void 0 ? void 0 : options.maxAttempts, options === null || options === void 0 ? void 0 : options.retryIntervalMs, options === null || options === void 0 ? void 0 : options.retryMultiplier); return new generated_1.ArtifactServiceClientJSON(client); } + __name(internalArtifactTwirpClient, "internalArtifactTwirpClient"); exports2.internalArtifactTwirpClient = internalArtifactTwirpClient; } }); @@ -28248,9 +29263,9 @@ var require_upload_zip_specification = __commonJS({ if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { + desc = { enumerable: true, get: /* @__PURE__ */ __name(function() { return m[k]; - } }; + }, "get") }; } Object.defineProperty(o, k2, desc); } : function(o, m, k, k2) { @@ -28286,6 +29301,7 @@ var require_upload_zip_specification = __commonJS({ } (0, core_1.info)(`Root directory input is valid!`); } + __name(validateRootDirectory, "validateRootDirectory"); exports2.validateRootDirectory = validateRootDirectory; function getUploadZipSpecification(filesToZip, rootDirectory) { const specification = []; @@ -28318,6 +29334,7 @@ var require_upload_zip_specification = __commonJS({ } return specification; } + __name(getUploadZipSpecification, "getUploadZipSpecification"); exports2.getUploadZipSpecification = getUploadZipSpecification; } }); @@ -28329,6 +29346,7 @@ var require_jwt_decode_cjs = __commonJS({ function e(e2) { this.message = e2; } + __name(e, "e"); e.prototype = new Error(), e.prototype.name = "InvalidCharacterError"; var r = "undefined" != typeof window && window.atob && window.atob.bind(window) || function(r2) { var t2 = String(r2).replace(/=+$/, ""); @@ -28361,9 +29379,11 @@ var require_jwt_decode_cjs = __commonJS({ return r(t2); } } + __name(t, "t"); function n(e2) { this.message = e2; } + __name(n, "n"); function o(e2, r2) { if ("string" != typeof e2) throw new n("Invalid token specified"); var o2 = true === (r2 = r2 || {}).header ? 0 : 1; @@ -28373,6 +29393,7 @@ var require_jwt_decode_cjs = __commonJS({ throw new n("Invalid token specified: " + e3.message); } } + __name(o, "o"); n.prototype = new Error(), n.prototype.name = "InvalidTokenError"; var a = o; a.default = o, a.InvalidTokenError = n, module2.exports = a; @@ -28387,9 +29408,9 @@ var require_util8 = __commonJS({ if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { + desc = { enumerable: true, get: /* @__PURE__ */ __name(function() { return m[k]; - } }; + }, "get") }; } Object.defineProperty(o, k2, desc); } : function(o, m, k, k2) { @@ -28447,6 +29468,7 @@ var require_util8 = __commonJS({ } throw InvalidJwtError; } + __name(getBackendIdsFromToken, "getBackendIdsFromToken"); exports2.getBackendIdsFromToken = getBackendIdsFromToken; } }); @@ -28494,6 +29516,7 @@ function __extends(d, b) { function __() { this.constructor = d; } + __name(__, "__"); d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); } function __rest(s, e) { @@ -28523,6 +29546,7 @@ function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, e if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; } + __name(accept, "accept"); var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); @@ -28573,6 +29597,7 @@ function __awaiter(thisArg, _arguments, P, generator) { resolve(value); }); } + __name(adopt, "adopt"); return new (P || (P = Promise))(function(resolve, reject) { function fulfilled(value) { try { @@ -28581,6 +29606,7 @@ function __awaiter(thisArg, _arguments, P, generator) { reject(e); } } + __name(fulfilled, "fulfilled"); function rejected(value) { try { step(generator["throw"](value)); @@ -28588,17 +29614,19 @@ function __awaiter(thisArg, _arguments, P, generator) { reject(e); } } + __name(rejected, "rejected"); function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + __name(step, "step"); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); } function __generator(thisArg, body) { - var _2 = { label: 0, sent: function() { + var _2 = { label: 0, sent: /* @__PURE__ */ __name(function() { if (t[0] & 1) throw t[1]; return t[1]; - }, trys: [], ops: [] }, f, y, t, g; + }, "sent"), trys: [], ops: [] }, f, y, t, g; return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; @@ -28607,6 +29635,7 @@ function __generator(thisArg, body) { return step([n, v]); }; } + __name(verb, "verb"); function step(op) { if (f) throw new TypeError("Generator is already executing."); while (g && (g = 0, op[0] && (_2 = 0)), _2) try { @@ -28662,6 +29691,7 @@ function __generator(thisArg, body) { if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; } + __name(step, "step"); } function __exportStar(m, o) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); @@ -28670,10 +29700,10 @@ function __values(o) { var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; if (m) return m.call(o); if (o && typeof o.length === "number") return { - next: function() { + next: /* @__PURE__ */ __name(function() { if (o && i >= o.length) o = void 0; return { value: o && o[i++], done: !o }; - } + }, "next") }; throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); } @@ -28731,6 +29761,7 @@ function __asyncGenerator(thisArg, _arguments, generator) { }); }; } + __name(verb, "verb"); function resume(n, v) { try { step(g[n](v)); @@ -28738,18 +29769,23 @@ function __asyncGenerator(thisArg, _arguments, generator) { settle(q[0][3], e); } } + __name(resume, "resume"); function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + __name(step, "step"); function fulfill(value) { resume("next", value); } + __name(fulfill, "fulfill"); function reject(value) { resume("throw", value); } + __name(reject, "reject"); function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } + __name(settle, "settle"); } function __asyncDelegator(o) { var i, p; @@ -28763,6 +29799,7 @@ function __asyncDelegator(o) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; } + __name(verb, "verb"); } function __asyncValues(o) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); @@ -28777,11 +29814,13 @@ function __asyncValues(o) { }); }; } + __name(verb, "verb"); function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v2) { resolve({ value: v2, done: d }); }, reject); } + __name(settle, "settle"); } function __makeTemplateObject(cooked, raw) { if (Object.defineProperty) { @@ -28842,6 +29881,7 @@ function __disposeResources(env) { env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; env.hasError = true; } + __name(fail, "fail"); function next() { while (env.stack.length) { var rec = env.stack.pop(); @@ -28857,51 +29897,81 @@ function __disposeResources(env) { } if (env.hasError) throw env.error; } + __name(next, "next"); return next(); } var extendStatics, __assign, __createBinding, __setModuleDefault, _SuppressedError, tslib_es6_default; var init_tslib_es6 = __esm({ "node_modules/tslib/tslib.es6.mjs"() { - extendStatics = function(d, b) { + extendStatics = /* @__PURE__ */ __name(function(d, b) { extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { d2.__proto__ = b2; } || function(d2, b2) { for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p]; }; return extendStatics(d, b); - }; - __assign = function() { - __assign = Object.assign || function __assign2(t) { + }, "extendStatics"); + __name(__extends, "__extends"); + __assign = /* @__PURE__ */ __name(function() { + __assign = Object.assign || /* @__PURE__ */ __name(function __assign2(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } return t; - }; + }, "__assign"); return __assign.apply(this, arguments); - }; + }, "__assign"); + __name(__rest, "__rest"); + __name(__decorate, "__decorate"); + __name(__param, "__param"); + __name(__esDecorate, "__esDecorate"); + __name(__runInitializers, "__runInitializers"); + __name(__propKey, "__propKey"); + __name(__setFunctionName, "__setFunctionName"); + __name(__metadata, "__metadata"); + __name(__awaiter, "__awaiter"); + __name(__generator, "__generator"); __createBinding = Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { + desc = { enumerable: true, get: /* @__PURE__ */ __name(function() { return m[k]; - } }; + }, "get") }; } Object.defineProperty(o, k2, desc); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }; + __name(__exportStar, "__exportStar"); + __name(__values, "__values"); + __name(__read, "__read"); + __name(__spread, "__spread"); + __name(__spreadArrays, "__spreadArrays"); + __name(__spreadArray, "__spreadArray"); + __name(__await, "__await"); + __name(__asyncGenerator, "__asyncGenerator"); + __name(__asyncDelegator, "__asyncDelegator"); + __name(__asyncValues, "__asyncValues"); + __name(__makeTemplateObject, "__makeTemplateObject"); __setModuleDefault = Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }; + __name(__importStar, "__importStar"); + __name(__importDefault, "__importDefault"); + __name(__classPrivateFieldGet, "__classPrivateFieldGet"); + __name(__classPrivateFieldSet, "__classPrivateFieldSet"); + __name(__classPrivateFieldIn, "__classPrivateFieldIn"); + __name(__addDisposableResource, "__addDisposableResource"); _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) { var e = new Error(message); return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; }; + __name(__disposeResources, "__disposeResources"); tslib_es6_default = { __extends, __assign, @@ -29015,7 +30085,7 @@ var require_Utility = __commonJS({ "node_modules/xmlbuilder/lib/Utility.js"(exports2, module2) { (function() { var assign, getValue, isArray, isEmpty, isFunction, isObject, isPlainObject, slice = [].slice, hasProp = {}.hasOwnProperty; - assign = function() { + assign = /* @__PURE__ */ __name(function() { var i, key, len, source, sources, target; target = arguments[0], sources = 2 <= arguments.length ? slice.call(arguments, 1) : []; if (isFunction(Object.assign)) { @@ -29032,22 +30102,22 @@ var require_Utility = __commonJS({ } } return target; - }; - isFunction = function(val) { + }, "assign"); + isFunction = /* @__PURE__ */ __name(function(val) { return !!val && Object.prototype.toString.call(val) === "[object Function]"; - }; - isObject = function(val) { + }, "isFunction"); + isObject = /* @__PURE__ */ __name(function(val) { var ref; return !!val && ((ref = typeof val) === "function" || ref === "object"); - }; - isArray = function(val) { + }, "isObject"); + isArray = /* @__PURE__ */ __name(function(val) { if (isFunction(Array.isArray)) { return Array.isArray(val); } else { return Object.prototype.toString.call(val) === "[object Array]"; } - }; - isEmpty = function(val) { + }, "isArray"); + isEmpty = /* @__PURE__ */ __name(function(val) { var key; if (isArray(val)) { return !val.length; @@ -29058,18 +30128,18 @@ var require_Utility = __commonJS({ } return true; } - }; - isPlainObject = function(val) { + }, "isEmpty"); + isPlainObject = /* @__PURE__ */ __name(function(val) { var ctor, proto; return isObject(val) && (proto = Object.getPrototypeOf(val)) && (ctor = proto.constructor) && typeof ctor === "function" && ctor instanceof ctor && Function.prototype.toString.call(ctor) === Function.prototype.toString.call(Object); - }; - getValue = function(obj) { + }, "isPlainObject"); + getValue = /* @__PURE__ */ __name(function(obj) { if (isFunction(obj.valueOf)) { return obj.valueOf(); } else { return obj; } - }; + }, "getValue"); module2.exports.assign = assign; module2.exports.isFunction = isFunction; module2.exports.isObject = isObject; @@ -29089,6 +30159,7 @@ var require_XMLDOMImplementation = __commonJS({ module2.exports = XMLDOMImplementation = function() { function XMLDOMImplementation2() { } + __name(XMLDOMImplementation2, "XMLDOMImplementation"); XMLDOMImplementation2.prototype.hasFeature = function(feature, version2) { return true; }; @@ -29118,6 +30189,7 @@ var require_XMLDOMErrorHandler = __commonJS({ module2.exports = XMLDOMErrorHandler = function() { function XMLDOMErrorHandler2() { } + __name(XMLDOMErrorHandler2, "XMLDOMErrorHandler"); XMLDOMErrorHandler2.prototype.handleError = function(error) { throw new Error(error); }; @@ -29136,10 +30208,11 @@ var require_XMLDOMStringList = __commonJS({ function XMLDOMStringList2(arr) { this.arr = arr || []; } + __name(XMLDOMStringList2, "XMLDOMStringList"); Object.defineProperty(XMLDOMStringList2.prototype, "length", { - get: function() { + get: /* @__PURE__ */ __name(function() { return this.arr.length; - } + }, "get") }); XMLDOMStringList2.prototype.item = function(index) { return this.arr[index] || null; @@ -29184,10 +30257,11 @@ var require_XMLDOMConfiguration = __commonJS({ }; this.params = clonedSelf = Object.create(this.defaultParams); } + __name(XMLDOMConfiguration2, "XMLDOMConfiguration"); Object.defineProperty(XMLDOMConfiguration2.prototype, "parameterNames", { - get: function() { + get: /* @__PURE__ */ __name(function() { return new XMLDOMStringList(Object.keys(this.defaultParams)); - } + }, "get") }); XMLDOMConfiguration2.prototype.getParameter = function(name) { if (this.params.hasOwnProperty(name)) { @@ -29262,43 +30336,44 @@ var require_XMLAttribute = __commonJS({ this.isId = false; this.schemaTypeInfo = null; } + __name(XMLAttribute2, "XMLAttribute"); Object.defineProperty(XMLAttribute2.prototype, "nodeType", { - get: function() { + get: /* @__PURE__ */ __name(function() { return this.type; - } + }, "get") }); Object.defineProperty(XMLAttribute2.prototype, "ownerElement", { - get: function() { + get: /* @__PURE__ */ __name(function() { return this.parent; - } + }, "get") }); Object.defineProperty(XMLAttribute2.prototype, "textContent", { - get: function() { + get: /* @__PURE__ */ __name(function() { return this.value; - }, - set: function(value) { + }, "get"), + set: /* @__PURE__ */ __name(function(value) { return this.value = value || ""; - } + }, "set") }); Object.defineProperty(XMLAttribute2.prototype, "namespaceURI", { - get: function() { + get: /* @__PURE__ */ __name(function() { return ""; - } + }, "get") }); Object.defineProperty(XMLAttribute2.prototype, "prefix", { - get: function() { + get: /* @__PURE__ */ __name(function() { return ""; - } + }, "get") }); Object.defineProperty(XMLAttribute2.prototype, "localName", { - get: function() { + get: /* @__PURE__ */ __name(function() { return this.name; - } + }, "get") }); Object.defineProperty(XMLAttribute2.prototype, "specified", { - get: function() { + get: /* @__PURE__ */ __name(function() { return true; - } + }, "get") }); XMLAttribute2.prototype.clone = function() { return Object.create(this); @@ -29344,10 +30419,11 @@ var require_XMLNamedNodeMap = __commonJS({ function XMLNamedNodeMap2(nodes) { this.nodes = nodes; } + __name(XMLNamedNodeMap2, "XMLNamedNodeMap"); Object.defineProperty(XMLNamedNodeMap2.prototype, "length", { - get: function() { + get: /* @__PURE__ */ __name(function() { return Object.keys(this.nodes).length || 0; - } + }, "get") }); XMLNamedNodeMap2.prototype.clone = function() { return this.nodes = null; @@ -29389,18 +30465,19 @@ var require_XMLNamedNodeMap = __commonJS({ var require_XMLElement = __commonJS({ "node_modules/xmlbuilder/lib/XMLElement.js"(exports2, module2) { (function() { - var NodeType, XMLAttribute, XMLElement, XMLNamedNodeMap, XMLNode, getValue, isFunction, isObject, ref, extend = function(child, parent) { + var NodeType, XMLAttribute, XMLElement, XMLNamedNodeMap, XMLNode, getValue, isFunction, isObject, ref, extend = /* @__PURE__ */ __name(function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } + __name(ctor, "ctor"); ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; - }, hasProp = {}.hasOwnProperty; + }, "extend"), hasProp = {}.hasOwnProperty; ref = require_Utility(), isObject = ref.isObject, isFunction = ref.isFunction, getValue = ref.getValue; XMLNode = require_XMLNode(); NodeType = require_NodeType(); @@ -29437,48 +30514,49 @@ var require_XMLElement = __commonJS({ } } } + __name(XMLElement2, "XMLElement"); Object.defineProperty(XMLElement2.prototype, "tagName", { - get: function() { + get: /* @__PURE__ */ __name(function() { return this.name; - } + }, "get") }); Object.defineProperty(XMLElement2.prototype, "namespaceURI", { - get: function() { + get: /* @__PURE__ */ __name(function() { return ""; - } + }, "get") }); Object.defineProperty(XMLElement2.prototype, "prefix", { - get: function() { + get: /* @__PURE__ */ __name(function() { return ""; - } + }, "get") }); Object.defineProperty(XMLElement2.prototype, "localName", { - get: function() { + get: /* @__PURE__ */ __name(function() { return this.name; - } + }, "get") }); Object.defineProperty(XMLElement2.prototype, "id", { - get: function() { + get: /* @__PURE__ */ __name(function() { throw new Error("This DOM method is not implemented." + this.debugInfo()); - } + }, "get") }); Object.defineProperty(XMLElement2.prototype, "className", { - get: function() { + get: /* @__PURE__ */ __name(function() { throw new Error("This DOM method is not implemented." + this.debugInfo()); - } + }, "get") }); Object.defineProperty(XMLElement2.prototype, "classList", { - get: function() { + get: /* @__PURE__ */ __name(function() { throw new Error("This DOM method is not implemented." + this.debugInfo()); - } + }, "get") }); Object.defineProperty(XMLElement2.prototype, "attributes", { - get: function() { + get: /* @__PURE__ */ __name(function() { if (!this.attributeMap || !this.attributeMap.nodes) { this.attributeMap = new XMLNamedNodeMap(this.attribs); } return this.attributeMap; - } + }, "get") }); XMLElement2.prototype.clone = function() { var att, attName, clonedSelf, ref1; @@ -29656,18 +30734,19 @@ var require_XMLElement = __commonJS({ var require_XMLCharacterData = __commonJS({ "node_modules/xmlbuilder/lib/XMLCharacterData.js"(exports2, module2) { (function() { - var XMLCharacterData, XMLNode, extend = function(child, parent) { + var XMLCharacterData, XMLNode, extend = /* @__PURE__ */ __name(function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } + __name(ctor, "ctor"); ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; - }, hasProp = {}.hasOwnProperty; + }, "extend"), hasProp = {}.hasOwnProperty; XMLNode = require_XMLNode(); module2.exports = XMLCharacterData = function(superClass) { extend(XMLCharacterData2, superClass); @@ -29675,26 +30754,27 @@ var require_XMLCharacterData = __commonJS({ XMLCharacterData2.__super__.constructor.call(this, parent); this.value = ""; } + __name(XMLCharacterData2, "XMLCharacterData"); Object.defineProperty(XMLCharacterData2.prototype, "data", { - get: function() { + get: /* @__PURE__ */ __name(function() { return this.value; - }, - set: function(value) { + }, "get"), + set: /* @__PURE__ */ __name(function(value) { return this.value = value || ""; - } + }, "set") }); Object.defineProperty(XMLCharacterData2.prototype, "length", { - get: function() { + get: /* @__PURE__ */ __name(function() { return this.value.length; - } + }, "get") }); Object.defineProperty(XMLCharacterData2.prototype, "textContent", { - get: function() { + get: /* @__PURE__ */ __name(function() { return this.value; - }, - set: function(value) { + }, "get"), + set: /* @__PURE__ */ __name(function(value) { return this.value = value || ""; - } + }, "set") }); XMLCharacterData2.prototype.clone = function() { return Object.create(this); @@ -29733,18 +30813,19 @@ var require_XMLCharacterData = __commonJS({ var require_XMLCData = __commonJS({ "node_modules/xmlbuilder/lib/XMLCData.js"(exports2, module2) { (function() { - var NodeType, XMLCData, XMLCharacterData, extend = function(child, parent) { + var NodeType, XMLCData, XMLCharacterData, extend = /* @__PURE__ */ __name(function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } + __name(ctor, "ctor"); ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; - }, hasProp = {}.hasOwnProperty; + }, "extend"), hasProp = {}.hasOwnProperty; NodeType = require_NodeType(); XMLCharacterData = require_XMLCharacterData(); module2.exports = XMLCData = function(superClass) { @@ -29758,6 +30839,7 @@ var require_XMLCData = __commonJS({ this.type = NodeType.CData; this.value = this.stringify.cdata(text); } + __name(XMLCData2, "XMLCData"); XMLCData2.prototype.clone = function() { return Object.create(this); }; @@ -29774,18 +30856,19 @@ var require_XMLCData = __commonJS({ var require_XMLComment = __commonJS({ "node_modules/xmlbuilder/lib/XMLComment.js"(exports2, module2) { (function() { - var NodeType, XMLCharacterData, XMLComment, extend = function(child, parent) { + var NodeType, XMLCharacterData, XMLComment, extend = /* @__PURE__ */ __name(function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } + __name(ctor, "ctor"); ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; - }, hasProp = {}.hasOwnProperty; + }, "extend"), hasProp = {}.hasOwnProperty; NodeType = require_NodeType(); XMLCharacterData = require_XMLCharacterData(); module2.exports = XMLComment = function(superClass) { @@ -29799,6 +30882,7 @@ var require_XMLComment = __commonJS({ this.type = NodeType.Comment; this.value = this.stringify.comment(text); } + __name(XMLComment2, "XMLComment"); XMLComment2.prototype.clone = function() { return Object.create(this); }; @@ -29815,18 +30899,19 @@ var require_XMLComment = __commonJS({ var require_XMLDeclaration = __commonJS({ "node_modules/xmlbuilder/lib/XMLDeclaration.js"(exports2, module2) { (function() { - var NodeType, XMLDeclaration, XMLNode, isObject, extend = function(child, parent) { + var NodeType, XMLDeclaration, XMLNode, isObject, extend = /* @__PURE__ */ __name(function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } + __name(ctor, "ctor"); ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; - }, hasProp = {}.hasOwnProperty; + }, "extend"), hasProp = {}.hasOwnProperty; isObject = require_Utility().isObject; XMLNode = require_XMLNode(); NodeType = require_NodeType(); @@ -29850,6 +30935,7 @@ var require_XMLDeclaration = __commonJS({ this.standalone = this.stringify.xmlStandalone(standalone); } } + __name(XMLDeclaration2, "XMLDeclaration"); XMLDeclaration2.prototype.toString = function(options) { return this.options.writer.declaration(this, this.options.writer.filterOptions(options)); }; @@ -29863,18 +30949,19 @@ var require_XMLDeclaration = __commonJS({ var require_XMLDTDAttList = __commonJS({ "node_modules/xmlbuilder/lib/XMLDTDAttList.js"(exports2, module2) { (function() { - var NodeType, XMLDTDAttList, XMLNode, extend = function(child, parent) { + var NodeType, XMLDTDAttList, XMLNode, extend = /* @__PURE__ */ __name(function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } + __name(ctor, "ctor"); ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; - }, hasProp = {}.hasOwnProperty; + }, "extend"), hasProp = {}.hasOwnProperty; XMLNode = require_XMLNode(); NodeType = require_NodeType(); module2.exports = XMLDTDAttList = function(superClass) { @@ -29911,6 +30998,7 @@ var require_XMLDTDAttList = __commonJS({ } this.defaultValueType = defaultValueType; } + __name(XMLDTDAttList2, "XMLDTDAttList"); XMLDTDAttList2.prototype.toString = function(options) { return this.options.writer.dtdAttList(this, this.options.writer.filterOptions(options)); }; @@ -29924,18 +31012,19 @@ var require_XMLDTDAttList = __commonJS({ var require_XMLDTDEntity = __commonJS({ "node_modules/xmlbuilder/lib/XMLDTDEntity.js"(exports2, module2) { (function() { - var NodeType, XMLDTDEntity, XMLNode, isObject, extend = function(child, parent) { + var NodeType, XMLDTDEntity, XMLNode, isObject, extend = /* @__PURE__ */ __name(function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } + __name(ctor, "ctor"); ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; - }, hasProp = {}.hasOwnProperty; + }, "extend"), hasProp = {}.hasOwnProperty; isObject = require_Utility().isObject; XMLNode = require_XMLNode(); NodeType = require_NodeType(); @@ -29977,35 +31066,36 @@ var require_XMLDTDEntity = __commonJS({ } } } + __name(XMLDTDEntity2, "XMLDTDEntity"); Object.defineProperty(XMLDTDEntity2.prototype, "publicId", { - get: function() { + get: /* @__PURE__ */ __name(function() { return this.pubID; - } + }, "get") }); Object.defineProperty(XMLDTDEntity2.prototype, "systemId", { - get: function() { + get: /* @__PURE__ */ __name(function() { return this.sysID; - } + }, "get") }); Object.defineProperty(XMLDTDEntity2.prototype, "notationName", { - get: function() { + get: /* @__PURE__ */ __name(function() { return this.nData || null; - } + }, "get") }); Object.defineProperty(XMLDTDEntity2.prototype, "inputEncoding", { - get: function() { + get: /* @__PURE__ */ __name(function() { return null; - } + }, "get") }); Object.defineProperty(XMLDTDEntity2.prototype, "xmlEncoding", { - get: function() { + get: /* @__PURE__ */ __name(function() { return null; - } + }, "get") }); Object.defineProperty(XMLDTDEntity2.prototype, "xmlVersion", { - get: function() { + get: /* @__PURE__ */ __name(function() { return null; - } + }, "get") }); XMLDTDEntity2.prototype.toString = function(options) { return this.options.writer.dtdEntity(this, this.options.writer.filterOptions(options)); @@ -30020,18 +31110,19 @@ var require_XMLDTDEntity = __commonJS({ var require_XMLDTDElement = __commonJS({ "node_modules/xmlbuilder/lib/XMLDTDElement.js"(exports2, module2) { (function() { - var NodeType, XMLDTDElement, XMLNode, extend = function(child, parent) { + var NodeType, XMLDTDElement, XMLNode, extend = /* @__PURE__ */ __name(function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } + __name(ctor, "ctor"); ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; - }, hasProp = {}.hasOwnProperty; + }, "extend"), hasProp = {}.hasOwnProperty; XMLNode = require_XMLNode(); NodeType = require_NodeType(); module2.exports = XMLDTDElement = function(superClass) { @@ -30051,6 +31142,7 @@ var require_XMLDTDElement = __commonJS({ this.type = NodeType.ElementDeclaration; this.value = this.stringify.dtdElementValue(value); } + __name(XMLDTDElement2, "XMLDTDElement"); XMLDTDElement2.prototype.toString = function(options) { return this.options.writer.dtdElement(this, this.options.writer.filterOptions(options)); }; @@ -30064,18 +31156,19 @@ var require_XMLDTDElement = __commonJS({ var require_XMLDTDNotation = __commonJS({ "node_modules/xmlbuilder/lib/XMLDTDNotation.js"(exports2, module2) { (function() { - var NodeType, XMLDTDNotation, XMLNode, extend = function(child, parent) { + var NodeType, XMLDTDNotation, XMLNode, extend = /* @__PURE__ */ __name(function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } + __name(ctor, "ctor"); ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; - }, hasProp = {}.hasOwnProperty; + }, "extend"), hasProp = {}.hasOwnProperty; XMLNode = require_XMLNode(); NodeType = require_NodeType(); module2.exports = XMLDTDNotation = function(superClass) { @@ -30097,15 +31190,16 @@ var require_XMLDTDNotation = __commonJS({ this.sysID = this.stringify.dtdSysID(value.sysID); } } + __name(XMLDTDNotation2, "XMLDTDNotation"); Object.defineProperty(XMLDTDNotation2.prototype, "publicId", { - get: function() { + get: /* @__PURE__ */ __name(function() { return this.pubID; - } + }, "get") }); Object.defineProperty(XMLDTDNotation2.prototype, "systemId", { - get: function() { + get: /* @__PURE__ */ __name(function() { return this.sysID; - } + }, "get") }); XMLDTDNotation2.prototype.toString = function(options) { return this.options.writer.dtdNotation(this, this.options.writer.filterOptions(options)); @@ -30120,18 +31214,19 @@ var require_XMLDTDNotation = __commonJS({ var require_XMLDocType = __commonJS({ "node_modules/xmlbuilder/lib/XMLDocType.js"(exports2, module2) { (function() { - var NodeType, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDocType, XMLNamedNodeMap, XMLNode, isObject, extend = function(child, parent) { + var NodeType, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDocType, XMLNamedNodeMap, XMLNode, isObject, extend = /* @__PURE__ */ __name(function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } + __name(ctor, "ctor"); ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; - }, hasProp = {}.hasOwnProperty; + }, "extend"), hasProp = {}.hasOwnProperty; isObject = require_Utility().isObject; XMLNode = require_XMLNode(); NodeType = require_NodeType(); @@ -30170,8 +31265,9 @@ var require_XMLDocType = __commonJS({ this.sysID = this.stringify.dtdSysID(sysID); } } + __name(XMLDocType2, "XMLDocType"); Object.defineProperty(XMLDocType2.prototype, "entities", { - get: function() { + get: /* @__PURE__ */ __name(function() { var child, i, len, nodes, ref; nodes = {}; ref = this.children; @@ -30182,10 +31278,10 @@ var require_XMLDocType = __commonJS({ } } return new XMLNamedNodeMap(nodes); - } + }, "get") }); Object.defineProperty(XMLDocType2.prototype, "notations", { - get: function() { + get: /* @__PURE__ */ __name(function() { var child, i, len, nodes, ref; nodes = {}; ref = this.children; @@ -30196,22 +31292,22 @@ var require_XMLDocType = __commonJS({ } } return new XMLNamedNodeMap(nodes); - } + }, "get") }); Object.defineProperty(XMLDocType2.prototype, "publicId", { - get: function() { + get: /* @__PURE__ */ __name(function() { return this.pubID; - } + }, "get") }); Object.defineProperty(XMLDocType2.prototype, "systemId", { - get: function() { + get: /* @__PURE__ */ __name(function() { return this.sysID; - } + }, "get") }); Object.defineProperty(XMLDocType2.prototype, "internalSubset", { - get: function() { + get: /* @__PURE__ */ __name(function() { throw new Error("This DOM method is not implemented." + this.debugInfo()); - } + }, "get") }); XMLDocType2.prototype.element = function(name, value) { var child; @@ -30289,18 +31385,19 @@ var require_XMLDocType = __commonJS({ var require_XMLRaw = __commonJS({ "node_modules/xmlbuilder/lib/XMLRaw.js"(exports2, module2) { (function() { - var NodeType, XMLNode, XMLRaw, extend = function(child, parent) { + var NodeType, XMLNode, XMLRaw, extend = /* @__PURE__ */ __name(function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } + __name(ctor, "ctor"); ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; - }, hasProp = {}.hasOwnProperty; + }, "extend"), hasProp = {}.hasOwnProperty; NodeType = require_NodeType(); XMLNode = require_XMLNode(); module2.exports = XMLRaw = function(superClass) { @@ -30313,6 +31410,7 @@ var require_XMLRaw = __commonJS({ this.type = NodeType.Raw; this.value = this.stringify.raw(text); } + __name(XMLRaw2, "XMLRaw"); XMLRaw2.prototype.clone = function() { return Object.create(this); }; @@ -30329,18 +31427,19 @@ var require_XMLRaw = __commonJS({ var require_XMLText = __commonJS({ "node_modules/xmlbuilder/lib/XMLText.js"(exports2, module2) { (function() { - var NodeType, XMLCharacterData, XMLText, extend = function(child, parent) { + var NodeType, XMLCharacterData, XMLText, extend = /* @__PURE__ */ __name(function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } + __name(ctor, "ctor"); ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; - }, hasProp = {}.hasOwnProperty; + }, "extend"), hasProp = {}.hasOwnProperty; NodeType = require_NodeType(); XMLCharacterData = require_XMLCharacterData(); module2.exports = XMLText = function(superClass) { @@ -30354,13 +31453,14 @@ var require_XMLText = __commonJS({ this.type = NodeType.Text; this.value = this.stringify.text(text); } + __name(XMLText2, "XMLText"); Object.defineProperty(XMLText2.prototype, "isElementContentWhitespace", { - get: function() { + get: /* @__PURE__ */ __name(function() { throw new Error("This DOM method is not implemented." + this.debugInfo()); - } + }, "get") }); Object.defineProperty(XMLText2.prototype, "wholeText", { - get: function() { + get: /* @__PURE__ */ __name(function() { var next, prev, str; str = ""; prev = this.previousSibling; @@ -30375,7 +31475,7 @@ var require_XMLText = __commonJS({ next = next.nextSibling; } return str; - } + }, "get") }); XMLText2.prototype.clone = function() { return Object.create(this); @@ -30399,18 +31499,19 @@ var require_XMLText = __commonJS({ var require_XMLProcessingInstruction = __commonJS({ "node_modules/xmlbuilder/lib/XMLProcessingInstruction.js"(exports2, module2) { (function() { - var NodeType, XMLCharacterData, XMLProcessingInstruction, extend = function(child, parent) { + var NodeType, XMLCharacterData, XMLProcessingInstruction, extend = /* @__PURE__ */ __name(function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } + __name(ctor, "ctor"); ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; - }, hasProp = {}.hasOwnProperty; + }, "extend"), hasProp = {}.hasOwnProperty; NodeType = require_NodeType(); XMLCharacterData = require_XMLCharacterData(); module2.exports = XMLProcessingInstruction = function(superClass) { @@ -30427,6 +31528,7 @@ var require_XMLProcessingInstruction = __commonJS({ this.value = this.stringify.insValue(value); } } + __name(XMLProcessingInstruction2, "XMLProcessingInstruction"); XMLProcessingInstruction2.prototype.clone = function() { return Object.create(this); }; @@ -30452,18 +31554,19 @@ var require_XMLProcessingInstruction = __commonJS({ var require_XMLDummy = __commonJS({ "node_modules/xmlbuilder/lib/XMLDummy.js"(exports2, module2) { (function() { - var NodeType, XMLDummy, XMLNode, extend = function(child, parent) { + var NodeType, XMLDummy, XMLNode, extend = /* @__PURE__ */ __name(function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } + __name(ctor, "ctor"); ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; - }, hasProp = {}.hasOwnProperty; + }, "extend"), hasProp = {}.hasOwnProperty; XMLNode = require_XMLNode(); NodeType = require_NodeType(); module2.exports = XMLDummy = function(superClass) { @@ -30472,6 +31575,7 @@ var require_XMLDummy = __commonJS({ XMLDummy2.__super__.constructor.call(this, parent); this.type = NodeType.Dummy; } + __name(XMLDummy2, "XMLDummy"); XMLDummy2.prototype.clone = function() { return Object.create(this); }; @@ -30493,10 +31597,11 @@ var require_XMLNodeList = __commonJS({ function XMLNodeList2(nodes) { this.nodes = nodes; } + __name(XMLNodeList2, "XMLNodeList"); Object.defineProperty(XMLNodeList2.prototype, "length", { - get: function() { + get: /* @__PURE__ */ __name(function() { return this.nodes.length || 0; - } + }, "get") }); XMLNodeList2.prototype.clone = function() { return this.nodes = null; @@ -30571,65 +31676,66 @@ var require_XMLNode = __commonJS({ DocumentPosition = require_DocumentPosition(); } } + __name(XMLNode2, "XMLNode"); Object.defineProperty(XMLNode2.prototype, "nodeName", { - get: function() { + get: /* @__PURE__ */ __name(function() { return this.name; - } + }, "get") }); Object.defineProperty(XMLNode2.prototype, "nodeType", { - get: function() { + get: /* @__PURE__ */ __name(function() { return this.type; - } + }, "get") }); Object.defineProperty(XMLNode2.prototype, "nodeValue", { - get: function() { + get: /* @__PURE__ */ __name(function() { return this.value; - } + }, "get") }); Object.defineProperty(XMLNode2.prototype, "parentNode", { - get: function() { + get: /* @__PURE__ */ __name(function() { return this.parent; - } + }, "get") }); Object.defineProperty(XMLNode2.prototype, "childNodes", { - get: function() { + get: /* @__PURE__ */ __name(function() { if (!this.childNodeList || !this.childNodeList.nodes) { this.childNodeList = new XMLNodeList(this.children); } return this.childNodeList; - } + }, "get") }); Object.defineProperty(XMLNode2.prototype, "firstChild", { - get: function() { + get: /* @__PURE__ */ __name(function() { return this.children[0] || null; - } + }, "get") }); Object.defineProperty(XMLNode2.prototype, "lastChild", { - get: function() { + get: /* @__PURE__ */ __name(function() { return this.children[this.children.length - 1] || null; - } + }, "get") }); Object.defineProperty(XMLNode2.prototype, "previousSibling", { - get: function() { + get: /* @__PURE__ */ __name(function() { var i; i = this.parent.children.indexOf(this); return this.parent.children[i - 1] || null; - } + }, "get") }); Object.defineProperty(XMLNode2.prototype, "nextSibling", { - get: function() { + get: /* @__PURE__ */ __name(function() { var i; i = this.parent.children.indexOf(this); return this.parent.children[i + 1] || null; - } + }, "get") }); Object.defineProperty(XMLNode2.prototype, "ownerDocument", { - get: function() { + get: /* @__PURE__ */ __name(function() { return this.document() || null; - } + }, "get") }); Object.defineProperty(XMLNode2.prototype, "textContent", { - get: function() { + get: /* @__PURE__ */ __name(function() { var child, j, len, ref2, str; if (this.nodeType === NodeType.Element || this.nodeType === NodeType.DocumentFragment) { str = ""; @@ -30644,10 +31750,10 @@ var require_XMLNode = __commonJS({ } else { return null; } - }, - set: function(value) { + }, "get"), + set: /* @__PURE__ */ __name(function(value) { throw new Error("This DOM method is not implemented." + this.debugInfo()); - } + }, "set") }); XMLNode2.prototype.setParent = function(parent) { var child, j, len, ref2, results; @@ -31223,11 +32329,11 @@ var require_XMLNode = __commonJS({ var require_XMLStringifier = __commonJS({ "node_modules/xmlbuilder/lib/XMLStringifier.js"(exports2, module2) { (function() { - var XMLStringifier, bind = function(fn, me) { + var XMLStringifier, bind = /* @__PURE__ */ __name(function(fn, me) { return function() { return fn.apply(me, arguments); }; - }, hasProp = {}.hasOwnProperty; + }, "bind"), hasProp = {}.hasOwnProperty; module2.exports = XMLStringifier = function() { function XMLStringifier2(options) { this.assertLegalName = bind(this.assertLegalName, this); @@ -31245,6 +32351,7 @@ var require_XMLStringifier = __commonJS({ this[key] = value; } } + __name(XMLStringifier2, "XMLStringifier"); XMLStringifier2.prototype.name = function(val) { if (this.options.noValidation) { return val; @@ -31482,6 +32589,7 @@ var require_XMLWriterBase = __commonJS({ this[key] = value; } } + __name(XMLWriterBase2, "XMLWriterBase"); XMLWriterBase2.prototype.filterOptions = function(options) { var filteredOptions, ref, ref1, ref2, ref3, ref4, ref5, ref6; options || (options = {}); @@ -31847,24 +32955,26 @@ var require_XMLWriterBase = __commonJS({ var require_XMLStringWriter = __commonJS({ "node_modules/xmlbuilder/lib/XMLStringWriter.js"(exports2, module2) { (function() { - var XMLStringWriter, XMLWriterBase, extend = function(child, parent) { + var XMLStringWriter, XMLWriterBase, extend = /* @__PURE__ */ __name(function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } + __name(ctor, "ctor"); ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; - }, hasProp = {}.hasOwnProperty; + }, "extend"), hasProp = {}.hasOwnProperty; XMLWriterBase = require_XMLWriterBase(); module2.exports = XMLStringWriter = function(superClass) { extend(XMLStringWriter2, superClass); function XMLStringWriter2(options) { XMLStringWriter2.__super__.constructor.call(this, options); } + __name(XMLStringWriter2, "XMLStringWriter"); XMLStringWriter2.prototype.document = function(doc, options) { var child, i, len, r, ref; options = this.filterOptions(options); @@ -31889,18 +32999,19 @@ var require_XMLStringWriter = __commonJS({ var require_XMLDocument = __commonJS({ "node_modules/xmlbuilder/lib/XMLDocument.js"(exports2, module2) { (function() { - var NodeType, XMLDOMConfiguration, XMLDOMImplementation, XMLDocument, XMLNode, XMLStringWriter, XMLStringifier, isPlainObject, extend = function(child, parent) { + var NodeType, XMLDOMConfiguration, XMLDOMImplementation, XMLDocument, XMLNode, XMLStringWriter, XMLStringifier, isPlainObject, extend = /* @__PURE__ */ __name(function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } + __name(ctor, "ctor"); ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; - }, hasProp = {}.hasOwnProperty; + }, "extend"), hasProp = {}.hasOwnProperty; isPlainObject = require_Utility().isPlainObject; XMLDOMImplementation = require_XMLDOMImplementation(); XMLDOMConfiguration = require_XMLDOMConfiguration(); @@ -31923,11 +33034,12 @@ var require_XMLDocument = __commonJS({ this.options = options; this.stringify = new XMLStringifier(options); } + __name(XMLDocument2, "XMLDocument"); Object.defineProperty(XMLDocument2.prototype, "implementation", { value: new XMLDOMImplementation() }); Object.defineProperty(XMLDocument2.prototype, "doctype", { - get: function() { + get: /* @__PURE__ */ __name(function() { var child, i, len, ref; ref = this.children; for (i = 0, len = ref.length; i < len; i++) { @@ -31937,74 +33049,74 @@ var require_XMLDocument = __commonJS({ } } return null; - } + }, "get") }); Object.defineProperty(XMLDocument2.prototype, "documentElement", { - get: function() { + get: /* @__PURE__ */ __name(function() { return this.rootObject || null; - } + }, "get") }); Object.defineProperty(XMLDocument2.prototype, "inputEncoding", { - get: function() { + get: /* @__PURE__ */ __name(function() { return null; - } + }, "get") }); Object.defineProperty(XMLDocument2.prototype, "strictErrorChecking", { - get: function() { + get: /* @__PURE__ */ __name(function() { return false; - } + }, "get") }); Object.defineProperty(XMLDocument2.prototype, "xmlEncoding", { - get: function() { + get: /* @__PURE__ */ __name(function() { if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) { return this.children[0].encoding; } else { return null; } - } + }, "get") }); Object.defineProperty(XMLDocument2.prototype, "xmlStandalone", { - get: function() { + get: /* @__PURE__ */ __name(function() { if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) { return this.children[0].standalone === "yes"; } else { return false; } - } + }, "get") }); Object.defineProperty(XMLDocument2.prototype, "xmlVersion", { - get: function() { + get: /* @__PURE__ */ __name(function() { if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) { return this.children[0].version; } else { return "1.0"; } - } + }, "get") }); Object.defineProperty(XMLDocument2.prototype, "URL", { - get: function() { + get: /* @__PURE__ */ __name(function() { return this.documentURI; - } + }, "get") }); Object.defineProperty(XMLDocument2.prototype, "origin", { - get: function() { + get: /* @__PURE__ */ __name(function() { return null; - } + }, "get") }); Object.defineProperty(XMLDocument2.prototype, "compatMode", { - get: function() { + get: /* @__PURE__ */ __name(function() { return null; - } + }, "get") }); Object.defineProperty(XMLDocument2.prototype, "characterSet", { - get: function() { + get: /* @__PURE__ */ __name(function() { return null; - } + }, "get") }); Object.defineProperty(XMLDocument2.prototype, "contentType", { - get: function() { + get: /* @__PURE__ */ __name(function() { return null; - } + }, "get") }); XMLDocument2.prototype.end = function(writer) { var writerOptions; @@ -32144,6 +33256,7 @@ var require_XMLDocumentCB = __commonJS({ this.documentCompleted = false; this.root = null; } + __name(XMLDocumentCB2, "XMLDocumentCB"); XMLDocumentCB2.prototype.createChildNode = function(node) { var att, attName, attributes, child, i, len, ref1, ref2; switch (node.type) { @@ -32562,18 +33675,19 @@ var require_XMLDocumentCB = __commonJS({ var require_XMLStreamWriter = __commonJS({ "node_modules/xmlbuilder/lib/XMLStreamWriter.js"(exports2, module2) { (function() { - var NodeType, WriterState, XMLStreamWriter, XMLWriterBase, extend = function(child, parent) { + var NodeType, WriterState, XMLStreamWriter, XMLWriterBase, extend = /* @__PURE__ */ __name(function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } + __name(ctor, "ctor"); ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; - }, hasProp = {}.hasOwnProperty; + }, "extend"), hasProp = {}.hasOwnProperty; NodeType = require_NodeType(); XMLWriterBase = require_XMLWriterBase(); WriterState = require_WriterState(); @@ -32583,6 +33697,7 @@ var require_XMLStreamWriter = __commonJS({ this.stream = stream; XMLStreamWriter2.__super__.constructor.call(this, options); } + __name(XMLStreamWriter2, "XMLStreamWriter"); XMLStreamWriter2.prototype.endline = function(node, options, level) { if (node.isLastRootNode && options.state === WriterState.CloseTag) { return ""; @@ -32787,15 +33902,15 @@ var require_builder = __commonJS({ var builder, defaults, escapeCDATA, requiresCDATA, wrapCDATA, hasProp = {}.hasOwnProperty; builder = require_lib2(); defaults = require_defaults().defaults; - requiresCDATA = function(entry) { + requiresCDATA = /* @__PURE__ */ __name(function(entry) { return typeof entry === "string" && (entry.indexOf("&") >= 0 || entry.indexOf(">") >= 0 || entry.indexOf("<") >= 0); - }; - wrapCDATA = function(entry) { + }, "requiresCDATA"); + wrapCDATA = /* @__PURE__ */ __name(function(entry) { return ""; - }; - escapeCDATA = function(entry) { + }, "wrapCDATA"); + escapeCDATA = /* @__PURE__ */ __name(function(entry) { return entry.replace("]]>", "]]]]>"); - }; + }, "escapeCDATA"); exports2.Builder = function() { function Builder(opts) { var key, ref, value; @@ -32812,6 +33927,7 @@ var require_builder = __commonJS({ this.options[key] = value; } } + __name(Builder, "Builder"); Builder.prototype.buildObject = function(rootObj) { var attrkey, charkey, render, rootElement, rootName; attrkey = this.options.attrkey; @@ -32974,10 +34090,12 @@ var require_sax = __commonJS({ } emit(parser, "onready"); } + __name(SAXParser, "SAXParser"); if (!Object.create) { Object.create = function(o) { function F() { } + __name(F, "F"); F.prototype = o; var newf = new F(); return newf; @@ -33017,11 +34135,13 @@ var require_sax = __commonJS({ var m = sax.MAX_BUFFER_LENGTH - maxActual; parser.bufferCheckPosition = m + parser.position; } + __name(checkBufferLength, "checkBufferLength"); function clearBuffers(parser) { for (var i = 0, l = buffers.length; i < l; i++) { parser[buffers[i]] = ""; } } + __name(clearBuffers, "clearBuffers"); function flushBuffers(parser) { closeText(parser); if (parser.cdata !== "") { @@ -33033,37 +34153,39 @@ var require_sax = __commonJS({ parser.script = ""; } } + __name(flushBuffers, "flushBuffers"); SAXParser.prototype = { - end: function() { + end: /* @__PURE__ */ __name(function() { end(this); - }, + }, "end"), write, - resume: function() { + resume: /* @__PURE__ */ __name(function() { this.error = null; return this; - }, - close: function() { + }, "resume"), + close: /* @__PURE__ */ __name(function() { return this.write(null); - }, - flush: function() { + }, "close"), + flush: /* @__PURE__ */ __name(function() { flushBuffers(this); - } + }, "flush") }; var Stream; try { Stream = require("stream").Stream; } catch (ex) { - Stream = function() { - }; + Stream = /* @__PURE__ */ __name(function() { + }, "Stream"); } - if (!Stream) Stream = function() { - }; + if (!Stream) Stream = /* @__PURE__ */ __name(function() { + }, "Stream"); var streamWraps = sax.EVENTS.filter(function(ev) { return ev !== "error" && ev !== "end"; }); function createStream(strict, opt) { return new SAXStream(strict, opt); } + __name(createStream, "createStream"); function SAXStream(strict, opt) { if (!(this instanceof SAXStream)) { return new SAXStream(strict, opt); @@ -33083,22 +34205,23 @@ var require_sax = __commonJS({ this._decoder = null; streamWraps.forEach(function(ev) { Object.defineProperty(me, "on" + ev, { - get: function() { + get: /* @__PURE__ */ __name(function() { return me._parser["on" + ev]; - }, - set: function(h) { + }, "get"), + set: /* @__PURE__ */ __name(function(h) { if (!h) { me.removeAllListeners(ev); me._parser["on" + ev] = h; return h; } me.on(ev, h); - }, + }, "set"), enumerable: true, configurable: false }); }); } + __name(SAXStream, "SAXStream"); SAXStream.prototype = Object.create(Stream.prototype, { constructor: { value: SAXStream @@ -33146,18 +34269,23 @@ var require_sax = __commonJS({ function isWhitespace(c) { return c === " " || c === "\n" || c === "\r" || c === " "; } + __name(isWhitespace, "isWhitespace"); function isQuote(c) { return c === '"' || c === "'"; } + __name(isQuote, "isQuote"); function isAttribEnd(c) { return c === ">" || isWhitespace(c); } + __name(isAttribEnd, "isAttribEnd"); function isMatch(regex, c) { return regex.test(c); } + __name(isMatch, "isMatch"); function notMatch(regex, c) { return !isMatch(regex, c); } + __name(notMatch, "notMatch"); var S = 0; sax.STATE = { BEGIN: S++, @@ -33507,20 +34635,24 @@ var require_sax = __commonJS({ function emit(parser, event, data) { parser[event] && parser[event](data); } + __name(emit, "emit"); function emitNode(parser, nodeType, data) { if (parser.textNode) closeText(parser); emit(parser, nodeType, data); } + __name(emitNode, "emitNode"); function closeText(parser) { parser.textNode = textopts(parser.opt, parser.textNode); if (parser.textNode) emit(parser, "ontext", parser.textNode); parser.textNode = ""; } + __name(closeText, "closeText"); function textopts(opt, text) { if (opt.trim) text = text.trim(); if (opt.normalize) text = text.replace(/\s+/g, " "); return text; } + __name(textopts, "textopts"); function error(parser, er) { closeText(parser); if (parser.trackPosition) { @@ -33531,6 +34663,7 @@ var require_sax = __commonJS({ emit(parser, "onerror", er); return parser; } + __name(error, "error"); function end(parser) { if (parser.sawRoot && !parser.closedRoot) strictFail(parser, "Unclosed root tag"); if (parser.state !== S.BEGIN && parser.state !== S.BEGIN_WHITESPACE && parser.state !== S.TEXT) { @@ -33543,6 +34676,7 @@ var require_sax = __commonJS({ SAXParser.call(parser, parser.strict, parser.opt); return parser; } + __name(end, "end"); function strictFail(parser, message) { if (typeof parser !== "object" || !(parser instanceof SAXParser)) { throw new Error("bad call to strictFail"); @@ -33551,6 +34685,7 @@ var require_sax = __commonJS({ error(parser, message); } } + __name(strictFail, "strictFail"); function newTag(parser) { if (!parser.strict) parser.tagName = parser.tagName[parser.looseCase](); var parent = parser.tags[parser.tags.length - 1] || parser; @@ -33561,6 +34696,7 @@ var require_sax = __commonJS({ parser.attribList.length = 0; emitNode(parser, "onopentagstart", tag); } + __name(newTag, "newTag"); function qname(name, attribute) { var i = name.indexOf(":"); var qualName = i < 0 ? ["", name] : name.split(":"); @@ -33572,6 +34708,7 @@ var require_sax = __commonJS({ } return { prefix, local }; } + __name(qname, "qname"); function attrib(parser) { if (!parser.strict) { parser.attribName = parser.attribName[parser.looseCase](); @@ -33614,6 +34751,7 @@ var require_sax = __commonJS({ } parser.attribName = parser.attribValue = ""; } + __name(attrib, "attrib"); function openTag(parser, selfClosing) { if (parser.opt.xmlns) { var tag = parser.tag; @@ -33674,6 +34812,7 @@ var require_sax = __commonJS({ parser.attribName = parser.attribValue = ""; parser.attribList.length = 0; } + __name(openTag, "openTag"); function closeTag(parser) { if (!parser.tagName) { strictFail(parser, "Weird empty close tag."); @@ -33734,6 +34873,7 @@ var require_sax = __commonJS({ parser.attribList.length = 0; parser.state = S.TEXT; } + __name(closeTag, "closeTag"); function parseEntity(parser) { var entity = parser.entity; var entityLC = entity.toLowerCase(); @@ -33764,6 +34904,7 @@ var require_sax = __commonJS({ } return String.fromCodePoint(num); } + __name(parseEntity, "parseEntity"); function beginWhiteSpace(parser, c) { if (c === "<") { parser.state = S.OPEN_WAKA; @@ -33774,6 +34915,7 @@ var require_sax = __commonJS({ parser.state = S.TEXT; } } + __name(beginWhiteSpace, "beginWhiteSpace"); function charAt(chunk, i) { var result = ""; if (i < chunk.length) { @@ -33781,6 +34923,7 @@ var require_sax = __commonJS({ } return result; } + __name(charAt, "charAt"); function write(chunk) { var parser = this; if (this.error) { @@ -34289,11 +35432,12 @@ var require_sax = __commonJS({ } return parser; } + __name(write, "write"); if (!String.fromCodePoint) { (function() { var stringFromCharCode = String.fromCharCode; var floor = Math.floor; - var fromCodePoint = function() { + var fromCodePoint = /* @__PURE__ */ __name(function() { var MAX_SIZE = 16384; var codeUnits = []; var highSurrogate; @@ -34326,7 +35470,7 @@ var require_sax = __commonJS({ } } return result; - }; + }, "fromCodePoint"); if (Object.defineProperty) { Object.defineProperty(String, "fromCodePoint", { value: fromCodePoint, @@ -34395,39 +35539,40 @@ var require_parser = __commonJS({ "node_modules/xml2js/lib/parser.js"(exports2) { (function() { "use strict"; - var bom, defaults, events, isEmpty, processItem, processors, sax, setImmediate2, bind = function(fn, me) { + var bom, defaults, events, isEmpty, processItem, processors, sax, setImmediate2, bind = /* @__PURE__ */ __name(function(fn, me) { return function() { return fn.apply(me, arguments); }; - }, extend = function(child, parent) { + }, "bind"), extend = /* @__PURE__ */ __name(function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } + __name(ctor, "ctor"); ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; - }, hasProp = {}.hasOwnProperty; + }, "extend"), hasProp = {}.hasOwnProperty; sax = require_sax(); events = require("events"); bom = require_bom(); processors = require_processors(); setImmediate2 = require("timers").setImmediate; defaults = require_defaults().defaults; - isEmpty = function(thing) { + isEmpty = /* @__PURE__ */ __name(function(thing) { return typeof thing === "object" && thing != null && Object.keys(thing).length === 0; - }; - processItem = function(processors2, item, key) { + }, "isEmpty"); + processItem = /* @__PURE__ */ __name(function(processors2, item, key) { var i, len, process2; for (i = 0, len = processors2.length; i < len; i++) { process2 = processors2[i]; item = process2(item, key); } return item; - }; + }, "processItem"); exports2.Parser = function(superClass) { extend(Parser, superClass); function Parser(opts) { @@ -34463,6 +35608,7 @@ var require_parser = __commonJS({ } this.reset(); } + __name(Parser, "Parser"); Parser.prototype.processAsync = function() { var chunk, err; try { @@ -34777,18 +35923,19 @@ var require_xml2js = __commonJS({ "node_modules/xml2js/lib/xml2js.js"(exports2) { (function() { "use strict"; - var builder, defaults, parser, processors, extend = function(child, parent) { + var builder, defaults, parser, processors, extend = /* @__PURE__ */ __name(function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } + __name(ctor, "ctor"); ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; - }, hasProp = {}.hasOwnProperty; + }, "extend"), hasProp = {}.hasOwnProperty; defaults = require_defaults(); builder = require_builder(); parser = require_parser(); @@ -34800,6 +35947,7 @@ var require_xml2js = __commonJS({ function ValidationError(message) { this.message = message; } + __name(ValidationError, "ValidationError"); return ValidationError; }(Error); exports2.Builder = builder.Builder; @@ -34817,6 +35965,9 @@ var require_AbortError = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AbortError = void 0; var AbortError = class extends Error { + static { + __name(this, "AbortError"); + } constructor(message) { super(message); this.name = "AbortError"; @@ -34833,9 +35984,9 @@ var require_commonjs3 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AbortError = void 0; var AbortError_js_1 = require_AbortError(); - Object.defineProperty(exports2, "AbortError", { enumerable: true, get: function() { + Object.defineProperty(exports2, "AbortError", { enumerable: true, get: /* @__PURE__ */ __name(function() { return AbortError_js_1.AbortError; - } }); + }, "get") }); } }); @@ -34852,14 +36003,17 @@ var require_createAbortablePromise = __commonJS({ function rejectOnAbort() { reject(new abort_controller_1.AbortError(abortErrorMsg !== null && abortErrorMsg !== void 0 ? abortErrorMsg : "The operation was aborted.")); } + __name(rejectOnAbort, "rejectOnAbort"); function removeListeners() { abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.removeEventListener("abort", onAbort); } + __name(removeListeners, "removeListeners"); function onAbort() { cleanupBeforeAbort === null || cleanupBeforeAbort === void 0 ? void 0 : cleanupBeforeAbort(); removeListeners(); rejectOnAbort(); } + __name(onAbort, "onAbort"); if (abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.aborted) { return rejectOnAbort(); } @@ -34877,6 +36031,7 @@ var require_createAbortablePromise = __commonJS({ abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.addEventListener("abort", onAbort); }); } + __name(createAbortablePromise, "createAbortablePromise"); exports2.createAbortablePromise = createAbortablePromise; } }); @@ -34895,11 +36050,12 @@ var require_delay = __commonJS({ return (0, createAbortablePromise_js_1.createAbortablePromise)((resolve) => { token = setTimeout(resolve, timeInMs); }, { - cleanupBeforeAbort: () => clearTimeout(token), + cleanupBeforeAbort: /* @__PURE__ */ __name(() => clearTimeout(token), "cleanupBeforeAbort"), abortSignal, abortErrorMsg: abortErrorMsg !== null && abortErrorMsg !== void 0 ? abortErrorMsg : StandardAbortMessage }); } + __name(delay, "delay"); exports2.delay = delay; } }); @@ -34916,6 +36072,7 @@ var require_aborterUtils = __commonJS({ function abortHandler() { aborter.abort(); } + __name(abortHandler, "abortHandler"); (_a = options === null || options === void 0 ? void 0 : options.abortSignal) === null || _a === void 0 ? void 0 : _a.addEventListener("abort", abortHandler); try { return await Promise.race(abortablePromiseBuilders.map((p) => p({ abortSignal: aborter.signal }))); @@ -34924,6 +36081,7 @@ var require_aborterUtils = __commonJS({ (_b = options === null || options === void 0 ? void 0 : options.abortSignal) === null || _b === void 0 ? void 0 : _b.removeEventListener("abort", abortHandler); } } + __name(cancelablePromiseRace, "cancelablePromiseRace"); exports2.cancelablePromiseRace = cancelablePromiseRace; } }); @@ -34940,6 +36098,7 @@ var require_random = __commonJS({ const offset = Math.floor(Math.random() * (max - min + 1)); return offset + min; } + __name(getRandomIntegerInclusive, "getRandomIntegerInclusive"); exports2.getRandomIntegerInclusive = getRandomIntegerInclusive; } }); @@ -34953,6 +36112,7 @@ var require_object = __commonJS({ function isObject(input) { return typeof input === "object" && input !== null && !Array.isArray(input) && !(input instanceof RegExp) && !(input instanceof Date); } + __name(isObject, "isObject"); exports2.isObject = isObject; } }); @@ -34972,6 +36132,7 @@ var require_error = __commonJS({ } return false; } + __name(isError, "isError"); exports2.isError = isError; function getErrorMessage(e) { if (isError(e)) { @@ -34990,6 +36151,7 @@ var require_error = __commonJS({ return `Unknown error ${stringified}`; } } + __name(getErrorMessage, "getErrorMessage"); exports2.getErrorMessage = getErrorMessage; } }); @@ -35005,10 +36167,12 @@ var require_sha256 = __commonJS({ const decodedKey = Buffer.from(key, "base64"); return (0, crypto_1.createHmac)("sha256", decodedKey).update(stringToSign).digest(encoding); } + __name(computeSha256Hmac, "computeSha256Hmac"); exports2.computeSha256Hmac = computeSha256Hmac; async function computeSha256Hash(content, encoding) { return (0, crypto_1.createHash)("sha256").update(content).digest(encoding); } + __name(computeSha256Hash, "computeSha256Hash"); exports2.computeSha256Hash = computeSha256Hash; } }); @@ -35022,6 +36186,7 @@ var require_typeGuards = __commonJS({ function isDefined(thing) { return typeof thing !== "undefined" && thing !== null; } + __name(isDefined, "isDefined"); exports2.isDefined = isDefined; function isObjectWithProperties(thing, properties) { if (!isDefined(thing) || typeof thing !== "object") { @@ -35034,10 +36199,12 @@ var require_typeGuards = __commonJS({ } return true; } + __name(isObjectWithProperties, "isObjectWithProperties"); exports2.isObjectWithProperties = isObjectWithProperties; function objectHasProperty(thing, property) { return isDefined(thing) && typeof thing === "object" && property in thing; } + __name(objectHasProperty, "objectHasProperty"); exports2.objectHasProperty = objectHasProperty; } }); @@ -35054,6 +36221,7 @@ var require_uuidUtils = __commonJS({ function randomUUID() { return uuidFunction(); } + __name(randomUUID, "randomUUID"); exports2.randomUUID = randomUUID; } }); @@ -35088,10 +36256,12 @@ var require_bytesEncoding = __commonJS({ function uint8ArrayToString(bytes, format) { return Buffer.from(bytes).toString(format); } + __name(uint8ArrayToString, "uint8ArrayToString"); exports2.uint8ArrayToString = uint8ArrayToString; function stringToUint8Array(value, format) { return Buffer.from(value, format); } + __name(stringToUint8Array, "stringToUint8Array"); exports2.stringToUint8Array = stringToUint8Array; } }); @@ -35103,85 +36273,85 @@ var require_commonjs4 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.stringToUint8Array = exports2.uint8ArrayToString = exports2.isWebWorker = exports2.isReactNative = exports2.isDeno = exports2.isNodeRuntime = exports2.isNodeLike = exports2.isNode = exports2.isBun = exports2.isBrowser = exports2.randomUUID = exports2.objectHasProperty = exports2.isObjectWithProperties = exports2.isDefined = exports2.computeSha256Hmac = exports2.computeSha256Hash = exports2.getErrorMessage = exports2.isError = exports2.isObject = exports2.getRandomIntegerInclusive = exports2.createAbortablePromise = exports2.cancelablePromiseRace = exports2.delay = void 0; var delay_js_1 = require_delay(); - Object.defineProperty(exports2, "delay", { enumerable: true, get: function() { + Object.defineProperty(exports2, "delay", { enumerable: true, get: /* @__PURE__ */ __name(function() { return delay_js_1.delay; - } }); + }, "get") }); var aborterUtils_js_1 = require_aborterUtils(); - Object.defineProperty(exports2, "cancelablePromiseRace", { enumerable: true, get: function() { + Object.defineProperty(exports2, "cancelablePromiseRace", { enumerable: true, get: /* @__PURE__ */ __name(function() { return aborterUtils_js_1.cancelablePromiseRace; - } }); + }, "get") }); var createAbortablePromise_js_1 = require_createAbortablePromise(); - Object.defineProperty(exports2, "createAbortablePromise", { enumerable: true, get: function() { + Object.defineProperty(exports2, "createAbortablePromise", { enumerable: true, get: /* @__PURE__ */ __name(function() { return createAbortablePromise_js_1.createAbortablePromise; - } }); + }, "get") }); var random_js_1 = require_random(); - Object.defineProperty(exports2, "getRandomIntegerInclusive", { enumerable: true, get: function() { + Object.defineProperty(exports2, "getRandomIntegerInclusive", { enumerable: true, get: /* @__PURE__ */ __name(function() { return random_js_1.getRandomIntegerInclusive; - } }); + }, "get") }); var object_js_1 = require_object(); - Object.defineProperty(exports2, "isObject", { enumerable: true, get: function() { + Object.defineProperty(exports2, "isObject", { enumerable: true, get: /* @__PURE__ */ __name(function() { return object_js_1.isObject; - } }); + }, "get") }); var error_js_1 = require_error(); - Object.defineProperty(exports2, "isError", { enumerable: true, get: function() { + Object.defineProperty(exports2, "isError", { enumerable: true, get: /* @__PURE__ */ __name(function() { return error_js_1.isError; - } }); - Object.defineProperty(exports2, "getErrorMessage", { enumerable: true, get: function() { + }, "get") }); + Object.defineProperty(exports2, "getErrorMessage", { enumerable: true, get: /* @__PURE__ */ __name(function() { return error_js_1.getErrorMessage; - } }); + }, "get") }); var sha256_js_1 = require_sha256(); - Object.defineProperty(exports2, "computeSha256Hash", { enumerable: true, get: function() { + Object.defineProperty(exports2, "computeSha256Hash", { enumerable: true, get: /* @__PURE__ */ __name(function() { return sha256_js_1.computeSha256Hash; - } }); - Object.defineProperty(exports2, "computeSha256Hmac", { enumerable: true, get: function() { + }, "get") }); + Object.defineProperty(exports2, "computeSha256Hmac", { enumerable: true, get: /* @__PURE__ */ __name(function() { return sha256_js_1.computeSha256Hmac; - } }); + }, "get") }); var typeGuards_js_1 = require_typeGuards(); - Object.defineProperty(exports2, "isDefined", { enumerable: true, get: function() { + Object.defineProperty(exports2, "isDefined", { enumerable: true, get: /* @__PURE__ */ __name(function() { return typeGuards_js_1.isDefined; - } }); - Object.defineProperty(exports2, "isObjectWithProperties", { enumerable: true, get: function() { + }, "get") }); + Object.defineProperty(exports2, "isObjectWithProperties", { enumerable: true, get: /* @__PURE__ */ __name(function() { return typeGuards_js_1.isObjectWithProperties; - } }); - Object.defineProperty(exports2, "objectHasProperty", { enumerable: true, get: function() { + }, "get") }); + Object.defineProperty(exports2, "objectHasProperty", { enumerable: true, get: /* @__PURE__ */ __name(function() { return typeGuards_js_1.objectHasProperty; - } }); + }, "get") }); var uuidUtils_js_1 = require_uuidUtils(); - Object.defineProperty(exports2, "randomUUID", { enumerable: true, get: function() { + Object.defineProperty(exports2, "randomUUID", { enumerable: true, get: /* @__PURE__ */ __name(function() { return uuidUtils_js_1.randomUUID; - } }); + }, "get") }); var checkEnvironment_js_1 = require_checkEnvironment(); - Object.defineProperty(exports2, "isBrowser", { enumerable: true, get: function() { + Object.defineProperty(exports2, "isBrowser", { enumerable: true, get: /* @__PURE__ */ __name(function() { return checkEnvironment_js_1.isBrowser; - } }); - Object.defineProperty(exports2, "isBun", { enumerable: true, get: function() { + }, "get") }); + Object.defineProperty(exports2, "isBun", { enumerable: true, get: /* @__PURE__ */ __name(function() { return checkEnvironment_js_1.isBun; - } }); - Object.defineProperty(exports2, "isNode", { enumerable: true, get: function() { + }, "get") }); + Object.defineProperty(exports2, "isNode", { enumerable: true, get: /* @__PURE__ */ __name(function() { return checkEnvironment_js_1.isNode; - } }); - Object.defineProperty(exports2, "isNodeLike", { enumerable: true, get: function() { + }, "get") }); + Object.defineProperty(exports2, "isNodeLike", { enumerable: true, get: /* @__PURE__ */ __name(function() { return checkEnvironment_js_1.isNodeLike; - } }); - Object.defineProperty(exports2, "isNodeRuntime", { enumerable: true, get: function() { + }, "get") }); + Object.defineProperty(exports2, "isNodeRuntime", { enumerable: true, get: /* @__PURE__ */ __name(function() { return checkEnvironment_js_1.isNodeRuntime; - } }); - Object.defineProperty(exports2, "isDeno", { enumerable: true, get: function() { + }, "get") }); + Object.defineProperty(exports2, "isDeno", { enumerable: true, get: /* @__PURE__ */ __name(function() { return checkEnvironment_js_1.isDeno; - } }); - Object.defineProperty(exports2, "isReactNative", { enumerable: true, get: function() { + }, "get") }); + Object.defineProperty(exports2, "isReactNative", { enumerable: true, get: /* @__PURE__ */ __name(function() { return checkEnvironment_js_1.isReactNative; - } }); - Object.defineProperty(exports2, "isWebWorker", { enumerable: true, get: function() { + }, "get") }); + Object.defineProperty(exports2, "isWebWorker", { enumerable: true, get: /* @__PURE__ */ __name(function() { return checkEnvironment_js_1.isWebWorker; - } }); + }, "get") }); var bytesEncoding_js_1 = require_bytesEncoding(); - Object.defineProperty(exports2, "uint8ArrayToString", { enumerable: true, get: function() { + Object.defineProperty(exports2, "uint8ArrayToString", { enumerable: true, get: /* @__PURE__ */ __name(function() { return bytesEncoding_js_1.uint8ArrayToString; - } }); - Object.defineProperty(exports2, "stringToUint8Array", { enumerable: true, get: function() { + }, "get") }); + Object.defineProperty(exports2, "stringToUint8Array", { enumerable: true, get: /* @__PURE__ */ __name(function() { return bytesEncoding_js_1.stringToUint8Array; - } }); + }, "get") }); } }); @@ -35198,6 +36368,7 @@ var require_log = __commonJS({ function log(message, ...args) { process2.stderr.write(`${node_util_1.default.format(message, ...args)}${node_os_1.EOL}`); } + __name(log, "log"); exports2.log = log; } }); @@ -35241,6 +36412,7 @@ var require_debug = __commonJS({ instance.enabled = enabled(instance.namespace); } } + __name(enable, "enable"); function enabled(namespace) { if (namespace.endsWith("*")) { return true; @@ -35257,11 +36429,13 @@ var require_debug = __commonJS({ } return false; } + __name(enabled, "enabled"); function disable() { const result = enabledString || ""; enable(""); return result; } + __name(disable, "disable"); function createDebugger(namespace) { const newDebugger = Object.assign(debug, { enabled: enabled(namespace), @@ -35279,9 +36453,11 @@ var require_debug = __commonJS({ } newDebugger.log(...args); } + __name(debug, "debug"); debuggers.push(newDebugger); return newDebugger; } + __name(createDebugger, "createDebugger"); function destroy() { const index = debuggers.indexOf(this); if (index >= 0) { @@ -35290,11 +36466,13 @@ var require_debug = __commonJS({ } return false; } + __name(destroy, "destroy"); function extend(namespace) { const newDebugger = createDebugger(`${this.namespace}:${namespace}`); newDebugger.log = this.log; return newDebugger; } + __name(extend, "extend"); exports2.default = debugObj; } }); @@ -35335,10 +36513,12 @@ var require_commonjs5 = __commonJS({ } debug_js_1.default.enable(enabledNamespaces.join(",")); } + __name(setLogLevel, "setLogLevel"); exports2.setLogLevel = setLogLevel; function getLogLevel() { return azureLogLevel; } + __name(getLogLevel, "getLogLevel"); exports2.getLogLevel = getLogLevel; var levelMap = { verbose: 400, @@ -35356,12 +36536,14 @@ var require_commonjs5 = __commonJS({ verbose: createLogger(clientRootLogger, "verbose") }; } + __name(createClientLogger, "createClientLogger"); exports2.createClientLogger = createClientLogger; function patchLogMethod(parent, child) { child.log = (...args) => { parent.log(...args); }; } + __name(patchLogMethod, "patchLogMethod"); function createLogger(parent, level) { const logger = Object.assign(parent.extend(level), { level @@ -35374,12 +36556,15 @@ var require_commonjs5 = __commonJS({ registeredLoggers.add(logger); return logger; } + __name(createLogger, "createLogger"); function shouldEnable(logger) { return Boolean(azureLogLevel && levelMap[logger.level] <= levelMap[azureLogLevel]); } + __name(shouldEnable, "shouldEnable"); function isAzureLogLevel(logLevel) { return AZURE_LOG_LEVELS.includes(logLevel); } + __name(isAzureLogLevel, "isAzureLogLevel"); } }); @@ -35390,6 +36575,9 @@ var require_azureKeyCredential = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AzureKeyCredential = void 0; var AzureKeyCredential = class { + static { + __name(this, "AzureKeyCredential"); + } /** * The value of the key to be used in authentication */ @@ -35434,6 +36622,7 @@ var require_keyCredential = __commonJS({ function isKeyCredential(credential) { return (0, core_util_1.isObjectWithProperties)(credential, ["key"]) && typeof credential.key === "string"; } + __name(isKeyCredential, "isKeyCredential"); exports2.isKeyCredential = isKeyCredential; } }); @@ -35446,6 +36635,9 @@ var require_azureNamedKeyCredential = __commonJS({ exports2.isNamedKeyCredential = exports2.AzureNamedKeyCredential = void 0; var core_util_1 = require_commonjs4(); var AzureNamedKeyCredential = class { + static { + __name(this, "AzureNamedKeyCredential"); + } /** * The value of the key to be used in authentication. */ @@ -35493,6 +36685,7 @@ var require_azureNamedKeyCredential = __commonJS({ function isNamedKeyCredential(credential) { return (0, core_util_1.isObjectWithProperties)(credential, ["name", "key"]) && typeof credential.key === "string" && typeof credential.name === "string"; } + __name(isNamedKeyCredential, "isNamedKeyCredential"); exports2.isNamedKeyCredential = isNamedKeyCredential; } }); @@ -35505,6 +36698,9 @@ var require_azureSASCredential = __commonJS({ exports2.isSASCredential = exports2.AzureSASCredential = void 0; var core_util_1 = require_commonjs4(); var AzureSASCredential = class { + static { + __name(this, "AzureSASCredential"); + } /** * The value of the shared access signature to be used in authentication */ @@ -35542,6 +36738,7 @@ var require_azureSASCredential = __commonJS({ function isSASCredential(credential) { return (0, core_util_1.isObjectWithProperties)(credential, ["signature"]) && typeof credential.signature === "string"; } + __name(isSASCredential, "isSASCredential"); exports2.isSASCredential = isSASCredential; } }); @@ -35556,6 +36753,7 @@ var require_tokenCredential = __commonJS({ const castCredential = credential; return castCredential && typeof castCredential.getToken === "function" && (castCredential.signRequest === void 0 || castCredential.getToken.length > 0); } + __name(isTokenCredential, "isTokenCredential"); exports2.isTokenCredential = isTokenCredential; } }); @@ -35567,31 +36765,31 @@ var require_commonjs6 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.isTokenCredential = exports2.isSASCredential = exports2.AzureSASCredential = exports2.isNamedKeyCredential = exports2.AzureNamedKeyCredential = exports2.isKeyCredential = exports2.AzureKeyCredential = void 0; var azureKeyCredential_js_1 = require_azureKeyCredential(); - Object.defineProperty(exports2, "AzureKeyCredential", { enumerable: true, get: function() { + Object.defineProperty(exports2, "AzureKeyCredential", { enumerable: true, get: /* @__PURE__ */ __name(function() { return azureKeyCredential_js_1.AzureKeyCredential; - } }); + }, "get") }); var keyCredential_js_1 = require_keyCredential(); - Object.defineProperty(exports2, "isKeyCredential", { enumerable: true, get: function() { + Object.defineProperty(exports2, "isKeyCredential", { enumerable: true, get: /* @__PURE__ */ __name(function() { return keyCredential_js_1.isKeyCredential; - } }); + }, "get") }); var azureNamedKeyCredential_js_1 = require_azureNamedKeyCredential(); - Object.defineProperty(exports2, "AzureNamedKeyCredential", { enumerable: true, get: function() { + Object.defineProperty(exports2, "AzureNamedKeyCredential", { enumerable: true, get: /* @__PURE__ */ __name(function() { return azureNamedKeyCredential_js_1.AzureNamedKeyCredential; - } }); - Object.defineProperty(exports2, "isNamedKeyCredential", { enumerable: true, get: function() { + }, "get") }); + Object.defineProperty(exports2, "isNamedKeyCredential", { enumerable: true, get: /* @__PURE__ */ __name(function() { return azureNamedKeyCredential_js_1.isNamedKeyCredential; - } }); + }, "get") }); var azureSASCredential_js_1 = require_azureSASCredential(); - Object.defineProperty(exports2, "AzureSASCredential", { enumerable: true, get: function() { + Object.defineProperty(exports2, "AzureSASCredential", { enumerable: true, get: /* @__PURE__ */ __name(function() { return azureSASCredential_js_1.AzureSASCredential; - } }); - Object.defineProperty(exports2, "isSASCredential", { enumerable: true, get: function() { + }, "get") }); + Object.defineProperty(exports2, "isSASCredential", { enumerable: true, get: /* @__PURE__ */ __name(function() { return azureSASCredential_js_1.isSASCredential; - } }); + }, "get") }); var tokenCredential_js_1 = require_tokenCredential(); - Object.defineProperty(exports2, "isTokenCredential", { enumerable: true, get: function() { + Object.defineProperty(exports2, "isTokenCredential", { enumerable: true, get: /* @__PURE__ */ __name(function() { return tokenCredential_js_1.isTokenCredential; - } }); + }, "get") }); } }); @@ -35603,6 +36801,9 @@ var require_dist = __commonJS({ var listenersMap = /* @__PURE__ */ new WeakMap(); var abortedMap = /* @__PURE__ */ new WeakMap(); var AbortSignal2 = class _AbortSignal { + static { + __name(this, "AbortSignal"); + } constructor() { this.onabort = null; listenersMap.set(this, []); @@ -35678,13 +36879,20 @@ var require_dist = __commonJS({ } abortedMap.set(signal, true); } + __name(abortSignal, "abortSignal"); var AbortError = class extends Error { + static { + __name(this, "AbortError"); + } constructor(message) { super(message); this.name = "AbortError"; } }; var AbortController2 = class { + static { + __name(this, "AbortController"); + } // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types constructor(parentSignals) { this._signal = new AbortSignal2(); @@ -35754,6 +36962,7 @@ var require_delayed_stream = __commonJS({ this._released = false; this._bufferedEvents = []; } + __name(DelayedStream, "DelayedStream"); util.inherits(DelayedStream, Stream); DelayedStream.create = function(source, options) { var delayedStream = new this(); @@ -35777,9 +36986,9 @@ var require_delayed_stream = __commonJS({ Object.defineProperty(DelayedStream.prototype, "readable", { configurable: true, enumerable: true, - get: function() { + get: /* @__PURE__ */ __name(function() { return this.source.readable; - } + }, "get") }); DelayedStream.prototype.setEncoding = function() { return this.source.setEncoding.apply(this.source, arguments); @@ -35849,6 +37058,7 @@ var require_combined_stream = __commonJS({ this._insideLoop = false; this._pendingNext = false; } + __name(CombinedStream, "CombinedStream"); util.inherits(CombinedStream, Stream); CombinedStream.create = function(options) { var combinedStream = new this(); @@ -44561,6 +45771,7 @@ var require_mime_types = __commonJS({ } return false; } + __name(charset, "charset"); function contentType(str) { if (!str || typeof str !== "string") { return false; @@ -44575,6 +45786,7 @@ var require_mime_types = __commonJS({ } return mime; } + __name(contentType, "contentType"); function extension(type) { if (!type || typeof type !== "string") { return false; @@ -44586,6 +45798,7 @@ var require_mime_types = __commonJS({ } return exts[0]; } + __name(extension, "extension"); function lookup(path2) { if (!path2 || typeof path2 !== "string") { return false; @@ -44596,9 +45809,10 @@ var require_mime_types = __commonJS({ } return exports2.types[extension2] || false; } + __name(lookup, "lookup"); function populateMaps(extensions, types) { var preference = ["nginx", "apache", void 0, "iana"]; - Object.keys(db).forEach(function forEachMimeType(type) { + Object.keys(db).forEach(/* @__PURE__ */ __name(function forEachMimeType(type) { var mime = db[type]; var exts = mime.extensions; if (!exts || !exts.length) { @@ -44616,8 +45830,9 @@ var require_mime_types = __commonJS({ } types[extension2] = type; } - }); + }, "forEachMimeType")); } + __name(populateMaps, "populateMaps"); } }); @@ -44633,6 +45848,7 @@ var require_defer = __commonJS({ setTimeout(fn, 0); } } + __name(defer, "defer"); } }); @@ -44646,16 +45862,17 @@ var require_async = __commonJS({ defer(function() { isAsync = true; }); - return function async_callback(err, result) { + return /* @__PURE__ */ __name(function async_callback(err, result) { if (isAsync) { callback(err, result); } else { - defer(function nextTick_callback() { + defer(/* @__PURE__ */ __name(function nextTick_callback() { callback(err, result); - }); + }, "nextTick_callback")); } - }; + }, "async_callback"); } + __name(async, "async"); } }); @@ -44667,11 +45884,13 @@ var require_abort = __commonJS({ Object.keys(state.jobs).forEach(clean.bind(state)); state.jobs = {}; } + __name(abort, "abort"); function clean(key) { if (typeof this.jobs[key] == "function") { this.jobs[key](); } } + __name(clean, "clean"); } }); @@ -44696,6 +45915,7 @@ var require_iterate = __commonJS({ callback(error, state.results); }); } + __name(iterate, "iterate"); function runJob(iterator, key, item, callback) { var aborter; if (iterator.length == 2) { @@ -44705,6 +45925,7 @@ var require_iterate = __commonJS({ } return aborter; } + __name(runJob, "runJob"); } }); @@ -44727,6 +45948,7 @@ var require_state = __commonJS({ } return initState; } + __name(state, "state"); } }); @@ -44744,6 +45966,7 @@ var require_terminator = __commonJS({ abort(this); async(callback)(null, this.results); } + __name(terminator, "terminator"); } }); @@ -44771,6 +45994,7 @@ var require_parallel = __commonJS({ } return terminator.bind(state, callback); } + __name(parallel, "parallel"); } }); @@ -44785,7 +46009,7 @@ var require_serialOrdered = __commonJS({ module2.exports.descending = descending; function serialOrdered(list, iterator, sortMethod, callback) { var state = initState(list, sortMethod); - iterate(list, iterator, state, function iteratorHandler(error, result) { + iterate(list, iterator, state, /* @__PURE__ */ __name(function iteratorHandler(error, result) { if (error) { callback(error, result); return; @@ -44796,15 +46020,18 @@ var require_serialOrdered = __commonJS({ return; } callback(null, state.results); - }); + }, "iteratorHandler")); return terminator.bind(state, callback); } + __name(serialOrdered, "serialOrdered"); function ascending(a, b) { return a < b ? -1 : a > b ? 1 : 0; } + __name(ascending, "ascending"); function descending(a, b) { return -1 * ascending(a, b); } + __name(descending, "descending"); } }); @@ -44816,6 +46043,7 @@ var require_serial = __commonJS({ function serial(list, iterator, callback) { return serialOrdered(list, iterator, null, callback); } + __name(serial, "serial"); } }); @@ -44871,6 +46099,7 @@ var require_form_data = __commonJS({ this[option] = options[option]; } } + __name(FormData, "FormData"); FormData.LINE_BREAK = "\r\n"; FormData.DEFAULT_CONTENT_TYPE = "application/octet-stream"; FormData.prototype.append = function(field, value, options) { @@ -45131,11 +46360,11 @@ var require_form_data = __commonJS({ this.pipe(request); if (cb) { var onResponse; - var callback = function(error, responce) { + var callback = /* @__PURE__ */ __name(function(error, responce) { request.removeListener("error", callback); request.removeListener("response", onResponse); return cb.call(this, error, responce); - }; + }, "callback"); onResponse = callback.bind(this, null); request.on("error", callback); request.on("response", onResponse); @@ -45165,6 +46394,7 @@ var require_lib3 = __commonJS({ function sign(x) { return x < 0 ? -1 : 1; } + __name(sign, "sign"); function evenRound(x) { if (x % 1 === 0.5 && (x & 1) === 0) { return Math.floor(x); @@ -45172,6 +46402,7 @@ var require_lib3 = __commonJS({ return Math.round(x); } } + __name(evenRound, "evenRound"); function createNumberConversion(bitLength, typeOpts) { if (!typeOpts.unsigned) { --bitLength; @@ -45216,6 +46447,7 @@ var require_lib3 = __commonJS({ return x; }; } + __name(createNumberConversion, "createNumberConversion"); conversions["void"] = function() { return void 0; }; @@ -45313,12 +46545,12 @@ var require_lib3 = __commonJS({ var require_utils3 = __commonJS({ "node_modules/whatwg-url/lib/utils.js"(exports2, module2) { "use strict"; - module2.exports.mixin = function mixin(target, source) { + module2.exports.mixin = /* @__PURE__ */ __name(function mixin(target, source) { const keys = Object.getOwnPropertyNames(source); for (let i = 0; i < keys.length; ++i) { Object.defineProperty(target, keys[i], Object.getOwnPropertyDescriptor(source, keys[i])); } - }; + }, "mixin"); module2.exports.wrapperSymbol = Symbol("wrapper"); module2.exports.implSymbol = Symbol("impl"); module2.exports.wrapperForImpl = function(impl) { @@ -45352,6 +46584,7 @@ var require_tr46 = __commonJS({ return s.normalize("NFC"); }).join("\0"); } + __name(normalize, "normalize"); function findStatus(val) { var start = 0; var end = mappingTable.length - 1; @@ -45368,10 +46601,12 @@ var require_tr46 = __commonJS({ } return null; } + __name(findStatus, "findStatus"); var regexAstralSymbols = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g; function countSymbols(string) { return string.replace(regexAstralSymbols, "_").length; } + __name(countSymbols, "countSymbols"); function mapChars(domain_name, useSTD3, processing_option) { var hasError = false; var processed = ""; @@ -45420,6 +46655,7 @@ var require_tr46 = __commonJS({ error: hasError }; } + __name(mapChars, "mapChars"); var combiningMarksRegex = /[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08E4-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C03\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D01-\u0D03\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u18A9\u1920-\u192B\u1930-\u193B\u19B0-\u19C0\u19C8\u19C9\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF5\u1DFC-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C4\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2D]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD804[\uDC00-\uDC02\uDC38-\uDC46\uDC7F-\uDC82\uDCB0-\uDCBA\uDD00-\uDD02\uDD27-\uDD34\uDD73\uDD80-\uDD82\uDDB3-\uDDC0\uDE2C-\uDE37\uDEDF-\uDEEA\uDF01-\uDF03\uDF3C\uDF3E-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDCB0-\uDCC3\uDDAF-\uDDB5\uDDB8-\uDDC0\uDE30-\uDE40\uDEAB-\uDEB7]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF51-\uDF7E\uDF8F-\uDF92]|\uD82F[\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD83A[\uDCD0-\uDCD6]|\uDB40[\uDD00-\uDDEF]/; function validateLabel(label, processing_option) { if (label.substr(0, 4) === "xn--") { @@ -45443,6 +46679,7 @@ var require_tr46 = __commonJS({ error }; } + __name(validateLabel, "validateLabel"); function processing(domain_name, useSTD3, processing_option) { var result = mapChars(domain_name, useSTD3, processing_option); result.string = normalize(result.string); @@ -45461,6 +46698,7 @@ var require_tr46 = __commonJS({ error: result.error }; } + __name(processing, "processing"); module2.exports.toASCII = function(domain_name, useSTD3, processing_option, verifyDnsLength) { var result = processing(domain_name, useSTD3, processing_option); var labels = result.string.split("."); @@ -45517,53 +46755,69 @@ var require_url_state_machine = __commonJS({ function countSymbols(str) { return punycode.ucs2.decode(str).length; } + __name(countSymbols, "countSymbols"); function at(input, idx) { const c = input[idx]; return isNaN(c) ? void 0 : String.fromCodePoint(c); } + __name(at, "at"); function isASCIIDigit(c) { return c >= 48 && c <= 57; } + __name(isASCIIDigit, "isASCIIDigit"); function isASCIIAlpha(c) { return c >= 65 && c <= 90 || c >= 97 && c <= 122; } + __name(isASCIIAlpha, "isASCIIAlpha"); function isASCIIAlphanumeric(c) { return isASCIIAlpha(c) || isASCIIDigit(c); } + __name(isASCIIAlphanumeric, "isASCIIAlphanumeric"); function isASCIIHex(c) { return isASCIIDigit(c) || c >= 65 && c <= 70 || c >= 97 && c <= 102; } + __name(isASCIIHex, "isASCIIHex"); function isSingleDot(buffer) { return buffer === "." || buffer.toLowerCase() === "%2e"; } + __name(isSingleDot, "isSingleDot"); function isDoubleDot(buffer) { buffer = buffer.toLowerCase(); return buffer === ".." || buffer === "%2e." || buffer === ".%2e" || buffer === "%2e%2e"; } + __name(isDoubleDot, "isDoubleDot"); function isWindowsDriveLetterCodePoints(cp1, cp2) { return isASCIIAlpha(cp1) && (cp2 === 58 || cp2 === 124); } + __name(isWindowsDriveLetterCodePoints, "isWindowsDriveLetterCodePoints"); function isWindowsDriveLetterString(string) { return string.length === 2 && isASCIIAlpha(string.codePointAt(0)) && (string[1] === ":" || string[1] === "|"); } + __name(isWindowsDriveLetterString, "isWindowsDriveLetterString"); function isNormalizedWindowsDriveLetterString(string) { return string.length === 2 && isASCIIAlpha(string.codePointAt(0)) && string[1] === ":"; } + __name(isNormalizedWindowsDriveLetterString, "isNormalizedWindowsDriveLetterString"); function containsForbiddenHostCodePoint(string) { return string.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|%|\/|:|\?|@|\[|\\|\]/) !== -1; } + __name(containsForbiddenHostCodePoint, "containsForbiddenHostCodePoint"); function containsForbiddenHostCodePointExcludingPercent(string) { return string.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|\/|:|\?|@|\[|\\|\]/) !== -1; } + __name(containsForbiddenHostCodePointExcludingPercent, "containsForbiddenHostCodePointExcludingPercent"); function isSpecialScheme(scheme) { return specialSchemes[scheme] !== void 0; } + __name(isSpecialScheme, "isSpecialScheme"); function isSpecial(url) { return isSpecialScheme(url.scheme); } + __name(isSpecial, "isSpecial"); function defaultPort(scheme) { return specialSchemes[scheme]; } + __name(defaultPort, "defaultPort"); function percentEncode(c) { let hex = c.toString(16).toUpperCase(); if (hex.length === 1) { @@ -45571,6 +46825,7 @@ var require_url_state_machine = __commonJS({ } return "%" + hex; } + __name(percentEncode, "percentEncode"); function utf8PercentEncode(c) { const buf = new Buffer(c); let str = ""; @@ -45579,6 +46834,7 @@ var require_url_state_machine = __commonJS({ } return str; } + __name(utf8PercentEncode, "utf8PercentEncode"); function utf8PercentDecode(str) { const input = new Buffer(str); const output = []; @@ -45594,17 +46850,21 @@ var require_url_state_machine = __commonJS({ } return new Buffer(output).toString(); } + __name(utf8PercentDecode, "utf8PercentDecode"); function isC0ControlPercentEncode(c) { return c <= 31 || c > 126; } + __name(isC0ControlPercentEncode, "isC0ControlPercentEncode"); var extraPathPercentEncodeSet = /* @__PURE__ */ new Set([32, 34, 35, 60, 62, 63, 96, 123, 125]); function isPathPercentEncode(c) { return isC0ControlPercentEncode(c) || extraPathPercentEncodeSet.has(c); } + __name(isPathPercentEncode, "isPathPercentEncode"); var extraUserinfoPercentEncodeSet = /* @__PURE__ */ new Set([47, 58, 59, 61, 64, 91, 92, 93, 94, 124]); function isUserinfoPercentEncode(c) { return isPathPercentEncode(c) || extraUserinfoPercentEncodeSet.has(c); } + __name(isUserinfoPercentEncode, "isUserinfoPercentEncode"); function percentEncodeChar(c, encodeSetPredicate) { const cStr = String.fromCodePoint(c); if (encodeSetPredicate(c)) { @@ -45612,6 +46872,7 @@ var require_url_state_machine = __commonJS({ } return cStr; } + __name(percentEncodeChar, "percentEncodeChar"); function parseIPv4Number(input) { let R = 10; if (input.length >= 2 && input.charAt(0) === "0" && input.charAt(1).toLowerCase() === "x") { @@ -45630,6 +46891,7 @@ var require_url_state_machine = __commonJS({ } return parseInt(input, R); } + __name(parseIPv4Number, "parseIPv4Number"); function parseIPv4(input) { const parts = input.split("."); if (parts[parts.length - 1] === "") { @@ -45667,6 +46929,7 @@ var require_url_state_machine = __commonJS({ } return ipv4; } + __name(parseIPv4, "parseIPv4"); function serializeIPv4(address) { let output = ""; let n = address; @@ -45679,6 +46942,7 @@ var require_url_state_machine = __commonJS({ } return output; } + __name(serializeIPv4, "serializeIPv4"); function parseIPv6(input) { const address = [0, 0, 0, 0, 0, 0, 0, 0]; let pieceIndex = 0; @@ -45784,6 +47048,7 @@ var require_url_state_machine = __commonJS({ } return address; } + __name(parseIPv6, "parseIPv6"); function serializeIPv6(address) { let output = ""; const seqResult = findLongestZeroSequence(address); @@ -45808,6 +47073,7 @@ var require_url_state_machine = __commonJS({ } return output; } + __name(serializeIPv6, "serializeIPv6"); function parseHost(input, isSpecialArg) { if (input[0] === "[") { if (input[input.length - 1] !== "]") { @@ -45832,6 +47098,7 @@ var require_url_state_machine = __commonJS({ } return asciiDomain; } + __name(parseHost, "parseHost"); function parseOpaqueHost(input) { if (containsForbiddenHostCodePointExcludingPercent(input)) { return failure; @@ -45843,6 +47110,7 @@ var require_url_state_machine = __commonJS({ } return output; } + __name(parseOpaqueHost, "parseOpaqueHost"); function findLongestZeroSequence(arr) { let maxIdx = null; let maxLen = 1; @@ -45872,6 +47140,7 @@ var require_url_state_machine = __commonJS({ len: maxLen }; } + __name(findLongestZeroSequence, "findLongestZeroSequence"); function serializeHost(host) { if (typeof host === "number") { return serializeIPv4(host); @@ -45881,12 +47150,15 @@ var require_url_state_machine = __commonJS({ } return host; } + __name(serializeHost, "serializeHost"); function trimControlChars(url) { return url.replace(/^[\u0000-\u001F\u0020]+|[\u0000-\u001F\u0020]+$/g, ""); } + __name(trimControlChars, "trimControlChars"); function trimTabAndNewline(url) { return url.replace(/\u0009|\u000A|\u000D/g, ""); } + __name(trimTabAndNewline, "trimTabAndNewline"); function shortenPath(url) { const path2 = url.path; if (path2.length === 0) { @@ -45897,15 +47169,19 @@ var require_url_state_machine = __commonJS({ } path2.pop(); } + __name(shortenPath, "shortenPath"); function includesCredentials(url) { return url.username !== "" || url.password !== ""; } + __name(includesCredentials, "includesCredentials"); function cannotHaveAUsernamePasswordPort(url) { return url.host === null || url.host === "" || url.cannotBeABaseURL || url.scheme === "file"; } + __name(cannotHaveAUsernamePasswordPort, "cannotHaveAUsernamePasswordPort"); function isNormalizedWindowsDriveLetter(string) { return /^[A-Za-z]:$/.test(string); } + __name(isNormalizedWindowsDriveLetter, "isNormalizedWindowsDriveLetter"); function URLStateMachine(input, base, encodingOverride, url, stateOverride) { this.pointer = 0; this.input = input; @@ -45956,7 +47232,8 @@ var require_url_state_machine = __commonJS({ } } } - URLStateMachine.prototype["parse scheme start"] = function parseSchemeStart(c, cStr) { + __name(URLStateMachine, "URLStateMachine"); + URLStateMachine.prototype["parse scheme start"] = /* @__PURE__ */ __name(function parseSchemeStart(c, cStr) { if (isASCIIAlpha(c)) { this.buffer += cStr.toLowerCase(); this.state = "scheme"; @@ -45968,8 +47245,8 @@ var require_url_state_machine = __commonJS({ return failure; } return true; - }; - URLStateMachine.prototype["parse scheme"] = function parseScheme(c, cStr) { + }, "parseSchemeStart"); + URLStateMachine.prototype["parse scheme"] = /* @__PURE__ */ __name(function parseScheme(c, cStr) { if (isASCIIAlphanumeric(c) || c === 43 || c === 45 || c === 46) { this.buffer += cStr.toLowerCase(); } else if (c === 58) { @@ -46018,8 +47295,8 @@ var require_url_state_machine = __commonJS({ return failure; } return true; - }; - URLStateMachine.prototype["parse no scheme"] = function parseNoScheme(c) { + }, "parseScheme"); + URLStateMachine.prototype["parse no scheme"] = /* @__PURE__ */ __name(function parseNoScheme(c) { if (this.base === null || this.base.cannotBeABaseURL && c !== 35) { return failure; } else if (this.base.cannotBeABaseURL && c === 35) { @@ -46037,8 +47314,8 @@ var require_url_state_machine = __commonJS({ --this.pointer; } return true; - }; - URLStateMachine.prototype["parse special relative or authority"] = function parseSpecialRelativeOrAuthority(c) { + }, "parseNoScheme"); + URLStateMachine.prototype["parse special relative or authority"] = /* @__PURE__ */ __name(function parseSpecialRelativeOrAuthority(c) { if (c === 47 && this.input[this.pointer + 1] === 47) { this.state = "special authority ignore slashes"; ++this.pointer; @@ -46048,8 +47325,8 @@ var require_url_state_machine = __commonJS({ --this.pointer; } return true; - }; - URLStateMachine.prototype["parse path or authority"] = function parsePathOrAuthority(c) { + }, "parseSpecialRelativeOrAuthority"); + URLStateMachine.prototype["parse path or authority"] = /* @__PURE__ */ __name(function parsePathOrAuthority(c) { if (c === 47) { this.state = "authority"; } else { @@ -46057,8 +47334,8 @@ var require_url_state_machine = __commonJS({ --this.pointer; } return true; - }; - URLStateMachine.prototype["parse relative"] = function parseRelative(c) { + }, "parsePathOrAuthority"); + URLStateMachine.prototype["parse relative"] = /* @__PURE__ */ __name(function parseRelative(c) { this.url.scheme = this.base.scheme; if (isNaN(c)) { this.url.username = this.base.username; @@ -46099,8 +47376,8 @@ var require_url_state_machine = __commonJS({ --this.pointer; } return true; - }; - URLStateMachine.prototype["parse relative slash"] = function parseRelativeSlash(c) { + }, "parseRelative"); + URLStateMachine.prototype["parse relative slash"] = /* @__PURE__ */ __name(function parseRelativeSlash(c) { if (isSpecial(this.url) && (c === 47 || c === 92)) { if (c === 92) { this.parseError = true; @@ -46117,8 +47394,8 @@ var require_url_state_machine = __commonJS({ --this.pointer; } return true; - }; - URLStateMachine.prototype["parse special authority slashes"] = function parseSpecialAuthoritySlashes(c) { + }, "parseRelativeSlash"); + URLStateMachine.prototype["parse special authority slashes"] = /* @__PURE__ */ __name(function parseSpecialAuthoritySlashes(c) { if (c === 47 && this.input[this.pointer + 1] === 47) { this.state = "special authority ignore slashes"; ++this.pointer; @@ -46128,8 +47405,8 @@ var require_url_state_machine = __commonJS({ --this.pointer; } return true; - }; - URLStateMachine.prototype["parse special authority ignore slashes"] = function parseSpecialAuthorityIgnoreSlashes(c) { + }, "parseSpecialAuthoritySlashes"); + URLStateMachine.prototype["parse special authority ignore slashes"] = /* @__PURE__ */ __name(function parseSpecialAuthorityIgnoreSlashes(c) { if (c !== 47 && c !== 92) { this.state = "authority"; --this.pointer; @@ -46137,8 +47414,8 @@ var require_url_state_machine = __commonJS({ this.parseError = true; } return true; - }; - URLStateMachine.prototype["parse authority"] = function parseAuthority(c, cStr) { + }, "parseSpecialAuthorityIgnoreSlashes"); + URLStateMachine.prototype["parse authority"] = /* @__PURE__ */ __name(function parseAuthority(c, cStr) { if (c === 64) { this.parseError = true; if (this.atFlag) { @@ -46172,8 +47449,8 @@ var require_url_state_machine = __commonJS({ this.buffer += cStr; } return true; - }; - URLStateMachine.prototype["parse hostname"] = URLStateMachine.prototype["parse host"] = function parseHostName(c, cStr) { + }, "parseAuthority"); + URLStateMachine.prototype["parse hostname"] = URLStateMachine.prototype["parse host"] = /* @__PURE__ */ __name(function parseHostName(c, cStr) { if (this.stateOverride && this.url.scheme === "file") { --this.pointer; this.state = "file host"; @@ -46220,8 +47497,8 @@ var require_url_state_machine = __commonJS({ this.buffer += cStr; } return true; - }; - URLStateMachine.prototype["parse port"] = function parsePort(c, cStr) { + }, "parseHostName"); + URLStateMachine.prototype["parse port"] = /* @__PURE__ */ __name(function parsePort(c, cStr) { if (isASCIIDigit(c)) { this.buffer += cStr; } else if (isNaN(c) || c === 47 || c === 63 || c === 35 || isSpecial(this.url) && c === 92 || this.stateOverride) { @@ -46244,9 +47521,9 @@ var require_url_state_machine = __commonJS({ return failure; } return true; - }; + }, "parsePort"); var fileOtherwiseCodePoints = /* @__PURE__ */ new Set([47, 92, 63, 35]); - URLStateMachine.prototype["parse file"] = function parseFile(c) { + URLStateMachine.prototype["parse file"] = /* @__PURE__ */ __name(function parseFile(c) { this.url.scheme = "file"; if (c === 47 || c === 92) { if (c === 92) { @@ -46287,8 +47564,8 @@ var require_url_state_machine = __commonJS({ --this.pointer; } return true; - }; - URLStateMachine.prototype["parse file slash"] = function parseFileSlash(c) { + }, "parseFile"); + URLStateMachine.prototype["parse file slash"] = /* @__PURE__ */ __name(function parseFileSlash(c) { if (c === 47 || c === 92) { if (c === 92) { this.parseError = true; @@ -46306,8 +47583,8 @@ var require_url_state_machine = __commonJS({ --this.pointer; } return true; - }; - URLStateMachine.prototype["parse file host"] = function parseFileHost(c, cStr) { + }, "parseFileSlash"); + URLStateMachine.prototype["parse file host"] = /* @__PURE__ */ __name(function parseFileHost(c, cStr) { if (isNaN(c) || c === 47 || c === 92 || c === 63 || c === 35) { --this.pointer; if (!this.stateOverride && isWindowsDriveLetterString(this.buffer)) { @@ -46338,8 +47615,8 @@ var require_url_state_machine = __commonJS({ this.buffer += cStr; } return true; - }; - URLStateMachine.prototype["parse path start"] = function parsePathStart(c) { + }, "parseFileHost"); + URLStateMachine.prototype["parse path start"] = /* @__PURE__ */ __name(function parsePathStart(c) { if (isSpecial(this.url)) { if (c === 92) { this.parseError = true; @@ -46361,8 +47638,8 @@ var require_url_state_machine = __commonJS({ } } return true; - }; - URLStateMachine.prototype["parse path"] = function parsePath(c) { + }, "parsePathStart"); + URLStateMachine.prototype["parse path"] = /* @__PURE__ */ __name(function parsePath(c) { if (isNaN(c) || c === 47 || isSpecial(this.url) && c === 92 || !this.stateOverride && (c === 63 || c === 35)) { if (isSpecial(this.url) && c === 92) { this.parseError = true; @@ -46406,8 +47683,8 @@ var require_url_state_machine = __commonJS({ this.buffer += percentEncodeChar(c, isPathPercentEncode); } return true; - }; - URLStateMachine.prototype["parse cannot-be-a-base-URL path"] = function parseCannotBeABaseURLPath(c) { + }, "parsePath"); + URLStateMachine.prototype["parse cannot-be-a-base-URL path"] = /* @__PURE__ */ __name(function parseCannotBeABaseURLPath(c) { if (c === 63) { this.url.query = ""; this.state = "query"; @@ -46426,8 +47703,8 @@ var require_url_state_machine = __commonJS({ } } return true; - }; - URLStateMachine.prototype["parse query"] = function parseQuery(c, cStr) { + }, "parseCannotBeABaseURLPath"); + URLStateMachine.prototype["parse query"] = /* @__PURE__ */ __name(function parseQuery(c, cStr) { if (isNaN(c) || !this.stateOverride && c === 35) { if (!isSpecial(this.url) || this.url.scheme === "ws" || this.url.scheme === "wss") { this.encodingOverride = "utf-8"; @@ -46452,8 +47729,8 @@ var require_url_state_machine = __commonJS({ this.buffer += cStr; } return true; - }; - URLStateMachine.prototype["parse fragment"] = function parseFragment(c) { + }, "parseQuery"); + URLStateMachine.prototype["parse fragment"] = /* @__PURE__ */ __name(function parseFragment(c) { if (isNaN(c)) { } else if (c === 0) { this.parseError = true; @@ -46464,7 +47741,7 @@ var require_url_state_machine = __commonJS({ this.url.fragment += percentEncodeChar(c, isC0ControlPercentEncode); } return true; - }; + }, "parseFragment"); function serializeURL(url, excludeFragment) { let output = url.scheme + ":"; if (url.host !== null) { @@ -46498,6 +47775,7 @@ var require_url_state_machine = __commonJS({ } return output; } + __name(serializeURL, "serializeURL"); function serializeOrigin(tuple) { let result = tuple.scheme + "://"; result += serializeHost(tuple.host); @@ -46506,6 +47784,7 @@ var require_url_state_machine = __commonJS({ } return result; } + __name(serializeOrigin, "serializeOrigin"); module2.exports.serializeURL = serializeURL; module2.exports.serializeURLOrigin = function(url) { switch (url.scheme) { @@ -46576,6 +47855,9 @@ var require_URL_impl = __commonJS({ "use strict"; var usm = require_url_state_machine(); exports2.implementation = class URLImpl { + static { + __name(this, "URLImpl"); + } constructor(constructorArgs) { const url = constructorArgs[0]; const base = constructorArgs[1]; @@ -46752,7 +48034,8 @@ var require_URL = __commonJS({ } module2.exports.setup(this, args); } - URL3.prototype.toJSON = function toJSON() { + __name(URL3, "URL"); + URL3.prototype.toJSON = /* @__PURE__ */ __name(function toJSON() { if (!this || !module2.exports.is(this)) { throw new TypeError("Illegal invocation"); } @@ -46761,7 +48044,7 @@ var require_URL = __commonJS({ args[i] = arguments[i]; } return this[impl].toJSON.apply(this[impl], args); - }; + }, "toJSON"); Object.defineProperty(URL3.prototype, "href", { get() { return this[impl].href; @@ -46933,6 +48216,7 @@ var require_lib4 = __commonJS({ function _interopDefault(ex) { return ex && typeof ex === "object" && "default" in ex ? ex["default"] : ex; } + __name(_interopDefault, "_interopDefault"); var Stream = _interopDefault(require("stream")); var http = _interopDefault(require("http")); var Url = _interopDefault(require("url")); @@ -46943,6 +48227,9 @@ var require_lib4 = __commonJS({ var BUFFER = Symbol("buffer"); var TYPE = Symbol("type"); var Blob2 = class _Blob { + static { + __name(this, "Blob"); + } constructor() { this[TYPE] = ""; const blobParts = arguments[0]; @@ -47048,6 +48335,7 @@ var require_lib4 = __commonJS({ } Error.captureStackTrace(this, this.constructor); } + __name(FetchError, "FetchError"); FetchError.prototype = Object.create(Error.prototype); FetchError.prototype.constructor = FetchError; FetchError.prototype.name = "FetchError"; @@ -47092,6 +48380,7 @@ var require_lib4 = __commonJS({ }); } } + __name(Body, "Body"); Body.prototype = { get body() { return this[INTERNALS].body; @@ -47256,6 +48545,7 @@ var require_lib4 = __commonJS({ }); }); } + __name(consumeBody, "consumeBody"); function convertBody(buffer, headers) { if (typeof convert !== "function") { throw new Error("The package `encoding` must be installed to use the textConverted() function"); @@ -47293,15 +48583,18 @@ var require_lib4 = __commonJS({ } return convert(buffer, "UTF-8", charset).toString(); } + __name(convertBody, "convertBody"); function isURLSearchParams(obj) { if (typeof obj !== "object" || typeof obj.append !== "function" || typeof obj.delete !== "function" || typeof obj.get !== "function" || typeof obj.getAll !== "function" || typeof obj.has !== "function" || typeof obj.set !== "function") { return false; } return obj.constructor.name === "URLSearchParams" || Object.prototype.toString.call(obj) === "[object URLSearchParams]" || typeof obj.sort === "function"; } + __name(isURLSearchParams, "isURLSearchParams"); function isBlob(obj) { return typeof obj === "object" && typeof obj.arrayBuffer === "function" && typeof obj.type === "string" && typeof obj.stream === "function" && typeof obj.constructor === "function" && typeof obj.constructor.name === "string" && /^(Blob|File)$/.test(obj.constructor.name) && /^(Blob|File)$/.test(obj[Symbol.toStringTag]); } + __name(isBlob, "isBlob"); function clone(instance) { let p1, p2; let body = instance.body; @@ -47318,6 +48611,7 @@ var require_lib4 = __commonJS({ } return body; } + __name(clone, "clone"); function extractContentType(body) { if (body === null) { return null; @@ -47341,6 +48635,7 @@ var require_lib4 = __commonJS({ return "text/plain;charset=UTF-8"; } } + __name(extractContentType, "extractContentType"); function getTotalBytes(instance) { const body = instance.body; if (body === null) { @@ -47359,6 +48654,7 @@ var require_lib4 = __commonJS({ return null; } } + __name(getTotalBytes, "getTotalBytes"); function writeToStream(dest, instance) { const body = instance.body; if (body === null) { @@ -47372,6 +48668,7 @@ var require_lib4 = __commonJS({ body.pipe(dest); } } + __name(writeToStream, "writeToStream"); Body.Promise = global.Promise; var invalidTokenRegex = /[^\^_`a-zA-Z\-0-9!#$%&'*+.|~]/; var invalidHeaderCharRegex = /[^\t\x20-\x7e\x80-\xff]/; @@ -47381,12 +48678,14 @@ var require_lib4 = __commonJS({ throw new TypeError(`${name} is not a legal HTTP header name`); } } + __name(validateName, "validateName"); function validateValue2(value) { value = `${value}`; if (invalidHeaderCharRegex.test(value)) { throw new TypeError(`${value} is not a legal HTTP header value`); } } + __name(validateValue2, "validateValue"); function find(map, name) { name = name.toLowerCase(); for (const key in map) { @@ -47396,8 +48695,12 @@ var require_lib4 = __commonJS({ } return void 0; } + __name(find, "find"); var MAP = Symbol("map"); var Headers2 = class _Headers { + static { + __name(this, "Headers"); + } /** * Headers class * @@ -47604,6 +48907,7 @@ var require_lib4 = __commonJS({ return [k.toLowerCase(), headers[MAP][k].join(", ")]; }); } + __name(getHeaders, "getHeaders"); var INTERNAL = Symbol("internal"); function createHeadersIterator(target, kind) { const iterator = Object.create(HeadersIteratorPrototype); @@ -47614,6 +48918,7 @@ var require_lib4 = __commonJS({ }; return iterator; } + __name(createHeadersIterator, "createHeadersIterator"); var HeadersIteratorPrototype = Object.setPrototypeOf({ next() { if (!this || Object.getPrototypeOf(this) !== HeadersIteratorPrototype) { @@ -47650,6 +48955,7 @@ var require_lib4 = __commonJS({ } return obj; } + __name(exportNodeCompatibleHeaders, "exportNodeCompatibleHeaders"); function createHeadersLenient(obj) { const headers = new Headers2(); for (const name of Object.keys(obj)) { @@ -47673,9 +48979,13 @@ var require_lib4 = __commonJS({ } return headers; } + __name(createHeadersLenient, "createHeadersLenient"); var INTERNALS$1 = Symbol("Response internals"); var STATUS_CODES = http.STATUS_CODES; var Response = class _Response { + static { + __name(this, "Response"); + } constructor() { let body = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null; let opts = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; @@ -47759,15 +49069,21 @@ var require_lib4 = __commonJS({ } return parse_url(urlStr); } + __name(parseURL, "parseURL"); var streamDestructionSupported = "destroy" in Stream.Readable.prototype; function isRequest(input) { return typeof input === "object" && typeof input[INTERNALS$2] === "object"; } + __name(isRequest, "isRequest"); function isAbortSignal(signal) { const proto = signal && typeof signal === "object" && Object.getPrototypeOf(signal); return !!(proto && proto.constructor.name === "AbortSignal"); } + __name(isAbortSignal, "isAbortSignal"); var Request = class _Request { + static { + __name(this, "Request"); + } constructor(input) { let init = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; let parsedURL; @@ -47898,27 +49214,29 @@ var require_lib4 = __commonJS({ agent }); } + __name(getNodeRequestOptions, "getNodeRequestOptions"); function AbortError(message) { Error.call(this, message); this.type = "aborted"; this.message = message; Error.captureStackTrace(this, this.constructor); } + __name(AbortError, "AbortError"); AbortError.prototype = Object.create(Error.prototype); AbortError.prototype.constructor = AbortError; AbortError.prototype.name = "AbortError"; var URL$1 = Url.URL || whatwgUrl.URL; var PassThrough$1 = Stream.PassThrough; - var isDomainOrSubdomain = function isDomainOrSubdomain2(destination, original) { + var isDomainOrSubdomain = /* @__PURE__ */ __name(function isDomainOrSubdomain2(destination, original) { const orig = new URL$1(original).hostname; const dest = new URL$1(destination).hostname; return orig === dest || orig[orig.length - dest.length - 1] === "." && orig.endsWith(dest); - }; - var isSameProtocol = function isSameProtocol2(destination, original) { + }, "isDomainOrSubdomain"); + var isSameProtocol = /* @__PURE__ */ __name(function isSameProtocol2(destination, original) { const orig = new URL$1(original).protocol; const dest = new URL$1(destination).protocol; return orig === dest; - }; + }, "isSameProtocol"); function fetch2(url, opts) { if (!fetch2.Promise) { throw new Error("native promise missing, set fetch.Promise to your favorite alternative"); @@ -47930,7 +49248,7 @@ var require_lib4 = __commonJS({ const send = (options.protocol === "https:" ? https : http).request; const signal = request.signal; let response = null; - const abort = function abort2() { + const abort = /* @__PURE__ */ __name(function abort2() { let error = new AbortError("The user aborted a request."); reject(error); if (request.body && request.body instanceof Stream.Readable) { @@ -47938,15 +49256,15 @@ var require_lib4 = __commonJS({ } if (!response || !response.body) return; response.body.emit("error", error); - }; + }, "abort"); if (signal && signal.aborted) { abort(); return; } - const abortAndFinalize = function abortAndFinalize2() { + const abortAndFinalize = /* @__PURE__ */ __name(function abortAndFinalize2() { abort(); finalize(); - }; + }, "abortAndFinalize"); const req = send(options); let reqTimeout; if (signal) { @@ -47957,6 +49275,7 @@ var require_lib4 = __commonJS({ if (signal) signal.removeEventListener("abort", abortAndFinalize); clearTimeout(reqTimeout); } + __name(finalize, "finalize"); if (request.timeout) { req.once("socket", function(socket) { reqTimeout = setTimeout(function() { @@ -48122,6 +49441,7 @@ var require_lib4 = __commonJS({ writeToStream(req, request); }); } + __name(fetch2, "fetch"); function fixResponseChunkedTransferBadEnding(request, errorCallback) { let socket; request.on("socket", function(s) { @@ -48141,6 +49461,7 @@ var require_lib4 = __commonJS({ } }); } + __name(fixResponseChunkedTransferBadEnding, "fixResponseChunkedTransferBadEnding"); function destroyStream(stream, err) { if (stream.destroy) { stream.destroy(err); @@ -48149,6 +49470,7 @@ var require_lib4 = __commonJS({ stream.end(); } } + __name(destroyStream, "destroyStream"); fetch2.isRedirect = function(code) { return code === 301 || code === 302 || code === 303 || code === 307 || code === 308; }; @@ -48211,19 +49533,21 @@ function _makeCompatibilityCheck(ownVersion) { prerelease: myVersionMatch[4] }; if (ownVersionParsed.prerelease != null) { - return function isExactmatch(globalVersion) { + return /* @__PURE__ */ __name(function isExactmatch(globalVersion) { return globalVersion === ownVersion; - }; + }, "isExactmatch"); } function _reject(v) { rejectedVersions.add(v); return false; } + __name(_reject, "_reject"); function _accept(v) { acceptedVersions.add(v); return true; } - return function isCompatible2(globalVersion) { + __name(_accept, "_accept"); + return /* @__PURE__ */ __name(function isCompatible2(globalVersion) { if (acceptedVersions.has(globalVersion)) { return true; } @@ -48256,13 +49580,14 @@ function _makeCompatibilityCheck(ownVersion) { return _accept(globalVersion); } return _reject(globalVersion); - }; + }, "isCompatible"); } var re, isCompatible; var init_semver = __esm({ "node_modules/@opentelemetry/api/build/esm/internal/semver.js"() { init_version2(); re = /^(\d+)\.(\d+)\.(\d+)(-(.+))?$/; + __name(_makeCompatibilityCheck, "_makeCompatibilityCheck"); isCompatible = _makeCompatibilityCheck(VERSION); } }); @@ -48314,6 +49639,9 @@ var init_global_utils = __esm({ major = VERSION.split(".")[0]; GLOBAL_OPENTELEMETRY_API_KEY = Symbol.for("opentelemetry.js.api." + major); _global = _globalThis; + __name(registerGlobal, "registerGlobal"); + __name(getGlobal, "getGlobal"); + __name(unregisterGlobal, "unregisterGlobal"); } }); @@ -48361,6 +49689,7 @@ var init_ComponentLogger = __esm({ function DiagComponentLogger2(props) { this._namespace = props.namespace || "DiagComponentLogger"; } + __name(DiagComponentLogger2, "DiagComponentLogger"); DiagComponentLogger2.prototype.debug = function() { var args = []; for (var _i = 0; _i < arguments.length; _i++) { @@ -48398,6 +49727,7 @@ var init_ComponentLogger = __esm({ }; return DiagComponentLogger2; }(); + __name(logProxy, "logProxy"); } }); @@ -48433,6 +49763,7 @@ function createLogLevelDiagLogger(maxLevel, logger) { return function() { }; } + __name(_filterFunc, "_filterFunc"); return { error: _filterFunc("error", DiagLogLevel.ERROR), warn: _filterFunc("warn", DiagLogLevel.WARN), @@ -48444,6 +49775,7 @@ function createLogLevelDiagLogger(maxLevel, logger) { var init_logLevelLogger = __esm({ "node_modules/@opentelemetry/api/build/esm/diag/internal/logLevelLogger.js"() { init_types(); + __name(createLogLevelDiagLogger, "createLogLevelDiagLogger"); } }); @@ -48497,8 +49829,9 @@ var init_diag = __esm({ return logger[funcName].apply(logger, __spreadArray3([], __read3(args), false)); }; } + __name(_logProxy, "_logProxy"); var self2 = this; - var setLogger = function(logger, optionsOrLogLevel) { + var setLogger = /* @__PURE__ */ __name(function(logger, optionsOrLogLevel) { var _a, _b, _c; if (optionsOrLogLevel === void 0) { optionsOrLogLevel = { logLevel: DiagLogLevel.INFO }; @@ -48521,7 +49854,7 @@ var init_diag = __esm({ newLogger.warn("Current logger will overwrite one already registered from " + stack); } return registerGlobal("diag", newLogger, self2, true); - }; + }, "setLogger"); self2.setLogger = setLogger; self2.disable = function() { unregisterGlobal(API_NAME, self2); @@ -48535,6 +49868,7 @@ var init_diag = __esm({ self2.warn = _logProxy("warn"); self2.error = _logProxy("error"); } + __name(DiagAPI2, "DiagAPI"); DiagAPI2.instance = function() { if (!this._instance) { this._instance = new DiagAPI2(); @@ -48571,10 +49905,10 @@ var init_baggage_impl = __esm({ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; if (m) return m.call(o); if (o && typeof o.length === "number") return { - next: function() { + next: /* @__PURE__ */ __name(function() { if (o && i >= o.length) o = void 0; return { value: o && o[i++], done: !o }; - } + }, "next") }; throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); }; @@ -48583,6 +49917,7 @@ var init_baggage_impl = __esm({ function BaggageImpl2(entries) { this._entries = entries ? new Map(entries) : /* @__PURE__ */ new Map(); } + __name(BaggageImpl2, "BaggageImpl"); BaggageImpl2.prototype.getEntry = function(key) { var entry = this._entries.get(key); if (!entry) { @@ -48659,9 +49994,9 @@ function baggageEntryMetadataFromString(str) { } return { __TYPE__: baggageEntryMetadataSymbol, - toString: function() { + toString: /* @__PURE__ */ __name(function() { return str; - } + }, "toString") }; } var diag; @@ -48671,6 +50006,8 @@ var init_utils = __esm({ init_baggage_impl(); init_symbol(); diag = DiagAPI.instance(); + __name(createBaggage, "createBaggage"); + __name(baggageEntryMetadataFromString, "baggageEntryMetadataFromString"); } }); @@ -48681,6 +50018,7 @@ function createContextKey(description) { var BaseContext, ROOT_CONTEXT; var init_context = __esm({ "node_modules/@opentelemetry/api/build/esm/context/context.js"() { + __name(createContextKey, "createContextKey"); BaseContext = /** @class */ /* @__PURE__ */ function() { function BaseContext2(parentContext) { @@ -48700,6 +50038,7 @@ var init_context = __esm({ return context3; }; } + __name(BaseContext2, "BaseContext"); return BaseContext2; }(); ROOT_CONTEXT = new BaseContext(); @@ -48737,10 +50076,12 @@ var init_consoleLogger = __esm({ } }; } + __name(_consoleFunc, "_consoleFunc"); for (var i = 0; i < consoleMap.length; i++) { this[consoleMap[i].n] = _consoleFunc(consoleMap[i].c); } } + __name(DiagConsoleLogger2, "DiagConsoleLogger"); return DiagConsoleLogger2; }(); } @@ -48754,14 +50095,14 @@ var __extends2, NoopMeter, NoopMetric, NoopCounterMetric, NoopUpDownCounterMetri var init_NoopMeter = __esm({ "node_modules/@opentelemetry/api/build/esm/metrics/NoopMeter.js"() { __extends2 = /* @__PURE__ */ function() { - var extendStatics2 = function(d, b) { + var extendStatics2 = /* @__PURE__ */ __name(function(d, b) { extendStatics2 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { d2.__proto__ = b2; } || function(d2, b2) { for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p]; }; return extendStatics2(d, b); - }; + }, "extendStatics"); return function(d, b) { if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); @@ -48769,6 +50110,7 @@ var init_NoopMeter = __esm({ function __() { this.constructor = d; } + __name(__, "__"); d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; }(); @@ -48776,6 +50118,7 @@ var init_NoopMeter = __esm({ function() { function NoopMeter2() { } + __name(NoopMeter2, "NoopMeter"); NoopMeter2.prototype.createHistogram = function(_name, _options) { return NOOP_HISTOGRAM_METRIC; }; @@ -48804,6 +50147,7 @@ var init_NoopMeter = __esm({ /* @__PURE__ */ function() { function NoopMetric2() { } + __name(NoopMetric2, "NoopMetric"); return NoopMetric2; }(); NoopCounterMetric = /** @class */ @@ -48812,6 +50156,7 @@ var init_NoopMeter = __esm({ function NoopCounterMetric2() { return _super !== null && _super.apply(this, arguments) || this; } + __name(NoopCounterMetric2, "NoopCounterMetric"); NoopCounterMetric2.prototype.add = function(_value, _attributes) { }; return NoopCounterMetric2; @@ -48822,6 +50167,7 @@ var init_NoopMeter = __esm({ function NoopUpDownCounterMetric2() { return _super !== null && _super.apply(this, arguments) || this; } + __name(NoopUpDownCounterMetric2, "NoopUpDownCounterMetric"); NoopUpDownCounterMetric2.prototype.add = function(_value, _attributes) { }; return NoopUpDownCounterMetric2; @@ -48832,6 +50178,7 @@ var init_NoopMeter = __esm({ function NoopHistogramMetric2() { return _super !== null && _super.apply(this, arguments) || this; } + __name(NoopHistogramMetric2, "NoopHistogramMetric"); NoopHistogramMetric2.prototype.record = function(_value, _attributes) { }; return NoopHistogramMetric2; @@ -48840,6 +50187,7 @@ var init_NoopMeter = __esm({ function() { function NoopObservableMetric2() { } + __name(NoopObservableMetric2, "NoopObservableMetric"); NoopObservableMetric2.prototype.addCallback = function(_callback) { }; NoopObservableMetric2.prototype.removeCallback = function(_callback) { @@ -48852,6 +50200,7 @@ var init_NoopMeter = __esm({ function NoopObservableCounterMetric2() { return _super !== null && _super.apply(this, arguments) || this; } + __name(NoopObservableCounterMetric2, "NoopObservableCounterMetric"); return NoopObservableCounterMetric2; }(NoopObservableMetric); NoopObservableGaugeMetric = /** @class */ @@ -48860,6 +50209,7 @@ var init_NoopMeter = __esm({ function NoopObservableGaugeMetric2() { return _super !== null && _super.apply(this, arguments) || this; } + __name(NoopObservableGaugeMetric2, "NoopObservableGaugeMetric"); return NoopObservableGaugeMetric2; }(NoopObservableMetric); NoopObservableUpDownCounterMetric = /** @class */ @@ -48868,6 +50218,7 @@ var init_NoopMeter = __esm({ function NoopObservableUpDownCounterMetric2() { return _super !== null && _super.apply(this, arguments) || this; } + __name(NoopObservableUpDownCounterMetric2, "NoopObservableUpDownCounterMetric"); return NoopObservableUpDownCounterMetric2; }(NoopObservableMetric); NOOP_METER = new NoopMeter(); @@ -48877,6 +50228,7 @@ var init_NoopMeter = __esm({ NOOP_OBSERVABLE_COUNTER_METRIC = new NoopObservableCounterMetric(); NOOP_OBSERVABLE_GAUGE_METRIC = new NoopObservableGaugeMetric(); NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC = new NoopObservableUpDownCounterMetric(); + __name(createNoopMeter, "createNoopMeter"); } }); @@ -48896,26 +50248,26 @@ var defaultTextMapGetter, defaultTextMapSetter; var init_TextMapPropagator = __esm({ "node_modules/@opentelemetry/api/build/esm/propagation/TextMapPropagator.js"() { defaultTextMapGetter = { - get: function(carrier, key) { + get: /* @__PURE__ */ __name(function(carrier, key) { if (carrier == null) { return void 0; } return carrier[key]; - }, - keys: function(carrier) { + }, "get"), + keys: /* @__PURE__ */ __name(function(carrier) { if (carrier == null) { return []; } return Object.keys(carrier); - } + }, "keys") }; defaultTextMapSetter = { - set: function(carrier, key, value) { + set: /* @__PURE__ */ __name(function(carrier, key, value) { if (carrier == null) { return; } carrier[key] = value; - } + }, "set") }; } }); @@ -48955,6 +50307,7 @@ var init_NoopContextManager = __esm({ function() { function NoopContextManager2() { } + __name(NoopContextManager2, "NoopContextManager"); NoopContextManager2.prototype.active = function() { return ROOT_CONTEXT; }; @@ -49018,6 +50371,7 @@ var init_context2 = __esm({ function() { function ContextAPI2() { } + __name(ContextAPI2, "ContextAPI"); ContextAPI2.getInstance = function() { if (!this._instance) { this._instance = new ContextAPI2(); @@ -49092,6 +50446,7 @@ var init_NonRecordingSpan = __esm({ } this._spanContext = _spanContext; } + __name(NonRecordingSpan2, "NonRecordingSpan"); NonRecordingSpan2.prototype.spanContext = function() { return this._spanContext; }; @@ -49149,6 +50504,12 @@ var init_context_utils = __esm({ init_NonRecordingSpan(); init_context2(); SPAN_KEY = createContextKey("OpenTelemetry Context Key SPAN"); + __name(getSpan, "getSpan"); + __name(getActiveSpan, "getActiveSpan"); + __name(setSpan, "setSpan"); + __name(deleteSpan, "deleteSpan"); + __name(setSpanContext, "setSpanContext"); + __name(getSpanContext, "getSpanContext"); } }); @@ -49172,6 +50533,10 @@ var init_spancontext_utils = __esm({ init_NonRecordingSpan(); VALID_TRACEID_REGEX = /^([0-9a-f]{32})$/i; VALID_SPANID_REGEX = /^[0-9a-f]{16}$/i; + __name(isValidTraceId, "isValidTraceId"); + __name(isValidSpanId, "isValidSpanId"); + __name(isSpanContextValid, "isSpanContextValid"); + __name(wrapSpanContext, "wrapSpanContext"); } }); @@ -49191,6 +50556,7 @@ var init_NoopTracer = __esm({ function() { function NoopTracer2() { } + __name(NoopTracer2, "NoopTracer"); NoopTracer2.prototype.startSpan = function(name, options, context3) { if (context3 === void 0) { context3 = contextApi.active(); @@ -49229,6 +50595,7 @@ var init_NoopTracer = __esm({ }; return NoopTracer2; }(); + __name(isSpanContext, "isSpanContext"); } }); @@ -49246,6 +50613,7 @@ var init_ProxyTracer = __esm({ this.version = version2; this.options = options; } + __name(ProxyTracer2, "ProxyTracer"); ProxyTracer2.prototype.startSpan = function(name, options, context3) { return this._getTracer().startSpan(name, options, context3); }; @@ -49278,6 +50646,7 @@ var init_NoopTracerProvider = __esm({ function() { function NoopTracerProvider2() { } + __name(NoopTracerProvider2, "NoopTracerProvider"); NoopTracerProvider2.prototype.getTracer = function(_name, _version, _options) { return new NoopTracer(); }; @@ -49297,6 +50666,7 @@ var init_ProxyTracerProvider = __esm({ function() { function ProxyTracerProvider2() { } + __name(ProxyTracerProvider2, "ProxyTracerProvider"); ProxyTracerProvider2.prototype.getTracer = function(name, version2, options) { var _a; return (_a = this.getDelegateTracer(name, version2, options)) !== null && _a !== void 0 ? _a : new ProxyTracer(this, name, version2, options); @@ -49371,6 +50741,8 @@ var init_tracestate_validators = __esm({ VALID_KEY_REGEX = new RegExp("^(?:" + VALID_KEY + "|" + VALID_VENDOR_KEY + ")$"); VALID_VALUE_BASE_REGEX = /^[ -~]{0,255}[!-~]$/; INVALID_VALUE_COMMA_EQUAL_REGEX = /,|=/; + __name(validateKey, "validateKey"); + __name(validateValue, "validateValue"); } }); @@ -49390,6 +50762,7 @@ var init_tracestate_impl = __esm({ if (rawTraceState) this._parse(rawTraceState); } + __name(TraceStateImpl2, "TraceStateImpl"); TraceStateImpl2.prototype.set = function(key, value) { var traceState = this._clone(); if (traceState._internalState.has(key)) { @@ -49453,6 +50826,7 @@ function createTraceState(rawTraceState) { var init_utils2 = __esm({ "node_modules/@opentelemetry/api/build/esm/trace/internal/utils.js"() { init_tracestate_impl(); + __name(createTraceState, "createTraceState"); } }); @@ -49483,6 +50857,7 @@ var init_NoopMeterProvider = __esm({ function() { function NoopMeterProvider2() { } + __name(NoopMeterProvider2, "NoopMeterProvider"); NoopMeterProvider2.prototype.getMeter = function(_name, _version, _options) { return NOOP_METER; }; @@ -49504,6 +50879,7 @@ var init_metrics = __esm({ function() { function MetricsAPI2() { } + __name(MetricsAPI2, "MetricsAPI"); MetricsAPI2.getInstance = function() { if (!this._instance) { this._instance = new MetricsAPI2(); @@ -49544,6 +50920,7 @@ var init_NoopTextMapPropagator = __esm({ function() { function NoopTextMapPropagator2() { } + __name(NoopTextMapPropagator2, "NoopTextMapPropagator"); NoopTextMapPropagator2.prototype.inject = function(_context, _carrier) { }; NoopTextMapPropagator2.prototype.extract = function(context3, _carrier) { @@ -49576,6 +50953,10 @@ var init_context_helpers = __esm({ init_context2(); init_context(); BAGGAGE_KEY = createContextKey("OpenTelemetry Baggage Key"); + __name(getBaggage, "getBaggage"); + __name(getActiveBaggage, "getActiveBaggage"); + __name(setBaggage, "setBaggage"); + __name(deleteBaggage, "deleteBaggage"); } }); @@ -49600,6 +50981,7 @@ var init_propagation = __esm({ this.setBaggage = setBaggage; this.deleteBaggage = deleteBaggage; } + __name(PropagationAPI2, "PropagationAPI"); PropagationAPI2.getInstance = function() { if (!this._instance) { this._instance = new PropagationAPI2(); @@ -49667,6 +51049,7 @@ var init_trace = __esm({ this.setSpan = setSpan; this.setSpanContext = setSpanContext; } + __name(TraceAPI2, "TraceAPI"); TraceAPI2.getInstance = function() { if (!this._instance) { this._instance = new TraceAPI2(); @@ -49786,21 +51169,27 @@ var require_dist2 = __commonJS({ function getSpan2(context4) { return api.trace.getSpan(context4); } + __name(getSpan2, "getSpan"); function setSpan2(context4, span) { return api.trace.setSpan(context4, span); } + __name(setSpan2, "setSpan"); function setSpanContext2(context4, spanContext) { return api.trace.setSpanContext(context4, spanContext); } + __name(setSpanContext2, "setSpanContext"); function getSpanContext2(context4) { return api.trace.getSpanContext(context4); } + __name(getSpanContext2, "getSpanContext"); function isSpanContextValid2(context4) { return api.trace.isSpanContextValid(context4); } + __name(isSpanContextValid2, "isSpanContextValid"); function getTracer(name, version2) { return api.trace.getTracer(name || "azure/core-tracing", version2); } + __name(getTracer, "getTracer"); var context3 = api.context; (function(SpanStatusCode2) { SpanStatusCode2[SpanStatusCode2["UNSET"] = 0] = "UNSET"; @@ -49818,6 +51207,7 @@ var require_dist2 = __commonJS({ } return Boolean(azureTracingDisabledValue); } + __name(isTracingDisabled, "isTracingDisabled"); function createSpanFunction(args) { return function(operationName, operationOptions) { const tracer = getTracer(); @@ -49845,6 +51235,7 @@ var require_dist2 = __commonJS({ }; }; } + __name(createSpanFunction, "createSpanFunction"); var VERSION2 = "00"; function extractSpanContextFromTraceParentHeader(traceParentHeader) { const parts = traceParentHeader.split("-"); @@ -49863,6 +51254,7 @@ var require_dist2 = __commonJS({ }; return spanContext; } + __name(extractSpanContextFromTraceParentHeader, "extractSpanContextFromTraceParentHeader"); function getTraceParentHeader(spanContext) { const missingFields = []; if (!spanContext.traceId) { @@ -49879,6 +51271,7 @@ var require_dist2 = __commonJS({ const traceFlags = hexFlags.length === 1 ? `0${hexFlags}` : hexFlags; return `${VERSION2}-${spanContext.traceId}-${spanContext.spanId}-${traceFlags}`; } + __name(getTraceParentHeader, "getTraceParentHeader"); exports2.context = context3; exports2.createSpanFunction = createSpanFunction; exports2.extractSpanContextFromTraceParentHeader = extractSpanContextFromTraceParentHeader; @@ -49916,6 +51309,7 @@ var require_dist3 = __commonJS({ function _interopDefaultLegacy(e) { return e && typeof e === "object" && "default" in e ? e : { "default": e }; } + __name(_interopDefaultLegacy, "_interopDefaultLegacy"); function _interopNamespace(e) { if (e && e.__esModule) return e; var n = /* @__PURE__ */ Object.create(null); @@ -49925,9 +51319,9 @@ var require_dist3 = __commonJS({ var d = Object.getOwnPropertyDescriptor(e, k); Object.defineProperty(n, k, d.get ? d : { enumerable: true, - get: function() { + get: /* @__PURE__ */ __name(function() { return e[k]; - } + }, "get") }); } }); @@ -49935,6 +51329,7 @@ var require_dist3 = __commonJS({ n["default"] = e; return Object.freeze(n); } + __name(_interopNamespace, "_interopNamespace"); var xml2js__namespace = /* @__PURE__ */ _interopNamespace(xml2js); var os__namespace = /* @__PURE__ */ _interopNamespace(os2); var http__namespace = /* @__PURE__ */ _interopNamespace(http); @@ -49945,6 +51340,7 @@ var require_dist3 = __commonJS({ function getHeaderKey(headerName) { return headerName.toLowerCase(); } + __name(getHeaderKey, "getHeaderKey"); function isHttpHeadersLike(object) { if (object && typeof object === "object") { const castObject = object; @@ -49954,7 +51350,11 @@ var require_dist3 = __commonJS({ } return false; } + __name(isHttpHeadersLike, "isHttpHeadersLike"); var HttpHeaders = class _HttpHeaders { + static { + __name(this, "HttpHeaders"); + } constructor(rawHeaders) { this._headersMap = {}; if (rawHeaders) { @@ -50077,13 +51477,16 @@ var require_dist3 = __commonJS({ function encodeString(value) { return Buffer.from(value).toString("base64"); } + __name(encodeString, "encodeString"); function encodeByteArray(value) { const bufferValue = value instanceof Buffer ? value : Buffer.from(value.buffer); return bufferValue.toString("base64"); } + __name(encodeByteArray, "encodeByteArray"); function decodeString(value) { return Buffer.from(value, "base64"); } + __name(decodeString, "decodeString"); var Constants = { /** * The core-http version @@ -50158,6 +51561,7 @@ var require_dist3 = __commonJS({ function encodeUri(uri) { return encodeURIComponent(uri).replace(/!/g, "%21").replace(/"/g, "%27").replace(/\(/g, "%28").replace(/\)/g, "%29").replace(/\*/g, "%2A"); } + __name(encodeUri, "encodeUri"); function stripResponse(response) { const strippedResponse = {}; strippedResponse.body = response.bodyAsText; @@ -50165,6 +51569,7 @@ var require_dist3 = __commonJS({ strippedResponse.status = response.status; return strippedResponse; } + __name(stripResponse, "stripResponse"); function stripRequest(request) { const strippedRequest = request.clone(); if (strippedRequest.headers) { @@ -50172,12 +51577,15 @@ var require_dist3 = __commonJS({ } return strippedRequest; } + __name(stripRequest, "stripRequest"); function isValidUuid(uuid2) { return validUuidRegex.test(uuid2); } + __name(isValidUuid, "isValidUuid"); function generateUuid() { return uuid.v4(); } + __name(generateUuid, "generateUuid"); function executePromisesSequentially(promiseFactories, kickstart) { let result = Promise.resolve(kickstart); promiseFactories.forEach((promiseFactory) => { @@ -50185,6 +51593,7 @@ var require_dist3 = __commonJS({ }); return result; } + __name(executePromisesSequentially, "executePromisesSequentially"); function promiseToCallback(promise) { if (typeof promise.then !== "function") { throw new Error("The provided input is not a Promise."); @@ -50197,6 +51606,7 @@ var require_dist3 = __commonJS({ }); }; } + __name(promiseToCallback, "promiseToCallback"); function promiseToServiceCallback(promise) { if (typeof promise.then !== "function") { throw new Error("The provided input is not a Promise."); @@ -50209,6 +51619,7 @@ var require_dist3 = __commonJS({ }); }; } + __name(promiseToServiceCallback, "promiseToServiceCallback"); function prepareXMLRootList(obj, elementName, xmlNamespaceKey, xmlNamespace) { if (!Array.isArray(obj)) { obj = [obj]; @@ -50220,6 +51631,7 @@ var require_dist3 = __commonJS({ result[XML_ATTRKEY] = { [xmlNamespaceKey]: xmlNamespace }; return result; } + __name(prepareXMLRootList, "prepareXMLRootList"); function applyMixins(targetCtorParam, sourceCtors) { const castTargetCtorParam = targetCtorParam; sourceCtors.forEach((sourceCtor) => { @@ -50228,16 +51640,20 @@ var require_dist3 = __commonJS({ }); }); } + __name(applyMixins, "applyMixins"); var validateISODuration = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/; function isDuration(value) { return validateISODuration.test(value); } + __name(isDuration, "isDuration"); function replaceAll(value, searchValue, replaceValue) { return !value || !searchValue ? value : value.split(searchValue).join(replaceValue || ""); } + __name(replaceAll, "replaceAll"); function isPrimitiveType(value) { return typeof value !== "object" && typeof value !== "function" || value === null; } + __name(isPrimitiveType, "isPrimitiveType"); function getEnvironmentValue(name) { if (process.env[name]) { return process.env[name]; @@ -50246,10 +51662,15 @@ var require_dist3 = __commonJS({ } return void 0; } + __name(getEnvironmentValue, "getEnvironmentValue"); function isObject(input) { return typeof input === "object" && input !== null && !Array.isArray(input) && !(input instanceof RegExp) && !(input instanceof Date); } + __name(isObject, "isObject"); var Serializer = class { + static { + __name(this, "Serializer"); + } constructor(modelMappers = {}, isXML) { this.modelMappers = modelMappers; this.isXML = isXML; @@ -50262,9 +51683,9 @@ var require_dist3 = __commonJS({ * @deprecated Removing the constraints validation on client side. */ validateConstraints(mapper, value, objectName) { - const failValidation = (constraintName, constraintValue) => { + const failValidation = /* @__PURE__ */ __name((constraintName, constraintValue) => { throw new Error(`"${objectName}" with value "${value}" should satisfy the constraint "${constraintName}": ${constraintValue}.`); - }; + }, "failValidation"); if (mapper.constraints && value != void 0) { const valueAsNumber = value; const { ExclusiveMaximum, ExclusiveMinimum, InclusiveMaximum, InclusiveMinimum, MaxItems, MaxLength, MinItems, MinLength, MultipleOf, Pattern, UniqueItems } = mapper.constraints; @@ -50452,6 +51873,7 @@ var require_dist3 = __commonJS({ } return str.substr(0, len); } + __name(trimEnd, "trimEnd"); function bufferToBase64Url(buffer) { if (!buffer) { return void 0; @@ -50462,6 +51884,7 @@ var require_dist3 = __commonJS({ const str = encodeByteArray(buffer); return trimEnd(str, "=").replace(/\+/g, "-").replace(/\//g, "_"); } + __name(bufferToBase64Url, "bufferToBase64Url"); function base64UrlToByteArray(str) { if (!str) { return void 0; @@ -50472,6 +51895,7 @@ var require_dist3 = __commonJS({ str = str.replace(/-/g, "+").replace(/_/g, "/"); return decodeString(str); } + __name(base64UrlToByteArray, "base64UrlToByteArray"); function splitSerializeName(prop) { const classes = []; let partialclass = ""; @@ -50489,6 +51913,7 @@ var require_dist3 = __commonJS({ } return classes; } + __name(splitSerializeName, "splitSerializeName"); function dateToUnixTime(d) { if (!d) { return void 0; @@ -50498,12 +51923,14 @@ var require_dist3 = __commonJS({ } return Math.floor(d.getTime() / 1e3); } + __name(dateToUnixTime, "dateToUnixTime"); function unixTimeToDate(n) { if (!n) { return void 0; } return new Date(n * 1e3); } + __name(unixTimeToDate, "unixTimeToDate"); function serializeBasicTypes(typeName, objectName, value) { if (value !== null && value !== void 0) { if (typeName.match(/^Number$/i) !== null) { @@ -50531,6 +51958,7 @@ var require_dist3 = __commonJS({ } return value; } + __name(serializeBasicTypes, "serializeBasicTypes"); function serializeEnumType(objectName, allowedValues, value) { if (!allowedValues) { throw new Error(`Please provide a set of allowedValues to validate ${objectName} as an Enum Type.`); @@ -50546,6 +51974,7 @@ var require_dist3 = __commonJS({ } return value; } + __name(serializeEnumType, "serializeEnumType"); function serializeByteArrayType(objectName, value) { let returnValue = ""; if (value != void 0) { @@ -50556,6 +51985,7 @@ var require_dist3 = __commonJS({ } return returnValue; } + __name(serializeByteArrayType, "serializeByteArrayType"); function serializeBase64UrlType(objectName, value) { let returnValue = ""; if (value != void 0) { @@ -50566,6 +51996,7 @@ var require_dist3 = __commonJS({ } return returnValue; } + __name(serializeBase64UrlType, "serializeBase64UrlType"); function serializeDateTypes(typeName, value, objectName) { if (value != void 0) { if (typeName.match(/^Date$/i) !== null) { @@ -50596,6 +52027,7 @@ var require_dist3 = __commonJS({ } return value; } + __name(serializeDateTypes, "serializeDateTypes"); function serializeSequenceType(serializer, mapper, object, objectName, isXml, options) { if (!Array.isArray(object)) { throw new Error(`${objectName} must be of type Array.`); @@ -50623,6 +52055,7 @@ var require_dist3 = __commonJS({ } return tempArray; } + __name(serializeSequenceType, "serializeSequenceType"); function serializeDictionaryType(serializer, mapper, object, objectName, isXml, options) { if (typeof object !== "object") { throw new Error(`${objectName} must be of type object.`); @@ -50644,6 +52077,7 @@ var require_dist3 = __commonJS({ } return tempDictionary; } + __name(serializeDictionaryType, "serializeDictionaryType"); function resolveAdditionalProperties(serializer, mapper, objectName) { const additionalProperties = mapper.type.additionalProperties; if (!additionalProperties && mapper.type.className) { @@ -50652,6 +52086,7 @@ var require_dist3 = __commonJS({ } return additionalProperties; } + __name(resolveAdditionalProperties, "resolveAdditionalProperties"); function resolveReferencedMapper(serializer, mapper, objectName) { const className = mapper.type.className; if (!className) { @@ -50659,6 +52094,7 @@ var require_dist3 = __commonJS({ } return serializer.modelMappers[className]; } + __name(resolveReferencedMapper, "resolveReferencedMapper"); function resolveModelProperties(serializer, mapper, objectName) { let modelProps = mapper.type.modelProperties; if (!modelProps) { @@ -50673,6 +52109,7 @@ var require_dist3 = __commonJS({ } return modelProps; } + __name(resolveModelProperties, "resolveModelProperties"); function serializeCompositeType(serializer, mapper, object, objectName, isXml, options) { if (getPolymorphicDiscriminatorRecursively(serializer, mapper)) { mapper = getPolymorphicMapper(serializer, mapper, object, "clientName"); @@ -50743,6 +52180,7 @@ var require_dist3 = __commonJS({ } return object; } + __name(serializeCompositeType, "serializeCompositeType"); function getXmlObjectValue(propertyMapper, serializedValue, isXml, options) { if (!isXml || !propertyMapper.xmlNamespace) { return serializedValue; @@ -50763,9 +52201,11 @@ var require_dist3 = __commonJS({ result[XML_ATTRKEY] = xmlNamespace; return result; } + __name(getXmlObjectValue, "getXmlObjectValue"); function isSpecialXmlProperty(propertyName, options) { return [XML_ATTRKEY, options.xmlCharKey].includes(propertyName); } + __name(isSpecialXmlProperty, "isSpecialXmlProperty"); function deserializeCompositeType(serializer, mapper, responseBody, objectName, options) { var _a, _b; const xmlCharKey = (_a = options.xmlCharKey) !== null && _a !== void 0 ? _a : XML_CHARKEY; @@ -50847,7 +52287,7 @@ var require_dist3 = __commonJS({ } const additionalPropertiesMapper = mapper.type.additionalProperties; if (additionalPropertiesMapper) { - const isAdditionalProperty = (responsePropName) => { + const isAdditionalProperty = /* @__PURE__ */ __name((responsePropName) => { for (const clientPropName in modelProps) { const paths = splitSerializeName(modelProps[clientPropName].serializedName); if (paths[0] === responsePropName) { @@ -50855,7 +52295,7 @@ var require_dist3 = __commonJS({ } } return true; - }; + }, "isAdditionalProperty"); for (const responsePropName in responseBody) { if (isAdditionalProperty(responsePropName)) { instance[responsePropName] = serializer.deserialize(additionalPropertiesMapper, responseBody[responsePropName], objectName + '["' + responsePropName + '"]', options); @@ -50870,6 +52310,7 @@ var require_dist3 = __commonJS({ } return instance; } + __name(deserializeCompositeType, "deserializeCompositeType"); function deserializeDictionaryType(serializer, mapper, responseBody, objectName, options) { const value = mapper.type.value; if (!value || typeof value !== "object") { @@ -50884,6 +52325,7 @@ var require_dist3 = __commonJS({ } return responseBody; } + __name(deserializeDictionaryType, "deserializeDictionaryType"); function deserializeSequenceType(serializer, mapper, responseBody, objectName, options) { const element = mapper.type.element; if (!element || typeof element !== "object") { @@ -50901,6 +52343,7 @@ var require_dist3 = __commonJS({ } return responseBody; } + __name(deserializeSequenceType, "deserializeSequenceType"); function getPolymorphicMapper(serializer, mapper, object, polymorphicPropertyName) { const polymorphicDiscriminator = getPolymorphicDiscriminatorRecursively(serializer, mapper); if (polymorphicDiscriminator) { @@ -50919,12 +52362,15 @@ var require_dist3 = __commonJS({ } return mapper; } + __name(getPolymorphicMapper, "getPolymorphicMapper"); function getPolymorphicDiscriminatorRecursively(serializer, mapper) { return mapper.type.polymorphicDiscriminator || getPolymorphicDiscriminatorSafely(serializer, mapper.type.uberParent) || getPolymorphicDiscriminatorSafely(serializer, mapper.type.className); } + __name(getPolymorphicDiscriminatorRecursively, "getPolymorphicDiscriminatorRecursively"); function getPolymorphicDiscriminatorSafely(serializer, typeName) { return typeName && serializer.modelMappers[typeName] && serializer.modelMappers[typeName].type.polymorphicDiscriminator; } + __name(getPolymorphicDiscriminatorSafely, "getPolymorphicDiscriminatorSafely"); function serializeObject(toSerialize) { const castToSerialize = toSerialize; if (toSerialize == void 0) @@ -50949,6 +52395,7 @@ var require_dist3 = __commonJS({ } return toSerialize; } + __name(serializeObject, "serializeObject"); function strEnum(o) { const result = {}; for (const key of o) { @@ -50956,6 +52403,7 @@ var require_dist3 = __commonJS({ } return result; } + __name(strEnum, "strEnum"); var MapperType = strEnum([ "Base64Url", "Boolean", @@ -50983,7 +52431,11 @@ var require_dist3 = __commonJS({ } return false; } + __name(isWebResourceLike, "isWebResourceLike"); var WebResource = class _WebResource { + static { + __name(this, "WebResource"); + } constructor(url, method, body, query, headers, streamResponseBody, withCredentials, abortSignal, timeout, onUploadProgress, onDownloadProgress, proxySettings, keepAlive, decompressResponse, streamResponseStatusCodes) { this.streamResponseBody = streamResponseBody; this.streamResponseStatusCodes = streamResponseStatusCodes; @@ -51184,6 +52636,9 @@ var require_dist3 = __commonJS({ } }; var URLQuery = class _URLQuery { + static { + __name(this, "URLQuery"); + } constructor() { this._rawQuery = {}; } @@ -51298,6 +52753,9 @@ var require_dist3 = __commonJS({ } }; var URLBuilder = class _URLBuilder { + static { + __name(this, "URLBuilder"); + } /** * Set the scheme/protocol for this URL. If the provided scheme contains other parts of a URL * (such as a host, port, path, or query), those parts will be added to this URL as well. @@ -51510,6 +52968,9 @@ var require_dist3 = __commonJS({ } }; var URLToken = class _URLToken { + static { + __name(this, "URLToken"); + } constructor(text, type) { this.text = text; this.type = type; @@ -51534,7 +52995,11 @@ var require_dist3 = __commonJS({ const characterCode = character.charCodeAt(0); return 48 <= characterCode && characterCode <= 57 || 65 <= characterCode && characterCode <= 90 || 97 <= characterCode && characterCode <= 122; } + __name(isAlphaNumericCharacter, "isAlphaNumericCharacter"); var URLTokenizer = class { + static { + __name(this, "URLTokenizer"); + } constructor(_text, state) { this._text = _text; this._textLength = _text ? _text.length : 0; @@ -51589,12 +53054,15 @@ var require_dist3 = __commonJS({ } return result; } + __name(readRemaining, "readRemaining"); function hasCurrentCharacter(tokenizer) { return tokenizer._currentIndex < tokenizer._textLength; } + __name(hasCurrentCharacter, "hasCurrentCharacter"); function getCurrentCharacter(tokenizer) { return tokenizer._text[tokenizer._currentIndex]; } + __name(getCurrentCharacter, "getCurrentCharacter"); function nextCharacter(tokenizer, step) { if (hasCurrentCharacter(tokenizer)) { if (!step) { @@ -51603,6 +53071,7 @@ var require_dist3 = __commonJS({ tokenizer._currentIndex += step; } } + __name(nextCharacter, "nextCharacter"); function peekCharacters(tokenizer, charactersToPeek) { let endIndex = tokenizer._currentIndex + charactersToPeek; if (tokenizer._textLength < endIndex) { @@ -51610,6 +53079,7 @@ var require_dist3 = __commonJS({ } return tokenizer._text.substring(tokenizer._currentIndex, endIndex); } + __name(peekCharacters, "peekCharacters"); function readWhile(tokenizer, condition) { let result = ""; while (hasCurrentCharacter(tokenizer)) { @@ -51623,12 +53093,15 @@ var require_dist3 = __commonJS({ } return result; } + __name(readWhile, "readWhile"); function readWhileLetterOrDigit(tokenizer) { return readWhile(tokenizer, (character) => isAlphaNumericCharacter(character)); } + __name(readWhileLetterOrDigit, "readWhileLetterOrDigit"); function readUntilCharacter(tokenizer, ...terminatingCharacters) { return readWhile(tokenizer, (character) => terminatingCharacters.indexOf(character) === -1); } + __name(readUntilCharacter, "readUntilCharacter"); function nextScheme(tokenizer) { const scheme = readWhileLetterOrDigit(tokenizer); tokenizer._currentToken = URLToken.scheme(scheme); @@ -51638,6 +53111,7 @@ var require_dist3 = __commonJS({ tokenizer._currentState = "HOST"; } } + __name(nextScheme, "nextScheme"); function nextSchemeOrHost(tokenizer) { const schemeOrHost = readUntilCharacter(tokenizer, ":", "/", "?"); if (!hasCurrentCharacter(tokenizer)) { @@ -51660,6 +53134,7 @@ var require_dist3 = __commonJS({ } } } + __name(nextSchemeOrHost, "nextSchemeOrHost"); function nextHost(tokenizer) { if (peekCharacters(tokenizer, 3) === "://") { nextCharacter(tokenizer, 3); @@ -51676,6 +53151,7 @@ var require_dist3 = __commonJS({ tokenizer._currentState = "QUERY"; } } + __name(nextHost, "nextHost"); function nextPort(tokenizer) { if (getCurrentCharacter(tokenizer) === ":") { nextCharacter(tokenizer); @@ -51690,6 +53166,7 @@ var require_dist3 = __commonJS({ tokenizer._currentState = "QUERY"; } } + __name(nextPort, "nextPort"); function nextPath(tokenizer) { const path2 = readUntilCharacter(tokenizer, "?"); tokenizer._currentToken = URLToken.path(path2); @@ -51699,6 +53176,7 @@ var require_dist3 = __commonJS({ tokenizer._currentState = "QUERY"; } } + __name(nextPath, "nextPath"); function nextQuery(tokenizer) { if (getCurrentCharacter(tokenizer) === "?") { nextCharacter(tokenizer); @@ -51707,6 +53185,7 @@ var require_dist3 = __commonJS({ tokenizer._currentToken = URLToken.query(query); tokenizer._currentState = "DONE"; } + __name(nextQuery, "nextQuery"); function createProxyAgent(requestUrl, proxySettings, headers) { const host = URLBuilder.parse(proxySettings.host).getHost(); if (!host) { @@ -51735,10 +53214,12 @@ var require_dist3 = __commonJS({ }; return proxyAgent; } + __name(createProxyAgent, "createProxyAgent"); function isUrlHttps(url) { const urlScheme = URLBuilder.parse(url).getScheme() || ""; return urlScheme.toLowerCase() === "https"; } + __name(isUrlHttps, "isUrlHttps"); function createTunnel(isRequestHttps, isProxyHttps, tunnelOptions) { if (isRequestHttps && isProxyHttps) { return tunnel__namespace.httpsOverHttps(tunnelOptions); @@ -51750,9 +53231,11 @@ var require_dist3 = __commonJS({ return tunnel__namespace.httpOverHttp(tunnelOptions); } } + __name(createTunnel, "createTunnel"); function isValidPort(port) { return 0 <= port && port <= 65535; } + __name(isValidPort, "isValidPort"); var RedactedString = "REDACTED"; var defaultAllowedHeaderNames = [ "x-ms-client-request-id", @@ -51797,6 +53280,9 @@ var require_dist3 = __commonJS({ ]; var defaultAllowedQueryParameters = ["api-version"]; var Sanitizer = class { + static { + __name(this, "Sanitizer"); + } constructor({ allowedHeaderNames = [], allowedQueryParameters = [] } = {}) { allowedHeaderNames = Array.isArray(allowedHeaderNames) ? defaultAllowedHeaderNames.concat(allowedHeaderNames) : defaultAllowedHeaderNames; allowedQueryParameters = Array.isArray(allowedQueryParameters) ? defaultAllowedQueryParameters.concat(allowedQueryParameters) : defaultAllowedQueryParameters; @@ -51872,6 +53358,9 @@ var require_dist3 = __commonJS({ var custom = util.inspect.custom; var errorSanitizer = new Sanitizer(); var RestError = class _RestError extends Error { + static { + __name(this, "RestError"); + } constructor(message, code, statusCode, request, response) { super(message); this.name = "RestError"; @@ -51895,7 +53384,11 @@ var require_dist3 = __commonJS({ function getCachedAgent(isHttps, agentCache) { return isHttps ? agentCache.httpsAgent : agentCache.httpAgent; } + __name(getCachedAgent, "getCachedAgent"); var ReportTransform = class extends stream.Transform { + static { + __name(this, "ReportTransform"); + } constructor(progressCallback) { super(); this.progressCallback = progressCallback; @@ -51911,6 +53404,7 @@ var require_dist3 = __commonJS({ function isReadableStream(body) { return body && typeof body.pipe === "function"; } + __name(isReadableStream, "isReadableStream"); function isStreamComplete(stream2, aborter) { return new Promise((resolve) => { stream2.once("close", () => { @@ -51921,6 +53415,7 @@ var require_dist3 = __commonJS({ stream2.once("error", resolve); }); } + __name(isStreamComplete, "isStreamComplete"); function parseHeaders(headers) { const httpHeaders = new HttpHeaders(); headers.forEach((value, key) => { @@ -51928,7 +53423,11 @@ var require_dist3 = __commonJS({ }); return httpHeaders; } + __name(parseHeaders, "parseHeaders"); var NodeFetchHttpClient = class { + static { + __name(this, "NodeFetchHttpClient"); + } constructor() { this.proxyAgentMap = /* @__PURE__ */ new Map(); this.keepAliveAgents = {}; @@ -51949,11 +53448,11 @@ var require_dist3 = __commonJS({ if (httpRequest.abortSignal.aborted) { throw new abortController.AbortError("The operation was aborted."); } - abortListener = (event) => { + abortListener = /* @__PURE__ */ __name((event) => { if (event.type === "abort") { abortController$1.abort(); } - }; + }, "abortListener"); httpRequest.abortSignal.addEventListener("abort", abortListener); } if (httpRequest.timeout) { @@ -51964,7 +53463,7 @@ var require_dist3 = __commonJS({ if (httpRequest.formData) { const formData = httpRequest.formData; const requestForm = new FormData__default["default"](); - const appendFormValue = (key, value) => { + const appendFormValue = /* @__PURE__ */ __name((key, value) => { if (typeof value === "function") { value = value(); } @@ -51973,7 +53472,7 @@ var require_dist3 = __commonJS({ } else { requestForm.append(key, value); } - }; + }, "appendFormValue"); for (const formKey of Object.keys(formData)) { const formValue = formData[formKey]; if (Array.isArray(formValue)) { @@ -52152,7 +53651,11 @@ var require_dist3 = __commonJS({ } return result; } + __name(operationOptionsToRequestOptionsBase, "operationOptionsToRequestOptionsBase"); var BaseRequestPolicy = class { + static { + __name(this, "BaseRequestPolicy"); + } /** * The main method to implement that manipulates a request/response. */ @@ -52179,6 +53682,9 @@ var require_dist3 = __commonJS({ } }; var RequestPolicyOptions = class { + static { + __name(this, "RequestPolicyOptions"); + } constructor(_logger) { this._logger = _logger; } @@ -52256,6 +53762,7 @@ var require_dist3 = __commonJS({ const builder = new xml2js__namespace.Builder(xml2jsBuilderSettings); return builder.buildObject(obj); } + __name(stringifyXML, "stringifyXML"); function parseXML(str, opts = {}) { var _a; xml2jsParserSettings.explicitRoot = !!opts.includeRoot; @@ -52275,13 +53782,15 @@ var require_dist3 = __commonJS({ } }); } + __name(parseXML, "parseXML"); function deserializationPolicy(deserializationContentTypes, parsingOptions) { return { - create: (nextPolicy, options) => { + create: /* @__PURE__ */ __name((nextPolicy, options) => { return new DeserializationPolicy(nextPolicy, options, deserializationContentTypes, parsingOptions); - } + }, "create") }; } + __name(deserializationPolicy, "deserializationPolicy"); var defaultJsonContentTypes = ["application/json", "text/json"]; var defaultXmlContentTypes = ["application/xml", "application/atom+xml"]; var DefaultDeserializationOptions = { @@ -52291,6 +53800,9 @@ var require_dist3 = __commonJS({ } }; var DeserializationPolicy = class extends BaseRequestPolicy { + static { + __name(this, "DeserializationPolicy"); + } constructor(nextPolicy, requestPolicyOptions, deserializationContentTypes, parsingOptions = {}) { var _a; super(nextPolicy, requestPolicyOptions); @@ -52318,6 +53830,7 @@ var require_dist3 = __commonJS({ } return result; } + __name(getOperationResponse, "getOperationResponse"); function shouldDeserializeResponse(parsedResponse) { const shouldDeserialize = parsedResponse.request.shouldDeserialize; let result; @@ -52330,6 +53843,7 @@ var require_dist3 = __commonJS({ } return result; } + __name(shouldDeserializeResponse, "shouldDeserializeResponse"); function deserializeResponseBody(jsonContentTypes, xmlContentTypes, response, options = {}) { var _a, _b, _c; const updatedOptions = { @@ -52374,10 +53888,12 @@ var require_dist3 = __commonJS({ return parsedResponse; }); } + __name(deserializeResponseBody, "deserializeResponseBody"); function isOperationSpecEmpty(operationSpec) { const expectedStatusCodes = Object.keys(operationSpec.responses); return expectedStatusCodes.length === 0 || expectedStatusCodes.length === 1 && expectedStatusCodes[0] === "default"; } + __name(isOperationSpecEmpty, "isOperationSpecEmpty"); function handleErrorResponse(parsedResponse, operationSpec, responseSpec) { var _a; const isSuccessByStatus = 200 <= parsedResponse.status && parsedResponse.status < 300; @@ -52428,14 +53944,15 @@ var require_dist3 = __commonJS({ } return { error, shouldReturnResponse: false }; } + __name(handleErrorResponse, "handleErrorResponse"); function parse2(jsonContentTypes, xmlContentTypes, operationResponse, opts) { var _a; - const errorHandler = (err) => { + const errorHandler = /* @__PURE__ */ __name((err) => { const msg = `Error "${err}" occurred while parsing the response body - ${operationResponse.bodyAsText}.`; const errCode = err.code || RestError.PARSE_ERROR; const e = new RestError(msg, errCode, operationResponse.status, operationResponse.request, operationResponse); return Promise.reject(e); - }; + }, "errorHandler"); const streaming = ((_a = operationResponse.request.streamResponseStatusCodes) === null || _a === void 0 ? void 0 : _a.has(operationResponse.status)) || operationResponse.request.streamResponseBody; if (!streaming && operationResponse.bodyAsText) { const text = operationResponse.bodyAsText; @@ -52455,17 +53972,22 @@ var require_dist3 = __commonJS({ } return Promise.resolve(operationResponse); } + __name(parse2, "parse"); var DefaultKeepAliveOptions = { enable: true }; function keepAlivePolicy(keepAliveOptions) { return { - create: (nextPolicy, options) => { + create: /* @__PURE__ */ __name((nextPolicy, options) => { return new KeepAlivePolicy(nextPolicy, options, keepAliveOptions || DefaultKeepAliveOptions); - } + }, "create") }; } + __name(keepAlivePolicy, "keepAlivePolicy"); var KeepAlivePolicy = class extends BaseRequestPolicy { + static { + __name(this, "KeepAlivePolicy"); + } /** * Creates an instance of KeepAlivePolicy. * @@ -52495,12 +54017,16 @@ var require_dist3 = __commonJS({ }; function redirectPolicy(maximumRetries = 20) { return { - create: (nextPolicy, options) => { + create: /* @__PURE__ */ __name((nextPolicy, options) => { return new RedirectPolicy(nextPolicy, options, maximumRetries); - } + }, "create") }; } + __name(redirectPolicy, "redirectPolicy"); var RedirectPolicy = class extends BaseRequestPolicy { + static { + __name(this, "RedirectPolicy"); + } constructor(nextPolicy, options, maxRetries = 20) { super(nextPolicy, options); this.maxRetries = maxRetries; @@ -52524,6 +54050,7 @@ var require_dist3 = __commonJS({ } return Promise.resolve(response); } + __name(handleRedirect, "handleRedirect"); var DEFAULT_CLIENT_RETRY_COUNT = 3; var DEFAULT_CLIENT_RETRY_INTERVAL = 1e3 * 30; var DEFAULT_CLIENT_MAX_RETRY_INTERVAL = 1e3 * 90; @@ -52531,12 +54058,14 @@ var require_dist3 = __commonJS({ function isNumber(n) { return typeof n === "number"; } + __name(isNumber, "isNumber"); function shouldRetry(retryLimit, predicate, retryData, response, error) { if (!predicate(response, error)) { return false; } return retryData.retryCount < retryLimit; } + __name(shouldRetry, "shouldRetry"); function updateRetryData(retryOptions, retryData = { retryCount: 0, retryInterval: 0 }, err) { if (err) { if (retryData.error) { @@ -52551,13 +54080,15 @@ var require_dist3 = __commonJS({ retryData.retryInterval = Math.min(retryOptions.minRetryInterval + incrementDelta, retryOptions.maxRetryInterval); return retryData; } + __name(updateRetryData, "updateRetryData"); function exponentialRetryPolicy(retryCount, retryInterval, maxRetryInterval) { return { - create: (nextPolicy, options) => { + create: /* @__PURE__ */ __name((nextPolicy, options) => { return new ExponentialRetryPolicy(nextPolicy, options, retryCount, retryInterval, maxRetryInterval); - } + }, "create") }; } + __name(exponentialRetryPolicy, "exponentialRetryPolicy"); exports2.RetryMode = void 0; (function(RetryMode) { RetryMode[RetryMode["Exponential"] = 0] = "Exponential"; @@ -52568,6 +54099,9 @@ var require_dist3 = __commonJS({ maxRetryDelayInMs: DEFAULT_CLIENT_MAX_RETRY_INTERVAL }; var ExponentialRetryPolicy = class extends BaseRequestPolicy { + static { + __name(this, "ExponentialRetryPolicy"); + } /** * @param nextPolicy - The next RequestPolicy in the pipeline chain. * @param options - The options for this RequestPolicy. @@ -52597,6 +54131,7 @@ var require_dist3 = __commonJS({ } return true; } + __name(shouldPolicyRetry, "shouldPolicyRetry"); retryData = updateRetryData({ retryInterval: policy.retryInterval, minRetryInterval: 0, @@ -52619,14 +54154,19 @@ var require_dist3 = __commonJS({ return response; } } + __name(retry$1, "retry$1"); function logPolicy(loggingOptions = {}) { return { - create: (nextPolicy, options) => { + create: /* @__PURE__ */ __name((nextPolicy, options) => { return new LogPolicy(nextPolicy, options, loggingOptions); - } + }, "create") }; } + __name(logPolicy, "logPolicy"); var LogPolicy = class extends BaseRequestPolicy { + static { + __name(this, "LogPolicy"); + } constructor(nextPolicy, options, { logger: logger$12 = logger.info, allowedHeaderNames = [], allowedQueryParameters = [] } = {}) { super(nextPolicy, options); this.logger = logger$12; @@ -52686,6 +54226,7 @@ var require_dist3 = __commonJS({ function getPathStringFromParameter(parameter) { return getPathStringFromParameterPath(parameter.parameterPath, parameter.mapper); } + __name(getPathStringFromParameter, "getPathStringFromParameter"); function getPathStringFromParameterPath(parameterPath, mapper) { let result; if (typeof parameterPath === "string") { @@ -52697,6 +54238,7 @@ var require_dist3 = __commonJS({ } return result; } + __name(getPathStringFromParameterPath, "getPathStringFromParameterPath"); function getStreamResponseStatusCodes(operationSpec) { const result = /* @__PURE__ */ new Set(); for (const statusCode in operationSpec.responses) { @@ -52707,9 +54249,11 @@ var require_dist3 = __commonJS({ } return result; } + __name(getStreamResponseStatusCodes, "getStreamResponseStatusCodes"); function getDefaultUserAgentKey() { return Constants.HeaderConstants.USER_AGENT; } + __name(getDefaultUserAgentKey, "getDefaultUserAgentKey"); function getPlatformSpecificData() { const runtimeInfo = { key: "Node", @@ -52721,6 +54265,7 @@ var require_dist3 = __commonJS({ }; return [runtimeInfo, osInfo]; } + __name(getPlatformSpecificData, "getPlatformSpecificData"); function getRuntimeInfo() { const msRestRuntime = { key: "core-http", @@ -52728,12 +54273,14 @@ var require_dist3 = __commonJS({ }; return [msRestRuntime]; } + __name(getRuntimeInfo, "getRuntimeInfo"); function getUserAgentString(telemetryInfo, keySeparator = " ", valueSeparator = "/") { return telemetryInfo.map((info2) => { const value = info2.value ? `${valueSeparator}${info2.value}` : ""; return `${info2.key}${value}`; }).join(keySeparator); } + __name(getUserAgentString, "getUserAgentString"); var getDefaultUserAgentHeaderName = getDefaultUserAgentKey; function getDefaultUserAgentValue() { const runtimeInfo = getRuntimeInfo(); @@ -52741,16 +54288,21 @@ var require_dist3 = __commonJS({ const userAgent = getUserAgentString(runtimeInfo.concat(platformSpecificData)); return userAgent; } + __name(getDefaultUserAgentValue, "getDefaultUserAgentValue"); function userAgentPolicy(userAgentData) { const key = !userAgentData || userAgentData.key === void 0 || userAgentData.key === null ? getDefaultUserAgentKey() : userAgentData.key; const value = !userAgentData || userAgentData.value === void 0 || userAgentData.value === null ? getDefaultUserAgentValue() : userAgentData.value; return { - create: (nextPolicy, options) => { + create: /* @__PURE__ */ __name((nextPolicy, options) => { return new UserAgentPolicy(nextPolicy, options, key, value); - } + }, "create") }; } + __name(userAgentPolicy, "userAgentPolicy"); var UserAgentPolicy = class extends BaseRequestPolicy { + static { + __name(this, "UserAgentPolicy"); + } constructor(_nextPolicy, _options, headerKey, headerValue) { super(_nextPolicy, _options); this._nextPolicy = _nextPolicy; @@ -52804,6 +54356,7 @@ var require_dist3 = __commonJS({ return finalToken; } } + __name(tryGetAccessToken, "tryGetAccessToken"); let token = await tryGetAccessToken(); while (token === null) { await coreUtil.delay(retryIntervalInMs); @@ -52811,6 +54364,7 @@ var require_dist3 = __commonJS({ } return token; } + __name(beginRefresh, "beginRefresh"); function createTokenCycler(credential, scopes, tokenCyclerOptions) { let refreshWorker = null; let token = null; @@ -52841,7 +54395,7 @@ var require_dist3 = __commonJS({ function refresh(getTokenOptions) { var _a; if (!cycler.isRefreshing) { - const tryGetAccessToken = () => credential.getToken(scopes, getTokenOptions); + const tryGetAccessToken = /* @__PURE__ */ __name(() => credential.getToken(scopes, getTokenOptions), "tryGetAccessToken"); refreshWorker = beginRefresh( tryGetAccessToken, options.retryIntervalInMs, @@ -52859,6 +54413,7 @@ var require_dist3 = __commonJS({ } return refreshWorker; } + __name(refresh, "refresh"); return async (tokenOptions) => { if (cycler.mustRefresh) return refresh(tokenOptions); @@ -52868,6 +54423,7 @@ var require_dist3 = __commonJS({ return token; }; } + __name(createTokenCycler, "createTokenCycler"); function bearerTokenAuthenticationPolicy(credential, scopes) { const getToken = createTokenCycler( credential, @@ -52875,6 +54431,9 @@ var require_dist3 = __commonJS({ /* , options */ ); class BearerTokenAuthenticationPolicy extends BaseRequestPolicy { + static { + __name(this, "BearerTokenAuthenticationPolicy"); + } constructor(nextPolicy, options) { super(nextPolicy, options); } @@ -52893,19 +54452,24 @@ var require_dist3 = __commonJS({ } } return { - create: (nextPolicy, options) => { + create: /* @__PURE__ */ __name((nextPolicy, options) => { return new BearerTokenAuthenticationPolicy(nextPolicy, options); - } + }, "create") }; } + __name(bearerTokenAuthenticationPolicy, "bearerTokenAuthenticationPolicy"); function disableResponseDecompressionPolicy() { return { - create: (nextPolicy, options) => { + create: /* @__PURE__ */ __name((nextPolicy, options) => { return new DisableResponseDecompressionPolicy(nextPolicy, options); - } + }, "create") }; } + __name(disableResponseDecompressionPolicy, "disableResponseDecompressionPolicy"); var DisableResponseDecompressionPolicy = class extends BaseRequestPolicy { + static { + __name(this, "DisableResponseDecompressionPolicy"); + } /** * Creates an instance of DisableResponseDecompressionPolicy. * @@ -52930,12 +54494,16 @@ var require_dist3 = __commonJS({ }; function generateClientRequestIdPolicy(requestIdHeaderName = "x-ms-client-request-id") { return { - create: (nextPolicy, options) => { + create: /* @__PURE__ */ __name((nextPolicy, options) => { return new GenerateClientRequestIdPolicy(nextPolicy, options, requestIdHeaderName); - } + }, "create") }; } + __name(generateClientRequestIdPolicy, "generateClientRequestIdPolicy"); var GenerateClientRequestIdPolicy = class extends BaseRequestPolicy { + static { + __name(this, "GenerateClientRequestIdPolicy"); + } constructor(nextPolicy, options, _requestIdHeaderName) { super(nextPolicy, options); this._requestIdHeaderName = _requestIdHeaderName; @@ -52954,14 +54522,19 @@ var require_dist3 = __commonJS({ } return cachedHttpClient; } + __name(getCachedDefaultHttpClient, "getCachedDefaultHttpClient"); function ndJsonPolicy() { return { - create: (nextPolicy, options) => { + create: /* @__PURE__ */ __name((nextPolicy, options) => { return new NdJsonPolicy(nextPolicy, options); - } + }, "create") }; } + __name(ndJsonPolicy, "ndJsonPolicy"); var NdJsonPolicy = class extends BaseRequestPolicy { + static { + __name(this, "NdJsonPolicy"); + } /** * Creates an instance of KeepAlivePolicy. */ @@ -52993,6 +54566,7 @@ var require_dist3 = __commonJS({ const httpProxy = getEnvironmentValue(Constants.HTTP_PROXY); return httpsProxy || allProxy || httpProxy; } + __name(loadEnvironmentProxyValue, "loadEnvironmentProxyValue"); function isBypassed(uri, noProxyList, bypassedMap) { if (noProxyList.length === 0) { return false; @@ -53020,6 +54594,7 @@ var require_dist3 = __commonJS({ bypassedMap === null || bypassedMap === void 0 ? void 0 : bypassedMap.set(host, isBypassedFlag); return isBypassedFlag; } + __name(isBypassed, "isBypassed"); function loadNoProxy() { const noProxy = getEnvironmentValue(Constants.NO_PROXY); noProxyListLoaded = true; @@ -53028,6 +54603,7 @@ var require_dist3 = __commonJS({ } return []; } + __name(loadNoProxy, "loadNoProxy"); function getDefaultProxySettings(proxyUrl) { if (!proxyUrl) { proxyUrl = loadEnvironmentProxyValue(); @@ -53045,6 +54621,7 @@ var require_dist3 = __commonJS({ password }; } + __name(getDefaultProxySettings, "getDefaultProxySettings"); function proxyPolicy(proxySettings, options) { if (!proxySettings) { proxySettings = getDefaultProxySettings(); @@ -53053,11 +54630,12 @@ var require_dist3 = __commonJS({ globalNoProxyList.push(...loadNoProxy()); } return { - create: (nextPolicy, requestPolicyOptions) => { + create: /* @__PURE__ */ __name((nextPolicy, requestPolicyOptions) => { return new ProxyPolicy(nextPolicy, requestPolicyOptions, proxySettings, options === null || options === void 0 ? void 0 : options.customNoProxyList); - } + }, "create") }; } + __name(proxyPolicy, "proxyPolicy"); function extractAuthFromUrl(url) { const atIndex = url.indexOf("@"); if (atIndex === -1) { @@ -53077,7 +54655,11 @@ var require_dist3 = __commonJS({ urlWithoutAuth }; } + __name(extractAuthFromUrl, "extractAuthFromUrl"); var ProxyPolicy = class extends BaseRequestPolicy { + static { + __name(this, "ProxyPolicy"); + } constructor(nextPolicy, options, proxySettings, customNoProxyList) { super(nextPolicy, options); this.proxySettings = proxySettings; @@ -53093,12 +54675,16 @@ var require_dist3 = __commonJS({ }; function rpRegistrationPolicy(retryTimeout = 30) { return { - create: (nextPolicy, options) => { + create: /* @__PURE__ */ __name((nextPolicy, options) => { return new RPRegistrationPolicy(nextPolicy, options, retryTimeout); - } + }, "create") }; } + __name(rpRegistrationPolicy, "rpRegistrationPolicy"); var RPRegistrationPolicy = class extends BaseRequestPolicy { + static { + __name(this, "RPRegistrationPolicy"); + } constructor(nextPolicy, options, _retryTimeout = 30) { super(nextPolicy, options); this._retryTimeout = _retryTimeout; @@ -53123,6 +54709,7 @@ var require_dist3 = __commonJS({ } return Promise.resolve(response); } + __name(registerIfNeeded, "registerIfNeeded"); function getRequestEssentials(originalRequest, reuseUrlToo = false) { const reqOptions = originalRequest.clone(); if (reuseUrlToo) { @@ -53132,6 +54719,7 @@ var require_dist3 = __commonJS({ reqOptions.headers.set("Content-Type", "application/json; charset=utf-8"); return reqOptions; } + __name(getRequestEssentials, "getRequestEssentials"); function checkRPNotRegisteredError(body) { let result, responseBody; if (body) { @@ -53148,6 +54736,7 @@ var require_dist3 = __commonJS({ } return result; } + __name(checkRPNotRegisteredError, "checkRPNotRegisteredError"); function extractSubscriptionUrl(url) { let result; const matchRes = url.match(/.*\/subscriptions\/[a-f0-9-]+\//gi); @@ -53158,6 +54747,7 @@ var require_dist3 = __commonJS({ } return result; } + __name(extractSubscriptionUrl, "extractSubscriptionUrl"); async function registerRP(policy, urlPrefix, provider, originalRequest) { const postUrl = `${urlPrefix}providers/${provider}/register?api-version=2016-02-01`; const getUrl = `${urlPrefix}providers/${provider}?api-version=2016-02-01`; @@ -53170,6 +54760,7 @@ var require_dist3 = __commonJS({ } return getRegistrationStatus(policy, getUrl, originalRequest); } + __name(registerRP, "registerRP"); async function getRegistrationStatus(policy, url, originalRequest) { const reqOptions = getRequestEssentials(originalRequest); reqOptions.url = url; @@ -53183,14 +54774,19 @@ var require_dist3 = __commonJS({ return getRegistrationStatus(policy, url, originalRequest); } } + __name(getRegistrationStatus, "getRegistrationStatus"); function signingPolicy(authenticationProvider) { return { - create: (nextPolicy, options) => { + create: /* @__PURE__ */ __name((nextPolicy, options) => { return new SigningPolicy(nextPolicy, options, authenticationProvider); - } + }, "create") }; } + __name(signingPolicy, "signingPolicy"); var SigningPolicy = class extends BaseRequestPolicy { + static { + __name(this, "SigningPolicy"); + } constructor(nextPolicy, options, authenticationProvider) { super(nextPolicy, options); this.authenticationProvider = authenticationProvider; @@ -53204,12 +54800,16 @@ var require_dist3 = __commonJS({ }; function systemErrorRetryPolicy(retryCount, retryInterval, minRetryInterval, maxRetryInterval) { return { - create: (nextPolicy, options) => { + create: /* @__PURE__ */ __name((nextPolicy, options) => { return new SystemErrorRetryPolicy(nextPolicy, options, retryCount, retryInterval, minRetryInterval, maxRetryInterval); - } + }, "create") }; } + __name(systemErrorRetryPolicy, "systemErrorRetryPolicy"); var SystemErrorRetryPolicy = class extends BaseRequestPolicy { + static { + __name(this, "SystemErrorRetryPolicy"); + } constructor(nextPolicy, options, retryCount, retryInterval, minRetryInterval, maxRetryInterval) { super(nextPolicy, options); this.retryCount = isNumber(retryCount) ? retryCount : DEFAULT_CLIENT_RETRY_COUNT; @@ -53229,6 +54829,7 @@ var require_dist3 = __commonJS({ } return false; } + __name(shouldPolicyRetry, "shouldPolicyRetry"); if (shouldRetry(policy.retryCount, shouldPolicyRetry, retryData, operationResponse, err)) { try { await coreUtil.delay(retryData.retryInterval); @@ -53243,17 +54844,22 @@ var require_dist3 = __commonJS({ return operationResponse; } } + __name(retry, "retry"); var DEFAULT_CLIENT_MAX_RETRY_COUNT = 3; var StatusCodes = Constants.HttpConstants.StatusCodes; function throttlingRetryPolicy() { return { - create: (nextPolicy, options) => { + create: /* @__PURE__ */ __name((nextPolicy, options) => { return new ThrottlingRetryPolicy(nextPolicy, options); - } + }, "create") }; } + __name(throttlingRetryPolicy, "throttlingRetryPolicy"); var StandardAbortMessage = "The operation was aborted."; var ThrottlingRetryPolicy = class _ThrottlingRetryPolicy extends BaseRequestPolicy { + static { + __name(this, "ThrottlingRetryPolicy"); + } constructor(nextPolicy, options, _handleResponse) { super(nextPolicy, options); this.numberOfRetries = 0; @@ -53320,7 +54926,11 @@ var require_dist3 = __commonJS({ } }; } + __name(tracingPolicy, "tracingPolicy"); var TracingPolicy = class extends BaseRequestPolicy { + static { + __name(this, "TracingPolicy"); + } constructor(nextPolicy, options, tracingOptions) { super(nextPolicy, options); this.userAgent = tracingOptions.userAgent; @@ -53413,6 +55023,9 @@ var require_dist3 = __commonJS({ } }; var ServiceClient = class { + static { + __name(this, "ServiceClient"); + } /** * The ServiceClient constructor * @param credentials - The credentials used for authentication with the service. @@ -53433,7 +55046,7 @@ var require_dist3 = __commonJS({ let authPolicyFactory = void 0; if (coreAuth.isTokenCredential(credentials)) { logger.info("ServiceClient: creating bearer token authentication policy from provided credentials"); - const wrappedPolicyFactory = () => { + const wrappedPolicyFactory = /* @__PURE__ */ __name(() => { let bearerTokenPolicyFactory = void 0; const serviceClient = this; const serviceClientOptions = options; @@ -53449,7 +55062,7 @@ var require_dist3 = __commonJS({ return bearerTokenPolicyFactory.create(nextPolicy, createOptions); } }; - }; + }, "wrappedPolicyFactory"); authPolicyFactory = wrappedPolicyFactory(); } else if (credentials && typeof credentials.signRequest === "function") { logger.info("ServiceClient: creating signing policy from provided credentials"); @@ -53701,6 +55314,7 @@ var require_dist3 = __commonJS({ } } } + __name(serializeRequestBody, "serializeRequestBody"); function getXmlValueWithNamespace(xmlNamespace, xmlnsKey, typeName, serializedValue, options) { if (xmlNamespace && !["Composite", "Sequence", "Dictionary"].includes(typeName)) { const result = {}; @@ -53710,6 +55324,7 @@ var require_dist3 = __commonJS({ } return serializedValue; } + __name(getXmlValueWithNamespace, "getXmlValueWithNamespace"); function getValueOrFunctionResult(value, defaultValueCreator) { let result; if (typeof value === "string") { @@ -53722,6 +55337,7 @@ var require_dist3 = __commonJS({ } return result; } + __name(getValueOrFunctionResult, "getValueOrFunctionResult"); function createDefaultRequestPolicyFactories(authPolicyFactory, options) { const factories = []; if (options.generateClientRequestIdHeader) { @@ -53749,6 +55365,7 @@ var require_dist3 = __commonJS({ factories.push(logPolicy({ logger: logger.info })); return factories; } + __name(createDefaultRequestPolicyFactories, "createDefaultRequestPolicyFactories"); function createPipelineFromOptions(pipelineOptions, authPolicyFactory) { const requestPolicyFactories = []; if (pipelineOptions.sendStreamingJson) { @@ -53788,9 +55405,11 @@ var require_dist3 = __commonJS({ requestPolicyFactories }; } + __name(createPipelineFromOptions, "createPipelineFromOptions"); function getOperationArgumentValueFromParameter(serviceClient, operationArguments, parameter, serializer) { return getOperationArgumentValueFromParameterPath(serviceClient, operationArguments, parameter.parameterPath, parameter.mapper, serializer); } + __name(getOperationArgumentValueFromParameter, "getOperationArgumentValueFromParameter"); function getOperationArgumentValueFromParameterPath(serviceClient, operationArguments, parameterPath, parameterMapper, serializer) { var _a; let value; @@ -53836,6 +55455,7 @@ var require_dist3 = __commonJS({ } return value; } + __name(getOperationArgumentValueFromParameterPath, "getOperationArgumentValueFromParameterPath"); function getPropertyFromParameterPath(parent, parameterPath) { const result = { propertyFound: false }; let i = 0; @@ -53853,14 +55473,15 @@ var require_dist3 = __commonJS({ } return result; } + __name(getPropertyFromParameterPath, "getPropertyFromParameterPath"); function flattenResponse(_response, responseSpec) { const parsedHeaders = _response.parsedHeaders; const bodyMapper = responseSpec && responseSpec.bodyMapper; - const addOperationResponse = (obj) => { + const addOperationResponse = /* @__PURE__ */ __name((obj) => { return Object.defineProperty(obj, "_response", { value: _response }); - }; + }, "addOperationResponse"); if (bodyMapper) { const typeName = bodyMapper.type.name; if (typeName === "Stream") { @@ -53892,6 +55513,7 @@ var require_dist3 = __commonJS({ } return addOperationResponse(Object.assign(Object.assign({}, parsedHeaders), _response.parsedBody)); } + __name(flattenResponse, "flattenResponse"); function getCredentialScopes(options, baseUri) { if (options === null || options === void 0 ? void 0 : options.credentialScopes) { return options.credentialScopes; @@ -53901,11 +55523,16 @@ var require_dist3 = __commonJS({ } return void 0; } + __name(getCredentialScopes, "getCredentialScopes"); function createSpanFunction(args) { return coreTracing.createSpanFunction(args); } + __name(createSpanFunction, "createSpanFunction"); var TokenRefreshBufferMs = 2 * 60 * 1e3; var ExpiringAccessTokenCache = class { + static { + __name(this, "ExpiringAccessTokenCache"); + } /** * Constructs an instance of {@link ExpiringAccessTokenCache} with * an optional expiration buffer time. @@ -53932,6 +55559,9 @@ var require_dist3 = __commonJS({ } }; var AccessTokenRefresher = class { + static { + __name(this, "AccessTokenRefresher"); + } constructor(credential, scopes, requiredMillisecondsBeforeNewRefresh = 3e4) { this.credential = credential; this.scopes = scopes; @@ -53971,6 +55601,9 @@ var require_dist3 = __commonJS({ var HeaderConstants = Constants.HeaderConstants; var DEFAULT_AUTHORIZATION_SCHEME = "Basic"; var BasicAuthenticationCredentials = class { + static { + __name(this, "BasicAuthenticationCredentials"); + } /** * Creates a new BasicAuthenticationCredentials object. * @@ -54006,6 +55639,9 @@ var require_dist3 = __commonJS({ } }; var ApiKeyCredentials = class { + static { + __name(this, "ApiKeyCredentials"); + } /** * @param options - Specifies the options to be provided for auth. Either header or query needs to be provided. */ @@ -54052,6 +55688,9 @@ var require_dist3 = __commonJS({ } }; var TopicCredentials = class extends ApiKeyCredentials { + static { + __name(this, "TopicCredentials"); + } /** * Creates a new EventGrid TopicCredentials object. * @@ -54071,21 +55710,21 @@ var require_dist3 = __commonJS({ }; Object.defineProperty(exports2, "delay", { enumerable: true, - get: function() { + get: /* @__PURE__ */ __name(function() { return coreUtil.delay; - } + }, "get") }); Object.defineProperty(exports2, "isNode", { enumerable: true, - get: function() { + get: /* @__PURE__ */ __name(function() { return coreUtil.isNode; - } + }, "get") }); Object.defineProperty(exports2, "isTokenCredential", { enumerable: true, - get: function() { + get: /* @__PURE__ */ __name(function() { return coreAuth.isTokenCredential; - } + }, "get") }); exports2.AccessTokenRefresher = AccessTokenRefresher; exports2.ApiKeyCredentials = ApiKeyCredentials; @@ -54177,9 +55816,10 @@ var require_getPagedAsyncIterator = __commonJS({ } }; } + __name(getPagedAsyncIterator, "getPagedAsyncIterator"); exports2.getPagedAsyncIterator = getPagedAsyncIterator; function getItemAsyncIterator(pagedResult) { - return tslib_1.__asyncGenerator(this, arguments, function* getItemAsyncIterator_1() { + return tslib_1.__asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* getItemAsyncIterator_1() { var _a, e_1, _b, _c, _d, e_2, _e, _f; const pages = getPageAsyncIterator(pagedResult); const firstVal = yield tslib_1.__await(pages.next()); @@ -54226,10 +55866,11 @@ var require_getPagedAsyncIterator = __commonJS({ } } } - }); + }, "getItemAsyncIterator_1")); } + __name(getItemAsyncIterator, "getItemAsyncIterator"); function getPageAsyncIterator(pagedResult, options = {}) { - return tslib_1.__asyncGenerator(this, arguments, function* getPageAsyncIterator_1() { + return tslib_1.__asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* getPageAsyncIterator_1() { const { pageLink, maxPageSize } = options; let response = yield tslib_1.__await(pagedResult.getPage(pageLink !== null && pageLink !== void 0 ? pageLink : pagedResult.firstPageLink, maxPageSize)); if (!response) { @@ -54243,8 +55884,9 @@ var require_getPagedAsyncIterator = __commonJS({ } yield yield tslib_1.__await(response.page); } - }); + }, "getPageAsyncIterator_1")); } + __name(getPageAsyncIterator, "getPageAsyncIterator"); } }); @@ -54296,6 +55938,7 @@ var require_operation = __commonJS({ throw new Error(`Unable to deserialize input state: ${serializedState}`); } } + __name(deserializeState, "deserializeState"); exports2.deserializeState = deserializeState; function setStateError(inputs) { const { state, stateProxy, isOperationError } = inputs; @@ -54307,6 +55950,7 @@ var require_operation = __commonJS({ throw error; }; } + __name(setStateError, "setStateError"); function appendReadableErrorMessage(currentMessage, innerMessage) { let message = currentMessage; if (message.slice(-1) !== ".") { @@ -54314,6 +55958,7 @@ var require_operation = __commonJS({ } return message + " " + innerMessage; } + __name(appendReadableErrorMessage, "appendReadableErrorMessage"); function simplifyError(err) { let message = err.message; let code = err.code; @@ -54328,6 +55973,7 @@ var require_operation = __commonJS({ message }; } + __name(simplifyError, "simplifyError"); function processOperationStatus(result) { const { state, stateProxy, status, isDone, processResult, getError, response, setErrorAsResult } = result; switch (status) { @@ -54361,10 +56007,12 @@ var require_operation = __commonJS({ })); } } + __name(processOperationStatus, "processOperationStatus"); function buildResult(inputs) { const { processResult, response, state } = inputs; return processResult ? processResult(response, state) : response; } + __name(buildResult, "buildResult"); async function initOperation(inputs) { const { init, stateProxy, processResult, getOperationStatus, withOperationLocation, setErrorAsResult } = inputs; const { operationLocation, resourceLocation, metadata, response } = await init(); @@ -54381,6 +56029,7 @@ var require_operation = __commonJS({ processOperationStatus({ state, status, stateProxy, response, setErrorAsResult, processResult }); return state; } + __name(initOperation, "initOperation"); exports2.initOperation = initOperation; async function pollOperationHelper(inputs) { const { poll, state, stateProxy, operationLocation, getOperationStatus, getResourceLocation, isOperationError, options } = inputs; @@ -54405,6 +56054,7 @@ var require_operation = __commonJS({ } return { response, status }; } + __name(pollOperationHelper, "pollOperationHelper"); async function pollOperation(inputs) { const { poll, state, stateProxy, options, getOperationStatus, getResourceLocation, getOperationLocation, isOperationError, withOperationLocation, getPollingInterval, processResult, getError, updateState, setDelay, isDone, setErrorAsResult } = inputs; const { operationLocation } = state.config; @@ -54444,6 +56094,7 @@ var require_operation = __commonJS({ updateState === null || updateState === void 0 ? void 0 : updateState(state, response); } } + __name(pollOperation, "pollOperation"); exports2.pollOperation = pollOperation; } }); @@ -54460,15 +56111,19 @@ var require_operation2 = __commonJS({ const { azureAsyncOperation, operationLocation } = inputs; return operationLocation !== null && operationLocation !== void 0 ? operationLocation : azureAsyncOperation; } + __name(getOperationLocationPollingUrl, "getOperationLocationPollingUrl"); function getLocationHeader(rawResponse) { return rawResponse.headers["location"]; } + __name(getLocationHeader, "getLocationHeader"); function getOperationLocationHeader(rawResponse) { return rawResponse.headers["operation-location"]; } + __name(getOperationLocationHeader, "getOperationLocationHeader"); function getAzureAsyncOperationHeader(rawResponse) { return rawResponse.headers["azure-asyncoperation"]; } + __name(getAzureAsyncOperationHeader, "getAzureAsyncOperationHeader"); function findResourceLocation(inputs) { var _a; const { location, requestMethod, requestPath, resourceLocationConfig } = inputs; @@ -54500,7 +56155,9 @@ var require_operation2 = __commonJS({ } } } + __name(getDefault, "getDefault"); } + __name(findResourceLocation, "findResourceLocation"); function inferLroMode(inputs) { const { rawResponse, requestMethod, requestPath, resourceLocationConfig } = inputs; const operationLocation = getOperationLocationHeader(rawResponse); @@ -54533,6 +56190,7 @@ var require_operation2 = __commonJS({ return void 0; } } + __name(inferLroMode, "inferLroMode"); exports2.inferLroMode = inferLroMode; function transformStatus(inputs) { const { status, statusCode } = inputs; @@ -54561,17 +56219,20 @@ var require_operation2 = __commonJS({ } } } + __name(transformStatus, "transformStatus"); function getStatus(rawResponse) { var _a; const { status } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {}; return transformStatus({ status, statusCode: rawResponse.statusCode }); } + __name(getStatus, "getStatus"); function getProvisioningState(rawResponse) { var _a, _b; const { properties, provisioningState } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {}; const status = (_b = properties === null || properties === void 0 ? void 0 : properties.provisioningState) !== null && _b !== void 0 ? _b : provisioningState; return transformStatus({ status, statusCode: rawResponse.statusCode }); } + __name(getProvisioningState, "getProvisioningState"); function toOperationStatus(statusCode) { if (statusCode === 202) { return "running"; @@ -54581,6 +56242,7 @@ var require_operation2 = __commonJS({ return "failed"; } } + __name(toOperationStatus, "toOperationStatus"); function parseRetryAfter({ rawResponse }) { const retryAfter = rawResponse.headers["retry-after"]; if (retryAfter !== void 0) { @@ -54589,6 +56251,7 @@ var require_operation2 = __commonJS({ } return void 0; } + __name(parseRetryAfter, "parseRetryAfter"); exports2.parseRetryAfter = parseRetryAfter; function getErrorFromResponse(response) { const error = accessBodyProperty(response, "error"); @@ -54602,6 +56265,7 @@ var require_operation2 = __commonJS({ } return error; } + __name(getErrorFromResponse, "getErrorFromResponse"); exports2.getErrorFromResponse = getErrorFromResponse; function calculatePollingIntervalFromDate(retryAfterDate) { const timeNow = Math.floor((/* @__PURE__ */ new Date()).getTime()); @@ -54611,6 +56275,7 @@ var require_operation2 = __commonJS({ } return void 0; } + __name(calculatePollingIntervalFromDate, "calculatePollingIntervalFromDate"); function getStatusFromInitialResponse(inputs) { const { response, state, operationLocation } = inputs; function helper() { @@ -54625,14 +56290,16 @@ var require_operation2 = __commonJS({ return "running"; } } + __name(helper, "helper"); const status = helper(); return status === "running" && operationLocation === void 0 ? "succeeded" : status; } + __name(getStatusFromInitialResponse, "getStatusFromInitialResponse"); exports2.getStatusFromInitialResponse = getStatusFromInitialResponse; async function initHttpOperation(inputs) { const { stateProxy, resourceLocationConfig, processResult, lro, setErrorAsResult } = inputs; return (0, operation_js_1.initOperation)({ - init: async () => { + init: /* @__PURE__ */ __name(async () => { const response = await lro.sendInitialRequest(); const config = inferLroMode({ rawResponse: response.rawResponse, @@ -54641,13 +56308,14 @@ var require_operation2 = __commonJS({ resourceLocationConfig }); return Object.assign({ response, operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation }, (config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {}); - }, + }, "init"), stateProxy, processResult: processResult ? ({ flatResponse }, state) => processResult(flatResponse, state) : ({ flatResponse }) => flatResponse, getOperationStatus: getStatusFromInitialResponse, setErrorAsResult }); } + __name(initHttpOperation, "initHttpOperation"); exports2.initHttpOperation = initHttpOperation; function getOperationLocation({ rawResponse }, state) { var _a; @@ -54668,6 +56336,7 @@ var require_operation2 = __commonJS({ } } } + __name(getOperationLocation, "getOperationLocation"); exports2.getOperationLocation = getOperationLocation; function getOperationStatus({ rawResponse }, state) { var _a; @@ -54686,11 +56355,13 @@ var require_operation2 = __commonJS({ throw new Error(`Internal error: Unexpected operation mode: ${mode}`); } } + __name(getOperationStatus, "getOperationStatus"); exports2.getOperationStatus = getOperationStatus; function accessBodyProperty({ flatResponse, rawResponse }, prop) { var _a, _b; return (_a = flatResponse === null || flatResponse === void 0 ? void 0 : flatResponse[prop]) !== null && _a !== void 0 ? _a : (_b = rawResponse.body) === null || _b === void 0 ? void 0 : _b[prop]; } + __name(accessBodyProperty, "accessBodyProperty"); function getResourceLocation(res, state) { const loc = accessBodyProperty(res, "resourceLocation"); if (loc && typeof loc === "string") { @@ -54698,10 +56369,12 @@ var require_operation2 = __commonJS({ } return state.config.resourceLocation; } + __name(getResourceLocation, "getResourceLocation"); exports2.getResourceLocation = getResourceLocation; function isOperationError(e) { return e.name === "RestError"; } + __name(isOperationError, "isOperationError"); exports2.isOperationError = isOperationError; async function pollHttpOperation(inputs) { const { lro, stateProxy, options, processResult, updateState, setDelay, state, setErrorAsResult } = inputs; @@ -54722,10 +56395,11 @@ var require_operation2 = __commonJS({ * The expansion here is intentional because `lro` could be an object that * references an inner this, so we need to preserve a reference to it. */ - poll: async (location, inputOptions) => lro.sendPollRequest(location, inputOptions), + poll: /* @__PURE__ */ __name(async (location, inputOptions) => lro.sendPollRequest(location, inputOptions), "poll"), setErrorAsResult }); } + __name(pollHttpOperation, "pollHttpOperation"); exports2.pollHttpOperation = pollHttpOperation; } }); @@ -54739,26 +56413,26 @@ var require_poller = __commonJS({ var operation_js_1 = require_operation(); var constants_js_1 = require_constants6(); var core_util_1 = require_commonjs4(); - var createStateProxy = () => ({ + var createStateProxy = /* @__PURE__ */ __name(() => ({ /** * The state at this point is created to be of type OperationState. * It will be updated later to be of type TState when the * customer-provided callback, `updateState`, is called during polling. */ - initState: (config) => ({ status: "running", config }), - setCanceled: (state) => state.status = "canceled", - setError: (state, error) => state.error = error, - setResult: (state, result) => state.result = result, - setRunning: (state) => state.status = "running", - setSucceeded: (state) => state.status = "succeeded", - setFailed: (state) => state.status = "failed", - getError: (state) => state.error, - getResult: (state) => state.result, - isCanceled: (state) => state.status === "canceled", - isFailed: (state) => state.status === "failed", - isRunning: (state) => state.status === "running", - isSucceeded: (state) => state.status === "succeeded" - }); + initState: /* @__PURE__ */ __name((config) => ({ status: "running", config }), "initState"), + setCanceled: /* @__PURE__ */ __name((state) => state.status = "canceled", "setCanceled"), + setError: /* @__PURE__ */ __name((state, error) => state.error = error, "setError"), + setResult: /* @__PURE__ */ __name((state, result) => state.result = result, "setResult"), + setRunning: /* @__PURE__ */ __name((state) => state.status = "running", "setRunning"), + setSucceeded: /* @__PURE__ */ __name((state) => state.status = "succeeded", "setSucceeded"), + setFailed: /* @__PURE__ */ __name((state) => state.status = "failed", "setFailed"), + getError: /* @__PURE__ */ __name((state) => state.error, "getError"), + getResult: /* @__PURE__ */ __name((state) => state.result, "getResult"), + isCanceled: /* @__PURE__ */ __name((state) => state.status === "canceled", "isCanceled"), + isFailed: /* @__PURE__ */ __name((state) => state.status === "failed", "isFailed"), + isRunning: /* @__PURE__ */ __name((state) => state.status === "running", "isRunning"), + isSucceeded: /* @__PURE__ */ __name((state) => state.status === "succeeded", "isSucceeded") + }), "createStateProxy"); function buildCreatePoller(inputs) { const { getOperationLocation, getStatusFromInitialResponse, getStatusFromPollResponse, isOperationError, getResourceLocation, getPollingInterval, getError, resolveOnUnsuccessful } = inputs; return async ({ init, poll }, options) => { @@ -54785,30 +56459,31 @@ var require_poller = __commonJS({ let resultPromise; const abortController = new AbortController(); const handlers = /* @__PURE__ */ new Map(); - const handleProgressEvents = async () => handlers.forEach((h) => h(state)); + const handleProgressEvents = /* @__PURE__ */ __name(async () => handlers.forEach((h) => h(state)), "handleProgressEvents"); const cancelErrMsg = "Operation was canceled"; let currentPollIntervalInMs = intervalInMs; const poller = { - getOperationState: () => state, - getResult: () => state.result, - isDone: () => ["succeeded", "failed", "canceled"].includes(state.status), - isStopped: () => resultPromise === void 0, - stopPolling: () => { + getOperationState: /* @__PURE__ */ __name(() => state, "getOperationState"), + getResult: /* @__PURE__ */ __name(() => state.result, "getResult"), + isDone: /* @__PURE__ */ __name(() => ["succeeded", "failed", "canceled"].includes(state.status), "isDone"), + isStopped: /* @__PURE__ */ __name(() => resultPromise === void 0, "isStopped"), + stopPolling: /* @__PURE__ */ __name(() => { abortController.abort(); - }, - toString: () => JSON.stringify({ + }, "stopPolling"), + toString: /* @__PURE__ */ __name(() => JSON.stringify({ state - }), - onProgress: (callback) => { + }), "toString"), + onProgress: /* @__PURE__ */ __name((callback) => { const s = Symbol(); handlers.set(s, callback); return () => handlers.delete(s); - }, - pollUntilDone: (pollOptions) => resultPromise !== null && resultPromise !== void 0 ? resultPromise : resultPromise = (async () => { + }, "onProgress"), + pollUntilDone: /* @__PURE__ */ __name((pollOptions) => resultPromise !== null && resultPromise !== void 0 ? resultPromise : resultPromise = (async () => { const { abortSignal: inputAbortSignal } = pollOptions || {}; function abortListener() { abortController.abort(); } + __name(abortListener, "abortListener"); const abortSignal = abortController.signal; if (inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.aborted) { abortController.abort(); @@ -54843,7 +56518,7 @@ var require_poller = __commonJS({ } })().finally(() => { resultPromise = void 0; - }), + }), "pollUntilDone"), async poll(pollOptions) { if (resolveOnUnsuccessful) { if (poller.isDone()) @@ -54872,9 +56547,9 @@ var require_poller = __commonJS({ getError, updateState, options: pollOptions, - setDelay: (pollIntervalInMs) => { + setDelay: /* @__PURE__ */ __name((pollIntervalInMs) => { currentPollIntervalInMs = pollIntervalInMs; - }, + }, "setDelay"), setErrorAsResult: !resolveOnUnsuccessful }); await handleProgressEvents(); @@ -54891,6 +56566,7 @@ var require_poller = __commonJS({ return poller; }; } + __name(buildCreatePoller, "buildCreatePoller"); exports2.buildCreatePoller = buildCreatePoller; } }); @@ -54915,7 +56591,7 @@ var require_poller2 = __commonJS({ getError: operation_js_1.getErrorFromResponse, resolveOnUnsuccessful })({ - init: async () => { + init: /* @__PURE__ */ __name(async () => { const response = await lro.sendInitialRequest(); const config = (0, operation_js_1.inferLroMode)({ rawResponse: response.rawResponse, @@ -54924,7 +56600,7 @@ var require_poller2 = __commonJS({ resourceLocationConfig }); return Object.assign({ response, operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation }, (config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {}); - }, + }, "init"), poll: lro.sendPollRequest }, { intervalInMs, @@ -54934,6 +56610,7 @@ var require_poller2 = __commonJS({ processResult: processResult ? ({ flatResponse }, state) => processResult(flatResponse, state) : ({ flatResponse }) => flatResponse }); } + __name(createHttpPoller, "createHttpPoller"); exports2.createHttpPoller = createHttpPoller; } }); @@ -54946,23 +56623,26 @@ var require_operation3 = __commonJS({ exports2.GenericPollOperation = void 0; var operation_js_1 = require_operation2(); var logger_js_1 = require_logger(); - var createStateProxy = () => ({ - initState: (config) => ({ config, isStarted: true }), - setCanceled: (state) => state.isCancelled = true, - setError: (state, error) => state.error = error, - setResult: (state, result) => state.result = result, - setRunning: (state) => state.isStarted = true, - setSucceeded: (state) => state.isCompleted = true, - setFailed: () => { - }, - getError: (state) => state.error, - getResult: (state) => state.result, - isCanceled: (state) => !!state.isCancelled, - isFailed: (state) => !!state.error, - isRunning: (state) => !!state.isStarted, - isSucceeded: (state) => Boolean(state.isCompleted && !state.isCancelled && !state.error) - }); + var createStateProxy = /* @__PURE__ */ __name(() => ({ + initState: /* @__PURE__ */ __name((config) => ({ config, isStarted: true }), "initState"), + setCanceled: /* @__PURE__ */ __name((state) => state.isCancelled = true, "setCanceled"), + setError: /* @__PURE__ */ __name((state, error) => state.error = error, "setError"), + setResult: /* @__PURE__ */ __name((state, result) => state.result = result, "setResult"), + setRunning: /* @__PURE__ */ __name((state) => state.isStarted = true, "setRunning"), + setSucceeded: /* @__PURE__ */ __name((state) => state.isCompleted = true, "setSucceeded"), + setFailed: /* @__PURE__ */ __name(() => { + }, "setFailed"), + getError: /* @__PURE__ */ __name((state) => state.error, "getError"), + getResult: /* @__PURE__ */ __name((state) => state.result, "getResult"), + isCanceled: /* @__PURE__ */ __name((state) => !!state.isCancelled, "isCanceled"), + isFailed: /* @__PURE__ */ __name((state) => !!state.error, "isFailed"), + isRunning: /* @__PURE__ */ __name((state) => !!state.isStarted, "isRunning"), + isSucceeded: /* @__PURE__ */ __name((state) => Boolean(state.isCompleted && !state.isCancelled && !state.error), "isSucceeded") + }), "createStateProxy"); var GenericPollOperation = class { + static { + __name(this, "GenericPollOperation"); + } constructor(state, lro, setErrorAsResult, lroResourceLocationConfig, processResult, updateState, isDone) { this.state = state; this.lro = lro; @@ -54998,9 +56678,9 @@ var require_operation3 = __commonJS({ updateState: updateState ? (state, { rawResponse }) => updateState(state, rawResponse) : void 0, isDone: isDone ? ({ flatResponse }, state) => isDone(flatResponse, state) : void 0, options, - setDelay: (intervalInMs) => { + setDelay: /* @__PURE__ */ __name((intervalInMs) => { this.pollerConfig.intervalInMs = intervalInMs; - }, + }, "setDelay"), setErrorAsResult: this.setErrorAsResult }); } @@ -55031,6 +56711,9 @@ var require_poller3 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Poller = exports2.PollerCancelledError = exports2.PollerStoppedError = void 0; var PollerStoppedError = class _PollerStoppedError extends Error { + static { + __name(this, "PollerStoppedError"); + } constructor(message) { super(message); this.name = "PollerStoppedError"; @@ -55039,6 +56722,9 @@ var require_poller3 = __commonJS({ }; exports2.PollerStoppedError = PollerStoppedError; var PollerCancelledError = class _PollerCancelledError extends Error { + static { + __name(this, "PollerCancelledError"); + } constructor(message) { super(message); this.name = "PollerCancelledError"; @@ -55047,6 +56733,9 @@ var require_poller3 = __commonJS({ }; exports2.PollerCancelledError = PollerCancelledError; var Poller = class { + static { + __name(this, "Poller"); + } /** * A poller needs to be initialized by passing in at least the basic properties of the `PollOperation`. * @@ -55184,9 +56873,9 @@ var require_poller3 = __commonJS({ poll(options = {}) { if (!this.pollOncePromise) { this.pollOncePromise = this.pollOnce(options); - const clearPollOncePromise = () => { + const clearPollOncePromise = /* @__PURE__ */ __name(() => { this.pollOncePromise = void 0; - }; + }, "clearPollOncePromise"); this.pollOncePromise.then(clearPollOncePromise, clearPollOncePromise).catch(this.reject); } return this.pollOncePromise; @@ -55358,6 +57047,9 @@ var require_lroEngine = __commonJS({ var poller_js_1 = require_poller3(); var operation_js_2 = require_operation(); var LroEngine = class extends poller_js_1.Poller { + static { + __name(this, "LroEngine"); + } constructor(lro, options) { const { intervalInMs = constants_js_1.POLL_INTERVAL_IN_MS, resumeFrom, resolveOnUnsuccessful = false, isDone, lroResourceLocationConfig, processResult, updateState } = options || {}; const state = resumeFrom ? (0, operation_js_2.deserializeState)(resumeFrom) : {}; @@ -55385,9 +57077,9 @@ var require_lroEngine2 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.LroEngine = void 0; var lroEngine_js_1 = require_lroEngine(); - Object.defineProperty(exports2, "LroEngine", { enumerable: true, get: function() { + Object.defineProperty(exports2, "LroEngine", { enumerable: true, get: /* @__PURE__ */ __name(function() { return lroEngine_js_1.LroEngine; - } }); + }, "get") }); } }); @@ -55407,9 +57099,9 @@ var require_commonjs8 = __commonJS({ exports2.createHttpPoller = void 0; var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); var poller_js_1 = require_poller2(); - Object.defineProperty(exports2, "createHttpPoller", { enumerable: true, get: function() { + Object.defineProperty(exports2, "createHttpPoller", { enumerable: true, get: /* @__PURE__ */ __name(function() { return poller_js_1.createHttpPoller; - } }); + }, "get") }); tslib_1.__exportStar(require_lroEngine2(), exports2); tslib_1.__exportStar(require_poller3(), exports2); tslib_1.__exportStar(require_pollOperation(), exports2); @@ -55443,9 +57135,9 @@ var require_dist4 = __commonJS({ var d = Object.getOwnPropertyDescriptor(e, k); Object.defineProperty(n, k, d.get ? d : { enumerable: true, - get: function() { + get: /* @__PURE__ */ __name(function() { return e[k]; - } + }, "get") }); } }); @@ -55453,6 +57145,7 @@ var require_dist4 = __commonJS({ n["default"] = e; return Object.freeze(n); } + __name(_interopNamespace, "_interopNamespace"); var coreHttp__namespace = /* @__PURE__ */ _interopNamespace(coreHttp); var os__namespace = /* @__PURE__ */ _interopNamespace(os2); var fs__namespace = /* @__PURE__ */ _interopNamespace(fs); @@ -65434,6 +67127,9 @@ var require_dist4 = __commonJS({ } }; var Service = class { + static { + __name(this, "Service"); + } /** * Initialize a new instance of the class Service class. * @param client Reference to the service client @@ -65770,6 +67466,9 @@ var require_dist4 = __commonJS({ serializer: xmlSerializer$5 }; var Container = class { + static { + __name(this, "Container"); + } /** * Initialize a new instance of the class Container class. * @param client Reference to the service client @@ -66530,6 +68229,9 @@ var require_dist4 = __commonJS({ serializer: xmlSerializer$4 }; var Blob$1 = class { + static { + __name(this, "Blob$1"); + } /** * Initialize a new instance of the class Blob class. * @param client Reference to the service client @@ -67600,6 +69302,9 @@ var require_dist4 = __commonJS({ serializer: xmlSerializer$3 }; var PageBlob = class { + static { + __name(this, "PageBlob"); + } /** * Initialize a new instance of the class PageBlob class. * @param client Reference to the service client @@ -68089,6 +69794,9 @@ var require_dist4 = __commonJS({ serializer: xmlSerializer$2 }; var AppendBlob = class { + static { + __name(this, "AppendBlob"); + } /** * Initialize a new instance of the class AppendBlob class. * @param client Reference to the service client @@ -68321,6 +70029,9 @@ var require_dist4 = __commonJS({ serializer: xmlSerializer$1 }; var BlockBlob = class { + static { + __name(this, "BlockBlob"); + } /** * Initialize a new instance of the class BlockBlob class. * @param client Reference to the service client @@ -68931,6 +70642,7 @@ var require_dist4 = __commonJS({ urlParsed.setPath(path2); return urlParsed.toString(); } + __name(escapeURLPath, "escapeURLPath"); function getProxyUriFromDevConnString(connectionString) { let proxyUri = ""; if (connectionString.search("DevelopmentStorageProxyUri=") !== -1) { @@ -68943,6 +70655,7 @@ var require_dist4 = __commonJS({ } return proxyUri; } + __name(getProxyUriFromDevConnString, "getProxyUriFromDevConnString"); function getValueInConnString(connectionString, argument) { const elements = connectionString.split(";"); for (const element of elements) { @@ -68952,6 +70665,7 @@ var require_dist4 = __commonJS({ } return ""; } + __name(getValueInConnString, "getValueInConnString"); function extractConnectionStringParts(connectionString) { let proxyUri = ""; if (connectionString.startsWith("UseDevelopmentStorage=true")) { @@ -69005,9 +70719,11 @@ var require_dist4 = __commonJS({ return { kind: "SASConnString", url: blobEndpoint, accountName, accountSas }; } } + __name(extractConnectionStringParts, "extractConnectionStringParts"); function escape(text) { return encodeURIComponent(text).replace(/%2F/g, "/").replace(/'/g, "%27").replace(/\+/g, "%20").replace(/%25/g, "%"); } + __name(escape, "escape"); function appendToURLPath(url2, name) { const urlParsed = coreHttp.URLBuilder.parse(url2); let path2 = urlParsed.getPath(); @@ -69016,28 +70732,34 @@ var require_dist4 = __commonJS({ const normalizedUrl = new URL(urlParsed.toString()); return normalizedUrl.toString(); } + __name(appendToURLPath, "appendToURLPath"); function setURLParameter(url2, name, value) { const urlParsed = coreHttp.URLBuilder.parse(url2); urlParsed.setQueryParameter(name, value); return urlParsed.toString(); } + __name(setURLParameter, "setURLParameter"); function getURLParameter(url2, name) { const urlParsed = coreHttp.URLBuilder.parse(url2); return urlParsed.getQueryParameterValue(name); } + __name(getURLParameter, "getURLParameter"); function setURLHost(url2, host) { const urlParsed = coreHttp.URLBuilder.parse(url2); urlParsed.setHost(host); return urlParsed.toString(); } + __name(setURLHost, "setURLHost"); function getURLPath(url2) { const urlParsed = coreHttp.URLBuilder.parse(url2); return urlParsed.getPath(); } + __name(getURLPath, "getURLPath"); function getURLScheme(url2) { const urlParsed = coreHttp.URLBuilder.parse(url2); return urlParsed.getScheme(); } + __name(getURLScheme, "getURLScheme"); function getURLPathAndQuery(url2) { const urlParsed = coreHttp.URLBuilder.parse(url2); const pathString = urlParsed.getPath(); @@ -69051,6 +70773,7 @@ var require_dist4 = __commonJS({ } return `${pathString}${queryString}`; } + __name(getURLPathAndQuery, "getURLPathAndQuery"); function getURLQueries(url2) { let queryString = coreHttp.URLBuilder.parse(url2).getQuery(); if (!queryString) { @@ -69073,6 +70796,7 @@ var require_dist4 = __commonJS({ } return queries; } + __name(getURLQueries, "getURLQueries"); function appendToURLQuery(url2, queryParts) { const urlParsed = coreHttp.URLBuilder.parse(url2); let query = urlParsed.getQuery(); @@ -69084,13 +70808,16 @@ var require_dist4 = __commonJS({ urlParsed.setQuery(query); return urlParsed.toString(); } + __name(appendToURLQuery, "appendToURLQuery"); function truncatedISO8061Date(date, withMilliseconds = true) { const dateString = date.toISOString(); return withMilliseconds ? dateString.substring(0, dateString.length - 1) + "0000Z" : dateString.substring(0, dateString.length - 5) + "Z"; } + __name(truncatedISO8061Date, "truncatedISO8061Date"); function base64encode(content) { return !coreHttp.isNode ? btoa(content) : Buffer.from(content).toString("base64"); } + __name(base64encode, "base64encode"); function generateBlockID(blockIDPrefix, blockIndex) { const maxSourceStringLength = 48; const maxBlockIndexLength = 6; @@ -69101,27 +70828,29 @@ var require_dist4 = __commonJS({ const res = blockIDPrefix + padStart(blockIndex.toString(), maxSourceStringLength - blockIDPrefix.length, "0"); return base64encode(res); } + __name(generateBlockID, "generateBlockID"); async function delay(timeInMs, aborter, abortError) { return new Promise((resolve, reject) => { let timeout; - const abortHandler = () => { + const abortHandler = /* @__PURE__ */ __name(() => { if (timeout !== void 0) { clearTimeout(timeout); } reject(abortError); - }; - const resolveHandler = () => { + }, "abortHandler"); + const resolveHandler = /* @__PURE__ */ __name(() => { if (aborter !== void 0) { aborter.removeEventListener("abort", abortHandler); } resolve(); - }; + }, "resolveHandler"); timeout = setTimeout(resolveHandler, timeInMs); if (aborter !== void 0) { aborter.addEventListener("abort", abortHandler); } }); } + __name(delay, "delay"); function padStart(currentString, targetLength, padString = " ") { if (String.prototype.padStart) { return currentString.padStart(targetLength, padString); @@ -69137,9 +70866,11 @@ var require_dist4 = __commonJS({ return padString.slice(0, targetLength) + currentString; } } + __name(padStart, "padStart"); function iEqual(str1, str2) { return str1.toLocaleLowerCase() === str2.toLocaleLowerCase(); } + __name(iEqual, "iEqual"); function getAccountNameFromUrl(url2) { const parsedUrl = coreHttp.URLBuilder.parse(url2); let accountName; @@ -69156,6 +70887,7 @@ var require_dist4 = __commonJS({ throw new Error("Unable to extract accountName with provided information."); } } + __name(getAccountNameFromUrl, "getAccountNameFromUrl"); function isIpEndpointStyle(parsedUrl) { if (parsedUrl.getHost() === void 0) { return false; @@ -69163,6 +70895,7 @@ var require_dist4 = __commonJS({ const host = parsedUrl.getHost() + (parsedUrl.getPort() === void 0 ? "" : ":" + parsedUrl.getPort()); return /^.*:.*:.*$|^(localhost|host.docker.internal)(:[0-9]+)?$|^(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])){3}(:[0-9]+)?$/.test(host) || parsedUrl.getPort() !== void 0 && PathStylePorts.includes(parsedUrl.getPort()); } + __name(isIpEndpointStyle, "isIpEndpointStyle"); function toBlobTagsString(tags2) { if (tags2 === void 0) { return void 0; @@ -69176,6 +70909,7 @@ var require_dist4 = __commonJS({ } return tagPairs.join("&"); } + __name(toBlobTagsString, "toBlobTagsString"); function toBlobTags(tags2) { if (tags2 === void 0) { return void 0; @@ -69194,6 +70928,7 @@ var require_dist4 = __commonJS({ } return res; } + __name(toBlobTags, "toBlobTags"); function toTags(tags2) { if (tags2 === void 0) { return void 0; @@ -69204,6 +70939,7 @@ var require_dist4 = __commonJS({ } return res; } + __name(toTags, "toTags"); function toQuerySerialization(textConfiguration) { if (textConfiguration === void 0) { return void 0; @@ -69250,6 +70986,7 @@ var require_dist4 = __commonJS({ throw Error("Invalid BlobQueryTextConfiguration."); } } + __name(toQuerySerialization, "toQuerySerialization"); function parseObjectReplicationRecord(objectReplicationRecord) { if (!objectReplicationRecord) { return void 0; @@ -69280,13 +71017,16 @@ var require_dist4 = __commonJS({ } return orProperties; } + __name(parseObjectReplicationRecord, "parseObjectReplicationRecord"); function attachCredential(thing, credential) { thing.credential = credential; return thing; } + __name(attachCredential, "attachCredential"); function httpAuthorizationToString(httpAuthorization) { return httpAuthorization ? httpAuthorization.scheme + " " + httpAuthorization.value : void 0; } + __name(httpAuthorizationToString, "httpAuthorizationToString"); function BlobNameToString(name) { if (name.encoded) { return decodeURIComponent(name.content); @@ -69294,6 +71034,7 @@ var require_dist4 = __commonJS({ return name.content; } } + __name(BlobNameToString, "BlobNameToString"); function ConvertInternalResponseOfListBlobFlat(internalResponse) { return Object.assign(Object.assign({}, internalResponse), { segment: { blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => { @@ -69302,6 +71043,7 @@ var require_dist4 = __commonJS({ }) } }); } + __name(ConvertInternalResponseOfListBlobFlat, "ConvertInternalResponseOfListBlobFlat"); function ConvertInternalResponseOfListBlobHierarchy(internalResponse) { var _a; return Object.assign(Object.assign({}, internalResponse), { segment: { @@ -69315,6 +71057,7 @@ var require_dist4 = __commonJS({ }) } }); } + __name(ConvertInternalResponseOfListBlobHierarchy, "ConvertInternalResponseOfListBlobHierarchy"); function* ExtractPageRangeInfoItems(getPageRangesSegment) { let pageRange = []; let clearRange = []; @@ -69356,6 +71099,7 @@ var require_dist4 = __commonJS({ }; } } + __name(ExtractPageRangeInfoItems, "ExtractPageRangeInfoItems"); function EscapePath(blobName) { const split = blobName.split("/"); for (let i = 0; i < split.length; i++) { @@ -69363,7 +71107,11 @@ var require_dist4 = __commonJS({ } return split.join("/"); } + __name(EscapePath, "EscapePath"); var StorageBrowserPolicy = class extends coreHttp.BaseRequestPolicy { + static { + __name(this, "StorageBrowserPolicy"); + } /** * Creates an instance of StorageBrowserPolicy. * @param nextPolicy - @@ -69392,6 +71140,9 @@ var require_dist4 = __commonJS({ } }; var StorageBrowserPolicyFactory = class { + static { + __name(this, "StorageBrowserPolicyFactory"); + } /** * Creates a StorageBrowserPolicyFactory object. * @@ -69418,6 +71169,9 @@ var require_dist4 = __commonJS({ }; var RETRY_ABORT_ERROR = new abortController.AbortError("The operation was aborted."); var StorageRetryPolicy = class extends coreHttp.BaseRequestPolicy { + static { + __name(this, "StorageRetryPolicy"); + } /** * Creates an instance of RetryPolicy. * @@ -69556,6 +71310,9 @@ var require_dist4 = __commonJS({ } }; var StorageRetryPolicyFactory = class { + static { + __name(this, "StorageRetryPolicyFactory"); + } /** * Creates an instance of StorageRetryPolicyFactory. * @param retryOptions - @@ -69574,6 +71331,9 @@ var require_dist4 = __commonJS({ } }; var CredentialPolicy = class extends coreHttp.BaseRequestPolicy { + static { + __name(this, "CredentialPolicy"); + } /** * Sends out request. * @@ -69593,6 +71353,9 @@ var require_dist4 = __commonJS({ } }; var AnonymousCredentialPolicy = class extends CredentialPolicy { + static { + __name(this, "AnonymousCredentialPolicy"); + } /** * Creates an instance of AnonymousCredentialPolicy. * @param nextPolicy - @@ -69605,6 +71368,9 @@ var require_dist4 = __commonJS({ } }; var Credential = class { + static { + __name(this, "Credential"); + } /** * Creates a RequestPolicy object. * @@ -69616,6 +71382,9 @@ var require_dist4 = __commonJS({ } }; var AnonymousCredential = class extends Credential { + static { + __name(this, "AnonymousCredential"); + } /** * Creates an {@link AnonymousCredentialPolicy} object. * @@ -69627,6 +71396,9 @@ var require_dist4 = __commonJS({ } }; var TelemetryPolicy = class extends coreHttp.BaseRequestPolicy { + static { + __name(this, "TelemetryPolicy"); + } /** * Creates an instance of TelemetryPolicy. * @param nextPolicy - @@ -69655,6 +71427,9 @@ var require_dist4 = __commonJS({ } }; var TelemetryPolicyFactory = class { + static { + __name(this, "TelemetryPolicyFactory"); + } /** * Creates an instance of TelemetryPolicyFactory. * @param telemetry - @@ -69696,6 +71471,7 @@ var require_dist4 = __commonJS({ function getCachedDefaultHttpClient() { return _defaultHttpClient; } + __name(getCachedDefaultHttpClient, "getCachedDefaultHttpClient"); var Constants = { DefaultScope: "/.default", /** @@ -69730,6 +71506,7 @@ var require_dist4 = __commonJS({ return finalToken; } } + __name(tryGetAccessToken, "tryGetAccessToken"); let token = await tryGetAccessToken(); while (token === null) { await coreHttp.delay(retryIntervalInMs); @@ -69737,6 +71514,7 @@ var require_dist4 = __commonJS({ } return token; } + __name(beginRefresh, "beginRefresh"); function createTokenCycler(credential, scopes, tokenCyclerOptions) { let refreshWorker = null; let token = null; @@ -69767,7 +71545,7 @@ var require_dist4 = __commonJS({ function refresh(getTokenOptions) { var _a; if (!cycler.isRefreshing) { - const tryGetAccessToken = () => credential.getToken(scopes, getTokenOptions); + const tryGetAccessToken = /* @__PURE__ */ __name(() => credential.getToken(scopes, getTokenOptions), "tryGetAccessToken"); refreshWorker = beginRefresh( tryGetAccessToken, options.retryIntervalInMs, @@ -69785,6 +71563,7 @@ var require_dist4 = __commonJS({ } return refreshWorker; } + __name(refresh, "refresh"); return async (tokenOptions) => { if (cycler.mustRefresh) return refresh(tokenOptions); @@ -69794,6 +71573,7 @@ var require_dist4 = __commonJS({ return token; }; } + __name(createTokenCycler, "createTokenCycler"); function getChallenge(response) { const challenge = response.headers.get("WWW-Authenticate"); if (response.status === 401 && challenge) { @@ -69801,15 +71581,20 @@ var require_dist4 = __commonJS({ } return; } + __name(getChallenge, "getChallenge"); function parseChallenge(challenge) { const bearerChallenge = challenge.slice("Bearer ".length); const challengeParts = `${bearerChallenge.trim()} `.split(" ").filter((x) => x); const keyValuePairs = challengeParts.map((keyValue) => (([key, value]) => ({ [key]: value }))(keyValue.trim().split("="))); return keyValuePairs.reduce((a, b) => Object.assign(Object.assign({}, a), b), {}); } + __name(parseChallenge, "parseChallenge"); function storageBearerTokenChallengeAuthenticationPolicy(credential, scopes) { let getToken = createTokenCycler(credential, scopes); class StorageBearerTokenChallengeAuthenticationPolicy extends coreHttp.BaseRequestPolicy { + static { + __name(this, "StorageBearerTokenChallengeAuthenticationPolicy"); + } constructor(nextPolicy, options) { super(nextPolicy, options); } @@ -69851,11 +71636,12 @@ var require_dist4 = __commonJS({ } } return { - create: (nextPolicy, options) => { + create: /* @__PURE__ */ __name((nextPolicy, options) => { return new StorageBearerTokenChallengeAuthenticationPolicy(nextPolicy, options); - } + }, "create") }; } + __name(storageBearerTokenChallengeAuthenticationPolicy, "storageBearerTokenChallengeAuthenticationPolicy"); function isPipelineLike(pipeline) { if (!pipeline || typeof pipeline !== "object") { return false; @@ -69863,7 +71649,11 @@ var require_dist4 = __commonJS({ const castPipeline = pipeline; return Array.isArray(castPipeline.factories) && typeof castPipeline.options === "object" && typeof castPipeline.toServiceClientOptions === "function"; } + __name(isPipelineLike, "isPipelineLike"); var Pipeline = class { + static { + __name(this, "Pipeline"); + } /** * Creates an instance of Pipeline. Customize HTTPClient by implementing IHttpClient interface. * @@ -69917,7 +71707,11 @@ var require_dist4 = __commonJS({ factories.push(coreHttp.isTokenCredential(credential) ? attachCredential(storageBearerTokenChallengeAuthenticationPolicy(credential, (_a = pipelineOptions.audience) !== null && _a !== void 0 ? _a : StorageOAuthScopes), credential) : credential); return new Pipeline(factories, pipelineOptions); } + __name(newPipeline, "newPipeline"); var StorageSharedKeyCredentialPolicy = class extends CredentialPolicy { + static { + __name(this, "StorageSharedKeyCredentialPolicy"); + } /** * Creates an instance of StorageSharedKeyCredentialPolicy. * @param nextPolicy - @@ -70036,6 +71830,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }; var StorageSharedKeyCredential = class extends Credential { + static { + __name(this, "StorageSharedKeyCredential"); + } /** * Creates an instance of StorageSharedKeyCredential. * @param accountName - @@ -70067,6 +71864,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; var packageName = "azure-storage-blob"; var packageVersion = "12.17.0"; var StorageClientContext = class extends coreHttp__namespace.ServiceClient { + static { + __name(this, "StorageClientContext"); + } /** * Initializes a new instance of the StorageClientContext class. * @param url The URL of the service account, container, or blob that is the target of the desired @@ -70092,6 +71892,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }; var StorageClient = class { + static { + __name(this, "StorageClient"); + } /** * Creates an instance of StorageClient. * @param url - url to resource @@ -70127,7 +71930,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; tracingContext: (_b = options === null || options === void 0 ? void 0 : options.tracingOptions) === null || _b === void 0 ? void 0 : _b.tracingContext }; } + __name(convertTracingToRequestOptionsBase, "convertTracingToRequestOptionsBase"); var BlobSASPermissions = class _BlobSASPermissions { + static { + __name(this, "BlobSASPermissions"); + } constructor() { this.read = false; this.add = false; @@ -70278,6 +72085,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }; var ContainerSASPermissions = class _ContainerSASPermissions { + static { + __name(this, "ContainerSASPermissions"); + } constructor() { this.read = false; this.add = false; @@ -70450,6 +72260,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }; var UserDelegationKeyCredential = class { + static { + __name(this, "UserDelegationKeyCredential"); + } /** * Creates an instance of UserDelegationKeyCredential. * @param accountName - @@ -70472,12 +72285,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; function ipRangeToString(ipRange) { return ipRange.end ? `${ipRange.start}-${ipRange.end}` : ipRange.start; } + __name(ipRangeToString, "ipRangeToString"); exports2.SASProtocol = void 0; (function(SASProtocol) { SASProtocol["Https"] = "https"; SASProtocol["HttpsAndHttp"] = "https,http"; })(exports2.SASProtocol || (exports2.SASProtocol = {})); var SASQueryParameters = class { + static { + __name(this, "SASQueryParameters"); + } constructor(version3, signature, permissionsOrOptions, services, resourceTypes, protocol, startsOn, expiresOn2, ipRange, identifier, resource, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType2, userDelegationKey, preauthorizedAgentObjectId, correlationId, encryptionScope2) { this.version = version3; this.signature = signature; @@ -70718,6 +72535,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } throw new RangeError("'version' must be >= '2015-04-05'."); } + __name(generateBlobSASQueryParameters, "generateBlobSASQueryParameters"); function generateBlobSASQueryParameters20150405(blobSASSignatureValues, sharedKeyCredential) { blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); if (!blobSASSignatureValues.identifier && !(blobSASSignatureValues.permissions && blobSASSignatureValues.expiresOn)) { @@ -70753,6 +72571,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType); } + __name(generateBlobSASQueryParameters20150405, "generateBlobSASQueryParameters20150405"); function generateBlobSASQueryParameters20181109(blobSASSignatureValues, sharedKeyCredential) { blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); if (!blobSASSignatureValues.identifier && !(blobSASSignatureValues.permissions && blobSASSignatureValues.expiresOn)) { @@ -70797,6 +72616,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType); } + __name(generateBlobSASQueryParameters20181109, "generateBlobSASQueryParameters20181109"); function generateBlobSASQueryParameters20201206(blobSASSignatureValues, sharedKeyCredential) { blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); if (!blobSASSignatureValues.identifier && !(blobSASSignatureValues.permissions && blobSASSignatureValues.expiresOn)) { @@ -70842,6 +72662,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, void 0, void 0, void 0, blobSASSignatureValues.encryptionScope); } + __name(generateBlobSASQueryParameters20201206, "generateBlobSASQueryParameters20201206"); function generateBlobSASQueryParametersUDK20181109(blobSASSignatureValues, userDelegationKeyCredential) { blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); if (!blobSASSignatureValues.permissions || !blobSASSignatureValues.expiresOn) { @@ -70891,6 +72712,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey); } + __name(generateBlobSASQueryParametersUDK20181109, "generateBlobSASQueryParametersUDK20181109"); function generateBlobSASQueryParametersUDK20200210(blobSASSignatureValues, userDelegationKeyCredential) { blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); if (!blobSASSignatureValues.permissions || !blobSASSignatureValues.expiresOn) { @@ -70943,6 +72765,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId); } + __name(generateBlobSASQueryParametersUDK20200210, "generateBlobSASQueryParametersUDK20200210"); function generateBlobSASQueryParametersUDK20201206(blobSASSignatureValues, userDelegationKeyCredential) { blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); if (!blobSASSignatureValues.permissions || !blobSASSignatureValues.expiresOn) { @@ -70996,6 +72819,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId, blobSASSignatureValues.encryptionScope); } + __name(generateBlobSASQueryParametersUDK20201206, "generateBlobSASQueryParametersUDK20201206"); function getCanonicalName(accountName, containerName, blobName) { const elements = [`/blob/${accountName}/${containerName}`]; if (blobName) { @@ -71003,6 +72827,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return elements.join(""); } + __name(getCanonicalName, "getCanonicalName"); function SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues) { const version3 = blobSASSignatureValues.version ? blobSASSignatureValues.version : SERVICE_VERSION; if (blobSASSignatureValues.snapshotTime && version3 < "2018-11-09") { @@ -71044,7 +72869,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; blobSASSignatureValues.version = version3; return blobSASSignatureValues; } + __name(SASSignatureValuesSanityCheckAndAutofill, "SASSignatureValuesSanityCheckAndAutofill"); var BlobLeaseClient = class { + static { + __name(this, "BlobLeaseClient"); + } /** * Creates an instance of BlobLeaseClient. * @param client - The client to make the lease operation requests. @@ -71228,6 +73057,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }; var RetriableReadableStream = class extends stream.Readable { + static { + __name(this, "RetriableReadableStream"); + } /** * Creates an instance of RetriableReadableStream. * @@ -71312,6 +73144,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }; var BlobDownloadResponse = class { + static { + __name(this, "BlobDownloadResponse"); + } /** * Creates an instance of BlobDownloadResponse. * @@ -71764,6 +73599,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; var AVRO_CODEC_KEY = "avro.codec"; var AVRO_SCHEMA_KEY = "avro.schema"; var AvroParser = class _AvroParser { + static { + __name(this, "AvroParser"); + } /** * Reads a fixed number of bytes from the stream. * @@ -71864,9 +73702,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return { key, value }; } static async readMap(stream2, readItemMethod, options = {}) { - const readPairMethod = (s, opts = {}) => { + const readPairMethod = /* @__PURE__ */ __name((s, opts = {}) => { return _AvroParser.readMapPair(s, readItemMethod, opts); - }; + }, "readPairMethod"); const pairs = await _AvroParser.readArray(stream2, readPairMethod, options); const dict = {}; for (const pair of pairs) { @@ -71910,6 +73748,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; AvroPrimitive2["STRING"] = "string"; })(AvroPrimitive || (AvroPrimitive = {})); var AvroType = class _AvroType { + static { + __name(this, "AvroType"); + } /** * Determines the AvroType from the Avro Schema. */ @@ -71983,6 +73824,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }; var AvroPrimitiveType = class extends AvroType { + static { + __name(this, "AvroPrimitiveType"); + } constructor(primitive) { super(); this._primitive = primitive; @@ -72011,6 +73855,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }; var AvroEnumType = class extends AvroType { + static { + __name(this, "AvroEnumType"); + } constructor(symbols) { super(); this._symbols = symbols; @@ -72021,6 +73868,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }; var AvroUnionType = class extends AvroType { + static { + __name(this, "AvroUnionType"); + } constructor(types) { super(); this._types = types; @@ -72031,18 +73881,24 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }; var AvroMapType = class extends AvroType { + static { + __name(this, "AvroMapType"); + } constructor(itemType) { super(); this._itemType = itemType; } read(stream2, options = {}) { - const readItemMethod = (s, opts) => { + const readItemMethod = /* @__PURE__ */ __name((s, opts) => { return this._itemType.read(s, opts); - }; + }, "readItemMethod"); return AvroParser.readMap(stream2, readItemMethod, options); } }; var AvroRecordType = class extends AvroType { + static { + __name(this, "AvroRecordType"); + } constructor(fields, name) { super(); this._fields = fields; @@ -72072,7 +73928,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return true; } + __name(arraysEqual, "arraysEqual"); var AvroReader = class { + static { + __name(this, "AvroReader"); + } constructor(dataStream, headerStream, currentBlockOffset, indexWithinCurrentBlock) { this._dataStream = dataStream; this._headerStream = headerStream || dataStream; @@ -72125,7 +73985,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return !this._initialized || this._itemsRemainingInBlock > 0; } parseObjects(options = {}) { - return tslib.__asyncGenerator(this, arguments, function* parseObjects_1() { + return tslib.__asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* parseObjects_1() { if (!this._initialized) { yield tslib.__await(this.initialize(options)); } @@ -72157,13 +74017,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } yield yield tslib.__await(result); } - }); + }, "parseObjects_1")); } }; var AvroReadable = class { + static { + __name(this, "AvroReadable"); + } }; var ABORT_ERROR = new abortController.AbortError("Reading from the avro stream was aborted."); var AvroReadableFromStream = class extends AvroReadable { + static { + __name(this, "AvroReadableFromStream"); + } constructor(readable) { super(); this._readable = readable; @@ -72198,7 +74064,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return this.toUint8Array(chunk); } else { return new Promise((resolve, reject) => { - const cleanUp = () => { + const cleanUp = /* @__PURE__ */ __name(() => { this._readable.removeListener("readable", readableCallback); this._readable.removeListener("error", rejectCallback); this._readable.removeListener("end", rejectCallback); @@ -72206,23 +74072,23 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (options.abortSignal) { options.abortSignal.removeEventListener("abort", abortHandler); } - }; - const readableCallback = () => { + }, "cleanUp"); + const readableCallback = /* @__PURE__ */ __name(() => { const callbackChunk = this._readable.read(size); if (callbackChunk) { this._position += callbackChunk.length; cleanUp(); resolve(this.toUint8Array(callbackChunk)); } - }; - const rejectCallback = () => { + }, "readableCallback"); + const rejectCallback = /* @__PURE__ */ __name(() => { cleanUp(); reject(); - }; - const abortHandler = () => { + }, "rejectCallback"); + const abortHandler = /* @__PURE__ */ __name(() => { cleanUp(); reject(ABORT_ERROR); - }; + }, "abortHandler"); this._readable.on("readable", readableCallback); this._readable.once("error", rejectCallback); this._readable.once("end", rejectCallback); @@ -72235,6 +74101,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }; var BlobQuickQueryStream = class extends stream.Readable { + static { + __name(this, "BlobQuickQueryStream"); + } /** * Creates an instance of BlobQuickQueryStream. * @@ -72336,6 +74205,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }; var BlobQueryResponse = class { + static { + __name(this, "BlobQueryResponse"); + } /** * Creates an instance of BlobQueryResponse. * @@ -72718,6 +74590,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return tier2; } + __name(toAccessTier, "toAccessTier"); function ensureCpkIfSpecified(cpk, isHttps) { if (cpk && !isHttps) { throw new RangeError("Customer-provided encryption key must be used over HTTPS."); @@ -72726,6 +74599,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; cpk.encryptionAlgorithm = EncryptionAlgorithmAES25; } } + __name(ensureCpkIfSpecified, "ensureCpkIfSpecified"); exports2.StorageBlobAudience = void 0; (function(StorageBlobAudience) { StorageBlobAudience["StorageOAuthScopes"] = "https://storage.azure.com/.default"; @@ -72734,6 +74608,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; function getBlobServiceAccountAudience(storageAccountName) { return `https://${storageAccountName}.blob.core.windows.net/.default`; } + __name(getBlobServiceAccountAudience, "getBlobServiceAccountAudience"); function rangeResponseFromModel(response) { const pageRange = (response._response.parsedBody.pageRange || []).map((x) => ({ offset: x.start, @@ -72752,7 +74627,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }) }); } + __name(rangeResponseFromModel, "rangeResponseFromModel"); var BlobBeginCopyFromUrlPoller = class extends coreLro.Poller { + static { + __name(this, "BlobBeginCopyFromUrlPoller"); + } constructor(options) { const { blobClient, copySource: copySource2, intervalInMs = 15e3, onProgress, resumeFrom, startCopyFromURLOptions } = options; let state; @@ -72774,7 +74653,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return coreHttp.delay(this.intervalInMs); } }; - var cancel = async function cancel2(options = {}) { + var cancel = /* @__PURE__ */ __name(async function cancel2(options = {}) { const state = this.state; const { copyId: copyId2 } = state; if (state.isCompleted) { @@ -72789,8 +74668,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }); state.isCancelled = true; return makeBlobBeginCopyFromURLPollOperation(state); - }; - var update = async function update2(options = {}) { + }, "cancel"); + var update = /* @__PURE__ */ __name(async function update2(options = {}) { const state = this.state; const { blobClient, copySource: copySource2, startCopyFromURLOptions } = state; if (!state.isStarted) { @@ -72824,15 +74703,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } return makeBlobBeginCopyFromURLPollOperation(state); - }; - var toString = function toString2() { + }, "update"); + var toString = /* @__PURE__ */ __name(function toString2() { return JSON.stringify({ state: this.state }, (key, value) => { if (key === "blobClient") { return void 0; } return value; }); - }; + }, "toString"); function makeBlobBeginCopyFromURLPollOperation(state) { return { state: Object.assign({}, state), @@ -72841,6 +74720,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; update }; } + __name(makeBlobBeginCopyFromURLPollOperation, "makeBlobBeginCopyFromURLPollOperation"); function rangeToString(iRange) { if (iRange.offset < 0) { throw new RangeError(`Range.offset cannot be smaller than 0.`); @@ -72850,12 +74730,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return iRange.count ? `bytes=${iRange.offset}-${iRange.offset + iRange.count - 1}` : `bytes=${iRange.offset}-`; } + __name(rangeToString, "rangeToString"); var BatchStates; (function(BatchStates2) { BatchStates2[BatchStates2["Good"] = 0] = "Good"; BatchStates2[BatchStates2["Error"] = 1] = "Error"; })(BatchStates || (BatchStates = {})); var Batch = class { + static { + __name(this, "Batch"); + } /** * Creates an instance of Batch. * @param concurrency - @@ -72941,6 +74825,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }; var BuffersStream = class extends stream.Readable { + static { + __name(this, "BuffersStream"); + } /** * Creates an instance of BuffersStream that will emit the data * contained in the array of buffers. @@ -73010,6 +74897,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }; var maxBufferLength = require("buffer").constants.MAX_LENGTH; var PooledBuffer = class { + static { + __name(this, "PooledBuffer"); + } constructor(capacity, buffers, totalLength) { this.buffers = []; this.capacity = capacity; @@ -73074,6 +74964,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }; var BufferScheduler = class { + static { + __name(this, "BufferScheduler"); + } /** * Creates an instance of BufferScheduler. * @@ -73290,6 +75183,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }); }); } + __name(streamToBuffer, "streamToBuffer"); async function streamToBuffer2(stream2, buffer, encoding) { let pos = 0; const bufferSize = buffer.length; @@ -73315,6 +75209,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; stream2.on("error", reject); }); } + __name(streamToBuffer2, "streamToBuffer2"); async function readStreamToLocalFile(rs, file) { return new Promise((resolve, reject) => { const ws = fs__namespace.createWriteStream(file); @@ -73328,9 +75223,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; rs.pipe(ws); }); } + __name(readStreamToLocalFile, "readStreamToLocalFile"); var fsStat = util__namespace.promisify(fs__namespace.stat); var fsCreateReadStream = fs__namespace.createReadStream; var BlobClient = class _BlobClient extends StorageClient { + static { + __name(this, "BlobClient"); + } constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { options = options || {}; let pipeline; @@ -73905,9 +75804,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async beginCopyFromURL(copySource2, options = {}) { const client = { - abortCopyFromURL: (...args) => this.abortCopyFromURL(...args), - getProperties: (...args) => this.getProperties(...args), - startCopyFromURL: (...args) => this.startCopyFromURL(...args) + abortCopyFromURL: /* @__PURE__ */ __name((...args) => this.abortCopyFromURL(...args), "abortCopyFromURL"), + getProperties: /* @__PURE__ */ __name((...args) => this.getProperties(...args), "getProperties"), + startCopyFromURL: /* @__PURE__ */ __name((...args) => this.startCopyFromURL(...args), "startCopyFromURL") }; const poller = new BlobBeginCopyFromUrlPoller({ blobClient: client, @@ -74263,6 +76162,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }; var AppendBlobClient = class _AppendBlobClient extends BlobClient { + static { + __name(this, "AppendBlobClient"); + } constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { let pipeline; let url2; @@ -74480,6 +76382,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }; var BlockBlobClient = class _BlockBlobClient extends BlobClient { + static { + __name(this, "BlockBlobClient"); + } constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { let pipeline; let url2; @@ -75078,6 +76983,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }; var PageBlobClient = class _PageBlobClient extends BlobClient { + static { + __name(this, "PageBlobClient"); + } constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { let pipeline; let url2; @@ -75344,7 +77252,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to List Page Ranges operation. */ listPageRangeItemSegments(offset = 0, count, marker2, options = {}) { - return tslib.__asyncGenerator(this, arguments, function* listPageRangeItemSegments_1() { + return tslib.__asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* listPageRangeItemSegments_1() { let getPageRangeItemSegmentsResponse; if (!!marker2 || marker2 === void 0) { do { @@ -75353,7 +77261,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; yield yield tslib.__await(yield tslib.__await(getPageRangeItemSegmentsResponse)); } while (marker2); } - }); + }, "listPageRangeItemSegments_1")); } /** * Returns an AsyncIterableIterator of {@link PageRangeInfo} objects @@ -75363,7 +77271,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to List Page Ranges operation. */ listPageRangeItems(offset = 0, count, options = {}) { - return tslib.__asyncGenerator(this, arguments, function* listPageRangeItems_1() { + return tslib.__asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* listPageRangeItems_1() { var e_1, _a; let marker2; try { @@ -75380,7 +77288,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (e_1) throw e_1.error; } } - }); + }, "listPageRangeItems_1")); } /** * Returns an async iterable iterator to list of page ranges for a page blob. @@ -75472,9 +77380,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Return an AsyncIterableIterator that works a page at a time */ - byPage: (settings = {}) => { + byPage: /* @__PURE__ */ __name((settings = {}) => { return this.listPageRangeItemSegments(offset, count, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, options)); - } + }, "byPage") }; } /** @@ -75552,7 +77460,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to the Page Blob Get Page Ranges Diff operation. */ listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker2, options) { - return tslib.__asyncGenerator(this, arguments, function* listPageRangeDiffItemSegments_1() { + return tslib.__asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* listPageRangeDiffItemSegments_1() { let getPageRangeItemSegmentsResponse; if (!!marker2 || marker2 === void 0) { do { @@ -75561,7 +77469,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; yield yield tslib.__await(yield tslib.__await(getPageRangeItemSegmentsResponse)); } while (marker2); } - }); + }, "listPageRangeDiffItemSegments_1")); } /** * Returns an AsyncIterableIterator of {@link PageRangeInfo} objects @@ -75572,7 +77480,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to the Page Blob Get Page Ranges Diff operation. */ listPageRangeDiffItems(offset, count, prevSnapshotOrUrl, options) { - return tslib.__asyncGenerator(this, arguments, function* listPageRangeDiffItems_1() { + return tslib.__asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* listPageRangeDiffItems_1() { var e_2, _a; let marker2; try { @@ -75589,7 +77497,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (e_2) throw e_2.error; } } - }); + }, "listPageRangeDiffItems_1")); } /** * Returns an async iterable iterator to list of page ranges that differ between a specified snapshot and this page blob. @@ -75682,9 +77590,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Return an AsyncIterableIterator that works a page at a time */ - byPage: (settings = {}) => { + byPage: /* @__PURE__ */ __name((settings = {}) => { return this.listPageRangeDiffItemSegments(offset, count, prevSnapshot, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, options)); - } + }, "byPage") }; } /** @@ -75797,13 +77705,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; buffer = buffer.slice(0, responseLength); return buffer.toString(); } + __name(getBodyAsText, "getBodyAsText"); function utf8ByteLength(str) { return Buffer.byteLength(str); } + __name(utf8ByteLength, "utf8ByteLength"); var HTTP_HEADER_DELIMITER = ": "; var SPACE_DELIMITER = " "; var NOT_FOUND = -1; var BatchResponseParser = class { + static { + __name(this, "BatchResponseParser"); + } constructor(batchResponse, subRequests) { if (!batchResponse || !batchResponse.contentType) { throw new RangeError("batchResponse is malformed or doesn't contain valid content-type."); @@ -75901,6 +77814,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; MutexLockStatus2[MutexLockStatus2["UNLOCKED"] = 1] = "UNLOCKED"; })(MutexLockStatus || (MutexLockStatus = {})); var Mutex = class { + static { + __name(this, "Mutex"); + } /** * Lock for a specific key. If the lock has been acquired by another customer, then * will wait until getting the lock. @@ -75953,6 +77869,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; Mutex.keys = {}; Mutex.listeners = {}; var BlobBatch = class { + static { + __name(this, "BlobBatch"); + } constructor() { this.batch = "batch"; this.batchRequest = new InnerBatchRequest(); @@ -76070,6 +77989,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }; var InnerBatchRequest = class { + static { + __name(this, "InnerBatchRequest"); + } constructor() { this.operationCount = 0; this.body = ""; @@ -76137,6 +78059,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }; var BatchRequestAssemblePolicy = class extends coreHttp.BaseRequestPolicy { + static { + __name(this, "BatchRequestAssemblePolicy"); + } constructor(batchRequest, nextPolicy, options) { super(nextPolicy, options); this.dummyResponse = { @@ -76152,6 +78077,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }; var BatchRequestAssemblePolicyFactory = class { + static { + __name(this, "BatchRequestAssemblePolicyFactory"); + } constructor(batchRequest) { this.batchRequest = batchRequest; } @@ -76160,6 +78088,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }; var BatchHeaderFilterPolicy = class extends coreHttp.BaseRequestPolicy { + static { + __name(this, "BatchHeaderFilterPolicy"); + } // The base class has a protected constructor. Adding a public one to enable constructing of this class. /* eslint-disable-next-line @typescript-eslint/no-useless-constructor*/ constructor(nextPolicy, options) { @@ -76179,11 +78110,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }; var BatchHeaderFilterPolicyFactory = class { + static { + __name(this, "BatchHeaderFilterPolicyFactory"); + } create(nextPolicy, options) { return new BatchHeaderFilterPolicy(nextPolicy, options); } }; var BlobBatchClient = class { + static { + __name(this, "BlobBatchClient"); + } constructor(url2, credentialOrPipeline, options) { let pipeline; if (isPipelineLike(credentialOrPipeline)) { @@ -76299,6 +78236,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }; var ContainerClient = class extends StorageClient { + static { + __name(this, "ContainerClient"); + } constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, options) { let pipeline; let url2; @@ -76856,7 +78796,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to list blobs operation. */ listSegments(marker2, options = {}) { - return tslib.__asyncGenerator(this, arguments, function* listSegments_1() { + return tslib.__asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* listSegments_1() { let listBlobsFlatSegmentResponse; if (!!marker2 || marker2 === void 0) { do { @@ -76865,7 +78805,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; yield yield tslib.__await(yield tslib.__await(listBlobsFlatSegmentResponse)); } while (marker2); } - }); + }, "listSegments_1")); } /** * Returns an AsyncIterableIterator of {@link BlobItem} objects @@ -76873,7 +78813,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to list blobs operation. */ listItems(options = {}) { - return tslib.__asyncGenerator(this, arguments, function* listItems_1() { + return tslib.__asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* listItems_1() { var e_1, _a; let marker2; try { @@ -76890,7 +78830,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (e_1) throw e_1.error; } } - }); + }, "listItems_1")); } /** * Returns an async iterable iterator to list all the blobs @@ -77015,9 +78955,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Return an AsyncIterableIterator that works a page at a time */ - byPage: (settings = {}) => { + byPage: /* @__PURE__ */ __name((settings = {}) => { return this.listSegments(settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, updatedOptions)); - } + }, "byPage") }; } /** @@ -77034,7 +78974,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to list blobs operation. */ listHierarchySegments(delimiter2, marker2, options = {}) { - return tslib.__asyncGenerator(this, arguments, function* listHierarchySegments_1() { + return tslib.__asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* listHierarchySegments_1() { let listBlobsHierarchySegmentResponse; if (!!marker2 || marker2 === void 0) { do { @@ -77043,7 +78983,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; yield yield tslib.__await(yield tslib.__await(listBlobsHierarchySegmentResponse)); } while (marker2); } - }); + }, "listHierarchySegments_1")); } /** * Returns an AsyncIterableIterator for {@link BlobPrefix} and {@link BlobItem} objects. @@ -77052,7 +78992,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to list blobs operation. */ listItemsByHierarchy(delimiter2, options = {}) { - return tslib.__asyncGenerator(this, arguments, function* listItemsByHierarchy_1() { + return tslib.__asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* listItemsByHierarchy_1() { var e_2, _a; let marker2; try { @@ -77077,7 +79017,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (e_2) throw e_2.error; } } - }); + }, "listItemsByHierarchy_1")); } /** * Returns an async iterable iterator to list all the blobs by hierarchy. @@ -77213,9 +79153,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Return an AsyncIterableIterator that works a page at a time */ - byPage: (settings = {}) => { + byPage: /* @__PURE__ */ __name((settings = {}) => { return this.listHierarchySegments(delimiter2, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, updatedOptions)); - } + }, "byPage") }; } /** @@ -77275,7 +79215,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to find blobs by tags. */ findBlobsByTagsSegments(tagFilterSqlExpression, marker2, options = {}) { - return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsSegments_1() { + return tslib.__asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* findBlobsByTagsSegments_1() { let response; if (!!marker2 || marker2 === void 0) { do { @@ -77285,7 +79225,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; yield yield tslib.__await(response); } while (marker2); } - }); + }, "findBlobsByTagsSegments_1")); } /** * Returns an AsyncIterableIterator for blobs. @@ -77297,7 +79237,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to findBlobsByTagsItems. */ findBlobsByTagsItems(tagFilterSqlExpression, options = {}) { - return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsItems_1() { + return tslib.__asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* findBlobsByTagsItems_1() { var e_3, _a; let marker2; try { @@ -77314,7 +79254,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (e_3) throw e_3.error; } } - }); + }, "findBlobsByTagsItems_1")); } /** * Returns an async iterable iterator to find all blobs with specified tag @@ -77412,9 +79352,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Return an AsyncIterableIterator that works a page at a time */ - byPage: (settings = {}) => { + byPage: /* @__PURE__ */ __name((settings = {}) => { return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions)); - } + }, "byPage") }; } getContainerNameFromUrl() { @@ -77469,6 +79409,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }; var AccountSASPermissions = class _AccountSASPermissions { + static { + __name(this, "AccountSASPermissions"); + } constructor() { this.read = false; this.write = false; @@ -77642,6 +79585,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }; var AccountSASResourceTypes = class _AccountSASResourceTypes { + static { + __name(this, "AccountSASResourceTypes"); + } constructor() { this.service = false; this.container = false; @@ -77693,6 +79639,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }; var AccountSASServices = class _AccountSASServices { + static { + __name(this, "AccountSASServices"); + } constructor() { this.blob = false; this.file = false; @@ -77805,7 +79754,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); return new SASQueryParameters(version3, signature, parsedPermissions.toString(), parsedServices, parsedResourceTypes, accountSASSignatureValues.protocol, accountSASSignatureValues.startsOn, accountSASSignatureValues.expiresOn, accountSASSignatureValues.ipRange, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, accountSASSignatureValues.encryptionScope); } + __name(generateAccountSASQueryParameters, "generateAccountSASQueryParameters"); var BlobServiceClient = class _BlobServiceClient extends StorageClient { + static { + __name(this, "BlobServiceClient"); + } constructor(url2, credentialOrPipeline, options) { let pipeline; if (isPipelineLike(credentialOrPipeline)) { @@ -78148,7 +80101,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to find blobs by tags. */ findBlobsByTagsSegments(tagFilterSqlExpression, marker2, options = {}) { - return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsSegments_1() { + return tslib.__asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* findBlobsByTagsSegments_1() { let response; if (!!marker2 || marker2 === void 0) { do { @@ -78158,7 +80111,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; yield yield tslib.__await(response); } while (marker2); } - }); + }, "findBlobsByTagsSegments_1")); } /** * Returns an AsyncIterableIterator for blobs. @@ -78170,7 +80123,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to findBlobsByTagsItems. */ findBlobsByTagsItems(tagFilterSqlExpression, options = {}) { - return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsItems_1() { + return tslib.__asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* findBlobsByTagsItems_1() { var e_1, _a; let marker2; try { @@ -78187,7 +80140,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (e_1) throw e_1.error; } } - }); + }, "findBlobsByTagsItems_1")); } /** * Returns an async iterable iterator to find all blobs with specified tag @@ -78287,9 +80240,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Return an AsyncIterableIterator that works a page at a time */ - byPage: (settings = {}) => { + byPage: /* @__PURE__ */ __name((settings = {}) => { return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions)); - } + }, "byPage") }; } /** @@ -78305,7 +80258,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to list containers operation. */ listSegments(marker2, options = {}) { - return tslib.__asyncGenerator(this, arguments, function* listSegments_1() { + return tslib.__asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* listSegments_1() { let listContainersSegmentResponse; if (!!marker2 || marker2 === void 0) { do { @@ -78315,7 +80268,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; yield yield tslib.__await(yield tslib.__await(listContainersSegmentResponse)); } while (marker2); } - }); + }, "listSegments_1")); } /** * Returns an AsyncIterableIterator for Container Items @@ -78323,7 +80276,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to list containers operation. */ listItems(options = {}) { - return tslib.__asyncGenerator(this, arguments, function* listItems_1() { + return tslib.__asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* listItems_1() { var e_2, _a; let marker2; try { @@ -78340,7 +80293,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (e_2) throw e_2.error; } } - }); + }, "listItems_1")); } /** * Returns an async iterable iterator to list all the containers @@ -78448,9 +80401,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Return an AsyncIterableIterator that works a page at a time */ - byPage: (settings = {}) => { + byPage: /* @__PURE__ */ __name((settings = {}) => { return this.listSegments(settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions)); - } + }, "byPage") }; } /** @@ -78539,39 +80492,39 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; })(exports2.KnownEncryptionAlgorithmType || (exports2.KnownEncryptionAlgorithmType = {})); Object.defineProperty(exports2, "BaseRequestPolicy", { enumerable: true, - get: function() { + get: /* @__PURE__ */ __name(function() { return coreHttp.BaseRequestPolicy; - } + }, "get") }); Object.defineProperty(exports2, "HttpHeaders", { enumerable: true, - get: function() { + get: /* @__PURE__ */ __name(function() { return coreHttp.HttpHeaders; - } + }, "get") }); Object.defineProperty(exports2, "RequestPolicyOptions", { enumerable: true, - get: function() { + get: /* @__PURE__ */ __name(function() { return coreHttp.RequestPolicyOptions; - } + }, "get") }); Object.defineProperty(exports2, "RestError", { enumerable: true, - get: function() { + get: /* @__PURE__ */ __name(function() { return coreHttp.RestError; - } + }, "get") }); Object.defineProperty(exports2, "WebResource", { enumerable: true, - get: function() { + get: /* @__PURE__ */ __name(function() { return coreHttp.WebResource; - } + }, "get") }); Object.defineProperty(exports2, "deserializationPolicy", { enumerable: true, - get: function() { + get: /* @__PURE__ */ __name(function() { return coreHttp.deserializationPolicy; - } + }, "get") }); exports2.AccountSASPermissions = AccountSASPermissions; exports2.AccountSASResourceTypes = AccountSASResourceTypes; @@ -78617,9 +80570,9 @@ var require_blob_upload = __commonJS({ if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { + desc = { enumerable: true, get: /* @__PURE__ */ __name(function() { return m[k]; - } }; + }, "get") }; } Object.defineProperty(o, k2, desc); } : function(o, m, k, k2) { @@ -78646,6 +80599,7 @@ var require_blob_upload = __commonJS({ resolve(value); }); } + __name(adopt, "adopt"); return new (P || (P = Promise))(function(resolve, reject) { function fulfilled(value) { try { @@ -78654,6 +80608,7 @@ var require_blob_upload = __commonJS({ reject(e); } } + __name(fulfilled, "fulfilled"); function rejected(value) { try { step(generator["throw"](value)); @@ -78661,9 +80616,11 @@ var require_blob_upload = __commonJS({ reject(e); } } + __name(rejected, "rejected"); function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + __name(step, "step"); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; @@ -78680,7 +80637,7 @@ var require_blob_upload = __commonJS({ let uploadByteCount = 0; let lastProgressTime = Date.now(); let timeoutId; - const chunkTimer = (timeout) => { + const chunkTimer = /* @__PURE__ */ __name((timeout) => { if (timeoutId) { clearTimeout(timeoutId); } @@ -78691,19 +80648,19 @@ var require_blob_upload = __commonJS({ } }, timeout); return timeoutId; - }; + }, "chunkTimer"); const maxConcurrency = (0, config_1.getConcurrency)(); const bufferSize = (0, config_1.getUploadChunkSize)(); const blobClient = new storage_blob_1.BlobClient(authenticatedUploadURL); const blockBlobClient = blobClient.getBlockBlobClient(); const timeoutDuration = 3e5; core2.debug(`Uploading artifact zip to blob storage with maxConcurrency: ${maxConcurrency}, bufferSize: ${bufferSize}`); - const uploadCallback = (progress) => { + const uploadCallback = /* @__PURE__ */ __name((progress) => { core2.info(`Uploaded bytes ${progress.loadedBytes}`); uploadByteCount = progress.loadedBytes; chunkTimer(timeoutDuration); lastProgressTime = Date.now(); - }; + }, "uploadCallback"); const options = { blobHTTPHeaders: { blobContentType: "zip" }, onProgress: uploadCallback @@ -78740,6 +80697,7 @@ var require_blob_upload = __commonJS({ }; }); } + __name(uploadZipToBlobStorage, "uploadZipToBlobStorage"); exports2.uploadZipToBlobStorage = uploadZipToBlobStorage; } }); @@ -78769,10 +80727,12 @@ var require_balanced_match = __commonJS({ post: str.slice(r[1] + b.length) }; } + __name(balanced, "balanced"); function maybeMatch(reg, str) { var m = str.match(reg); return m ? m[0] : null; } + __name(maybeMatch, "maybeMatch"); balanced.range = range; function range(a, b, str) { var begs, beg, left, right, result; @@ -78807,6 +80767,7 @@ var require_balanced_match = __commonJS({ } return result; } + __name(range, "range"); } }); @@ -78823,12 +80784,15 @@ var require_brace_expansion = __commonJS({ function numeric(str) { return parseInt(str, 10) == str ? parseInt(str, 10) : str.charCodeAt(0); } + __name(numeric, "numeric"); function escapeBraces(str) { return str.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod); } + __name(escapeBraces, "escapeBraces"); function unescapeBraces(str) { return str.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join("."); } + __name(unescapeBraces, "unescapeBraces"); function parseCommaParts(str) { if (!str) return [""]; @@ -78849,6 +80813,7 @@ var require_brace_expansion = __commonJS({ parts.push.apply(parts, p); return parts; } + __name(parseCommaParts, "parseCommaParts"); function expandTop(str) { if (!str) return []; @@ -78857,18 +80822,23 @@ var require_brace_expansion = __commonJS({ } return expand(escapeBraces(str), true).map(unescapeBraces); } + __name(expandTop, "expandTop"); function embrace(str) { return "{" + str + "}"; } + __name(embrace, "embrace"); function isPadded(el) { return /^-?0\d/.test(el); } + __name(isPadded, "isPadded"); function lte(i, y) { return i <= y; } + __name(lte, "lte"); function gte(i, y) { return i >= y; } + __name(gte, "gte"); function expand(str, isTop) { var expansions = []; var m = balanced("{", "}", str); @@ -78957,6 +80927,7 @@ var require_brace_expansion = __commonJS({ } return expansions; } + __name(expand, "expand"); } }); @@ -78987,27 +80958,30 @@ var require_minimatch = __commonJS({ var star = qmark + "*?"; var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?"; var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?"; - var charSet = (s) => s.split("").reduce((set, c) => { + var charSet = /* @__PURE__ */ __name((s) => s.split("").reduce((set, c) => { set[c] = true; return set; - }, {}); + }, {}), "charSet"); var reSpecials = charSet("().*{}+?[]^$\\!"); var addPatternStartSet = charSet("[.("); var slashSplit = /\/+/; minimatch.filter = (pattern, options = {}) => (p, i, list) => minimatch(p, pattern, options); - var ext = (a, b = {}) => { + var ext = /* @__PURE__ */ __name((a, b = {}) => { const t = {}; Object.keys(a).forEach((k) => t[k] = a[k]); Object.keys(b).forEach((k) => t[k] = b[k]); return t; - }; + }, "ext"); minimatch.defaults = (def) => { if (!def || typeof def !== "object" || !Object.keys(def).length) { return minimatch; } const orig = minimatch; - const m = (p, pattern, options) => orig(p, pattern, ext(def, options)); + const m = /* @__PURE__ */ __name((p, pattern, options) => orig(p, pattern, ext(def, options)), "m"); m.Minimatch = class Minimatch extends orig.Minimatch { + static { + __name(this, "Minimatch"); + } constructor(pattern, options) { super(pattern, ext(def, options)); } @@ -79021,22 +80995,22 @@ var require_minimatch = __commonJS({ return m; }; minimatch.braceExpand = (pattern, options) => braceExpand(pattern, options); - var braceExpand = (pattern, options = {}) => { + var braceExpand = /* @__PURE__ */ __name((pattern, options = {}) => { assertValidPattern(pattern); if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { return [pattern]; } return expand(pattern); - }; + }, "braceExpand"); var MAX_PATTERN_LENGTH = 1024 * 64; - var assertValidPattern = (pattern) => { + var assertValidPattern = /* @__PURE__ */ __name((pattern) => { if (typeof pattern !== "string") { throw new TypeError("invalid pattern"); } if (pattern.length > MAX_PATTERN_LENGTH) { throw new TypeError("pattern is too long"); } - }; + }, "assertValidPattern"); var SUBPARSE = Symbol("subparse"); minimatch.makeRe = (pattern, options) => new Minimatch(pattern, options || {}).makeRe(); minimatch.match = (list, pattern, options = {}) => { @@ -79047,11 +81021,14 @@ var require_minimatch = __commonJS({ } return list; }; - var globUnescape = (s) => s.replace(/\\(.)/g, "$1"); - var charUnescape = (s) => s.replace(/\\([^-\]])/g, "$1"); - var regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); - var braExpEscape = (s) => s.replace(/[[\]\\]/g, "\\$&"); + var globUnescape = /* @__PURE__ */ __name((s) => s.replace(/\\(.)/g, "$1"), "globUnescape"); + var charUnescape = /* @__PURE__ */ __name((s) => s.replace(/\\([^-\]])/g, "$1"), "charUnescape"); + var regExpEscape = /* @__PURE__ */ __name((s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), "regExpEscape"); + var braExpEscape = /* @__PURE__ */ __name((s) => s.replace(/[[\]\\]/g, "\\$&"), "braExpEscape"); var Minimatch = class { + static { + __name(this, "Minimatch"); + } constructor(pattern, options) { assertValidPattern(pattern); if (!options) options = {}; @@ -79202,9 +81179,9 @@ var require_minimatch = __commonJS({ let sp; let dotTravAllowed = pattern.charAt(0) === "."; let dotFileAllowed = options.dot || dotTravAllowed; - const patternStart = () => dotTravAllowed ? "" : dotFileAllowed ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)"; - const subPatternStart = (p) => p.charAt(0) === "." ? "" : options.dot ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)"; - const clearStateChar = () => { + const patternStart = /* @__PURE__ */ __name(() => dotTravAllowed ? "" : dotFileAllowed ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)", "patternStart"); + const subPatternStart = /* @__PURE__ */ __name((p) => p.charAt(0) === "." ? "" : options.dot ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)", "subPatternStart"); + const clearStateChar = /* @__PURE__ */ __name(() => { if (stateChar) { switch (stateChar) { case "*": @@ -79222,7 +81199,7 @@ var require_minimatch = __commonJS({ this.debug("clearStateChar %j %j", stateChar, re2); stateChar = false; } - }; + }, "clearStateChar"); for (let i = 0, c; i < pattern.length && (c = pattern.charAt(i)); i++) { this.debug("%s %s %s %j", pattern, i, re2, c); if (escaping) { @@ -79549,6 +81526,7 @@ var require_readdir_glob = __commonJS({ }); }); } + __name(readdir, "readdir"); function stat(file, followSymlinks) { return new Promise((resolve2, reject) => { const statFunc = followSymlinks ? fs.stat : fs.lstat; @@ -79572,6 +81550,7 @@ var require_readdir_glob = __commonJS({ }); }); } + __name(stat, "stat"); async function* exploreWalkAsync(dir, path2, followSymlinks, useStat, shouldSkip, strict) { let files = await readdir(path2 + dir, strict); for (const file of files) { @@ -79591,7 +81570,7 @@ var require_readdir_glob = __commonJS({ stats = file; } if (stats === null) { - stats = { isDirectory: () => false }; + stats = { isDirectory: /* @__PURE__ */ __name(() => false, "isDirectory") }; } if (stats.isDirectory()) { if (!shouldSkip(relative)) { @@ -79603,9 +81582,11 @@ var require_readdir_glob = __commonJS({ } } } + __name(exploreWalkAsync, "exploreWalkAsync"); async function* explore(path2, followSymlinks, useStat, shouldSkip) { yield* exploreWalkAsync("", path2, followSymlinks, useStat, shouldSkip, true); } + __name(explore, "explore"); function readOptions(options) { return { pattern: options.pattern, @@ -79623,7 +81604,11 @@ var require_readdir_glob = __commonJS({ absolute: !!options.absolute }; } + __name(readOptions, "readOptions"); var ReaddirGlob = class extends EventEmitter { + static { + __name(this, "ReaddirGlob"); + } constructor(cwd, options, cb) { super(); if (typeof options === "function") { @@ -79726,6 +81711,7 @@ var require_readdir_glob = __commonJS({ function readdirGlob(pattern, options, cb) { return new ReaddirGlob(pattern, options, cb); } + __name(readdirGlob, "readdirGlob"); readdirGlob.ReaddirGlob = ReaddirGlob; } }); @@ -79740,21 +81726,25 @@ var require_async2 = __commonJS({ function apply(fn, ...args) { return (...callArgs) => fn(...args, ...callArgs); } + __name(apply, "apply"); function initialParams(fn) { return function(...args) { var callback = args.pop(); return fn.call(this, args, callback); }; } + __name(initialParams, "initialParams"); var hasQueueMicrotask = typeof queueMicrotask === "function" && queueMicrotask; var hasSetImmediate = typeof setImmediate === "function" && setImmediate; var hasNextTick = typeof process === "object" && typeof process.nextTick === "function"; function fallback(fn) { setTimeout(fn, 0); } + __name(fallback, "fallback"); function wrap(defer) { return (fn, ...args) => defer(() => fn(...args)); } + __name(wrap, "wrap"); var _defer$1; if (hasQueueMicrotask) { _defer$1 = queueMicrotask; @@ -79788,6 +81778,7 @@ var require_async2 = __commonJS({ } }); } + __name(asyncify, "asyncify"); function handlePromise(promise, callback) { return promise.then((value) => { invokeCallback(callback, null, value); @@ -79795,6 +81786,7 @@ var require_async2 = __commonJS({ invokeCallback(callback, err && (err instanceof Error || err.message) ? err : new Error(err)); }); } + __name(handlePromise, "handlePromise"); function invokeCallback(callback, error, value) { try { callback(error, value); @@ -79804,19 +81796,24 @@ var require_async2 = __commonJS({ }, err); } } + __name(invokeCallback, "invokeCallback"); function isAsync(fn) { return fn[Symbol.toStringTag] === "AsyncFunction"; } + __name(isAsync, "isAsync"); function isAsyncGenerator(fn) { return fn[Symbol.toStringTag] === "AsyncGenerator"; } + __name(isAsyncGenerator, "isAsyncGenerator"); function isAsyncIterable(obj) { return typeof obj[Symbol.asyncIterator] === "function"; } + __name(isAsyncIterable, "isAsyncIterable"); function wrapAsync(asyncFn) { if (typeof asyncFn !== "function") throw new Error("expected a function"); return isAsync(asyncFn) ? asyncify(asyncFn) : asyncFn; } + __name(wrapAsync, "wrapAsync"); function awaitify(asyncFn, arity) { if (!arity) arity = asyncFn.length; if (!arity) throw new Error("arity is undefined"); @@ -79832,10 +81829,12 @@ var require_async2 = __commonJS({ asyncFn.apply(this, args); }); } + __name(awaitable, "awaitable"); return awaitable; } + __name(awaitify, "awaitify"); function applyEach$1(eachfn) { - return function applyEach2(fns, ...callArgs) { + return /* @__PURE__ */ __name(function applyEach2(fns, ...callArgs) { const go = awaitify(function(callback) { var that = this; return eachfn(fns, (fn, cb) => { @@ -79843,8 +81842,9 @@ var require_async2 = __commonJS({ }, callback); }); return go; - }; + }, "applyEach"); } + __name(applyEach$1, "applyEach$1"); function _asyncMap(eachfn, arr, iteratee, callback) { arr = arr || []; var results = []; @@ -79860,9 +81860,11 @@ var require_async2 = __commonJS({ callback(err, results); }); } + __name(_asyncMap, "_asyncMap"); function isArrayLike(value) { return value && typeof value.length === "number" && value.length >= 0 && value.length % 1 === 0; } + __name(isArrayLike, "isArrayLike"); const breakLoop = {}; var breakLoop$1 = breakLoop; function once(fn) { @@ -79872,41 +81874,47 @@ var require_async2 = __commonJS({ fn = null; callFn.apply(this, args); } + __name(wrapper, "wrapper"); Object.assign(wrapper, fn); return wrapper; } + __name(once, "once"); function getIterator(coll) { return coll[Symbol.iterator] && coll[Symbol.iterator](); } + __name(getIterator, "getIterator"); function createArrayIterator(coll) { var i = -1; var len = coll.length; - return function next() { + return /* @__PURE__ */ __name(function next() { return ++i < len ? { value: coll[i], key: i } : null; - }; + }, "next"); } + __name(createArrayIterator, "createArrayIterator"); function createES2015Iterator(iterator) { var i = -1; - return function next() { + return /* @__PURE__ */ __name(function next() { var item = iterator.next(); if (item.done) return null; i++; return { value: item.value, key: i }; - }; + }, "next"); } + __name(createES2015Iterator, "createES2015Iterator"); function createObjectIterator(obj) { var okeys = obj ? Object.keys(obj) : []; var i = -1; var len = okeys.length; - return function next() { + return /* @__PURE__ */ __name(function next() { var key = okeys[++i]; if (key === "__proto__") { return next(); } return i < len ? { value: obj[key], key } : null; - }; + }, "next"); } + __name(createObjectIterator, "createObjectIterator"); function createIterator(coll) { if (isArrayLike(coll)) { return createArrayIterator(coll); @@ -79914,6 +81922,7 @@ var require_async2 = __commonJS({ var iterator = getIterator(coll); return iterator ? createES2015Iterator(iterator) : createObjectIterator(coll); } + __name(createIterator, "createIterator"); function onlyOnce(fn) { return function(...args) { if (fn === null) throw new Error("Callback was already called."); @@ -79922,6 +81931,7 @@ var require_async2 = __commonJS({ callFn.apply(this, args); }; } + __name(onlyOnce, "onlyOnce"); function asyncEachOfLimit(generator, limit, iteratee, callback) { let done = false; let canceled = false; @@ -79947,6 +81957,7 @@ var require_async2 = __commonJS({ replenish(); }).catch(handleError); } + __name(replenish, "replenish"); function iterateeCallback(err, result) { running -= 1; if (canceled) return; @@ -79962,15 +81973,18 @@ var require_async2 = __commonJS({ } replenish(); } + __name(iterateeCallback, "iterateeCallback"); function handleError(err) { if (canceled) return; awaiting = false; done = true; callback(err); } + __name(handleError, "handleError"); replenish(); } - var eachOfLimit$2 = (limit) => { + __name(asyncEachOfLimit, "asyncEachOfLimit"); + var eachOfLimit$2 = /* @__PURE__ */ __name((limit) => { return (obj, iteratee, callback) => { callback = once(callback); if (limit <= 0) { @@ -80006,6 +82020,7 @@ var require_async2 = __commonJS({ replenish(); } } + __name(iterateeCallback, "iterateeCallback"); function replenish() { looping = true; while (running < limit && !done) { @@ -80022,12 +82037,14 @@ var require_async2 = __commonJS({ } looping = false; } + __name(replenish, "replenish"); replenish(); }; - }; + }, "eachOfLimit$2"); function eachOfLimit(coll, limit, iteratee, callback) { return eachOfLimit$2(limit)(coll, wrapAsync(iteratee), callback); } + __name(eachOfLimit, "eachOfLimit"); var eachOfLimit$1 = awaitify(eachOfLimit, 4); function eachOfArrayLike(coll, iteratee, callback) { callback = once(callback); @@ -80046,30 +82063,37 @@ var require_async2 = __commonJS({ callback(null); } } + __name(iteratorCallback, "iteratorCallback"); for (; index2 < length; index2++) { iteratee(coll[index2], index2, onlyOnce(iteratorCallback)); } } + __name(eachOfArrayLike, "eachOfArrayLike"); function eachOfGeneric(coll, iteratee, callback) { return eachOfLimit$1(coll, Infinity, iteratee, callback); } + __name(eachOfGeneric, "eachOfGeneric"); function eachOf(coll, iteratee, callback) { var eachOfImplementation = isArrayLike(coll) ? eachOfArrayLike : eachOfGeneric; return eachOfImplementation(coll, wrapAsync(iteratee), callback); } + __name(eachOf, "eachOf"); var eachOf$1 = awaitify(eachOf, 3); function map(coll, iteratee, callback) { return _asyncMap(eachOf$1, coll, iteratee, callback); } + __name(map, "map"); var map$1 = awaitify(map, 3); var applyEach = applyEach$1(map$1); function eachOfSeries(coll, iteratee, callback) { return eachOfLimit$1(coll, 1, iteratee, callback); } + __name(eachOfSeries, "eachOfSeries"); var eachOfSeries$1 = awaitify(eachOfSeries, 3); function mapSeries(coll, iteratee, callback) { return _asyncMap(eachOfSeries$1, coll, iteratee, callback); } + __name(mapSeries, "mapSeries"); var mapSeries$1 = awaitify(mapSeries, 3); var applyEachSeries = applyEach$1(mapSeries$1); const PROMISE_SYMBOL = Symbol("promiseCallback"); @@ -80079,11 +82103,13 @@ var require_async2 = __commonJS({ if (err) return reject2(err); resolve(args.length > 1 ? args : args[0]); } + __name(callback, "callback"); callback[PROMISE_SYMBOL] = new Promise((res, rej) => { resolve = res, reject2 = rej; }); return callback; } + __name(promiseCallback, "promiseCallback"); function auto(tasks, concurrency, callback) { if (typeof concurrency !== "number") { callback = concurrency; @@ -80137,6 +82163,7 @@ var require_async2 = __commonJS({ function enqueueTask(key, task) { readyTasks.push(() => runTask(key, task)); } + __name(enqueueTask, "enqueueTask"); function processQueue() { if (canceled) return; if (readyTasks.length === 0 && runningTasks === 0) { @@ -80147,6 +82174,7 @@ var require_async2 = __commonJS({ run2(); } } + __name(processQueue, "processQueue"); function addListener(taskName, fn) { var taskListeners = listeners[taskName]; if (!taskListeners) { @@ -80154,11 +82182,13 @@ var require_async2 = __commonJS({ } taskListeners.push(fn); } + __name(addListener, "addListener"); function taskComplete(taskName) { var taskListeners = listeners[taskName] || []; taskListeners.forEach((fn) => fn()); processQueue(); } + __name(taskComplete, "taskComplete"); function runTask(key, task) { if (hasError) return; var taskCallback = onlyOnce((err, ...result) => { @@ -80193,6 +82223,7 @@ var require_async2 = __commonJS({ taskFn(taskCallback); } } + __name(runTask, "runTask"); function checkForDeadlocks() { var currentTask; var counter = 0; @@ -80211,6 +82242,7 @@ var require_async2 = __commonJS({ ); } } + __name(checkForDeadlocks, "checkForDeadlocks"); function getDependents(taskName) { var result = []; Object.keys(tasks).forEach((key) => { @@ -80221,8 +82253,10 @@ var require_async2 = __commonJS({ }); return result; } + __name(getDependents, "getDependents"); return callback[PROMISE_SYMBOL]; } + __name(auto, "auto"); var FN_ARGS = /^(?:async\s+)?(?:function)?\s*\w*\s*\(\s*([^)]+)\s*\)(?:\s*{)/; var ARROW_FN_ARGS = /^(?:async\s+)?\(?\s*([^)=]+)\s*\)?(?:\s*=>)/; var FN_ARG_SPLIT = /,/; @@ -80251,6 +82285,7 @@ var require_async2 = __commonJS({ } return stripped; } + __name(stripComments, "stripComments"); function parseParams(func) { const src = stripComments(func.toString()); let match = src.match(FN_ARGS); @@ -80261,6 +82296,7 @@ var require_async2 = __commonJS({ let [, args] = match; return args.replace(/\s/g, "").split(FN_ARG_SPLIT).map((arg) => arg.replace(FN_ARG, "").trim()); } + __name(parseParams, "parseParams"); function autoInject(tasks, callback) { var newTasks = {}; Object.keys(tasks).forEach((key) => { @@ -80287,10 +82323,15 @@ var require_async2 = __commonJS({ newArgs.push(taskCb); wrapAsync(taskFn)(...newArgs); } + __name(newTask, "newTask"); }); return auto(newTasks, callback); } + __name(autoInject, "autoInject"); class DLL { + static { + __name(this, "DLL"); + } constructor() { this.head = this.tail = null; this.length = 0; @@ -80364,6 +82405,7 @@ var require_async2 = __commonJS({ dll.length = 1; dll.head = dll.tail = node; } + __name(setInitial, "setInitial"); function queue$1(worker, concurrency, payload) { if (concurrency == null) { concurrency = 1; @@ -80383,21 +82425,25 @@ var require_async2 = __commonJS({ function on(event, handler) { events[event].push(handler); } + __name(on, "on"); function once2(event, handler) { - const handleAndRemove = (...args) => { + const handleAndRemove = /* @__PURE__ */ __name((...args) => { off(event, handleAndRemove); handler(...args); - }; + }, "handleAndRemove"); events[event].push(handleAndRemove); } + __name(once2, "once"); function off(event, handler) { if (!event) return Object.keys(events).forEach((ev) => events[ev] = []); if (!handler) return events[event] = []; events[event] = events[event].filter((ev) => ev !== handler); } + __name(off, "off"); function trigger(event, ...args) { events[event].forEach((handler) => handler(...args)); } + __name(trigger, "trigger"); var processingScheduled = false; function _insert(data, insertAtFront, rejectOnError, callback) { if (callback != null && typeof callback !== "function") { @@ -80410,6 +82456,7 @@ var require_async2 = __commonJS({ if (args.length <= 1) return res(args[0]); res(args); } + __name(promiseCallback2, "promiseCallback"); var item = q._createTaskItem( data, rejectOnError ? promiseCallback2 : callback || promiseCallback2 @@ -80433,6 +82480,7 @@ var require_async2 = __commonJS({ }); } } + __name(_insert, "_insert"); function _createCB(tasks) { return function(err, ...args) { numRunning -= 1; @@ -80458,6 +82506,7 @@ var require_async2 = __commonJS({ q.process(); }; } + __name(_createCB, "_createCB"); function _maybeDrain(data) { if (data.length === 0 && q.idle()) { setImmediate$1(() => trigger("drain")); @@ -80465,7 +82514,8 @@ var require_async2 = __commonJS({ } return false; } - const eventMethod = (name) => (handler) => { + __name(_maybeDrain, "_maybeDrain"); + const eventMethod = /* @__PURE__ */ __name((name) => (handler) => { if (!handler) { return new Promise((resolve, reject2) => { once2(name, (err, data) => { @@ -80476,7 +82526,7 @@ var require_async2 = __commonJS({ } off(name); on(name, handler); - }; + }, "eventMethod"); var isProcessing = false; var q = { _tasks: new DLL(), @@ -80603,12 +82653,15 @@ var require_async2 = __commonJS({ }); return q; } + __name(queue$1, "queue$1"); function cargo$1(worker, payload) { return queue$1(worker, 1, payload); } + __name(cargo$1, "cargo$1"); function cargo(worker, concurrency, payload) { return queue$1(worker, concurrency, payload); } + __name(cargo, "cargo"); function reduce(coll, memo, iteratee, callback) { callback = once(callback); var _iteratee = wrapAsync(iteratee); @@ -80619,6 +82672,7 @@ var require_async2 = __commonJS({ }); }, (err) => callback(err, memo)); } + __name(reduce, "reduce"); var reduce$1 = awaitify(reduce, 4); function seq(...functions) { var _functions = functions.map(wrapAsync); @@ -80643,12 +82697,15 @@ var require_async2 = __commonJS({ return cb[PROMISE_SYMBOL]; }; } + __name(seq, "seq"); function compose(...args) { return seq(...args.reverse()); } + __name(compose, "compose"); function mapLimit(coll, limit, iteratee, callback) { return _asyncMap(eachOfLimit$2(limit), coll, iteratee, callback); } + __name(mapLimit, "mapLimit"); var mapLimit$1 = awaitify(mapLimit, 4); function concatLimit(coll, limit, iteratee, callback) { var _iteratee = wrapAsync(iteratee); @@ -80667,14 +82724,17 @@ var require_async2 = __commonJS({ return callback(err, result); }); } + __name(concatLimit, "concatLimit"); var concatLimit$1 = awaitify(concatLimit, 4); function concat(coll, iteratee, callback) { return concatLimit$1(coll, Infinity, iteratee, callback); } + __name(concat, "concat"); var concat$1 = awaitify(concat, 3); function concatSeries(coll, iteratee, callback) { return concatLimit$1(coll, 1, iteratee, callback); } + __name(concatSeries, "concatSeries"); var concatSeries$1 = awaitify(concatSeries, 3); function constant$1(...args) { return function(...ignoredArgs) { @@ -80682,6 +82742,7 @@ var require_async2 = __commonJS({ return callback(null, ...args); }; } + __name(constant$1, "constant$1"); function _createTester(check, getResult) { return (eachfn, arr, _iteratee, cb) => { var testPassed = false; @@ -80703,17 +82764,21 @@ var require_async2 = __commonJS({ }); }; } + __name(_createTester, "_createTester"); function detect(coll, iteratee, callback) { return _createTester((bool) => bool, (res, item) => item)(eachOf$1, coll, iteratee, callback); } + __name(detect, "detect"); var detect$1 = awaitify(detect, 3); function detectLimit(coll, limit, iteratee, callback) { return _createTester((bool) => bool, (res, item) => item)(eachOfLimit$2(limit), coll, iteratee, callback); } + __name(detectLimit, "detectLimit"); var detectLimit$1 = awaitify(detectLimit, 4); function detectSeries(coll, iteratee, callback) { return _createTester((bool) => bool, (res, item) => item)(eachOfLimit$2(1), coll, iteratee, callback); } + __name(detectSeries, "detectSeries"); var detectSeries$1 = awaitify(detectSeries, 3); function consoleFunc(name) { return (fn, ...args) => wrapAsync(fn)(...args, (err, ...resultArgs) => { @@ -80728,6 +82793,7 @@ var require_async2 = __commonJS({ } }); } + __name(consoleFunc, "consoleFunc"); var dir = consoleFunc("dir"); function doWhilst(iteratee, test, callback) { callback = onlyOnce(callback); @@ -80740,14 +82806,17 @@ var require_async2 = __commonJS({ results = args; _test(...args, check); } + __name(next, "next"); function check(err, truth) { if (err) return callback(err); if (err === false) return; if (!truth) return callback(null, ...results); _fn(next); } + __name(check, "check"); return check(null, true); } + __name(doWhilst, "doWhilst"); var doWhilst$1 = awaitify(doWhilst, 3); function doUntil(iteratee, test, callback) { const _test = wrapAsync(test); @@ -80756,20 +82825,25 @@ var require_async2 = __commonJS({ _test(...args, (err, truth) => cb(err, !truth)); }, callback); } + __name(doUntil, "doUntil"); function _withoutIndex(iteratee) { return (value, index2, callback) => iteratee(value, callback); } + __name(_withoutIndex, "_withoutIndex"); function eachLimit$2(coll, iteratee, callback) { return eachOf$1(coll, _withoutIndex(wrapAsync(iteratee)), callback); } + __name(eachLimit$2, "eachLimit$2"); var each = awaitify(eachLimit$2, 3); function eachLimit(coll, limit, iteratee, callback) { return eachOfLimit$2(limit)(coll, _withoutIndex(wrapAsync(iteratee)), callback); } + __name(eachLimit, "eachLimit"); var eachLimit$1 = awaitify(eachLimit, 4); function eachSeries(coll, iteratee, callback) { return eachLimit$1(coll, 1, iteratee, callback); } + __name(eachSeries, "eachSeries"); var eachSeries$1 = awaitify(eachSeries, 3); function ensureAsync(fn) { if (isAsync(fn)) return fn; @@ -80787,17 +82861,21 @@ var require_async2 = __commonJS({ sync = false; }; } + __name(ensureAsync, "ensureAsync"); function every(coll, iteratee, callback) { return _createTester((bool) => !bool, (res) => !res)(eachOf$1, coll, iteratee, callback); } + __name(every, "every"); var every$1 = awaitify(every, 3); function everyLimit(coll, limit, iteratee, callback) { return _createTester((bool) => !bool, (res) => !res)(eachOfLimit$2(limit), coll, iteratee, callback); } + __name(everyLimit, "everyLimit"); var everyLimit$1 = awaitify(everyLimit, 4); function everySeries(coll, iteratee, callback) { return _createTester((bool) => !bool, (res) => !res)(eachOfSeries$1, coll, iteratee, callback); } + __name(everySeries, "everySeries"); var everySeries$1 = awaitify(everySeries, 3); function filterArray(eachfn, arr, iteratee, callback) { var truthValues = new Array(arr.length); @@ -80815,6 +82893,7 @@ var require_async2 = __commonJS({ callback(null, results); }); } + __name(filterArray, "filterArray"); function filterGeneric(eachfn, coll, iteratee, callback) { var results = []; eachfn(coll, (x, index2, iterCb) => { @@ -80830,21 +82909,26 @@ var require_async2 = __commonJS({ callback(null, results.sort((a, b) => a.index - b.index).map((v) => v.value)); }); } + __name(filterGeneric, "filterGeneric"); function _filter(eachfn, coll, iteratee, callback) { var filter2 = isArrayLike(coll) ? filterArray : filterGeneric; return filter2(eachfn, coll, wrapAsync(iteratee), callback); } + __name(_filter, "_filter"); function filter(coll, iteratee, callback) { return _filter(eachOf$1, coll, iteratee, callback); } + __name(filter, "filter"); var filter$1 = awaitify(filter, 3); function filterLimit(coll, limit, iteratee, callback) { return _filter(eachOfLimit$2(limit), coll, iteratee, callback); } + __name(filterLimit, "filterLimit"); var filterLimit$1 = awaitify(filterLimit, 4); function filterSeries(coll, iteratee, callback) { return _filter(eachOfSeries$1, coll, iteratee, callback); } + __name(filterSeries, "filterSeries"); var filterSeries$1 = awaitify(filterSeries, 3); function forever(fn, errback) { var done = onlyOnce(errback); @@ -80854,8 +82938,10 @@ var require_async2 = __commonJS({ if (err === false) return; task(next); } + __name(next, "next"); return next(); } + __name(forever, "forever"); var forever$1 = awaitify(forever, 2); function groupByLimit(coll, limit, iteratee, callback) { var _iteratee = wrapAsync(iteratee); @@ -80881,13 +82967,16 @@ var require_async2 = __commonJS({ return callback(err, result); }); } + __name(groupByLimit, "groupByLimit"); var groupByLimit$1 = awaitify(groupByLimit, 4); function groupBy(coll, iteratee, callback) { return groupByLimit$1(coll, Infinity, iteratee, callback); } + __name(groupBy, "groupBy"); function groupBySeries(coll, iteratee, callback) { return groupByLimit$1(coll, 1, iteratee, callback); } + __name(groupBySeries, "groupBySeries"); var log = consoleFunc("log"); function mapValuesLimit(obj, limit, iteratee, callback) { callback = once(callback); @@ -80901,13 +82990,16 @@ var require_async2 = __commonJS({ }); }, (err) => callback(err, newObj)); } + __name(mapValuesLimit, "mapValuesLimit"); var mapValuesLimit$1 = awaitify(mapValuesLimit, 4); function mapValues(obj, iteratee, callback) { return mapValuesLimit$1(obj, Infinity, iteratee, callback); } + __name(mapValues, "mapValues"); function mapValuesSeries(obj, iteratee, callback) { return mapValuesLimit$1(obj, 1, iteratee, callback); } + __name(mapValuesSeries, "mapValuesSeries"); function memoize(fn, hasher = (v) => v) { var memo = /* @__PURE__ */ Object.create(null); var queues = /* @__PURE__ */ Object.create(null); @@ -80936,6 +83028,7 @@ var require_async2 = __commonJS({ memoized.unmemoized = fn; return memoized; } + __name(memoize, "memoize"); var _defer; if (hasNextTick) { _defer = process.nextTick; @@ -80960,16 +83053,22 @@ var require_async2 = __commonJS({ function parallel(tasks, callback) { return _parallel(eachOf$1, tasks, callback); } + __name(parallel, "parallel"); function parallelLimit(tasks, limit, callback) { return _parallel(eachOfLimit$2(limit), tasks, callback); } + __name(parallelLimit, "parallelLimit"); function queue(worker, concurrency) { var _worker = wrapAsync(worker); return queue$1((items, cb) => { _worker(items[0], cb); }, concurrency, 1); } + __name(queue, "queue"); class Heap { + static { + __name(this, "Heap"); + } constructor() { this.heap = []; this.pushCount = Number.MIN_SAFE_INTEGER; @@ -81046,9 +83145,11 @@ var require_async2 = __commonJS({ function leftChi(i) { return (i << 1) + 1; } + __name(leftChi, "leftChi"); function parent(i) { return (i + 1 >> 1) - 1; } + __name(parent, "parent"); function smaller(x, y) { if (x.priority !== y.priority) { return x.priority < y.priority; @@ -81056,6 +83157,7 @@ var require_async2 = __commonJS({ return x.pushCount < y.pushCount; } } + __name(smaller, "smaller"); function priorityQueue(worker, concurrency) { var q = queue(worker, concurrency); var { @@ -81078,6 +83180,7 @@ var require_async2 = __commonJS({ return { data, priority }; }); } + __name(createDataItems, "createDataItems"); q.push = function(data, priority = 0, callback) { return push(createDataItems(data, priority), callback); }; @@ -81088,6 +83191,7 @@ var require_async2 = __commonJS({ delete q.unshiftAsync; return q; } + __name(priorityQueue, "priorityQueue"); function race(tasks, callback) { callback = once(callback); if (!Array.isArray(tasks)) return callback(new TypeError("First argument to race must be an array of functions")); @@ -81096,14 +83200,16 @@ var require_async2 = __commonJS({ wrapAsync(tasks[i])(callback); } } + __name(race, "race"); var race$1 = awaitify(race, 2); function reduceRight(array, memo, iteratee, callback) { var reversed = [...array].reverse(); return reduce$1(reversed, memo, iteratee, callback); } + __name(reduceRight, "reduceRight"); function reflect(fn) { var _fn = wrapAsync(fn); - return initialParams(function reflectOn(args, reflectCallback) { + return initialParams(/* @__PURE__ */ __name(function reflectOn(args, reflectCallback) { args.push((error, ...cbArgs) => { let retVal = {}; if (error) { @@ -81119,8 +83225,9 @@ var require_async2 = __commonJS({ reflectCallback(null, retVal); }); return _fn.apply(this, args); - }); + }, "reflectOn")); } + __name(reflect, "reflect"); function reflectAll(tasks) { var results; if (Array.isArray(tasks)) { @@ -81133,6 +83240,7 @@ var require_async2 = __commonJS({ } return results; } + __name(reflectAll, "reflectAll"); function reject$2(eachfn, arr, _iteratee, callback) { const iteratee = wrapAsync(_iteratee); return _filter(eachfn, arr, (value, cb) => { @@ -81141,23 +83249,28 @@ var require_async2 = __commonJS({ }); }, callback); } + __name(reject$2, "reject$2"); function reject(coll, iteratee, callback) { return reject$2(eachOf$1, coll, iteratee, callback); } + __name(reject, "reject"); var reject$1 = awaitify(reject, 3); function rejectLimit(coll, limit, iteratee, callback) { return reject$2(eachOfLimit$2(limit), coll, iteratee, callback); } + __name(rejectLimit, "rejectLimit"); var rejectLimit$1 = awaitify(rejectLimit, 4); function rejectSeries(coll, iteratee, callback) { return reject$2(eachOfSeries$1, coll, iteratee, callback); } + __name(rejectSeries, "rejectSeries"); var rejectSeries$1 = awaitify(rejectSeries, 3); function constant(value) { return function() { return value; }; } + __name(constant, "constant"); const DEFAULT_TIMES = 5; const DEFAULT_INTERVAL = 0; function retry(opts, task, callback) { @@ -81187,9 +83300,11 @@ var require_async2 = __commonJS({ } }); } + __name(retryAttempt, "retryAttempt"); retryAttempt(); return callback[PROMISE_SYMBOL]; } + __name(retry, "retry"); function parseTimes(acc, t) { if (typeof t === "object") { acc.times = +t.times || DEFAULT_TIMES; @@ -81201,6 +83316,7 @@ var require_async2 = __commonJS({ throw new Error("Invalid arguments for async.retry"); } } + __name(parseTimes, "parseTimes"); function retryable(opts, task) { if (!task) { task = opts; @@ -81219,25 +83335,31 @@ var require_async2 = __commonJS({ function taskFn(cb) { _task(...args, cb); } + __name(taskFn, "taskFn"); if (opts) retry(opts, taskFn, callback); else retry(taskFn, callback); return callback[PROMISE_SYMBOL]; }); } + __name(retryable, "retryable"); function series(tasks, callback) { return _parallel(eachOfSeries$1, tasks, callback); } + __name(series, "series"); function some(coll, iteratee, callback) { return _createTester(Boolean, (res) => res)(eachOf$1, coll, iteratee, callback); } + __name(some, "some"); var some$1 = awaitify(some, 3); function someLimit(coll, limit, iteratee, callback) { return _createTester(Boolean, (res) => res)(eachOfLimit$2(limit), coll, iteratee, callback); } + __name(someLimit, "someLimit"); var someLimit$1 = awaitify(someLimit, 4); function someSeries(coll, iteratee, callback) { return _createTester(Boolean, (res) => res)(eachOfSeries$1, coll, iteratee, callback); } + __name(someSeries, "someSeries"); var someSeries$1 = awaitify(someSeries, 3); function sortBy(coll, iteratee, callback) { var _iteratee = wrapAsync(iteratee); @@ -81254,7 +83376,9 @@ var require_async2 = __commonJS({ var a = left.criteria, b = right.criteria; return a < b ? -1 : a > b ? 1 : 0; } + __name(comparator, "comparator"); } + __name(sortBy, "sortBy"); var sortBy$1 = awaitify(sortBy, 3); function timeout(asyncFn, milliseconds, info2) { var fn = wrapAsync(asyncFn); @@ -81271,6 +83395,7 @@ var require_async2 = __commonJS({ timedOut = true; callback(error); } + __name(timeoutCallback, "timeoutCallback"); args.push((...cbArgs) => { if (!timedOut) { callback(...cbArgs); @@ -81281,6 +83406,7 @@ var require_async2 = __commonJS({ fn(...args); }); } + __name(timeout, "timeout"); function range(size) { var result = Array(size); while (size--) { @@ -81288,16 +83414,20 @@ var require_async2 = __commonJS({ } return result; } + __name(range, "range"); function timesLimit(count, limit, iteratee, callback) { var _iteratee = wrapAsync(iteratee); return mapLimit$1(range(count), limit, _iteratee, callback); } + __name(timesLimit, "timesLimit"); function times(n, iteratee, callback) { return timesLimit(n, Infinity, iteratee, callback); } + __name(times, "times"); function timesSeries(n, iteratee, callback) { return timesLimit(n, 1, iteratee, callback); } + __name(timesSeries, "timesSeries"); function transform(coll, accumulator, iteratee, callback) { if (arguments.length <= 3 && typeof accumulator === "function") { callback = iteratee; @@ -81311,6 +83441,7 @@ var require_async2 = __commonJS({ }, (err) => callback(err, accumulator)); return callback[PROMISE_SYMBOL]; } + __name(transform, "transform"); function tryEach(tasks, callback) { var error = null; var result; @@ -81327,12 +83458,14 @@ var require_async2 = __commonJS({ }); }, () => callback(error, result)); } + __name(tryEach, "tryEach"); var tryEach$1 = awaitify(tryEach); function unmemoize(fn) { return (...args) => { return (fn.unmemoized || fn)(...args); }; } + __name(unmemoize, "unmemoize"); function whilst(test, iteratee, callback) { callback = onlyOnce(callback); var _fn = wrapAsync(iteratee); @@ -81344,19 +83477,23 @@ var require_async2 = __commonJS({ if (err === false) return; _test(check); } + __name(next, "next"); function check(err, truth) { if (err) return callback(err); if (err === false) return; if (!truth) return callback(null, ...results); _fn(next); } + __name(check, "check"); return _test(check); } + __name(whilst, "whilst"); var whilst$1 = awaitify(whilst, 3); function until(test, iteratee, callback) { const _test = wrapAsync(test); return whilst$1((cb) => _test((err, truth) => cb(err, !truth)), iteratee, callback); } + __name(until, "until"); function waterfall(tasks, callback) { callback = once(callback); if (!Array.isArray(tasks)) return callback(new Error("First argument to waterfall must be an array of functions")); @@ -81366,6 +83503,7 @@ var require_async2 = __commonJS({ var task = wrapAsync(tasks[taskIndex++]); task(...args, onlyOnce(next)); } + __name(nextTask, "nextTask"); function next(err, ...args) { if (err === false) return; if (err || taskIndex === tasks.length) { @@ -81373,8 +83511,10 @@ var require_async2 = __commonJS({ } nextTask(args); } + __name(next, "next"); nextTask([]); } + __name(waterfall, "waterfall"); var waterfall$1 = awaitify(waterfall); var index = { apply, @@ -81661,7 +83801,7 @@ var require_polyfills = __commonJS({ function rename(from, to, cb) { var start = Date.now(); var backoff = 0; - fs$rename(from, to, function CB(er) { + fs$rename(from, to, /* @__PURE__ */ __name(function CB(er) { if (er && (er.code === "EACCES" || er.code === "EPERM" || er.code === "EBUSY") && Date.now() - start < 6e4) { setTimeout(function() { fs.stat(to, function(stater, st) { @@ -81676,8 +83816,9 @@ var require_polyfills = __commonJS({ return; } if (cb) cb(er); - }); + }, "CB")); } + __name(rename, "rename"); if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename); return rename; }(fs.rename); @@ -81687,16 +83828,17 @@ var require_polyfills = __commonJS({ var callback; if (callback_ && typeof callback_ === "function") { var eagCounter = 0; - callback = function(er, _2, __) { + callback = /* @__PURE__ */ __name(function(er, _2, __) { if (er && er.code === "EAGAIN" && eagCounter < 10) { eagCounter++; return fs$read.call(fs, fd, buffer, offset, length, position, callback); } callback_.apply(this, arguments); - }; + }, "callback"); } return fs$read.call(fs, fd, buffer, offset, length, position, callback); } + __name(read, "read"); if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read); return read; }(fs.read); @@ -81755,6 +83897,7 @@ var require_polyfills = __commonJS({ return ret; }; } + __name(patchLchmod, "patchLchmod"); function patchLutimes(fs2) { if (constants.hasOwnProperty("O_SYMLINK") && fs2.futimes) { fs2.lutimes = function(path2, at, mt, cb) { @@ -81797,6 +83940,7 @@ var require_polyfills = __commonJS({ }; } } + __name(patchLutimes, "patchLutimes"); function chmodFix(orig) { if (!orig) return orig; return function(target, mode, cb) { @@ -81806,6 +83950,7 @@ var require_polyfills = __commonJS({ }); }; } + __name(chmodFix, "chmodFix"); function chmodFixSync(orig) { if (!orig) return orig; return function(target, mode) { @@ -81816,6 +83961,7 @@ var require_polyfills = __commonJS({ } }; } + __name(chmodFixSync, "chmodFixSync"); function chownFix(orig) { if (!orig) return orig; return function(target, uid, gid, cb) { @@ -81825,6 +83971,7 @@ var require_polyfills = __commonJS({ }); }; } + __name(chownFix, "chownFix"); function chownFixSync(orig) { if (!orig) return orig; return function(target, uid, gid) { @@ -81835,6 +83982,7 @@ var require_polyfills = __commonJS({ } }; } + __name(chownFixSync, "chownFixSync"); function statFix(orig) { if (!orig) return orig; return function(target, options, cb) { @@ -81849,9 +83997,11 @@ var require_polyfills = __commonJS({ } if (cb) cb.apply(this, arguments); } + __name(callback, "callback"); return options ? orig.call(fs, target, options, callback) : orig.call(fs, target, callback); }; } + __name(statFix, "statFix"); function statFixSync(orig) { if (!orig) return orig; return function(target, options) { @@ -81863,6 +84013,7 @@ var require_polyfills = __commonJS({ return stats; }; } + __name(statFixSync, "statFixSync"); function chownErOk(er) { if (!er) return true; @@ -81875,7 +84026,9 @@ var require_polyfills = __commonJS({ } return false; } + __name(chownErOk, "chownErOk"); } + __name(patch, "patch"); } }); @@ -81938,6 +84091,7 @@ var require_legacy_streams = __commonJS({ self2._read(); }); } + __name(ReadStream, "ReadStream"); function WriteStream(path2, options) { if (!(this instanceof WriteStream)) return new WriteStream(path2, options); Stream.call(this); @@ -81971,7 +84125,9 @@ var require_legacy_streams = __commonJS({ this.flush(); } } + __name(WriteStream, "WriteStream"); } + __name(legacy, "legacy"); } }); @@ -81995,6 +84151,7 @@ var require_clone = __commonJS({ }); return copy; } + __name(clone, "clone"); } }); @@ -82017,22 +84174,24 @@ var require_graceful_fs = __commonJS({ } function noop() { } + __name(noop, "noop"); function publishQueue(context3, queue2) { Object.defineProperty(context3, gracefulQueue, { - get: function() { + get: /* @__PURE__ */ __name(function() { return queue2; - } + }, "get") }); } + __name(publishQueue, "publishQueue"); var debug = noop; if (util.debuglog) debug = util.debuglog("gfs4"); else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) - debug = function() { + debug = /* @__PURE__ */ __name(function() { var m = util.format.apply(util, arguments); m = "GFS4: " + m.split(/\n/).join("\nGFS4: "); console.error(m); - }; + }, "debug"); if (!fs[gracefulQueue]) { queue = global[gracefulQueue] || []; publishQueue(fs, queue); @@ -82046,6 +84205,7 @@ var require_graceful_fs = __commonJS({ cb.apply(this, arguments); }); } + __name(close, "close"); Object.defineProperty(close, previousSymbol, { value: fs$close }); @@ -82056,6 +84216,7 @@ var require_graceful_fs = __commonJS({ fs$closeSync.apply(fs, arguments); resetQueue(); } + __name(closeSync, "closeSync"); Object.defineProperty(closeSync, previousSymbol, { value: fs$closeSync }); @@ -82098,7 +84259,9 @@ var require_graceful_fs = __commonJS({ } }); } + __name(go$readFile, "go$readFile"); } + __name(readFile, "readFile"); var fs$writeFile = fs2.writeFile; fs2.writeFile = writeFile; function writeFile(path2, data, options, cb) { @@ -82115,7 +84278,9 @@ var require_graceful_fs = __commonJS({ } }); } + __name(go$writeFile, "go$writeFile"); } + __name(writeFile, "writeFile"); var fs$appendFile = fs2.appendFile; if (fs$appendFile) fs2.appendFile = appendFile; @@ -82133,7 +84298,9 @@ var require_graceful_fs = __commonJS({ } }); } + __name(go$appendFile, "go$appendFile"); } + __name(appendFile, "appendFile"); var fs$copyFile = fs2.copyFile; if (fs$copyFile) fs2.copyFile = copyFile; @@ -82153,28 +84320,30 @@ var require_graceful_fs = __commonJS({ } }); } + __name(go$copyFile, "go$copyFile"); } + __name(copyFile, "copyFile"); var fs$readdir = fs2.readdir; fs2.readdir = readdir; var noReaddirOptionVersions = /^v[0-5]\./; function readdir(path2, options, cb) { if (typeof options === "function") cb = options, options = null; - var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path3, options2, cb2, startTime) { + var go$readdir = noReaddirOptionVersions.test(process.version) ? /* @__PURE__ */ __name(function go$readdir2(path3, options2, cb2, startTime) { return fs$readdir(path3, fs$readdirCallback( path3, options2, cb2, startTime )); - } : function go$readdir2(path3, options2, cb2, startTime) { + }, "go$readdir") : /* @__PURE__ */ __name(function go$readdir2(path3, options2, cb2, startTime) { return fs$readdir(path3, options2, fs$readdirCallback( path3, options2, cb2, startTime )); - }; + }, "go$readdir"); return go$readdir(path2, options, cb); function fs$readdirCallback(path3, options2, cb2, startTime) { return function(err, files) { @@ -82194,7 +84363,9 @@ var require_graceful_fs = __commonJS({ } }; } + __name(fs$readdirCallback, "fs$readdirCallback"); } + __name(readdir, "readdir"); if (process.version.substr(0, 4) === "v0.8") { var legStreams = legacy(fs2); ReadStream = legStreams.ReadStream; @@ -82211,44 +84382,44 @@ var require_graceful_fs = __commonJS({ WriteStream.prototype.open = WriteStream$open; } Object.defineProperty(fs2, "ReadStream", { - get: function() { + get: /* @__PURE__ */ __name(function() { return ReadStream; - }, - set: function(val) { + }, "get"), + set: /* @__PURE__ */ __name(function(val) { ReadStream = val; - }, + }, "set"), enumerable: true, configurable: true }); Object.defineProperty(fs2, "WriteStream", { - get: function() { + get: /* @__PURE__ */ __name(function() { return WriteStream; - }, - set: function(val) { + }, "get"), + set: /* @__PURE__ */ __name(function(val) { WriteStream = val; - }, + }, "set"), enumerable: true, configurable: true }); var FileReadStream = ReadStream; Object.defineProperty(fs2, "FileReadStream", { - get: function() { + get: /* @__PURE__ */ __name(function() { return FileReadStream; - }, - set: function(val) { + }, "get"), + set: /* @__PURE__ */ __name(function(val) { FileReadStream = val; - }, + }, "set"), enumerable: true, configurable: true }); var FileWriteStream = WriteStream; Object.defineProperty(fs2, "FileWriteStream", { - get: function() { + get: /* @__PURE__ */ __name(function() { return FileWriteStream; - }, - set: function(val) { + }, "get"), + set: /* @__PURE__ */ __name(function(val) { FileWriteStream = val; - }, + }, "set"), enumerable: true, configurable: true }); @@ -82258,6 +84429,7 @@ var require_graceful_fs = __commonJS({ else return ReadStream.apply(Object.create(ReadStream.prototype), arguments); } + __name(ReadStream, "ReadStream"); function ReadStream$open() { var that = this; open(that.path, that.flags, that.mode, function(err, fd) { @@ -82272,12 +84444,14 @@ var require_graceful_fs = __commonJS({ } }); } + __name(ReadStream$open, "ReadStream$open"); function WriteStream(path2, options) { if (this instanceof WriteStream) return fs$WriteStream.apply(this, arguments), this; else return WriteStream.apply(Object.create(WriteStream.prototype), arguments); } + __name(WriteStream, "WriteStream"); function WriteStream$open() { var that = this; open(that.path, that.flags, that.mode, function(err, fd) { @@ -82290,12 +84464,15 @@ var require_graceful_fs = __commonJS({ } }); } + __name(WriteStream$open, "WriteStream$open"); function createReadStream(path2, options) { return new fs2.ReadStream(path2, options); } + __name(createReadStream, "createReadStream"); function createWriteStream(path2, options) { return new fs2.WriteStream(path2, options); } + __name(createWriteStream, "createWriteStream"); var fs$open = fs2.open; fs2.open = open; function open(path2, flags, mode, cb) { @@ -82312,14 +84489,18 @@ var require_graceful_fs = __commonJS({ } }); } + __name(go$open, "go$open"); } + __name(open, "open"); return fs2; } + __name(patch, "patch"); function enqueue(elem) { debug("ENQUEUE", elem[0].name, elem[1]); fs[gracefulQueue].push(elem); retry(); } + __name(enqueue, "enqueue"); var retryTimer; function resetQueue() { var now = Date.now(); @@ -82331,6 +84512,7 @@ var require_graceful_fs = __commonJS({ } retry(); } + __name(resetQueue, "resetQueue"); function retry() { clearTimeout(retryTimer); retryTimer = void 0; @@ -82365,6 +84547,7 @@ var require_graceful_fs = __commonJS({ retryTimer = setTimeout(retry, 0); } } + __name(retry, "retry"); } }); @@ -82372,7 +84555,7 @@ var require_graceful_fs = __commonJS({ var require_is_stream = __commonJS({ "node_modules/is-stream/index.js"(exports2, module2) { "use strict"; - var isStream = (stream) => stream !== null && typeof stream === "object" && typeof stream.pipe === "function"; + var isStream = /* @__PURE__ */ __name((stream) => stream !== null && typeof stream === "object" && typeof stream.pipe === "function", "isStream"); isStream.writable = (stream) => isStream(stream) && stream.writable !== false && typeof stream._write === "function" && typeof stream._writableState === "object"; isStream.readable = (stream) => isStream(stream) && stream.readable !== false && typeof stream._read === "function" && typeof stream._readableState === "object"; isStream.duplex = (stream) => isStream.writable(stream) && isStream.readable(stream); @@ -82401,28 +84584,29 @@ var require_process_nextick_args = __commonJS({ case 1: return process.nextTick(fn); case 2: - return process.nextTick(function afterTickOne() { + return process.nextTick(/* @__PURE__ */ __name(function afterTickOne() { fn.call(null, arg1); - }); + }, "afterTickOne")); case 3: - return process.nextTick(function afterTickTwo() { + return process.nextTick(/* @__PURE__ */ __name(function afterTickTwo() { fn.call(null, arg1, arg2); - }); + }, "afterTickTwo")); case 4: - return process.nextTick(function afterTickThree() { + return process.nextTick(/* @__PURE__ */ __name(function afterTickThree() { fn.call(null, arg1, arg2, arg3); - }); + }, "afterTickThree")); default: args = new Array(len - 1); i = 0; while (i < args.length) { args[i++] = arguments[i]; } - return process.nextTick(function afterTick() { + return process.nextTick(/* @__PURE__ */ __name(function afterTick() { fn.apply(null, args); - }); + }, "afterTick")); } } + __name(nextTick, "nextTick"); } }); @@ -82453,6 +84637,7 @@ var require_safe_buffer = __commonJS({ dst[key] = src[key]; } } + __name(copyProps, "copyProps"); if (Buffer2.from && Buffer2.alloc && Buffer2.allocUnsafe && Buffer2.allocUnsafeSlow) { module2.exports = buffer; } else { @@ -82462,6 +84647,7 @@ var require_safe_buffer = __commonJS({ function SafeBuffer(arg, encodingOrOffset, length) { return Buffer2(arg, encodingOrOffset, length); } + __name(SafeBuffer, "SafeBuffer"); copyProps(Buffer2, SafeBuffer); SafeBuffer.from = function(arg, encodingOrOffset, length) { if (typeof arg === "number") { @@ -82509,64 +84695,79 @@ var require_util9 = __commonJS({ } return objectToString(arg) === "[object Array]"; } + __name(isArray, "isArray"); exports2.isArray = isArray; function isBoolean(arg) { return typeof arg === "boolean"; } + __name(isBoolean, "isBoolean"); exports2.isBoolean = isBoolean; function isNull(arg) { return arg === null; } + __name(isNull, "isNull"); exports2.isNull = isNull; function isNullOrUndefined(arg) { return arg == null; } + __name(isNullOrUndefined, "isNullOrUndefined"); exports2.isNullOrUndefined = isNullOrUndefined; function isNumber(arg) { return typeof arg === "number"; } + __name(isNumber, "isNumber"); exports2.isNumber = isNumber; function isString(arg) { return typeof arg === "string"; } + __name(isString, "isString"); exports2.isString = isString; function isSymbol(arg) { return typeof arg === "symbol"; } + __name(isSymbol, "isSymbol"); exports2.isSymbol = isSymbol; function isUndefined(arg) { return arg === void 0; } + __name(isUndefined, "isUndefined"); exports2.isUndefined = isUndefined; function isRegExp(re2) { return objectToString(re2) === "[object RegExp]"; } + __name(isRegExp, "isRegExp"); exports2.isRegExp = isRegExp; function isObject(arg) { return typeof arg === "object" && arg !== null; } + __name(isObject, "isObject"); exports2.isObject = isObject; function isDate(d) { return objectToString(d) === "[object Date]"; } + __name(isDate, "isDate"); exports2.isDate = isDate; function isError(e) { return objectToString(e) === "[object Error]" || e instanceof Error; } + __name(isError, "isError"); exports2.isError = isError; function isFunction(arg) { return typeof arg === "function"; } + __name(isFunction, "isFunction"); exports2.isFunction = isFunction; function isPrimitive(arg) { return arg === null || typeof arg === "boolean" || typeof arg === "number" || typeof arg === "string" || typeof arg === "symbol" || // ES6 symbol typeof arg === "undefined"; } + __name(isPrimitive, "isPrimitive"); exports2.isPrimitive = isPrimitive; exports2.isBuffer = require("buffer").Buffer.isBuffer; function objectToString(o) { return Object.prototype.toString.call(o); } + __name(objectToString, "objectToString"); } }); @@ -82574,7 +84775,7 @@ var require_util9 = __commonJS({ var require_inherits_browser = __commonJS({ "node_modules/inherits/inherits_browser.js"(exports2, module2) { if (typeof Object.create === "function") { - module2.exports = function inherits(ctor, superCtor) { + module2.exports = /* @__PURE__ */ __name(function inherits(ctor, superCtor) { if (superCtor) { ctor.super_ = superCtor; ctor.prototype = Object.create(superCtor.prototype, { @@ -82586,18 +84787,18 @@ var require_inherits_browser = __commonJS({ } }); } - }; + }, "inherits"); } else { - module2.exports = function inherits(ctor, superCtor) { + module2.exports = /* @__PURE__ */ __name(function inherits(ctor, superCtor) { if (superCtor) { ctor.super_ = superCtor; - var TempCtor = function() { - }; + var TempCtor = /* @__PURE__ */ __name(function() { + }, "TempCtor"); TempCtor.prototype = superCtor.prototype; ctor.prototype = new TempCtor(); ctor.prototype.constructor = ctor; } - }; + }, "inherits"); } } }); @@ -82625,11 +84826,13 @@ var require_BufferList = __commonJS({ throw new TypeError("Cannot call a class as a function"); } } + __name(_classCallCheck, "_classCallCheck"); var Buffer2 = require_safe_buffer().Buffer; var util = require("util"); function copyBuffer(src, target, offset) { src.copy(target, offset); } + __name(copyBuffer, "copyBuffer"); module2.exports = function() { function BufferList() { _classCallCheck(this, BufferList); @@ -82637,32 +84840,33 @@ var require_BufferList = __commonJS({ this.tail = null; this.length = 0; } - BufferList.prototype.push = function push(v) { + __name(BufferList, "BufferList"); + BufferList.prototype.push = /* @__PURE__ */ __name(function push(v) { var entry = { data: v, next: null }; if (this.length > 0) this.tail.next = entry; else this.head = entry; this.tail = entry; ++this.length; - }; - BufferList.prototype.unshift = function unshift(v) { + }, "push"); + BufferList.prototype.unshift = /* @__PURE__ */ __name(function unshift(v) { var entry = { data: v, next: this.head }; if (this.length === 0) this.tail = entry; this.head = entry; ++this.length; - }; - BufferList.prototype.shift = function shift() { + }, "unshift"); + BufferList.prototype.shift = /* @__PURE__ */ __name(function shift() { if (this.length === 0) return; var ret = this.head.data; if (this.length === 1) this.head = this.tail = null; else this.head = this.head.next; --this.length; return ret; - }; - BufferList.prototype.clear = function clear() { + }, "shift"); + BufferList.prototype.clear = /* @__PURE__ */ __name(function clear() { this.head = this.tail = null; this.length = 0; - }; - BufferList.prototype.join = function join(s) { + }, "clear"); + BufferList.prototype.join = /* @__PURE__ */ __name(function join(s) { if (this.length === 0) return ""; var p = this.head; var ret = "" + p.data; @@ -82670,8 +84874,8 @@ var require_BufferList = __commonJS({ ret += s + p.data; } return ret; - }; - BufferList.prototype.concat = function concat(n) { + }, "join"); + BufferList.prototype.concat = /* @__PURE__ */ __name(function concat(n) { if (this.length === 0) return Buffer2.alloc(0); var ret = Buffer2.allocUnsafe(n >>> 0); var p = this.head; @@ -82682,7 +84886,7 @@ var require_BufferList = __commonJS({ p = p.next; } return ret; - }; + }, "concat"); return BufferList; }(); if (util && util.inspect && util.inspect.custom) { @@ -82736,6 +84940,7 @@ var require_destroy = __commonJS({ }); return this; } + __name(destroy, "destroy"); function undestroy() { if (this._readableState) { this._readableState.destroyed = false; @@ -82753,9 +84958,11 @@ var require_destroy = __commonJS({ this._writableState.errorEmitted = false; } } + __name(undestroy, "undestroy"); function emitErrorNT(self2, err) { self2.emit("error", err); } + __name(emitErrorNT, "emitErrorNT"); module2.exports = { destroy, undestroy @@ -82784,6 +84991,7 @@ var require_stream_writable = __commonJS({ onCorkedFinish(_this, state); }; } + __name(CorkedRequest, "CorkedRequest"); var asyncWrite = !process.browser && ["v0.10", "v0.9."].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick; var Duplex; Writable.WritableState = WritableState; @@ -82799,13 +85007,16 @@ var require_stream_writable = __commonJS({ function _uint8ArrayToBuffer(chunk) { return Buffer2.from(chunk); } + __name(_uint8ArrayToBuffer, "_uint8ArrayToBuffer"); function _isUint8Array(obj) { return Buffer2.isBuffer(obj) || obj instanceof OurUint8Array; } + __name(_isUint8Array, "_isUint8Array"); var destroyImpl = require_destroy(); util.inherits(Writable, Stream); function nop() { } + __name(nop, "nop"); function WritableState(options, stream) { Duplex = Duplex || require_stream_duplex(); options = options || {}; @@ -82846,7 +85057,8 @@ var require_stream_writable = __commonJS({ this.bufferedRequestCount = 0; this.corkedRequestsFree = new CorkedRequest(this); } - WritableState.prototype.getBuffer = function getBuffer() { + __name(WritableState, "WritableState"); + WritableState.prototype.getBuffer = /* @__PURE__ */ __name(function getBuffer() { var current = this.bufferedRequest; var out = []; while (current) { @@ -82854,7 +85066,7 @@ var require_stream_writable = __commonJS({ current = current.next; } return out; - }; + }, "getBuffer"); (function() { try { Object.defineProperty(WritableState.prototype, "buffer", { @@ -82869,16 +85081,16 @@ var require_stream_writable = __commonJS({ if (typeof Symbol === "function" && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === "function") { realHasInstance = Function.prototype[Symbol.hasInstance]; Object.defineProperty(Writable, Symbol.hasInstance, { - value: function(object) { + value: /* @__PURE__ */ __name(function(object) { if (realHasInstance.call(this, object)) return true; if (this !== Writable) return false; return object && object._writableState instanceof WritableState; - } + }, "value") }); } else { - realHasInstance = function(object) { + realHasInstance = /* @__PURE__ */ __name(function(object) { return object instanceof this; - }; + }, "realHasInstance"); } function Writable(options) { Duplex = Duplex || require_stream_duplex(); @@ -82895,6 +85107,7 @@ var require_stream_writable = __commonJS({ } Stream.call(this); } + __name(Writable, "Writable"); Writable.prototype.pipe = function() { this.emit("error", new Error("Cannot pipe, not readable")); }; @@ -82903,6 +85116,7 @@ var require_stream_writable = __commonJS({ stream.emit("error", er); pna.nextTick(cb, er); } + __name(writeAfterEnd, "writeAfterEnd"); function validChunk(stream, state, chunk, cb) { var valid = true; var er = false; @@ -82918,6 +85132,7 @@ var require_stream_writable = __commonJS({ } return valid; } + __name(validChunk, "validChunk"); Writable.prototype.write = function(chunk, encoding, cb) { var state = this._writableState; var ret = false; @@ -82950,26 +85165,27 @@ var require_stream_writable = __commonJS({ if (!state.writing && !state.corked && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state); } }; - Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { + Writable.prototype.setDefaultEncoding = /* @__PURE__ */ __name(function setDefaultEncoding(encoding) { if (typeof encoding === "string") encoding = encoding.toLowerCase(); if (!(["hex", "utf8", "utf-8", "ascii", "binary", "base64", "ucs2", "ucs-2", "utf16le", "utf-16le", "raw"].indexOf((encoding + "").toLowerCase()) > -1)) throw new TypeError("Unknown encoding: " + encoding); this._writableState.defaultEncoding = encoding; return this; - }; + }, "setDefaultEncoding"); function decodeChunk(state, chunk, encoding) { if (!state.objectMode && state.decodeStrings !== false && typeof chunk === "string") { chunk = Buffer2.from(chunk, encoding); } return chunk; } + __name(decodeChunk, "decodeChunk"); Object.defineProperty(Writable.prototype, "writableHighWaterMark", { // making it explicit this property is not enumerable // because otherwise some prototype manipulation in // userland will fail enumerable: false, - get: function() { + get: /* @__PURE__ */ __name(function() { return this._writableState.highWaterMark; - } + }, "get") }); function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) { if (!isBuf) { @@ -83004,6 +85220,7 @@ var require_stream_writable = __commonJS({ } return ret; } + __name(writeOrBuffer, "writeOrBuffer"); function doWrite(stream, state, writev, len, chunk, encoding, cb) { state.writelen = len; state.writecb = cb; @@ -83013,6 +85230,7 @@ var require_stream_writable = __commonJS({ else stream._write(chunk, encoding, state.onwrite); state.sync = false; } + __name(doWrite, "doWrite"); function onwriteError(stream, state, sync, er, cb) { --state.pendingcb; if (sync) { @@ -83027,12 +85245,14 @@ var require_stream_writable = __commonJS({ finishMaybe(stream, state); } } + __name(onwriteError, "onwriteError"); function onwriteStateUpdate(state) { state.writing = false; state.writecb = null; state.length -= state.writelen; state.writelen = 0; } + __name(onwriteStateUpdate, "onwriteStateUpdate"); function onwrite(stream, er) { var state = stream._writableState; var sync = state.sync; @@ -83051,18 +85271,21 @@ var require_stream_writable = __commonJS({ } } } + __name(onwrite, "onwrite"); function afterWrite(stream, state, finished, cb) { if (!finished) onwriteDrain(stream, state); state.pendingcb--; cb(); finishMaybe(stream, state); } + __name(afterWrite, "afterWrite"); function onwriteDrain(stream, state) { if (state.length === 0 && state.needDrain) { state.needDrain = false; stream.emit("drain"); } } + __name(onwriteDrain, "onwriteDrain"); function clearBuffer(stream, state) { state.bufferProcessing = true; var entry = state.bufferedRequest; @@ -83108,6 +85331,7 @@ var require_stream_writable = __commonJS({ state.bufferedRequest = entry; state.bufferProcessing = false; } + __name(clearBuffer, "clearBuffer"); Writable.prototype._write = function(chunk, encoding, cb) { cb(new Error("_write() is not implemented")); }; @@ -83132,6 +85356,7 @@ var require_stream_writable = __commonJS({ function needFinish(state) { return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing; } + __name(needFinish, "needFinish"); function callFinal(stream, state) { stream._final(function(err) { state.pendingcb--; @@ -83143,6 +85368,7 @@ var require_stream_writable = __commonJS({ finishMaybe(stream, state); }); } + __name(callFinal, "callFinal"); function prefinish(stream, state) { if (!state.prefinished && !state.finalCalled) { if (typeof stream._final === "function") { @@ -83155,6 +85381,7 @@ var require_stream_writable = __commonJS({ } } } + __name(prefinish, "prefinish"); function finishMaybe(stream, state) { var need = needFinish(state); if (need) { @@ -83166,6 +85393,7 @@ var require_stream_writable = __commonJS({ } return need; } + __name(finishMaybe, "finishMaybe"); function endWritable(stream, state, cb) { state.ending = true; finishMaybe(stream, state); @@ -83176,6 +85404,7 @@ var require_stream_writable = __commonJS({ state.ended = true; stream.writable = false; } + __name(endWritable, "endWritable"); function onCorkedFinish(corkReq, state, err) { var entry = corkReq.entry; corkReq.entry = null; @@ -83187,19 +85416,20 @@ var require_stream_writable = __commonJS({ } state.corkedRequestsFree.next = corkReq; } + __name(onCorkedFinish, "onCorkedFinish"); Object.defineProperty(Writable.prototype, "destroyed", { - get: function() { + get: /* @__PURE__ */ __name(function() { if (this._writableState === void 0) { return false; } return this._writableState.destroyed; - }, - set: function(value) { + }, "get"), + set: /* @__PURE__ */ __name(function(value) { if (!this._writableState) { return; } this._writableState.destroyed = value; - } + }, "set") }); Writable.prototype.destroy = destroyImpl.destroy; Writable.prototype._undestroy = destroyImpl.undestroy; @@ -83248,36 +85478,39 @@ var require_stream_duplex = __commonJS({ if (options && options.allowHalfOpen === false) this.allowHalfOpen = false; this.once("end", onend); } + __name(Duplex, "Duplex"); Object.defineProperty(Duplex.prototype, "writableHighWaterMark", { // making it explicit this property is not enumerable // because otherwise some prototype manipulation in // userland will fail enumerable: false, - get: function() { + get: /* @__PURE__ */ __name(function() { return this._writableState.highWaterMark; - } + }, "get") }); function onend() { if (this.allowHalfOpen || this._writableState.ended) return; pna.nextTick(onEndNT, this); } + __name(onend, "onend"); function onEndNT(self2) { self2.end(); } + __name(onEndNT, "onEndNT"); Object.defineProperty(Duplex.prototype, "destroyed", { - get: function() { + get: /* @__PURE__ */ __name(function() { if (this._readableState === void 0 || this._writableState === void 0) { return false; } return this._readableState.destroyed && this._writableState.destroyed; - }, - set: function(value) { + }, "get"), + set: /* @__PURE__ */ __name(function(value) { if (this._readableState === void 0 || this._writableState === void 0) { return; } this._readableState.destroyed = value; this._writableState.destroyed = value; - } + }, "set") }); Duplex.prototype._destroy = function(err, cb) { this.push(null); @@ -83338,11 +85571,13 @@ var require_string_decoder = __commonJS({ } } } + __name(_normalizeEncoding, "_normalizeEncoding"); function normalizeEncoding(enc) { var nenc = _normalizeEncoding(enc); if (typeof nenc !== "string" && (Buffer2.isEncoding === isEncoding || !isEncoding(enc))) throw new Error("Unknown encoding: " + enc); return nenc || enc; } + __name(normalizeEncoding, "normalizeEncoding"); exports2.StringDecoder = StringDecoder; function StringDecoder(encoding) { this.encoding = normalizeEncoding(encoding); @@ -83371,6 +85606,7 @@ var require_string_decoder = __commonJS({ this.lastTotal = 0; this.lastChar = Buffer2.allocUnsafe(nb); } + __name(StringDecoder, "StringDecoder"); StringDecoder.prototype.write = function(buf) { if (buf.length === 0) return ""; var r; @@ -83403,6 +85639,7 @@ var require_string_decoder = __commonJS({ else if (byte >> 3 === 30) return 4; return byte >> 6 === 2 ? -1 : -2; } + __name(utf8CheckByte, "utf8CheckByte"); function utf8CheckIncomplete(self2, buf, i) { var j = buf.length - 1; if (j < i) return 0; @@ -83428,6 +85665,7 @@ var require_string_decoder = __commonJS({ } return 0; } + __name(utf8CheckIncomplete, "utf8CheckIncomplete"); function utf8CheckExtraBytes(self2, buf, p) { if ((buf[0] & 192) !== 128) { self2.lastNeed = 0; @@ -83446,6 +85684,7 @@ var require_string_decoder = __commonJS({ } } } + __name(utf8CheckExtraBytes, "utf8CheckExtraBytes"); function utf8FillLast(buf) { var p = this.lastTotal - this.lastNeed; var r = utf8CheckExtraBytes(this, buf, p); @@ -83457,6 +85696,7 @@ var require_string_decoder = __commonJS({ buf.copy(this.lastChar, p, 0, buf.length); this.lastNeed -= buf.length; } + __name(utf8FillLast, "utf8FillLast"); function utf8Text(buf, i) { var total = utf8CheckIncomplete(this, buf, i); if (!this.lastNeed) return buf.toString("utf8", i); @@ -83465,11 +85705,13 @@ var require_string_decoder = __commonJS({ buf.copy(this.lastChar, 0, end); return buf.toString("utf8", i, end); } + __name(utf8Text, "utf8Text"); function utf8End(buf) { var r = buf && buf.length ? this.write(buf) : ""; if (this.lastNeed) return r + "\uFFFD"; return r; } + __name(utf8End, "utf8End"); function utf16Text(buf, i) { if ((buf.length - i) % 2 === 0) { var r = buf.toString("utf16le", i); @@ -83490,6 +85732,7 @@ var require_string_decoder = __commonJS({ this.lastChar[0] = buf[buf.length - 1]; return buf.toString("utf16le", i, buf.length - 1); } + __name(utf16Text, "utf16Text"); function utf16End(buf) { var r = buf && buf.length ? this.write(buf) : ""; if (this.lastNeed) { @@ -83498,6 +85741,7 @@ var require_string_decoder = __commonJS({ } return r; } + __name(utf16End, "utf16End"); function base64Text(buf, i) { var n = (buf.length - i) % 3; if (n === 0) return buf.toString("base64", i); @@ -83511,17 +85755,21 @@ var require_string_decoder = __commonJS({ } return buf.toString("base64", i, buf.length - n); } + __name(base64Text, "base64Text"); function base64End(buf) { var r = buf && buf.length ? this.write(buf) : ""; if (this.lastNeed) return r + this.lastChar.toString("base64", 0, 3 - this.lastNeed); return r; } + __name(base64End, "base64End"); function simpleWrite(buf) { return buf.toString(this.encoding); } + __name(simpleWrite, "simpleWrite"); function simpleEnd(buf) { return buf && buf.length ? this.write(buf) : ""; } + __name(simpleEnd, "simpleEnd"); } }); @@ -83535,9 +85783,9 @@ var require_stream_readable = __commonJS({ var Duplex; Readable.ReadableState = ReadableState; var EE = require("events").EventEmitter; - var EElistenerCount = function(emitter, type) { + var EElistenerCount = /* @__PURE__ */ __name(function(emitter, type) { return emitter.listeners(type).length; - }; + }, "EElistenerCount"); var Stream = require_stream(); var Buffer2 = require_safe_buffer().Buffer; var OurUint8Array = (typeof global !== "undefined" ? global : typeof window !== "undefined" ? window : typeof self !== "undefined" ? self : {}).Uint8Array || function() { @@ -83545,9 +85793,11 @@ var require_stream_readable = __commonJS({ function _uint8ArrayToBuffer(chunk) { return Buffer2.from(chunk); } + __name(_uint8ArrayToBuffer, "_uint8ArrayToBuffer"); function _isUint8Array(obj) { return Buffer2.isBuffer(obj) || obj instanceof OurUint8Array; } + __name(_isUint8Array, "_isUint8Array"); var util = Object.create(require_util9()); util.inherits = require_inherits(); var debugUtil = require("util"); @@ -83555,8 +85805,8 @@ var require_stream_readable = __commonJS({ if (debugUtil && debugUtil.debuglog) { debug = debugUtil.debuglog("stream"); } else { - debug = function() { - }; + debug = /* @__PURE__ */ __name(function() { + }, "debug"); } var BufferList = require_BufferList(); var destroyImpl = require_destroy(); @@ -83569,6 +85819,7 @@ var require_stream_readable = __commonJS({ else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn); else emitter._events[event] = [fn, emitter._events[event]]; } + __name(prependListener, "prependListener"); function ReadableState(options, stream) { Duplex = Duplex || require_stream_duplex(); options = options || {}; @@ -83607,6 +85858,7 @@ var require_stream_readable = __commonJS({ this.encoding = options.encoding; } } + __name(ReadableState, "ReadableState"); function Readable(options) { Duplex = Duplex || require_stream_duplex(); if (!(this instanceof Readable)) return new Readable(options); @@ -83618,19 +85870,20 @@ var require_stream_readable = __commonJS({ } Stream.call(this); } + __name(Readable, "Readable"); Object.defineProperty(Readable.prototype, "destroyed", { - get: function() { + get: /* @__PURE__ */ __name(function() { if (this._readableState === void 0) { return false; } return this._readableState.destroyed; - }, - set: function(value) { + }, "get"), + set: /* @__PURE__ */ __name(function(value) { if (!this._readableState) { return; } this._readableState.destroyed = value; - } + }, "set") }); Readable.prototype.destroy = destroyImpl.destroy; Readable.prototype._undestroy = destroyImpl.undestroy; @@ -83693,6 +85946,7 @@ var require_stream_readable = __commonJS({ } return needMoreData(state); } + __name(readableAddChunk, "readableAddChunk"); function addChunk(stream, state, chunk, addToFront) { if (state.flowing && state.length === 0 && !state.sync) { stream.emit("data", chunk); @@ -83705,6 +85959,7 @@ var require_stream_readable = __commonJS({ } maybeReadMore(stream, state); } + __name(addChunk, "addChunk"); function chunkInvalid(state, chunk) { var er; if (!_isUint8Array(chunk) && typeof chunk !== "string" && chunk !== void 0 && !state.objectMode) { @@ -83712,9 +85967,11 @@ var require_stream_readable = __commonJS({ } return er; } + __name(chunkInvalid, "chunkInvalid"); function needMoreData(state) { return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0); } + __name(needMoreData, "needMoreData"); Readable.prototype.isPaused = function() { return this._readableState.flowing === false; }; @@ -83739,6 +85996,7 @@ var require_stream_readable = __commonJS({ } return n; } + __name(computeNewHighWaterMark, "computeNewHighWaterMark"); function howMuchToRead(n, state) { if (n <= 0 || state.length === 0 && state.ended) return 0; if (state.objectMode) return 1; @@ -83754,6 +86012,7 @@ var require_stream_readable = __commonJS({ } return state.length; } + __name(howMuchToRead, "howMuchToRead"); Readable.prototype.read = function(n) { debug("read", n); n = parseInt(n, 10); @@ -83817,6 +86076,7 @@ var require_stream_readable = __commonJS({ state.ended = true; emitReadable(stream); } + __name(onEofChunk, "onEofChunk"); function emitReadable(stream) { var state = stream._readableState; state.needReadable = false; @@ -83827,17 +86087,20 @@ var require_stream_readable = __commonJS({ else emitReadable_(stream); } } + __name(emitReadable, "emitReadable"); function emitReadable_(stream) { debug("emit readable"); stream.emit("readable"); flow(stream); } + __name(emitReadable_, "emitReadable_"); function maybeReadMore(stream, state) { if (!state.readingMore) { state.readingMore = true; pna.nextTick(maybeReadMore_, stream, state); } } + __name(maybeReadMore, "maybeReadMore"); function maybeReadMore_(stream, state) { var len = state.length; while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) { @@ -83849,6 +86112,7 @@ var require_stream_readable = __commonJS({ } state.readingMore = false; } + __name(maybeReadMore_, "maybeReadMore_"); Readable.prototype._read = function(n) { this.emit("error", new Error("_read() is not implemented")); }; @@ -83882,10 +86146,12 @@ var require_stream_readable = __commonJS({ } } } + __name(onunpipe, "onunpipe"); function onend() { debug("onend"); dest.end(); } + __name(onend, "onend"); var ondrain = pipeOnDrain(src); dest.on("drain", ondrain); var cleanedUp = false; @@ -83902,6 +86168,7 @@ var require_stream_readable = __commonJS({ cleanedUp = true; if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain(); } + __name(cleanup, "cleanup"); var increasedAwaitDrain = false; src.on("data", ondata); function ondata(chunk) { @@ -83917,28 +86184,33 @@ var require_stream_readable = __commonJS({ src.pause(); } } + __name(ondata, "ondata"); function onerror(er) { debug("onerror", er); unpipe(); dest.removeListener("error", onerror); if (EElistenerCount(dest, "error") === 0) dest.emit("error", er); } + __name(onerror, "onerror"); prependListener(dest, "error", onerror); function onclose() { dest.removeListener("finish", onfinish); unpipe(); } + __name(onclose, "onclose"); dest.once("close", onclose); function onfinish() { debug("onfinish"); dest.removeListener("close", onclose); unpipe(); } + __name(onfinish, "onfinish"); dest.once("finish", onfinish); function unpipe() { debug("unpipe"); src.unpipe(dest); } + __name(unpipe, "unpipe"); dest.emit("pipe", src); if (!state.flowing) { debug("pipe resume"); @@ -83957,6 +86229,7 @@ var require_stream_readable = __commonJS({ } }; } + __name(pipeOnDrain, "pipeOnDrain"); Readable.prototype.unpipe = function(dest) { var state = this._readableState; var unpipeInfo = { hasUnpiped: false }; @@ -84012,6 +86285,7 @@ var require_stream_readable = __commonJS({ debug("readable nexttick read 0"); self2.read(0); } + __name(nReadingNextTick, "nReadingNextTick"); Readable.prototype.resume = function() { var state = this._readableState; if (!state.flowing) { @@ -84027,6 +86301,7 @@ var require_stream_readable = __commonJS({ pna.nextTick(resume_, stream, state); } } + __name(resume, "resume"); function resume_(stream, state) { if (!state.reading) { debug("resume read 0"); @@ -84038,6 +86313,7 @@ var require_stream_readable = __commonJS({ flow(stream); if (state.flowing && !state.reading) stream.read(0); } + __name(resume_, "resume_"); Readable.prototype.pause = function() { debug("call pause flowing=%j", this._readableState.flowing); if (false !== this._readableState.flowing) { @@ -84053,6 +86329,7 @@ var require_stream_readable = __commonJS({ while (state.flowing && stream.read() !== null) { } } + __name(flow, "flow"); Readable.prototype.wrap = function(stream) { var _this = this; var state = this._readableState; @@ -84102,9 +86379,9 @@ var require_stream_readable = __commonJS({ // because otherwise some prototype manipulation in // userland will fail enumerable: false, - get: function() { + get: /* @__PURE__ */ __name(function() { return this._readableState.highWaterMark; - } + }, "get") }); Readable._fromList = fromList; function fromList(n, state) { @@ -84121,6 +86398,7 @@ var require_stream_readable = __commonJS({ } return ret; } + __name(fromList, "fromList"); function fromListPartial(n, list, hasStrings) { var ret; if (n < list.head.data.length) { @@ -84133,6 +86411,7 @@ var require_stream_readable = __commonJS({ } return ret; } + __name(fromListPartial, "fromListPartial"); function copyFromBufferString(n, list) { var p = list.head; var c = 1; @@ -84160,6 +86439,7 @@ var require_stream_readable = __commonJS({ list.length -= c; return ret; } + __name(copyFromBufferString, "copyFromBufferString"); function copyFromBuffer(n, list) { var ret = Buffer2.allocUnsafe(n); var p = list.head; @@ -84187,6 +86467,7 @@ var require_stream_readable = __commonJS({ list.length -= c; return ret; } + __name(copyFromBuffer, "copyFromBuffer"); function endReadable(stream) { var state = stream._readableState; if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream'); @@ -84195,6 +86476,7 @@ var require_stream_readable = __commonJS({ pna.nextTick(endReadableNT, state, stream); } } + __name(endReadable, "endReadable"); function endReadableNT(state, stream) { if (!state.endEmitted && state.length === 0) { state.endEmitted = true; @@ -84202,12 +86484,14 @@ var require_stream_readable = __commonJS({ stream.emit("end"); } } + __name(endReadableNT, "endReadableNT"); function indexOf(xs, x) { for (var i = 0, l = xs.length; i < l; i++) { if (xs[i] === x) return i; } return -1; } + __name(indexOf, "indexOf"); } }); @@ -84238,6 +86522,7 @@ var require_stream_transform = __commonJS({ this._read(rs.highWaterMark); } } + __name(afterTransform, "afterTransform"); function Transform(options) { if (!(this instanceof Transform)) return new Transform(options); Duplex.call(this, options); @@ -84257,6 +86542,7 @@ var require_stream_transform = __commonJS({ } this.on("prefinish", prefinish); } + __name(Transform, "Transform"); function prefinish() { var _this = this; if (typeof this._flush === "function") { @@ -84267,6 +86553,7 @@ var require_stream_transform = __commonJS({ done(this, null, null); } } + __name(prefinish, "prefinish"); Transform.prototype.push = function(chunk, encoding) { this._transformState.needTransform = false; return Duplex.prototype.push.call(this, chunk, encoding); @@ -84308,6 +86595,7 @@ var require_stream_transform = __commonJS({ if (stream._transformState.transforming) throw new Error("Calling transform done when still transforming"); return stream.push(null); } + __name(done, "done"); } }); @@ -84324,6 +86612,7 @@ var require_stream_passthrough = __commonJS({ if (!(this instanceof PassThrough)) return new PassThrough(options); Transform.call(this, options); } + __name(PassThrough, "PassThrough"); PassThrough.prototype._transform = function(chunk, encoding, cb) { cb(null, chunk); }; @@ -84380,6 +86669,7 @@ var require_lazystream = __commonJS({ return this[method].apply(this, arguments); }; } + __name(beforeFirstCall, "beforeFirstCall"); function Readable(fn, options) { if (!(this instanceof Readable)) return new Readable(fn, options); @@ -84392,6 +86682,7 @@ var require_lazystream = __commonJS({ }); this.emit("readable"); } + __name(Readable, "Readable"); function Writable(fn, options) { if (!(this instanceof Writable)) return new Writable(fn, options); @@ -84404,6 +86695,7 @@ var require_lazystream = __commonJS({ }); this.emit("writable"); } + __name(Writable, "Writable"); } }); @@ -84440,6 +86732,7 @@ var require_identity = __commonJS({ function identity(value) { return value; } + __name(identity, "identity"); module2.exports = identity; } }); @@ -84460,6 +86753,7 @@ var require_apply = __commonJS({ } return func.apply(thisArg, args); } + __name(apply, "apply"); module2.exports = apply; } }); @@ -84485,6 +86779,7 @@ var require_overRest = __commonJS({ return apply(func, this, otherArgs); }; } + __name(overRest, "overRest"); module2.exports = overRest; } }); @@ -84497,6 +86792,7 @@ var require_constant = __commonJS({ return value; }; } + __name(constant, "constant"); module2.exports = constant; } }); @@ -84553,6 +86849,7 @@ var require_getRawTag = __commonJS({ } return result; } + __name(getRawTag, "getRawTag"); module2.exports = getRawTag; } }); @@ -84565,6 +86862,7 @@ var require_objectToString = __commonJS({ function objectToString(value) { return nativeObjectToString.call(value); } + __name(objectToString, "objectToString"); module2.exports = objectToString; } }); @@ -84584,6 +86882,7 @@ var require_baseGetTag = __commonJS({ } return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value); } + __name(baseGetTag, "baseGetTag"); module2.exports = baseGetTag; } }); @@ -84595,6 +86894,7 @@ var require_isObject = __commonJS({ var type = typeof value; return value != null && (type == "object" || type == "function"); } + __name(isObject, "isObject"); module2.exports = isObject; } }); @@ -84615,6 +86915,7 @@ var require_isFunction = __commonJS({ var tag = baseGetTag(value); return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; } + __name(isFunction, "isFunction"); module2.exports = isFunction; } }); @@ -84639,6 +86940,7 @@ var require_isMasked = __commonJS({ function isMasked(func) { return !!maskSrcKey && maskSrcKey in func; } + __name(isMasked, "isMasked"); module2.exports = isMasked; } }); @@ -84661,6 +86963,7 @@ var require_toSource = __commonJS({ } return ""; } + __name(toSource, "toSource"); module2.exports = toSource; } }); @@ -84688,6 +86991,7 @@ var require_baseIsNative = __commonJS({ var pattern = isFunction(value) ? reIsNative : reIsHostCtor; return pattern.test(toSource(value)); } + __name(baseIsNative, "baseIsNative"); module2.exports = baseIsNative; } }); @@ -84698,6 +87002,7 @@ var require_getValue = __commonJS({ function getValue(object, key) { return object == null ? void 0 : object[key]; } + __name(getValue, "getValue"); module2.exports = getValue; } }); @@ -84711,6 +87016,7 @@ var require_getNative = __commonJS({ var value = getValue(object, key); return baseIsNative(value) ? value : void 0; } + __name(getNative, "getNative"); module2.exports = getNative; } }); @@ -84770,6 +87076,7 @@ var require_shortOut = __commonJS({ return func.apply(void 0, arguments); }; } + __name(shortOut, "shortOut"); module2.exports = shortOut; } }); @@ -84793,6 +87100,7 @@ var require_baseRest = __commonJS({ function baseRest(func, start) { return setToString(overRest(func, start, identity), func + ""); } + __name(baseRest, "baseRest"); module2.exports = baseRest; } }); @@ -84803,6 +87111,7 @@ var require_eq = __commonJS({ function eq(value, other) { return value === other || value !== value && other !== other; } + __name(eq, "eq"); module2.exports = eq; } }); @@ -84814,6 +87123,7 @@ var require_isLength = __commonJS({ function isLength(value) { return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; } + __name(isLength, "isLength"); module2.exports = isLength; } }); @@ -84826,6 +87136,7 @@ var require_isArrayLike = __commonJS({ function isArrayLike(value) { return value != null && isLength(value.length) && !isFunction(value); } + __name(isArrayLike, "isArrayLike"); module2.exports = isArrayLike; } }); @@ -84840,6 +87151,7 @@ var require_isIndex = __commonJS({ length = length == null ? MAX_SAFE_INTEGER : length; return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length); } + __name(isIndex, "isIndex"); module2.exports = isIndex; } }); @@ -84861,6 +87173,7 @@ var require_isIterateeCall = __commonJS({ } return false; } + __name(isIterateeCall, "isIterateeCall"); module2.exports = isIterateeCall; } }); @@ -84875,6 +87188,7 @@ var require_baseTimes = __commonJS({ } return result; } + __name(baseTimes, "baseTimes"); module2.exports = baseTimes; } }); @@ -84885,6 +87199,7 @@ var require_isObjectLike = __commonJS({ function isObjectLike(value) { return value != null && typeof value == "object"; } + __name(isObjectLike, "isObjectLike"); module2.exports = isObjectLike; } }); @@ -84898,6 +87213,7 @@ var require_baseIsArguments = __commonJS({ function baseIsArguments(value) { return isObjectLike(value) && baseGetTag(value) == argsTag; } + __name(baseIsArguments, "baseIsArguments"); module2.exports = baseIsArguments; } }); @@ -84933,6 +87249,7 @@ var require_stubFalse = __commonJS({ function stubFalse() { return false; } + __name(stubFalse, "stubFalse"); module2.exports = stubFalse; } }); @@ -84988,6 +87305,7 @@ var require_baseIsTypedArray = __commonJS({ function baseIsTypedArray(value) { return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; } + __name(baseIsTypedArray, "baseIsTypedArray"); module2.exports = baseIsTypedArray; } }); @@ -85000,6 +87318,7 @@ var require_baseUnary = __commonJS({ return func(value); }; } + __name(baseUnary, "baseUnary"); module2.exports = baseUnary; } }); @@ -85062,6 +87381,7 @@ var require_arrayLikeKeys = __commonJS({ } return result; } + __name(arrayLikeKeys, "arrayLikeKeys"); module2.exports = arrayLikeKeys; } }); @@ -85074,6 +87394,7 @@ var require_isPrototype = __commonJS({ var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto; return value === proto; } + __name(isPrototype, "isPrototype"); module2.exports = isPrototype; } }); @@ -85090,6 +87411,7 @@ var require_nativeKeysIn = __commonJS({ } return result; } + __name(nativeKeysIn, "nativeKeysIn"); module2.exports = nativeKeysIn; } }); @@ -85114,6 +87436,7 @@ var require_baseKeysIn = __commonJS({ } return result; } + __name(baseKeysIn, "baseKeysIn"); module2.exports = baseKeysIn; } }); @@ -85127,6 +87450,7 @@ var require_keysIn = __commonJS({ function keysIn(object) { return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); } + __name(keysIn, "keysIn"); module2.exports = keysIn; } }); @@ -85288,6 +87612,7 @@ var require_event_target_shim = __commonJS({ ); return retv; } + __name(pd, "pd"); function setCancelFlag(data) { if (data.passiveListener != null) { if (typeof console !== "undefined" && typeof console.error === "function") { @@ -85306,6 +87631,7 @@ var require_event_target_shim = __commonJS({ data.event.preventDefault(); } } + __name(setCancelFlag, "setCancelFlag"); function Event2(eventTarget, event) { privateData.set(this, { eventTarget, @@ -85327,6 +87653,7 @@ var require_event_target_shim = __commonJS({ } } } + __name(Event2, "Event"); Event2.prototype = { /** * The type of this event. @@ -85529,6 +87856,7 @@ var require_event_target_shim = __commonJS({ enumerable: true }; } + __name(defineRedirectDescriptor, "defineRedirectDescriptor"); function defineCallDescriptor(key) { return { value() { @@ -85539,6 +87867,7 @@ var require_event_target_shim = __commonJS({ enumerable: true }; } + __name(defineCallDescriptor, "defineCallDescriptor"); function defineWrapper(BaseEvent, proto) { const keys = Object.keys(proto); if (keys.length === 0) { @@ -85547,6 +87876,7 @@ var require_event_target_shim = __commonJS({ function CustomEvent(eventTarget, event) { BaseEvent.call(this, eventTarget, event); } + __name(CustomEvent, "CustomEvent"); CustomEvent.prototype = Object.create(BaseEvent.prototype, { constructor: { value: CustomEvent, configurable: true, writable: true } }); @@ -85564,6 +87894,7 @@ var require_event_target_shim = __commonJS({ } return CustomEvent; } + __name(defineWrapper, "defineWrapper"); function getWrapper(proto) { if (proto == null || proto === Object.prototype) { return Event2; @@ -85575,22 +87906,28 @@ var require_event_target_shim = __commonJS({ } return wrapper; } + __name(getWrapper, "getWrapper"); function wrapEvent(eventTarget, event) { const Wrapper = getWrapper(Object.getPrototypeOf(event)); return new Wrapper(eventTarget, event); } + __name(wrapEvent, "wrapEvent"); function isStopped(event) { return pd(event).immediateStopped; } + __name(isStopped, "isStopped"); function setEventPhase(event, eventPhase) { pd(event).eventPhase = eventPhase; } + __name(setEventPhase, "setEventPhase"); function setCurrentTarget(event, currentTarget) { pd(event).currentTarget = currentTarget; } + __name(setCurrentTarget, "setCurrentTarget"); function setPassiveListener(event, passiveListener) { pd(event).passiveListener = passiveListener; } + __name(setPassiveListener, "setPassiveListener"); var listenersMap = /* @__PURE__ */ new WeakMap(); var CAPTURE = 1; var BUBBLE = 2; @@ -85598,6 +87935,7 @@ var require_event_target_shim = __commonJS({ function isObject(x) { return x !== null && typeof x === "object"; } + __name(isObject, "isObject"); function getListeners(eventTarget) { const listeners = listenersMap.get(eventTarget); if (listeners == null) { @@ -85607,6 +87945,7 @@ var require_event_target_shim = __commonJS({ } return listeners; } + __name(getListeners, "getListeners"); function defineEventAttributeDescriptor(eventName) { return { get() { @@ -85660,6 +87999,7 @@ var require_event_target_shim = __commonJS({ enumerable: true }; } + __name(defineEventAttributeDescriptor, "defineEventAttributeDescriptor"); function defineEventAttribute(eventTargetPrototype, eventName) { Object.defineProperty( eventTargetPrototype, @@ -85667,10 +88007,12 @@ var require_event_target_shim = __commonJS({ defineEventAttributeDescriptor(eventName) ); } + __name(defineEventAttribute, "defineEventAttribute"); function defineCustomEventTarget(eventNames) { function CustomEventTarget() { EventTarget2.call(this); } + __name(CustomEventTarget, "CustomEventTarget"); CustomEventTarget.prototype = Object.create(EventTarget2.prototype, { constructor: { value: CustomEventTarget, @@ -85683,6 +88025,7 @@ var require_event_target_shim = __commonJS({ } return CustomEventTarget; } + __name(defineCustomEventTarget, "defineCustomEventTarget"); function EventTarget2() { if (this instanceof EventTarget2) { listenersMap.set(this, /* @__PURE__ */ new Map()); @@ -85700,6 +88043,7 @@ var require_event_target_shim = __commonJS({ } throw new TypeError("Cannot call a class as a function"); } + __name(EventTarget2, "EventTarget"); EventTarget2.prototype = { /** * Add a given listener to this event target. @@ -85851,6 +88195,9 @@ var require_abort_controller = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); var eventTargetShim = require_event_target_shim(); var AbortSignal2 = class extends eventTargetShim.EventTarget { + static { + __name(this, "AbortSignal"); + } /** * AbortSignal cannot be constructed directly. */ @@ -85876,6 +88223,7 @@ var require_abort_controller = __commonJS({ abortedFlags.set(signal, false); return signal; } + __name(createAbortSignal, "createAbortSignal"); function abortSignal(signal) { if (abortedFlags.get(signal) !== false) { return; @@ -85883,6 +88231,7 @@ var require_abort_controller = __commonJS({ abortedFlags.set(signal, true); signal.dispatchEvent({ type: "abort" }); } + __name(abortSignal, "abortSignal"); var abortedFlags = /* @__PURE__ */ new WeakMap(); Object.defineProperties(AbortSignal2.prototype, { aborted: { enumerable: true } @@ -85894,6 +88243,9 @@ var require_abort_controller = __commonJS({ }); } var AbortController2 = class { + static { + __name(this, "AbortController"); + } /** * Initialize this controller. */ @@ -85921,6 +88273,7 @@ var require_abort_controller = __commonJS({ } return signal; } + __name(getSignal, "getSignal"); Object.defineProperties(AbortController2.prototype, { signal: { enumerable: true }, abort: { enumerable: true } @@ -85951,20 +88304,23 @@ var require_util10 = __commonJS({ var AsyncFunction = Object.getPrototypeOf(async function() { }).constructor; var Blob2 = globalThis.Blob || bufferModule.Blob; - var isBlob = typeof Blob2 !== "undefined" ? function isBlob2(b) { + var isBlob = typeof Blob2 !== "undefined" ? /* @__PURE__ */ __name(function isBlob2(b) { return b instanceof Blob2; - } : function isBlob2(b) { + }, "isBlob") : /* @__PURE__ */ __name(function isBlob2(b) { return false; - }; - var validateAbortSignal = (signal, name) => { + }, "isBlob"); + var validateAbortSignal = /* @__PURE__ */ __name((signal, name) => { if (signal !== void 0 && (signal === null || typeof signal !== "object" || !("aborted" in signal))) { throw new ERR_INVALID_ARG_TYPE(name, "AbortSignal", signal); } - }; - var validateFunction = (value, name) => { + }, "validateAbortSignal"); + var validateFunction = /* @__PURE__ */ __name((value, name) => { if (typeof value !== "function") throw new ERR_INVALID_ARG_TYPE(name, "Function", value); - }; + }, "validateFunction"); var AggregateError = class extends Error { + static { + __name(this, "AggregateError"); + } constructor(errors) { if (!Array.isArray(errors)) { throw new TypeError(`Expected input to be an Array, got ${typeof errors}`); @@ -85992,7 +88348,7 @@ var require_util10 = __commonJS({ callback.apply(this, args); }; }, - createDeferredPromise: function() { + createDeferredPromise: /* @__PURE__ */ __name(function() { let resolve; let reject; const promise = new Promise((res, rej) => { @@ -86004,7 +88360,7 @@ var require_util10 = __commonJS({ resolve, reject }; - }, + }, "createDeferredPromise"), promisify(fn) { return new Promise((resolve, reject) => { fn((err, ...args) => { @@ -86073,7 +88429,7 @@ var require_util10 = __commonJS({ deprecate(fn, message) { return fn; }, - addAbortListener: require("events").addAbortListener || function addAbortListener(signal, listener) { + addAbortListener: require("events").addAbortListener || /* @__PURE__ */ __name(function addAbortListener(signal, listener) { if (signal === void 0) { throw new ERR_INVALID_ARG_TYPE("signal", "AbortSignal", signal); } @@ -86088,9 +88444,9 @@ var require_util10 = __commonJS({ once: true, [kResistStopPropagation]: true }); - removeEventListener = () => { + removeEventListener = /* @__PURE__ */ __name(() => { signal.removeEventListener("abort", listener); - }; + }, "removeEventListener"); } return { __proto__: null, @@ -86099,13 +88455,13 @@ var require_util10 = __commonJS({ (_removeEventListener = removeEventListener) === null || _removeEventListener === void 0 ? void 0 : _removeEventListener(); } }; - }, - AbortSignalAny: AbortSignal2.any || function AbortSignalAny(signals) { + }, "addAbortListener"), + AbortSignalAny: AbortSignal2.any || /* @__PURE__ */ __name(function AbortSignalAny(signals) { if (signals.length === 1) { return signals[0]; } const ac = new AbortController2(); - const abort = () => ac.abort(); + const abort = /* @__PURE__ */ __name(() => ac.abort(), "abort"); signals.forEach((signal) => { validateAbortSignal(signal, "signals"); signal.addEventListener("abort", abort, { @@ -86122,7 +88478,7 @@ var require_util10 = __commonJS({ } ); return ac.signal; - } + }, "AbortSignalAny") }; module2.exports.promisify.custom = Symbol.for("nodejs.util.promisify.custom"); } @@ -86155,6 +88511,7 @@ var require_errors4 = __commonJS({ throw new codes.ERR_INTERNAL_ASSERTION(message); } } + __name(assert, "assert"); function addNumericalSeparator(val) { let res = ""; let i = val.length; @@ -86164,6 +88521,7 @@ var require_errors4 = __commonJS({ } return `${val.slice(0, i)}${res}`; } + __name(addNumericalSeparator, "addNumericalSeparator"); function getMessage(key, msg, args) { if (typeof msg === "function") { assert( @@ -86183,11 +88541,15 @@ var require_errors4 = __commonJS({ } return format(msg, ...args); } + __name(getMessage, "getMessage"); function E(code, message, Base) { if (!Base) { Base = Error; } class NodeError extends Base { + static { + __name(this, "NodeError"); + } constructor(...args) { super(getMessage(code, message, args)); } @@ -86215,6 +88577,7 @@ var require_errors4 = __commonJS({ NodeError.prototype[kIsNodeError] = true; codes[code] = NodeError; } + __name(E, "E"); function hideStackFrames(fn) { const hidden = nodeInternalPrefix + fn.name; Object.defineProperty(fn, "name", { @@ -86222,6 +88585,7 @@ var require_errors4 = __commonJS({ }); return fn; } + __name(hideStackFrames, "hideStackFrames"); function aggregateTwoErrors(innerError, outerError) { if (innerError && outerError && innerError !== outerError) { if (Array.isArray(outerError.errors)) { @@ -86234,7 +88598,11 @@ var require_errors4 = __commonJS({ } return innerError || outerError; } + __name(aggregateTwoErrors, "aggregateTwoErrors"); var AbortError = class extends Error { + static { + __name(this, "AbortError"); + } constructor(message = "The operation was aborted", options = void 0) { if (options !== void 0 && typeof options !== "object") { throw new codes.ERR_INVALID_ARG_TYPE("options", "Object", options); @@ -86474,9 +88842,11 @@ var require_validators = __commonJS({ function isInt32(value) { return value === (value | 0); } + __name(isInt32, "isInt32"); function isUint32(value) { return value === value >>> 0; } + __name(isUint32, "isUint32"); var octalReg = /^[0-7]+$/; var modeDesc = "must be a 32-bit unsigned integer or an octal string"; function parseFileMode(value, name, def) { @@ -86492,6 +88862,7 @@ var require_validators = __commonJS({ validateUint32(value, name); return value; } + __name(parseFileMode, "parseFileMode"); var validateInteger = hideStackFrames((value, name, min = NumberMIN_SAFE_INTEGER, max = NumberMAX_SAFE_INTEGER) => { if (typeof value !== "number") throw new ERR_INVALID_ARG_TYPE2(name, "number", value); if (!NumberIsInteger(value)) throw new ERR_OUT_OF_RANGE(name, "an integer", value); @@ -86524,6 +88895,7 @@ var require_validators = __commonJS({ function validateString(value, name) { if (typeof value !== "string") throw new ERR_INVALID_ARG_TYPE2(name, "string", value); } + __name(validateString, "validateString"); function validateNumber(value, name, min = void 0, max) { if (typeof value !== "number") throw new ERR_INVALID_ARG_TYPE2(name, "number", value); if (min != null && value < min || max != null && value > max || (min != null || max != null) && NumberIsNaN(value)) { @@ -86534,6 +88906,7 @@ var require_validators = __commonJS({ ); } } + __name(validateNumber, "validateNumber"); var validateOneOf = hideStackFrames((value, name, oneOf) => { if (!ArrayPrototypeIncludes(oneOf, value)) { const allowed = ArrayPrototypeJoin( @@ -86547,9 +88920,11 @@ var require_validators = __commonJS({ function validateBoolean(value, name) { if (typeof value !== "boolean") throw new ERR_INVALID_ARG_TYPE2(name, "boolean", value); } + __name(validateBoolean, "validateBoolean"); function getOwnPropertyValueOrDefault(options, key, defaultValue) { return options == null || !ObjectPrototypeHasOwnProperty(options, key) ? defaultValue : options[key]; } + __name(getOwnPropertyValueOrDefault, "getOwnPropertyValueOrDefault"); var validateObject = hideStackFrames((value, name, options = null) => { const allowArray = getOwnPropertyValueOrDefault(options, "allowArray", false); const allowFunction = getOwnPropertyValueOrDefault(options, "allowFunction", false); @@ -86578,12 +88953,14 @@ var require_validators = __commonJS({ validateString(value[i], `${name}[${i}]`); } } + __name(validateStringArray, "validateStringArray"); function validateBooleanArray(value, name) { validateArray(value, name); for (let i = 0; i < value.length; i++) { validateBoolean(value[i], `${name}[${i}]`); } } + __name(validateBooleanArray, "validateBooleanArray"); function validateAbortSignalArray(value, name) { validateArray(value, name); for (let i = 0; i < value.length; i++) { @@ -86595,6 +88972,7 @@ var require_validators = __commonJS({ validateAbortSignal(signal, indexedName); } } + __name(validateAbortSignalArray, "validateAbortSignalArray"); function validateSignalName(signal, name = "signal") { validateString(signal, name); if (signals[signal] === void 0) { @@ -86604,6 +88982,7 @@ var require_validators = __commonJS({ throw new ERR_UNKNOWN_SIGNAL(signal); } } + __name(validateSignalName, "validateSignalName"); var validateBuffer = hideStackFrames((buffer, name = "buffer") => { if (!isArrayBufferView(buffer)) { throw new ERR_INVALID_ARG_TYPE2(name, ["Buffer", "TypedArray", "DataView"], buffer); @@ -86616,12 +88995,14 @@ var require_validators = __commonJS({ throw new ERR_INVALID_ARG_VALUE("encoding", encoding, `is invalid for data of length ${length}`); } } + __name(validateEncoding, "validateEncoding"); function validatePort(port, name = "Port", allowZero = true) { if (typeof port !== "number" && typeof port !== "string" || typeof port === "string" && StringPrototypeTrim(port).length === 0 || +port !== +port >>> 0 || port > 65535 || port === 0 && !allowZero) { throw new ERR_SOCKET_BAD_PORT(name, port, allowZero); } return port | 0; } + __name(validatePort, "validatePort"); var validateAbortSignal = hideStackFrames((signal, name) => { if (signal !== void 0 && (signal === null || typeof signal !== "object" || !("aborted" in signal))) { throw new ERR_INVALID_ARG_TYPE2(name, "AbortSignal", signal); @@ -86641,6 +89022,7 @@ var require_validators = __commonJS({ throw new ERR_INVALID_ARG_TYPE2(name, `('${ArrayPrototypeJoin(union, "|")}')`, value); } } + __name(validateUnion, "validateUnion"); var linkValueRegExp = /^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/; function validateLinkHeaderFormat(value, name) { if (typeof value === "undefined" || !RegExpPrototypeExec(linkValueRegExp, value)) { @@ -86651,6 +89033,7 @@ var require_validators = __commonJS({ ); } } + __name(validateLinkHeaderFormat, "validateLinkHeaderFormat"); function validateLinkHeaderValue(hints) { if (typeof hints === "string") { validateLinkHeaderFormat(hints, "hints"); @@ -86677,6 +89060,7 @@ var require_validators = __commonJS({ 'must be an array or string of format "; rel=preload; as=style"' ); } + __name(validateLinkHeaderValue, "validateLinkHeaderValue"); module2.exports = { isInt32, isUint32, @@ -86732,34 +89116,43 @@ var require_utils4 = __commonJS({ return !!(obj && typeof obj.pipe === "function" && typeof obj.on === "function" && (!strict || typeof obj.pause === "function" && typeof obj.resume === "function") && (!obj._writableState || ((_obj$_readableState = obj._readableState) === null || _obj$_readableState === void 0 ? void 0 : _obj$_readableState.readable) !== false) && // Duplex (!obj._writableState || obj._readableState)); } + __name(isReadableNodeStream, "isReadableNodeStream"); function isWritableNodeStream(obj) { var _obj$_writableState; return !!(obj && typeof obj.write === "function" && typeof obj.on === "function" && (!obj._readableState || ((_obj$_writableState = obj._writableState) === null || _obj$_writableState === void 0 ? void 0 : _obj$_writableState.writable) !== false)); } + __name(isWritableNodeStream, "isWritableNodeStream"); function isDuplexNodeStream(obj) { return !!(obj && typeof obj.pipe === "function" && obj._readableState && typeof obj.on === "function" && typeof obj.write === "function"); } + __name(isDuplexNodeStream, "isDuplexNodeStream"); function isNodeStream(obj) { return obj && (obj._readableState || obj._writableState || typeof obj.write === "function" && typeof obj.on === "function" || typeof obj.pipe === "function" && typeof obj.on === "function"); } + __name(isNodeStream, "isNodeStream"); function isReadableStream(obj) { return !!(obj && !isNodeStream(obj) && typeof obj.pipeThrough === "function" && typeof obj.getReader === "function" && typeof obj.cancel === "function"); } + __name(isReadableStream, "isReadableStream"); function isWritableStream(obj) { return !!(obj && !isNodeStream(obj) && typeof obj.getWriter === "function" && typeof obj.abort === "function"); } + __name(isWritableStream, "isWritableStream"); function isTransformStream(obj) { return !!(obj && !isNodeStream(obj) && typeof obj.readable === "object" && typeof obj.writable === "object"); } + __name(isTransformStream, "isTransformStream"); function isWebStream(obj) { return isReadableStream(obj) || isWritableStream(obj) || isTransformStream(obj); } + __name(isWebStream, "isWebStream"); function isIterable(obj, isAsync) { if (obj == null) return false; if (isAsync === true) return typeof obj[SymbolAsyncIterator] === "function"; if (isAsync === false) return typeof obj[SymbolIterator] === "function"; return typeof obj[SymbolAsyncIterator] === "function" || typeof obj[SymbolIterator] === "function"; } + __name(isIterable, "isIterable"); function isDestroyed(stream) { if (!isNodeStream(stream)) return null; const wState = stream._writableState; @@ -86767,6 +89160,7 @@ var require_utils4 = __commonJS({ const state = wState || rState; return !!(stream.destroyed || stream[kIsDestroyed] || state !== null && state !== void 0 && state.destroyed); } + __name(isDestroyed, "isDestroyed"); function isWritableEnded(stream) { if (!isWritableNodeStream(stream)) return null; if (stream.writableEnded === true) return true; @@ -86775,6 +89169,7 @@ var require_utils4 = __commonJS({ if (typeof (wState === null || wState === void 0 ? void 0 : wState.ended) !== "boolean") return null; return wState.ended; } + __name(isWritableEnded, "isWritableEnded"); function isWritableFinished(stream, strict) { if (!isWritableNodeStream(stream)) return null; if (stream.writableFinished === true) return true; @@ -86783,6 +89178,7 @@ var require_utils4 = __commonJS({ if (typeof (wState === null || wState === void 0 ? void 0 : wState.finished) !== "boolean") return null; return !!(wState.finished || strict === false && wState.ended === true && wState.length === 0); } + __name(isWritableFinished, "isWritableFinished"); function isReadableEnded(stream) { if (!isReadableNodeStream(stream)) return null; if (stream.readableEnded === true) return true; @@ -86791,6 +89187,7 @@ var require_utils4 = __commonJS({ if (typeof (rState === null || rState === void 0 ? void 0 : rState.ended) !== "boolean") return null; return rState.ended; } + __name(isReadableEnded, "isReadableEnded"); function isReadableFinished(stream, strict) { if (!isReadableNodeStream(stream)) return null; const rState = stream._readableState; @@ -86798,18 +89195,21 @@ var require_utils4 = __commonJS({ if (typeof (rState === null || rState === void 0 ? void 0 : rState.endEmitted) !== "boolean") return null; return !!(rState.endEmitted || strict === false && rState.ended === true && rState.length === 0); } + __name(isReadableFinished, "isReadableFinished"); function isReadable(stream) { if (stream && stream[kIsReadable] != null) return stream[kIsReadable]; if (typeof (stream === null || stream === void 0 ? void 0 : stream.readable) !== "boolean") return null; if (isDestroyed(stream)) return false; return isReadableNodeStream(stream) && stream.readable && !isReadableFinished(stream); } + __name(isReadable, "isReadable"); function isWritable(stream) { if (stream && stream[kIsWritable] != null) return stream[kIsWritable]; if (typeof (stream === null || stream === void 0 ? void 0 : stream.writable) !== "boolean") return null; if (isDestroyed(stream)) return false; return isWritableNodeStream(stream) && stream.writable && !isWritableEnded(stream); } + __name(isWritable, "isWritable"); function isFinished(stream, opts) { if (!isNodeStream(stream)) { return null; @@ -86825,6 +89225,7 @@ var require_utils4 = __commonJS({ } return true; } + __name(isFinished, "isFinished"); function isWritableErrored(stream) { var _stream$_writableStat, _stream$_writableStat2; if (!isNodeStream(stream)) { @@ -86835,6 +89236,7 @@ var require_utils4 = __commonJS({ } return (_stream$_writableStat = (_stream$_writableStat2 = stream._writableState) === null || _stream$_writableStat2 === void 0 ? void 0 : _stream$_writableStat2.errored) !== null && _stream$_writableStat !== void 0 ? _stream$_writableStat : null; } + __name(isWritableErrored, "isWritableErrored"); function isReadableErrored(stream) { var _stream$_readableStat, _stream$_readableStat2; if (!isNodeStream(stream)) { @@ -86845,6 +89247,7 @@ var require_utils4 = __commonJS({ } return (_stream$_readableStat = (_stream$_readableStat2 = stream._readableState) === null || _stream$_readableStat2 === void 0 ? void 0 : _stream$_readableStat2.errored) !== null && _stream$_readableStat !== void 0 ? _stream$_readableStat : null; } + __name(isReadableErrored, "isReadableErrored"); function isClosed(stream) { if (!isNodeStream(stream)) { return null; @@ -86862,16 +89265,20 @@ var require_utils4 = __commonJS({ } return null; } + __name(isClosed, "isClosed"); function isOutgoingMessage(stream) { return typeof stream._closed === "boolean" && typeof stream._defaultKeepAlive === "boolean" && typeof stream._removedConnection === "boolean" && typeof stream._removedContLen === "boolean"; } + __name(isOutgoingMessage, "isOutgoingMessage"); function isServerResponse(stream) { return typeof stream._sent100 === "boolean" && isOutgoingMessage(stream); } + __name(isServerResponse, "isServerResponse"); function isServerRequest(stream) { var _stream$req; return typeof stream._consuming === "boolean" && typeof stream._dumped === "boolean" && ((_stream$req = stream.req) === null || _stream$req === void 0 ? void 0 : _stream$req.upgradeOrConnect) === void 0; } + __name(isServerRequest, "isServerRequest"); function willEmitClose(stream) { if (!isNodeStream(stream)) return null; const wState = stream._writableState; @@ -86879,14 +89286,17 @@ var require_utils4 = __commonJS({ const state = wState || rState; return !state && isServerResponse(stream) || !!(state && state.autoDestroy && state.emitClose && state.closed === false); } + __name(willEmitClose, "willEmitClose"); function isDisturbed(stream) { var _stream$kIsDisturbed; return !!(stream && ((_stream$kIsDisturbed = stream[kIsDisturbed]) !== null && _stream$kIsDisturbed !== void 0 ? _stream$kIsDisturbed : stream.readableDidRead || stream.readableAborted)); } + __name(isDisturbed, "isDisturbed"); function isErrored(stream) { var _ref, _ref2, _ref3, _ref4, _ref5, _stream$kIsErrored, _stream$_readableStat3, _stream$_writableStat3, _stream$_readableStat4, _stream$_writableStat4; return !!(stream && ((_ref = (_ref2 = (_ref3 = (_ref4 = (_ref5 = (_stream$kIsErrored = stream[kIsErrored]) !== null && _stream$kIsErrored !== void 0 ? _stream$kIsErrored : stream.readableErrored) !== null && _ref5 !== void 0 ? _ref5 : stream.writableErrored) !== null && _ref4 !== void 0 ? _ref4 : (_stream$_readableStat3 = stream._readableState) === null || _stream$_readableStat3 === void 0 ? void 0 : _stream$_readableStat3.errorEmitted) !== null && _ref3 !== void 0 ? _ref3 : (_stream$_writableStat3 = stream._writableState) === null || _stream$_writableStat3 === void 0 ? void 0 : _stream$_writableStat3.errorEmitted) !== null && _ref2 !== void 0 ? _ref2 : (_stream$_readableStat4 = stream._readableState) === null || _stream$_readableStat4 === void 0 ? void 0 : _stream$_readableStat4.errored) !== null && _ref !== void 0 ? _ref : (_stream$_writableStat4 = stream._writableState) === null || _stream$_writableStat4 === void 0 ? void 0 : _stream$_writableStat4.errored)); } + __name(isErrored, "isErrored"); module2.exports = { isDestroyed, kIsDestroyed, @@ -86953,8 +89363,9 @@ var require_end_of_stream = __commonJS({ function isRequest(stream) { return stream.setHeader && typeof stream.abort === "function"; } - var nop = () => { - }; + __name(isRequest, "isRequest"); + var nop = /* @__PURE__ */ __name(() => { + }, "nop"); function eos(stream, options, callback) { var _options$readable, _options$writable; if (arguments.length === 2) { @@ -86978,14 +89389,14 @@ var require_end_of_stream = __commonJS({ const writable = (_options$writable = options.writable) !== null && _options$writable !== void 0 ? _options$writable : isWritableNodeStream(stream); const wState = stream._writableState; const rState = stream._readableState; - const onlegacyfinish = () => { + const onlegacyfinish = /* @__PURE__ */ __name(() => { if (!stream.writable) { onfinish(); } - }; + }, "onlegacyfinish"); let willEmitClose = _willEmitClose(stream) && isReadableNodeStream(stream) === readable && isWritableNodeStream(stream) === writable; let writableFinished = isWritableFinished(stream, false); - const onfinish = () => { + const onfinish = /* @__PURE__ */ __name(() => { writableFinished = true; if (stream.destroyed) { willEmitClose = false; @@ -86996,9 +89407,9 @@ var require_end_of_stream = __commonJS({ if (!readable || readableFinished) { callback.call(stream); } - }; + }, "onfinish"); let readableFinished = isReadableFinished(stream, false); - const onend = () => { + const onend = /* @__PURE__ */ __name(() => { readableFinished = true; if (stream.destroyed) { willEmitClose = false; @@ -87009,12 +89420,12 @@ var require_end_of_stream = __commonJS({ if (!writable || writableFinished) { callback.call(stream); } - }; - const onerror = (err) => { + }, "onend"); + const onerror = /* @__PURE__ */ __name((err) => { callback.call(stream, err); - }; + }, "onerror"); let closed = isClosed(stream); - const onclose = () => { + const onclose = /* @__PURE__ */ __name(() => { closed = true; const errored = isWritableErrored(stream) || isReadableErrored(stream); if (errored && typeof errored !== "boolean") { @@ -87027,18 +89438,18 @@ var require_end_of_stream = __commonJS({ if (!isWritableFinished(stream, false)) return callback.call(stream, new ERR_STREAM_PREMATURE_CLOSE()); } callback.call(stream); - }; - const onclosed = () => { + }, "onclose"); + const onclosed = /* @__PURE__ */ __name(() => { closed = true; const errored = isWritableErrored(stream) || isReadableErrored(stream); if (errored && typeof errored !== "boolean") { return callback.call(stream, errored); } callback.call(stream); - }; - const onrequest = () => { + }, "onclosed"); + const onrequest = /* @__PURE__ */ __name(() => { stream.req.on("finish", onfinish); - }; + }, "onrequest"); if (isRequest(stream)) { stream.on("complete", onfinish); if (!willEmitClose) { @@ -87075,7 +89486,7 @@ var require_end_of_stream = __commonJS({ } else if (rState && stream.req && stream.aborted) { process2.nextTick(onclosed); } - const cleanup = () => { + const cleanup = /* @__PURE__ */ __name(() => { callback = nop; stream.removeListener("aborted", onclose); stream.removeListener("complete", onfinish); @@ -87088,9 +89499,9 @@ var require_end_of_stream = __commonJS({ stream.removeListener("end", onend); stream.removeListener("error", onerror); stream.removeListener("close", onclose); - }; + }, "cleanup"); if (options.signal && !closed) { - const abort = () => { + const abort = /* @__PURE__ */ __name(() => { const endCallback = callback; cleanup(); endCallback.call( @@ -87099,7 +89510,7 @@ var require_end_of_stream = __commonJS({ cause: options.signal.reason }) ); - }; + }, "abort"); if (options.signal.aborted) { process2.nextTick(abort); } else { @@ -87114,11 +89525,12 @@ var require_end_of_stream = __commonJS({ } return cleanup; } + __name(eos, "eos"); function eosWeb(stream, options, callback) { let isAborted = false; let abort = nop; if (options.signal) { - abort = () => { + abort = /* @__PURE__ */ __name(() => { isAborted = true; callback.call( stream, @@ -87126,7 +89538,7 @@ var require_end_of_stream = __commonJS({ cause: options.signal.reason }) ); - }; + }, "abort"); if (options.signal.aborted) { process2.nextTick(abort); } else { @@ -87139,14 +89551,15 @@ var require_end_of_stream = __commonJS({ }); } } - const resolverFn = (...args) => { + const resolverFn = /* @__PURE__ */ __name((...args) => { if (!isAborted) { process2.nextTick(() => callback.apply(stream, args)); } - }; + }, "resolverFn"); PromisePrototypeThen(stream[kIsClosedPromise].promise, resolverFn, resolverFn); return nop; } + __name(eosWeb, "eosWeb"); function finished(stream, opts) { var _opts; let autoCleanup = false; @@ -87170,6 +89583,7 @@ var require_end_of_stream = __commonJS({ }); }); } + __name(finished, "finished"); module2.exports = eos; module2.exports.finished = finished; } @@ -87200,6 +89614,7 @@ var require_destroy2 = __commonJS({ } } } + __name(checkError, "checkError"); function destroy(err, cb) { const r = this._readableState; const w = this._writableState; @@ -87226,6 +89641,7 @@ var require_destroy2 = __commonJS({ } return this; } + __name(destroy, "destroy"); function _destroy(self2, err, cb) { let called = false; function onDestroy(err2) { @@ -87251,16 +89667,19 @@ var require_destroy2 = __commonJS({ process2.nextTick(emitCloseNT, self2); } } + __name(onDestroy, "onDestroy"); try { self2._destroy(err || null, onDestroy); } catch (err2) { onDestroy(err2); } } + __name(_destroy, "_destroy"); function emitErrorCloseNT(self2, err) { emitErrorNT(self2, err); emitCloseNT(self2); } + __name(emitErrorCloseNT, "emitErrorCloseNT"); function emitCloseNT(self2) { const r = self2._readableState; const w = self2._writableState; @@ -87274,6 +89693,7 @@ var require_destroy2 = __commonJS({ self2.emit("close"); } } + __name(emitCloseNT, "emitCloseNT"); function emitErrorNT(self2, err) { const r = self2._readableState; const w = self2._writableState; @@ -87288,6 +89708,7 @@ var require_destroy2 = __commonJS({ } self2.emit("error", err); } + __name(emitErrorNT, "emitErrorNT"); function undestroy() { const r = this._readableState; const w = this._writableState; @@ -87316,6 +89737,7 @@ var require_destroy2 = __commonJS({ w.finished = w.writable === false; } } + __name(undestroy, "undestroy"); function errorOrDestroy(stream, err, sync) { const r = stream._readableState; const w = stream._writableState; @@ -87339,6 +89761,7 @@ var require_destroy2 = __commonJS({ } } } + __name(errorOrDestroy, "errorOrDestroy"); function construct(stream, cb) { if (typeof stream._construct !== "function") { return; @@ -87357,6 +89780,7 @@ var require_destroy2 = __commonJS({ } process2.nextTick(constructNT, stream); } + __name(construct, "construct"); function constructNT(stream) { let called = false; function onConstruct(err) { @@ -87382,6 +89806,7 @@ var require_destroy2 = __commonJS({ process2.nextTick(emitConstructNT, stream); } } + __name(onConstruct, "onConstruct"); try { stream._construct((err) => { process2.nextTick(onConstruct, err); @@ -87390,19 +89815,24 @@ var require_destroy2 = __commonJS({ process2.nextTick(onConstruct, err); } } + __name(constructNT, "constructNT"); function emitConstructNT(stream) { stream.emit(kConstruct); } + __name(emitConstructNT, "emitConstructNT"); function isRequest(stream) { return (stream === null || stream === void 0 ? void 0 : stream.setHeader) && typeof stream.abort === "function"; } + __name(isRequest, "isRequest"); function emitCloseLegacy(stream) { stream.emit("close"); } + __name(emitCloseLegacy, "emitCloseLegacy"); function emitErrorCloseLegacy(stream, err) { stream.emit("error", err); process2.nextTick(emitCloseLegacy, stream); } + __name(emitErrorCloseLegacy, "emitErrorCloseLegacy"); function destroyer(stream, err) { if (!stream || isDestroyed(stream)) { return; @@ -87430,6 +89860,7 @@ var require_destroy2 = __commonJS({ stream[kIsDestroyed] = true; } } + __name(destroyer, "destroyer"); module2.exports = { construct, destroyer, @@ -87449,6 +89880,7 @@ var require_legacy = __commonJS({ function Stream(opts) { EE.call(this, opts); } + __name(Stream, "Stream"); ObjectSetPrototypeOf(Stream.prototype, EE.prototype); ObjectSetPrototypeOf(Stream, EE); Stream.prototype.pipe = function(dest, options) { @@ -87458,12 +89890,14 @@ var require_legacy = __commonJS({ source.pause(); } } + __name(ondata, "ondata"); source.on("data", ondata); function ondrain() { if (source.readable && source.resume) { source.resume(); } } + __name(ondrain, "ondrain"); dest.on("drain", ondrain); if (!dest._isStdio && (!options || options.end !== false)) { source.on("end", onend); @@ -87475,17 +89909,20 @@ var require_legacy = __commonJS({ didOnEnd = true; dest.end(); } + __name(onend, "onend"); function onclose() { if (didOnEnd) return; didOnEnd = true; if (typeof dest.destroy === "function") dest.destroy(); } + __name(onclose, "onclose"); function onerror(er) { cleanup(); if (EE.listenerCount(this, "error") === 0) { this.emit("error", er); } } + __name(onerror, "onerror"); prependListener(source, "error", onerror); prependListener(dest, "error", onerror); function cleanup() { @@ -87499,6 +89936,7 @@ var require_legacy = __commonJS({ source.removeListener("close", cleanup); dest.removeListener("close", cleanup); } + __name(cleanup, "cleanup"); source.on("end", cleanup); source.on("close", cleanup); dest.on("close", cleanup); @@ -87511,6 +89949,7 @@ var require_legacy = __commonJS({ else if (ArrayIsArray(emitter._events[event])) emitter._events[event].unshift(fn); else emitter._events[event] = [fn, emitter._events[event]]; } + __name(prependListener, "prependListener"); module2.exports = { Stream, prependListener @@ -87528,18 +89967,18 @@ var require_add_abort_signal = __commonJS({ var eos = require_end_of_stream(); var { ERR_INVALID_ARG_TYPE: ERR_INVALID_ARG_TYPE2 } = codes; var addAbortListener; - var validateAbortSignal = (signal, name) => { + var validateAbortSignal = /* @__PURE__ */ __name((signal, name) => { if (typeof signal !== "object" || !("aborted" in signal)) { throw new ERR_INVALID_ARG_TYPE2(name, "AbortSignal", signal); } - }; - module2.exports.addAbortSignal = function addAbortSignal(signal, stream) { + }, "validateAbortSignal"); + module2.exports.addAbortSignal = /* @__PURE__ */ __name(function addAbortSignal(signal, stream) { validateAbortSignal(signal, "signal"); if (!isNodeStream(stream) && !isWebStream(stream)) { throw new ERR_INVALID_ARG_TYPE2("stream", ["ReadableStream", "WritableStream", "Stream"], stream); } return module2.exports.addAbortSignalNoValidate(signal, stream); - }; + }, "addAbortSignal"); module2.exports.addAbortSignalNoValidate = function(signal, stream) { if (typeof signal !== "object" || !("aborted" in signal)) { return stream; @@ -87577,6 +90016,9 @@ var require_buffer_list = __commonJS({ var { Buffer: Buffer2 } = require("buffer"); var { inspect } = require_util10(); module2.exports = class BufferList { + static { + __name(this, "BufferList"); + } constructor() { this.head = null; this.tail = null; @@ -87736,9 +90178,11 @@ var require_state2 = __commonJS({ function highWaterMarkFrom(options, isDuplex, duplexKey) { return options.highWaterMark != null ? options.highWaterMark : isDuplex ? options[duplexKey] : null; } + __name(highWaterMarkFrom, "highWaterMarkFrom"); function getDefaultHighWaterMark(objectMode) { return objectMode ? defaultHighWaterMarkObjectMode : defaultHighWaterMarkBytes; } + __name(getDefaultHighWaterMark, "getDefaultHighWaterMark"); function setDefaultHighWaterMark(objectMode, value) { validateInteger(value, "value", 0); if (objectMode) { @@ -87747,6 +90191,7 @@ var require_state2 = __commonJS({ defaultHighWaterMarkBytes = value; } } + __name(setDefaultHighWaterMark, "setDefaultHighWaterMark"); function getHighWaterMark(state, options, duplexKey, isDuplex) { const hwm = highWaterMarkFrom(options, isDuplex, duplexKey); if (hwm != null) { @@ -87758,6 +90203,7 @@ var require_state2 = __commonJS({ } return getDefaultHighWaterMark(state.objectMode); } + __name(getHighWaterMark, "getHighWaterMark"); module2.exports = { getHighWaterMark, getDefaultHighWaterMark, @@ -87832,6 +90278,7 @@ var require_from = __commonJS({ await value; } } + __name(close, "close"); async function next() { for (; ; ) { try { @@ -87855,8 +90302,10 @@ var require_from = __commonJS({ break; } } + __name(next, "next"); return readable; } + __name(from, "from"); module2.exports = from; } }); @@ -87909,8 +90358,8 @@ var require_readable3 = __commonJS({ var from = require_from(); ObjectSetPrototypeOf(Readable.prototype, Stream.prototype); ObjectSetPrototypeOf(Readable, Stream); - var nop = () => { - }; + var nop = /* @__PURE__ */ __name(() => { + }, "nop"); var { errorOrDestroy } = destroyImpl; var kObjectMode = 1 << 0; var kEnded = 1 << 1; @@ -87943,6 +90392,7 @@ var require_readable3 = __commonJS({ } }; } + __name(makeBitMapDescriptor, "makeBitMapDescriptor"); ObjectDefineProperties(ReadableState.prototype, { objectMode: makeBitMapDescriptor(kObjectMode), ended: makeBitMapDescriptor(kEnded), @@ -88003,6 +90453,7 @@ var require_readable3 = __commonJS({ this.encoding = options.encoding; } } + __name(ReadableState, "ReadableState"); function Readable(options) { if (!(this instanceof Readable)) return new Readable(options); const isDuplex = this instanceof require_duplex(); @@ -88020,6 +90471,7 @@ var require_readable3 = __commonJS({ } }); } + __name(Readable, "Readable"); Readable.prototype.destroy = destroyImpl.destroy; Readable.prototype._undestroy = destroyImpl.undestroy; Readable.prototype._destroy = function(err, cb) { @@ -88096,6 +90548,7 @@ var require_readable3 = __commonJS({ } return !state.ended && (state.length < state.highWaterMark || state.length === 0); } + __name(readableAddChunk, "readableAddChunk"); function addChunk(stream, state, chunk, addToFront) { if (state.flowing && state.length === 0 && !state.sync && stream.listenerCount("data") > 0) { if ((state.state & kMultiAwaitDrain) !== 0) { @@ -88113,6 +90566,7 @@ var require_readable3 = __commonJS({ } maybeReadMore(stream, state); } + __name(addChunk, "addChunk"); Readable.prototype.isPaused = function() { const state = this._readableState; return state[kPaused] === true || state.flowing === false; @@ -88146,6 +90600,7 @@ var require_readable3 = __commonJS({ } return n; } + __name(computeNewHighWaterMark, "computeNewHighWaterMark"); function howMuchToRead(n, state) { if (n <= 0 || state.length === 0 && state.ended) return 0; if ((state.state & kObjectMode) !== 0) return 1; @@ -88156,6 +90611,7 @@ var require_readable3 = __commonJS({ if (n <= state.length) return n; return state.ended ? state.length : 0; } + __name(howMuchToRead, "howMuchToRead"); Readable.prototype.read = function(n) { debug("read", n); if (n === void 0) { @@ -88242,6 +90698,7 @@ var require_readable3 = __commonJS({ emitReadable_(stream); } } + __name(onEofChunk, "onEofChunk"); function emitReadable(stream) { const state = stream._readableState; debug("emitReadable", state.needReadable, state.emittedReadable); @@ -88252,6 +90709,7 @@ var require_readable3 = __commonJS({ process2.nextTick(emitReadable_, stream); } } + __name(emitReadable, "emitReadable"); function emitReadable_(stream) { const state = stream._readableState; debug("emitReadable_", state.destroyed, state.length, state.ended); @@ -88262,12 +90720,14 @@ var require_readable3 = __commonJS({ state.needReadable = !state.flowing && !state.ended && state.length <= state.highWaterMark; flow(stream); } + __name(emitReadable_, "emitReadable_"); function maybeReadMore(stream, state) { if (!state.readingMore && state.constructed) { state.readingMore = true; process2.nextTick(maybeReadMore_, stream, state); } } + __name(maybeReadMore, "maybeReadMore"); function maybeReadMore_(stream, state) { while (!state.reading && !state.ended && (state.length < state.highWaterMark || state.flowing && state.length === 0)) { const len = state.length; @@ -88278,6 +90738,7 @@ var require_readable3 = __commonJS({ } state.readingMore = false; } + __name(maybeReadMore_, "maybeReadMore_"); Readable.prototype._read = function(n) { throw new ERR_METHOD_NOT_IMPLEMENTED("_read()"); }; @@ -88306,10 +90767,12 @@ var require_readable3 = __commonJS({ } } } + __name(onunpipe, "onunpipe"); function onend() { debug("onend"); dest.end(); } + __name(onend, "onend"); let ondrain; let cleanedUp = false; function cleanup() { @@ -88327,6 +90790,7 @@ var require_readable3 = __commonJS({ cleanedUp = true; if (ondrain && state.awaitDrainWriters && (!dest._writableState || dest._writableState.needDrain)) ondrain(); } + __name(cleanup, "cleanup"); function pause() { if (!cleanedUp) { if (state.pipes.length === 1 && state.pipes[0] === dest) { @@ -88344,6 +90808,7 @@ var require_readable3 = __commonJS({ dest.on("drain", ondrain); } } + __name(pause, "pause"); src.on("data", ondata); function ondata(chunk) { debug("ondata"); @@ -88353,6 +90818,7 @@ var require_readable3 = __commonJS({ pause(); } } + __name(ondata, "ondata"); function onerror(er) { debug("onerror", er); unpipe(); @@ -88366,22 +90832,26 @@ var require_readable3 = __commonJS({ } } } + __name(onerror, "onerror"); prependListener(dest, "error", onerror); function onclose() { dest.removeListener("finish", onfinish); unpipe(); } + __name(onclose, "onclose"); dest.once("close", onclose); function onfinish() { debug("onfinish"); dest.removeListener("close", onclose); unpipe(); } + __name(onfinish, "onfinish"); dest.once("finish", onfinish); function unpipe() { debug("unpipe"); src.unpipe(dest); } + __name(unpipe, "unpipe"); dest.emit("pipe", src); if (dest.writableNeedDrain === true) { pause(); @@ -88392,7 +90862,7 @@ var require_readable3 = __commonJS({ return dest; }; function pipeOnDrain(src, dest) { - return function pipeOnDrainFunctionResult() { + return /* @__PURE__ */ __name(function pipeOnDrainFunctionResult() { const state = src._readableState; if (state.awaitDrainWriters === dest) { debug("pipeOnDrain", 1); @@ -88404,8 +90874,9 @@ var require_readable3 = __commonJS({ if ((!state.awaitDrainWriters || state.awaitDrainWriters.size === 0) && src.listenerCount("data")) { src.resume(); } - }; + }, "pipeOnDrainFunctionResult"); } + __name(pipeOnDrain, "pipeOnDrain"); Readable.prototype.unpipe = function(dest) { const state = this._readableState; const unpipeInfo = { @@ -88477,10 +90948,12 @@ var require_readable3 = __commonJS({ state.flowing = null; } } + __name(updateReadableListening, "updateReadableListening"); function nReadingNextTick(self2) { debug("readable nexttick read 0"); self2.read(0); } + __name(nReadingNextTick, "nReadingNextTick"); Readable.prototype.resume = function() { const state = this._readableState; if (!state.flowing) { @@ -88497,6 +90970,7 @@ var require_readable3 = __commonJS({ process2.nextTick(resume_, stream, state); } } + __name(resume, "resume"); function resume_(stream, state) { debug("resume", state.reading); if (!state.reading) { @@ -88507,6 +90981,7 @@ var require_readable3 = __commonJS({ flow(stream); if (state.flowing && !state.reading) stream.read(0); } + __name(resume_, "resume_"); Readable.prototype.pause = function() { debug("call pause flowing=%j", this._readableState.flowing); if (this._readableState.flowing !== false) { @@ -88522,6 +90997,7 @@ var require_readable3 = __commonJS({ debug("flow", state.flowing); while (state.flowing && stream.read() !== null) ; } + __name(flow, "flow"); Readable.prototype.wrap = function(stream) { let paused = false; stream.on("data", (chunk) => { @@ -88576,6 +91052,7 @@ var require_readable3 = __commonJS({ iter.stream = stream; return iter; } + __name(streamToAsyncIterator, "streamToAsyncIterator"); async function* createAsyncIterator(stream, options) { let callback = nop; function next(resolve) { @@ -88586,6 +91063,7 @@ var require_readable3 = __commonJS({ callback = resolve; } } + __name(next, "next"); stream.on("readable", next); let error; const cleanup = eos( @@ -88624,6 +91102,7 @@ var require_readable3 = __commonJS({ } } } + __name(createAsyncIterator, "createAsyncIterator"); ObjectDefineProperties(Readable.prototype, { readable: { __proto__: null, @@ -88640,42 +91119,42 @@ var require_readable3 = __commonJS({ readableDidRead: { __proto__: null, enumerable: false, - get: function() { + get: /* @__PURE__ */ __name(function() { return this._readableState.dataEmitted; - } + }, "get") }, readableAborted: { __proto__: null, enumerable: false, - get: function() { + get: /* @__PURE__ */ __name(function() { return !!(this._readableState.readable !== false && (this._readableState.destroyed || this._readableState.errored) && !this._readableState.endEmitted); - } + }, "get") }, readableHighWaterMark: { __proto__: null, enumerable: false, - get: function() { + get: /* @__PURE__ */ __name(function() { return this._readableState.highWaterMark; - } + }, "get") }, readableBuffer: { __proto__: null, enumerable: false, - get: function() { + get: /* @__PURE__ */ __name(function() { return this._readableState && this._readableState.buffer; - } + }, "get") }, readableFlowing: { __proto__: null, enumerable: false, - get: function() { + get: /* @__PURE__ */ __name(function() { return this._readableState.flowing; - }, - set: function(state) { + }, "get"), + set: /* @__PURE__ */ __name(function(state) { if (this._readableState) { this._readableState.flowing = state; } - } + }, "set") }, readableLength: { __proto__: null, @@ -88766,6 +91245,7 @@ var require_readable3 = __commonJS({ } return ret; } + __name(fromList, "fromList"); function endReadable(stream) { const state = stream._readableState; debug("endReadable", state.endEmitted); @@ -88774,6 +91254,7 @@ var require_readable3 = __commonJS({ process2.nextTick(endReadableNT, state, stream); } } + __name(endReadable, "endReadable"); function endReadableNT(state, stream) { debug("endReadableNT", state.endEmitted, state.length); if (!state.errored && !state.closeEmitted && !state.endEmitted && state.length === 0) { @@ -88792,12 +91273,14 @@ var require_readable3 = __commonJS({ } } } + __name(endReadableNT, "endReadableNT"); function endWritableNT(stream) { const writable = stream.writable && !stream.writableEnded && !stream.destroyed; if (writable) { stream.end(); } } + __name(endWritableNT, "endWritableNT"); Readable.from = function(iterable, opts) { return from(Readable, iterable, opts); }; @@ -88806,6 +91289,7 @@ var require_readable3 = __commonJS({ if (webStreamsAdapters === void 0) webStreamsAdapters = {}; return webStreamsAdapters; } + __name(lazyWebStreams, "lazyWebStreams"); Readable.fromWeb = function(readableStream, options) { return lazyWebStreams().newStreamReadableFromReadableStream(readableStream, options); }; @@ -88865,6 +91349,7 @@ var require_writable = __commonJS({ ObjectSetPrototypeOf(Writable, Stream); function nop() { } + __name(nop, "nop"); var kOnFinished = Symbol2("kOnFinished"); function WritableState(options, stream, isDuplex) { if (typeof isDuplex !== "boolean") isDuplex = stream instanceof require_duplex(); @@ -88901,15 +91386,17 @@ var require_writable = __commonJS({ this.closeEmitted = false; this[kOnFinished] = []; } + __name(WritableState, "WritableState"); function resetBuffer(state) { state.buffered = []; state.bufferedIndex = 0; state.allBuffers = true; state.allNoop = true; } - WritableState.prototype.getBuffer = function getBuffer() { + __name(resetBuffer, "resetBuffer"); + WritableState.prototype.getBuffer = /* @__PURE__ */ __name(function getBuffer() { return ArrayPrototypeSlice(this.buffered, this.bufferedIndex); - }; + }, "getBuffer"); ObjectDefineProperty(WritableState.prototype, "bufferedRequestCount", { __proto__: null, get() { @@ -88937,13 +91424,14 @@ var require_writable = __commonJS({ finishMaybe(this, state); }); } + __name(Writable, "Writable"); ObjectDefineProperty(Writable, SymbolHasInstance, { __proto__: null, - value: function(object) { + value: /* @__PURE__ */ __name(function(object) { if (FunctionPrototypeSymbolHasInstance(this, object)) return true; if (this !== Writable) return false; return object && object._writableState instanceof WritableState; - } + }, "value") }); Writable.prototype.pipe = function() { errorOrDestroy(this, new ERR_STREAM_CANNOT_PIPE()); @@ -88989,6 +91477,7 @@ var require_writable = __commonJS({ state.pendingcb++; return writeOrBuffer(stream, state, chunk, encoding, cb); } + __name(_write, "_write"); Writable.prototype.write = function(chunk, encoding, cb) { return _write(this, chunk, encoding, cb) === true; }; @@ -89002,12 +91491,12 @@ var require_writable = __commonJS({ if (!state.writing) clearBuffer(this, state); } }; - Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { + Writable.prototype.setDefaultEncoding = /* @__PURE__ */ __name(function setDefaultEncoding(encoding) { if (typeof encoding === "string") encoding = StringPrototypeToLowerCase(encoding); if (!Buffer2.isEncoding(encoding)) throw new ERR_UNKNOWN_ENCODING(encoding); this._writableState.defaultEncoding = encoding; return this; - }; + }, "setDefaultEncoding"); function writeOrBuffer(stream, state, chunk, encoding, callback) { const len = state.objectMode ? 1 : chunk.length; state.length += len; @@ -89035,6 +91524,7 @@ var require_writable = __commonJS({ } return ret && !state.errored && !state.destroyed; } + __name(writeOrBuffer, "writeOrBuffer"); function doWrite(stream, state, writev, len, chunk, encoding, cb) { state.writelen = len; state.writecb = cb; @@ -89045,12 +91535,14 @@ var require_writable = __commonJS({ else stream._write(chunk, encoding, state.onwrite); state.sync = false; } + __name(doWrite, "doWrite"); function onwriteError(stream, state, er, cb) { --state.pendingcb; cb(er); errorBuffer(state); errorOrDestroy(stream, er); } + __name(onwriteError, "onwriteError"); function onwrite(stream, er) { const state = stream._writableState; const sync = state.sync; @@ -89097,10 +91589,12 @@ var require_writable = __commonJS({ } } } + __name(onwrite, "onwrite"); function afterWriteTick({ stream, state, count, cb }) { state.afterWriteTickInfo = null; return afterWrite(stream, state, count, cb); } + __name(afterWriteTick, "afterWriteTick"); function afterWrite(stream, state, count, cb) { const needDrain = !state.ending && !stream.destroyed && state.length === 0 && state.needDrain; if (needDrain) { @@ -89116,6 +91610,7 @@ var require_writable = __commonJS({ } finishMaybe(stream, state); } + __name(afterWrite, "afterWrite"); function errorBuffer(state) { if (state.writing) { return; @@ -89138,6 +91633,7 @@ var require_writable = __commonJS({ } resetBuffer(state); } + __name(errorBuffer, "errorBuffer"); function clearBuffer(stream, state) { if (state.corked || state.bufferProcessing || state.destroyed || !state.constructed) { return; @@ -89178,6 +91674,7 @@ var require_writable = __commonJS({ } state.bufferProcessing = false; } + __name(clearBuffer, "clearBuffer"); Writable.prototype._write = function(chunk, encoding, cb) { if (this._writev) { this._writev( @@ -89237,6 +91734,7 @@ var require_writable = __commonJS({ function needFinish(state) { return state.ending && !state.destroyed && state.constructed && state.length === 0 && !state.errored && state.buffered.length === 0 && !state.finished && !state.writing && !state.errorEmitted && !state.closeEmitted; } + __name(needFinish, "needFinish"); function callFinal(stream, state) { let called = false; function onFinish(err) { @@ -89259,6 +91757,7 @@ var require_writable = __commonJS({ process2.nextTick(finish, stream, state); } } + __name(onFinish, "onFinish"); state.sync = true; state.pendingcb++; try { @@ -89268,6 +91767,7 @@ var require_writable = __commonJS({ } state.sync = false; } + __name(callFinal, "callFinal"); function prefinish(stream, state) { if (!state.prefinished && !state.finalCalled) { if (typeof stream._final === "function" && !state.destroyed) { @@ -89279,6 +91779,7 @@ var require_writable = __commonJS({ } } } + __name(prefinish, "prefinish"); function finishMaybe(stream, state, sync) { if (needFinish(state)) { prefinish(stream, state); @@ -89303,6 +91804,7 @@ var require_writable = __commonJS({ } } } + __name(finishMaybe, "finishMaybe"); function finish(stream, state) { state.pendingcb--; state.finished = true; @@ -89321,6 +91823,7 @@ var require_writable = __commonJS({ } } } + __name(finish, "finish"); ObjectDefineProperties(Writable.prototype, { closed: { __proto__: null, @@ -89411,9 +91914,9 @@ var require_writable = __commonJS({ writableAborted: { __proto__: null, enumerable: false, - get: function() { + get: /* @__PURE__ */ __name(function() { return !!(this._writableState.writable !== false && (this._writableState.destroyed || this._writableState.errored) && !this._writableState.finished); - } + }, "get") } }); var destroy = destroyImpl.destroy; @@ -89437,6 +91940,7 @@ var require_writable = __commonJS({ if (webStreamsAdapters === void 0) webStreamsAdapters = {}; return webStreamsAdapters; } + __name(lazyWebStreams, "lazyWebStreams"); Writable.fromWeb = function(writableStream, options) { return lazyWebStreams().newStreamWritableFromWritableStream(writableStream, options); }; @@ -89474,14 +91978,17 @@ var require_duplexify = __commonJS({ var { createDeferredPromise } = require_util10(); var from = require_from(); var Blob2 = globalThis.Blob || bufferModule.Blob; - var isBlob = typeof Blob2 !== "undefined" ? function isBlob2(b) { + var isBlob = typeof Blob2 !== "undefined" ? /* @__PURE__ */ __name(function isBlob2(b) { return b instanceof Blob2; - } : function isBlob2(b) { + }, "isBlob") : /* @__PURE__ */ __name(function isBlob2(b) { return false; - }; + }, "isBlob"); var AbortController2 = globalThis.AbortController || require_abort_controller().AbortController; var { FunctionPrototypeCall } = require_primordials(); var Duplexify = class extends Duplex { + static { + __name(this, "Duplexify"); + } constructor(options) { super(options); if ((options === null || options === void 0 ? void 0 : options.readable) === false) { @@ -89497,7 +92004,7 @@ var require_duplexify = __commonJS({ } } }; - module2.exports = function duplexify(body, name) { + module2.exports = /* @__PURE__ */ __name(function duplexify(body, name) { if (isDuplexNodeStream(body)) { return body; } @@ -89632,7 +92139,7 @@ var require_duplexify = __commonJS({ ], body ); - }; + }, "duplexify"); function fromAsyncGen(fn) { let { promise, resolve } = createDeferredPromise(); const ac = new AbortController2(); @@ -89682,6 +92189,7 @@ var require_duplexify = __commonJS({ } }; } + __name(fromAsyncGen, "fromAsyncGen"); function _duplexify(pair) { const r = pair.readable && typeof pair.readable.read !== "function" ? Readable.wrap(pair.readable) : pair.readable; const w = pair.writable; @@ -89701,6 +92209,7 @@ var require_duplexify = __commonJS({ d.destroy(err); } } + __name(onfinished, "onfinished"); d = new Duplexify({ // TODO (ronag): highWaterMark? readableObjectMode: !!(r !== null && r !== void 0 && r.readableObjectMode), @@ -89790,6 +92299,7 @@ var require_duplexify = __commonJS({ }; return d; } + __name(_duplexify, "_duplexify"); } }); @@ -89836,6 +92346,7 @@ var require_duplex = __commonJS({ this.allowHalfOpen = true; } } + __name(Duplex, "Duplex"); ObjectDefineProperties(Duplex.prototype, { writable: { __proto__: null, @@ -89894,6 +92405,7 @@ var require_duplex = __commonJS({ if (webStreamsAdapters === void 0) webStreamsAdapters = {}; return webStreamsAdapters; } + __name(lazyWebStreams, "lazyWebStreams"); Duplex.fromWeb = function(pair, options) { return lazyWebStreams().newStreamDuplexFromReadableWritablePair(pair, options); }; @@ -89946,6 +92458,7 @@ var require_transform = __commonJS({ } this.on("prefinish", prefinish); } + __name(Transform, "Transform"); function final(cb) { if (typeof this._flush === "function" && !this.destroyed) { this._flush((er, data) => { @@ -89972,11 +92485,13 @@ var require_transform = __commonJS({ } } } + __name(final, "final"); function prefinish() { if (this._final !== final) { final.call(this); } } + __name(prefinish, "prefinish"); Transform.prototype._final = final; Transform.prototype._transform = function(chunk, encoding, callback) { throw new ERR_METHOD_NOT_IMPLEMENTED("_transform()"); @@ -90025,6 +92540,7 @@ var require_passthrough2 = __commonJS({ if (!(this instanceof PassThrough)) return new PassThrough(options); Transform.call(this, options); } + __name(PassThrough, "PassThrough"); PassThrough.prototype._transform = function(chunk, encoding, cb) { cb(null, chunk); }; @@ -90082,18 +92598,20 @@ var require_pipeline = __commonJS({ } ); return { - destroy: (err) => { + destroy: /* @__PURE__ */ __name((err) => { if (finished) return; finished = true; destroyImpl.destroyer(stream, err || new ERR_STREAM_DESTROYED("pipe")); - }, + }, "destroy"), cleanup }; } + __name(destroyer, "destroyer"); function popCallback(streams) { validateFunction(streams[streams.length - 1], "streams[stream.length - 1]"); return streams.pop(); } + __name(popCallback, "popCallback"); function makeAsyncIterable(val) { if (isIterable(val)) { return val; @@ -90102,16 +92620,18 @@ var require_pipeline = __commonJS({ } throw new ERR_INVALID_ARG_TYPE2("val", ["Readable", "Iterable", "AsyncIterable"], val); } + __name(makeAsyncIterable, "makeAsyncIterable"); async function* fromReadable(val) { if (!Readable) { Readable = require_readable3(); } yield* Readable.prototype[SymbolAsyncIterator].call(val); } + __name(fromReadable, "fromReadable"); async function pumpToNode(iterable, writable, finish, { end }) { let error; let onresolve = null; - const resume = (err) => { + const resume = /* @__PURE__ */ __name((err) => { if (err) { error = err; } @@ -90120,20 +92640,20 @@ var require_pipeline = __commonJS({ onresolve = null; callback(); } - }; - const wait = () => new Promise2((resolve, reject) => { + }, "resume"); + const wait = /* @__PURE__ */ __name(() => new Promise2((resolve, reject) => { if (error) { reject(error); } else { - onresolve = () => { + onresolve = /* @__PURE__ */ __name(() => { if (error) { reject(error); } else { resolve(); } - }; + }, "onresolve"); } - }); + }), "wait"); writable.on("drain", resume); const cleanup = eos( writable, @@ -90163,6 +92683,7 @@ var require_pipeline = __commonJS({ writable.off("drain", resume); } } + __name(pumpToNode, "pumpToNode"); async function pumpToWeb(readable, writable, finish, { end }) { if (isTransformStream(writable)) { writable = writable.writable; @@ -90188,9 +92709,11 @@ var require_pipeline = __commonJS({ } } } + __name(pumpToWeb, "pumpToWeb"); function pipeline(...streams) { return pipelineImpl(streams, once(popCallback(streams))); } + __name(pipeline, "pipeline"); function pipelineImpl(streams, callback, opts) { if (streams.length === 1 && ArrayIsArray(streams[0])) { streams = streams[0]; @@ -90206,6 +92729,7 @@ var require_pipeline = __commonJS({ function abort() { finishImpl(new AbortError()); } + __name(abort, "abort"); addAbortListener = addAbortListener || require_util10().addAbortListener; let disposable; if (outerSignal) { @@ -90218,6 +92742,7 @@ var require_pipeline = __commonJS({ function finish(err) { finishImpl(err, --finishCount === 0); } + __name(finish, "finish"); function finishImpl(err, final) { var _disposable; if (err && (!error || error.code === "ERR_STREAM_PREMATURE_CLOSE")) { @@ -90239,6 +92764,7 @@ var require_pipeline = __commonJS({ process2.nextTick(callback, error, value); } } + __name(finishImpl, "finishImpl"); let ret; for (let i = 0; i < streams.length; i++) { const stream = streams[i]; @@ -90253,6 +92779,7 @@ var require_pipeline = __commonJS({ } }; var onError = onError2; + __name(onError2, "onError"); if (end) { const { destroy, cleanup } = destroyer(stream, reading, writing); destroys.push(destroy); @@ -90404,6 +92931,7 @@ var require_pipeline = __commonJS({ } return ret; } + __name(pipelineImpl, "pipelineImpl"); function pipe(src, dst, finish, { end }) { let ended = false; dst.on("close", () => { @@ -90420,6 +92948,7 @@ var require_pipeline = __commonJS({ dst.end(); }; var endFn = endFn2; + __name(endFn2, "endFn"); if (isReadableFinished(src)) { process2.nextTick(endFn2); } else { @@ -90452,6 +92981,7 @@ var require_pipeline = __commonJS({ finish ); } + __name(pipe, "pipe"); module2.exports = { pipelineImpl, pipeline @@ -90480,7 +93010,7 @@ var require_compose = __commonJS({ codes: { ERR_INVALID_ARG_VALUE, ERR_MISSING_ARGS } } = require_errors4(); var eos = require_end_of_stream(); - module2.exports = function compose(...streams) { + module2.exports = /* @__PURE__ */ __name(function compose(...streams) { if (streams.length === 0) { throw new ERR_MISSING_ARGS("streams"); } @@ -90522,6 +93052,7 @@ var require_compose = __commonJS({ d.destroy(); } } + __name(onfinished, "onfinished"); const head = streams[0]; const tail = pipeline(streams, onfinished); const writable = !!(isWritable(head) || isWritableStream(head) || isTransformStream(head)); @@ -90648,7 +93179,7 @@ var require_compose = __commonJS({ } }; return d; - }; + }, "compose"); } }); @@ -90699,6 +93230,7 @@ var require_operators = __commonJS({ } return composedStream; } + __name(compose, "compose"); function map(fn, options) { if (typeof fn !== "function") { throw new ERR_INVALID_ARG_TYPE2("fn", ["Function", "AsyncFunction"], fn); @@ -90720,7 +93252,7 @@ var require_operators = __commonJS({ validateInteger(concurrency, "options.concurrency", 1); validateInteger(highWaterMark, "options.highWaterMark", 0); highWaterMark += concurrency; - return async function* map2() { + return (/* @__PURE__ */ __name(async function* map2() { const signal = require_util10().AbortSignalAny( [options === null || options === void 0 ? void 0 : options.signal].filter(Boolean2) ); @@ -90737,16 +93269,19 @@ var require_operators = __commonJS({ done = true; afterItemProcessed(); } + __name(onCatch, "onCatch"); function afterItemProcessed() { cnt -= 1; maybeResume(); } + __name(afterItemProcessed, "afterItemProcessed"); function maybeResume() { if (resume && !done && cnt < concurrency && queue.length < highWaterMark) { resume(); resume = null; } } + __name(maybeResume, "maybeResume"); async function pump() { try { for await (let val of stream) { @@ -90791,6 +93326,7 @@ var require_operators = __commonJS({ } } } + __name(pump, "pump"); pump(); try { while (true) { @@ -90819,8 +93355,9 @@ var require_operators = __commonJS({ resume = null; } } - }.call(this); + }, "map")).call(this); } + __name(map, "map"); function asIndexedPairs(options = void 0) { if (options != null) { validateObject(options, "options"); @@ -90828,7 +93365,7 @@ var require_operators = __commonJS({ if ((options === null || options === void 0 ? void 0 : options.signal) != null) { validateAbortSignal(options.signal, "options.signal"); } - return async function* asIndexedPairs2() { + return (/* @__PURE__ */ __name(async function* asIndexedPairs2() { let index = 0; for await (const val of this) { var _options$signal; @@ -90839,14 +93376,16 @@ var require_operators = __commonJS({ } yield [index++, val]; } - }.call(this); + }, "asIndexedPairs")).call(this); } + __name(asIndexedPairs, "asIndexedPairs"); async function some(fn, options = void 0) { for await (const unused of filter.call(this, fn, options)) { return true; } return false; } + __name(some, "some"); async function every(fn, options = void 0) { if (typeof fn !== "function") { throw new ERR_INVALID_ARG_TYPE2("fn", ["Function", "AsyncFunction"], fn); @@ -90859,12 +93398,14 @@ var require_operators = __commonJS({ options ); } + __name(every, "every"); async function find(fn, options) { for await (const result of filter.call(this, fn, options)) { return result; } return void 0; } + __name(find, "find"); async function forEach(fn, options) { if (typeof fn !== "function") { throw new ERR_INVALID_ARG_TYPE2("fn", ["Function", "AsyncFunction"], fn); @@ -90873,8 +93414,10 @@ var require_operators = __commonJS({ await fn(value, options2); return kEmpty; } + __name(forEachFn, "forEachFn"); for await (const unused of map.call(this, forEachFn, options)) ; } + __name(forEach, "forEach"); function filter(fn, options) { if (typeof fn !== "function") { throw new ERR_INVALID_ARG_TYPE2("fn", ["Function", "AsyncFunction"], fn); @@ -90885,9 +93428,14 @@ var require_operators = __commonJS({ } return kEmpty; } + __name(filterFn, "filterFn"); return map.call(this, filterFn, options); } + __name(filter, "filter"); var ReduceAwareErrMissingArgs = class extends ERR_MISSING_ARGS { + static { + __name(this, "ReduceAwareErrMissingArgs"); + } constructor() { super("reduce"); this.message = "Reduce of an empty stream requires an initial value"; @@ -90949,6 +93497,7 @@ var require_operators = __commonJS({ } return initialValue; } + __name(reduce, "reduce"); async function toArray(options) { if (options != null) { validateObject(options, "options"); @@ -90968,14 +93517,16 @@ var require_operators = __commonJS({ } return result; } + __name(toArray, "toArray"); function flatMap(fn, options) { const values = map.call(this, fn, options); - return async function* flatMap2() { + return (/* @__PURE__ */ __name(async function* flatMap2() { for await (const val of values) { yield* val; } - }.call(this); + }, "flatMap")).call(this); } + __name(flatMap, "flatMap"); function toIntegerOrInfinity(number) { number = Number2(number); if (NumberIsNaN(number)) { @@ -90986,6 +93537,7 @@ var require_operators = __commonJS({ } return number; } + __name(toIntegerOrInfinity, "toIntegerOrInfinity"); function drop(number, options = void 0) { if (options != null) { validateObject(options, "options"); @@ -90994,7 +93546,7 @@ var require_operators = __commonJS({ validateAbortSignal(options.signal, "options.signal"); } number = toIntegerOrInfinity(number); - return async function* drop2() { + return (/* @__PURE__ */ __name(async function* drop2() { var _options$signal5; if (options !== null && options !== void 0 && (_options$signal5 = options.signal) !== null && _options$signal5 !== void 0 && _options$signal5.aborted) { throw new AbortError(); @@ -91008,8 +93560,9 @@ var require_operators = __commonJS({ yield val; } } - }.call(this); + }, "drop")).call(this); } + __name(drop, "drop"); function take(number, options = void 0) { if (options != null) { validateObject(options, "options"); @@ -91018,7 +93571,7 @@ var require_operators = __commonJS({ validateAbortSignal(options.signal, "options.signal"); } number = toIntegerOrInfinity(number); - return async function* take2() { + return (/* @__PURE__ */ __name(async function* take2() { var _options$signal7; if (options !== null && options !== void 0 && (_options$signal7 = options.signal) !== null && _options$signal7 !== void 0 && _options$signal7.aborted) { throw new AbortError(); @@ -91035,8 +93588,9 @@ var require_operators = __commonJS({ return; } } - }.call(this); + }, "take")).call(this); } + __name(take, "take"); module2.exports.streamReturningOperators = { asIndexedPairs: deprecate(asIndexedPairs, "readable.asIndexedPairs will be removed in a future version."), drop, @@ -91092,6 +93646,7 @@ var require_promises = __commonJS({ ); }); } + __name(pipeline, "pipeline"); module2.exports = { finished, pipeline @@ -91133,6 +93688,7 @@ var require_stream2 = __commonJS({ return Stream.Readable.from(ReflectApply(op, this, args)); }; fn = fn2; + __name(fn2, "fn"); const op = streamReturningOperators[key]; ObjectDefineProperty(fn2, "name", { __proto__: null, @@ -91159,6 +93715,7 @@ var require_stream2 = __commonJS({ return ReflectApply(op, this, args); }; fn = fn2; + __name(fn2, "fn"); const op = promiseReturningOperators[key]; ObjectDefineProperty(fn2, "name", { __proto__: null, @@ -91212,12 +93769,12 @@ var require_stream2 = __commonJS({ } }); Stream.Stream = Stream; - Stream._isUint8Array = function isUint8Array(value) { + Stream._isUint8Array = /* @__PURE__ */ __name(function isUint8Array(value) { return value instanceof Uint8Array; - }; - Stream._uint8ArrayToBuffer = function _uint8ArrayToBuffer(chunk) { + }, "isUint8Array"); + Stream._uint8ArrayToBuffer = /* @__PURE__ */ __name(function _uint8ArrayToBuffer(chunk) { return Buffer2.from(chunk.buffer, chunk.byteOffset, chunk.byteLength); - }; + }, "_uint8ArrayToBuffer"); } }); @@ -91295,6 +93852,7 @@ var require_arrayPush = __commonJS({ } return array; } + __name(arrayPush, "arrayPush"); module2.exports = arrayPush; } }); @@ -91309,6 +93867,7 @@ var require_isFlattenable = __commonJS({ function isFlattenable(value) { return isArray(value) || isArguments(value) || !!(spreadableSymbol && value && value[spreadableSymbol]); } + __name(isFlattenable, "isFlattenable"); module2.exports = isFlattenable; } }); @@ -91336,6 +93895,7 @@ var require_baseFlatten = __commonJS({ } return result; } + __name(baseFlatten, "baseFlatten"); module2.exports = baseFlatten; } }); @@ -91348,6 +93908,7 @@ var require_flatten = __commonJS({ var length = array == null ? 0 : array.length; return length ? baseFlatten(array, 1) : []; } + __name(flatten, "flatten"); module2.exports = flatten; } }); @@ -91369,6 +93930,7 @@ var require_hashClear = __commonJS({ this.__data__ = nativeCreate ? nativeCreate(null) : {}; this.size = 0; } + __name(hashClear, "hashClear"); module2.exports = hashClear; } }); @@ -91381,6 +93943,7 @@ var require_hashDelete = __commonJS({ this.size -= result ? 1 : 0; return result; } + __name(hashDelete, "hashDelete"); module2.exports = hashDelete; } }); @@ -91400,6 +93963,7 @@ var require_hashGet = __commonJS({ } return hasOwnProperty.call(data, key) ? data[key] : void 0; } + __name(hashGet, "hashGet"); module2.exports = hashGet; } }); @@ -91414,6 +93978,7 @@ var require_hashHas = __commonJS({ var data = this.__data__; return nativeCreate ? data[key] !== void 0 : hasOwnProperty.call(data, key); } + __name(hashHas, "hashHas"); module2.exports = hashHas; } }); @@ -91429,6 +93994,7 @@ var require_hashSet = __commonJS({ data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED : value; return this; } + __name(hashSet, "hashSet"); module2.exports = hashSet; } }); @@ -91449,6 +94015,7 @@ var require_Hash = __commonJS({ this.set(entry[0], entry[1]); } } + __name(Hash, "Hash"); Hash.prototype.clear = hashClear; Hash.prototype["delete"] = hashDelete; Hash.prototype.get = hashGet; @@ -91465,6 +94032,7 @@ var require_listCacheClear = __commonJS({ this.__data__ = []; this.size = 0; } + __name(listCacheClear, "listCacheClear"); module2.exports = listCacheClear; } }); @@ -91482,6 +94050,7 @@ var require_assocIndexOf = __commonJS({ } return -1; } + __name(assocIndexOf, "assocIndexOf"); module2.exports = assocIndexOf; } }); @@ -91506,6 +94075,7 @@ var require_listCacheDelete = __commonJS({ --this.size; return true; } + __name(listCacheDelete, "listCacheDelete"); module2.exports = listCacheDelete; } }); @@ -91518,6 +94088,7 @@ var require_listCacheGet = __commonJS({ var data = this.__data__, index = assocIndexOf(data, key); return index < 0 ? void 0 : data[index][1]; } + __name(listCacheGet, "listCacheGet"); module2.exports = listCacheGet; } }); @@ -91529,6 +94100,7 @@ var require_listCacheHas = __commonJS({ function listCacheHas(key) { return assocIndexOf(this.__data__, key) > -1; } + __name(listCacheHas, "listCacheHas"); module2.exports = listCacheHas; } }); @@ -91547,6 +94119,7 @@ var require_listCacheSet = __commonJS({ } return this; } + __name(listCacheSet, "listCacheSet"); module2.exports = listCacheSet; } }); @@ -91567,6 +94140,7 @@ var require_ListCache = __commonJS({ this.set(entry[0], entry[1]); } } + __name(ListCache, "ListCache"); ListCache.prototype.clear = listCacheClear; ListCache.prototype["delete"] = listCacheDelete; ListCache.prototype.get = listCacheGet; @@ -91600,6 +94174,7 @@ var require_mapCacheClear = __commonJS({ "string": new Hash() }; } + __name(mapCacheClear, "mapCacheClear"); module2.exports = mapCacheClear; } }); @@ -91611,6 +94186,7 @@ var require_isKeyable = __commonJS({ var type = typeof value; return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null; } + __name(isKeyable, "isKeyable"); module2.exports = isKeyable; } }); @@ -91623,6 +94199,7 @@ var require_getMapData = __commonJS({ var data = map.__data__; return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map; } + __name(getMapData, "getMapData"); module2.exports = getMapData; } }); @@ -91636,6 +94213,7 @@ var require_mapCacheDelete = __commonJS({ this.size -= result ? 1 : 0; return result; } + __name(mapCacheDelete, "mapCacheDelete"); module2.exports = mapCacheDelete; } }); @@ -91647,6 +94225,7 @@ var require_mapCacheGet = __commonJS({ function mapCacheGet(key) { return getMapData(this, key).get(key); } + __name(mapCacheGet, "mapCacheGet"); module2.exports = mapCacheGet; } }); @@ -91658,6 +94237,7 @@ var require_mapCacheHas = __commonJS({ function mapCacheHas(key) { return getMapData(this, key).has(key); } + __name(mapCacheHas, "mapCacheHas"); module2.exports = mapCacheHas; } }); @@ -91672,6 +94252,7 @@ var require_mapCacheSet = __commonJS({ this.size += data.size == size ? 0 : 1; return this; } + __name(mapCacheSet, "mapCacheSet"); module2.exports = mapCacheSet; } }); @@ -91692,6 +94273,7 @@ var require_MapCache = __commonJS({ this.set(entry[0], entry[1]); } } + __name(MapCache, "MapCache"); MapCache.prototype.clear = mapCacheClear; MapCache.prototype["delete"] = mapCacheDelete; MapCache.prototype.get = mapCacheGet; @@ -91709,6 +94291,7 @@ var require_setCacheAdd = __commonJS({ this.__data__.set(value, HASH_UNDEFINED); return this; } + __name(setCacheAdd, "setCacheAdd"); module2.exports = setCacheAdd; } }); @@ -91719,6 +94302,7 @@ var require_setCacheHas = __commonJS({ function setCacheHas(value) { return this.__data__.has(value); } + __name(setCacheHas, "setCacheHas"); module2.exports = setCacheHas; } }); @@ -91736,6 +94320,7 @@ var require_SetCache = __commonJS({ this.add(values[index]); } } + __name(SetCache, "SetCache"); SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; SetCache.prototype.has = setCacheHas; module2.exports = SetCache; @@ -91754,6 +94339,7 @@ var require_baseFindIndex = __commonJS({ } return -1; } + __name(baseFindIndex, "baseFindIndex"); module2.exports = baseFindIndex; } }); @@ -91764,6 +94350,7 @@ var require_baseIsNaN = __commonJS({ function baseIsNaN(value) { return value !== value; } + __name(baseIsNaN, "baseIsNaN"); module2.exports = baseIsNaN; } }); @@ -91780,6 +94367,7 @@ var require_strictIndexOf = __commonJS({ } return -1; } + __name(strictIndexOf, "strictIndexOf"); module2.exports = strictIndexOf; } }); @@ -91793,6 +94381,7 @@ var require_baseIndexOf = __commonJS({ function baseIndexOf(array, value, fromIndex) { return value === value ? strictIndexOf(array, value, fromIndex) : baseFindIndex(array, baseIsNaN, fromIndex); } + __name(baseIndexOf, "baseIndexOf"); module2.exports = baseIndexOf; } }); @@ -91805,6 +94394,7 @@ var require_arrayIncludes = __commonJS({ var length = array == null ? 0 : array.length; return !!length && baseIndexOf(array, value, 0) > -1; } + __name(arrayIncludes, "arrayIncludes"); module2.exports = arrayIncludes; } }); @@ -91821,6 +94411,7 @@ var require_arrayIncludesWith = __commonJS({ } return false; } + __name(arrayIncludesWith, "arrayIncludesWith"); module2.exports = arrayIncludesWith; } }); @@ -91835,6 +94426,7 @@ var require_arrayMap = __commonJS({ } return result; } + __name(arrayMap, "arrayMap"); module2.exports = arrayMap; } }); @@ -91845,6 +94437,7 @@ var require_cacheHas = __commonJS({ function cacheHas(cache, key) { return cache.has(key); } + __name(cacheHas, "cacheHas"); module2.exports = cacheHas; } }); @@ -91893,6 +94486,7 @@ var require_baseDifference = __commonJS({ } return result; } + __name(baseDifference, "baseDifference"); module2.exports = baseDifference; } }); @@ -91905,6 +94499,7 @@ var require_isArrayLikeObject = __commonJS({ function isArrayLikeObject(value) { return isObjectLike(value) && isArrayLike(value); } + __name(isArrayLikeObject, "isArrayLikeObject"); module2.exports = isArrayLikeObject; } }); @@ -91938,6 +94533,7 @@ var require_noop = __commonJS({ "node_modules/lodash/noop.js"(exports2, module2) { function noop() { } + __name(noop, "noop"); module2.exports = noop; } }); @@ -91952,6 +94548,7 @@ var require_setToArray = __commonJS({ }); return result; } + __name(setToArray, "setToArray"); module2.exports = setToArray; } }); @@ -92020,6 +94617,7 @@ var require_baseUniq = __commonJS({ } return result; } + __name(baseUniq, "baseUniq"); module2.exports = baseUniq; } }); @@ -92046,6 +94644,7 @@ var require_overArg = __commonJS({ return func(transform(arg)); }; } + __name(overArg, "overArg"); module2.exports = overArg; } }); @@ -92082,6 +94681,7 @@ var require_isPlainObject = __commonJS({ var Ctor = hasOwnProperty.call(proto, "constructor") && proto.constructor; return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString; } + __name(isPlainObject, "isPlainObject"); module2.exports = isPlainObject; } }); @@ -92093,14 +94693,14 @@ var require_assert_valid_pattern = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.assertValidPattern = void 0; var MAX_PATTERN_LENGTH = 1024 * 64; - var assertValidPattern = (pattern) => { + var assertValidPattern = /* @__PURE__ */ __name((pattern) => { if (typeof pattern !== "string") { throw new TypeError("invalid pattern"); } if (pattern.length > MAX_PATTERN_LENGTH) { throw new TypeError("pattern is too long"); } - }; + }, "assertValidPattern"); exports2.assertValidPattern = assertValidPattern; } }); @@ -92127,10 +94727,10 @@ var require_brace_expressions = __commonJS({ "[:word:]": ["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}", true], "[:xdigit:]": ["A-Fa-f0-9", false] }; - var braceEscape = (s) => s.replace(/[[\]\\-]/g, "\\$&"); - var regexpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); - var rangesToString = (ranges) => ranges.join(""); - var parseClass = (glob, position) => { + var braceEscape = /* @__PURE__ */ __name((s) => s.replace(/[[\]\\-]/g, "\\$&"), "braceEscape"); + var regexpEscape = /* @__PURE__ */ __name((s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), "regexpEscape"); + var rangesToString = /* @__PURE__ */ __name((ranges) => ranges.join(""), "rangesToString"); + var parseClass = /* @__PURE__ */ __name((glob, position) => { const pos = position; if (glob.charAt(pos) !== "[") { throw new Error("not in a brace expression"); @@ -92217,7 +94817,7 @@ var require_brace_expressions = __commonJS({ const snegs = "[" + (negate ? "" : "^") + rangesToString(negs) + "]"; const comb = ranges.length && negs.length ? "(" + sranges + "|" + snegs + ")" : ranges.length ? sranges : snegs; return [comb, uflag, endPos - pos, true]; - }; + }, "parseClass"); exports2.parseClass = parseClass; } }); @@ -92228,9 +94828,9 @@ var require_unescape = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.unescape = void 0; - var unescape2 = (s, { windowsPathsNoEscape = false } = {}) => { + var unescape2 = /* @__PURE__ */ __name((s, { windowsPathsNoEscape = false } = {}) => { return windowsPathsNoEscape ? s.replace(/\[([^\/\\])\]/g, "$1") : s.replace(/((?!\\).|^)\[([^\/\\])\]/g, "$1$2").replace(/\\([^\/])/g, "$1"); - }; + }, "unescape"); exports2.unescape = unescape2; } }); @@ -92244,17 +94844,20 @@ var require_ast = __commonJS({ var brace_expressions_js_1 = require_brace_expressions(); var unescape_js_1 = require_unescape(); var types = /* @__PURE__ */ new Set(["!", "?", "+", "*", "@"]); - var isExtglobType = (c) => types.has(c); + var isExtglobType = /* @__PURE__ */ __name((c) => types.has(c), "isExtglobType"); var startNoTraversal = "(?!(?:^|/)\\.\\.?(?:$|/))"; var startNoDot = "(?!\\.)"; var addPatternStart = /* @__PURE__ */ new Set(["[", "."]); var justDots = /* @__PURE__ */ new Set(["..", "."]); var reSpecials = new Set("().*{}+?[]^$\\!"); - var regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); + var regExpEscape = /* @__PURE__ */ __name((s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), "regExpEscape"); var qmark = "[^/]"; var star = qmark + "*?"; var starNoEmpty = qmark + "+?"; var AST = class _AST { + static { + __name(this, "AST"); + } type; #root; #hasMagic; @@ -92730,9 +95333,9 @@ var require_escape = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.escape = void 0; - var escape = (s, { windowsPathsNoEscape = false } = {}) => { + var escape = /* @__PURE__ */ __name((s, { windowsPathsNoEscape = false } = {}) => { return windowsPathsNoEscape ? s.replace(/[?*()[\]]/g, "[$&]") : s.replace(/[?*()[\]\\]/g, "\\$&"); - }; + }, "escape"); exports2.escape = escape; } }); @@ -92751,64 +95354,64 @@ var require_commonjs9 = __commonJS({ var ast_js_1 = require_ast(); var escape_js_1 = require_escape(); var unescape_js_1 = require_unescape(); - var minimatch = (p, pattern, options = {}) => { + var minimatch = /* @__PURE__ */ __name((p, pattern, options = {}) => { (0, assert_valid_pattern_js_1.assertValidPattern)(pattern); if (!options.nocomment && pattern.charAt(0) === "#") { return false; } return new Minimatch(pattern, options).match(p); - }; + }, "minimatch"); exports2.minimatch = minimatch; var starDotExtRE = /^\*+([^+@!?\*\[\(]*)$/; - var starDotExtTest = (ext2) => (f) => !f.startsWith(".") && f.endsWith(ext2); - var starDotExtTestDot = (ext2) => (f) => f.endsWith(ext2); - var starDotExtTestNocase = (ext2) => { + var starDotExtTest = /* @__PURE__ */ __name((ext2) => (f) => !f.startsWith(".") && f.endsWith(ext2), "starDotExtTest"); + var starDotExtTestDot = /* @__PURE__ */ __name((ext2) => (f) => f.endsWith(ext2), "starDotExtTestDot"); + var starDotExtTestNocase = /* @__PURE__ */ __name((ext2) => { ext2 = ext2.toLowerCase(); return (f) => !f.startsWith(".") && f.toLowerCase().endsWith(ext2); - }; - var starDotExtTestNocaseDot = (ext2) => { + }, "starDotExtTestNocase"); + var starDotExtTestNocaseDot = /* @__PURE__ */ __name((ext2) => { ext2 = ext2.toLowerCase(); return (f) => f.toLowerCase().endsWith(ext2); - }; + }, "starDotExtTestNocaseDot"); var starDotStarRE = /^\*+\.\*+$/; - var starDotStarTest = (f) => !f.startsWith(".") && f.includes("."); - var starDotStarTestDot = (f) => f !== "." && f !== ".." && f.includes("."); + var starDotStarTest = /* @__PURE__ */ __name((f) => !f.startsWith(".") && f.includes("."), "starDotStarTest"); + var starDotStarTestDot = /* @__PURE__ */ __name((f) => f !== "." && f !== ".." && f.includes("."), "starDotStarTestDot"); var dotStarRE = /^\.\*+$/; - var dotStarTest = (f) => f !== "." && f !== ".." && f.startsWith("."); + var dotStarTest = /* @__PURE__ */ __name((f) => f !== "." && f !== ".." && f.startsWith("."), "dotStarTest"); var starRE = /^\*+$/; - var starTest = (f) => f.length !== 0 && !f.startsWith("."); - var starTestDot = (f) => f.length !== 0 && f !== "." && f !== ".."; + var starTest = /* @__PURE__ */ __name((f) => f.length !== 0 && !f.startsWith("."), "starTest"); + var starTestDot = /* @__PURE__ */ __name((f) => f.length !== 0 && f !== "." && f !== "..", "starTestDot"); var qmarksRE = /^\?+([^+@!?\*\[\(]*)?$/; - var qmarksTestNocase = ([$0, ext2 = ""]) => { + var qmarksTestNocase = /* @__PURE__ */ __name(([$0, ext2 = ""]) => { const noext = qmarksTestNoExt([$0]); if (!ext2) return noext; ext2 = ext2.toLowerCase(); return (f) => noext(f) && f.toLowerCase().endsWith(ext2); - }; - var qmarksTestNocaseDot = ([$0, ext2 = ""]) => { + }, "qmarksTestNocase"); + var qmarksTestNocaseDot = /* @__PURE__ */ __name(([$0, ext2 = ""]) => { const noext = qmarksTestNoExtDot([$0]); if (!ext2) return noext; ext2 = ext2.toLowerCase(); return (f) => noext(f) && f.toLowerCase().endsWith(ext2); - }; - var qmarksTestDot = ([$0, ext2 = ""]) => { + }, "qmarksTestNocaseDot"); + var qmarksTestDot = /* @__PURE__ */ __name(([$0, ext2 = ""]) => { const noext = qmarksTestNoExtDot([$0]); return !ext2 ? noext : (f) => noext(f) && f.endsWith(ext2); - }; - var qmarksTest = ([$0, ext2 = ""]) => { + }, "qmarksTestDot"); + var qmarksTest = /* @__PURE__ */ __name(([$0, ext2 = ""]) => { const noext = qmarksTestNoExt([$0]); return !ext2 ? noext : (f) => noext(f) && f.endsWith(ext2); - }; - var qmarksTestNoExt = ([$0]) => { + }, "qmarksTest"); + var qmarksTestNoExt = /* @__PURE__ */ __name(([$0]) => { const len = $0.length; return (f) => f.length === len && !f.startsWith("."); - }; - var qmarksTestNoExtDot = ([$0]) => { + }, "qmarksTestNoExt"); + var qmarksTestNoExtDot = /* @__PURE__ */ __name(([$0]) => { const len = $0.length; return (f) => f.length === len && f !== "." && f !== ".."; - }; + }, "qmarksTestNoExtDot"); var defaultPlatform = typeof process === "object" && process ? typeof process.env === "object" && process.env && process.env.__MINIMATCH_TESTING_PLATFORM__ || process.platform : "posix"; var path2 = { win32: { sep: "\\" }, @@ -92822,18 +95425,21 @@ var require_commonjs9 = __commonJS({ var star = qmark + "*?"; var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?"; var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?"; - var filter = (pattern, options = {}) => (p) => (0, exports2.minimatch)(p, pattern, options); + var filter = /* @__PURE__ */ __name((pattern, options = {}) => (p) => (0, exports2.minimatch)(p, pattern, options), "filter"); exports2.filter = filter; exports2.minimatch.filter = exports2.filter; - var ext = (a, b = {}) => Object.assign({}, a, b); - var defaults = (def) => { + var ext = /* @__PURE__ */ __name((a, b = {}) => Object.assign({}, a, b), "ext"); + var defaults = /* @__PURE__ */ __name((def) => { if (!def || typeof def !== "object" || !Object.keys(def).length) { return exports2.minimatch; } const orig = exports2.minimatch; - const m = (p, pattern, options = {}) => orig(p, pattern, ext(def, options)); + const m = /* @__PURE__ */ __name((p, pattern, options = {}) => orig(p, pattern, ext(def, options)), "m"); return Object.assign(m, { Minimatch: class Minimatch extends orig.Minimatch { + static { + __name(this, "Minimatch"); + } constructor(pattern, options = {}) { super(pattern, ext(def, options)); } @@ -92842,6 +95448,9 @@ var require_commonjs9 = __commonJS({ } }, AST: class AST extends orig.AST { + static { + __name(this, "AST"); + } /* c8 ignore start */ constructor(type, parent, options = {}) { super(type, parent, ext(def, options)); @@ -92851,44 +95460,47 @@ var require_commonjs9 = __commonJS({ return orig.AST.fromGlob(pattern, ext(def, options)); } }, - unescape: (s, options = {}) => orig.unescape(s, ext(def, options)), - escape: (s, options = {}) => orig.escape(s, ext(def, options)), - filter: (pattern, options = {}) => orig.filter(pattern, ext(def, options)), - defaults: (options) => orig.defaults(ext(def, options)), - makeRe: (pattern, options = {}) => orig.makeRe(pattern, ext(def, options)), - braceExpand: (pattern, options = {}) => orig.braceExpand(pattern, ext(def, options)), - match: (list, pattern, options = {}) => orig.match(list, pattern, ext(def, options)), + unescape: /* @__PURE__ */ __name((s, options = {}) => orig.unescape(s, ext(def, options)), "unescape"), + escape: /* @__PURE__ */ __name((s, options = {}) => orig.escape(s, ext(def, options)), "escape"), + filter: /* @__PURE__ */ __name((pattern, options = {}) => orig.filter(pattern, ext(def, options)), "filter"), + defaults: /* @__PURE__ */ __name((options) => orig.defaults(ext(def, options)), "defaults"), + makeRe: /* @__PURE__ */ __name((pattern, options = {}) => orig.makeRe(pattern, ext(def, options)), "makeRe"), + braceExpand: /* @__PURE__ */ __name((pattern, options = {}) => orig.braceExpand(pattern, ext(def, options)), "braceExpand"), + match: /* @__PURE__ */ __name((list, pattern, options = {}) => orig.match(list, pattern, ext(def, options)), "match"), sep: orig.sep, GLOBSTAR: exports2.GLOBSTAR }); - }; + }, "defaults"); exports2.defaults = defaults; exports2.minimatch.defaults = exports2.defaults; - var braceExpand = (pattern, options = {}) => { + var braceExpand = /* @__PURE__ */ __name((pattern, options = {}) => { (0, assert_valid_pattern_js_1.assertValidPattern)(pattern); if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { return [pattern]; } return (0, brace_expansion_1.default)(pattern); - }; + }, "braceExpand"); exports2.braceExpand = braceExpand; exports2.minimatch.braceExpand = exports2.braceExpand; - var makeRe = (pattern, options = {}) => new Minimatch(pattern, options).makeRe(); + var makeRe = /* @__PURE__ */ __name((pattern, options = {}) => new Minimatch(pattern, options).makeRe(), "makeRe"); exports2.makeRe = makeRe; exports2.minimatch.makeRe = exports2.makeRe; - var match = (list, pattern, options = {}) => { + var match = /* @__PURE__ */ __name((list, pattern, options = {}) => { const mm = new Minimatch(pattern, options); list = list.filter((f) => mm.match(f)); if (mm.options.nonull && !list.length) { list.push(pattern); } return list; - }; + }, "match"); exports2.match = match; exports2.minimatch.match = exports2.match; var globMagic = /[?*]|[+@!]\(.*?\)|\[|\]/; - var regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); + var regExpEscape = /* @__PURE__ */ __name((s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), "regExpEscape"); var Minimatch = class { + static { + __name(this, "Minimatch"); + } options; set; pattern; @@ -93470,17 +96082,17 @@ var require_commonjs9 = __commonJS({ }; exports2.Minimatch = Minimatch; var ast_js_2 = require_ast(); - Object.defineProperty(exports2, "AST", { enumerable: true, get: function() { + Object.defineProperty(exports2, "AST", { enumerable: true, get: /* @__PURE__ */ __name(function() { return ast_js_2.AST; - } }); + }, "get") }); var escape_js_2 = require_escape(); - Object.defineProperty(exports2, "escape", { enumerable: true, get: function() { + Object.defineProperty(exports2, "escape", { enumerable: true, get: /* @__PURE__ */ __name(function() { return escape_js_2.escape; - } }); + }, "get") }); var unescape_js_2 = require_unescape(); - Object.defineProperty(exports2, "unescape", { enumerable: true, get: function() { + Object.defineProperty(exports2, "unescape", { enumerable: true, get: /* @__PURE__ */ __name(function() { return unescape_js_2.unescape; - } }); + }, "get") }); exports2.minimatch.AST = ast_js_1.AST; exports2.minimatch.Minimatch = Minimatch; exports2.minimatch.escape = escape_js_1.escape; @@ -93497,13 +96109,16 @@ var require_commonjs10 = __commonJS({ var perf = typeof performance === "object" && performance && typeof performance.now === "function" ? performance : Date; var warned = /* @__PURE__ */ new Set(); var PROCESS = typeof process === "object" && !!process ? process : {}; - var emitWarning = (msg, type, code, fn) => { + var emitWarning = /* @__PURE__ */ __name((msg, type, code, fn) => { typeof PROCESS.emitWarning === "function" ? PROCESS.emitWarning(msg, type, code, fn) : console.error(`[${code}] ${type}: ${msg}`); - }; + }, "emitWarning"); var AC = globalThis.AbortController; var AS = globalThis.AbortSignal; if (typeof AC === "undefined") { AS = class AbortSignal { + static { + __name(this, "AbortSignal"); + } onabort; _onabort = []; reason; @@ -93513,6 +96128,9 @@ var require_commonjs10 = __commonJS({ } }; AC = class AbortController { + static { + __name(this, "AbortController"); + } constructor() { warnACPolyfill(); } @@ -93529,24 +96147,30 @@ var require_commonjs10 = __commonJS({ } }; let printACPolyfillWarning = PROCESS.env?.LRU_CACHE_IGNORE_AC_WARNING !== "1"; - const warnACPolyfill = () => { + const warnACPolyfill = /* @__PURE__ */ __name(() => { if (!printACPolyfillWarning) return; printACPolyfillWarning = false; emitWarning("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.", "NO_ABORT_CONTROLLER", "ENOTSUP", warnACPolyfill); - }; + }, "warnACPolyfill"); } - var shouldWarn = (code) => !warned.has(code); + var shouldWarn = /* @__PURE__ */ __name((code) => !warned.has(code), "shouldWarn"); var TYPE = Symbol("type"); - var isPosInt = (n) => n && n === Math.floor(n) && n > 0 && isFinite(n); - var getUintArray = (max) => !isPosInt(max) ? null : max <= Math.pow(2, 8) ? Uint8Array : max <= Math.pow(2, 16) ? Uint16Array : max <= Math.pow(2, 32) ? Uint32Array : max <= Number.MAX_SAFE_INTEGER ? ZeroArray : null; + var isPosInt = /* @__PURE__ */ __name((n) => n && n === Math.floor(n) && n > 0 && isFinite(n), "isPosInt"); + var getUintArray = /* @__PURE__ */ __name((max) => !isPosInt(max) ? null : max <= Math.pow(2, 8) ? Uint8Array : max <= Math.pow(2, 16) ? Uint16Array : max <= Math.pow(2, 32) ? Uint32Array : max <= Number.MAX_SAFE_INTEGER ? ZeroArray : null, "getUintArray"); var ZeroArray = class extends Array { + static { + __name(this, "ZeroArray"); + } constructor(size) { super(size); this.fill(0); } }; var Stack = class _Stack { + static { + __name(this, "Stack"); + } heap; length; // private constructor @@ -93575,6 +96199,9 @@ var require_commonjs10 = __commonJS({ } }; var LRUCache = class _LRUCache { + static { + __name(this, "LRUCache"); + } // properties coming in from the options of these, only max and maxSize // really *need* to be protected. The rest can be modified, as they just // set defaults for various methods. @@ -93689,12 +96316,12 @@ var require_commonjs10 = __commonJS({ }, free: c.#free, // methods - isBackgroundFetch: (p) => c.#isBackgroundFetch(p), - backgroundFetch: (k, index, options, context3) => c.#backgroundFetch(k, index, options, context3), - moveToTail: (index) => c.#moveToTail(index), - indexes: (options) => c.#indexes(options), - rindexes: (options) => c.#rindexes(options), - isStale: (index) => c.#isStale(index) + isBackgroundFetch: /* @__PURE__ */ __name((p) => c.#isBackgroundFetch(p), "isBackgroundFetch"), + backgroundFetch: /* @__PURE__ */ __name((k, index, options, context3) => c.#backgroundFetch(k, index, options, context3), "backgroundFetch"), + moveToTail: /* @__PURE__ */ __name((index) => c.#moveToTail(index), "moveToTail"), + indexes: /* @__PURE__ */ __name((options) => c.#indexes(options), "indexes"), + rindexes: /* @__PURE__ */ __name((options) => c.#rindexes(options), "rindexes"), + isStale: /* @__PURE__ */ __name((index) => c.#isStale(index), "isStale") }; } // Protected read-only members @@ -93872,7 +96499,7 @@ var require_commonjs10 = __commonJS({ } }; let cachedNow = 0; - const getNow = () => { + const getNow = /* @__PURE__ */ __name(() => { const n = perf.now(); if (this.ttlResolution > 0) { cachedNow = n; @@ -93882,7 +96509,7 @@ var require_commonjs10 = __commonJS({ } } return n; - }; + }, "getNow"); this.getRemainingTTL = (key) => { const index = this.#keyMap.get(key); if (index === void 0) { @@ -93903,14 +96530,14 @@ var require_commonjs10 = __commonJS({ }; } // conditionally set private methods related to TTL - #updateItemAge = () => { - }; - #statusTTL = () => { - }; - #setItemTTL = () => { - }; + #updateItemAge = /* @__PURE__ */ __name(() => { + }, "#updateItemAge"); + #statusTTL = /* @__PURE__ */ __name(() => { + }, "#statusTTL"); + #setItemTTL = /* @__PURE__ */ __name(() => { + }, "#setItemTTL"); /* c8 ignore stop */ - #isStale = () => false; + #isStale = /* @__PURE__ */ __name(() => false, "#isStale"); #initializeSizeTracking() { const sizes = new ZeroArray(this.#max); this.#calculatedSize = 0; @@ -93953,16 +96580,16 @@ var require_commonjs10 = __commonJS({ } }; } - #removeItemSize = (_i) => { - }; - #addItemSize = (_i, _s, _st) => { - }; - #requireSize = (_k, _v, size, sizeCalculation) => { + #removeItemSize = /* @__PURE__ */ __name((_i) => { + }, "#removeItemSize"); + #addItemSize = /* @__PURE__ */ __name((_i, _s, _st) => { + }, "#addItemSize"); + #requireSize = /* @__PURE__ */ __name((_k, _v, size, sizeCalculation) => { if (size || sizeCalculation) { throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache"); } return 0; - }; + }, "#requireSize"); *#indexes({ allowStale = this.allowStale } = {}) { if (this.#size) { for (let i = this.#tail; true; ) { @@ -94427,7 +97054,7 @@ var require_commonjs10 = __commonJS({ options, context: context3 }; - const cb = (v2, updateCache = false) => { + const cb = /* @__PURE__ */ __name((v2, updateCache = false) => { const { aborted } = ac.signal; const ignoreAbort = options.ignoreFetchAbort && v2 !== void 0; if (options.status) { @@ -94458,15 +97085,15 @@ var require_commonjs10 = __commonJS({ } } return v2; - }; - const eb = (er) => { + }, "cb"); + const eb = /* @__PURE__ */ __name((er) => { if (options.status) { options.status.fetchRejected = true; options.status.fetchError = er; } return fetchFail(er); - }; - const fetchFail = (er) => { + }, "eb"); + const fetchFail = /* @__PURE__ */ __name((er) => { const { aborted } = ac.signal; const allowStaleAborted = aborted && options.allowStaleOnFetchAbort; const allowStale = allowStaleAborted || options.allowStaleOnFetchRejection; @@ -94488,8 +97115,8 @@ var require_commonjs10 = __commonJS({ } else if (bf2.__returned === bf2) { throw er; } - }; - const pcall = (res, rej) => { + }, "fetchFail"); + const pcall = /* @__PURE__ */ __name((res, rej) => { const fmp = this.#fetchMethod?.(k, v, fetchOpts); if (fmp && fmp instanceof Promise) { fmp.then((v2) => res(v2 === void 0 ? void 0 : v2), rej); @@ -94498,11 +97125,11 @@ var require_commonjs10 = __commonJS({ if (!options.ignoreFetchAbort || options.allowStaleOnFetchAbort) { res(void 0); if (options.allowStaleOnFetchAbort) { - res = (v2) => cb(v2, true); + res = /* @__PURE__ */ __name((v2) => cb(v2, true), "res"); } } }); - }; + }, "pcall"); if (options.status) options.status.fetchDispatched = true; const p = new Promise(pcall).then(cb, eb); @@ -94788,12 +97415,12 @@ var require_commonjs11 = __commonJS({ var events_1 = require("events"); var stream_1 = __importDefault2(require("stream")); var string_decoder_1 = require("string_decoder"); - var isStream = (s) => !!s && typeof s === "object" && (s instanceof Minipass || s instanceof stream_1.default || (0, exports2.isReadable)(s) || (0, exports2.isWritable)(s)); + var isStream = /* @__PURE__ */ __name((s) => !!s && typeof s === "object" && (s instanceof Minipass || s instanceof stream_1.default || (0, exports2.isReadable)(s) || (0, exports2.isWritable)(s)), "isStream"); exports2.isStream = isStream; - var isReadable = (s) => !!s && typeof s === "object" && s instanceof events_1.EventEmitter && typeof s.pipe === "function" && // node core Writable streams have a pipe() method, but it throws - s.pipe !== stream_1.default.Writable.prototype.pipe; + var isReadable = /* @__PURE__ */ __name((s) => !!s && typeof s === "object" && s instanceof events_1.EventEmitter && typeof s.pipe === "function" && // node core Writable streams have a pipe() method, but it throws + s.pipe !== stream_1.default.Writable.prototype.pipe, "isReadable"); exports2.isReadable = isReadable; - var isWritable = (s) => !!s && typeof s === "object" && s instanceof events_1.EventEmitter && typeof s.write === "function" && typeof s.end === "function"; + var isWritable = /* @__PURE__ */ __name((s) => !!s && typeof s === "object" && s instanceof events_1.EventEmitter && typeof s.write === "function" && typeof s.end === "function", "isWritable"); exports2.isWritable = isWritable; var EOF = Symbol("EOF"); var MAYBE_EMIT_END = Symbol("maybeEmitEnd"); @@ -94826,12 +97453,15 @@ var require_commonjs11 = __commonJS({ var SIGNAL = Symbol("signal"); var DATALISTENERS = Symbol("dataListeners"); var DISCARDED = Symbol("discarded"); - var defer = (fn) => Promise.resolve().then(fn); - var nodefer = (fn) => fn(); - var isEndish = (ev) => ev === "end" || ev === "finish" || ev === "prefinish"; - var isArrayBufferLike = (b) => b instanceof ArrayBuffer || !!b && typeof b === "object" && b.constructor && b.constructor.name === "ArrayBuffer" && b.byteLength >= 0; - var isArrayBufferView = (b) => !Buffer.isBuffer(b) && ArrayBuffer.isView(b); + var defer = /* @__PURE__ */ __name((fn) => Promise.resolve().then(fn), "defer"); + var nodefer = /* @__PURE__ */ __name((fn) => fn(), "nodefer"); + var isEndish = /* @__PURE__ */ __name((ev) => ev === "end" || ev === "finish" || ev === "prefinish", "isEndish"); + var isArrayBufferLike = /* @__PURE__ */ __name((b) => b instanceof ArrayBuffer || !!b && typeof b === "object" && b.constructor && b.constructor.name === "ArrayBuffer" && b.byteLength >= 0, "isArrayBufferLike"); + var isArrayBufferView = /* @__PURE__ */ __name((b) => !Buffer.isBuffer(b) && ArrayBuffer.isView(b), "isArrayBufferView"); var Pipe = class { + static { + __name(this, "Pipe"); + } src; dest; opts; @@ -94858,6 +97488,9 @@ var require_commonjs11 = __commonJS({ } }; var PipeProxyErrors = class extends Pipe { + static { + __name(this, "PipeProxyErrors"); + } unpipe() { this.src.removeListener("error", this.proxyErrors); super.unpipe(); @@ -94868,9 +97501,12 @@ var require_commonjs11 = __commonJS({ src.on("error", this.proxyErrors); } }; - var isObjectModeOptions = (o) => !!o.objectMode; - var isEncodingOptions = (o) => !o.objectMode && !!o.encoding && o.encoding !== "buffer"; + var isObjectModeOptions = /* @__PURE__ */ __name((o) => !!o.objectMode, "isObjectModeOptions"); + var isEncodingOptions = /* @__PURE__ */ __name((o) => !o.objectMode && !!o.encoding && o.encoding !== "buffer", "isEncodingOptions"); var Minipass = class extends events_1.EventEmitter { + static { + __name(this, "Minipass"); + } [FLOWING] = false; [PAUSED] = false; [PIPES] = []; @@ -94923,10 +97559,10 @@ var require_commonjs11 = __commonJS({ this[ASYNC] = !!options.async; this[DECODER] = this[ENCODING] ? new string_decoder_1.StringDecoder(this[ENCODING]) : null; if (options && options.debugExposeBuffer === true) { - Object.defineProperty(this, "buffer", { get: () => this[BUFFER] }); + Object.defineProperty(this, "buffer", { get: /* @__PURE__ */ __name(() => this[BUFFER], "get") }); } if (options && options.debugExposePipes === true) { - Object.defineProperty(this, "pipes", { get: () => this[PIPES] }); + Object.defineProperty(this, "pipes", { get: /* @__PURE__ */ __name(() => this[PIPES], "get") }); } const { signal } = options; if (signal) { @@ -95526,12 +98162,12 @@ var require_commonjs11 = __commonJS({ [Symbol.asyncIterator]() { this[DISCARDED] = false; let stopped = false; - const stop = async () => { + const stop = /* @__PURE__ */ __name(async () => { this.pause(); stopped = true; return { value: void 0, done: true }; - }; - const next = () => { + }, "stop"); + const next = /* @__PURE__ */ __name(() => { if (stopped) return stop(); const res = this.read(); @@ -95541,28 +98177,28 @@ var require_commonjs11 = __commonJS({ return stop(); let resolve; let reject; - const onerr = (er) => { + const onerr = /* @__PURE__ */ __name((er) => { this.off("data", ondata); this.off("end", onend); this.off(DESTROYED, ondestroy); stop(); reject(er); - }; - const ondata = (value) => { + }, "onerr"); + const ondata = /* @__PURE__ */ __name((value) => { this.off("error", onerr); this.off("end", onend); this.off(DESTROYED, ondestroy); this.pause(); resolve({ value, done: !!this[EOF] }); - }; - const onend = () => { + }, "ondata"); + const onend = /* @__PURE__ */ __name(() => { this.off("error", onerr); this.off("data", ondata); this.off(DESTROYED, ondestroy); stop(); resolve({ done: true, value: void 0 }); - }; - const ondestroy = () => onerr(new Error("stream destroyed")); + }, "onend"); + const ondestroy = /* @__PURE__ */ __name(() => onerr(new Error("stream destroyed")), "ondestroy"); return new Promise((res2, rej) => { reject = rej; resolve = res2; @@ -95571,7 +98207,7 @@ var require_commonjs11 = __commonJS({ this.once("end", onend); this.once("data", ondata); }); - }; + }, "next"); return { next, throw: stop, @@ -95590,20 +98226,20 @@ var require_commonjs11 = __commonJS({ [Symbol.iterator]() { this[DISCARDED] = false; let stopped = false; - const stop = () => { + const stop = /* @__PURE__ */ __name(() => { this.pause(); this.off(ERROR, stop); this.off(DESTROYED, stop); this.off("end", stop); stopped = true; return { done: true, value: void 0 }; - }; - const next = () => { + }, "stop"); + const next = /* @__PURE__ */ __name(() => { if (stopped) return stop(); const value = this.read(); return value === null ? stop() : { done: false, value }; - }; + }, "next"); this.once("end", stop); this.once(ERROR, stop); this.once(DESTROYED, stop); @@ -95672,9 +98308,9 @@ var require_commonjs12 = __commonJS({ if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { + desc = { enumerable: true, get: /* @__PURE__ */ __name(function() { return m[k]; - } }; + }, "get") }; } Object.defineProperty(o, k2, desc); } : function(o, m, k, k2) { @@ -95718,16 +98354,16 @@ var require_commonjs12 = __commonJS({ realpath: promises_1.realpath } }; - var fsFromOption = (fsOption) => !fsOption || fsOption === defaultFS || fsOption === actualFS ? defaultFS : { + var fsFromOption = /* @__PURE__ */ __name((fsOption) => !fsOption || fsOption === defaultFS || fsOption === actualFS ? defaultFS : { ...defaultFS, ...fsOption, promises: { ...defaultFS.promises, ...fsOption.promises || {} } - }; + }, "fsFromOption"); var uncDriveRegexp = /^\\\\\?\\([a-z]:)\\?$/i; - var uncToDrive = (rootPath) => rootPath.replace(/\//g, "\\").replace(uncDriveRegexp, "$1\\"); + var uncToDrive = /* @__PURE__ */ __name((rootPath) => rootPath.replace(/\//g, "\\").replace(uncDriveRegexp, "$1\\"), "uncToDrive"); var eitherSep = /[\\\/]/; var UNKNOWN = 0; var IFIFO = 1; @@ -95747,43 +98383,52 @@ var require_commonjs12 = __commonJS({ var ENOREALPATH = 512; var ENOCHILD = ENOTDIR | ENOENT | ENOREALPATH; var TYPEMASK = 1023; - var entToType = (s) => s.isFile() ? IFREG : s.isDirectory() ? IFDIR : s.isSymbolicLink() ? IFLNK : s.isCharacterDevice() ? IFCHR : s.isBlockDevice() ? IFBLK : s.isSocket() ? IFSOCK : s.isFIFO() ? IFIFO : UNKNOWN; + var entToType = /* @__PURE__ */ __name((s) => s.isFile() ? IFREG : s.isDirectory() ? IFDIR : s.isSymbolicLink() ? IFLNK : s.isCharacterDevice() ? IFCHR : s.isBlockDevice() ? IFBLK : s.isSocket() ? IFSOCK : s.isFIFO() ? IFIFO : UNKNOWN, "entToType"); var normalizeCache = /* @__PURE__ */ new Map(); - var normalize = (s) => { + var normalize = /* @__PURE__ */ __name((s) => { const c = normalizeCache.get(s); if (c) return c; const n = s.normalize("NFKD"); normalizeCache.set(s, n); return n; - }; + }, "normalize"); var normalizeNocaseCache = /* @__PURE__ */ new Map(); - var normalizeNocase = (s) => { + var normalizeNocase = /* @__PURE__ */ __name((s) => { const c = normalizeNocaseCache.get(s); if (c) return c; const n = normalize(s.toLowerCase()); normalizeNocaseCache.set(s, n); return n; - }; + }, "normalizeNocase"); var ResolveCache = class extends lru_cache_1.LRUCache { + static { + __name(this, "ResolveCache"); + } constructor() { super({ max: 256 }); } }; exports2.ResolveCache = ResolveCache; var ChildrenCache = class extends lru_cache_1.LRUCache { + static { + __name(this, "ChildrenCache"); + } constructor(maxSize = 16 * 1024) { super({ maxSize, // parent + children - sizeCalculation: (a) => a.length + 1 + sizeCalculation: /* @__PURE__ */ __name((a) => a.length + 1, "sizeCalculation") }); } }; exports2.ChildrenCache = ChildrenCache; var setAsCwd = Symbol("PathScurry setAsCwd"); var PathBase = class { + static { + __name(this, "PathBase"); + } /** * the basename of this path * @@ -96562,8 +99207,8 @@ var require_commonjs12 = __commonJS({ if (this.#asyncReaddirInFlight) { await this.#asyncReaddirInFlight; } else { - let resolve = () => { - }; + let resolve = /* @__PURE__ */ __name(() => { + }, "resolve"); this.#asyncReaddirInFlight = new Promise((res) => resolve = res); try { for (const e of await this.#fs.promises.readdir(fullpath, { @@ -96683,6 +99328,9 @@ var require_commonjs12 = __commonJS({ }; exports2.PathBase = PathBase; var PathWin32 = class _PathWin32 extends PathBase { + static { + __name(this, "PathWin32"); + } /** * Separator for generating path strings. */ @@ -96737,6 +99385,9 @@ var require_commonjs12 = __commonJS({ }; exports2.PathWin32 = PathWin32; var PathPosix = class _PathPosix extends PathBase { + static { + __name(this, "PathPosix"); + } /** * separator for parsing path strings */ @@ -96775,6 +99426,9 @@ var require_commonjs12 = __commonJS({ }; exports2.PathPosix = PathPosix; var PathScurryBase = class { + static { + __name(this, "PathScurryBase"); + } /** * The root Path entry for the current working directory of this Scurry */ @@ -97084,7 +99738,7 @@ var require_commonjs12 = __commonJS({ results.push(withFileTypes ? entry : entry.fullpath()); } const dirs = /* @__PURE__ */ new Set(); - const walk = (dir, cb) => { + const walk = /* @__PURE__ */ __name((dir, cb) => { dirs.add(dir); dir.readdirCB((er, entries) => { if (er) { @@ -97093,11 +99747,11 @@ var require_commonjs12 = __commonJS({ let len = entries.length; if (!len) return cb(); - const next = () => { + const next = /* @__PURE__ */ __name(() => { if (--len === 0) { cb(); } - }; + }, "next"); for (const e of entries) { if (!filter || filter(e)) { results.push(withFileTypes ? e : e.fullpath()); @@ -97113,7 +99767,7 @@ var require_commonjs12 = __commonJS({ } } }, true); - }; + }, "walk"); const start = entry; return new Promise((res, rej) => { walk(start, (er) => { @@ -97231,7 +99885,7 @@ var require_commonjs12 = __commonJS({ const dirs = /* @__PURE__ */ new Set(); const queue = [entry]; let processing = 0; - const process2 = () => { + const process2 = /* @__PURE__ */ __name(() => { let paused = false; while (!paused) { const dir = queue.shift(); @@ -97242,7 +99896,7 @@ var require_commonjs12 = __commonJS({ } processing++; dirs.add(dir); - const onReaddir = (er, entries, didRealpaths = false) => { + const onReaddir = /* @__PURE__ */ __name((er, entries, didRealpaths = false) => { if (er) return results.emit("error", er); if (follow && !didRealpaths) { @@ -97276,12 +99930,12 @@ var require_commonjs12 = __commonJS({ } else if (!sync) { process2(); } - }; + }, "onReaddir"); let sync = true; dir.readdirCB(onReaddir, true); sync = false; } - }; + }, "process"); process2(); return results; } @@ -97300,7 +99954,7 @@ var require_commonjs12 = __commonJS({ } const queue = [entry]; let processing = 0; - const process2 = () => { + const process2 = /* @__PURE__ */ __name(() => { let paused = false; while (!paused) { const dir = queue.shift(); @@ -97335,7 +99989,7 @@ var require_commonjs12 = __commonJS({ } if (paused && !results.flowing) results.once("drain", process2); - }; + }, "process"); process2(); return results; } @@ -97347,6 +100001,9 @@ var require_commonjs12 = __commonJS({ }; exports2.PathScurryBase = PathScurryBase; var PathScurryWin32 = class extends PathScurryBase { + static { + __name(this, "PathScurryWin32"); + } /** * separator for generating path strings */ @@ -97380,6 +100037,9 @@ var require_commonjs12 = __commonJS({ }; exports2.PathScurryWin32 = PathScurryWin32; var PathScurryPosix = class extends PathScurryBase { + static { + __name(this, "PathScurryPosix"); + } /** * separator for generating path strings */ @@ -97410,6 +100070,9 @@ var require_commonjs12 = __commonJS({ }; exports2.PathScurryPosix = PathScurryPosix; var PathScurryDarwin = class extends PathScurryPosix { + static { + __name(this, "PathScurryDarwin"); + } constructor(cwd = process.cwd(), opts = {}) { const { nocase = true } = opts; super(cwd, { ...opts, nocase }); @@ -97428,9 +100091,12 @@ var require_pattern = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Pattern = void 0; var minimatch_1 = require_commonjs9(); - var isPatternList = (pl) => pl.length >= 1; - var isGlobList = (gl) => gl.length >= 1; + var isPatternList = /* @__PURE__ */ __name((pl) => pl.length >= 1, "isPatternList"); + var isGlobList = /* @__PURE__ */ __name((gl) => gl.length >= 1, "isGlobList"); var Pattern = class _Pattern { + static { + __name(this, "Pattern"); + } #patternList; #globList; #index; @@ -97605,6 +100271,9 @@ var require_ignore = __commonJS({ var pattern_js_1 = require_pattern(); var defaultPlatform = typeof process === "object" && process && typeof process.platform === "string" ? process.platform : "linux"; var Ignore = class { + static { + __name(this, "Ignore"); + } relative; relativeChildren; absolute; @@ -97695,6 +100364,9 @@ var require_processor = __commonJS({ exports2.Processor = exports2.SubWalks = exports2.MatchRecord = exports2.HasWalkedCache = void 0; var minimatch_1 = require_commonjs9(); var HasWalkedCache = class _HasWalkedCache { + static { + __name(this, "HasWalkedCache"); + } store; constructor(store = /* @__PURE__ */ new Map()) { this.store = store; @@ -97716,6 +100388,9 @@ var require_processor = __commonJS({ }; exports2.HasWalkedCache = HasWalkedCache; var MatchRecord = class { + static { + __name(this, "MatchRecord"); + } store = /* @__PURE__ */ new Map(); add(target, absolute, ifDir) { const n = (absolute ? 2 : 0) | (ifDir ? 1 : 0); @@ -97733,6 +100408,9 @@ var require_processor = __commonJS({ }; exports2.MatchRecord = MatchRecord; var SubWalks = class { + static { + __name(this, "SubWalks"); + } store = /* @__PURE__ */ new Map(); add(target, pattern) { if (!target.canReaddir()) { @@ -97762,6 +100440,9 @@ var require_processor = __commonJS({ }; exports2.SubWalks = SubWalks; var Processor = class _Processor { + static { + __name(this, "Processor"); + } hasWalkedCache; matches = new MatchRecord(); subwalks = new SubWalks(); @@ -97929,8 +100610,11 @@ var require_walker = __commonJS({ var minipass_1 = require_commonjs11(); var ignore_js_1 = require_ignore(); var processor_js_1 = require_processor(); - var makeIgnore = (ignore, opts) => typeof ignore === "string" ? new ignore_js_1.Ignore([ignore], opts) : Array.isArray(ignore) ? new ignore_js_1.Ignore(ignore, opts) : ignore; + var makeIgnore = /* @__PURE__ */ __name((ignore, opts) => typeof ignore === "string" ? new ignore_js_1.Ignore([ignore], opts) : Array.isArray(ignore) ? new ignore_js_1.Ignore(ignore, opts) : ignore, "makeIgnore"); var GlobUtil = class { + static { + __name(this, "GlobUtil"); + } path; patterns; opts; @@ -98074,10 +100758,10 @@ var require_walker = __commonJS({ } processor.processPatterns(target, patterns); let tasks = 1; - const next = () => { + const next = /* @__PURE__ */ __name(() => { if (--tasks === 0) cb(); - }; + }, "next"); for (const [m, absolute, ifDir] of processor.matches.entries()) { if (this.#ignored(m)) continue; @@ -98101,10 +100785,10 @@ var require_walker = __commonJS({ walkCB3(target, entries, processor, cb) { processor = processor.filterEntries(target, entries); let tasks = 1; - const next = () => { + const next = /* @__PURE__ */ __name(() => { if (--tasks === 0) cb(); - }; + }, "next"); for (const [m, absolute, ifDir] of processor.matches.entries()) { if (this.#ignored(m)) continue; @@ -98133,10 +100817,10 @@ var require_walker = __commonJS({ } processor.processPatterns(target, patterns); let tasks = 1; - const next = () => { + const next = /* @__PURE__ */ __name(() => { if (--tasks === 0) cb(); - }; + }, "next"); for (const [m, absolute, ifDir] of processor.matches.entries()) { if (this.#ignored(m)) continue; @@ -98155,10 +100839,10 @@ var require_walker = __commonJS({ walkCB3Sync(target, entries, processor, cb) { processor = processor.filterEntries(target, entries); let tasks = 1; - const next = () => { + const next = /* @__PURE__ */ __name(() => { if (--tasks === 0) cb(); - }; + }, "next"); for (const [m, absolute, ifDir] of processor.matches.entries()) { if (this.#ignored(m)) continue; @@ -98173,6 +100857,9 @@ var require_walker = __commonJS({ }; exports2.GlobUtil = GlobUtil; var GlobWalker = class extends GlobUtil { + static { + __name(this, "GlobWalker"); + } matches; constructor(patterns, path2, opts) { super(patterns, path2, opts); @@ -98213,6 +100900,9 @@ var require_walker = __commonJS({ }; exports2.GlobWalker = GlobWalker; var GlobStream = class extends GlobUtil { + static { + __name(this, "GlobStream"); + } results; constructor(patterns, path2, opts) { super(patterns, path2, opts); @@ -98264,6 +100954,9 @@ var require_glob = __commonJS({ var walker_js_1 = require_walker(); var defaultPlatform = typeof process === "object" && process && typeof process.platform === "string" ? process.platform : "linux"; var Glob = class { + static { + __name(this, "Glob"); + } absolute; cwd; root; @@ -98465,7 +101158,7 @@ var require_has_magic = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.hasMagic = void 0; var minimatch_1 = require_commonjs9(); - var hasMagic = (pattern, options = {}) => { + var hasMagic = /* @__PURE__ */ __name((pattern, options = {}) => { if (!Array.isArray(pattern)) { pattern = [pattern]; } @@ -98474,7 +101167,7 @@ var require_has_magic = __commonJS({ return true; } return false; - }; + }, "hasMagic"); exports2.hasMagic = hasMagic; } }); @@ -98491,25 +101184,31 @@ var require_commonjs13 = __commonJS({ function globStreamSync(pattern, options = {}) { return new glob_js_1.Glob(pattern, options).streamSync(); } + __name(globStreamSync, "globStreamSync"); exports2.globStreamSync = globStreamSync; function globStream(pattern, options = {}) { return new glob_js_1.Glob(pattern, options).stream(); } + __name(globStream, "globStream"); exports2.globStream = globStream; function globSync(pattern, options = {}) { return new glob_js_1.Glob(pattern, options).walkSync(); } + __name(globSync, "globSync"); exports2.globSync = globSync; async function glob_(pattern, options = {}) { return new glob_js_1.Glob(pattern, options).walk(); } + __name(glob_, "glob_"); function globIterateSync(pattern, options = {}) { return new glob_js_1.Glob(pattern, options).iterateSync(); } + __name(globIterateSync, "globIterateSync"); exports2.globIterateSync = globIterateSync; function globIterate(pattern, options = {}) { return new glob_js_1.Glob(pattern, options).iterate(); } + __name(globIterate, "globIterate"); exports2.globIterate = globIterate; exports2.streamSync = globStreamSync; exports2.stream = Object.assign(globStream, { sync: globStreamSync }); @@ -98522,20 +101221,20 @@ var require_commonjs13 = __commonJS({ iterate: globIterateSync }); var minimatch_2 = require_commonjs9(); - Object.defineProperty(exports2, "escape", { enumerable: true, get: function() { + Object.defineProperty(exports2, "escape", { enumerable: true, get: /* @__PURE__ */ __name(function() { return minimatch_2.escape; - } }); - Object.defineProperty(exports2, "unescape", { enumerable: true, get: function() { + }, "get") }); + Object.defineProperty(exports2, "unescape", { enumerable: true, get: /* @__PURE__ */ __name(function() { return minimatch_2.unescape; - } }); + }, "get") }); var glob_js_2 = require_glob(); - Object.defineProperty(exports2, "Glob", { enumerable: true, get: function() { + Object.defineProperty(exports2, "Glob", { enumerable: true, get: /* @__PURE__ */ __name(function() { return glob_js_2.Glob; - } }); + }, "get") }); var has_magic_js_2 = require_has_magic(); - Object.defineProperty(exports2, "hasMagic", { enumerable: true, get: function() { + Object.defineProperty(exports2, "hasMagic", { enumerable: true, get: /* @__PURE__ */ __name(function() { return has_magic_js_2.hasMagic; - } }); + }, "get") }); exports2.glob = Object.assign(glob_, { glob: glob_, globSync, @@ -98569,7 +101268,7 @@ var require_file2 = __commonJS({ var glob = require_commonjs13(); var file = module2.exports = {}; var pathSeparatorRe = /[\/\\]/g; - var processPatterns = function(patterns, fn) { + var processPatterns = /* @__PURE__ */ __name(function(patterns, fn) { var result = []; flatten(patterns).forEach(function(pattern) { var exclusion = pattern.indexOf("!") === 0; @@ -98584,7 +101283,7 @@ var require_file2 = __commonJS({ } }); return result; - }; + }, "processPatterns"); file.exists = function() { var filepath = path2.join.apply(path2, arguments); return fs.existsSync(filepath); @@ -98616,9 +101315,9 @@ var require_file2 = __commonJS({ }; file.expandMapping = function(patterns, destBase, options) { options = Object.assign({ - rename: function(destBase2, destPath) { + rename: /* @__PURE__ */ __name(function(destBase2, destPath) { return path2.join(destBase2 || "", destPath); - } + }, "rename") }, options); var files = []; var fileByDest = {}; @@ -98689,7 +101388,7 @@ var require_file2 = __commonJS({ if ("src" in result) { Object.defineProperty(result, "src", { enumerable: true, - get: function fn() { + get: /* @__PURE__ */ __name(function fn() { var src; if (!("result" in fn)) { src = obj.src; @@ -98697,7 +101396,7 @@ var require_file2 = __commonJS({ fn.result = file.expand(expandOptions, src); } return fn.result; - } + }, "fn") }); } if ("dest" in result) { @@ -98797,7 +101496,7 @@ var require_archiver_utils = __commonJS({ if (err) { return callback(err); } - (function next() { + (/* @__PURE__ */ __name(function next() { file = list[i++]; if (!file) { return callback(null, results); @@ -98823,7 +101522,7 @@ var require_archiver_utils = __commonJS({ next(); } }); - })(); + }, "next"))(); }); }; } @@ -98857,6 +101556,7 @@ var require_error2 = __commonJS({ this.code = code; this.data = data; } + __name(ArchiverError, "ArchiverError"); util.inherits(ArchiverError, Error); exports2 = module2.exports = ArchiverError; } @@ -98874,7 +101574,7 @@ var require_core2 = __commonJS({ var ArchiverError = require_error2(); var Transform = require_ours().Transform; var win32 = process.platform === "win32"; - var Archiver = function(format, options) { + var Archiver = /* @__PURE__ */ __name(function(format, options) { if (!(this instanceof Archiver)) { return new Archiver(format, options); } @@ -98907,7 +101607,7 @@ var require_core2 = __commonJS({ modulePiped: false }; this._streams = []; - }; + }, "Archiver"); inherits(Archiver, Transform); Archiver.prototype._abort = function() { this._state.aborted = true; @@ -99082,12 +101782,12 @@ var require_core2 = __commonJS({ } }; Archiver.prototype._onQueueTask = function(task, callback) { - var fullCallback = () => { + var fullCallback = /* @__PURE__ */ __name(() => { if (task.data.callback) { task.data.callback(); } callback(); - }; + }, "fullCallback"); if (this._state.finalizing || this._state.finalized || this._state.aborted) { fullCallback(); return; @@ -99229,9 +101929,11 @@ var require_core2 = __commonJS({ this._pending--; this._maybeFinalize(); } + __name(onGlobEnd, "onGlobEnd"); function onGlobError(err) { this.emit("error", err); } + __name(onGlobError, "onGlobError"); function onGlobMatch(match) { globber.pause(); var ignoreMatch = false; @@ -99259,6 +101961,7 @@ var require_core2 = __commonJS({ } this._append(match.absolute, entryData); } + __name(onGlobMatch, "onGlobMatch"); var globber = glob(dirpath, globOptions); globber.on("error", onGlobError.bind(this)); globber.on("match", onGlobMatch.bind(this)); @@ -99287,9 +101990,11 @@ var require_core2 = __commonJS({ this._pending--; this._maybeFinalize(); } + __name(onGlobEnd, "onGlobEnd"); function onGlobError(err) { this.emit("error", err); } + __name(onGlobError, "onGlobError"); function onGlobMatch(match) { globber.pause(); var entryData = Object.assign({}, data); @@ -99298,6 +102003,7 @@ var require_core2 = __commonJS({ entryData.name = match.relative; this._append(match.absolute, entryData); } + __name(onGlobMatch, "onGlobMatch"); var globber = glob(options.cwd || ".", options); globber.on("error", onGlobError.bind(this)); globber.on("match", onGlobMatch.bind(this)); @@ -99998,6 +102704,7 @@ var require_crc32 = __commonJS({ } return typeof Int32Array !== "undefined" ? new Int32Array(table) : table; } + __name(signed_crc_table, "signed_crc_table"); var T0 = signed_crc_table(); function slice_by_16_tables(T) { var c = 0, v = 0, n = 0, table = typeof Int32Array !== "undefined" ? new Int32Array(4096) : new Array(4096); @@ -100010,6 +102717,7 @@ var require_crc32 = __commonJS({ for (n = 1; n != 16; ++n) out[n - 1] = typeof Int32Array !== "undefined" ? table.subarray(n * 256, n * 256 + 256) : table.slice(n * 256, n * 256 + 256); return out; } + __name(slice_by_16_tables, "slice_by_16_tables"); var TT = slice_by_16_tables(T0); var T1 = TT[0], T2 = TT[1], T3 = TT[2], T4 = TT[3], T5 = TT[4]; var T6 = TT[5], T7 = TT[6], T8 = TT[7], T9 = TT[8], Ta = TT[9]; @@ -100019,6 +102727,7 @@ var require_crc32 = __commonJS({ for (var i = 0, L = bstr.length; i < L; ) C = C >>> 8 ^ T0[(C ^ bstr.charCodeAt(i++)) & 255]; return ~C; } + __name(crc32_bstr, "crc32_bstr"); function crc32_buf(B, seed) { var C = seed ^ -1, L = B.length - 15, i = 0; for (; i < L; ) C = Tf[B[i++] ^ C & 255] ^ Te[B[i++] ^ C >> 8 & 255] ^ Td[B[i++] ^ C >> 16 & 255] ^ Tc[B[i++] ^ C >>> 24] ^ Tb[B[i++]] ^ Ta[B[i++]] ^ T9[B[i++]] ^ T8[B[i++]] ^ T7[B[i++]] ^ T6[B[i++]] ^ T5[B[i++]] ^ T4[B[i++]] ^ T3[B[i++]] ^ T2[B[i++]] ^ T1[B[i++]] ^ T0[B[i++]]; @@ -100026,6 +102735,7 @@ var require_crc32 = __commonJS({ while (i < L) C = C >>> 8 ^ T0[(C ^ B[i++]) & 255]; return ~C; } + __name(crc32_buf, "crc32_buf"); function crc32_str(str, seed) { var C = seed ^ -1; for (var i = 0, L = str.length, c = 0, d = 0; i < L; ) { @@ -100050,6 +102760,7 @@ var require_crc32 = __commonJS({ } return ~C; } + __name(crc32_str, "crc32_str"); CRC322.table = T0; CRC322.bstr = crc32_bstr; CRC322.buf = crc32_buf; @@ -100065,6 +102776,9 @@ var require_crc32_stream = __commonJS({ var { Transform } = require_ours(); var crc32 = require_crc32(); var CRC32Stream = class extends Transform { + static { + __name(this, "CRC32Stream"); + } constructor(options) { super(options); this.checksum = Buffer.allocUnsafe(4); @@ -100101,6 +102815,9 @@ var require_deflate_crc32_stream = __commonJS({ var { DeflateRaw } = require("zlib"); var crc32 = require_crc32(); var DeflateCRC32Stream = class extends DeflateRaw { + static { + __name(this, "DeflateCRC32Stream"); + } constructor(options) { super(options); this.checksum = Buffer.allocUnsafe(4); @@ -100289,6 +103006,7 @@ var require_zip_archive_output_stream = __commonJS({ this._afterAppend(ae); callback(error, ae); } + __name(handleStuff, "handleStuff"); process2.once("end", handleStuff.bind(this)); process2.once("error", function(err) { error = err; @@ -100557,7 +103275,7 @@ var require_zip = __commonJS({ "node_modules/archiver/lib/plugins/zip.js"(exports2, module2) { var engine = require_zip_stream(); var util = require_archiver_utils(); - var Zip = function(options) { + var Zip = /* @__PURE__ */ __name(function(options) { if (!(this instanceof Zip)) { return new Zip(options); } @@ -100572,7 +103290,7 @@ var require_zip = __commonJS({ symlink: true }; this.engine = new engine(options); - }; + }, "Zip"); Zip.prototype.append = function(source, data, callback) { this.engine.entry(source, data, callback); }; @@ -100610,6 +103328,9 @@ var require_process_next_tick = __commonJS({ var require_fixed_size = __commonJS({ "node_modules/fast-fifo/fixed-size.js"(exports2, module2) { module2.exports = class FixedFIFO { + static { + __name(this, "FixedFIFO"); + } constructor(hwm) { if (!(hwm > 0) || (hwm - 1 & hwm) !== 0) throw new Error("Max size for a FixedFIFO should be a power of two"); this.buffer = new Array(hwm); @@ -100651,6 +103372,9 @@ var require_fast_fifo = __commonJS({ "node_modules/fast-fifo/index.js"(exports2, module2) { var FixedFIFO = require_fixed_size(); module2.exports = class FastFIFO { + static { + __name(this, "FastFIFO"); + } constructor(hwm) { this.hwm = hwm || 16; this.head = new FixedFIFO(this.hwm); @@ -100785,6 +103509,9 @@ var require_streamx = __commonJS({ var WRITE_UPDATE_SYNC_STATUS = WRITE_UPDATING | OPEN_STATUS | WRITE_NEXT_TICK | WRITE_PRIMARY; var asyncIterator = Symbol.asyncIterator || Symbol("asyncIterator"); var WritableState = class { + static { + __name(this, "WritableState"); + } constructor(stream, { highWaterMark = 16384, map = null, mapWritable, byteLength, byteLengthWritable } = {}) { this.stream = stream; this.queue = new FIFO(); @@ -100881,6 +103608,9 @@ var require_streamx = __commonJS({ } }; var ReadableState = class { + static { + __name(this, "ReadableState"); + } constructor(stream, { highWaterMark = 16384, map = null, mapReadable, byteLength, byteLengthReadable } = {}) { this.stream = stream; this.queue = new FIFO(); @@ -101025,6 +103755,9 @@ var require_streamx = __commonJS({ } }; var TransformState = class { + static { + __name(this, "TransformState"); + } constructor(stream) { this.data = null; this.afterTransform = afterTransform.bind(stream); @@ -101032,6 +103765,9 @@ var require_streamx = __commonJS({ } }; var Pipeline = class { + static { + __name(this, "Pipeline"); + } constructor(src, dst, cb) { this.from = src; this.to = dst; @@ -101070,6 +103806,7 @@ var require_streamx = __commonJS({ this.stream._duplexState |= READ_PIPE_DRAINED; this.updateCallback(); } + __name(afterDrain, "afterDrain"); function afterFinal(err) { const stream = this.stream; if (err) stream.destroy(err); @@ -101084,6 +103821,7 @@ var require_streamx = __commonJS({ if ((stream._duplexState & WRITE_UPDATING) === 0) this.update(); else this.updateNextTick(); } + __name(afterFinal, "afterFinal"); function afterDestroy(err) { const stream = this.stream; if (!err && this.error !== STREAM_DESTROYED) err = this.error; @@ -101098,6 +103836,7 @@ var require_streamx = __commonJS({ if (ws.pipeline !== null) ws.pipeline.done(stream, err); } } + __name(afterDestroy, "afterDestroy"); function afterWrite(err) { const stream = this.stream; if (err) stream.destroy(err); @@ -101111,24 +103850,28 @@ var require_streamx = __commonJS({ } this.updateCallback(); } + __name(afterWrite, "afterWrite"); function afterRead(err) { if (err) this.stream.destroy(err); this.stream._duplexState &= READ_NOT_ACTIVE; if (this.readAhead === false && (this.stream._duplexState & READ_RESUMED) === 0) this.stream._duplexState &= READ_NO_READ_AHEAD; this.updateCallback(); } + __name(afterRead, "afterRead"); function updateReadNT() { if ((this.stream._duplexState & READ_UPDATING) === 0) { this.stream._duplexState &= READ_NOT_NEXT_TICK; this.update(); } } + __name(updateReadNT, "updateReadNT"); function updateWriteNT() { if ((this.stream._duplexState & WRITE_UPDATING) === 0) { this.stream._duplexState &= WRITE_NOT_NEXT_TICK; this.update(); } } + __name(updateWriteNT, "updateWriteNT"); function tickDrains(drains) { for (let i = 0; i < drains.length; i++) { if (--drains[i].writes === 0) { @@ -101137,6 +103880,7 @@ var require_streamx = __commonJS({ } } } + __name(tickDrains, "tickDrains"); function afterOpen(err) { const stream = this.stream; if (err) stream.destroy(err); @@ -101153,10 +103897,12 @@ var require_streamx = __commonJS({ stream._readableState.updateCallback(); } } + __name(afterOpen, "afterOpen"); function afterTransform(err, data) { if (data !== void 0 && data !== null) this.push(data); this._writableState.afterWrite(err); } + __name(afterTransform, "afterTransform"); function newListener(name) { if (this._readableState !== null) { if (name === "data") { @@ -101175,7 +103921,11 @@ var require_streamx = __commonJS({ } } } + __name(newListener, "newListener"); var Stream = class extends EventEmitter { + static { + __name(this, "Stream"); + } constructor(opts) { super(); this._duplexState = 0; @@ -101232,6 +103982,9 @@ var require_streamx = __commonJS({ } }; var Readable = class _Readable extends Stream { + static { + __name(this, "Readable"); + } constructor(opts) { super(opts); this._duplexState |= OPENING | WRITE_DONE | READ_READ_AHEAD; @@ -101291,6 +104044,7 @@ var require_streamx = __commonJS({ if (data.done) rs.push(null); else rs.push(data.value); } + __name(push, "push"); } static from(data, opts) { if (isReadStreamx(data)) return data; @@ -101344,9 +104098,11 @@ var require_streamx = __commonJS({ function onreadable() { if (promiseResolve !== null) ondata(stream.read()); } + __name(onreadable, "onreadable"); function onclose() { if (promiseResolve !== null) ondata(null); } + __name(onclose, "onclose"); function ondata(data) { if (promiseReject === null) return; if (error) promiseReject(error); @@ -101354,6 +104110,7 @@ var require_streamx = __commonJS({ else promiseResolve({ value: data, done: data === null }); promiseReject = promiseResolve = null; } + __name(ondata, "ondata"); function destroy(err) { stream.destroy(err); return new Promise((resolve, reject) => { @@ -101364,9 +104121,13 @@ var require_streamx = __commonJS({ }); }); } + __name(destroy, "destroy"); } }; var Writable = class extends Stream { + static { + __name(this, "Writable"); + } constructor(opts) { super(opts); this._duplexState |= OPENING | READ_DONE; @@ -101412,6 +104173,9 @@ var require_streamx = __commonJS({ } }; var Duplex = class extends Readable { + static { + __name(this, "Duplex"); + } // and Writable constructor(opts) { super(opts); @@ -101443,6 +104207,9 @@ var require_streamx = __commonJS({ } }; var Transform = class extends Duplex { + static { + __name(this, "Transform"); + } constructor(opts) { super(opts); this._transformState = new TransformState(this); @@ -101487,6 +104254,9 @@ var require_streamx = __commonJS({ } }; var PassThrough = class extends Transform { + static { + __name(this, "PassThrough"); + } }; function transformAfterFlush(err, data) { const cb = this._transformState.afterFinal; @@ -101495,6 +104265,7 @@ var require_streamx = __commonJS({ this.push(null); cb(null); } + __name(transformAfterFlush, "transformAfterFlush"); function pipelinePromise(...streams) { return new Promise((resolve, reject) => { return pipeline(...streams, (err) => { @@ -101503,6 +104274,7 @@ var require_streamx = __commonJS({ }); }); } + __name(pipelinePromise, "pipelinePromise"); function pipeline(stream, ...streams) { const all = Array.isArray(stream) ? [...stream, ...streams] : [stream, ...streams]; const done = all.length && typeof all[all.length - 1] === "function" ? all.pop() : null; @@ -101542,7 +104314,9 @@ var require_streamx = __commonJS({ if (rd && s._readableState && !s._readableState.ended) return onerror2(PREMATURE_CLOSE); if (wr && s._writableState && !s._writableState.ended) return onerror2(PREMATURE_CLOSE); } + __name(onclose, "onclose"); } + __name(errorHandle, "errorHandle"); function onerror(err) { if (!err || error) return; error = err; @@ -101550,34 +104324,45 @@ var require_streamx = __commonJS({ s.destroy(err); } } + __name(onerror, "onerror"); } + __name(pipeline, "pipeline"); function isStream(stream) { return !!stream._readableState || !!stream._writableState; } + __name(isStream, "isStream"); function isStreamx(stream) { return typeof stream._duplexState === "number" && isStream(stream); } + __name(isStreamx, "isStreamx"); function getStreamError(stream) { const err = stream._readableState && stream._readableState.error || stream._writableState && stream._writableState.error; return err === STREAM_DESTROYED ? null : err; } + __name(getStreamError, "getStreamError"); function isReadStreamx(stream) { return isStreamx(stream) && stream.readable; } + __name(isReadStreamx, "isReadStreamx"); function isTypedArray(data) { return typeof data === "object" && data !== null && typeof data.byteLength === "number"; } + __name(isTypedArray, "isTypedArray"); function defaultByteLength(data) { return isTypedArray(data) ? data.byteLength : 1024; } + __name(defaultByteLength, "defaultByteLength"); function noop() { } + __name(noop, "noop"); function abort() { this.destroy(new Error("Stream aborted.")); } + __name(abort, "abort"); function isWritev(s) { return s._writev !== Writable.prototype._writev && s._writev !== Duplex.prototype._writev; } + __name(isWritev, "isWritev"); module2.exports = { pipeline, pipelinePromise, @@ -101601,91 +104386,120 @@ var require_b4a = __commonJS({ function isBuffer(value) { return Buffer.isBuffer(value) || value instanceof Uint8Array; } + __name(isBuffer, "isBuffer"); function isEncoding(encoding) { return Buffer.isEncoding(encoding); } + __name(isEncoding, "isEncoding"); function alloc(size, fill2, encoding) { return Buffer.alloc(size, fill2, encoding); } + __name(alloc, "alloc"); function allocUnsafe(size) { return Buffer.allocUnsafe(size); } + __name(allocUnsafe, "allocUnsafe"); function allocUnsafeSlow(size) { return Buffer.allocUnsafeSlow(size); } + __name(allocUnsafeSlow, "allocUnsafeSlow"); function byteLength(string, encoding) { return Buffer.byteLength(string, encoding); } + __name(byteLength, "byteLength"); function compare(a, b) { return Buffer.compare(a, b); } + __name(compare, "compare"); function concat(buffers, totalLength) { return Buffer.concat(buffers, totalLength); } + __name(concat, "concat"); function copy(source, target, targetStart, start, end) { return toBuffer(source).copy(target, targetStart, start, end); } + __name(copy, "copy"); function equals(a, b) { return toBuffer(a).equals(b); } + __name(equals, "equals"); function fill(buffer, value, offset, end, encoding) { return toBuffer(buffer).fill(value, offset, end, encoding); } + __name(fill, "fill"); function from(value, encodingOrOffset, length) { return Buffer.from(value, encodingOrOffset, length); } + __name(from, "from"); function includes(buffer, value, byteOffset, encoding) { return toBuffer(buffer).includes(value, byteOffset, encoding); } + __name(includes, "includes"); function indexOf(buffer, value, byfeOffset, encoding) { return toBuffer(buffer).indexOf(value, byfeOffset, encoding); } + __name(indexOf, "indexOf"); function lastIndexOf(buffer, value, byteOffset, encoding) { return toBuffer(buffer).lastIndexOf(value, byteOffset, encoding); } + __name(lastIndexOf, "lastIndexOf"); function swap16(buffer) { return toBuffer(buffer).swap16(); } + __name(swap16, "swap16"); function swap32(buffer) { return toBuffer(buffer).swap32(); } + __name(swap32, "swap32"); function swap64(buffer) { return toBuffer(buffer).swap64(); } + __name(swap64, "swap64"); function toBuffer(buffer) { if (Buffer.isBuffer(buffer)) return buffer; return Buffer.from(buffer.buffer, buffer.byteOffset, buffer.byteLength); } + __name(toBuffer, "toBuffer"); function toString(buffer, encoding, start, end) { return toBuffer(buffer).toString(encoding, start, end); } + __name(toString, "toString"); function write(buffer, string, offset, length, encoding) { return toBuffer(buffer).write(string, offset, length, encoding); } + __name(write, "write"); function writeDoubleLE(buffer, value, offset) { return toBuffer(buffer).writeDoubleLE(value, offset); } + __name(writeDoubleLE, "writeDoubleLE"); function writeFloatLE(buffer, value, offset) { return toBuffer(buffer).writeFloatLE(value, offset); } + __name(writeFloatLE, "writeFloatLE"); function writeUInt32LE(buffer, value, offset) { return toBuffer(buffer).writeUInt32LE(value, offset); } + __name(writeUInt32LE, "writeUInt32LE"); function writeInt32LE(buffer, value, offset) { return toBuffer(buffer).writeInt32LE(value, offset); } + __name(writeInt32LE, "writeInt32LE"); function readDoubleLE(buffer, offset) { return toBuffer(buffer).readDoubleLE(offset); } + __name(readDoubleLE, "readDoubleLE"); function readFloatLE(buffer, offset) { return toBuffer(buffer).readFloatLE(offset); } + __name(readFloatLE, "readFloatLE"); function readUInt32LE(buffer, offset) { return toBuffer(buffer).readUInt32LE(offset); } + __name(readUInt32LE, "readUInt32LE"); function readInt32LE(buffer, offset) { return toBuffer(buffer).readInt32LE(offset); } + __name(readInt32LE, "readInt32LE"); module2.exports = { isBuffer, isEncoding, @@ -101734,10 +104548,10 @@ var require_headers2 = __commonJS({ var MASK = 4095; var MAGIC_OFFSET = 257; var VERSION_OFFSET = 263; - exports2.decodeLongPath = function decodeLongPath(buf, encoding) { + exports2.decodeLongPath = /* @__PURE__ */ __name(function decodeLongPath(buf, encoding) { return decodeStr(buf, 0, buf.length, encoding); - }; - exports2.encodePax = function encodePax(opts) { + }, "decodeLongPath"); + exports2.encodePax = /* @__PURE__ */ __name(function encodePax(opts) { let result = ""; if (opts.name) result += addLength(" path=" + opts.name + "\n"); if (opts.linkname) result += addLength(" linkpath=" + opts.linkname + "\n"); @@ -101748,8 +104562,8 @@ var require_headers2 = __commonJS({ } } return b4a.from(result); - }; - exports2.decodePax = function decodePax(buf) { + }, "encodePax"); + exports2.decodePax = /* @__PURE__ */ __name(function decodePax(buf) { const result = {}; while (buf.length) { let i = 0; @@ -101763,8 +104577,8 @@ var require_headers2 = __commonJS({ buf = buf.subarray(len); } return result; - }; - exports2.encode = function encode(opts) { + }, "decodePax"); + exports2.encode = /* @__PURE__ */ __name(function encode(opts) { const buf = b4a.alloc(512); let name = opts.name; let prefix = ""; @@ -101795,8 +104609,8 @@ var require_headers2 = __commonJS({ if (prefix) b4a.write(buf, prefix, 345); b4a.write(buf, encodeOct(cksum(buf), 6), 148); return buf; - }; - exports2.decode = function decode(buf, filenameEncoding, allowUnknownFormat) { + }, "encode"); + exports2.decode = /* @__PURE__ */ __name(function decode(buf, filenameEncoding, allowUnknownFormat) { let typeflag = buf[156] === 0 ? 0 : buf[156] - ZERO_OFFSET; let name = decodeStr(buf, 0, 100, filenameEncoding); const mode = decodeOct(buf, 100, 8); @@ -101837,13 +104651,15 @@ var require_headers2 = __commonJS({ devminor, pax: null }; - }; + }, "decode"); function isUSTAR(buf) { return b4a.equals(USTAR_MAGIC, buf.subarray(MAGIC_OFFSET, MAGIC_OFFSET + 6)); } + __name(isUSTAR, "isUSTAR"); function isGNU(buf) { return b4a.equals(GNU_MAGIC, buf.subarray(MAGIC_OFFSET, MAGIC_OFFSET + 6)) && b4a.equals(GNU_VER, buf.subarray(VERSION_OFFSET, VERSION_OFFSET + 2)); } + __name(isGNU, "isGNU"); function clamp(index, len, defaultValue) { if (typeof index !== "number") return defaultValue; index = ~~index; @@ -101853,6 +104669,7 @@ var require_headers2 = __commonJS({ if (index >= 0) return index; return 0; } + __name(clamp, "clamp"); function toType(flag) { switch (flag) { case 0: @@ -101883,6 +104700,7 @@ var require_headers2 = __commonJS({ } return null; } + __name(toType, "toType"); function toTypeflag(flag) { switch (flag) { case "file": @@ -101906,23 +104724,27 @@ var require_headers2 = __commonJS({ } return 0; } + __name(toTypeflag, "toTypeflag"); function indexOf(block, num, offset, end) { for (; offset < end; offset++) { if (block[offset] === num) return offset; } return end; } + __name(indexOf, "indexOf"); function cksum(block) { let sum = 8 * 32; for (let i = 0; i < 148; i++) sum += block[i]; for (let j = 156; j < 512; j++) sum += block[j]; return sum; } + __name(cksum, "cksum"); function encodeOct(val, n) { val = val.toString(8); if (val.length > n) return SEVENS.slice(0, n) + " "; return ZEROS.slice(0, n - val.length) + val + " "; } + __name(encodeOct, "encodeOct"); function encodeSizeBin(num, buf, off) { buf[off] = 128; for (let i = 11; i > 0; i--) { @@ -101930,6 +104752,7 @@ var require_headers2 = __commonJS({ num = Math.floor(num / 256); } } + __name(encodeSizeBin, "encodeSizeBin"); function encodeSize(num, buf, off) { if (num.toString(8).length > 11) { encodeSizeBin(num, buf, off); @@ -101937,6 +104760,7 @@ var require_headers2 = __commonJS({ b4a.write(buf, encodeOct(num, 11), off); } } + __name(encodeSize, "encodeSize"); function parse256(buf) { let positive; if (buf[0] === 128) positive = true; @@ -101956,6 +104780,7 @@ var require_headers2 = __commonJS({ } return positive ? sum : -1 * sum; } + __name(parse256, "parse256"); function decodeOct(val, offset, length) { val = val.subarray(offset, offset + length); offset = 0; @@ -101969,15 +104794,18 @@ var require_headers2 = __commonJS({ return parseInt(b4a.toString(val.subarray(offset, end)), 8); } } + __name(decodeOct, "decodeOct"); function decodeStr(val, offset, length, encoding) { return b4a.toString(val.subarray(offset, indexOf(val, 0, offset, offset + length)), encoding); } + __name(decodeStr, "decodeStr"); function addLength(str) { const len = b4a.byteLength(str); let digits = Math.floor(Math.log(len) / Math.log(10)) + 1; if (len + digits >= Math.pow(10, digits)) digits++; return len + digits + str; } + __name(addLength, "addLength"); } }); @@ -101990,6 +104818,9 @@ var require_extract = __commonJS({ var headers = require_headers2(); var EMPTY = b4a.alloc(0); var BufferList = class { + static { + __name(this, "BufferList"); + } constructor() { this.buffered = 0; this.shifted = 0; @@ -102032,6 +104863,9 @@ var require_extract = __commonJS({ } }; var Source = class extends Readable { + static { + __name(this, "Source"); + } constructor(self2, header, offset) { super(); this.header = header; @@ -102063,6 +104897,9 @@ var require_extract = __commonJS({ } }; var Extract = class extends Writable { + static { + __name(this, "Extract"); + } constructor(opts) { super(opts); if (!opts) opts = {}; @@ -102256,6 +105093,7 @@ var require_extract = __commonJS({ entryCallback = null; cb(err); } + __name(consumeCallback, "consumeCallback"); function onnext(resolve, reject) { if (error) { return reject(error); @@ -102273,6 +105111,7 @@ var require_extract = __commonJS({ promiseResolve = promiseReject = null; } } + __name(onnext, "onnext"); function onentry(header, stream, callback) { entryCallback = callback; stream.on("error", noop); @@ -102283,6 +105122,7 @@ var require_extract = __commonJS({ entryStream = stream; } } + __name(onentry, "onentry"); function onclose() { consumeCallback(error); if (!promiseResolve) return; @@ -102290,6 +105130,7 @@ var require_extract = __commonJS({ else promiseResolve({ value: void 0, done: true }); promiseResolve = promiseReject = null; } + __name(onclose, "onclose"); function destroy(err) { extract.destroy(err); consumeCallback(err); @@ -102301,17 +105142,20 @@ var require_extract = __commonJS({ }); }); } + __name(destroy, "destroy"); } }; - module2.exports = function extract(opts) { + module2.exports = /* @__PURE__ */ __name(function extract(opts) { return new Extract(opts); - }; + }, "extract"); function noop() { } + __name(noop, "noop"); function overflow(size) { size &= 511; return size && 512 - size; } + __name(overflow, "overflow"); } }); @@ -102346,6 +105190,9 @@ var require_pack = __commonJS({ var FMODE = 420; var END_OF_TAR = b4a.alloc(1024); var Sink = class extends Writable { + static { + __name(this, "Sink"); + } constructor(pack, header, callback) { super({ mapWritable, eagerOpen: true }); this.written = 0; @@ -102432,6 +105279,9 @@ var require_pack = __commonJS({ } }; var Pack = class extends Readable { + static { + __name(this, "Pack"); + } constructor(opts) { super(opts); this._drain = noop; @@ -102539,9 +105389,9 @@ var require_pack = __commonJS({ cb(); } }; - module2.exports = function pack(opts) { + module2.exports = /* @__PURE__ */ __name(function pack(opts) { return new Pack(opts); - }; + }, "pack"); function modeToType(mode) { switch (mode & constants.S_IFMT) { case constants.S_IFBLK: @@ -102557,15 +105407,19 @@ var require_pack = __commonJS({ } return "file"; } + __name(modeToType, "modeToType"); function noop() { } + __name(noop, "noop"); function overflow(self2, size) { size &= 511; if (size) self2.push(END_OF_TAR.subarray(0, 512 - size)); } + __name(overflow, "overflow"); function mapWritable(buf) { return b4a.isBuffer(buf) ? buf : b4a.from(buf); } + __name(mapWritable, "mapWritable"); } }); @@ -102583,7 +105437,7 @@ var require_tar = __commonJS({ var zlib = require("zlib"); var engine = require_tar_stream(); var util = require_archiver_utils(); - var Tar = function(options) { + var Tar = /* @__PURE__ */ __name(function(options) { if (!(this instanceof Tar)) { return new Tar(options); } @@ -102603,7 +105457,7 @@ var require_tar = __commonJS({ this.compressor = zlib.createGzip(options.gzipOptions); this.compressor.on("error", this._onCompressorError.bind(this)); } - }; + }, "Tar"); Tar.prototype._onCompressorError = function(err) { this.engine.emit("error", err); }; @@ -102619,6 +105473,7 @@ var require_tar = __commonJS({ callback(err2, data); }); } + __name(append, "append"); if (data.sourceType === "buffer") { append(null, source); } else if (data.sourceType === "stream" && data.stats) { @@ -102662,6 +105517,7 @@ var require_dist5 = __commonJS({ function getDefaultExportFromCjs(x) { return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x; } + __name(getDefaultExportFromCjs, "getDefaultExportFromCjs"); var CRC_TABLE = new Int32Array([ 0, 1996959894, @@ -102932,11 +105788,13 @@ var require_dist5 = __commonJS({ throw new Error("input must be buffer, number, or string, received " + typeof input); } } + __name(ensureBuffer, "ensureBuffer"); function bufferizeInt(num) { const tmp = ensureBuffer(4); tmp.writeInt32BE(num, 0); return tmp; } + __name(bufferizeInt, "bufferizeInt"); function _crc32(buf, previous) { buf = ensureBuffer(buf); if (Buffer.isBuffer(previous)) { @@ -102948,9 +105806,11 @@ var require_dist5 = __commonJS({ } return crc ^ -1; } + __name(_crc32, "_crc32"); function crc32() { return bufferizeInt(_crc32.apply(null, arguments)); } + __name(crc32, "crc32"); crc32.signed = function() { return _crc32.apply(null, arguments); }; @@ -102970,7 +105830,7 @@ var require_json = __commonJS({ var Transform = require_ours().Transform; var crc32 = require_dist5(); var util = require_archiver_utils(); - var Json = function(options) { + var Json = /* @__PURE__ */ __name(function(options) { if (!(this instanceof Json)) { return new Json(options); } @@ -102981,7 +105841,7 @@ var require_json = __commonJS({ symlink: true }; this.files = []; - }; + }, "Json"); inherits(Json, Transform); Json.prototype._transform = function(chunk, encoding, callback) { callback(null, chunk); @@ -103003,6 +105863,7 @@ var require_json = __commonJS({ self2.files.push(data); callback(null, data); } + __name(onend, "onend"); if (data.sourceType === "buffer") { onend(null, source); } else if (data.sourceType === "stream") { @@ -103022,9 +105883,9 @@ var require_archiver = __commonJS({ "node_modules/archiver/index.js"(exports2, module2) { var Archiver = require_core2(); var formats = {}; - var vending = function(format, options) { + var vending = /* @__PURE__ */ __name(function(format, options) { return vending.create(format, options); - }; + }, "vending"); vending.create = function(format, options) { if (formats[format]) { var instance = new Archiver(format, options); @@ -103068,9 +105929,9 @@ var require_zip2 = __commonJS({ if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { + desc = { enumerable: true, get: /* @__PURE__ */ __name(function() { return m[k]; - } }; + }, "get") }; } Object.defineProperty(o, k2, desc); } : function(o, m, k, k2) { @@ -103097,6 +105958,7 @@ var require_zip2 = __commonJS({ resolve(value); }); } + __name(adopt, "adopt"); return new (P || (P = Promise))(function(resolve, reject) { function fulfilled(value) { try { @@ -103105,6 +105967,7 @@ var require_zip2 = __commonJS({ reject(e); } } + __name(fulfilled, "fulfilled"); function rejected(value) { try { step(generator["throw"](value)); @@ -103112,9 +105975,11 @@ var require_zip2 = __commonJS({ reject(e); } } + __name(rejected, "rejected"); function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + __name(step, "step"); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; @@ -103127,6 +105992,9 @@ var require_zip2 = __commonJS({ var config_1 = require_config(); exports2.DEFAULT_COMPRESSION_LEVEL = 6; var ZipUploadStream = class extends stream.Transform { + static { + __name(this, "ZipUploadStream"); + } constructor(bufferSize) { super({ highWaterMark: bufferSize @@ -103167,13 +106035,14 @@ var require_zip2 = __commonJS({ return zipUploadStream; }); } + __name(createZipUploadStream, "createZipUploadStream"); exports2.createZipUploadStream = createZipUploadStream; - var zipErrorCallback = (error) => { + var zipErrorCallback = /* @__PURE__ */ __name((error) => { core2.error("An error has occurred while creating the zip file for upload"); core2.info(error); throw new Error("An error has occurred during zip creation for the artifact"); - }; - var zipWarningCallback = (error) => { + }, "zipErrorCallback"); + var zipWarningCallback = /* @__PURE__ */ __name((error) => { if (error.code === "ENOENT") { core2.warning("ENOENT warning during artifact zip creation. No such file or directory"); core2.info(error); @@ -103181,13 +106050,13 @@ var require_zip2 = __commonJS({ core2.warning(`A non-blocking warning has occurred during artifact zip creation: ${error.code}`); core2.info(error); } - }; - var zipFinishCallback = () => { + }, "zipWarningCallback"); + var zipFinishCallback = /* @__PURE__ */ __name(() => { core2.debug("Zip stream for upload has finished."); - }; - var zipEndCallback = () => { + }, "zipFinishCallback"); + var zipEndCallback = /* @__PURE__ */ __name(() => { core2.debug("Zip stream for upload has ended."); - }; + }, "zipEndCallback"); } }); @@ -103199,9 +106068,9 @@ var require_upload_artifact = __commonJS({ if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { + desc = { enumerable: true, get: /* @__PURE__ */ __name(function() { return m[k]; - } }; + }, "get") }; } Object.defineProperty(o, k2, desc); } : function(o, m, k, k2) { @@ -103228,6 +106097,7 @@ var require_upload_artifact = __commonJS({ resolve(value); }); } + __name(adopt, "adopt"); return new (P || (P = Promise))(function(resolve, reject) { function fulfilled(value) { try { @@ -103236,6 +106106,7 @@ var require_upload_artifact = __commonJS({ reject(e); } } + __name(fulfilled, "fulfilled"); function rejected(value) { try { step(generator["throw"](value)); @@ -103243,9 +106114,11 @@ var require_upload_artifact = __commonJS({ reject(e); } } + __name(rejected, "rejected"); function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + __name(step, "step"); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; @@ -103311,6 +106184,7 @@ var require_upload_artifact = __commonJS({ }; }); } + __name(uploadArtifact, "uploadArtifact"); exports2.uploadArtifact = uploadArtifact; } }); @@ -103324,6 +106198,9 @@ var require_context2 = __commonJS({ var fs_1 = require("fs"); var os_1 = require("os"); var Context = class { + static { + __name(this, "Context"); + } /** * Hydrate the context from the environment */ @@ -103379,9 +106256,9 @@ var require_utils5 = __commonJS({ "use strict"; var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { + Object.defineProperty(o, k2, { enumerable: true, get: /* @__PURE__ */ __name(function() { return m[k]; - } }); + }, "get") }); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; @@ -103411,15 +106288,18 @@ var require_utils5 = __commonJS({ } return typeof options.auth === "string" ? options.auth : `token ${token}`; } + __name(getAuthString, "getAuthString"); exports2.getAuthString = getAuthString; function getProxyAgent(destinationUrl) { const hc = new httpClient.HttpClient(); return hc.getAgent(destinationUrl); } + __name(getProxyAgent, "getProxyAgent"); exports2.getProxyAgent = getProxyAgent; function getApiBaseUrl() { return process.env["GITHUB_API_URL"] || "https://api.github.com"; } + __name(getApiBaseUrl, "getApiBaseUrl"); exports2.getApiBaseUrl = getApiBaseUrl; } }); @@ -103438,6 +106318,7 @@ var require_dist_node = __commonJS({ } return ""; } + __name(getUserAgent, "getUserAgent"); exports2.getUserAgent = getUserAgent; } }); @@ -103467,6 +106348,7 @@ var require_register = __commonJS({ }, method)(); }); } + __name(register, "register"); } }); @@ -103480,12 +106362,12 @@ var require_add = __commonJS({ state.registry[name] = []; } if (kind === "before") { - hook = function(method, options) { + hook = /* @__PURE__ */ __name(function(method, options) { return Promise.resolve().then(orig.bind(null, options)).then(method.bind(null, options)); - }; + }, "hook"); } if (kind === "after") { - hook = function(method, options) { + hook = /* @__PURE__ */ __name(function(method, options) { var result; return Promise.resolve().then(method.bind(null, options)).then(function(result_) { result = result_; @@ -103493,20 +106375,21 @@ var require_add = __commonJS({ }).then(function() { return result; }); - }; + }, "hook"); } if (kind === "error") { - hook = function(method, options) { + hook = /* @__PURE__ */ __name(function(method, options) { return Promise.resolve().then(method.bind(null, options)).catch(function(error) { return orig(error, options); }); - }; + }, "hook"); } state.registry[name].push({ hook, orig }); } + __name(addHook, "addHook"); } }); @@ -103526,6 +106409,7 @@ var require_remove = __commonJS({ } state.registry[name].splice(index, 1); } + __name(removeHook, "removeHook"); } }); @@ -103549,6 +106433,7 @@ var require_before_after_hook = __commonJS({ hook[kind] = hook.api[kind] = bindable(addHook, null).apply(null, args); }); } + __name(bindApi, "bindApi"); function HookSingular() { var singularHookName = "h"; var singularHookState = { @@ -103558,6 +106443,7 @@ var require_before_after_hook = __commonJS({ bindApi(singularHook, singularHookState, singularHookName); return singularHook; } + __name(HookSingular, "HookSingular"); function HookCollection() { var state = { registry: {} @@ -103566,6 +106452,7 @@ var require_before_after_hook = __commonJS({ bindApi(hook, state); return hook; } + __name(HookCollection, "HookCollection"); var collectionHookDeprecationMessageDisplayed = false; function Hook() { if (!collectionHookDeprecationMessageDisplayed) { @@ -103576,6 +106463,7 @@ var require_before_after_hook = __commonJS({ } return HookCollection(); } + __name(Hook, "Hook"); Hook.Singular = HookSingular.bind(); Hook.Collection = HookCollection.bind(); module2.exports = Hook; @@ -103593,6 +106481,7 @@ var require_is_plain_object = __commonJS({ function isObject(o) { return Object.prototype.toString.call(o) === "[object Object]"; } + __name(isObject, "isObject"); function isPlainObject(o) { var ctor, prot; if (isObject(o) === false) return false; @@ -103605,6 +106494,7 @@ var require_is_plain_object = __commonJS({ } return true; } + __name(isPlainObject, "isPlainObject"); exports2.isPlainObject = isPlainObject; } }); @@ -103625,6 +106515,7 @@ var require_dist_node2 = __commonJS({ return newObj; }, {}); } + __name(lowercaseKeys, "lowercaseKeys"); function mergeDeep(defaults, options) { const result = Object.assign({}, defaults); Object.keys(options).forEach((key) => { @@ -103641,6 +106532,7 @@ var require_dist_node2 = __commonJS({ }); return result; } + __name(mergeDeep, "mergeDeep"); function removeUndefinedProperties(obj) { for (const key in obj) { if (obj[key] === void 0) { @@ -103649,6 +106541,7 @@ var require_dist_node2 = __commonJS({ } return obj; } + __name(removeUndefinedProperties, "removeUndefinedProperties"); function merge(defaults, route, options) { if (typeof route === "string") { let [method, url] = route.split(" "); @@ -103671,6 +106564,7 @@ var require_dist_node2 = __commonJS({ mergedOptions.mediaType.previews = mergedOptions.mediaType.previews.map((preview) => preview.replace(/-preview/, "")); return mergedOptions; } + __name(merge, "merge"); function addQueryParameters(url, parameters) { const separator = /\?/.test(url) ? "&" : "?"; const names = Object.keys(parameters); @@ -103684,10 +106578,12 @@ var require_dist_node2 = __commonJS({ return `${name}=${encodeURIComponent(parameters[name])}`; }).join("&"); } + __name(addQueryParameters, "addQueryParameters"); var urlVariableRegex = /\{[^}]+\}/g; function removeNonChars(variableName) { return variableName.replace(/^\W+|\W+$/g, "").split(/,/); } + __name(removeNonChars, "removeNonChars"); function extractUrlVariableNames(url) { const matches = url.match(urlVariableRegex); if (!matches) { @@ -103695,12 +106591,14 @@ var require_dist_node2 = __commonJS({ } return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []); } + __name(extractUrlVariableNames, "extractUrlVariableNames"); function omit(object, keysToOmit) { return Object.keys(object).filter((option) => !keysToOmit.includes(option)).reduce((obj, key) => { obj[key] = object[key]; return obj; }, {}); } + __name(omit, "omit"); function encodeReserved(str) { return str.split(/(%[0-9A-Fa-f]{2})/g).map(function(part) { if (!/%[0-9A-Fa-f]/.test(part)) { @@ -103709,11 +106607,13 @@ var require_dist_node2 = __commonJS({ return part; }).join(""); } + __name(encodeReserved, "encodeReserved"); function encodeUnreserved(str) { return encodeURIComponent(str).replace(/[!'()*]/g, function(c) { return "%" + c.charCodeAt(0).toString(16).toUpperCase(); }); } + __name(encodeUnreserved, "encodeUnreserved"); function encodeValue(operator, value, key) { value = operator === "+" || operator === "#" ? encodeReserved(value) : encodeUnreserved(value); if (key) { @@ -103722,12 +106622,15 @@ var require_dist_node2 = __commonJS({ return value; } } + __name(encodeValue, "encodeValue"); function isDefined(value) { return value !== void 0 && value !== null; } + __name(isDefined, "isDefined"); function isKeyOperator(operator) { return operator === ";" || operator === "&" || operator === "?"; } + __name(isKeyOperator, "isKeyOperator"); function getValues(context3, operator, key, modifier) { var value = context3[key], result = []; if (isDefined(value) && value !== "") { @@ -103784,11 +106687,13 @@ var require_dist_node2 = __commonJS({ } return result; } + __name(getValues, "getValues"); function parseUrl(template) { return { expand: expand.bind(null, template) }; } + __name(parseUrl, "parseUrl"); function expand(template, context3) { var operators = ["+", "#", ".", "/", ";", "?", "&"]; return template.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g, function(_2, expression, literal) { @@ -103819,6 +106724,7 @@ var require_dist_node2 = __commonJS({ } }); } + __name(expand, "expand"); function parse2(options) { let method = options.method.toUpperCase(); let url = (options.url || "/").replace(/:([a-z]\w+)/g, "{$1}"); @@ -103874,9 +106780,11 @@ var require_dist_node2 = __commonJS({ request: options.request } : null); } + __name(parse2, "parse"); function endpointWithDefaults(defaults, route, options) { return parse2(merge(defaults, route, options)); } + __name(endpointWithDefaults, "endpointWithDefaults"); function withDefaults(oldDefaults, newDefaults) { const DEFAULTS2 = merge(oldDefaults, newDefaults); const endpoint2 = endpointWithDefaults.bind(null, DEFAULTS2); @@ -103887,6 +106795,7 @@ var require_dist_node2 = __commonJS({ parse: parse2 }); } + __name(withDefaults, "withDefaults"); var VERSION2 = "6.0.12"; var userAgent = `octokit-endpoint.js/${VERSION2} ${universalUserAgent.getUserAgent()}`; var DEFAULTS = { @@ -103912,6 +106821,9 @@ var require_dist_node3 = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); var Deprecation = class extends Error { + static { + __name(this, "Deprecation"); + } constructor(message) { super(message); if (Error.captureStackTrace) { @@ -103950,7 +106862,9 @@ var require_wrappy = __commonJS({ } return ret; } + __name(wrapper, "wrapper"); } + __name(wrappy, "wrappy"); } }); @@ -103962,39 +106876,41 @@ var require_once = __commonJS({ module2.exports.strict = wrappy(onceStrict); once.proto = once(function() { Object.defineProperty(Function.prototype, "once", { - value: function() { + value: /* @__PURE__ */ __name(function() { return once(this); - }, + }, "value"), configurable: true }); Object.defineProperty(Function.prototype, "onceStrict", { - value: function() { + value: /* @__PURE__ */ __name(function() { return onceStrict(this); - }, + }, "value"), configurable: true }); }); function once(fn) { - var f = function() { + var f = /* @__PURE__ */ __name(function() { if (f.called) return f.value; f.called = true; return f.value = fn.apply(this, arguments); - }; + }, "f"); f.called = false; return f; } + __name(once, "once"); function onceStrict(fn) { - var f = function() { + var f = /* @__PURE__ */ __name(function() { if (f.called) throw new Error(f.onceError); f.called = true; return f.value = fn.apply(this, arguments); - }; + }, "f"); var name = fn.name || "Function wrapped with `once`"; f.onceError = name + " shouldn't be called more than once"; f.called = false; return f; } + __name(onceStrict, "onceStrict"); } }); @@ -104006,11 +106922,15 @@ var require_dist_node4 = __commonJS({ function _interopDefault(ex) { return ex && typeof ex === "object" && "default" in ex ? ex["default"] : ex; } + __name(_interopDefault, "_interopDefault"); var deprecation = require_dist_node3(); var once = _interopDefault(require_once()); var logOnceCode = once((deprecation2) => console.warn(deprecation2)); var logOnceHeaders = once((deprecation2) => console.warn(deprecation2)); var RequestError = class extends Error { + static { + __name(this, "RequestError"); + } constructor(message, statusCode, options) { super(message); if (Error.captureStackTrace) { @@ -104060,6 +106980,7 @@ var require_dist_node5 = __commonJS({ function _interopDefault(ex) { return ex && typeof ex === "object" && "default" in ex ? ex["default"] : ex; } + __name(_interopDefault, "_interopDefault"); var endpoint = require_dist_node2(); var universalUserAgent = require_dist_node(); var isPlainObject = require_is_plain_object(); @@ -104069,6 +106990,7 @@ var require_dist_node5 = __commonJS({ function getBufferResponse(response) { return response.arrayBuffer(); } + __name(getBufferResponse, "getBufferResponse"); function fetchWrapper(requestOptions) { const log = requestOptions.request && requestOptions.request.log ? requestOptions.request.log : console; if (isPlainObject.isPlainObject(requestOptions.body) || Array.isArray(requestOptions.body)) { @@ -104155,6 +107077,7 @@ var require_dist_node5 = __commonJS({ }); }); } + __name(fetchWrapper, "fetchWrapper"); async function getResponseData(response) { const contentType = response.headers.get("content-type"); if (/application\/json/.test(contentType)) { @@ -104165,6 +107088,7 @@ var require_dist_node5 = __commonJS({ } return getBufferResponse(response); } + __name(getResponseData, "getResponseData"); function toErrorMessage(data) { if (typeof data === "string") return data; if ("message" in data) { @@ -104175,27 +107099,29 @@ var require_dist_node5 = __commonJS({ } return `Unknown error: ${JSON.stringify(data)}`; } + __name(toErrorMessage, "toErrorMessage"); function withDefaults(oldEndpoint, newDefaults) { const endpoint2 = oldEndpoint.defaults(newDefaults); - const newApi = function(route, parameters) { + const newApi = /* @__PURE__ */ __name(function(route, parameters) { const endpointOptions = endpoint2.merge(route, parameters); if (!endpointOptions.request || !endpointOptions.request.hook) { return fetchWrapper(endpoint2.parse(endpointOptions)); } - const request2 = (route2, parameters2) => { + const request2 = /* @__PURE__ */ __name((route2, parameters2) => { return fetchWrapper(endpoint2.parse(endpoint2.merge(route2, parameters2))); - }; + }, "request"); Object.assign(request2, { endpoint: endpoint2, defaults: withDefaults.bind(null, endpoint2) }); return endpointOptions.request.hook(request2, endpointOptions); - }; + }, "newApi"); return Object.assign(newApi, { endpoint: endpoint2, defaults: withDefaults.bind(null, endpoint2) }); } + __name(withDefaults, "withDefaults"); var request = withDefaults(endpoint.endpoint, { headers: { "user-agent": `octokit-request.js/${VERSION2} ${universalUserAgent.getUserAgent()}` @@ -104217,7 +107143,11 @@ var require_dist_node6 = __commonJS({ return `Request failed due to following response errors: ` + data.errors.map((e) => ` - ${e.message}`).join("\n"); } + __name(_buildMessageForResponseErrors, "_buildMessageForResponseErrors"); var GraphqlResponseError = class extends Error { + static { + __name(this, "GraphqlResponseError"); + } constructor(request2, headers, response) { super(_buildMessageForResponseErrors(response)); this.request = request2; @@ -104273,16 +107203,18 @@ var require_dist_node6 = __commonJS({ return response.data.data; }); } + __name(graphql, "graphql"); function withDefaults(request$1, newDefaults) { const newRequest = request$1.defaults(newDefaults); - const newApi = (query, options) => { + const newApi = /* @__PURE__ */ __name((query, options) => { return graphql(newRequest, query, options); - }; + }, "newApi"); return Object.assign(newApi, { defaults: withDefaults.bind(null, newRequest), endpoint: request.request.endpoint }); } + __name(withDefaults, "withDefaults"); var graphql$1 = withDefaults(request.request, { headers: { "user-agent": `octokit-graphql.js/${VERSION2} ${universalUserAgent.getUserAgent()}` @@ -104296,6 +107228,7 @@ var require_dist_node6 = __commonJS({ url: "/graphql" }); } + __name(withCustomRequest, "withCustomRequest"); exports2.GraphqlResponseError = GraphqlResponseError; exports2.graphql = graphql$1; exports2.withCustomRequest = withCustomRequest; @@ -104321,18 +107254,21 @@ var require_dist_node7 = __commonJS({ tokenType }; } + __name(auth, "auth"); function withAuthorizationPrefix(token) { if (token.split(/\./).length === 3) { return `bearer ${token}`; } return `token ${token}`; } + __name(withAuthorizationPrefix, "withAuthorizationPrefix"); async function hook(token, request, route, parameters) { const endpoint = request.endpoint.merge(route, parameters); endpoint.headers.authorization = withAuthorizationPrefix(token); return request(endpoint); } - var createTokenAuth = function createTokenAuth2(token) { + __name(hook, "hook"); + var createTokenAuth = /* @__PURE__ */ __name(function createTokenAuth2(token) { if (!token) { throw new Error("[@octokit/auth-token] No token passed to createTokenAuth"); } @@ -104343,7 +107279,7 @@ var require_dist_node7 = __commonJS({ return Object.assign(auth.bind(null, token), { hook: hook.bind(null, token) }); - }; + }, "createTokenAuth"); exports2.createTokenAuth = createTokenAuth; } }); @@ -104370,6 +107306,7 @@ var require_dist_node8 = __commonJS({ } return target; } + __name(_objectWithoutPropertiesLoose, "_objectWithoutPropertiesLoose"); function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); @@ -104385,9 +107322,13 @@ var require_dist_node8 = __commonJS({ } return target; } + __name(_objectWithoutProperties, "_objectWithoutProperties"); var VERSION2 = "3.6.0"; var _excluded = ["authStrategy"]; var Octokit = class { + static { + __name(this, "Octokit"); + } constructor(options = {}) { const hook = new beforeAfterHook.Collection(); const requestDefaults = { @@ -104415,10 +107356,10 @@ var require_dist_node8 = __commonJS({ this.request = request.request.defaults(requestDefaults); this.graphql = graphql.withCustomRequest(this.request).defaults(requestDefaults); this.log = Object.assign({ - debug: () => { - }, - info: () => { - }, + debug: /* @__PURE__ */ __name(() => { + }, "debug"), + info: /* @__PURE__ */ __name(() => { + }, "info"), warn: console.warn.bind(console), error: console.error.bind(console) }, options.log); @@ -104458,6 +107399,9 @@ var require_dist_node8 = __commonJS({ } static defaults(defaults) { const OctokitWithDefaults = class extends this { + static { + __name(this, "OctokitWithDefaults"); + } constructor(...args) { const options = args[0] || {}; if (typeof defaults === "function") { @@ -104481,6 +107425,9 @@ var require_dist_node8 = __commonJS({ var _a; const currentPlugins = this.plugins; const NewOctokit = (_a = class extends this { + static { + __name(this, "_a"); + } }, _a.plugins = currentPlugins.concat(newPlugins.filter((plugin) => !currentPlugins.includes(plugin))), _a); return NewOctokit; } @@ -104509,6 +107456,7 @@ var require_dist_node9 = __commonJS({ } return keys; } + __name(ownKeys, "ownKeys"); function _objectSpread2(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; @@ -104526,6 +107474,7 @@ var require_dist_node9 = __commonJS({ } return target; } + __name(_objectSpread2, "_objectSpread2"); function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { @@ -104539,6 +107488,7 @@ var require_dist_node9 = __commonJS({ } return obj; } + __name(_defineProperty, "_defineProperty"); var Endpoints = { actions: { addCustomLabelsToSelfHostedRunnerForOrg: ["POST /orgs/{org}/actions/runners/{runner_id}/labels"], @@ -105511,6 +108461,7 @@ var require_dist_node9 = __commonJS({ } return newMethods; } + __name(endpointsToMethods, "endpointsToMethods"); function decorate(octokit, scope, methodName, defaults, decorations) { const requestWithDefaults = octokit.request.defaults(defaults); function withDecorations(...args) { @@ -105544,14 +108495,17 @@ var require_dist_node9 = __commonJS({ } return requestWithDefaults(...args); } + __name(withDecorations, "withDecorations"); return Object.assign(withDecorations, requestWithDefaults); } + __name(decorate, "decorate"); function restEndpointMethods(octokit) { const api = endpointsToMethods(octokit, Endpoints); return { rest: api }; } + __name(restEndpointMethods, "restEndpointMethods"); restEndpointMethods.VERSION = VERSION2; function legacyRestEndpointMethods(octokit) { const api = endpointsToMethods(octokit, Endpoints); @@ -105559,6 +108513,7 @@ var require_dist_node9 = __commonJS({ rest: api }); } + __name(legacyRestEndpointMethods, "legacyRestEndpointMethods"); legacyRestEndpointMethods.VERSION = VERSION2; exports2.legacyRestEndpointMethods = legacyRestEndpointMethods; exports2.restEndpointMethods = restEndpointMethods; @@ -105581,6 +108536,7 @@ var require_dist_node10 = __commonJS({ } return keys; } + __name(ownKeys, "ownKeys"); function _objectSpread2(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; @@ -105592,6 +108548,7 @@ var require_dist_node10 = __commonJS({ } return target; } + __name(_objectSpread2, "_objectSpread2"); function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { @@ -105605,6 +108562,7 @@ var require_dist_node10 = __commonJS({ } return obj; } + __name(_defineProperty, "_defineProperty"); function normalizePaginatedListResponse(response) { if (!response.data) { return _objectSpread2(_objectSpread2({}, response), {}, { @@ -105631,6 +108589,7 @@ var require_dist_node10 = __commonJS({ response.data.total_count = totalCount; return response; } + __name(normalizePaginatedListResponse, "normalizePaginatedListResponse"); function iterator(octokit, route, parameters) { const options = typeof route === "function" ? route.endpoint(parameters) : octokit.request.endpoint(route, parameters); const requestMethod = typeof route === "function" ? route : octokit.request; @@ -105669,6 +108628,7 @@ var require_dist_node10 = __commonJS({ }) }; } + __name(iterator, "iterator"); function paginate(octokit, route, parameters, mapFn) { if (typeof parameters === "function") { mapFn = parameters; @@ -105676,6 +108636,7 @@ var require_dist_node10 = __commonJS({ } return gather(octokit, [], iterator(octokit, route, parameters)[Symbol.asyncIterator](), mapFn); } + __name(paginate, "paginate"); function gather(octokit, results, iterator2, mapFn) { return iterator2.next().then((result) => { if (result.done) { @@ -105685,6 +108646,7 @@ var require_dist_node10 = __commonJS({ function done() { earlyExit = true; } + __name(done, "done"); results = results.concat(mapFn ? mapFn(result.value, done) : result.value.data); if (earlyExit) { return results; @@ -105692,6 +108654,7 @@ var require_dist_node10 = __commonJS({ return gather(octokit, results, iterator2, mapFn); }); } + __name(gather, "gather"); var composePaginateRest = Object.assign(paginate, { iterator }); @@ -105703,6 +108666,7 @@ var require_dist_node10 = __commonJS({ return false; } } + __name(isPaginatingEndpoint, "isPaginatingEndpoint"); function paginateRest(octokit) { return { paginate: Object.assign(paginate.bind(null, octokit), { @@ -105710,6 +108674,7 @@ var require_dist_node10 = __commonJS({ }) }; } + __name(paginateRest, "paginateRest"); paginateRest.VERSION = VERSION2; exports2.composePaginateRest = composePaginateRest; exports2.isPaginatingEndpoint = isPaginatingEndpoint; @@ -105724,9 +108689,9 @@ var require_utils6 = __commonJS({ "use strict"; var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { + Object.defineProperty(o, k2, { enumerable: true, get: /* @__PURE__ */ __name(function() { return m[k]; - } }); + }, "get") }); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; @@ -105769,6 +108734,7 @@ var require_utils6 = __commonJS({ } return opts; } + __name(getOctokitOptions, "getOctokitOptions"); exports2.getOctokitOptions = getOctokitOptions; } }); @@ -105779,9 +108745,9 @@ var require_github = __commonJS({ "use strict"; var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { + Object.defineProperty(o, k2, { enumerable: true, get: /* @__PURE__ */ __name(function() { return m[k]; - } }); + }, "get") }); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; @@ -105809,6 +108775,7 @@ var require_github = __commonJS({ const GitHubWithPlugins = utils_1.GitHub.plugin(...additionalPlugins); return new GitHubWithPlugins(utils_1.getOctokitOptions(token, options)); } + __name(getOctokit, "getOctokit"); exports2.getOctokit = getOctokit; } }); @@ -105821,6 +108788,7 @@ var require_traverse = __commonJS({ if (!(this instanceof Traverse)) return new Traverse(obj); this.value = obj; } + __name(Traverse, "Traverse"); Traverse.prototype.get = function(ps) { var node = this.value; for (var i = 0; i < ps.length; i++) { @@ -105881,9 +108849,9 @@ var require_traverse = __commonJS({ this.post(function() { node = x; }); - var toS = function(o) { + var toS = /* @__PURE__ */ __name(function(o) { return Object.prototype.toString.call(o); - }; + }, "toS"); if (this.circular) { if (Traverse(obj).get(this.circular.path) !== x) notEqual(); } else if (typeof x !== typeof y) { @@ -105937,7 +108905,7 @@ var require_traverse = __commonJS({ }; Traverse.prototype.clone = function() { var parents = [], nodes = []; - return function clone(src) { + return (/* @__PURE__ */ __name(function clone(src) { for (var i = 0; i < parents.length; i++) { if (parents[i] === src) { return nodes[i]; @@ -105956,13 +108924,13 @@ var require_traverse = __commonJS({ } else { return src; } - }(this.value); + }, "clone"))(this.value); }; function walk(root, cb, immutable) { var path2 = []; var parents = []; var alive = true; - return function walker(node_) { + return (/* @__PURE__ */ __name(function walker(node_) { var node = immutable ? copy(node_) : node_; var modifiers = {}; var state = { @@ -105974,37 +108942,37 @@ var require_traverse = __commonJS({ isRoot: path2.length === 0, level: path2.length, circular: null, - update: function(x) { + update: /* @__PURE__ */ __name(function(x) { if (!state.isRoot) { state.parent.node[state.key] = x; } state.node = x; - }, - "delete": function() { + }, "update"), + "delete": /* @__PURE__ */ __name(function() { delete state.parent.node[state.key]; - }, - remove: function() { + }, "delete"), + remove: /* @__PURE__ */ __name(function() { if (Array.isArray(state.parent.node)) { state.parent.node.splice(state.key, 1); } else { delete state.parent.node[state.key]; } - }, - before: function(f) { + }, "remove"), + before: /* @__PURE__ */ __name(function(f) { modifiers.before = f; - }, - after: function(f) { + }, "before"), + after: /* @__PURE__ */ __name(function(f) { modifiers.after = f; - }, - pre: function(f) { + }, "after"), + pre: /* @__PURE__ */ __name(function(f) { modifiers.pre = f; - }, - post: function(f) { + }, "pre"), + post: /* @__PURE__ */ __name(function(f) { modifiers.post = f; - }, - stop: function() { + }, "post"), + stop: /* @__PURE__ */ __name(function() { alive = false; - } + }, "stop") }; if (!alive) return state; if (typeof node === "object" && node !== null) { @@ -106042,8 +109010,9 @@ var require_traverse = __commonJS({ } if (modifiers.after) modifiers.after.call(state, state.node); return state; - }(root).node; + }, "walker"))(root).node; } + __name(walk, "walk"); Object.keys(Traverse.prototype).forEach(function(key) { Traverse[key] = function(obj) { var args = [].slice.call(arguments, 1); @@ -106073,6 +109042,7 @@ var require_traverse = __commonJS({ return dst; } else return src; } + __name(copy, "copy"); } }); @@ -106089,12 +109059,13 @@ var require_chainsaw = __commonJS({ saw.record(); return saw.chain(); } - Chainsaw.light = function ChainsawLight(builder) { + __name(Chainsaw, "Chainsaw"); + Chainsaw.light = /* @__PURE__ */ __name(function ChainsawLight(builder) { var saw = Chainsaw.saw(builder, {}); var r = builder.call(saw.handlers, saw); if (r !== void 0) saw.handlers = r; return saw.chain(); - }; + }, "ChainsawLight"); Chainsaw.saw = function(builder, handlers) { var saw = new EventEmitter(); saw.handlers = handlers; @@ -106193,6 +109164,7 @@ var require_chainsaw = __commonJS({ saw.next(); }; } + __name(upgradeChainsaw, "upgradeChainsaw"); } }); @@ -106207,6 +109179,7 @@ var require_buffers = __commonJS({ return size + buf.length; }, 0); } + __name(Buffers, "Buffers"); Buffers.prototype.push = function() { for (var i = 0; i < arguments.length; i++) { if (!Buffer.isBuffer(arguments[i])) { @@ -106336,14 +109309,14 @@ var require_buffers = __commonJS({ bi++; } }; - Buffers.prototype.get = function get(i) { + Buffers.prototype.get = /* @__PURE__ */ __name(function get(i) { var pos = this.pos(i); return this.buffers[pos.buf].get(pos.offset); - }; - Buffers.prototype.set = function set(i, b) { + }, "get"); + Buffers.prototype.set = /* @__PURE__ */ __name(function set(i, b) { var pos = this.pos(i); return this.buffers[pos.buf].set(pos.offset, b); - }; + }, "set"); Buffers.prototype.indexOf = function(needle, offset) { if ("string" === typeof needle) { needle = new Buffer(needle); @@ -106422,13 +109395,14 @@ var require_vars = __commonJS({ return node[key] = value; } } + __name(getset, "getset"); var vars = { - get: function(name) { + get: /* @__PURE__ */ __name(function(name) { return getset(name); - }, - set: function(name, value) { + }, "get"), + set: /* @__PURE__ */ __name(function(name, value) { return getset(name, value); - }, + }, "set"), store: store || {} }; return vars; @@ -106468,13 +109442,14 @@ var require_binary = __commonJS({ pending = { bytes, skip, - cb: function(buf) { + cb: /* @__PURE__ */ __name(function(buf) { pending = null; cb(buf); - } + }, "cb") }; dispatch(); } + __name(getBytes, "getBytes"); var offset = null; function dispatch() { if (!pending) { @@ -106506,10 +109481,12 @@ var require_binary = __commonJS({ } } } + __name(dispatch, "dispatch"); function builder(saw) { function next() { if (!done) saw.next(); } + __name(next, "next"); var self2 = words(function(bytes, cb) { return function(name) { getBytes(bytes, function(buf) { @@ -106538,7 +109515,7 @@ var require_binary = __commonJS({ }; self2.loop = function(cb) { var end = false; - saw.nest(false, function loop() { + saw.nest(false, /* @__PURE__ */ __name(function loop() { this.vars = vars.store; cb.call(this, function() { end = true; @@ -106548,7 +109525,7 @@ var require_binary = __commonJS({ if (end) saw.next(); else loop.call(this); }.bind(this)); - }, vars.store); + }, "loop"), vars.store); }; self2.buffer = function(name, bytes) { if (typeof bytes === "string") { @@ -106567,14 +109544,14 @@ var require_binary = __commonJS({ next(); }); }; - self2.scan = function find(name, search) { + self2.scan = /* @__PURE__ */ __name(function find(name, search) { if (typeof search === "string") { search = new Buffer(search); } else if (!Buffer.isBuffer(search)) { throw new Error("search must be a Buffer or a string"); } var taken = 0; - pending = function() { + pending = /* @__PURE__ */ __name(function() { var pos = buffers.indexOf(search, offset + taken); var i = pos - offset - taken; if (pos !== -1) { @@ -106598,9 +109575,9 @@ var require_binary = __commonJS({ i = Math.max(buffers.length - search.length - offset - taken, 0); } taken += i; - }; + }, "pending"); dispatch(); - }; + }, "find"); self2.peek = function(cb) { offset = 0; saw.nest(function() { @@ -106612,6 +109589,7 @@ var require_binary = __commonJS({ }; return self2; } + __name(builder, "builder"); ; var stream = Chainsaw.light(builder); stream.writable = true; @@ -106631,7 +109609,7 @@ var require_binary = __commonJS({ }); return stream; }; - exports2.parse = function parse2(buffer) { + exports2.parse = /* @__PURE__ */ __name(function parse2(buffer) { var self2 = words(function(bytes, cb) { return function(name) { if (offset + bytes <= buffer.length) { @@ -106663,9 +109641,9 @@ var require_binary = __commonJS({ }; self2.loop = function(cb) { var end = false; - var ender = function() { + var ender = /* @__PURE__ */ __name(function() { end = true; - }; + }, "ender"); while (end === false) { cb.call(self2, ender, vars.store); } @@ -106716,7 +109694,7 @@ var require_binary = __commonJS({ return offset >= buffer.length; }; return self2; - }; + }, "parse"); function decodeLEu(bytes) { var acc = 0; for (var i = 0; i < bytes.length; i++) { @@ -106724,6 +109702,7 @@ var require_binary = __commonJS({ } return acc; } + __name(decodeLEu, "decodeLEu"); function decodeBEu(bytes) { var acc = 0; for (var i = 0; i < bytes.length; i++) { @@ -106731,6 +109710,7 @@ var require_binary = __commonJS({ } return acc; } + __name(decodeBEu, "decodeBEu"); function decodeBEs(bytes) { var val = decodeBEu(bytes); if ((bytes[0] & 128) == 128) { @@ -106738,6 +109718,7 @@ var require_binary = __commonJS({ } return val; } + __name(decodeBEs, "decodeBEs"); function decodeLEs(bytes) { var val = decodeLEu(bytes); if ((bytes[bytes.length - 1] & 128) == 128) { @@ -106745,6 +109726,7 @@ var require_binary = __commonJS({ } return val; } + __name(decodeLEs, "decodeLEs"); function words(decode) { var self2 = {}; [1, 2, 4, 8].forEach(function(bytes) { @@ -106758,6 +109740,7 @@ var require_binary = __commonJS({ self2.word8s = self2.word8bs; return self2; } + __name(words, "words"); } }); @@ -106779,6 +109762,7 @@ var require_matcher_stream = __commonJS({ this.bytesSoFar = 0; this.matchFn = matchFn; } + __name(MatcherStream, "MatcherStream"); util.inherits(MatcherStream, Transform); MatcherStream.prototype.checkDataChunk = function(ignoreMatchZero) { var enoughData = this.data.length >= this.requiredLength; @@ -106856,11 +109840,12 @@ var require_entry = __commonJS({ this.type = null; this.isDirectory = false; } + __name(Entry, "Entry"); inherits(Entry, stream.PassThrough); Entry.prototype.autodrain = function() { - return this.pipe(new stream.Transform({ transform: function(d, e, cb) { + return this.pipe(new stream.Transform({ transform: /* @__PURE__ */ __name(function(d, e, cb) { cb(); - } })); + }, "transform") })); }; module2.exports = Entry; } @@ -106913,6 +109898,7 @@ var require_unzip_stream = __commonJS({ this.parsedEntity = null; this.outStreamInfo = {}; } + __name(UnzipStream, "UnzipStream"); util.inherits(UnzipStream, stream.Transform); UnzipStream.prototype.processDataChunk = function(chunk) { var requiredLength; @@ -107425,14 +110411,14 @@ var require_unzip_stream = __commonJS({ self2.data = chunk; } var startDataLength = self2.data.length; - var done = function() { + var done = /* @__PURE__ */ __name(function() { if (self2.data.length > 0 && self2.data.length < startDataLength) { startDataLength = self2.data.length; self2._parseOrOutput(encoding, done); return; } cb(); - }; + }, "done"); self2._parseOrOutput(encoding, done); }; UnzipStream.prototype._flush = function(cb) { @@ -107477,6 +110463,7 @@ var require_parser_stream = __commonJS({ self2.emit("error", error); }); } + __name(ParserStream, "ParserStream"); util.inherits(ParserStream, Transform); ParserStream.prototype._transform = function(chunk, encoding, cb) { this.unzipStream.write(chunk, encoding, cb); @@ -107498,9 +110485,9 @@ var require_parser_stream = __commonJS({ }; ParserStream.prototype.drainAll = function() { this.unzipStream.drainAll(); - return this.pipe(new Transform({ objectMode: true, transform: function(d, e, cb) { + return this.pipe(new Transform({ objectMode: true, transform: /* @__PURE__ */ __name(function(d, e, cb) { cb(); - } })); + }, "transform") })); }; module2.exports = ParserStream; } @@ -107552,7 +110539,8 @@ var require_mkdirp = __commonJS({ } }); } - mkdirP2.sync = function sync(p, opts, made) { + __name(mkdirP2, "mkdirP"); + mkdirP2.sync = /* @__PURE__ */ __name(function sync(p, opts, made) { if (!opts || typeof opts !== "object") { opts = { mode: opts }; } @@ -107584,7 +110572,7 @@ var require_mkdirp = __commonJS({ } } return made; - }; + }, "sync"); } }); @@ -107612,18 +110600,19 @@ var require_extract2 = __commonJS({ self2.emit("error", error); }); } + __name(Extract, "Extract"); util.inherits(Extract, Transform); Extract.prototype._transform = function(chunk, encoding, cb) { this.unzipStream.write(chunk, encoding, cb); }; Extract.prototype._flush = function(cb) { var self2 = this; - var allDone = function() { + var allDone = /* @__PURE__ */ __name(function() { process.nextTick(function() { self2.emit("close"); }); cb(); - }; + }, "allDone"); this.unzipStream.end(function() { if (self2.unfinishedEntries > 0) { self2.afterFlushWait = true; @@ -107637,7 +110626,7 @@ var require_extract2 = __commonJS({ var destPath = path2.join(this.opts.path, entry.path); var directory = entry.isDirectory ? destPath : path2.dirname(destPath); this.unfinishedEntries++; - var writeFileFn = function() { + var writeFileFn = /* @__PURE__ */ __name(function() { var pipedStream = fs.createWriteStream(destPath); pipedStream.on("close", function() { self2.unfinishedEntries--; @@ -107647,7 +110636,7 @@ var require_extract2 = __commonJS({ self2.emit("error", error); }); entry.pipe(pipedStream); - }; + }, "writeFileFn"); if (this.createdDirectories[directory] || directory === ".") { return writeFileFn(); } @@ -107689,9 +110678,9 @@ var require_download_artifact = __commonJS({ if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { + desc = { enumerable: true, get: /* @__PURE__ */ __name(function() { return m[k]; - } }; + }, "get") }; } Object.defineProperty(o, k2, desc); } : function(o, m, k, k2) { @@ -107718,6 +110707,7 @@ var require_download_artifact = __commonJS({ resolve(value); }); } + __name(adopt, "adopt"); return new (P || (P = Promise))(function(resolve, reject) { function fulfilled(value) { try { @@ -107726,6 +110716,7 @@ var require_download_artifact = __commonJS({ reject(e); } } + __name(fulfilled, "fulfilled"); function rejected(value) { try { step(generator["throw"](value)); @@ -107733,9 +110724,11 @@ var require_download_artifact = __commonJS({ reject(e); } } + __name(rejected, "rejected"); function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + __name(step, "step"); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; @@ -107755,11 +110748,11 @@ var require_download_artifact = __commonJS({ var generated_1 = require_generated(); var util_1 = require_util8(); var errors_1 = require_errors3(); - var scrubQueryParameters = (url) => { + var scrubQueryParameters = /* @__PURE__ */ __name((url) => { const parsed = new URL(url); parsed.search = ""; return parsed.toString(); - }; + }, "scrubQueryParameters"); function exists(path2) { return __awaiter2(this, void 0, void 0, function* () { try { @@ -107774,6 +110767,7 @@ var require_download_artifact = __commonJS({ } }); } + __name(exists, "exists"); function streamExtract(url, directory) { return __awaiter2(this, void 0, void 0, function* () { let retryCount = 0; @@ -107790,6 +110784,7 @@ var require_download_artifact = __commonJS({ throw new Error(`Artifact download failed after ${retryCount} retries.`); }); } + __name(streamExtract, "streamExtract"); function streamExtractExternal(url, directory) { return __awaiter2(this, void 0, void 0, function* () { const client = new httpClient.HttpClient((0, user_agent_1.getUserAgentString)()); @@ -107799,9 +110794,9 @@ var require_download_artifact = __commonJS({ } const timeout = 30 * 1e3; return new Promise((resolve, reject) => { - const timerFn = () => { + const timerFn = /* @__PURE__ */ __name(() => { response.message.destroy(new Error(`Blob storage chunk did not respond in ${timeout}ms`)); - }; + }, "timerFn"); const timer = setTimeout(timerFn, timeout); response.message.on("data", () => { timer.refresh(); @@ -107818,6 +110813,7 @@ var require_download_artifact = __commonJS({ }); }); } + __name(streamExtractExternal, "streamExtractExternal"); exports2.streamExtractExternal = streamExtractExternal; function downloadArtifactPublic(artifactId, repositoryOwner, repositoryName, token, options) { return __awaiter2(this, void 0, void 0, function* () { @@ -107851,6 +110847,7 @@ var require_download_artifact = __commonJS({ return { downloadPath }; }); } + __name(downloadArtifactPublic, "downloadArtifactPublic"); exports2.downloadArtifactPublic = downloadArtifactPublic; function downloadArtifactInternal(artifactId, options) { return __awaiter2(this, void 0, void 0, function* () { @@ -107887,6 +110884,7 @@ Are you trying to download from a different run? Try specifying a github-token w return { downloadPath }; }); } + __name(downloadArtifactInternal, "downloadArtifactInternal"); exports2.downloadArtifactInternal = downloadArtifactInternal; function resolveOrCreateDirectory(downloadPath = (0, config_1.getGitHubWorkspaceDir)()) { return __awaiter2(this, void 0, void 0, function* () { @@ -107899,6 +110897,7 @@ Are you trying to download from a different run? Try specifying a github-token w return downloadPath; }); } + __name(resolveOrCreateDirectory, "resolveOrCreateDirectory"); } }); @@ -107910,9 +110909,9 @@ var require_retry_options = __commonJS({ if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { + desc = { enumerable: true, get: /* @__PURE__ */ __name(function() { return m[k]; - } }; + }, "get") }; } Object.defineProperty(o, k2, desc); } : function(o, m, k, k2) { @@ -107953,6 +110952,7 @@ var require_retry_options = __commonJS({ core2.debug(`GitHub client configured with: (retries: ${requestOptions.retries}, retry-exempt-status-code: ${(_a = retryOptions.doNotRetry) !== null && _a !== void 0 ? _a : "octokit default: [400, 401, 403, 404, 422]"})`); return [retryOptions, requestOptions]; } + __name(getRetryOptions, "getRetryOptions"); exports2.getRetryOptions = getRetryOptions; } }); @@ -107978,6 +110978,7 @@ var require_dist_node11 = __commonJS({ }); }); } + __name(requestLog, "requestLog"); requestLog.VERSION = VERSION2; exports2.requestLog = requestLog; } @@ -107994,15 +110995,16 @@ var require_light = __commonJS({ function getCjsExportFromNamespace(n) { return n && n["default"] || n; } - var load = function(received, defaults, onto = {}) { + __name(getCjsExportFromNamespace, "getCjsExportFromNamespace"); + var load = /* @__PURE__ */ __name(function(received, defaults, onto = {}) { var k, ref, v; for (k in defaults) { v = defaults[k]; onto[k] = (ref = received[k]) != null ? ref : v; } return onto; - }; - var overwrite = function(received, defaults, onto = {}) { + }, "load"); + var overwrite = /* @__PURE__ */ __name(function(received, defaults, onto = {}) { var k, v; for (k in received) { v = received[k]; @@ -108011,13 +111013,16 @@ var require_light = __commonJS({ } } return onto; - }; + }, "overwrite"); var parser = { load, overwrite }; var DLList; DLList = class DLList { + static { + __name(this, "DLList"); + } constructor(incr, decr) { this.incr = incr; this.decr = decr; @@ -108101,6 +111106,9 @@ var require_light = __commonJS({ var DLList_1 = DLList; var Events; Events = class Events { + static { + __name(this, "Events"); + } constructor(instance) { this.instance = instance; this._events = {}; @@ -108188,6 +111196,9 @@ var require_light = __commonJS({ DLList$1 = DLList_1; Events$1 = Events_1; Queues = class Queues { + static { + __name(this, "Queues"); + } constructor(num_priorities) { var i; this.Events = new Events$1(this); @@ -108247,6 +111258,9 @@ var require_light = __commonJS({ var Queues_1 = Queues; var BottleneckError; BottleneckError = class BottleneckError extends Error { + static { + __name(this, "BottleneckError"); + } }; var BottleneckError_1 = BottleneckError; var BottleneckError$1, DEFAULT_PRIORITY, Job, NUM_PRIORITIES, parser$1; @@ -108255,6 +111269,9 @@ var require_light = __commonJS({ parser$1 = parser; BottleneckError$1 = BottleneckError_1; Job = class Job { + static { + __name(this, "Job"); + } constructor(task, args, options, jobDefaults, rejectOnDrop, Events2, _states, Promise2) { this.task = task; this.args = args; @@ -108384,6 +111401,9 @@ var require_light = __commonJS({ parser$2 = parser; BottleneckError$2 = BottleneckError_1; LocalDatastore = class LocalDatastore { + static { + __name(this, "LocalDatastore"); + } constructor(instance, storeOptions, storeInstanceOptions) { this.instance = instance; this.storeOptions = storeOptions; @@ -108567,6 +111587,9 @@ var require_light = __commonJS({ var BottleneckError$3, States; BottleneckError$3 = BottleneckError_1; States = class States { + static { + __name(this, "States"); + } constructor(status1) { this.status = status1; this._jobs = {}; @@ -108637,6 +111660,9 @@ var require_light = __commonJS({ var DLList$2, Sync; DLList$2 = DLList_1; Sync = class Sync { + static { + __name(this, "Sync"); + } constructor(name, Promise2) { this.schedule = this.schedule.bind(this); this.name = name; @@ -108691,9 +111717,9 @@ var require_light = __commonJS({ version: version2, default: version$1 }); - var require$$2 = () => console.log("You must import the full version of Bottleneck in order to use this feature."); - var require$$3 = () => console.log("You must import the full version of Bottleneck in order to use this feature."); - var require$$4 = () => console.log("You must import the full version of Bottleneck in order to use this feature."); + var require$$2 = /* @__PURE__ */ __name(() => console.log("You must import the full version of Bottleneck in order to use this feature."), "require$$2"); + var require$$3 = /* @__PURE__ */ __name(() => console.log("You must import the full version of Bottleneck in order to use this feature."), "require$$3"); + var require$$4 = /* @__PURE__ */ __name(() => console.log("You must import the full version of Bottleneck in order to use this feature."), "require$$4"); var Events$2, Group, IORedisConnection$1, RedisConnection$1, Scripts$1, parser$3; parser$3 = parser; Events$2 = Events_1; @@ -108702,6 +111728,9 @@ var require_light = __commonJS({ Scripts$1 = require$$4; Group = function() { class Group2 { + static { + __name(this, "Group"); + } constructor(limiterOptions = {}) { this.deleteKey = this.deleteKey.bind(this); this.limiterOptions = limiterOptions; @@ -108831,6 +111860,9 @@ var require_light = __commonJS({ Events$3 = Events_1; Batcher = function() { class Batcher2 { + static { + __name(this, "Batcher"); + } constructor(options = {}) { this.options = options; parser$4.load(this.options, this.defaults, this); @@ -108874,7 +111906,7 @@ var require_light = __commonJS({ return Batcher2; }.call(commonjsGlobal); var Batcher_1 = Batcher; - var require$$4$1 = () => console.log("You must import the full version of Bottleneck in order to use this feature."); + var require$$4$1 = /* @__PURE__ */ __name(() => console.log("You must import the full version of Bottleneck in order to use this feature."), "require$$4$1"); var require$$8 = getCjsExportFromNamespace(version$2); var Bottleneck, DEFAULT_PRIORITY$1, Events$4, Job$1, LocalDatastore$1, NUM_PRIORITIES$1, Queues$1, RedisDatastore$1, States$1, Sync$1, parser$5, splice = [].splice; NUM_PRIORITIES$1 = 10; @@ -108889,6 +111921,9 @@ var require_light = __commonJS({ Sync$1 = Sync_1; Bottleneck = function() { class Bottleneck2 { + static { + __name(this, "Bottleneck"); + } constructor(options = {}, ...invalid) { var storeInstanceOptions, storeOptions; this._addToQueue = this._addToQueue.bind(this); @@ -109071,13 +112106,13 @@ var require_light = __commonJS({ stop(options = {}) { var done, waitForExecuting; options = parser$5.load(options, this.stopDefaults); - waitForExecuting = (at) => { + waitForExecuting = /* @__PURE__ */ __name((at) => { var finished; - finished = () => { + finished = /* @__PURE__ */ __name(() => { var counts; counts = this._states.counts; return counts[0] + counts[1] + counts[2] + counts[3] === at; - }; + }, "finished"); return new this.Promise((resolve, reject) => { if (finished()) { return resolve(); @@ -109090,7 +112125,7 @@ var require_light = __commonJS({ }); } }); - }; + }, "waitForExecuting"); done = options.dropWaitingJobs ? (this._run = function(index, next) { return next.doDrop({ message: options.dropErrorMessage @@ -109177,13 +112212,13 @@ var require_light = __commonJS({ ref1 = args, [options, fn, ...args] = ref1, [cb] = splice.call(args, -1); options = parser$5.load(options, this.jobDefaults); } - task = (...args2) => { + task = /* @__PURE__ */ __name((...args2) => { return new this.Promise(function(resolve, reject) { return fn(...args2, function(...args3) { return (args3[0] != null ? reject : resolve)(args3); }); }); - }; + }, "task"); job = new Job$1(task, args, options, this.jobDefaults, this.rejectOnDrop, this.Events, this._states, this.Promise); job.promise.then(function(args2) { return typeof cb === "function" ? cb(...args2) : void 0; @@ -109211,9 +112246,9 @@ var require_light = __commonJS({ wrap(fn) { var schedule, wrapped; schedule = this.schedule.bind(this); - wrapped = function(...args) { + wrapped = /* @__PURE__ */ __name(function(...args) { return schedule(fn.bind(this), ...args); - }; + }, "wrapped"); wrapped.withOptions = function(options, ...args) { return schedule(options, fn, ...args); }; @@ -109310,6 +112345,7 @@ var require_dist_node12 = __commonJS({ function _interopDefault(ex) { return ex && typeof ex === "object" && "default" in ex ? ex["default"] : ex; } + __name(_interopDefault, "_interopDefault"); var Bottleneck = _interopDefault(require_light()); async function errorRequest(octokit, state, error, options) { if (!error.request || !error.request.request) { @@ -109322,6 +112358,7 @@ var require_dist_node12 = __commonJS({ } throw error; } + __name(errorRequest, "errorRequest"); async function wrapRequest(state, request, options) { const limiter = new Bottleneck(); limiter.on("failed", function(error, info2) { @@ -109334,6 +112371,7 @@ var require_dist_node12 = __commonJS({ }); return limiter.schedule(request, options); } + __name(wrapRequest, "wrapRequest"); var VERSION2 = "3.0.9"; function retry(octokit, octokitOptions) { const state = Object.assign({ @@ -109348,16 +112386,17 @@ var require_dist_node12 = __commonJS({ } return { retry: { - retryRequest: (error, retries, retryAfter) => { + retryRequest: /* @__PURE__ */ __name((error, retries, retryAfter) => { error.request.request = Object.assign({}, error.request.request, { retries, retryAfter }); return error; - } + }, "retryRequest") } }; } + __name(retry, "retry"); retry.VERSION = VERSION2; exports2.VERSION = VERSION2; exports2.retry = retry; @@ -109372,9 +112411,9 @@ var require_get_artifact = __commonJS({ if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { + desc = { enumerable: true, get: /* @__PURE__ */ __name(function() { return m[k]; - } }; + }, "get") }; } Object.defineProperty(o, k2, desc); } : function(o, m, k, k2) { @@ -109401,6 +112440,7 @@ var require_get_artifact = __commonJS({ resolve(value); }); } + __name(adopt, "adopt"); return new (P || (P = Promise))(function(resolve, reject) { function fulfilled(value) { try { @@ -109409,6 +112449,7 @@ var require_get_artifact = __commonJS({ reject(e); } } + __name(fulfilled, "fulfilled"); function rejected(value) { try { step(generator["throw"](value)); @@ -109416,9 +112457,11 @@ var require_get_artifact = __commonJS({ reject(e); } } + __name(rejected, "rejected"); function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + __name(step, "step"); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; @@ -109476,6 +112519,7 @@ var require_get_artifact = __commonJS({ }; }); } + __name(getArtifactPublic, "getArtifactPublic"); exports2.getArtifactPublic = getArtifactPublic; function getArtifactInternal(artifactName) { return __awaiter2(this, void 0, void 0, function* () { @@ -109507,6 +112551,7 @@ var require_get_artifact = __commonJS({ }; }); } + __name(getArtifactInternal, "getArtifactInternal"); exports2.getArtifactInternal = getArtifactInternal; } }); @@ -109521,6 +112566,7 @@ var require_delete_artifact = __commonJS({ resolve(value); }); } + __name(adopt, "adopt"); return new (P || (P = Promise))(function(resolve, reject) { function fulfilled(value) { try { @@ -109529,6 +112575,7 @@ var require_delete_artifact = __commonJS({ reject(e); } } + __name(fulfilled, "fulfilled"); function rejected(value) { try { step(generator["throw"](value)); @@ -109536,9 +112583,11 @@ var require_delete_artifact = __commonJS({ reject(e); } } + __name(rejected, "rejected"); function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + __name(step, "step"); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; @@ -109582,6 +112631,7 @@ var require_delete_artifact = __commonJS({ }; }); } + __name(deleteArtifactPublic, "deleteArtifactPublic"); exports2.deleteArtifactPublic = deleteArtifactPublic; function deleteArtifactInternal(artifactName) { return __awaiter2(this, void 0, void 0, function* () { @@ -109613,6 +112663,7 @@ var require_delete_artifact = __commonJS({ }; }); } + __name(deleteArtifactInternal, "deleteArtifactInternal"); exports2.deleteArtifactInternal = deleteArtifactInternal; } }); @@ -109627,6 +112678,7 @@ var require_list_artifacts = __commonJS({ resolve(value); }); } + __name(adopt, "adopt"); return new (P || (P = Promise))(function(resolve, reject) { function fulfilled(value) { try { @@ -109635,6 +112687,7 @@ var require_list_artifacts = __commonJS({ reject(e); } } + __name(fulfilled, "fulfilled"); function rejected(value) { try { step(generator["throw"](value)); @@ -109642,9 +112695,11 @@ var require_list_artifacts = __commonJS({ reject(e); } } + __name(rejected, "rejected"); function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + __name(step, "step"); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; @@ -109726,6 +112781,7 @@ var require_list_artifacts = __commonJS({ }; }); } + __name(listArtifactsPublic, "listArtifactsPublic"); exports2.listArtifactsPublic = listArtifactsPublic; function listArtifactsInternal(latest = false) { return __awaiter2(this, void 0, void 0, function* () { @@ -109751,6 +112807,7 @@ var require_list_artifacts = __commonJS({ }; }); } + __name(listArtifactsInternal, "listArtifactsInternal"); exports2.listArtifactsInternal = listArtifactsInternal; function filterLatest(artifacts) { artifacts.sort((a, b) => b.id - a.id); @@ -109764,6 +112821,7 @@ var require_list_artifacts = __commonJS({ } return latestArtifacts; } + __name(filterLatest, "filterLatest"); } }); @@ -109777,6 +112835,7 @@ var require_client2 = __commonJS({ resolve(value); }); } + __name(adopt, "adopt"); return new (P || (P = Promise))(function(resolve, reject) { function fulfilled(value) { try { @@ -109785,6 +112844,7 @@ var require_client2 = __commonJS({ reject(e); } } + __name(fulfilled, "fulfilled"); function rejected(value) { try { step(generator["throw"](value)); @@ -109792,9 +112852,11 @@ var require_client2 = __commonJS({ reject(e); } } + __name(rejected, "rejected"); function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + __name(step, "step"); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; @@ -109820,6 +112882,9 @@ var require_client2 = __commonJS({ var list_artifacts_1 = require_list_artifacts(); var errors_1 = require_errors3(); var DefaultArtifactClient2 = class { + static { + __name(this, "DefaultArtifactClient"); + } uploadArtifact(name, files, rootDirectory, options) { return __awaiter2(this, void 0, void 0, function* () { try { @@ -109942,9 +113007,9 @@ var require_artifact2 = __commonJS({ if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { + desc = { enumerable: true, get: /* @__PURE__ */ __name(function() { return m[k]; - } }; + }, "get") }; } Object.defineProperty(o, k2, desc); } : function(o, m, k, k2) { @@ -109973,6 +113038,9 @@ var require_context3 = __commonJS({ var fs_1 = require("fs"); var os_1 = require("os"); var Context = class { + static { + __name(this, "Context"); + } /** * Hydrate the context from the environment */ @@ -110030,9 +113098,9 @@ var require_utils7 = __commonJS({ if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { + desc = { enumerable: true, get: /* @__PURE__ */ __name(function() { return m[k]; - } }; + }, "get") }; } Object.defineProperty(o, k2, desc); } : function(o, m, k, k2) { @@ -110059,6 +113127,7 @@ var require_utils7 = __commonJS({ resolve(value); }); } + __name(adopt, "adopt"); return new (P || (P = Promise))(function(resolve, reject) { function fulfilled(value) { try { @@ -110067,6 +113136,7 @@ var require_utils7 = __commonJS({ reject(e); } } + __name(fulfilled, "fulfilled"); function rejected(value) { try { step(generator["throw"](value)); @@ -110074,9 +113144,11 @@ var require_utils7 = __commonJS({ reject(e); } } + __name(rejected, "rejected"); function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + __name(step, "step"); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; @@ -110092,28 +113164,33 @@ var require_utils7 = __commonJS({ } return typeof options.auth === "string" ? options.auth : `token ${token}`; } + __name(getAuthString, "getAuthString"); exports2.getAuthString = getAuthString; function getProxyAgent(destinationUrl) { const hc = new httpClient.HttpClient(); return hc.getAgent(destinationUrl); } + __name(getProxyAgent, "getProxyAgent"); exports2.getProxyAgent = getProxyAgent; function getProxyAgentDispatcher(destinationUrl) { const hc = new httpClient.HttpClient(); return hc.getAgentDispatcher(destinationUrl); } + __name(getProxyAgentDispatcher, "getProxyAgentDispatcher"); exports2.getProxyAgentDispatcher = getProxyAgentDispatcher; function getProxyFetch(destinationUrl) { const httpDispatcher = getProxyAgentDispatcher(destinationUrl); - const proxyFetch = (url, opts) => __awaiter2(this, void 0, void 0, function* () { + const proxyFetch = /* @__PURE__ */ __name((url, opts) => __awaiter2(this, void 0, void 0, function* () { return (0, undici_1.fetch)(url, Object.assign(Object.assign({}, opts), { dispatcher: httpDispatcher })); - }); + }), "proxyFetch"); return proxyFetch; } + __name(getProxyFetch, "getProxyFetch"); exports2.getProxyFetch = getProxyFetch; function getApiBaseUrl() { return process.env["GITHUB_API_URL"] || "https://api.github.com"; } + __name(getApiBaseUrl, "getApiBaseUrl"); exports2.getApiBaseUrl = getApiBaseUrl; } }); @@ -110126,22 +113203,22 @@ var require_dist_node13 = __commonJS({ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; var __getOwnPropNames2 = Object.getOwnPropertyNames; var __hasOwnProp2 = Object.prototype.hasOwnProperty; - var __export2 = (target, all) => { + var __export2 = /* @__PURE__ */ __name((target, all) => { for (var name in all) __defProp2(target, name, { get: all[name], enumerable: true }); - }; - var __copyProps2 = (to, from, except, desc) => { + }, "__export"); + var __copyProps2 = /* @__PURE__ */ __name((to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames2(from)) if (!__hasOwnProp2.call(to, key) && key !== except) - __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + __defProp2(to, key, { get: /* @__PURE__ */ __name(() => from[key], "get"), enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); } return to; - }; - var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + }, "__copyProps"); + var __toCommonJS2 = /* @__PURE__ */ __name((mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod), "__toCommonJS"); var dist_src_exports = {}; __export2(dist_src_exports, { - endpoint: () => endpoint + endpoint: /* @__PURE__ */ __name(() => endpoint, "endpoint") }); module2.exports = __toCommonJS2(dist_src_exports); var import_universal_user_agent = require_dist_node(); @@ -110167,6 +113244,7 @@ var require_dist_node13 = __commonJS({ return newObj; }, {}); } + __name(lowercaseKeys, "lowercaseKeys"); function isPlainObject(value) { if (typeof value !== "object" || value === null) return false; @@ -110178,6 +113256,7 @@ var require_dist_node13 = __commonJS({ const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor; return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value); } + __name(isPlainObject, "isPlainObject"); function mergeDeep(defaults, options) { const result = Object.assign({}, defaults); Object.keys(options).forEach((key) => { @@ -110192,6 +113271,7 @@ var require_dist_node13 = __commonJS({ }); return result; } + __name(mergeDeep, "mergeDeep"); function removeUndefinedProperties(obj) { for (const key in obj) { if (obj[key] === void 0) { @@ -110200,6 +113280,7 @@ var require_dist_node13 = __commonJS({ } return obj; } + __name(removeUndefinedProperties, "removeUndefinedProperties"); function merge(defaults, route, options) { if (typeof route === "string") { let [method, url] = route.split(" "); @@ -110221,6 +113302,7 @@ var require_dist_node13 = __commonJS({ } return mergedOptions; } + __name(merge, "merge"); function addQueryParameters(url, parameters) { const separator = /\?/.test(url) ? "&" : "?"; const names = Object.keys(parameters); @@ -110234,10 +113316,12 @@ var require_dist_node13 = __commonJS({ return `${name}=${encodeURIComponent(parameters[name])}`; }).join("&"); } + __name(addQueryParameters, "addQueryParameters"); var urlVariableRegex = /\{[^}]+\}/g; function removeNonChars(variableName) { return variableName.replace(/^\W+|\W+$/g, "").split(/,/); } + __name(removeNonChars, "removeNonChars"); function extractUrlVariableNames(url) { const matches = url.match(urlVariableRegex); if (!matches) { @@ -110245,6 +113329,7 @@ var require_dist_node13 = __commonJS({ } return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []); } + __name(extractUrlVariableNames, "extractUrlVariableNames"); function omit(object, keysToOmit) { const result = { __proto__: null }; for (const key of Object.keys(object)) { @@ -110254,6 +113339,7 @@ var require_dist_node13 = __commonJS({ } return result; } + __name(omit, "omit"); function encodeReserved(str) { return str.split(/(%[0-9A-Fa-f]{2})/g).map(function(part) { if (!/%[0-9A-Fa-f]/.test(part)) { @@ -110262,11 +113348,13 @@ var require_dist_node13 = __commonJS({ return part; }).join(""); } + __name(encodeReserved, "encodeReserved"); function encodeUnreserved(str) { return encodeURIComponent(str).replace(/[!'()*]/g, function(c) { return "%" + c.charCodeAt(0).toString(16).toUpperCase(); }); } + __name(encodeUnreserved, "encodeUnreserved"); function encodeValue(operator, value, key) { value = operator === "+" || operator === "#" ? encodeReserved(value) : encodeUnreserved(value); if (key) { @@ -110275,12 +113363,15 @@ var require_dist_node13 = __commonJS({ return value; } } + __name(encodeValue, "encodeValue"); function isDefined(value) { return value !== void 0 && value !== null; } + __name(isDefined, "isDefined"); function isKeyOperator(operator) { return operator === ";" || operator === "&" || operator === "?"; } + __name(isKeyOperator, "isKeyOperator"); function getValues(context3, operator, key, modifier) { var value = context3[key], result = []; if (isDefined(value) && value !== "") { @@ -110341,11 +113432,13 @@ var require_dist_node13 = __commonJS({ } return result; } + __name(getValues, "getValues"); function parseUrl(template) { return { expand: expand.bind(null, template) }; } + __name(parseUrl, "parseUrl"); function expand(template, context3) { var operators = ["+", "#", ".", "/", ";", "?", "&"]; template = template.replace( @@ -110384,6 +113477,7 @@ var require_dist_node13 = __commonJS({ return template.replace(/\/$/, ""); } } + __name(expand, "expand"); function parse2(options) { let method = options.method.toUpperCase(); let url = (options.url || "/").replace(/:([a-z]\w+)/g, "{$1}"); @@ -110447,9 +113541,11 @@ var require_dist_node13 = __commonJS({ options.request ? { request: options.request } : null ); } + __name(parse2, "parse"); function endpointWithDefaults(defaults, route, options) { return parse2(merge(defaults, route, options)); } + __name(endpointWithDefaults, "endpointWithDefaults"); function withDefaults(oldDefaults, newDefaults) { const DEFAULTS2 = merge(oldDefaults, newDefaults); const endpoint2 = endpointWithDefaults.bind(null, DEFAULTS2); @@ -110460,6 +113556,7 @@ var require_dist_node13 = __commonJS({ parse: parse2 }); } + __name(withDefaults, "withDefaults"); var endpoint = withDefaults(null, DEFAULTS); } }); @@ -110474,30 +113571,30 @@ var require_dist_node14 = __commonJS({ var __getOwnPropNames2 = Object.getOwnPropertyNames; var __getProtoOf2 = Object.getPrototypeOf; var __hasOwnProp2 = Object.prototype.hasOwnProperty; - var __export2 = (target, all) => { + var __export2 = /* @__PURE__ */ __name((target, all) => { for (var name in all) __defProp2(target, name, { get: all[name], enumerable: true }); - }; - var __copyProps2 = (to, from, except, desc) => { + }, "__export"); + var __copyProps2 = /* @__PURE__ */ __name((to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames2(from)) if (!__hasOwnProp2.call(to, key) && key !== except) - __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + __defProp2(to, key, { get: /* @__PURE__ */ __name(() => from[key], "get"), enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); } return to; - }; - var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2( + }, "__copyProps"); + var __toESM2 = /* @__PURE__ */ __name((mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2( // If the importer is in node compatibility mode or this is not an ESM // file that has been converted to a CommonJS file using a Babel- // compatible transform (i.e. "__esModule" has not been set), then set // "default" to the CommonJS "module.exports" for node compatibility. isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target, mod - )); - var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + )), "__toESM"); + var __toCommonJS2 = /* @__PURE__ */ __name((mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod), "__toCommonJS"); var dist_src_exports = {}; __export2(dist_src_exports, { - RequestError: () => RequestError + RequestError: /* @__PURE__ */ __name(() => RequestError, "RequestError") }); module2.exports = __toCommonJS2(dist_src_exports); var import_deprecation = require_dist_node3(); @@ -110505,6 +113602,9 @@ var require_dist_node14 = __commonJS({ var logOnceCode = (0, import_once.default)((deprecation) => console.warn(deprecation)); var logOnceHeaders = (0, import_once.default)((deprecation) => console.warn(deprecation)); var RequestError = class extends Error { + static { + __name(this, "RequestError"); + } constructor(message, statusCode, options) { super(message); if (Error.captureStackTrace) { @@ -110564,22 +113664,22 @@ var require_dist_node15 = __commonJS({ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; var __getOwnPropNames2 = Object.getOwnPropertyNames; var __hasOwnProp2 = Object.prototype.hasOwnProperty; - var __export2 = (target, all) => { + var __export2 = /* @__PURE__ */ __name((target, all) => { for (var name in all) __defProp2(target, name, { get: all[name], enumerable: true }); - }; - var __copyProps2 = (to, from, except, desc) => { + }, "__export"); + var __copyProps2 = /* @__PURE__ */ __name((to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames2(from)) if (!__hasOwnProp2.call(to, key) && key !== except) - __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + __defProp2(to, key, { get: /* @__PURE__ */ __name(() => from[key], "get"), enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); } return to; - }; - var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + }, "__copyProps"); + var __toCommonJS2 = /* @__PURE__ */ __name((mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod), "__toCommonJS"); var dist_src_exports = {}; __export2(dist_src_exports, { - request: () => request + request: /* @__PURE__ */ __name(() => request, "request") }); module2.exports = __toCommonJS2(dist_src_exports); var import_endpoint = require_dist_node13(); @@ -110596,10 +113696,12 @@ var require_dist_node15 = __commonJS({ const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor; return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value); } + __name(isPlainObject, "isPlainObject"); var import_request_error = require_dist_node14(); function getBufferResponse(response) { return response.arrayBuffer(); } + __name(getBufferResponse, "getBufferResponse"); function fetchWrapper(requestOptions) { var _a, _b, _c, _d; const log = requestOptions.request && requestOptions.request.log ? requestOptions.request.log : console; @@ -110708,6 +113810,7 @@ var require_dist_node15 = __commonJS({ }); }); } + __name(fetchWrapper, "fetchWrapper"); async function getResponseData(response) { const contentType = response.headers.get("content-type"); if (/application\/json/.test(contentType)) { @@ -110718,6 +113821,7 @@ var require_dist_node15 = __commonJS({ } return getBufferResponse(response); } + __name(getResponseData, "getResponseData"); function toErrorMessage(data) { if (typeof data === "string") return data; @@ -110735,29 +113839,31 @@ var require_dist_node15 = __commonJS({ } return `Unknown error: ${JSON.stringify(data)}`; } + __name(toErrorMessage, "toErrorMessage"); function withDefaults(oldEndpoint, newDefaults) { const endpoint2 = oldEndpoint.defaults(newDefaults); - const newApi = function(route, parameters) { + const newApi = /* @__PURE__ */ __name(function(route, parameters) { const endpointOptions = endpoint2.merge(route, parameters); if (!endpointOptions.request || !endpointOptions.request.hook) { return fetchWrapper(endpoint2.parse(endpointOptions)); } - const request2 = (route2, parameters2) => { + const request2 = /* @__PURE__ */ __name((route2, parameters2) => { return fetchWrapper( endpoint2.parse(endpoint2.merge(route2, parameters2)) ); - }; + }, "request2"); Object.assign(request2, { endpoint: endpoint2, defaults: withDefaults.bind(null, endpoint2) }); return endpointOptions.request.hook(request2, endpointOptions); - }; + }, "newApi"); return Object.assign(newApi, { endpoint: endpoint2, defaults: withDefaults.bind(null, endpoint2) }); } + __name(withDefaults, "withDefaults"); var request = withDefaults(import_endpoint.endpoint, { headers: { "user-agent": `octokit-request.js/${VERSION2} ${(0, import_universal_user_agent.getUserAgent)()}` @@ -110774,24 +113880,24 @@ var require_dist_node16 = __commonJS({ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; var __getOwnPropNames2 = Object.getOwnPropertyNames; var __hasOwnProp2 = Object.prototype.hasOwnProperty; - var __export2 = (target, all) => { + var __export2 = /* @__PURE__ */ __name((target, all) => { for (var name in all) __defProp2(target, name, { get: all[name], enumerable: true }); - }; - var __copyProps2 = (to, from, except, desc) => { + }, "__export"); + var __copyProps2 = /* @__PURE__ */ __name((to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames2(from)) if (!__hasOwnProp2.call(to, key) && key !== except) - __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + __defProp2(to, key, { get: /* @__PURE__ */ __name(() => from[key], "get"), enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); } return to; - }; - var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + }, "__copyProps"); + var __toCommonJS2 = /* @__PURE__ */ __name((mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod), "__toCommonJS"); var dist_src_exports = {}; __export2(dist_src_exports, { - GraphqlResponseError: () => GraphqlResponseError, - graphql: () => graphql2, - withCustomRequest: () => withCustomRequest + GraphqlResponseError: /* @__PURE__ */ __name(() => GraphqlResponseError, "GraphqlResponseError"), + graphql: /* @__PURE__ */ __name(() => graphql2, "graphql"), + withCustomRequest: /* @__PURE__ */ __name(() => withCustomRequest, "withCustomRequest") }); module2.exports = __toCommonJS2(dist_src_exports); var import_request3 = require_dist_node15(); @@ -110803,7 +113909,11 @@ var require_dist_node16 = __commonJS({ return `Request failed due to following response errors: ` + data.errors.map((e) => ` - ${e.message}`).join("\n"); } + __name(_buildMessageForResponseErrors, "_buildMessageForResponseErrors"); var GraphqlResponseError = class extends Error { + static { + __name(this, "GraphqlResponseError"); + } constructor(request2, headers, response) { super(_buildMessageForResponseErrors(response)); this.request = request2; @@ -110878,16 +113988,18 @@ var require_dist_node16 = __commonJS({ return response.data.data; }); } + __name(graphql, "graphql"); function withDefaults(request2, newDefaults) { const newRequest = request2.defaults(newDefaults); - const newApi = (query, options) => { + const newApi = /* @__PURE__ */ __name((query, options) => { return graphql(newRequest, query, options); - }; + }, "newApi"); return Object.assign(newApi, { defaults: withDefaults.bind(null, newRequest), endpoint: newRequest.endpoint }); } + __name(withDefaults, "withDefaults"); var graphql2 = withDefaults(import_request3.request, { headers: { "user-agent": `octokit-graphql.js/${VERSION2} ${(0, import_universal_user_agent.getUserAgent)()}` @@ -110901,6 +114013,7 @@ var require_dist_node16 = __commonJS({ url: "/graphql" }); } + __name(withCustomRequest, "withCustomRequest"); } }); @@ -110912,22 +114025,22 @@ var require_dist_node17 = __commonJS({ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; var __getOwnPropNames2 = Object.getOwnPropertyNames; var __hasOwnProp2 = Object.prototype.hasOwnProperty; - var __export2 = (target, all) => { + var __export2 = /* @__PURE__ */ __name((target, all) => { for (var name in all) __defProp2(target, name, { get: all[name], enumerable: true }); - }; - var __copyProps2 = (to, from, except, desc) => { + }, "__export"); + var __copyProps2 = /* @__PURE__ */ __name((to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames2(from)) if (!__hasOwnProp2.call(to, key) && key !== except) - __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + __defProp2(to, key, { get: /* @__PURE__ */ __name(() => from[key], "get"), enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); } return to; - }; - var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + }, "__copyProps"); + var __toCommonJS2 = /* @__PURE__ */ __name((mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod), "__toCommonJS"); var dist_src_exports = {}; __export2(dist_src_exports, { - createTokenAuth: () => createTokenAuth + createTokenAuth: /* @__PURE__ */ __name(() => createTokenAuth, "createTokenAuth") }); module2.exports = __toCommonJS2(dist_src_exports); var REGEX_IS_INSTALLATION_LEGACY = /^v1\./; @@ -110944,12 +114057,14 @@ var require_dist_node17 = __commonJS({ tokenType }; } + __name(auth, "auth"); function withAuthorizationPrefix(token) { if (token.split(/\./).length === 3) { return `bearer ${token}`; } return `token ${token}`; } + __name(withAuthorizationPrefix, "withAuthorizationPrefix"); async function hook(token, request, route, parameters) { const endpoint = request.endpoint.merge( route, @@ -110958,7 +114073,8 @@ var require_dist_node17 = __commonJS({ endpoint.headers.authorization = withAuthorizationPrefix(token); return request(endpoint); } - var createTokenAuth = function createTokenAuth2(token) { + __name(hook, "hook"); + var createTokenAuth = /* @__PURE__ */ __name(function createTokenAuth2(token) { if (!token) { throw new Error("[@octokit/auth-token] No token passed to createTokenAuth"); } @@ -110971,7 +114087,7 @@ var require_dist_node17 = __commonJS({ return Object.assign(auth.bind(null, token), { hook: hook.bind(null, token) }); - }; + }, "createTokenAuth2"); } }); @@ -110983,22 +114099,22 @@ var require_dist_node18 = __commonJS({ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; var __getOwnPropNames2 = Object.getOwnPropertyNames; var __hasOwnProp2 = Object.prototype.hasOwnProperty; - var __export2 = (target, all) => { + var __export2 = /* @__PURE__ */ __name((target, all) => { for (var name in all) __defProp2(target, name, { get: all[name], enumerable: true }); - }; - var __copyProps2 = (to, from, except, desc) => { + }, "__export"); + var __copyProps2 = /* @__PURE__ */ __name((to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames2(from)) if (!__hasOwnProp2.call(to, key) && key !== except) - __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + __defProp2(to, key, { get: /* @__PURE__ */ __name(() => from[key], "get"), enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); } return to; - }; - var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + }, "__copyProps"); + var __toCommonJS2 = /* @__PURE__ */ __name((mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod), "__toCommonJS"); var dist_src_exports = {}; __export2(dist_src_exports, { - Octokit: () => Octokit + Octokit: /* @__PURE__ */ __name(() => Octokit, "Octokit") }); module2.exports = __toCommonJS2(dist_src_exports); var import_universal_user_agent = require_dist_node(); @@ -111007,17 +114123,23 @@ var require_dist_node18 = __commonJS({ var import_graphql = require_dist_node16(); var import_auth_token = require_dist_node17(); var VERSION2 = "5.2.0"; - var noop = () => { - }; + var noop = /* @__PURE__ */ __name(() => { + }, "noop"); var consoleWarn = console.warn.bind(console); var consoleError = console.error.bind(console); var userAgentTrail = `octokit-core.js/${VERSION2} ${(0, import_universal_user_agent.getUserAgent)()}`; var Octokit = class { + static { + __name(this, "Octokit"); + } static { this.VERSION = VERSION2; } static defaults(defaults) { const OctokitWithDefaults = class extends this { + static { + __name(this, "OctokitWithDefaults"); + } constructor(...args) { const options = args[0] || {}; if (typeof defaults === "function") { @@ -111050,6 +114172,9 @@ var require_dist_node18 = __commonJS({ static plugin(...newPlugins) { const currentPlugins = this.plugins; const NewOctokit = class extends this { + static { + __name(this, "NewOctokit"); + } static { this.plugins = currentPlugins.concat( newPlugins.filter((plugin) => !currentPlugins.includes(plugin)) @@ -111142,23 +114267,23 @@ var require_dist_node19 = __commonJS({ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; var __getOwnPropNames2 = Object.getOwnPropertyNames; var __hasOwnProp2 = Object.prototype.hasOwnProperty; - var __export2 = (target, all) => { + var __export2 = /* @__PURE__ */ __name((target, all) => { for (var name in all) __defProp2(target, name, { get: all[name], enumerable: true }); - }; - var __copyProps2 = (to, from, except, desc) => { + }, "__export"); + var __copyProps2 = /* @__PURE__ */ __name((to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames2(from)) if (!__hasOwnProp2.call(to, key) && key !== except) - __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + __defProp2(to, key, { get: /* @__PURE__ */ __name(() => from[key], "get"), enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); } return to; - }; - var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + }, "__copyProps"); + var __toCommonJS2 = /* @__PURE__ */ __name((mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod), "__toCommonJS"); var dist_src_exports = {}; __export2(dist_src_exports, { - legacyRestEndpointMethods: () => legacyRestEndpointMethods, - restEndpointMethods: () => restEndpointMethods + legacyRestEndpointMethods: /* @__PURE__ */ __name(() => legacyRestEndpointMethods, "legacyRestEndpointMethods"), + restEndpointMethods: /* @__PURE__ */ __name(() => restEndpointMethods, "restEndpointMethods") }); module2.exports = __toCommonJS2(dist_src_exports); var VERSION2 = "10.4.1"; @@ -113231,6 +116356,7 @@ var require_dist_node19 = __commonJS({ } return newMethods; } + __name(endpointsToMethods, "endpointsToMethods"); function decorate(octokit, scope, methodName, defaults, decorations) { const requestWithDefaults = octokit.request.defaults(defaults); function withDecorations(...args) { @@ -113270,14 +116396,17 @@ var require_dist_node19 = __commonJS({ } return requestWithDefaults(...args); } + __name(withDecorations, "withDecorations"); return Object.assign(withDecorations, requestWithDefaults); } + __name(decorate, "decorate"); function restEndpointMethods(octokit) { const api = endpointsToMethods(octokit); return { rest: api }; } + __name(restEndpointMethods, "restEndpointMethods"); restEndpointMethods.VERSION = VERSION2; function legacyRestEndpointMethods(octokit) { const api = endpointsToMethods(octokit); @@ -113286,6 +116415,7 @@ var require_dist_node19 = __commonJS({ rest: api }; } + __name(legacyRestEndpointMethods, "legacyRestEndpointMethods"); legacyRestEndpointMethods.VERSION = VERSION2; } }); @@ -113298,25 +116428,25 @@ var require_dist_node20 = __commonJS({ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; var __getOwnPropNames2 = Object.getOwnPropertyNames; var __hasOwnProp2 = Object.prototype.hasOwnProperty; - var __export2 = (target, all) => { + var __export2 = /* @__PURE__ */ __name((target, all) => { for (var name in all) __defProp2(target, name, { get: all[name], enumerable: true }); - }; - var __copyProps2 = (to, from, except, desc) => { + }, "__export"); + var __copyProps2 = /* @__PURE__ */ __name((to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames2(from)) if (!__hasOwnProp2.call(to, key) && key !== except) - __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + __defProp2(to, key, { get: /* @__PURE__ */ __name(() => from[key], "get"), enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); } return to; - }; - var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + }, "__copyProps"); + var __toCommonJS2 = /* @__PURE__ */ __name((mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod), "__toCommonJS"); var dist_src_exports = {}; __export2(dist_src_exports, { - composePaginateRest: () => composePaginateRest, - isPaginatingEndpoint: () => isPaginatingEndpoint, - paginateRest: () => paginateRest, - paginatingEndpoints: () => paginatingEndpoints + composePaginateRest: /* @__PURE__ */ __name(() => composePaginateRest, "composePaginateRest"), + isPaginatingEndpoint: /* @__PURE__ */ __name(() => isPaginatingEndpoint, "isPaginatingEndpoint"), + paginateRest: /* @__PURE__ */ __name(() => paginateRest, "paginateRest"), + paginatingEndpoints: /* @__PURE__ */ __name(() => paginatingEndpoints, "paginatingEndpoints") }); module2.exports = __toCommonJS2(dist_src_exports); var VERSION2 = "9.2.1"; @@ -113348,6 +116478,7 @@ var require_dist_node20 = __commonJS({ response.data.total_count = totalCount; return response; } + __name(normalizePaginatedListResponse, "normalizePaginatedListResponse"); function iterator(octokit, route, parameters) { const options = typeof route === "function" ? route.endpoint(parameters) : octokit.request.endpoint(route, parameters); const requestMethod = typeof route === "function" ? route : octokit.request; @@ -113382,6 +116513,7 @@ var require_dist_node20 = __commonJS({ }) }; } + __name(iterator, "iterator"); function paginate(octokit, route, parameters, mapFn) { if (typeof parameters === "function") { mapFn = parameters; @@ -113394,6 +116526,7 @@ var require_dist_node20 = __commonJS({ mapFn ); } + __name(paginate, "paginate"); function gather(octokit, results, iterator2, mapFn) { return iterator2.next().then((result) => { if (result.done) { @@ -113403,6 +116536,7 @@ var require_dist_node20 = __commonJS({ function done() { earlyExit = true; } + __name(done, "done"); results = results.concat( mapFn ? mapFn(result.value, done) : result.value.data ); @@ -113412,6 +116546,7 @@ var require_dist_node20 = __commonJS({ return gather(octokit, results, iterator2, mapFn); }); } + __name(gather, "gather"); var composePaginateRest = Object.assign(paginate, { iterator }); @@ -113658,6 +116793,7 @@ var require_dist_node20 = __commonJS({ return false; } } + __name(isPaginatingEndpoint, "isPaginatingEndpoint"); function paginateRest(octokit) { return { paginate: Object.assign(paginate.bind(null, octokit), { @@ -113665,6 +116801,7 @@ var require_dist_node20 = __commonJS({ }) }; } + __name(paginateRest, "paginateRest"); paginateRest.VERSION = VERSION2; } }); @@ -113677,9 +116814,9 @@ var require_utils8 = __commonJS({ if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { + desc = { enumerable: true, get: /* @__PURE__ */ __name(function() { return m[k]; - } }; + }, "get") }; } Object.defineProperty(o, k2, desc); } : function(o, m, k, k2) { @@ -113725,6 +116862,7 @@ var require_utils8 = __commonJS({ } return opts; } + __name(getOctokitOptions, "getOctokitOptions"); exports2.getOctokitOptions = getOctokitOptions; } }); @@ -113737,9 +116875,9 @@ var require_github2 = __commonJS({ if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { + desc = { enumerable: true, get: /* @__PURE__ */ __name(function() { return m[k]; - } }; + }, "get") }; } Object.defineProperty(o, k2, desc); } : function(o, m, k, k2) { @@ -113769,6 +116907,7 @@ var require_github2 = __commonJS({ const GitHubWithPlugins = utils_1.GitHub.plugin(...additionalPlugins); return new GitHubWithPlugins((0, utils_1.getOctokitOptions)(token, options)); } + __name(getOctokit, "getOctokit"); exports2.getOctokit = getOctokit; } }); @@ -113820,9 +116959,11 @@ async function run() { core.setFailed(error.message); } } +__name(run, "run"); async function allFiles(dir) { return (await import_fs.promises.readdir(dir, { recursive: true, withFileTypes: true })).filter((e) => e.isFile()).map((e) => `${e.path}/${e.name}`); } +__name(allFiles, "allFiles"); run(); /*! Bundled license information: diff --git a/dist/index.js.map b/dist/index.js.map index 07cbaa9..295b4e6 100644 --- a/dist/index.js.map +++ b/dist/index.js.map @@ -2,6 +2,6 @@ "version": 3, "sources": ["../node_modules/@actions/core/src/utils.ts", "../node_modules/@actions/core/src/command.ts", "../node_modules/uuid/dist/esm-node/rng.js", "../node_modules/uuid/dist/esm-node/regex.js", "../node_modules/uuid/dist/esm-node/validate.js", "../node_modules/uuid/dist/esm-node/stringify.js", "../node_modules/uuid/dist/esm-node/v1.js", "../node_modules/uuid/dist/esm-node/parse.js", "../node_modules/uuid/dist/esm-node/v35.js", "../node_modules/uuid/dist/esm-node/md5.js", "../node_modules/uuid/dist/esm-node/v3.js", "../node_modules/uuid/dist/esm-node/v4.js", "../node_modules/uuid/dist/esm-node/sha1.js", "../node_modules/uuid/dist/esm-node/v5.js", "../node_modules/uuid/dist/esm-node/nil.js", "../node_modules/uuid/dist/esm-node/version.js", "../node_modules/uuid/dist/esm-node/index.js", "../node_modules/@actions/core/src/file-command.ts", "../node_modules/@actions/http-client/src/proxy.ts", "../node_modules/tunnel/lib/tunnel.js", "../node_modules/tunnel/index.js", "../node_modules/undici/lib/core/symbols.js", "../node_modules/undici/lib/core/errors.js", "../node_modules/undici/lib/core/constants.js", "../node_modules/undici/lib/core/util.js", "../node_modules/undici/lib/timers.js", "../node_modules/@fastify/busboy/deps/streamsearch/sbmh.js", "../node_modules/@fastify/busboy/deps/dicer/lib/PartStream.js", "../node_modules/@fastify/busboy/lib/utils/getLimit.js", "../node_modules/@fastify/busboy/deps/dicer/lib/HeaderParser.js", "../node_modules/@fastify/busboy/deps/dicer/lib/Dicer.js", "../node_modules/@fastify/busboy/lib/utils/decodeText.js", "../node_modules/@fastify/busboy/lib/utils/parseParams.js", "../node_modules/@fastify/busboy/lib/utils/basename.js", "../node_modules/@fastify/busboy/lib/types/multipart.js", "../node_modules/@fastify/busboy/lib/utils/Decoder.js", "../node_modules/@fastify/busboy/lib/types/urlencoded.js", "../node_modules/@fastify/busboy/lib/main.js", "../node_modules/undici/lib/fetch/constants.js", "../node_modules/undici/lib/fetch/global.js", "../node_modules/undici/lib/fetch/util.js", "../node_modules/undici/lib/fetch/symbols.js", "../node_modules/undici/lib/fetch/webidl.js", "../node_modules/undici/lib/fetch/dataURL.js", "../node_modules/undici/lib/fetch/file.js", "../node_modules/undici/lib/fetch/formdata.js", "../node_modules/undici/lib/fetch/body.js", "../node_modules/undici/lib/core/request.js", "../node_modules/undici/lib/dispatcher.js", "../node_modules/undici/lib/dispatcher-base.js", "../node_modules/undici/lib/core/connect.js", "../node_modules/undici/src/llhttp/utils.ts", "../node_modules/undici/src/llhttp/constants.ts", "../node_modules/undici/lib/handler/RedirectHandler.js", "../node_modules/undici/lib/interceptor/redirectInterceptor.js", "../node_modules/undici/lib/llhttp/llhttp-wasm.js", "../node_modules/undici/lib/llhttp/llhttp_simd-wasm.js", "../node_modules/undici/lib/client.js", "../node_modules/undici/lib/node/fixed-queue.js", "../node_modules/undici/lib/pool-stats.js", "../node_modules/undici/lib/pool-base.js", "../node_modules/undici/lib/pool.js", "../node_modules/undici/lib/balanced-pool.js", "../node_modules/undici/lib/compat/dispatcher-weakref.js", "../node_modules/undici/lib/agent.js", "../node_modules/undici/lib/api/readable.js", "../node_modules/undici/lib/api/util.js", "../node_modules/undici/lib/api/abort-signal.js", "../node_modules/undici/lib/api/api-request.js", "../node_modules/undici/lib/api/api-stream.js", "../node_modules/undici/lib/api/api-pipeline.js", "../node_modules/undici/lib/api/api-upgrade.js", "../node_modules/undici/lib/api/api-connect.js", "../node_modules/undici/lib/api/index.js", "../node_modules/undici/lib/mock/mock-errors.js", "../node_modules/undici/lib/mock/mock-symbols.js", "../node_modules/undici/lib/mock/mock-utils.js", "../node_modules/undici/lib/mock/mock-interceptor.js", "../node_modules/undici/lib/mock/mock-client.js", "../node_modules/undici/lib/mock/mock-pool.js", "../node_modules/undici/lib/mock/pluralizer.js", "../node_modules/undici/lib/mock/pending-interceptors-formatter.js", "../node_modules/undici/lib/mock/mock-agent.js", "../node_modules/undici/lib/proxy-agent.js", "../node_modules/undici/lib/handler/RetryHandler.js", "../node_modules/undici/lib/global.js", "../node_modules/undici/lib/handler/DecoratorHandler.js", "../node_modules/undici/lib/fetch/headers.js", "../node_modules/undici/lib/fetch/response.js", "../node_modules/undici/lib/fetch/request.js", "../node_modules/undici/lib/fetch/index.js", "../node_modules/undici/lib/fileapi/symbols.js", "../node_modules/undici/lib/fileapi/progressevent.js", "../node_modules/undici/lib/fileapi/encoding.js", "../node_modules/undici/lib/fileapi/util.js", "../node_modules/undici/lib/fileapi/filereader.js", "../node_modules/undici/lib/cache/symbols.js", "../node_modules/undici/lib/cache/util.js", "../node_modules/undici/lib/cache/cache.js", "../node_modules/undici/lib/cache/cachestorage.js", "../node_modules/undici/lib/cookies/constants.js", "../node_modules/undici/lib/cookies/util.js", "../node_modules/undici/lib/cookies/parse.js", "../node_modules/undici/lib/cookies/index.js", "../node_modules/undici/lib/websocket/constants.js", "../node_modules/undici/lib/websocket/symbols.js", "../node_modules/undici/lib/websocket/events.js", "../node_modules/undici/lib/websocket/util.js", "../node_modules/undici/lib/websocket/connection.js", "../node_modules/undici/lib/websocket/frame.js", "../node_modules/undici/lib/websocket/receiver.js", "../node_modules/undici/lib/websocket/websocket.js", "../node_modules/undici/index.js", "../node_modules/@actions/http-client/src/index.ts", "../node_modules/@actions/http-client/src/auth.ts", "../node_modules/@actions/core/src/oidc-utils.ts", "../node_modules/@actions/core/src/summary.ts", "../node_modules/@actions/core/src/path-utils.ts", "../node_modules/@actions/core/src/core.ts", "../node_modules/@actions/io/src/io-util.ts", "../node_modules/@actions/io/src/io.ts", "../node_modules/@actions/exec/src/toolrunner.ts", "../node_modules/@actions/exec/src/exec.ts", "../node_modules/@actions/artifact/src/internal/shared/config.ts", "../node_modules/@protobuf-ts/runtime/build/commonjs/json-typings.js", "../node_modules/@protobuf-ts/runtime/build/commonjs/base64.js", "../node_modules/@protobuf-ts/runtime/build/commonjs/protobufjs-utf8.js", "../node_modules/@protobuf-ts/runtime/build/commonjs/binary-format-contract.js", "../node_modules/@protobuf-ts/runtime/build/commonjs/goog-varint.js", "../node_modules/@protobuf-ts/runtime/build/commonjs/pb-long.js", "../node_modules/@protobuf-ts/runtime/build/commonjs/binary-reader.js", "../node_modules/@protobuf-ts/runtime/build/commonjs/assert.js", "../node_modules/@protobuf-ts/runtime/build/commonjs/binary-writer.js", "../node_modules/@protobuf-ts/runtime/build/commonjs/json-format-contract.js", "../node_modules/@protobuf-ts/runtime/build/commonjs/message-type-contract.js", "../node_modules/@protobuf-ts/runtime/build/commonjs/lower-camel-case.js", "../node_modules/@protobuf-ts/runtime/build/commonjs/reflection-info.js", "../node_modules/@protobuf-ts/runtime/build/commonjs/oneof.js", "../node_modules/@protobuf-ts/runtime/build/commonjs/reflection-type-check.js", "../node_modules/@protobuf-ts/runtime/build/commonjs/reflection-long-convert.js", "../node_modules/@protobuf-ts/runtime/build/commonjs/reflection-json-reader.js", "../node_modules/@protobuf-ts/runtime/build/commonjs/reflection-json-writer.js", "../node_modules/@protobuf-ts/runtime/build/commonjs/reflection-scalar-default.js", "../node_modules/@protobuf-ts/runtime/build/commonjs/reflection-binary-reader.js", "../node_modules/@protobuf-ts/runtime/build/commonjs/reflection-binary-writer.js", "../node_modules/@protobuf-ts/runtime/build/commonjs/reflection-create.js", "../node_modules/@protobuf-ts/runtime/build/commonjs/reflection-merge-partial.js", "../node_modules/@protobuf-ts/runtime/build/commonjs/reflection-equals.js", "../node_modules/@protobuf-ts/runtime/build/commonjs/message-type.js", "../node_modules/@protobuf-ts/runtime/build/commonjs/reflection-contains-message-type.js", "../node_modules/@protobuf-ts/runtime/build/commonjs/enum-object.js", "../node_modules/@protobuf-ts/runtime/build/commonjs/index.js", "../node_modules/@actions/artifact/src/generated/google/protobuf/timestamp.ts", "../node_modules/@actions/artifact/src/generated/google/protobuf/wrappers.ts", "../node_modules/@protobuf-ts/runtime-rpc/build/commonjs/reflection-info.js", "../node_modules/@protobuf-ts/runtime-rpc/build/commonjs/service-type.js", "../node_modules/@protobuf-ts/runtime-rpc/build/commonjs/rpc-error.js", "../node_modules/@protobuf-ts/runtime-rpc/build/commonjs/rpc-options.js", "../node_modules/@protobuf-ts/runtime-rpc/build/commonjs/deferred.js", "../node_modules/@protobuf-ts/runtime-rpc/build/commonjs/rpc-output-stream.js", "../node_modules/@protobuf-ts/runtime-rpc/build/commonjs/unary-call.js", "../node_modules/@protobuf-ts/runtime-rpc/build/commonjs/server-streaming-call.js", "../node_modules/@protobuf-ts/runtime-rpc/build/commonjs/client-streaming-call.js", "../node_modules/@protobuf-ts/runtime-rpc/build/commonjs/duplex-streaming-call.js", "../node_modules/@protobuf-ts/runtime-rpc/build/commonjs/test-transport.js", "../node_modules/@protobuf-ts/runtime-rpc/build/commonjs/rpc-interceptor.js", "../node_modules/@protobuf-ts/runtime-rpc/build/commonjs/server-call-context.js", "../node_modules/@protobuf-ts/runtime-rpc/build/commonjs/index.js", "../node_modules/@actions/artifact/src/generated/results/api/v1/artifact.ts", "../node_modules/twirp-ts/build/twirp/context.js", "../node_modules/twirp-ts/build/twirp/hooks.js", "../node_modules/twirp-ts/build/twirp/errors.js", "../node_modules/twirp-ts/build/twirp/request.js", "../node_modules/twirp-ts/build/twirp/server.js", "../node_modules/twirp-ts/build/twirp/interceptors.js", "../node_modules/dot-object/index.js", "../node_modules/twirp-ts/build/twirp/http.client.js", "../node_modules/twirp-ts/build/twirp/gateway.js", "../node_modules/twirp-ts/build/twirp/index.js", "../node_modules/@actions/artifact/src/generated/results/api/v1/artifact.twirp.ts", "../node_modules/@actions/artifact/src/generated/index.ts", "../node_modules/@actions/artifact/src/internal/upload/retention.ts", "../node_modules/@actions/artifact/src/internal/upload/path-and-artifact-name-validation.ts", "../node_modules/@actions/artifact/package.json", "../node_modules/@actions/artifact/src/internal/shared/user-agent.ts", "../node_modules/@actions/artifact/src/internal/shared/errors.ts", "../node_modules/@actions/artifact/src/internal/shared/artifact-twirp-client.ts", "../node_modules/@actions/artifact/src/internal/upload/upload-zip-specification.ts", "../node_modules/jwt-decode/lib/atob.js", "../node_modules/jwt-decode/lib/base64_url_decode.js", "../node_modules/jwt-decode/lib/index.js", "../node_modules/jwt-decode/lib/index.cjs.js", "../node_modules/@actions/artifact/src/internal/shared/util.ts", "../node_modules/tslib/tslib.es6.mjs", "../node_modules/xml2js/lib/defaults.js", "../node_modules/xmlbuilder/lib/Utility.js", "../node_modules/xmlbuilder/lib/XMLDOMImplementation.js", "../node_modules/xmlbuilder/lib/XMLDOMErrorHandler.js", "../node_modules/xmlbuilder/lib/XMLDOMStringList.js", "../node_modules/xmlbuilder/lib/XMLDOMConfiguration.js", "../node_modules/xmlbuilder/lib/NodeType.js", "../node_modules/xmlbuilder/lib/XMLAttribute.js", "../node_modules/xmlbuilder/lib/XMLNamedNodeMap.js", "../node_modules/xmlbuilder/lib/XMLElement.js", "../node_modules/xmlbuilder/lib/XMLCharacterData.js", "../node_modules/xmlbuilder/lib/XMLCData.js", "../node_modules/xmlbuilder/lib/XMLComment.js", "../node_modules/xmlbuilder/lib/XMLDeclaration.js", "../node_modules/xmlbuilder/lib/XMLDTDAttList.js", "../node_modules/xmlbuilder/lib/XMLDTDEntity.js", "../node_modules/xmlbuilder/lib/XMLDTDElement.js", "../node_modules/xmlbuilder/lib/XMLDTDNotation.js", "../node_modules/xmlbuilder/lib/XMLDocType.js", "../node_modules/xmlbuilder/lib/XMLRaw.js", "../node_modules/xmlbuilder/lib/XMLText.js", "../node_modules/xmlbuilder/lib/XMLProcessingInstruction.js", "../node_modules/xmlbuilder/lib/XMLDummy.js", "../node_modules/xmlbuilder/lib/XMLNodeList.js", "../node_modules/xmlbuilder/lib/DocumentPosition.js", "../node_modules/xmlbuilder/lib/XMLNode.js", "../node_modules/xmlbuilder/lib/XMLStringifier.js", "../node_modules/xmlbuilder/lib/WriterState.js", "../node_modules/xmlbuilder/lib/XMLWriterBase.js", "../node_modules/xmlbuilder/lib/XMLStringWriter.js", "../node_modules/xmlbuilder/lib/XMLDocument.js", "../node_modules/xmlbuilder/lib/XMLDocumentCB.js", "../node_modules/xmlbuilder/lib/XMLStreamWriter.js", "../node_modules/xmlbuilder/lib/index.js", "../node_modules/xml2js/lib/builder.js", "../node_modules/sax/lib/sax.js", "../node_modules/xml2js/lib/bom.js", "../node_modules/xml2js/lib/processors.js", "../node_modules/xml2js/lib/parser.js", "../node_modules/xml2js/lib/xml2js.js", "../node_modules/@azure/core-util/node_modules/@azure/abort-controller/src/AbortError.ts", "../node_modules/@azure/core-util/node_modules/@azure/abort-controller/src/index.ts", "../node_modules/@azure/core-util/src/createAbortablePromise.ts", "../node_modules/@azure/core-util/src/delay.ts", "../node_modules/@azure/core-util/src/aborterUtils.ts", "../node_modules/@azure/core-util/src/random.ts", "../node_modules/@azure/core-util/src/object.ts", "../node_modules/@azure/core-util/src/error.ts", "../node_modules/@azure/core-util/src/sha256.ts", "../node_modules/@azure/core-util/src/typeGuards.ts", "../node_modules/@azure/core-util/src/uuidUtils.ts", "../node_modules/@azure/core-util/src/checkEnvironment.ts", "../node_modules/@azure/core-util/src/bytesEncoding.ts", "../node_modules/@azure/core-util/src/index.ts", "../node_modules/@azure/logger/src/log.ts", "../node_modules/@azure/logger/src/debug.ts", "../node_modules/@azure/logger/src/index.ts", "../node_modules/@azure/core-auth/src/azureKeyCredential.ts", "../node_modules/@azure/core-auth/src/keyCredential.ts", "../node_modules/@azure/core-auth/src/azureNamedKeyCredential.ts", "../node_modules/@azure/core-auth/src/azureSASCredential.ts", "../node_modules/@azure/core-auth/src/tokenCredential.ts", "../node_modules/@azure/core-auth/src/index.ts", "../node_modules/@azure/abort-controller/src/AbortSignal.ts", "../node_modules/@azure/abort-controller/src/AbortController.ts", "../node_modules/delayed-stream/lib/delayed_stream.js", "../node_modules/combined-stream/lib/combined_stream.js", "../node_modules/mime-db/db.json", "../node_modules/mime-db/index.js", "../node_modules/mime-types/index.js", "../node_modules/asynckit/lib/defer.js", "../node_modules/asynckit/lib/async.js", "../node_modules/asynckit/lib/abort.js", "../node_modules/asynckit/lib/iterate.js", "../node_modules/asynckit/lib/state.js", "../node_modules/asynckit/lib/terminator.js", "../node_modules/asynckit/parallel.js", "../node_modules/asynckit/serialOrdered.js", "../node_modules/asynckit/serial.js", "../node_modules/asynckit/index.js", "../node_modules/form-data/lib/populate.js", "../node_modules/form-data/lib/form_data.js", "../node_modules/webidl-conversions/lib/index.js", "../node_modules/whatwg-url/lib/utils.js", "../node_modules/tr46/lib/mappingTable.json", "../node_modules/tr46/index.js", "../node_modules/whatwg-url/lib/url-state-machine.js", "../node_modules/whatwg-url/lib/URL-impl.js", "../node_modules/whatwg-url/lib/URL.js", "../node_modules/whatwg-url/lib/public-api.js", "../node_modules/node-fetch/lib/index.js", "../node_modules/@opentelemetry/api/src/platform/node/globalThis.ts", "../node_modules/@opentelemetry/api/src/platform/node/index.ts", "../node_modules/@opentelemetry/api/src/platform/index.ts", "../node_modules/@opentelemetry/api/src/version.ts", "../node_modules/@opentelemetry/api/src/internal/semver.ts", "../node_modules/@opentelemetry/api/src/internal/global-utils.ts", "../node_modules/@opentelemetry/api/src/diag/ComponentLogger.ts", "../node_modules/@opentelemetry/api/src/diag/types.ts", "../node_modules/@opentelemetry/api/src/diag/internal/logLevelLogger.ts", "../node_modules/@opentelemetry/api/src/api/diag.ts", "../node_modules/@opentelemetry/api/src/baggage/internal/baggage-impl.ts", "../node_modules/@opentelemetry/api/src/baggage/internal/symbol.ts", "../node_modules/@opentelemetry/api/src/baggage/utils.ts", "../node_modules/@opentelemetry/api/src/context/context.ts", "../node_modules/@opentelemetry/api/src/diag/consoleLogger.ts", "../node_modules/@opentelemetry/api/src/metrics/NoopMeter.ts", "../node_modules/@opentelemetry/api/src/metrics/Metric.ts", "../node_modules/@opentelemetry/api/src/propagation/TextMapPropagator.ts", "../node_modules/@opentelemetry/api/src/context/NoopContextManager.ts", "../node_modules/@opentelemetry/api/src/api/context.ts", "../node_modules/@opentelemetry/api/src/trace/trace_flags.ts", "../node_modules/@opentelemetry/api/src/trace/invalid-span-constants.ts", "../node_modules/@opentelemetry/api/src/trace/NonRecordingSpan.ts", "../node_modules/@opentelemetry/api/src/trace/context-utils.ts", "../node_modules/@opentelemetry/api/src/trace/spancontext-utils.ts", "../node_modules/@opentelemetry/api/src/trace/NoopTracer.ts", "../node_modules/@opentelemetry/api/src/trace/ProxyTracer.ts", "../node_modules/@opentelemetry/api/src/trace/NoopTracerProvider.ts", "../node_modules/@opentelemetry/api/src/trace/ProxyTracerProvider.ts", "../node_modules/@opentelemetry/api/src/trace/SamplingResult.ts", "../node_modules/@opentelemetry/api/src/trace/span_kind.ts", "../node_modules/@opentelemetry/api/src/trace/status.ts", "../node_modules/@opentelemetry/api/src/trace/internal/tracestate-validators.ts", "../node_modules/@opentelemetry/api/src/trace/internal/tracestate-impl.ts", "../node_modules/@opentelemetry/api/src/trace/internal/utils.ts", "../node_modules/@opentelemetry/api/src/context-api.ts", "../node_modules/@opentelemetry/api/src/diag-api.ts", "../node_modules/@opentelemetry/api/src/metrics/NoopMeterProvider.ts", "../node_modules/@opentelemetry/api/src/api/metrics.ts", "../node_modules/@opentelemetry/api/src/metrics-api.ts", "../node_modules/@opentelemetry/api/src/propagation/NoopTextMapPropagator.ts", "../node_modules/@opentelemetry/api/src/baggage/context-helpers.ts", "../node_modules/@opentelemetry/api/src/api/propagation.ts", "../node_modules/@opentelemetry/api/src/propagation-api.ts", "../node_modules/@opentelemetry/api/src/api/trace.ts", "../node_modules/@opentelemetry/api/src/trace-api.ts", "../node_modules/@opentelemetry/api/src/index.ts", "../node_modules/@azure/core-tracing/src/interfaces.ts", "../node_modules/@azure/core-tracing/src/createSpan.ts", "../node_modules/@azure/core-tracing/src/utils/traceParentHeader.ts", "../node_modules/@azure/core-http/src/httpHeaders.ts", "../node_modules/@azure/core-http/src/util/base64.ts", "../node_modules/@azure/core-http/src/util/constants.ts", "../node_modules/@azure/core-http/src/util/serializer.common.ts", "../node_modules/@azure/core-http/src/util/utils.ts", "../node_modules/@azure/core-http/src/serializer.ts", "../node_modules/@azure/core-http/src/webResource.ts", "../node_modules/@azure/core-http/src/url.ts", "../node_modules/@azure/core-http/src/proxyAgent.ts", "../node_modules/@azure/core-http/src/util/sanitizer.ts", "../node_modules/@azure/core-http/src/util/inspect.ts", "../node_modules/@azure/core-http/src/restError.ts", "../node_modules/@azure/core-http/src/log.ts", "../node_modules/@azure/core-http/src/nodeFetchHttpClient.ts", "../node_modules/@azure/core-http/src/httpPipelineLogLevel.ts", "../node_modules/@azure/core-http/src/operationOptions.ts", "../node_modules/@azure/core-http/src/policies/requestPolicy.ts", "../node_modules/@azure/core-http/src/util/xml.ts", "../node_modules/@azure/core-http/src/policies/deserializationPolicy.ts", "../node_modules/@azure/core-http/src/policies/keepAlivePolicy.ts", "../node_modules/@azure/core-http/src/policies/redirectPolicy.ts", "../node_modules/@azure/core-http/src/util/exponentialBackoffStrategy.ts", "../node_modules/@azure/core-http/src/policies/exponentialRetryPolicy.ts", "../node_modules/@azure/core-http/src/policies/logPolicy.ts", "../node_modules/@azure/core-http/src/operationParameter.ts", "../node_modules/@azure/core-http/src/operationSpec.ts", "../node_modules/@azure/core-http/src/policies/msRestUserAgentPolicy.ts", "../node_modules/@azure/core-http/src/policies/userAgentPolicy.ts", "../node_modules/@azure/core-http/src/queryCollectionFormat.ts", "../node_modules/@azure/core-http/src/policies/bearerTokenAuthenticationPolicy.ts", "../node_modules/@azure/core-http/src/policies/disableResponseDecompressionPolicy.ts", "../node_modules/@azure/core-http/src/policies/generateClientRequestIdPolicy.ts", "../node_modules/@azure/core-http/src/httpClientCache.ts", "../node_modules/@azure/core-http/src/policies/ndJsonPolicy.ts", "../node_modules/@azure/core-http/src/policies/proxyPolicy.ts", "../node_modules/@azure/core-http/src/policies/rpRegistrationPolicy.ts", "../node_modules/@azure/core-http/src/policies/signingPolicy.ts", "../node_modules/@azure/core-http/src/policies/systemErrorRetryPolicy.ts", "../node_modules/@azure/core-http/src/util/throttlingRetryStrategy.ts", "../node_modules/@azure/core-http/src/policies/throttlingRetryPolicy.ts", "../node_modules/@azure/core-http/src/policies/tracingPolicy.ts", "../node_modules/@azure/core-http/src/serviceClient.ts", "../node_modules/@azure/core-http/src/createSpanLegacy.ts", "../node_modules/@azure/core-http/src/credentials/accessTokenCache.ts", "../node_modules/@azure/core-http/src/credentials/accessTokenRefresher.ts", "../node_modules/@azure/core-http/src/credentials/basicAuthenticationCredentials.ts", "../node_modules/@azure/core-http/src/credentials/apiKeyCredentials.ts", "../node_modules/@azure/core-http/src/credentials/topicCredentials.ts", "../node_modules/@azure/core-paging/src/getPagedAsyncIterator.ts", "../node_modules/@azure/core-paging/src/index.ts", "../node_modules/@azure/core-lro/src/logger.ts", "../node_modules/@azure/core-lro/src/poller/constants.ts", "../node_modules/@azure/core-lro/src/poller/operation.ts", "../node_modules/@azure/core-lro/src/http/operation.ts", "../node_modules/@azure/core-lro/src/poller/poller.ts", "../node_modules/@azure/core-lro/src/http/poller.ts", "../node_modules/@azure/core-lro/src/legacy/lroEngine/operation.ts", "../node_modules/@azure/core-lro/src/legacy/poller.ts", "../node_modules/@azure/core-lro/src/legacy/lroEngine/lroEngine.ts", "../node_modules/@azure/core-lro/src/legacy/lroEngine/index.ts", "../node_modules/@azure/core-lro/src/index.ts", "../node_modules/@azure/storage-blob/src/generated/src/models/mappers.ts", "../node_modules/@azure/storage-blob/src/generated/src/models/parameters.ts", "../node_modules/@azure/storage-blob/src/generated/src/operations/service.ts", "../node_modules/@azure/storage-blob/src/generated/src/operations/container.ts", "../node_modules/@azure/storage-blob/src/generated/src/operations/blob.ts", "../node_modules/@azure/storage-blob/src/generated/src/operations/pageBlob.ts", "../node_modules/@azure/storage-blob/src/generated/src/operations/appendBlob.ts", "../node_modules/@azure/storage-blob/src/generated/src/operations/blockBlob.ts", "../node_modules/@azure/storage-blob/src/log.ts", "../node_modules/@azure/storage-blob/src/utils/constants.ts", "../node_modules/@azure/storage-blob/src/utils/utils.common.ts", "../node_modules/@azure/storage-blob/src/policies/StorageBrowserPolicy.ts", "../node_modules/@azure/storage-blob/src/StorageBrowserPolicyFactory.ts", "../node_modules/@azure/storage-blob/src/policies/StorageRetryPolicy.ts", "../node_modules/@azure/storage-blob/src/StorageRetryPolicyFactory.ts", "../node_modules/@azure/storage-blob/src/policies/CredentialPolicy.ts", "../node_modules/@azure/storage-blob/src/policies/AnonymousCredentialPolicy.ts", "../node_modules/@azure/storage-blob/src/credentials/Credential.ts", "../node_modules/@azure/storage-blob/src/credentials/AnonymousCredential.ts", "../node_modules/@azure/storage-blob/src/policies/TelemetryPolicy.ts", "../node_modules/@azure/storage-blob/src/TelemetryPolicyFactory.ts", "../node_modules/@azure/storage-blob/src/utils/cache.ts", "../node_modules/@azure/storage-blob/src/policies/StorageBearerTokenChallengeAuthenticationPolicy.ts", "../node_modules/@azure/storage-blob/src/Pipeline.ts", "../node_modules/@azure/storage-blob/src/policies/StorageSharedKeyCredentialPolicy.ts", "../node_modules/@azure/storage-blob/src/credentials/StorageSharedKeyCredential.ts", "../node_modules/@azure/storage-blob/src/generated/src/storageClientContext.ts", "../node_modules/@azure/storage-blob/src/StorageClient.ts", "../node_modules/@azure/storage-blob/src/utils/tracing.ts", "../node_modules/@azure/storage-blob/src/sas/BlobSASPermissions.ts", "../node_modules/@azure/storage-blob/src/sas/ContainerSASPermissions.ts", "../node_modules/@azure/storage-blob/src/credentials/UserDelegationKeyCredential.ts", "../node_modules/@azure/storage-blob/src/sas/SasIPRange.ts", "../node_modules/@azure/storage-blob/src/sas/SASQueryParameters.ts", "../node_modules/@azure/storage-blob/src/sas/BlobSASSignatureValues.ts", "../node_modules/@azure/storage-blob/src/BlobLeaseClient.ts", "../node_modules/@azure/storage-blob/src/utils/RetriableReadableStream.ts", "../node_modules/@azure/storage-blob/src/BlobDownloadResponse.ts", "../node_modules/@azure/storage-internal-avro/src/AvroConstants.ts", "../node_modules/@azure/storage-internal-avro/src/AvroParser.ts", "../node_modules/@azure/storage-internal-avro/src/utils/utils.common.ts", "../node_modules/@azure/storage-internal-avro/src/AvroReader.ts", "../node_modules/@azure/storage-internal-avro/src/AvroReadable.ts", "../node_modules/@azure/storage-internal-avro/src/AvroReadableFromStream.ts", "../node_modules/@azure/storage-blob/src/utils/BlobQuickQueryStream.ts", "../node_modules/@azure/storage-blob/src/BlobQueryResponse.ts", "../node_modules/@azure/storage-blob/src/models.ts", "../node_modules/@azure/storage-blob/src/PageBlobRangeResponse.ts", "../node_modules/@azure/storage-blob/src/pollers/BlobStartCopyFromUrlPoller.ts", "../node_modules/@azure/storage-blob/src/Range.ts", "../node_modules/@azure/storage-blob/src/utils/Batch.ts", "../node_modules/@azure/storage-common/src/BuffersStream.ts", "../node_modules/@azure/storage-common/src/PooledBuffer.ts", "../node_modules/@azure/storage-common/src/BufferScheduler.ts", "../node_modules/@azure/storage-blob/src/utils/utils.node.ts", "../node_modules/@azure/storage-blob/src/Clients.ts", "../node_modules/@azure/storage-blob/src/BatchUtils.ts", "../node_modules/@azure/storage-blob/src/BatchResponseParser.ts", "../node_modules/@azure/storage-blob/src/utils/Mutex.ts", "../node_modules/@azure/storage-blob/src/BlobBatch.ts", "../node_modules/@azure/storage-blob/src/BlobBatchClient.ts", "../node_modules/@azure/storage-blob/src/ContainerClient.ts", "../node_modules/@azure/storage-blob/src/sas/AccountSASPermissions.ts", "../node_modules/@azure/storage-blob/src/sas/AccountSASResourceTypes.ts", "../node_modules/@azure/storage-blob/src/sas/AccountSASServices.ts", "../node_modules/@azure/storage-blob/src/sas/AccountSASSignatureValues.ts", "../node_modules/@azure/storage-blob/src/BlobServiceClient.ts", "../node_modules/@azure/storage-blob/src/generatedModels.ts", "../node_modules/@actions/artifact/src/internal/upload/blob-upload.ts", "../node_modules/readdir-glob/node_modules/minimatch/lib/path.js", "../node_modules/balanced-match/index.js", "../node_modules/brace-expansion/index.js", "../node_modules/readdir-glob/node_modules/minimatch/minimatch.js", "../node_modules/readdir-glob/index.js", "../node_modules/async/dist/async.js", "../node_modules/graceful-fs/polyfills.js", "../node_modules/graceful-fs/legacy-streams.js", "../node_modules/graceful-fs/clone.js", "../node_modules/graceful-fs/graceful-fs.js", "../node_modules/is-stream/index.js", "../node_modules/process-nextick-args/index.js", "../node_modules/isarray/index.js", "../node_modules/lazystream/node_modules/readable-stream/lib/internal/streams/stream.js", "../node_modules/lazystream/node_modules/safe-buffer/index.js", "../node_modules/core-util-is/lib/util.js", "../node_modules/inherits/inherits_browser.js", "../node_modules/inherits/inherits.js", "../node_modules/lazystream/node_modules/readable-stream/lib/internal/streams/BufferList.js", "../node_modules/lazystream/node_modules/readable-stream/lib/internal/streams/destroy.js", "../node_modules/util-deprecate/node.js", "../node_modules/lazystream/node_modules/readable-stream/lib/_stream_writable.js", "../node_modules/lazystream/node_modules/readable-stream/lib/_stream_duplex.js", "../node_modules/lazystream/node_modules/string_decoder/lib/string_decoder.js", "../node_modules/lazystream/node_modules/readable-stream/lib/_stream_readable.js", "../node_modules/lazystream/node_modules/readable-stream/lib/_stream_transform.js", "../node_modules/lazystream/node_modules/readable-stream/lib/_stream_passthrough.js", "../node_modules/lazystream/node_modules/readable-stream/readable.js", "../node_modules/lazystream/node_modules/readable-stream/passthrough.js", "../node_modules/lazystream/lib/lazystream.js", "../node_modules/normalize-path/index.js", "../node_modules/lodash/identity.js", "../node_modules/lodash/_apply.js", "../node_modules/lodash/_overRest.js", "../node_modules/lodash/constant.js", "../node_modules/lodash/_freeGlobal.js", "../node_modules/lodash/_root.js", "../node_modules/lodash/_Symbol.js", "../node_modules/lodash/_getRawTag.js", "../node_modules/lodash/_objectToString.js", "../node_modules/lodash/_baseGetTag.js", "../node_modules/lodash/isObject.js", "../node_modules/lodash/isFunction.js", "../node_modules/lodash/_coreJsData.js", "../node_modules/lodash/_isMasked.js", "../node_modules/lodash/_toSource.js", "../node_modules/lodash/_baseIsNative.js", "../node_modules/lodash/_getValue.js", "../node_modules/lodash/_getNative.js", "../node_modules/lodash/_defineProperty.js", "../node_modules/lodash/_baseSetToString.js", "../node_modules/lodash/_shortOut.js", "../node_modules/lodash/_setToString.js", "../node_modules/lodash/_baseRest.js", "../node_modules/lodash/eq.js", "../node_modules/lodash/isLength.js", "../node_modules/lodash/isArrayLike.js", "../node_modules/lodash/_isIndex.js", "../node_modules/lodash/_isIterateeCall.js", "../node_modules/lodash/_baseTimes.js", "../node_modules/lodash/isObjectLike.js", "../node_modules/lodash/_baseIsArguments.js", "../node_modules/lodash/isArguments.js", "../node_modules/lodash/isArray.js", "../node_modules/lodash/stubFalse.js", "../node_modules/lodash/isBuffer.js", "../node_modules/lodash/_baseIsTypedArray.js", "../node_modules/lodash/_baseUnary.js", "../node_modules/lodash/_nodeUtil.js", "../node_modules/lodash/isTypedArray.js", "../node_modules/lodash/_arrayLikeKeys.js", "../node_modules/lodash/_isPrototype.js", "../node_modules/lodash/_nativeKeysIn.js", "../node_modules/lodash/_baseKeysIn.js", "../node_modules/lodash/keysIn.js", "../node_modules/lodash/defaults.js", "../node_modules/readable-stream/lib/ours/primordials.js", "../node_modules/event-target-shim/src/event.mjs", "../node_modules/event-target-shim/src/event-target.mjs", "../node_modules/abort-controller/src/abort-signal.ts", "../node_modules/abort-controller/src/abort-controller.ts", "../node_modules/readable-stream/lib/ours/util.js", "../node_modules/readable-stream/lib/ours/errors.js", "../node_modules/readable-stream/lib/internal/validators.js", "../node_modules/process/index.js", "../node_modules/readable-stream/lib/internal/streams/utils.js", "../node_modules/readable-stream/lib/internal/streams/end-of-stream.js", "../node_modules/readable-stream/lib/internal/streams/destroy.js", "../node_modules/readable-stream/lib/internal/streams/legacy.js", "../node_modules/readable-stream/lib/internal/streams/add-abort-signal.js", "../node_modules/readable-stream/lib/internal/streams/buffer_list.js", "../node_modules/readable-stream/lib/internal/streams/state.js", "../node_modules/readable-stream/lib/internal/streams/from.js", "../node_modules/readable-stream/lib/internal/streams/readable.js", "../node_modules/readable-stream/lib/internal/streams/writable.js", "../node_modules/readable-stream/lib/internal/streams/duplexify.js", "../node_modules/readable-stream/lib/internal/streams/duplex.js", "../node_modules/readable-stream/lib/internal/streams/transform.js", "../node_modules/readable-stream/lib/internal/streams/passthrough.js", "../node_modules/readable-stream/lib/internal/streams/pipeline.js", "../node_modules/readable-stream/lib/internal/streams/compose.js", "../node_modules/readable-stream/lib/internal/streams/operators.js", "../node_modules/readable-stream/lib/stream/promises.js", "../node_modules/readable-stream/lib/stream.js", "../node_modules/readable-stream/lib/ours/index.js", "../node_modules/lodash/_arrayPush.js", "../node_modules/lodash/_isFlattenable.js", "../node_modules/lodash/_baseFlatten.js", "../node_modules/lodash/flatten.js", "../node_modules/lodash/_nativeCreate.js", "../node_modules/lodash/_hashClear.js", "../node_modules/lodash/_hashDelete.js", "../node_modules/lodash/_hashGet.js", "../node_modules/lodash/_hashHas.js", "../node_modules/lodash/_hashSet.js", "../node_modules/lodash/_Hash.js", "../node_modules/lodash/_listCacheClear.js", "../node_modules/lodash/_assocIndexOf.js", "../node_modules/lodash/_listCacheDelete.js", "../node_modules/lodash/_listCacheGet.js", "../node_modules/lodash/_listCacheHas.js", "../node_modules/lodash/_listCacheSet.js", "../node_modules/lodash/_ListCache.js", "../node_modules/lodash/_Map.js", "../node_modules/lodash/_mapCacheClear.js", "../node_modules/lodash/_isKeyable.js", "../node_modules/lodash/_getMapData.js", "../node_modules/lodash/_mapCacheDelete.js", "../node_modules/lodash/_mapCacheGet.js", "../node_modules/lodash/_mapCacheHas.js", "../node_modules/lodash/_mapCacheSet.js", "../node_modules/lodash/_MapCache.js", "../node_modules/lodash/_setCacheAdd.js", "../node_modules/lodash/_setCacheHas.js", "../node_modules/lodash/_SetCache.js", "../node_modules/lodash/_baseFindIndex.js", "../node_modules/lodash/_baseIsNaN.js", "../node_modules/lodash/_strictIndexOf.js", "../node_modules/lodash/_baseIndexOf.js", "../node_modules/lodash/_arrayIncludes.js", "../node_modules/lodash/_arrayIncludesWith.js", "../node_modules/lodash/_arrayMap.js", "../node_modules/lodash/_cacheHas.js", "../node_modules/lodash/_baseDifference.js", "../node_modules/lodash/isArrayLikeObject.js", "../node_modules/lodash/difference.js", "../node_modules/lodash/_Set.js", "../node_modules/lodash/noop.js", "../node_modules/lodash/_setToArray.js", "../node_modules/lodash/_createSet.js", "../node_modules/lodash/_baseUniq.js", "../node_modules/lodash/union.js", "../node_modules/lodash/_overArg.js", "../node_modules/lodash/_getPrototype.js", "../node_modules/lodash/isPlainObject.js", "../node_modules/minimatch/src/assert-valid-pattern.ts", "../node_modules/minimatch/src/brace-expressions.ts", "../node_modules/minimatch/src/unescape.ts", "../node_modules/minimatch/src/ast.ts", "../node_modules/minimatch/src/escape.ts", "../node_modules/minimatch/src/index.ts", "../node_modules/lru-cache/src/index.ts", "../node_modules/minipass/src/index.ts", "../node_modules/path-scurry/src/index.ts", "../node_modules/glob/src/pattern.ts", "../node_modules/glob/src/ignore.ts", "../node_modules/glob/src/processor.ts", "../node_modules/glob/src/walker.ts", "../node_modules/glob/src/glob.ts", "../node_modules/glob/src/has-magic.ts", "../node_modules/glob/src/index.ts", "../node_modules/archiver-utils/file.js", "../node_modules/archiver-utils/index.js", "../node_modules/archiver/lib/error.js", "../node_modules/archiver/lib/core.js", "../node_modules/compress-commons/lib/archivers/archive-entry.js", "../node_modules/compress-commons/lib/archivers/zip/util.js", "../node_modules/compress-commons/lib/archivers/zip/general-purpose-bit.js", "../node_modules/compress-commons/lib/archivers/zip/unix-stat.js", "../node_modules/compress-commons/lib/archivers/zip/constants.js", "../node_modules/compress-commons/lib/archivers/zip/zip-archive-entry.js", "../node_modules/compress-commons/lib/util/index.js", "../node_modules/compress-commons/lib/archivers/archive-output-stream.js", "../node_modules/crc-32/crc32.js", "../node_modules/crc32-stream/lib/crc32-stream.js", "../node_modules/crc32-stream/lib/deflate-crc32-stream.js", "../node_modules/crc32-stream/lib/index.js", "../node_modules/compress-commons/lib/archivers/zip/zip-archive-output-stream.js", "../node_modules/compress-commons/lib/compress-commons.js", "../node_modules/zip-stream/index.js", "../node_modules/archiver/lib/plugins/zip.js", "../node_modules/queue-tick/queue-microtask.js", "../node_modules/queue-tick/process-next-tick.js", "../node_modules/fast-fifo/fixed-size.js", "../node_modules/fast-fifo/index.js", "../node_modules/streamx/index.js", "../node_modules/b4a/index.js", "../node_modules/tar-stream/headers.js", "../node_modules/tar-stream/extract.js", "../node_modules/tar-stream/constants.js", "../node_modules/tar-stream/pack.js", "../node_modules/tar-stream/index.js", "../node_modules/archiver/lib/plugins/tar.js", "../node_modules/buffer-crc32/dist/index.cjs", "../node_modules/archiver/lib/plugins/json.js", "../node_modules/archiver/index.js", "../node_modules/@actions/artifact/src/internal/upload/zip.ts", "../node_modules/@actions/artifact/src/internal/upload/upload-artifact.ts", "../node_modules/@actions/artifact/node_modules/@actions/github/src/context.ts", "../node_modules/@actions/artifact/node_modules/@actions/github/src/internal/utils.ts", "../node_modules/universal-user-agent/dist-src/index.js", "../node_modules/before-after-hook/lib/register.js", "../node_modules/before-after-hook/lib/add.js", "../node_modules/before-after-hook/lib/remove.js", "../node_modules/before-after-hook/index.js", "../node_modules/is-plain-object/dist/is-plain-object.js", "../node_modules/@octokit/endpoint/dist-src/util/lowercase-keys.js", "../node_modules/@octokit/endpoint/dist-src/util/merge-deep.js", "../node_modules/@octokit/endpoint/dist-src/util/remove-undefined-properties.js", "../node_modules/@octokit/endpoint/dist-src/merge.js", "../node_modules/@octokit/endpoint/dist-src/util/add-query-parameters.js", "../node_modules/@octokit/endpoint/dist-src/util/extract-url-variable-names.js", "../node_modules/@octokit/endpoint/dist-src/util/omit.js", "../node_modules/@octokit/endpoint/dist-src/util/url-template.js", "../node_modules/@octokit/endpoint/dist-src/parse.js", "../node_modules/@octokit/endpoint/dist-src/endpoint-with-defaults.js", "../node_modules/@octokit/endpoint/dist-src/with-defaults.js", "../node_modules/@octokit/endpoint/dist-src/version.js", "../node_modules/@octokit/endpoint/dist-src/defaults.js", "../node_modules/@octokit/endpoint/dist-src/index.js", "../node_modules/deprecation/dist-node/index.js", "../node_modules/wrappy/wrappy.js", "../node_modules/once/once.js", "../node_modules/@octokit/request/node_modules/@octokit/request-error/dist-src/index.js", "../node_modules/@octokit/request/dist-src/version.js", "../node_modules/@octokit/request/dist-src/get-buffer-response.js", "../node_modules/@octokit/request/dist-src/fetch-wrapper.js", "../node_modules/@octokit/request/dist-src/with-defaults.js", "../node_modules/@octokit/request/dist-src/index.js", "../node_modules/@octokit/graphql/dist-src/version.js", "../node_modules/@octokit/graphql/dist-src/error.js", "../node_modules/@octokit/graphql/dist-src/graphql.js", "../node_modules/@octokit/graphql/dist-src/with-defaults.js", "../node_modules/@octokit/graphql/dist-src/index.js", "../node_modules/@octokit/auth-token/dist-src/auth.js", "../node_modules/@octokit/auth-token/dist-src/with-authorization-prefix.js", "../node_modules/@octokit/auth-token/dist-src/hook.js", "../node_modules/@octokit/auth-token/dist-src/index.js", "../node_modules/@octokit/core/dist-src/version.js", "../node_modules/@octokit/core/dist-src/index.js", "../node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js", "../node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js", "../node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js", "../node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js", "../node_modules/@octokit/plugin-paginate-rest/dist-src/version.js", "../node_modules/@octokit/plugin-paginate-rest/dist-src/normalize-paginated-list-response.js", "../node_modules/@octokit/plugin-paginate-rest/dist-src/iterator.js", "../node_modules/@octokit/plugin-paginate-rest/dist-src/paginate.js", "../node_modules/@octokit/plugin-paginate-rest/dist-src/compose-paginate.js", "../node_modules/@octokit/plugin-paginate-rest/dist-src/generated/paginating-endpoints.js", "../node_modules/@octokit/plugin-paginate-rest/dist-src/paginating-endpoints.js", "../node_modules/@octokit/plugin-paginate-rest/dist-src/index.js", "../node_modules/@actions/artifact/node_modules/@actions/github/src/utils.ts", "../node_modules/@actions/artifact/node_modules/@actions/github/src/github.ts", "../node_modules/traverse/index.js", "../node_modules/chainsaw/index.js", "../node_modules/buffers/index.js", "../node_modules/binary/lib/vars.js", "../node_modules/binary/index.js", "../node_modules/unzip-stream/lib/matcher-stream.js", "../node_modules/unzip-stream/lib/entry.js", "../node_modules/unzip-stream/lib/unzip-stream.js", "../node_modules/unzip-stream/lib/parser-stream.js", "../node_modules/mkdirp/index.js", "../node_modules/unzip-stream/lib/extract.js", "../node_modules/unzip-stream/unzip.js", "../node_modules/@actions/artifact/src/internal/download/download-artifact.ts", "../node_modules/@actions/artifact/src/internal/find/retry-options.ts", "../node_modules/@octokit/plugin-request-log/dist-src/version.js", "../node_modules/@octokit/plugin-request-log/dist-src/index.js", "../node_modules/bottleneck/light.js", "../node_modules/@octokit/plugin-retry/dist-src/error-request.js", "../node_modules/@octokit/plugin-retry/dist-src/wrap-request.js", "../node_modules/@octokit/plugin-retry/dist-src/index.js", "../node_modules/@actions/artifact/src/internal/find/get-artifact.ts", "../node_modules/@actions/artifact/src/internal/delete/delete-artifact.ts", "../node_modules/@actions/artifact/src/internal/find/list-artifacts.ts", "../node_modules/@actions/artifact/src/internal/client.ts", "../node_modules/@actions/artifact/lib/internal/shared/interfaces.js", "../node_modules/@actions/artifact/src/artifact.ts", "../node_modules/@actions/github/src/context.ts", "../node_modules/@actions/github/src/internal/utils.ts", "../node_modules/@actions/github/node_modules/@octokit/endpoint/dist-node/index.js", "../node_modules/@octokit/request-error/dist-node/index.js", "../node_modules/@actions/github/node_modules/@octokit/request/dist-node/index.js", "../node_modules/@actions/github/node_modules/@octokit/graphql/dist-node/index.js", "../node_modules/@actions/github/node_modules/@octokit/auth-token/dist-node/index.js", "../node_modules/@actions/github/node_modules/@octokit/core/dist-node/index.js", "../node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-node/index.js", "../node_modules/@actions/github/node_modules/@octokit/plugin-paginate-rest/dist-node/index.js", "../node_modules/@actions/github/src/utils.ts", "../node_modules/@actions/github/src/github.ts", "../src/main.ts"], "sourcesContent": [null, null, "import crypto from 'crypto';\nconst rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate\n\nlet poolPtr = rnds8Pool.length;\nexport default function rng() {\n if (poolPtr > rnds8Pool.length - 16) {\n crypto.randomFillSync(rnds8Pool);\n poolPtr = 0;\n }\n\n return rnds8Pool.slice(poolPtr, poolPtr += 16);\n}", "export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;", "import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;", "import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nconst byteToHex = [];\n\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr, offset = 0) {\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;", "import rng from './rng.js';\nimport stringify from './stringify.js'; // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nlet _nodeId;\n\nlet _clockseq; // Previous uuid creation time\n\n\nlet _lastMSecs = 0;\nlet _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n let i = buf && offset || 0;\n const b = buf || new Array(16);\n options = options || {};\n let node = options.node || _nodeId;\n let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n const seedBytes = options.random || (options.rng || rng)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n const tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (let n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || stringify(b);\n}\n\nexport default v1;", "import validate from './validate.js';\n\nfunction parse(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n let v;\n const arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nexport default parse;", "import stringify from './stringify.js';\nimport parse from './parse.js';\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n const bytes = [];\n\n for (let i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nexport const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexport const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexport default function (name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = parse(namespace);\n }\n\n if (namespace.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n let bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return stringify(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}", "import crypto from 'crypto';\n\nfunction md5(bytes) {\n if (Array.isArray(bytes)) {\n bytes = Buffer.from(bytes);\n } else if (typeof bytes === 'string') {\n bytes = Buffer.from(bytes, 'utf8');\n }\n\n return crypto.createHash('md5').update(bytes).digest();\n}\n\nexport default md5;", "import v35 from './v35.js';\nimport md5 from './md5.js';\nconst v3 = v35('v3', 0x30, md5);\nexport default v3;", "import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;", "import crypto from 'crypto';\n\nfunction sha1(bytes) {\n if (Array.isArray(bytes)) {\n bytes = Buffer.from(bytes);\n } else if (typeof bytes === 'string') {\n bytes = Buffer.from(bytes, 'utf8');\n }\n\n return crypto.createHash('sha1').update(bytes).digest();\n}\n\nexport default sha1;", "import v35 from './v35.js';\nimport sha1 from './sha1.js';\nconst v5 = v35('v5', 0x50, sha1);\nexport default v5;", "export default '00000000-0000-0000-0000-000000000000';", "import validate from './validate.js';\n\nfunction version(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.substr(14, 1), 16);\n}\n\nexport default version;", "export { default as v1 } from './v1.js';\nexport { default as v3 } from './v3.js';\nexport { default as v4 } from './v4.js';\nexport { default as v5 } from './v5.js';\nexport { default as NIL } from './nil.js';\nexport { default as version } from './version.js';\nexport { default as validate } from './validate.js';\nexport { default as stringify } from './stringify.js';\nexport { default as parse } from './parse.js';", null, null, "'use strict';\n\nvar net = require('net');\nvar tls = require('tls');\nvar http = require('http');\nvar https = require('https');\nvar events = require('events');\nvar assert = require('assert');\nvar util = require('util');\n\n\nexports.httpOverHttp = httpOverHttp;\nexports.httpsOverHttp = httpsOverHttp;\nexports.httpOverHttps = httpOverHttps;\nexports.httpsOverHttps = httpsOverHttps;\n\n\nfunction httpOverHttp(options) {\n var agent = new TunnelingAgent(options);\n agent.request = http.request;\n return agent;\n}\n\nfunction httpsOverHttp(options) {\n var agent = new TunnelingAgent(options);\n agent.request = http.request;\n agent.createSocket = createSecureSocket;\n agent.defaultPort = 443;\n return agent;\n}\n\nfunction httpOverHttps(options) {\n var agent = new TunnelingAgent(options);\n agent.request = https.request;\n return agent;\n}\n\nfunction httpsOverHttps(options) {\n var agent = new TunnelingAgent(options);\n agent.request = https.request;\n agent.createSocket = createSecureSocket;\n agent.defaultPort = 443;\n return agent;\n}\n\n\nfunction TunnelingAgent(options) {\n var self = this;\n self.options = options || {};\n self.proxyOptions = self.options.proxy || {};\n self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets;\n self.requests = [];\n self.sockets = [];\n\n self.on('free', function onFree(socket, host, port, localAddress) {\n var options = toOptions(host, port, localAddress);\n for (var i = 0, len = self.requests.length; i < len; ++i) {\n var pending = self.requests[i];\n if (pending.host === options.host && pending.port === options.port) {\n // Detect the request to connect same origin server,\n // reuse the connection.\n self.requests.splice(i, 1);\n pending.request.onSocket(socket);\n return;\n }\n }\n socket.destroy();\n self.removeSocket(socket);\n });\n}\nutil.inherits(TunnelingAgent, events.EventEmitter);\n\nTunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) {\n var self = this;\n var options = mergeOptions({request: req}, self.options, toOptions(host, port, localAddress));\n\n if (self.sockets.length >= this.maxSockets) {\n // We are over limit so we'll add it to the queue.\n self.requests.push(options);\n return;\n }\n\n // If we are under maxSockets create a new one.\n self.createSocket(options, function(socket) {\n socket.on('free', onFree);\n socket.on('close', onCloseOrRemove);\n socket.on('agentRemove', onCloseOrRemove);\n req.onSocket(socket);\n\n function onFree() {\n self.emit('free', socket, options);\n }\n\n function onCloseOrRemove(err) {\n self.removeSocket(socket);\n socket.removeListener('free', onFree);\n socket.removeListener('close', onCloseOrRemove);\n socket.removeListener('agentRemove', onCloseOrRemove);\n }\n });\n};\n\nTunnelingAgent.prototype.createSocket = function createSocket(options, cb) {\n var self = this;\n var placeholder = {};\n self.sockets.push(placeholder);\n\n var connectOptions = mergeOptions({}, self.proxyOptions, {\n method: 'CONNECT',\n path: options.host + ':' + options.port,\n agent: false,\n headers: {\n host: options.host + ':' + options.port\n }\n });\n if (options.localAddress) {\n connectOptions.localAddress = options.localAddress;\n }\n if (connectOptions.proxyAuth) {\n connectOptions.headers = connectOptions.headers || {};\n connectOptions.headers['Proxy-Authorization'] = 'Basic ' +\n new Buffer(connectOptions.proxyAuth).toString('base64');\n }\n\n debug('making CONNECT request');\n var connectReq = self.request(connectOptions);\n connectReq.useChunkedEncodingByDefault = false; // for v0.6\n connectReq.once('response', onResponse); // for v0.6\n connectReq.once('upgrade', onUpgrade); // for v0.6\n connectReq.once('connect', onConnect); // for v0.7 or later\n connectReq.once('error', onError);\n connectReq.end();\n\n function onResponse(res) {\n // Very hacky. This is necessary to avoid http-parser leaks.\n res.upgrade = true;\n }\n\n function onUpgrade(res, socket, head) {\n // Hacky.\n process.nextTick(function() {\n onConnect(res, socket, head);\n });\n }\n\n function onConnect(res, socket, head) {\n connectReq.removeAllListeners();\n socket.removeAllListeners();\n\n if (res.statusCode !== 200) {\n debug('tunneling socket could not be established, statusCode=%d',\n res.statusCode);\n socket.destroy();\n var error = new Error('tunneling socket could not be established, ' +\n 'statusCode=' + res.statusCode);\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n return;\n }\n if (head.length > 0) {\n debug('got illegal response body from proxy');\n socket.destroy();\n var error = new Error('got illegal response body from proxy');\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n return;\n }\n debug('tunneling connection has established');\n self.sockets[self.sockets.indexOf(placeholder)] = socket;\n return cb(socket);\n }\n\n function onError(cause) {\n connectReq.removeAllListeners();\n\n debug('tunneling socket could not be established, cause=%s\\n',\n cause.message, cause.stack);\n var error = new Error('tunneling socket could not be established, ' +\n 'cause=' + cause.message);\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n }\n};\n\nTunnelingAgent.prototype.removeSocket = function removeSocket(socket) {\n var pos = this.sockets.indexOf(socket)\n if (pos === -1) {\n return;\n }\n this.sockets.splice(pos, 1);\n\n var pending = this.requests.shift();\n if (pending) {\n // If we have pending requests and a socket gets closed a new one\n // needs to be created to take over in the pool for the one that closed.\n this.createSocket(pending, function(socket) {\n pending.request.onSocket(socket);\n });\n }\n};\n\nfunction createSecureSocket(options, cb) {\n var self = this;\n TunnelingAgent.prototype.createSocket.call(self, options, function(socket) {\n var hostHeader = options.request.getHeader('host');\n var tlsOptions = mergeOptions({}, self.options, {\n socket: socket,\n servername: hostHeader ? hostHeader.replace(/:.*$/, '') : options.host\n });\n\n // 0 is dummy port for v0.6\n var secureSocket = tls.connect(0, tlsOptions);\n self.sockets[self.sockets.indexOf(socket)] = secureSocket;\n cb(secureSocket);\n });\n}\n\n\nfunction toOptions(host, port, localAddress) {\n if (typeof host === 'string') { // since v0.10\n return {\n host: host,\n port: port,\n localAddress: localAddress\n };\n }\n return host; // for v0.11 or later\n}\n\nfunction mergeOptions(target) {\n for (var i = 1, len = arguments.length; i < len; ++i) {\n var overrides = arguments[i];\n if (typeof overrides === 'object') {\n var keys = Object.keys(overrides);\n for (var j = 0, keyLen = keys.length; j < keyLen; ++j) {\n var k = keys[j];\n if (overrides[k] !== undefined) {\n target[k] = overrides[k];\n }\n }\n }\n }\n return target;\n}\n\n\nvar debug;\nif (process.env.NODE_DEBUG && /\\btunnel\\b/.test(process.env.NODE_DEBUG)) {\n debug = function() {\n var args = Array.prototype.slice.call(arguments);\n if (typeof args[0] === 'string') {\n args[0] = 'TUNNEL: ' + args[0];\n } else {\n args.unshift('TUNNEL:');\n }\n console.error.apply(console, args);\n }\n} else {\n debug = function() {};\n}\nexports.debug = debug; // for test\n", "module.exports = require('./lib/tunnel');\n", "module.exports = {\n kClose: Symbol('close'),\n kDestroy: Symbol('destroy'),\n kDispatch: Symbol('dispatch'),\n kUrl: Symbol('url'),\n kWriting: Symbol('writing'),\n kResuming: Symbol('resuming'),\n kQueue: Symbol('queue'),\n kConnect: Symbol('connect'),\n kConnecting: Symbol('connecting'),\n kHeadersList: Symbol('headers list'),\n kKeepAliveDefaultTimeout: Symbol('default keep alive timeout'),\n kKeepAliveMaxTimeout: Symbol('max keep alive timeout'),\n kKeepAliveTimeoutThreshold: Symbol('keep alive timeout threshold'),\n kKeepAliveTimeoutValue: Symbol('keep alive timeout'),\n kKeepAlive: Symbol('keep alive'),\n kHeadersTimeout: Symbol('headers timeout'),\n kBodyTimeout: Symbol('body timeout'),\n kServerName: Symbol('server name'),\n kLocalAddress: Symbol('local address'),\n kHost: Symbol('host'),\n kNoRef: Symbol('no ref'),\n kBodyUsed: Symbol('used'),\n kRunning: Symbol('running'),\n kBlocking: Symbol('blocking'),\n kPending: Symbol('pending'),\n kSize: Symbol('size'),\n kBusy: Symbol('busy'),\n kQueued: Symbol('queued'),\n kFree: Symbol('free'),\n kConnected: Symbol('connected'),\n kClosed: Symbol('closed'),\n kNeedDrain: Symbol('need drain'),\n kReset: Symbol('reset'),\n kDestroyed: Symbol.for('nodejs.stream.destroyed'),\n kMaxHeadersSize: Symbol('max headers size'),\n kRunningIdx: Symbol('running index'),\n kPendingIdx: Symbol('pending index'),\n kError: Symbol('error'),\n kClients: Symbol('clients'),\n kClient: Symbol('client'),\n kParser: Symbol('parser'),\n kOnDestroyed: Symbol('destroy callbacks'),\n kPipelining: Symbol('pipelining'),\n kSocket: Symbol('socket'),\n kHostHeader: Symbol('host header'),\n kConnector: Symbol('connector'),\n kStrictContentLength: Symbol('strict content length'),\n kMaxRedirections: Symbol('maxRedirections'),\n kMaxRequests: Symbol('maxRequestsPerClient'),\n kProxy: Symbol('proxy agent options'),\n kCounter: Symbol('socket request counter'),\n kInterceptors: Symbol('dispatch interceptors'),\n kMaxResponseSize: Symbol('max response size'),\n kHTTP2Session: Symbol('http2Session'),\n kHTTP2SessionState: Symbol('http2Session state'),\n kHTTP2BuildRequest: Symbol('http2 build request'),\n kHTTP1BuildRequest: Symbol('http1 build request'),\n kHTTP2CopyHeaders: Symbol('http2 copy headers'),\n kHTTPConnVersion: Symbol('http connection version'),\n kRetryHandlerDefaultRetry: Symbol('retry agent default retry'),\n kConstruct: Symbol('constructable')\n}\n", "'use strict'\n\nclass UndiciError extends Error {\n constructor (message) {\n super(message)\n this.name = 'UndiciError'\n this.code = 'UND_ERR'\n }\n}\n\nclass ConnectTimeoutError extends UndiciError {\n constructor (message) {\n super(message)\n Error.captureStackTrace(this, ConnectTimeoutError)\n this.name = 'ConnectTimeoutError'\n this.message = message || 'Connect Timeout Error'\n this.code = 'UND_ERR_CONNECT_TIMEOUT'\n }\n}\n\nclass HeadersTimeoutError extends UndiciError {\n constructor (message) {\n super(message)\n Error.captureStackTrace(this, HeadersTimeoutError)\n this.name = 'HeadersTimeoutError'\n this.message = message || 'Headers Timeout Error'\n this.code = 'UND_ERR_HEADERS_TIMEOUT'\n }\n}\n\nclass HeadersOverflowError extends UndiciError {\n constructor (message) {\n super(message)\n Error.captureStackTrace(this, HeadersOverflowError)\n this.name = 'HeadersOverflowError'\n this.message = message || 'Headers Overflow Error'\n this.code = 'UND_ERR_HEADERS_OVERFLOW'\n }\n}\n\nclass BodyTimeoutError extends UndiciError {\n constructor (message) {\n super(message)\n Error.captureStackTrace(this, BodyTimeoutError)\n this.name = 'BodyTimeoutError'\n this.message = message || 'Body Timeout Error'\n this.code = 'UND_ERR_BODY_TIMEOUT'\n }\n}\n\nclass ResponseStatusCodeError extends UndiciError {\n constructor (message, statusCode, headers, body) {\n super(message)\n Error.captureStackTrace(this, ResponseStatusCodeError)\n this.name = 'ResponseStatusCodeError'\n this.message = message || 'Response Status Code Error'\n this.code = 'UND_ERR_RESPONSE_STATUS_CODE'\n this.body = body\n this.status = statusCode\n this.statusCode = statusCode\n this.headers = headers\n }\n}\n\nclass InvalidArgumentError extends UndiciError {\n constructor (message) {\n super(message)\n Error.captureStackTrace(this, InvalidArgumentError)\n this.name = 'InvalidArgumentError'\n this.message = message || 'Invalid Argument Error'\n this.code = 'UND_ERR_INVALID_ARG'\n }\n}\n\nclass InvalidReturnValueError extends UndiciError {\n constructor (message) {\n super(message)\n Error.captureStackTrace(this, InvalidReturnValueError)\n this.name = 'InvalidReturnValueError'\n this.message = message || 'Invalid Return Value Error'\n this.code = 'UND_ERR_INVALID_RETURN_VALUE'\n }\n}\n\nclass RequestAbortedError extends UndiciError {\n constructor (message) {\n super(message)\n Error.captureStackTrace(this, RequestAbortedError)\n this.name = 'AbortError'\n this.message = message || 'Request aborted'\n this.code = 'UND_ERR_ABORTED'\n }\n}\n\nclass InformationalError extends UndiciError {\n constructor (message) {\n super(message)\n Error.captureStackTrace(this, InformationalError)\n this.name = 'InformationalError'\n this.message = message || 'Request information'\n this.code = 'UND_ERR_INFO'\n }\n}\n\nclass RequestContentLengthMismatchError extends UndiciError {\n constructor (message) {\n super(message)\n Error.captureStackTrace(this, RequestContentLengthMismatchError)\n this.name = 'RequestContentLengthMismatchError'\n this.message = message || 'Request body length does not match content-length header'\n this.code = 'UND_ERR_REQ_CONTENT_LENGTH_MISMATCH'\n }\n}\n\nclass ResponseContentLengthMismatchError extends UndiciError {\n constructor (message) {\n super(message)\n Error.captureStackTrace(this, ResponseContentLengthMismatchError)\n this.name = 'ResponseContentLengthMismatchError'\n this.message = message || 'Response body length does not match content-length header'\n this.code = 'UND_ERR_RES_CONTENT_LENGTH_MISMATCH'\n }\n}\n\nclass ClientDestroyedError extends UndiciError {\n constructor (message) {\n super(message)\n Error.captureStackTrace(this, ClientDestroyedError)\n this.name = 'ClientDestroyedError'\n this.message = message || 'The client is destroyed'\n this.code = 'UND_ERR_DESTROYED'\n }\n}\n\nclass ClientClosedError extends UndiciError {\n constructor (message) {\n super(message)\n Error.captureStackTrace(this, ClientClosedError)\n this.name = 'ClientClosedError'\n this.message = message || 'The client is closed'\n this.code = 'UND_ERR_CLOSED'\n }\n}\n\nclass SocketError extends UndiciError {\n constructor (message, socket) {\n super(message)\n Error.captureStackTrace(this, SocketError)\n this.name = 'SocketError'\n this.message = message || 'Socket error'\n this.code = 'UND_ERR_SOCKET'\n this.socket = socket\n }\n}\n\nclass NotSupportedError extends UndiciError {\n constructor (message) {\n super(message)\n Error.captureStackTrace(this, NotSupportedError)\n this.name = 'NotSupportedError'\n this.message = message || 'Not supported error'\n this.code = 'UND_ERR_NOT_SUPPORTED'\n }\n}\n\nclass BalancedPoolMissingUpstreamError extends UndiciError {\n constructor (message) {\n super(message)\n Error.captureStackTrace(this, NotSupportedError)\n this.name = 'MissingUpstreamError'\n this.message = message || 'No upstream has been added to the BalancedPool'\n this.code = 'UND_ERR_BPL_MISSING_UPSTREAM'\n }\n}\n\nclass HTTPParserError extends Error {\n constructor (message, code, data) {\n super(message)\n Error.captureStackTrace(this, HTTPParserError)\n this.name = 'HTTPParserError'\n this.code = code ? `HPE_${code}` : undefined\n this.data = data ? data.toString() : undefined\n }\n}\n\nclass ResponseExceededMaxSizeError extends UndiciError {\n constructor (message) {\n super(message)\n Error.captureStackTrace(this, ResponseExceededMaxSizeError)\n this.name = 'ResponseExceededMaxSizeError'\n this.message = message || 'Response content exceeded max size'\n this.code = 'UND_ERR_RES_EXCEEDED_MAX_SIZE'\n }\n}\n\nclass RequestRetryError extends UndiciError {\n constructor (message, code, { headers, data }) {\n super(message)\n Error.captureStackTrace(this, RequestRetryError)\n this.name = 'RequestRetryError'\n this.message = message || 'Request retry error'\n this.code = 'UND_ERR_REQ_RETRY'\n this.statusCode = code\n this.data = data\n this.headers = headers\n }\n}\n\nmodule.exports = {\n HTTPParserError,\n UndiciError,\n HeadersTimeoutError,\n HeadersOverflowError,\n BodyTimeoutError,\n RequestContentLengthMismatchError,\n ConnectTimeoutError,\n ResponseStatusCodeError,\n InvalidArgumentError,\n InvalidReturnValueError,\n RequestAbortedError,\n ClientDestroyedError,\n ClientClosedError,\n InformationalError,\n SocketError,\n NotSupportedError,\n ResponseContentLengthMismatchError,\n BalancedPoolMissingUpstreamError,\n ResponseExceededMaxSizeError,\n RequestRetryError\n}\n", "'use strict'\n\n/** @type {Record} */\nconst headerNameLowerCasedRecord = {}\n\n// https://developer.mozilla.org/docs/Web/HTTP/Headers\nconst wellknownHeaderNames = [\n 'Accept',\n 'Accept-Encoding',\n 'Accept-Language',\n 'Accept-Ranges',\n 'Access-Control-Allow-Credentials',\n 'Access-Control-Allow-Headers',\n 'Access-Control-Allow-Methods',\n 'Access-Control-Allow-Origin',\n 'Access-Control-Expose-Headers',\n 'Access-Control-Max-Age',\n 'Access-Control-Request-Headers',\n 'Access-Control-Request-Method',\n 'Age',\n 'Allow',\n 'Alt-Svc',\n 'Alt-Used',\n 'Authorization',\n 'Cache-Control',\n 'Clear-Site-Data',\n 'Connection',\n 'Content-Disposition',\n 'Content-Encoding',\n 'Content-Language',\n 'Content-Length',\n 'Content-Location',\n 'Content-Range',\n 'Content-Security-Policy',\n 'Content-Security-Policy-Report-Only',\n 'Content-Type',\n 'Cookie',\n 'Cross-Origin-Embedder-Policy',\n 'Cross-Origin-Opener-Policy',\n 'Cross-Origin-Resource-Policy',\n 'Date',\n 'Device-Memory',\n 'Downlink',\n 'ECT',\n 'ETag',\n 'Expect',\n 'Expect-CT',\n 'Expires',\n 'Forwarded',\n 'From',\n 'Host',\n 'If-Match',\n 'If-Modified-Since',\n 'If-None-Match',\n 'If-Range',\n 'If-Unmodified-Since',\n 'Keep-Alive',\n 'Last-Modified',\n 'Link',\n 'Location',\n 'Max-Forwards',\n 'Origin',\n 'Permissions-Policy',\n 'Pragma',\n 'Proxy-Authenticate',\n 'Proxy-Authorization',\n 'RTT',\n 'Range',\n 'Referer',\n 'Referrer-Policy',\n 'Refresh',\n 'Retry-After',\n 'Sec-WebSocket-Accept',\n 'Sec-WebSocket-Extensions',\n 'Sec-WebSocket-Key',\n 'Sec-WebSocket-Protocol',\n 'Sec-WebSocket-Version',\n 'Server',\n 'Server-Timing',\n 'Service-Worker-Allowed',\n 'Service-Worker-Navigation-Preload',\n 'Set-Cookie',\n 'SourceMap',\n 'Strict-Transport-Security',\n 'Supports-Loading-Mode',\n 'TE',\n 'Timing-Allow-Origin',\n 'Trailer',\n 'Transfer-Encoding',\n 'Upgrade',\n 'Upgrade-Insecure-Requests',\n 'User-Agent',\n 'Vary',\n 'Via',\n 'WWW-Authenticate',\n 'X-Content-Type-Options',\n 'X-DNS-Prefetch-Control',\n 'X-Frame-Options',\n 'X-Permitted-Cross-Domain-Policies',\n 'X-Powered-By',\n 'X-Requested-With',\n 'X-XSS-Protection'\n]\n\nfor (let i = 0; i < wellknownHeaderNames.length; ++i) {\n const key = wellknownHeaderNames[i]\n const lowerCasedKey = key.toLowerCase()\n headerNameLowerCasedRecord[key] = headerNameLowerCasedRecord[lowerCasedKey] =\n lowerCasedKey\n}\n\n// Note: object prototypes should not be able to be referenced. e.g. `Object#hasOwnProperty`.\nObject.setPrototypeOf(headerNameLowerCasedRecord, null)\n\nmodule.exports = {\n wellknownHeaderNames,\n headerNameLowerCasedRecord\n}\n", "'use strict'\n\nconst assert = require('assert')\nconst { kDestroyed, kBodyUsed } = require('./symbols')\nconst { IncomingMessage } = require('http')\nconst stream = require('stream')\nconst net = require('net')\nconst { InvalidArgumentError } = require('./errors')\nconst { Blob } = require('buffer')\nconst nodeUtil = require('util')\nconst { stringify } = require('querystring')\nconst { headerNameLowerCasedRecord } = require('./constants')\n\nconst [nodeMajor, nodeMinor] = process.versions.node.split('.').map(v => Number(v))\n\nfunction nop () {}\n\nfunction isStream (obj) {\n return obj && typeof obj === 'object' && typeof obj.pipe === 'function' && typeof obj.on === 'function'\n}\n\n// based on https://github.com/node-fetch/fetch-blob/blob/8ab587d34080de94140b54f07168451e7d0b655e/index.js#L229-L241 (MIT License)\nfunction isBlobLike (object) {\n return (Blob && object instanceof Blob) || (\n object &&\n typeof object === 'object' &&\n (typeof object.stream === 'function' ||\n typeof object.arrayBuffer === 'function') &&\n /^(Blob|File)$/.test(object[Symbol.toStringTag])\n )\n}\n\nfunction buildURL (url, queryParams) {\n if (url.includes('?') || url.includes('#')) {\n throw new Error('Query params cannot be passed when url already contains \"?\" or \"#\".')\n }\n\n const stringified = stringify(queryParams)\n\n if (stringified) {\n url += '?' + stringified\n }\n\n return url\n}\n\nfunction parseURL (url) {\n if (typeof url === 'string') {\n url = new URL(url)\n\n if (!/^https?:/.test(url.origin || url.protocol)) {\n throw new InvalidArgumentError('Invalid URL protocol: the URL must start with `http:` or `https:`.')\n }\n\n return url\n }\n\n if (!url || typeof url !== 'object') {\n throw new InvalidArgumentError('Invalid URL: The URL argument must be a non-null object.')\n }\n\n if (!/^https?:/.test(url.origin || url.protocol)) {\n throw new InvalidArgumentError('Invalid URL protocol: the URL must start with `http:` or `https:`.')\n }\n\n if (!(url instanceof URL)) {\n if (url.port != null && url.port !== '' && !Number.isFinite(parseInt(url.port))) {\n throw new InvalidArgumentError('Invalid URL: port must be a valid integer or a string representation of an integer.')\n }\n\n if (url.path != null && typeof url.path !== 'string') {\n throw new InvalidArgumentError('Invalid URL path: the path must be a string or null/undefined.')\n }\n\n if (url.pathname != null && typeof url.pathname !== 'string') {\n throw new InvalidArgumentError('Invalid URL pathname: the pathname must be a string or null/undefined.')\n }\n\n if (url.hostname != null && typeof url.hostname !== 'string') {\n throw new InvalidArgumentError('Invalid URL hostname: the hostname must be a string or null/undefined.')\n }\n\n if (url.origin != null && typeof url.origin !== 'string') {\n throw new InvalidArgumentError('Invalid URL origin: the origin must be a string or null/undefined.')\n }\n\n const port = url.port != null\n ? url.port\n : (url.protocol === 'https:' ? 443 : 80)\n let origin = url.origin != null\n ? url.origin\n : `${url.protocol}//${url.hostname}:${port}`\n let path = url.path != null\n ? url.path\n : `${url.pathname || ''}${url.search || ''}`\n\n if (origin.endsWith('/')) {\n origin = origin.substring(0, origin.length - 1)\n }\n\n if (path && !path.startsWith('/')) {\n path = `/${path}`\n }\n // new URL(path, origin) is unsafe when `path` contains an absolute URL\n // From https://developer.mozilla.org/en-US/docs/Web/API/URL/URL:\n // If first parameter is a relative URL, second param is required, and will be used as the base URL.\n // If first parameter is an absolute URL, a given second param will be ignored.\n url = new URL(origin + path)\n }\n\n return url\n}\n\nfunction parseOrigin (url) {\n url = parseURL(url)\n\n if (url.pathname !== '/' || url.search || url.hash) {\n throw new InvalidArgumentError('invalid url')\n }\n\n return url\n}\n\nfunction getHostname (host) {\n if (host[0] === '[') {\n const idx = host.indexOf(']')\n\n assert(idx !== -1)\n return host.substring(1, idx)\n }\n\n const idx = host.indexOf(':')\n if (idx === -1) return host\n\n return host.substring(0, idx)\n}\n\n// IP addresses are not valid server names per RFC6066\n// > Currently, the only server names supported are DNS hostnames\nfunction getServerName (host) {\n if (!host) {\n return null\n }\n\n assert.strictEqual(typeof host, 'string')\n\n const servername = getHostname(host)\n if (net.isIP(servername)) {\n return ''\n }\n\n return servername\n}\n\nfunction deepClone (obj) {\n return JSON.parse(JSON.stringify(obj))\n}\n\nfunction isAsyncIterable (obj) {\n return !!(obj != null && typeof obj[Symbol.asyncIterator] === 'function')\n}\n\nfunction isIterable (obj) {\n return !!(obj != null && (typeof obj[Symbol.iterator] === 'function' || typeof obj[Symbol.asyncIterator] === 'function'))\n}\n\nfunction bodyLength (body) {\n if (body == null) {\n return 0\n } else if (isStream(body)) {\n const state = body._readableState\n return state && state.objectMode === false && state.ended === true && Number.isFinite(state.length)\n ? state.length\n : null\n } else if (isBlobLike(body)) {\n return body.size != null ? body.size : null\n } else if (isBuffer(body)) {\n return body.byteLength\n }\n\n return null\n}\n\nfunction isDestroyed (stream) {\n return !stream || !!(stream.destroyed || stream[kDestroyed])\n}\n\nfunction isReadableAborted (stream) {\n const state = stream && stream._readableState\n return isDestroyed(stream) && state && !state.endEmitted\n}\n\nfunction destroy (stream, err) {\n if (stream == null || !isStream(stream) || isDestroyed(stream)) {\n return\n }\n\n if (typeof stream.destroy === 'function') {\n if (Object.getPrototypeOf(stream).constructor === IncomingMessage) {\n // See: https://github.com/nodejs/node/pull/38505/files\n stream.socket = null\n }\n\n stream.destroy(err)\n } else if (err) {\n process.nextTick((stream, err) => {\n stream.emit('error', err)\n }, stream, err)\n }\n\n if (stream.destroyed !== true) {\n stream[kDestroyed] = true\n }\n}\n\nconst KEEPALIVE_TIMEOUT_EXPR = /timeout=(\\d+)/\nfunction parseKeepAliveTimeout (val) {\n const m = val.toString().match(KEEPALIVE_TIMEOUT_EXPR)\n return m ? parseInt(m[1], 10) * 1000 : null\n}\n\n/**\n * Retrieves a header name and returns its lowercase value.\n * @param {string | Buffer} value Header name\n * @returns {string}\n */\nfunction headerNameToString (value) {\n return headerNameLowerCasedRecord[value] || value.toLowerCase()\n}\n\nfunction parseHeaders (headers, obj = {}) {\n // For H2 support\n if (!Array.isArray(headers)) return headers\n\n for (let i = 0; i < headers.length; i += 2) {\n const key = headers[i].toString().toLowerCase()\n let val = obj[key]\n\n if (!val) {\n if (Array.isArray(headers[i + 1])) {\n obj[key] = headers[i + 1].map(x => x.toString('utf8'))\n } else {\n obj[key] = headers[i + 1].toString('utf8')\n }\n } else {\n if (!Array.isArray(val)) {\n val = [val]\n obj[key] = val\n }\n val.push(headers[i + 1].toString('utf8'))\n }\n }\n\n // See https://github.com/nodejs/node/pull/46528\n if ('content-length' in obj && 'content-disposition' in obj) {\n obj['content-disposition'] = Buffer.from(obj['content-disposition']).toString('latin1')\n }\n\n return obj\n}\n\nfunction parseRawHeaders (headers) {\n const ret = []\n let hasContentLength = false\n let contentDispositionIdx = -1\n\n for (let n = 0; n < headers.length; n += 2) {\n const key = headers[n + 0].toString()\n const val = headers[n + 1].toString('utf8')\n\n if (key.length === 14 && (key === 'content-length' || key.toLowerCase() === 'content-length')) {\n ret.push(key, val)\n hasContentLength = true\n } else if (key.length === 19 && (key === 'content-disposition' || key.toLowerCase() === 'content-disposition')) {\n contentDispositionIdx = ret.push(key, val) - 1\n } else {\n ret.push(key, val)\n }\n }\n\n // See https://github.com/nodejs/node/pull/46528\n if (hasContentLength && contentDispositionIdx !== -1) {\n ret[contentDispositionIdx] = Buffer.from(ret[contentDispositionIdx]).toString('latin1')\n }\n\n return ret\n}\n\nfunction isBuffer (buffer) {\n // See, https://github.com/mcollina/undici/pull/319\n return buffer instanceof Uint8Array || Buffer.isBuffer(buffer)\n}\n\nfunction validateHandler (handler, method, upgrade) {\n if (!handler || typeof handler !== 'object') {\n throw new InvalidArgumentError('handler must be an object')\n }\n\n if (typeof handler.onConnect !== 'function') {\n throw new InvalidArgumentError('invalid onConnect method')\n }\n\n if (typeof handler.onError !== 'function') {\n throw new InvalidArgumentError('invalid onError method')\n }\n\n if (typeof handler.onBodySent !== 'function' && handler.onBodySent !== undefined) {\n throw new InvalidArgumentError('invalid onBodySent method')\n }\n\n if (upgrade || method === 'CONNECT') {\n if (typeof handler.onUpgrade !== 'function') {\n throw new InvalidArgumentError('invalid onUpgrade method')\n }\n } else {\n if (typeof handler.onHeaders !== 'function') {\n throw new InvalidArgumentError('invalid onHeaders method')\n }\n\n if (typeof handler.onData !== 'function') {\n throw new InvalidArgumentError('invalid onData method')\n }\n\n if (typeof handler.onComplete !== 'function') {\n throw new InvalidArgumentError('invalid onComplete method')\n }\n }\n}\n\n// A body is disturbed if it has been read from and it cannot\n// be re-used without losing state or data.\nfunction isDisturbed (body) {\n return !!(body && (\n stream.isDisturbed\n ? stream.isDisturbed(body) || body[kBodyUsed] // TODO (fix): Why is body[kBodyUsed] needed?\n : body[kBodyUsed] ||\n body.readableDidRead ||\n (body._readableState && body._readableState.dataEmitted) ||\n isReadableAborted(body)\n ))\n}\n\nfunction isErrored (body) {\n return !!(body && (\n stream.isErrored\n ? stream.isErrored(body)\n : /state: 'errored'/.test(nodeUtil.inspect(body)\n )))\n}\n\nfunction isReadable (body) {\n return !!(body && (\n stream.isReadable\n ? stream.isReadable(body)\n : /state: 'readable'/.test(nodeUtil.inspect(body)\n )))\n}\n\nfunction getSocketInfo (socket) {\n return {\n localAddress: socket.localAddress,\n localPort: socket.localPort,\n remoteAddress: socket.remoteAddress,\n remotePort: socket.remotePort,\n remoteFamily: socket.remoteFamily,\n timeout: socket.timeout,\n bytesWritten: socket.bytesWritten,\n bytesRead: socket.bytesRead\n }\n}\n\nasync function * convertIterableToBuffer (iterable) {\n for await (const chunk of iterable) {\n yield Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk)\n }\n}\n\nlet ReadableStream\nfunction ReadableStreamFrom (iterable) {\n if (!ReadableStream) {\n ReadableStream = require('stream/web').ReadableStream\n }\n\n if (ReadableStream.from) {\n return ReadableStream.from(convertIterableToBuffer(iterable))\n }\n\n let iterator\n return new ReadableStream(\n {\n async start () {\n iterator = iterable[Symbol.asyncIterator]()\n },\n async pull (controller) {\n const { done, value } = await iterator.next()\n if (done) {\n queueMicrotask(() => {\n controller.close()\n })\n } else {\n const buf = Buffer.isBuffer(value) ? value : Buffer.from(value)\n controller.enqueue(new Uint8Array(buf))\n }\n return controller.desiredSize > 0\n },\n async cancel (reason) {\n await iterator.return()\n }\n },\n 0\n )\n}\n\n// The chunk should be a FormData instance and contains\n// all the required methods.\nfunction isFormDataLike (object) {\n return (\n object &&\n typeof object === 'object' &&\n typeof object.append === 'function' &&\n typeof object.delete === 'function' &&\n typeof object.get === 'function' &&\n typeof object.getAll === 'function' &&\n typeof object.has === 'function' &&\n typeof object.set === 'function' &&\n object[Symbol.toStringTag] === 'FormData'\n )\n}\n\nfunction throwIfAborted (signal) {\n if (!signal) { return }\n if (typeof signal.throwIfAborted === 'function') {\n signal.throwIfAborted()\n } else {\n if (signal.aborted) {\n // DOMException not available < v17.0.0\n const err = new Error('The operation was aborted')\n err.name = 'AbortError'\n throw err\n }\n }\n}\n\nfunction addAbortListener (signal, listener) {\n if ('addEventListener' in signal) {\n signal.addEventListener('abort', listener, { once: true })\n return () => signal.removeEventListener('abort', listener)\n }\n signal.addListener('abort', listener)\n return () => signal.removeListener('abort', listener)\n}\n\nconst hasToWellFormed = !!String.prototype.toWellFormed\n\n/**\n * @param {string} val\n */\nfunction toUSVString (val) {\n if (hasToWellFormed) {\n return `${val}`.toWellFormed()\n } else if (nodeUtil.toUSVString) {\n return nodeUtil.toUSVString(val)\n }\n\n return `${val}`\n}\n\n// Parsed accordingly to RFC 9110\n// https://www.rfc-editor.org/rfc/rfc9110#field.content-range\nfunction parseRangeHeader (range) {\n if (range == null || range === '') return { start: 0, end: null, size: null }\n\n const m = range ? range.match(/^bytes (\\d+)-(\\d+)\\/(\\d+)?$/) : null\n return m\n ? {\n start: parseInt(m[1]),\n end: m[2] ? parseInt(m[2]) : null,\n size: m[3] ? parseInt(m[3]) : null\n }\n : null\n}\n\nconst kEnumerableProperty = Object.create(null)\nkEnumerableProperty.enumerable = true\n\nmodule.exports = {\n kEnumerableProperty,\n nop,\n isDisturbed,\n isErrored,\n isReadable,\n toUSVString,\n isReadableAborted,\n isBlobLike,\n parseOrigin,\n parseURL,\n getServerName,\n isStream,\n isIterable,\n isAsyncIterable,\n isDestroyed,\n headerNameToString,\n parseRawHeaders,\n parseHeaders,\n parseKeepAliveTimeout,\n destroy,\n bodyLength,\n deepClone,\n ReadableStreamFrom,\n isBuffer,\n validateHandler,\n getSocketInfo,\n isFormDataLike,\n buildURL,\n throwIfAborted,\n addAbortListener,\n parseRangeHeader,\n nodeMajor,\n nodeMinor,\n nodeHasAutoSelectFamily: nodeMajor > 18 || (nodeMajor === 18 && nodeMinor >= 13),\n safeHTTPMethods: ['GET', 'HEAD', 'OPTIONS', 'TRACE']\n}\n", "'use strict'\n\nlet fastNow = Date.now()\nlet fastNowTimeout\n\nconst fastTimers = []\n\nfunction onTimeout () {\n fastNow = Date.now()\n\n let len = fastTimers.length\n let idx = 0\n while (idx < len) {\n const timer = fastTimers[idx]\n\n if (timer.state === 0) {\n timer.state = fastNow + timer.delay\n } else if (timer.state > 0 && fastNow >= timer.state) {\n timer.state = -1\n timer.callback(timer.opaque)\n }\n\n if (timer.state === -1) {\n timer.state = -2\n if (idx !== len - 1) {\n fastTimers[idx] = fastTimers.pop()\n } else {\n fastTimers.pop()\n }\n len -= 1\n } else {\n idx += 1\n }\n }\n\n if (fastTimers.length > 0) {\n refreshTimeout()\n }\n}\n\nfunction refreshTimeout () {\n if (fastNowTimeout && fastNowTimeout.refresh) {\n fastNowTimeout.refresh()\n } else {\n clearTimeout(fastNowTimeout)\n fastNowTimeout = setTimeout(onTimeout, 1e3)\n if (fastNowTimeout.unref) {\n fastNowTimeout.unref()\n }\n }\n}\n\nclass Timeout {\n constructor (callback, delay, opaque) {\n this.callback = callback\n this.delay = delay\n this.opaque = opaque\n\n // -2 not in timer list\n // -1 in timer list but inactive\n // 0 in timer list waiting for time\n // > 0 in timer list waiting for time to expire\n this.state = -2\n\n this.refresh()\n }\n\n refresh () {\n if (this.state === -2) {\n fastTimers.push(this)\n if (!fastNowTimeout || fastTimers.length === 1) {\n refreshTimeout()\n }\n }\n\n this.state = 0\n }\n\n clear () {\n this.state = -1\n }\n}\n\nmodule.exports = {\n setTimeout (callback, delay, opaque) {\n return delay < 1e3\n ? setTimeout(callback, delay, opaque)\n : new Timeout(callback, delay, opaque)\n },\n clearTimeout (timeout) {\n if (timeout instanceof Timeout) {\n timeout.clear()\n } else {\n clearTimeout(timeout)\n }\n }\n}\n", "'use strict'\n\n/**\n * Copyright Brian White. All rights reserved.\n *\n * @see https://github.com/mscdex/streamsearch\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n *\n * Based heavily on the Streaming Boyer-Moore-Horspool C++ implementation\n * by Hongli Lai at: https://github.com/FooBarWidget/boyer-moore-horspool\n */\nconst EventEmitter = require('node:events').EventEmitter\nconst inherits = require('node:util').inherits\n\nfunction SBMH (needle) {\n if (typeof needle === 'string') {\n needle = Buffer.from(needle)\n }\n\n if (!Buffer.isBuffer(needle)) {\n throw new TypeError('The needle has to be a String or a Buffer.')\n }\n\n const needleLength = needle.length\n\n if (needleLength === 0) {\n throw new Error('The needle cannot be an empty String/Buffer.')\n }\n\n if (needleLength > 256) {\n throw new Error('The needle cannot have a length bigger than 256.')\n }\n\n this.maxMatches = Infinity\n this.matches = 0\n\n this._occ = new Array(256)\n .fill(needleLength) // Initialize occurrence table.\n this._lookbehind_size = 0\n this._needle = needle\n this._bufpos = 0\n\n this._lookbehind = Buffer.alloc(needleLength)\n\n // Populate occurrence table with analysis of the needle,\n // ignoring last letter.\n for (var i = 0; i < needleLength - 1; ++i) { // eslint-disable-line no-var\n this._occ[needle[i]] = needleLength - 1 - i\n }\n}\ninherits(SBMH, EventEmitter)\n\nSBMH.prototype.reset = function () {\n this._lookbehind_size = 0\n this.matches = 0\n this._bufpos = 0\n}\n\nSBMH.prototype.push = function (chunk, pos) {\n if (!Buffer.isBuffer(chunk)) {\n chunk = Buffer.from(chunk, 'binary')\n }\n const chlen = chunk.length\n this._bufpos = pos || 0\n let r\n while (r !== chlen && this.matches < this.maxMatches) { r = this._sbmh_feed(chunk) }\n return r\n}\n\nSBMH.prototype._sbmh_feed = function (data) {\n const len = data.length\n const needle = this._needle\n const needleLength = needle.length\n const lastNeedleChar = needle[needleLength - 1]\n\n // Positive: points to a position in `data`\n // pos == 3 points to data[3]\n // Negative: points to a position in the lookbehind buffer\n // pos == -2 points to lookbehind[lookbehind_size - 2]\n let pos = -this._lookbehind_size\n let ch\n\n if (pos < 0) {\n // Lookbehind buffer is not empty. Perform Boyer-Moore-Horspool\n // search with character lookup code that considers both the\n // lookbehind buffer and the current round's haystack data.\n //\n // Loop until\n // there is a match.\n // or until\n // we've moved past the position that requires the\n // lookbehind buffer. In this case we switch to the\n // optimized loop.\n // or until\n // the character to look at lies outside the haystack.\n while (pos < 0 && pos <= len - needleLength) {\n ch = this._sbmh_lookup_char(data, pos + needleLength - 1)\n\n if (\n ch === lastNeedleChar &&\n this._sbmh_memcmp(data, pos, needleLength - 1)\n ) {\n this._lookbehind_size = 0\n ++this.matches\n this.emit('info', true)\n\n return (this._bufpos = pos + needleLength)\n }\n pos += this._occ[ch]\n }\n\n // No match.\n\n if (pos < 0) {\n // There's too few data for Boyer-Moore-Horspool to run,\n // so let's use a different algorithm to skip as much as\n // we can.\n // Forward pos until\n // the trailing part of lookbehind + data\n // looks like the beginning of the needle\n // or until\n // pos == 0\n while (pos < 0 && !this._sbmh_memcmp(data, pos, len - pos)) { ++pos }\n }\n\n if (pos >= 0) {\n // Discard lookbehind buffer.\n this.emit('info', false, this._lookbehind, 0, this._lookbehind_size)\n this._lookbehind_size = 0\n } else {\n // Cut off part of the lookbehind buffer that has\n // been processed and append the entire haystack\n // into it.\n const bytesToCutOff = this._lookbehind_size + pos\n if (bytesToCutOff > 0) {\n // The cut off data is guaranteed not to contain the needle.\n this.emit('info', false, this._lookbehind, 0, bytesToCutOff)\n }\n\n this._lookbehind.copy(this._lookbehind, 0, bytesToCutOff,\n this._lookbehind_size - bytesToCutOff)\n this._lookbehind_size -= bytesToCutOff\n\n data.copy(this._lookbehind, this._lookbehind_size)\n this._lookbehind_size += len\n\n this._bufpos = len\n return len\n }\n }\n\n pos += (pos >= 0) * this._bufpos\n\n // Lookbehind buffer is now empty. We only need to check if the\n // needle is in the haystack.\n if (data.indexOf(needle, pos) !== -1) {\n pos = data.indexOf(needle, pos)\n ++this.matches\n if (pos > 0) { this.emit('info', true, data, this._bufpos, pos) } else { this.emit('info', true) }\n\n return (this._bufpos = pos + needleLength)\n } else {\n pos = len - needleLength\n }\n\n // There was no match. If there's trailing haystack data that we cannot\n // match yet using the Boyer-Moore-Horspool algorithm (because the trailing\n // data is less than the needle size) then match using a modified\n // algorithm that starts matching from the beginning instead of the end.\n // Whatever trailing data is left after running this algorithm is added to\n // the lookbehind buffer.\n while (\n pos < len &&\n (\n data[pos] !== needle[0] ||\n (\n (Buffer.compare(\n data.subarray(pos, pos + len - pos),\n needle.subarray(0, len - pos)\n ) !== 0)\n )\n )\n ) {\n ++pos\n }\n if (pos < len) {\n data.copy(this._lookbehind, 0, pos, pos + (len - pos))\n this._lookbehind_size = len - pos\n }\n\n // Everything until pos is guaranteed not to contain needle data.\n if (pos > 0) { this.emit('info', false, data, this._bufpos, pos < len ? pos : len) }\n\n this._bufpos = len\n return len\n}\n\nSBMH.prototype._sbmh_lookup_char = function (data, pos) {\n return (pos < 0)\n ? this._lookbehind[this._lookbehind_size + pos]\n : data[pos]\n}\n\nSBMH.prototype._sbmh_memcmp = function (data, pos, len) {\n for (var i = 0; i < len; ++i) { // eslint-disable-line no-var\n if (this._sbmh_lookup_char(data, pos + i) !== this._needle[i]) { return false }\n }\n return true\n}\n\nmodule.exports = SBMH\n", "'use strict'\n\nconst inherits = require('node:util').inherits\nconst ReadableStream = require('node:stream').Readable\n\nfunction PartStream (opts) {\n ReadableStream.call(this, opts)\n}\ninherits(PartStream, ReadableStream)\n\nPartStream.prototype._read = function (n) {}\n\nmodule.exports = PartStream\n", "'use strict'\n\nmodule.exports = function getLimit (limits, name, defaultLimit) {\n if (\n !limits ||\n limits[name] === undefined ||\n limits[name] === null\n ) { return defaultLimit }\n\n if (\n typeof limits[name] !== 'number' ||\n isNaN(limits[name])\n ) { throw new TypeError('Limit ' + name + ' is not a valid number') }\n\n return limits[name]\n}\n", "'use strict'\n\nconst EventEmitter = require('node:events').EventEmitter\nconst inherits = require('node:util').inherits\nconst getLimit = require('../../../lib/utils/getLimit')\n\nconst StreamSearch = require('../../streamsearch/sbmh')\n\nconst B_DCRLF = Buffer.from('\\r\\n\\r\\n')\nconst RE_CRLF = /\\r\\n/g\nconst RE_HDR = /^([^:]+):[ \\t]?([\\x00-\\xFF]+)?$/ // eslint-disable-line no-control-regex\n\nfunction HeaderParser (cfg) {\n EventEmitter.call(this)\n\n cfg = cfg || {}\n const self = this\n this.nread = 0\n this.maxed = false\n this.npairs = 0\n this.maxHeaderPairs = getLimit(cfg, 'maxHeaderPairs', 2000)\n this.maxHeaderSize = getLimit(cfg, 'maxHeaderSize', 80 * 1024)\n this.buffer = ''\n this.header = {}\n this.finished = false\n this.ss = new StreamSearch(B_DCRLF)\n this.ss.on('info', function (isMatch, data, start, end) {\n if (data && !self.maxed) {\n if (self.nread + end - start >= self.maxHeaderSize) {\n end = self.maxHeaderSize - self.nread + start\n self.nread = self.maxHeaderSize\n self.maxed = true\n } else { self.nread += (end - start) }\n\n self.buffer += data.toString('binary', start, end)\n }\n if (isMatch) { self._finish() }\n })\n}\ninherits(HeaderParser, EventEmitter)\n\nHeaderParser.prototype.push = function (data) {\n const r = this.ss.push(data)\n if (this.finished) { return r }\n}\n\nHeaderParser.prototype.reset = function () {\n this.finished = false\n this.buffer = ''\n this.header = {}\n this.ss.reset()\n}\n\nHeaderParser.prototype._finish = function () {\n if (this.buffer) { this._parseHeader() }\n this.ss.matches = this.ss.maxMatches\n const header = this.header\n this.header = {}\n this.buffer = ''\n this.finished = true\n this.nread = this.npairs = 0\n this.maxed = false\n this.emit('header', header)\n}\n\nHeaderParser.prototype._parseHeader = function () {\n if (this.npairs === this.maxHeaderPairs) { return }\n\n const lines = this.buffer.split(RE_CRLF)\n const len = lines.length\n let m, h\n\n for (var i = 0; i < len; ++i) { // eslint-disable-line no-var\n if (lines[i].length === 0) { continue }\n if (lines[i][0] === '\\t' || lines[i][0] === ' ') {\n // folded header content\n // RFC2822 says to just remove the CRLF and not the whitespace following\n // it, so we follow the RFC and include the leading whitespace ...\n if (h) {\n this.header[h][this.header[h].length - 1] += lines[i]\n continue\n }\n }\n\n const posColon = lines[i].indexOf(':')\n if (\n posColon === -1 ||\n posColon === 0\n ) {\n return\n }\n m = RE_HDR.exec(lines[i])\n h = m[1].toLowerCase()\n this.header[h] = this.header[h] || []\n this.header[h].push((m[2] || ''))\n if (++this.npairs === this.maxHeaderPairs) { break }\n }\n}\n\nmodule.exports = HeaderParser\n", "'use strict'\n\nconst WritableStream = require('node:stream').Writable\nconst inherits = require('node:util').inherits\n\nconst StreamSearch = require('../../streamsearch/sbmh')\n\nconst PartStream = require('./PartStream')\nconst HeaderParser = require('./HeaderParser')\n\nconst DASH = 45\nconst B_ONEDASH = Buffer.from('-')\nconst B_CRLF = Buffer.from('\\r\\n')\nconst EMPTY_FN = function () {}\n\nfunction Dicer (cfg) {\n if (!(this instanceof Dicer)) { return new Dicer(cfg) }\n WritableStream.call(this, cfg)\n\n if (!cfg || (!cfg.headerFirst && typeof cfg.boundary !== 'string')) { throw new TypeError('Boundary required') }\n\n if (typeof cfg.boundary === 'string') { this.setBoundary(cfg.boundary) } else { this._bparser = undefined }\n\n this._headerFirst = cfg.headerFirst\n\n this._dashes = 0\n this._parts = 0\n this._finished = false\n this._realFinish = false\n this._isPreamble = true\n this._justMatched = false\n this._firstWrite = true\n this._inHeader = true\n this._part = undefined\n this._cb = undefined\n this._ignoreData = false\n this._partOpts = { highWaterMark: cfg.partHwm }\n this._pause = false\n\n const self = this\n this._hparser = new HeaderParser(cfg)\n this._hparser.on('header', function (header) {\n self._inHeader = false\n self._part.emit('header', header)\n })\n}\ninherits(Dicer, WritableStream)\n\nDicer.prototype.emit = function (ev) {\n if (ev === 'finish' && !this._realFinish) {\n if (!this._finished) {\n const self = this\n process.nextTick(function () {\n self.emit('error', new Error('Unexpected end of multipart data'))\n if (self._part && !self._ignoreData) {\n const type = (self._isPreamble ? 'Preamble' : 'Part')\n self._part.emit('error', new Error(type + ' terminated early due to unexpected end of multipart data'))\n self._part.push(null)\n process.nextTick(function () {\n self._realFinish = true\n self.emit('finish')\n self._realFinish = false\n })\n return\n }\n self._realFinish = true\n self.emit('finish')\n self._realFinish = false\n })\n }\n } else { WritableStream.prototype.emit.apply(this, arguments) }\n}\n\nDicer.prototype._write = function (data, encoding, cb) {\n // ignore unexpected data (e.g. extra trailer data after finished)\n if (!this._hparser && !this._bparser) { return cb() }\n\n if (this._headerFirst && this._isPreamble) {\n if (!this._part) {\n this._part = new PartStream(this._partOpts)\n if (this.listenerCount('preamble') !== 0) { this.emit('preamble', this._part) } else { this._ignore() }\n }\n const r = this._hparser.push(data)\n if (!this._inHeader && r !== undefined && r < data.length) { data = data.slice(r) } else { return cb() }\n }\n\n // allows for \"easier\" testing\n if (this._firstWrite) {\n this._bparser.push(B_CRLF)\n this._firstWrite = false\n }\n\n this._bparser.push(data)\n\n if (this._pause) { this._cb = cb } else { cb() }\n}\n\nDicer.prototype.reset = function () {\n this._part = undefined\n this._bparser = undefined\n this._hparser = undefined\n}\n\nDicer.prototype.setBoundary = function (boundary) {\n const self = this\n this._bparser = new StreamSearch('\\r\\n--' + boundary)\n this._bparser.on('info', function (isMatch, data, start, end) {\n self._oninfo(isMatch, data, start, end)\n })\n}\n\nDicer.prototype._ignore = function () {\n if (this._part && !this._ignoreData) {\n this._ignoreData = true\n this._part.on('error', EMPTY_FN)\n // we must perform some kind of read on the stream even though we are\n // ignoring the data, otherwise node's Readable stream will not emit 'end'\n // after pushing null to the stream\n this._part.resume()\n }\n}\n\nDicer.prototype._oninfo = function (isMatch, data, start, end) {\n let buf; const self = this; let i = 0; let r; let shouldWriteMore = true\n\n if (!this._part && this._justMatched && data) {\n while (this._dashes < 2 && (start + i) < end) {\n if (data[start + i] === DASH) {\n ++i\n ++this._dashes\n } else {\n if (this._dashes) { buf = B_ONEDASH }\n this._dashes = 0\n break\n }\n }\n if (this._dashes === 2) {\n if ((start + i) < end && this.listenerCount('trailer') !== 0) { this.emit('trailer', data.slice(start + i, end)) }\n this.reset()\n this._finished = true\n // no more parts will be added\n if (self._parts === 0) {\n self._realFinish = true\n self.emit('finish')\n self._realFinish = false\n }\n }\n if (this._dashes) { return }\n }\n if (this._justMatched) { this._justMatched = false }\n if (!this._part) {\n this._part = new PartStream(this._partOpts)\n this._part._read = function (n) {\n self._unpause()\n }\n if (this._isPreamble && this.listenerCount('preamble') !== 0) {\n this.emit('preamble', this._part)\n } else if (this._isPreamble !== true && this.listenerCount('part') !== 0) {\n this.emit('part', this._part)\n } else {\n this._ignore()\n }\n if (!this._isPreamble) { this._inHeader = true }\n }\n if (data && start < end && !this._ignoreData) {\n if (this._isPreamble || !this._inHeader) {\n if (buf) { shouldWriteMore = this._part.push(buf) }\n shouldWriteMore = this._part.push(data.slice(start, end))\n if (!shouldWriteMore) { this._pause = true }\n } else if (!this._isPreamble && this._inHeader) {\n if (buf) { this._hparser.push(buf) }\n r = this._hparser.push(data.slice(start, end))\n if (!this._inHeader && r !== undefined && r < end) { this._oninfo(false, data, start + r, end) }\n }\n }\n if (isMatch) {\n this._hparser.reset()\n if (this._isPreamble) { this._isPreamble = false } else {\n if (start !== end) {\n ++this._parts\n this._part.on('end', function () {\n if (--self._parts === 0) {\n if (self._finished) {\n self._realFinish = true\n self.emit('finish')\n self._realFinish = false\n } else {\n self._unpause()\n }\n }\n })\n }\n }\n this._part.push(null)\n this._part = undefined\n this._ignoreData = false\n this._justMatched = true\n this._dashes = 0\n }\n}\n\nDicer.prototype._unpause = function () {\n if (!this._pause) { return }\n\n this._pause = false\n if (this._cb) {\n const cb = this._cb\n this._cb = undefined\n cb()\n }\n}\n\nmodule.exports = Dicer\n", "'use strict'\n\n// Node has always utf-8\nconst utf8Decoder = new TextDecoder('utf-8')\nconst textDecoders = new Map([\n ['utf-8', utf8Decoder],\n ['utf8', utf8Decoder]\n])\n\nfunction getDecoder (charset) {\n let lc\n while (true) {\n switch (charset) {\n case 'utf-8':\n case 'utf8':\n return decoders.utf8\n case 'latin1':\n case 'ascii': // TODO: Make these a separate, strict decoder?\n case 'us-ascii':\n case 'iso-8859-1':\n case 'iso8859-1':\n case 'iso88591':\n case 'iso_8859-1':\n case 'windows-1252':\n case 'iso_8859-1:1987':\n case 'cp1252':\n case 'x-cp1252':\n return decoders.latin1\n case 'utf16le':\n case 'utf-16le':\n case 'ucs2':\n case 'ucs-2':\n return decoders.utf16le\n case 'base64':\n return decoders.base64\n default:\n if (lc === undefined) {\n lc = true\n charset = charset.toLowerCase()\n continue\n }\n return decoders.other.bind(charset)\n }\n }\n}\n\nconst decoders = {\n utf8: (data, sourceEncoding) => {\n if (data.length === 0) {\n return ''\n }\n if (typeof data === 'string') {\n data = Buffer.from(data, sourceEncoding)\n }\n return data.utf8Slice(0, data.length)\n },\n\n latin1: (data, sourceEncoding) => {\n if (data.length === 0) {\n return ''\n }\n if (typeof data === 'string') {\n return data\n }\n return data.latin1Slice(0, data.length)\n },\n\n utf16le: (data, sourceEncoding) => {\n if (data.length === 0) {\n return ''\n }\n if (typeof data === 'string') {\n data = Buffer.from(data, sourceEncoding)\n }\n return data.ucs2Slice(0, data.length)\n },\n\n base64: (data, sourceEncoding) => {\n if (data.length === 0) {\n return ''\n }\n if (typeof data === 'string') {\n data = Buffer.from(data, sourceEncoding)\n }\n return data.base64Slice(0, data.length)\n },\n\n other: (data, sourceEncoding) => {\n if (data.length === 0) {\n return ''\n }\n if (typeof data === 'string') {\n data = Buffer.from(data, sourceEncoding)\n }\n\n if (textDecoders.has(this.toString())) {\n try {\n return textDecoders.get(this).decode(data)\n } catch {}\n }\n return typeof data === 'string'\n ? data\n : data.toString()\n }\n}\n\nfunction decodeText (text, sourceEncoding, destEncoding) {\n if (text) {\n return getDecoder(destEncoding)(text, sourceEncoding)\n }\n return text\n}\n\nmodule.exports = decodeText\n", "/* eslint-disable object-property-newline */\n'use strict'\n\nconst decodeText = require('./decodeText')\n\nconst RE_ENCODED = /%[a-fA-F0-9][a-fA-F0-9]/g\n\nconst EncodedLookup = {\n '%00': '\\x00', '%01': '\\x01', '%02': '\\x02', '%03': '\\x03', '%04': '\\x04',\n '%05': '\\x05', '%06': '\\x06', '%07': '\\x07', '%08': '\\x08', '%09': '\\x09',\n '%0a': '\\x0a', '%0A': '\\x0a', '%0b': '\\x0b', '%0B': '\\x0b', '%0c': '\\x0c',\n '%0C': '\\x0c', '%0d': '\\x0d', '%0D': '\\x0d', '%0e': '\\x0e', '%0E': '\\x0e',\n '%0f': '\\x0f', '%0F': '\\x0f', '%10': '\\x10', '%11': '\\x11', '%12': '\\x12',\n '%13': '\\x13', '%14': '\\x14', '%15': '\\x15', '%16': '\\x16', '%17': '\\x17',\n '%18': '\\x18', '%19': '\\x19', '%1a': '\\x1a', '%1A': '\\x1a', '%1b': '\\x1b',\n '%1B': '\\x1b', '%1c': '\\x1c', '%1C': '\\x1c', '%1d': '\\x1d', '%1D': '\\x1d',\n '%1e': '\\x1e', '%1E': '\\x1e', '%1f': '\\x1f', '%1F': '\\x1f', '%20': '\\x20',\n '%21': '\\x21', '%22': '\\x22', '%23': '\\x23', '%24': '\\x24', '%25': '\\x25',\n '%26': '\\x26', '%27': '\\x27', '%28': '\\x28', '%29': '\\x29', '%2a': '\\x2a',\n '%2A': '\\x2a', '%2b': '\\x2b', '%2B': '\\x2b', '%2c': '\\x2c', '%2C': '\\x2c',\n '%2d': '\\x2d', '%2D': '\\x2d', '%2e': '\\x2e', '%2E': '\\x2e', '%2f': '\\x2f',\n '%2F': '\\x2f', '%30': '\\x30', '%31': '\\x31', '%32': '\\x32', '%33': '\\x33',\n '%34': '\\x34', '%35': '\\x35', '%36': '\\x36', '%37': '\\x37', '%38': '\\x38',\n '%39': '\\x39', '%3a': '\\x3a', '%3A': '\\x3a', '%3b': '\\x3b', '%3B': '\\x3b',\n '%3c': '\\x3c', '%3C': '\\x3c', '%3d': '\\x3d', '%3D': '\\x3d', '%3e': '\\x3e',\n '%3E': '\\x3e', '%3f': '\\x3f', '%3F': '\\x3f', '%40': '\\x40', '%41': '\\x41',\n '%42': '\\x42', '%43': '\\x43', '%44': '\\x44', '%45': '\\x45', '%46': '\\x46',\n '%47': '\\x47', '%48': '\\x48', '%49': '\\x49', '%4a': '\\x4a', '%4A': '\\x4a',\n '%4b': '\\x4b', '%4B': '\\x4b', '%4c': '\\x4c', '%4C': '\\x4c', '%4d': '\\x4d',\n '%4D': '\\x4d', '%4e': '\\x4e', '%4E': '\\x4e', '%4f': '\\x4f', '%4F': '\\x4f',\n '%50': '\\x50', '%51': '\\x51', '%52': '\\x52', '%53': '\\x53', '%54': '\\x54',\n '%55': '\\x55', '%56': '\\x56', '%57': '\\x57', '%58': '\\x58', '%59': '\\x59',\n '%5a': '\\x5a', '%5A': '\\x5a', '%5b': '\\x5b', '%5B': '\\x5b', '%5c': '\\x5c',\n '%5C': '\\x5c', '%5d': '\\x5d', '%5D': '\\x5d', '%5e': '\\x5e', '%5E': '\\x5e',\n '%5f': '\\x5f', '%5F': '\\x5f', '%60': '\\x60', '%61': '\\x61', '%62': '\\x62',\n '%63': '\\x63', '%64': '\\x64', '%65': '\\x65', '%66': '\\x66', '%67': '\\x67',\n '%68': '\\x68', '%69': '\\x69', '%6a': '\\x6a', '%6A': '\\x6a', '%6b': '\\x6b',\n '%6B': '\\x6b', '%6c': '\\x6c', '%6C': '\\x6c', '%6d': '\\x6d', '%6D': '\\x6d',\n '%6e': '\\x6e', '%6E': '\\x6e', '%6f': '\\x6f', '%6F': '\\x6f', '%70': '\\x70',\n '%71': '\\x71', '%72': '\\x72', '%73': '\\x73', '%74': '\\x74', '%75': '\\x75',\n '%76': '\\x76', '%77': '\\x77', '%78': '\\x78', '%79': '\\x79', '%7a': '\\x7a',\n '%7A': '\\x7a', '%7b': '\\x7b', '%7B': '\\x7b', '%7c': '\\x7c', '%7C': '\\x7c',\n '%7d': '\\x7d', '%7D': '\\x7d', '%7e': '\\x7e', '%7E': '\\x7e', '%7f': '\\x7f',\n '%7F': '\\x7f', '%80': '\\x80', '%81': '\\x81', '%82': '\\x82', '%83': '\\x83',\n '%84': '\\x84', '%85': '\\x85', '%86': '\\x86', '%87': '\\x87', '%88': '\\x88',\n '%89': '\\x89', '%8a': '\\x8a', '%8A': '\\x8a', '%8b': '\\x8b', '%8B': '\\x8b',\n '%8c': '\\x8c', '%8C': '\\x8c', '%8d': '\\x8d', '%8D': '\\x8d', '%8e': '\\x8e',\n '%8E': '\\x8e', '%8f': '\\x8f', '%8F': '\\x8f', '%90': '\\x90', '%91': '\\x91',\n '%92': '\\x92', '%93': '\\x93', '%94': '\\x94', '%95': '\\x95', '%96': '\\x96',\n '%97': '\\x97', '%98': '\\x98', '%99': '\\x99', '%9a': '\\x9a', '%9A': '\\x9a',\n '%9b': '\\x9b', '%9B': '\\x9b', '%9c': '\\x9c', '%9C': '\\x9c', '%9d': '\\x9d',\n '%9D': '\\x9d', '%9e': '\\x9e', '%9E': '\\x9e', '%9f': '\\x9f', '%9F': '\\x9f',\n '%a0': '\\xa0', '%A0': '\\xa0', '%a1': '\\xa1', '%A1': '\\xa1', '%a2': '\\xa2',\n '%A2': '\\xa2', '%a3': '\\xa3', '%A3': '\\xa3', '%a4': '\\xa4', '%A4': '\\xa4',\n '%a5': '\\xa5', '%A5': '\\xa5', '%a6': '\\xa6', '%A6': '\\xa6', '%a7': '\\xa7',\n '%A7': '\\xa7', '%a8': '\\xa8', '%A8': '\\xa8', '%a9': '\\xa9', '%A9': '\\xa9',\n '%aa': '\\xaa', '%Aa': '\\xaa', '%aA': '\\xaa', '%AA': '\\xaa', '%ab': '\\xab',\n '%Ab': '\\xab', '%aB': '\\xab', '%AB': '\\xab', '%ac': '\\xac', '%Ac': '\\xac',\n '%aC': '\\xac', '%AC': '\\xac', '%ad': '\\xad', '%Ad': '\\xad', '%aD': '\\xad',\n '%AD': '\\xad', '%ae': '\\xae', '%Ae': '\\xae', '%aE': '\\xae', '%AE': '\\xae',\n '%af': '\\xaf', '%Af': '\\xaf', '%aF': '\\xaf', '%AF': '\\xaf', '%b0': '\\xb0',\n '%B0': '\\xb0', '%b1': '\\xb1', '%B1': '\\xb1', '%b2': '\\xb2', '%B2': '\\xb2',\n '%b3': '\\xb3', '%B3': '\\xb3', '%b4': '\\xb4', '%B4': '\\xb4', '%b5': '\\xb5',\n '%B5': '\\xb5', '%b6': '\\xb6', '%B6': '\\xb6', '%b7': '\\xb7', '%B7': '\\xb7',\n '%b8': '\\xb8', '%B8': '\\xb8', '%b9': '\\xb9', '%B9': '\\xb9', '%ba': '\\xba',\n '%Ba': '\\xba', '%bA': '\\xba', '%BA': '\\xba', '%bb': '\\xbb', '%Bb': '\\xbb',\n '%bB': '\\xbb', '%BB': '\\xbb', '%bc': '\\xbc', '%Bc': '\\xbc', '%bC': '\\xbc',\n '%BC': '\\xbc', '%bd': '\\xbd', '%Bd': '\\xbd', '%bD': '\\xbd', '%BD': '\\xbd',\n '%be': '\\xbe', '%Be': '\\xbe', '%bE': '\\xbe', '%BE': '\\xbe', '%bf': '\\xbf',\n '%Bf': '\\xbf', '%bF': '\\xbf', '%BF': '\\xbf', '%c0': '\\xc0', '%C0': '\\xc0',\n '%c1': '\\xc1', '%C1': '\\xc1', '%c2': '\\xc2', '%C2': '\\xc2', '%c3': '\\xc3',\n '%C3': '\\xc3', '%c4': '\\xc4', '%C4': '\\xc4', '%c5': '\\xc5', '%C5': '\\xc5',\n '%c6': '\\xc6', '%C6': '\\xc6', '%c7': '\\xc7', '%C7': '\\xc7', '%c8': '\\xc8',\n '%C8': '\\xc8', '%c9': '\\xc9', '%C9': '\\xc9', '%ca': '\\xca', '%Ca': '\\xca',\n '%cA': '\\xca', '%CA': '\\xca', '%cb': '\\xcb', '%Cb': '\\xcb', '%cB': '\\xcb',\n '%CB': '\\xcb', '%cc': '\\xcc', '%Cc': '\\xcc', '%cC': '\\xcc', '%CC': '\\xcc',\n '%cd': '\\xcd', '%Cd': '\\xcd', '%cD': '\\xcd', '%CD': '\\xcd', '%ce': '\\xce',\n '%Ce': '\\xce', '%cE': '\\xce', '%CE': '\\xce', '%cf': '\\xcf', '%Cf': '\\xcf',\n '%cF': '\\xcf', '%CF': '\\xcf', '%d0': '\\xd0', '%D0': '\\xd0', '%d1': '\\xd1',\n '%D1': '\\xd1', '%d2': '\\xd2', '%D2': '\\xd2', '%d3': '\\xd3', '%D3': '\\xd3',\n '%d4': '\\xd4', '%D4': '\\xd4', '%d5': '\\xd5', '%D5': '\\xd5', '%d6': '\\xd6',\n '%D6': '\\xd6', '%d7': '\\xd7', '%D7': '\\xd7', '%d8': '\\xd8', '%D8': '\\xd8',\n '%d9': '\\xd9', '%D9': '\\xd9', '%da': '\\xda', '%Da': '\\xda', '%dA': '\\xda',\n '%DA': '\\xda', '%db': '\\xdb', '%Db': '\\xdb', '%dB': '\\xdb', '%DB': '\\xdb',\n '%dc': '\\xdc', '%Dc': '\\xdc', '%dC': '\\xdc', '%DC': '\\xdc', '%dd': '\\xdd',\n '%Dd': '\\xdd', '%dD': '\\xdd', '%DD': '\\xdd', '%de': '\\xde', '%De': '\\xde',\n '%dE': '\\xde', '%DE': '\\xde', '%df': '\\xdf', '%Df': '\\xdf', '%dF': '\\xdf',\n '%DF': '\\xdf', '%e0': '\\xe0', '%E0': '\\xe0', '%e1': '\\xe1', '%E1': '\\xe1',\n '%e2': '\\xe2', '%E2': '\\xe2', '%e3': '\\xe3', '%E3': '\\xe3', '%e4': '\\xe4',\n '%E4': '\\xe4', '%e5': '\\xe5', '%E5': '\\xe5', '%e6': '\\xe6', '%E6': '\\xe6',\n '%e7': '\\xe7', '%E7': '\\xe7', '%e8': '\\xe8', '%E8': '\\xe8', '%e9': '\\xe9',\n '%E9': '\\xe9', '%ea': '\\xea', '%Ea': '\\xea', '%eA': '\\xea', '%EA': '\\xea',\n '%eb': '\\xeb', '%Eb': '\\xeb', '%eB': '\\xeb', '%EB': '\\xeb', '%ec': '\\xec',\n '%Ec': '\\xec', '%eC': '\\xec', '%EC': '\\xec', '%ed': '\\xed', '%Ed': '\\xed',\n '%eD': '\\xed', '%ED': '\\xed', '%ee': '\\xee', '%Ee': '\\xee', '%eE': '\\xee',\n '%EE': '\\xee', '%ef': '\\xef', '%Ef': '\\xef', '%eF': '\\xef', '%EF': '\\xef',\n '%f0': '\\xf0', '%F0': '\\xf0', '%f1': '\\xf1', '%F1': '\\xf1', '%f2': '\\xf2',\n '%F2': '\\xf2', '%f3': '\\xf3', '%F3': '\\xf3', '%f4': '\\xf4', '%F4': '\\xf4',\n '%f5': '\\xf5', '%F5': '\\xf5', '%f6': '\\xf6', '%F6': '\\xf6', '%f7': '\\xf7',\n '%F7': '\\xf7', '%f8': '\\xf8', '%F8': '\\xf8', '%f9': '\\xf9', '%F9': '\\xf9',\n '%fa': '\\xfa', '%Fa': '\\xfa', '%fA': '\\xfa', '%FA': '\\xfa', '%fb': '\\xfb',\n '%Fb': '\\xfb', '%fB': '\\xfb', '%FB': '\\xfb', '%fc': '\\xfc', '%Fc': '\\xfc',\n '%fC': '\\xfc', '%FC': '\\xfc', '%fd': '\\xfd', '%Fd': '\\xfd', '%fD': '\\xfd',\n '%FD': '\\xfd', '%fe': '\\xfe', '%Fe': '\\xfe', '%fE': '\\xfe', '%FE': '\\xfe',\n '%ff': '\\xff', '%Ff': '\\xff', '%fF': '\\xff', '%FF': '\\xff'\n}\n\nfunction encodedReplacer (match) {\n return EncodedLookup[match]\n}\n\nconst STATE_KEY = 0\nconst STATE_VALUE = 1\nconst STATE_CHARSET = 2\nconst STATE_LANG = 3\n\nfunction parseParams (str) {\n const res = []\n let state = STATE_KEY\n let charset = ''\n let inquote = false\n let escaping = false\n let p = 0\n let tmp = ''\n const len = str.length\n\n for (var i = 0; i < len; ++i) { // eslint-disable-line no-var\n const char = str[i]\n if (char === '\\\\' && inquote) {\n if (escaping) { escaping = false } else {\n escaping = true\n continue\n }\n } else if (char === '\"') {\n if (!escaping) {\n if (inquote) {\n inquote = false\n state = STATE_KEY\n } else { inquote = true }\n continue\n } else { escaping = false }\n } else {\n if (escaping && inquote) { tmp += '\\\\' }\n escaping = false\n if ((state === STATE_CHARSET || state === STATE_LANG) && char === \"'\") {\n if (state === STATE_CHARSET) {\n state = STATE_LANG\n charset = tmp.substring(1)\n } else { state = STATE_VALUE }\n tmp = ''\n continue\n } else if (state === STATE_KEY &&\n (char === '*' || char === '=') &&\n res.length) {\n state = char === '*'\n ? STATE_CHARSET\n : STATE_VALUE\n res[p] = [tmp, undefined]\n tmp = ''\n continue\n } else if (!inquote && char === ';') {\n state = STATE_KEY\n if (charset) {\n if (tmp.length) {\n tmp = decodeText(tmp.replace(RE_ENCODED, encodedReplacer),\n 'binary',\n charset)\n }\n charset = ''\n } else if (tmp.length) {\n tmp = decodeText(tmp, 'binary', 'utf8')\n }\n if (res[p] === undefined) { res[p] = tmp } else { res[p][1] = tmp }\n tmp = ''\n ++p\n continue\n } else if (!inquote && (char === ' ' || char === '\\t')) { continue }\n }\n tmp += char\n }\n if (charset && tmp.length) {\n tmp = decodeText(tmp.replace(RE_ENCODED, encodedReplacer),\n 'binary',\n charset)\n } else if (tmp) {\n tmp = decodeText(tmp, 'binary', 'utf8')\n }\n\n if (res[p] === undefined) {\n if (tmp) { res[p] = tmp }\n } else { res[p][1] = tmp }\n\n return res\n}\n\nmodule.exports = parseParams\n", "'use strict'\n\nmodule.exports = function basename (path) {\n if (typeof path !== 'string') { return '' }\n for (var i = path.length - 1; i >= 0; --i) { // eslint-disable-line no-var\n switch (path.charCodeAt(i)) {\n case 0x2F: // '/'\n case 0x5C: // '\\'\n path = path.slice(i + 1)\n return (path === '..' || path === '.' ? '' : path)\n }\n }\n return (path === '..' || path === '.' ? '' : path)\n}\n", "'use strict'\n\n// TODO:\n// * support 1 nested multipart level\n// (see second multipart example here:\n// http://www.w3.org/TR/html401/interact/forms.html#didx-multipartform-data)\n// * support limits.fieldNameSize\n// -- this will require modifications to utils.parseParams\n\nconst { Readable } = require('node:stream')\nconst { inherits } = require('node:util')\n\nconst Dicer = require('../../deps/dicer/lib/Dicer')\n\nconst parseParams = require('../utils/parseParams')\nconst decodeText = require('../utils/decodeText')\nconst basename = require('../utils/basename')\nconst getLimit = require('../utils/getLimit')\n\nconst RE_BOUNDARY = /^boundary$/i\nconst RE_FIELD = /^form-data$/i\nconst RE_CHARSET = /^charset$/i\nconst RE_FILENAME = /^filename$/i\nconst RE_NAME = /^name$/i\n\nMultipart.detect = /^multipart\\/form-data/i\nfunction Multipart (boy, cfg) {\n let i\n let len\n const self = this\n let boundary\n const limits = cfg.limits\n const isPartAFile = cfg.isPartAFile || ((fieldName, contentType, fileName) => (contentType === 'application/octet-stream' || fileName !== undefined))\n const parsedConType = cfg.parsedConType || []\n const defCharset = cfg.defCharset || 'utf8'\n const preservePath = cfg.preservePath\n const fileOpts = { highWaterMark: cfg.fileHwm }\n\n for (i = 0, len = parsedConType.length; i < len; ++i) {\n if (Array.isArray(parsedConType[i]) &&\n RE_BOUNDARY.test(parsedConType[i][0])) {\n boundary = parsedConType[i][1]\n break\n }\n }\n\n function checkFinished () {\n if (nends === 0 && finished && !boy._done) {\n finished = false\n self.end()\n }\n }\n\n if (typeof boundary !== 'string') { throw new Error('Multipart: Boundary not found') }\n\n const fieldSizeLimit = getLimit(limits, 'fieldSize', 1 * 1024 * 1024)\n const fileSizeLimit = getLimit(limits, 'fileSize', Infinity)\n const filesLimit = getLimit(limits, 'files', Infinity)\n const fieldsLimit = getLimit(limits, 'fields', Infinity)\n const partsLimit = getLimit(limits, 'parts', Infinity)\n const headerPairsLimit = getLimit(limits, 'headerPairs', 2000)\n const headerSizeLimit = getLimit(limits, 'headerSize', 80 * 1024)\n\n let nfiles = 0\n let nfields = 0\n let nends = 0\n let curFile\n let curField\n let finished = false\n\n this._needDrain = false\n this._pause = false\n this._cb = undefined\n this._nparts = 0\n this._boy = boy\n\n const parserCfg = {\n boundary,\n maxHeaderPairs: headerPairsLimit,\n maxHeaderSize: headerSizeLimit,\n partHwm: fileOpts.highWaterMark,\n highWaterMark: cfg.highWaterMark\n }\n\n this.parser = new Dicer(parserCfg)\n this.parser.on('drain', function () {\n self._needDrain = false\n if (self._cb && !self._pause) {\n const cb = self._cb\n self._cb = undefined\n cb()\n }\n }).on('part', function onPart (part) {\n if (++self._nparts > partsLimit) {\n self.parser.removeListener('part', onPart)\n self.parser.on('part', skipPart)\n boy.hitPartsLimit = true\n boy.emit('partsLimit')\n return skipPart(part)\n }\n\n // hack because streams2 _always_ doesn't emit 'end' until nextTick, so let\n // us emit 'end' early since we know the part has ended if we are already\n // seeing the next part\n if (curField) {\n const field = curField\n field.emit('end')\n field.removeAllListeners('end')\n }\n\n part.on('header', function (header) {\n let contype\n let fieldname\n let parsed\n let charset\n let encoding\n let filename\n let nsize = 0\n\n if (header['content-type']) {\n parsed = parseParams(header['content-type'][0])\n if (parsed[0]) {\n contype = parsed[0].toLowerCase()\n for (i = 0, len = parsed.length; i < len; ++i) {\n if (RE_CHARSET.test(parsed[i][0])) {\n charset = parsed[i][1].toLowerCase()\n break\n }\n }\n }\n }\n\n if (contype === undefined) { contype = 'text/plain' }\n if (charset === undefined) { charset = defCharset }\n\n if (header['content-disposition']) {\n parsed = parseParams(header['content-disposition'][0])\n if (!RE_FIELD.test(parsed[0])) { return skipPart(part) }\n for (i = 0, len = parsed.length; i < len; ++i) {\n if (RE_NAME.test(parsed[i][0])) {\n fieldname = parsed[i][1]\n } else if (RE_FILENAME.test(parsed[i][0])) {\n filename = parsed[i][1]\n if (!preservePath) { filename = basename(filename) }\n }\n }\n } else { return skipPart(part) }\n\n if (header['content-transfer-encoding']) { encoding = header['content-transfer-encoding'][0].toLowerCase() } else { encoding = '7bit' }\n\n let onData,\n onEnd\n\n if (isPartAFile(fieldname, contype, filename)) {\n // file/binary field\n if (nfiles === filesLimit) {\n if (!boy.hitFilesLimit) {\n boy.hitFilesLimit = true\n boy.emit('filesLimit')\n }\n return skipPart(part)\n }\n\n ++nfiles\n\n if (boy.listenerCount('file') === 0) {\n self.parser._ignore()\n return\n }\n\n ++nends\n const file = new FileStream(fileOpts)\n curFile = file\n file.on('end', function () {\n --nends\n self._pause = false\n checkFinished()\n if (self._cb && !self._needDrain) {\n const cb = self._cb\n self._cb = undefined\n cb()\n }\n })\n file._read = function (n) {\n if (!self._pause) { return }\n self._pause = false\n if (self._cb && !self._needDrain) {\n const cb = self._cb\n self._cb = undefined\n cb()\n }\n }\n boy.emit('file', fieldname, file, filename, encoding, contype)\n\n onData = function (data) {\n if ((nsize += data.length) > fileSizeLimit) {\n const extralen = fileSizeLimit - nsize + data.length\n if (extralen > 0) { file.push(data.slice(0, extralen)) }\n file.truncated = true\n file.bytesRead = fileSizeLimit\n part.removeAllListeners('data')\n file.emit('limit')\n return\n } else if (!file.push(data)) { self._pause = true }\n\n file.bytesRead = nsize\n }\n\n onEnd = function () {\n curFile = undefined\n file.push(null)\n }\n } else {\n // non-file field\n if (nfields === fieldsLimit) {\n if (!boy.hitFieldsLimit) {\n boy.hitFieldsLimit = true\n boy.emit('fieldsLimit')\n }\n return skipPart(part)\n }\n\n ++nfields\n ++nends\n let buffer = ''\n let truncated = false\n curField = part\n\n onData = function (data) {\n if ((nsize += data.length) > fieldSizeLimit) {\n const extralen = (fieldSizeLimit - (nsize - data.length))\n buffer += data.toString('binary', 0, extralen)\n truncated = true\n part.removeAllListeners('data')\n } else { buffer += data.toString('binary') }\n }\n\n onEnd = function () {\n curField = undefined\n if (buffer.length) { buffer = decodeText(buffer, 'binary', charset) }\n boy.emit('field', fieldname, buffer, false, truncated, encoding, contype)\n --nends\n checkFinished()\n }\n }\n\n /* As of node@2efe4ab761666 (v0.10.29+/v0.11.14+), busboy had become\n broken. Streams2/streams3 is a huge black box of confusion, but\n somehow overriding the sync state seems to fix things again (and still\n seems to work for previous node versions).\n */\n part._readableState.sync = false\n\n part.on('data', onData)\n part.on('end', onEnd)\n }).on('error', function (err) {\n if (curFile) { curFile.emit('error', err) }\n })\n }).on('error', function (err) {\n boy.emit('error', err)\n }).on('finish', function () {\n finished = true\n checkFinished()\n })\n}\n\nMultipart.prototype.write = function (chunk, cb) {\n const r = this.parser.write(chunk)\n if (r && !this._pause) {\n cb()\n } else {\n this._needDrain = !r\n this._cb = cb\n }\n}\n\nMultipart.prototype.end = function () {\n const self = this\n\n if (self.parser.writable) {\n self.parser.end()\n } else if (!self._boy._done) {\n process.nextTick(function () {\n self._boy._done = true\n self._boy.emit('finish')\n })\n }\n}\n\nfunction skipPart (part) {\n part.resume()\n}\n\nfunction FileStream (opts) {\n Readable.call(this, opts)\n\n this.bytesRead = 0\n\n this.truncated = false\n}\n\ninherits(FileStream, Readable)\n\nFileStream.prototype._read = function (n) {}\n\nmodule.exports = Multipart\n", "'use strict'\n\nconst RE_PLUS = /\\+/g\n\nconst HEX = [\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0,\n 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0\n]\n\nfunction Decoder () {\n this.buffer = undefined\n}\nDecoder.prototype.write = function (str) {\n // Replace '+' with ' ' before decoding\n str = str.replace(RE_PLUS, ' ')\n let res = ''\n let i = 0; let p = 0; const len = str.length\n for (; i < len; ++i) {\n if (this.buffer !== undefined) {\n if (!HEX[str.charCodeAt(i)]) {\n res += '%' + this.buffer\n this.buffer = undefined\n --i // retry character\n } else {\n this.buffer += str[i]\n ++p\n if (this.buffer.length === 2) {\n res += String.fromCharCode(parseInt(this.buffer, 16))\n this.buffer = undefined\n }\n }\n } else if (str[i] === '%') {\n if (i > p) {\n res += str.substring(p, i)\n p = i\n }\n this.buffer = ''\n ++p\n }\n }\n if (p < len && this.buffer === undefined) { res += str.substring(p) }\n return res\n}\nDecoder.prototype.reset = function () {\n this.buffer = undefined\n}\n\nmodule.exports = Decoder\n", "'use strict'\n\nconst Decoder = require('../utils/Decoder')\nconst decodeText = require('../utils/decodeText')\nconst getLimit = require('../utils/getLimit')\n\nconst RE_CHARSET = /^charset$/i\n\nUrlEncoded.detect = /^application\\/x-www-form-urlencoded/i\nfunction UrlEncoded (boy, cfg) {\n const limits = cfg.limits\n const parsedConType = cfg.parsedConType\n this.boy = boy\n\n this.fieldSizeLimit = getLimit(limits, 'fieldSize', 1 * 1024 * 1024)\n this.fieldNameSizeLimit = getLimit(limits, 'fieldNameSize', 100)\n this.fieldsLimit = getLimit(limits, 'fields', Infinity)\n\n let charset\n for (var i = 0, len = parsedConType.length; i < len; ++i) { // eslint-disable-line no-var\n if (Array.isArray(parsedConType[i]) &&\n RE_CHARSET.test(parsedConType[i][0])) {\n charset = parsedConType[i][1].toLowerCase()\n break\n }\n }\n\n if (charset === undefined) { charset = cfg.defCharset || 'utf8' }\n\n this.decoder = new Decoder()\n this.charset = charset\n this._fields = 0\n this._state = 'key'\n this._checkingBytes = true\n this._bytesKey = 0\n this._bytesVal = 0\n this._key = ''\n this._val = ''\n this._keyTrunc = false\n this._valTrunc = false\n this._hitLimit = false\n}\n\nUrlEncoded.prototype.write = function (data, cb) {\n if (this._fields === this.fieldsLimit) {\n if (!this.boy.hitFieldsLimit) {\n this.boy.hitFieldsLimit = true\n this.boy.emit('fieldsLimit')\n }\n return cb()\n }\n\n let idxeq; let idxamp; let i; let p = 0; const len = data.length\n\n while (p < len) {\n if (this._state === 'key') {\n idxeq = idxamp = undefined\n for (i = p; i < len; ++i) {\n if (!this._checkingBytes) { ++p }\n if (data[i] === 0x3D/* = */) {\n idxeq = i\n break\n } else if (data[i] === 0x26/* & */) {\n idxamp = i\n break\n }\n if (this._checkingBytes && this._bytesKey === this.fieldNameSizeLimit) {\n this._hitLimit = true\n break\n } else if (this._checkingBytes) { ++this._bytesKey }\n }\n\n if (idxeq !== undefined) {\n // key with assignment\n if (idxeq > p) { this._key += this.decoder.write(data.toString('binary', p, idxeq)) }\n this._state = 'val'\n\n this._hitLimit = false\n this._checkingBytes = true\n this._val = ''\n this._bytesVal = 0\n this._valTrunc = false\n this.decoder.reset()\n\n p = idxeq + 1\n } else if (idxamp !== undefined) {\n // key with no assignment\n ++this._fields\n let key; const keyTrunc = this._keyTrunc\n if (idxamp > p) { key = (this._key += this.decoder.write(data.toString('binary', p, idxamp))) } else { key = this._key }\n\n this._hitLimit = false\n this._checkingBytes = true\n this._key = ''\n this._bytesKey = 0\n this._keyTrunc = false\n this.decoder.reset()\n\n if (key.length) {\n this.boy.emit('field', decodeText(key, 'binary', this.charset),\n '',\n keyTrunc,\n false)\n }\n\n p = idxamp + 1\n if (this._fields === this.fieldsLimit) { return cb() }\n } else if (this._hitLimit) {\n // we may not have hit the actual limit if there are encoded bytes...\n if (i > p) { this._key += this.decoder.write(data.toString('binary', p, i)) }\n p = i\n if ((this._bytesKey = this._key.length) === this.fieldNameSizeLimit) {\n // yep, we actually did hit the limit\n this._checkingBytes = false\n this._keyTrunc = true\n }\n } else {\n if (p < len) { this._key += this.decoder.write(data.toString('binary', p)) }\n p = len\n }\n } else {\n idxamp = undefined\n for (i = p; i < len; ++i) {\n if (!this._checkingBytes) { ++p }\n if (data[i] === 0x26/* & */) {\n idxamp = i\n break\n }\n if (this._checkingBytes && this._bytesVal === this.fieldSizeLimit) {\n this._hitLimit = true\n break\n } else if (this._checkingBytes) { ++this._bytesVal }\n }\n\n if (idxamp !== undefined) {\n ++this._fields\n if (idxamp > p) { this._val += this.decoder.write(data.toString('binary', p, idxamp)) }\n this.boy.emit('field', decodeText(this._key, 'binary', this.charset),\n decodeText(this._val, 'binary', this.charset),\n this._keyTrunc,\n this._valTrunc)\n this._state = 'key'\n\n this._hitLimit = false\n this._checkingBytes = true\n this._key = ''\n this._bytesKey = 0\n this._keyTrunc = false\n this.decoder.reset()\n\n p = idxamp + 1\n if (this._fields === this.fieldsLimit) { return cb() }\n } else if (this._hitLimit) {\n // we may not have hit the actual limit if there are encoded bytes...\n if (i > p) { this._val += this.decoder.write(data.toString('binary', p, i)) }\n p = i\n if ((this._val === '' && this.fieldSizeLimit === 0) ||\n (this._bytesVal = this._val.length) === this.fieldSizeLimit) {\n // yep, we actually did hit the limit\n this._checkingBytes = false\n this._valTrunc = true\n }\n } else {\n if (p < len) { this._val += this.decoder.write(data.toString('binary', p)) }\n p = len\n }\n }\n }\n cb()\n}\n\nUrlEncoded.prototype.end = function () {\n if (this.boy._done) { return }\n\n if (this._state === 'key' && this._key.length > 0) {\n this.boy.emit('field', decodeText(this._key, 'binary', this.charset),\n '',\n this._keyTrunc,\n false)\n } else if (this._state === 'val') {\n this.boy.emit('field', decodeText(this._key, 'binary', this.charset),\n decodeText(this._val, 'binary', this.charset),\n this._keyTrunc,\n this._valTrunc)\n }\n this.boy._done = true\n this.boy.emit('finish')\n}\n\nmodule.exports = UrlEncoded\n", "'use strict'\n\nconst WritableStream = require('node:stream').Writable\nconst { inherits } = require('node:util')\nconst Dicer = require('../deps/dicer/lib/Dicer')\n\nconst MultipartParser = require('./types/multipart')\nconst UrlencodedParser = require('./types/urlencoded')\nconst parseParams = require('./utils/parseParams')\n\nfunction Busboy (opts) {\n if (!(this instanceof Busboy)) { return new Busboy(opts) }\n\n if (typeof opts !== 'object') {\n throw new TypeError('Busboy expected an options-Object.')\n }\n if (typeof opts.headers !== 'object') {\n throw new TypeError('Busboy expected an options-Object with headers-attribute.')\n }\n if (typeof opts.headers['content-type'] !== 'string') {\n throw new TypeError('Missing Content-Type-header.')\n }\n\n const {\n headers,\n ...streamOptions\n } = opts\n\n this.opts = {\n autoDestroy: false,\n ...streamOptions\n }\n WritableStream.call(this, this.opts)\n\n this._done = false\n this._parser = this.getParserByHeaders(headers)\n this._finished = false\n}\ninherits(Busboy, WritableStream)\n\nBusboy.prototype.emit = function (ev) {\n if (ev === 'finish') {\n if (!this._done) {\n this._parser?.end()\n return\n } else if (this._finished) {\n return\n }\n this._finished = true\n }\n WritableStream.prototype.emit.apply(this, arguments)\n}\n\nBusboy.prototype.getParserByHeaders = function (headers) {\n const parsed = parseParams(headers['content-type'])\n\n const cfg = {\n defCharset: this.opts.defCharset,\n fileHwm: this.opts.fileHwm,\n headers,\n highWaterMark: this.opts.highWaterMark,\n isPartAFile: this.opts.isPartAFile,\n limits: this.opts.limits,\n parsedConType: parsed,\n preservePath: this.opts.preservePath\n }\n\n if (MultipartParser.detect.test(parsed[0])) {\n return new MultipartParser(this, cfg)\n }\n if (UrlencodedParser.detect.test(parsed[0])) {\n return new UrlencodedParser(this, cfg)\n }\n throw new Error('Unsupported Content-Type.')\n}\n\nBusboy.prototype._write = function (chunk, encoding, cb) {\n this._parser.write(chunk, cb)\n}\n\nmodule.exports = Busboy\nmodule.exports.default = Busboy\nmodule.exports.Busboy = Busboy\n\nmodule.exports.Dicer = Dicer\n", "'use strict'\n\nconst { MessageChannel, receiveMessageOnPort } = require('worker_threads')\n\nconst corsSafeListedMethods = ['GET', 'HEAD', 'POST']\nconst corsSafeListedMethodsSet = new Set(corsSafeListedMethods)\n\nconst nullBodyStatus = [101, 204, 205, 304]\n\nconst redirectStatus = [301, 302, 303, 307, 308]\nconst redirectStatusSet = new Set(redirectStatus)\n\n// https://fetch.spec.whatwg.org/#block-bad-port\nconst badPorts = [\n '1', '7', '9', '11', '13', '15', '17', '19', '20', '21', '22', '23', '25', '37', '42', '43', '53', '69', '77', '79',\n '87', '95', '101', '102', '103', '104', '109', '110', '111', '113', '115', '117', '119', '123', '135', '137',\n '139', '143', '161', '179', '389', '427', '465', '512', '513', '514', '515', '526', '530', '531', '532',\n '540', '548', '554', '556', '563', '587', '601', '636', '989', '990', '993', '995', '1719', '1720', '1723',\n '2049', '3659', '4045', '5060', '5061', '6000', '6566', '6665', '6666', '6667', '6668', '6669', '6697',\n '10080'\n]\n\nconst badPortsSet = new Set(badPorts)\n\n// https://w3c.github.io/webappsec-referrer-policy/#referrer-policies\nconst referrerPolicy = [\n '',\n 'no-referrer',\n 'no-referrer-when-downgrade',\n 'same-origin',\n 'origin',\n 'strict-origin',\n 'origin-when-cross-origin',\n 'strict-origin-when-cross-origin',\n 'unsafe-url'\n]\nconst referrerPolicySet = new Set(referrerPolicy)\n\nconst requestRedirect = ['follow', 'manual', 'error']\n\nconst safeMethods = ['GET', 'HEAD', 'OPTIONS', 'TRACE']\nconst safeMethodsSet = new Set(safeMethods)\n\nconst requestMode = ['navigate', 'same-origin', 'no-cors', 'cors']\n\nconst requestCredentials = ['omit', 'same-origin', 'include']\n\nconst requestCache = [\n 'default',\n 'no-store',\n 'reload',\n 'no-cache',\n 'force-cache',\n 'only-if-cached'\n]\n\n// https://fetch.spec.whatwg.org/#request-body-header-name\nconst requestBodyHeader = [\n 'content-encoding',\n 'content-language',\n 'content-location',\n 'content-type',\n // See https://github.com/nodejs/undici/issues/2021\n // 'Content-Length' is a forbidden header name, which is typically\n // removed in the Headers implementation. However, undici doesn't\n // filter out headers, so we add it here.\n 'content-length'\n]\n\n// https://fetch.spec.whatwg.org/#enumdef-requestduplex\nconst requestDuplex = [\n 'half'\n]\n\n// http://fetch.spec.whatwg.org/#forbidden-method\nconst forbiddenMethods = ['CONNECT', 'TRACE', 'TRACK']\nconst forbiddenMethodsSet = new Set(forbiddenMethods)\n\nconst subresource = [\n 'audio',\n 'audioworklet',\n 'font',\n 'image',\n 'manifest',\n 'paintworklet',\n 'script',\n 'style',\n 'track',\n 'video',\n 'xslt',\n ''\n]\nconst subresourceSet = new Set(subresource)\n\n/** @type {globalThis['DOMException']} */\nconst DOMException = globalThis.DOMException ?? (() => {\n // DOMException was only made a global in Node v17.0.0,\n // but fetch supports >= v16.8.\n try {\n atob('~')\n } catch (err) {\n return Object.getPrototypeOf(err).constructor\n }\n})()\n\nlet channel\n\n/** @type {globalThis['structuredClone']} */\nconst structuredClone =\n globalThis.structuredClone ??\n // https://github.com/nodejs/node/blob/b27ae24dcc4251bad726d9d84baf678d1f707fed/lib/internal/structured_clone.js\n // structuredClone was added in v17.0.0, but fetch supports v16.8\n function structuredClone (value, options = undefined) {\n if (arguments.length === 0) {\n throw new TypeError('missing argument')\n }\n\n if (!channel) {\n channel = new MessageChannel()\n }\n channel.port1.unref()\n channel.port2.unref()\n channel.port1.postMessage(value, options?.transfer)\n return receiveMessageOnPort(channel.port2).message\n }\n\nmodule.exports = {\n DOMException,\n structuredClone,\n subresource,\n forbiddenMethods,\n requestBodyHeader,\n referrerPolicy,\n requestRedirect,\n requestMode,\n requestCredentials,\n requestCache,\n redirectStatus,\n corsSafeListedMethods,\n nullBodyStatus,\n safeMethods,\n badPorts,\n requestDuplex,\n subresourceSet,\n badPortsSet,\n redirectStatusSet,\n corsSafeListedMethodsSet,\n safeMethodsSet,\n forbiddenMethodsSet,\n referrerPolicySet\n}\n", "'use strict'\n\n// In case of breaking changes, increase the version\n// number to avoid conflicts.\nconst globalOrigin = Symbol.for('undici.globalOrigin.1')\n\nfunction getGlobalOrigin () {\n return globalThis[globalOrigin]\n}\n\nfunction setGlobalOrigin (newOrigin) {\n if (newOrigin === undefined) {\n Object.defineProperty(globalThis, globalOrigin, {\n value: undefined,\n writable: true,\n enumerable: false,\n configurable: false\n })\n\n return\n }\n\n const parsedURL = new URL(newOrigin)\n\n if (parsedURL.protocol !== 'http:' && parsedURL.protocol !== 'https:') {\n throw new TypeError(`Only http & https urls are allowed, received ${parsedURL.protocol}`)\n }\n\n Object.defineProperty(globalThis, globalOrigin, {\n value: parsedURL,\n writable: true,\n enumerable: false,\n configurable: false\n })\n}\n\nmodule.exports = {\n getGlobalOrigin,\n setGlobalOrigin\n}\n", "'use strict'\n\nconst { redirectStatusSet, referrerPolicySet: referrerPolicyTokens, badPortsSet } = require('./constants')\nconst { getGlobalOrigin } = require('./global')\nconst { performance } = require('perf_hooks')\nconst { isBlobLike, toUSVString, ReadableStreamFrom } = require('../core/util')\nconst assert = require('assert')\nconst { isUint8Array } = require('util/types')\n\nlet supportedHashes = []\n\n// https://nodejs.org/api/crypto.html#determining-if-crypto-support-is-unavailable\n/** @type {import('crypto')|undefined} */\nlet crypto\n\ntry {\n crypto = require('crypto')\n const possibleRelevantHashes = ['sha256', 'sha384', 'sha512']\n supportedHashes = crypto.getHashes().filter((hash) => possibleRelevantHashes.includes(hash))\n/* c8 ignore next 3 */\n} catch {\n}\n\nfunction responseURL (response) {\n // https://fetch.spec.whatwg.org/#responses\n // A response has an associated URL. It is a pointer to the last URL\n // in response\u2019s URL list and null if response\u2019s URL list is empty.\n const urlList = response.urlList\n const length = urlList.length\n return length === 0 ? null : urlList[length - 1].toString()\n}\n\n// https://fetch.spec.whatwg.org/#concept-response-location-url\nfunction responseLocationURL (response, requestFragment) {\n // 1. If response\u2019s status is not a redirect status, then return null.\n if (!redirectStatusSet.has(response.status)) {\n return null\n }\n\n // 2. Let location be the result of extracting header list values given\n // `Location` and response\u2019s header list.\n let location = response.headersList.get('location')\n\n // 3. If location is a header value, then set location to the result of\n // parsing location with response\u2019s URL.\n if (location !== null && isValidHeaderValue(location)) {\n location = new URL(location, responseURL(response))\n }\n\n // 4. If location is a URL whose fragment is null, then set location\u2019s\n // fragment to requestFragment.\n if (location && !location.hash) {\n location.hash = requestFragment\n }\n\n // 5. Return location.\n return location\n}\n\n/** @returns {URL} */\nfunction requestCurrentURL (request) {\n return request.urlList[request.urlList.length - 1]\n}\n\nfunction requestBadPort (request) {\n // 1. Let url be request\u2019s current URL.\n const url = requestCurrentURL(request)\n\n // 2. If url\u2019s scheme is an HTTP(S) scheme and url\u2019s port is a bad port,\n // then return blocked.\n if (urlIsHttpHttpsScheme(url) && badPortsSet.has(url.port)) {\n return 'blocked'\n }\n\n // 3. Return allowed.\n return 'allowed'\n}\n\nfunction isErrorLike (object) {\n return object instanceof Error || (\n object?.constructor?.name === 'Error' ||\n object?.constructor?.name === 'DOMException'\n )\n}\n\n// Check whether |statusText| is a ByteString and\n// matches the Reason-Phrase token production.\n// RFC 2616: https://tools.ietf.org/html/rfc2616\n// RFC 7230: https://tools.ietf.org/html/rfc7230\n// \"reason-phrase = *( HTAB / SP / VCHAR / obs-text )\"\n// https://github.com/chromium/chromium/blob/94.0.4604.1/third_party/blink/renderer/core/fetch/response.cc#L116\nfunction isValidReasonPhrase (statusText) {\n for (let i = 0; i < statusText.length; ++i) {\n const c = statusText.charCodeAt(i)\n if (\n !(\n (\n c === 0x09 || // HTAB\n (c >= 0x20 && c <= 0x7e) || // SP / VCHAR\n (c >= 0x80 && c <= 0xff)\n ) // obs-text\n )\n ) {\n return false\n }\n }\n return true\n}\n\n/**\n * @see https://tools.ietf.org/html/rfc7230#section-3.2.6\n * @param {number} c\n */\nfunction isTokenCharCode (c) {\n switch (c) {\n case 0x22:\n case 0x28:\n case 0x29:\n case 0x2c:\n case 0x2f:\n case 0x3a:\n case 0x3b:\n case 0x3c:\n case 0x3d:\n case 0x3e:\n case 0x3f:\n case 0x40:\n case 0x5b:\n case 0x5c:\n case 0x5d:\n case 0x7b:\n case 0x7d:\n // DQUOTE and \"(),/:;<=>?@[\\]{}\"\n return false\n default:\n // VCHAR %x21-7E\n return c >= 0x21 && c <= 0x7e\n }\n}\n\n/**\n * @param {string} characters\n */\nfunction isValidHTTPToken (characters) {\n if (characters.length === 0) {\n return false\n }\n for (let i = 0; i < characters.length; ++i) {\n if (!isTokenCharCode(characters.charCodeAt(i))) {\n return false\n }\n }\n return true\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#header-name\n * @param {string} potentialValue\n */\nfunction isValidHeaderName (potentialValue) {\n return isValidHTTPToken(potentialValue)\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#header-value\n * @param {string} potentialValue\n */\nfunction isValidHeaderValue (potentialValue) {\n // - Has no leading or trailing HTTP tab or space bytes.\n // - Contains no 0x00 (NUL) or HTTP newline bytes.\n if (\n potentialValue.startsWith('\\t') ||\n potentialValue.startsWith(' ') ||\n potentialValue.endsWith('\\t') ||\n potentialValue.endsWith(' ')\n ) {\n return false\n }\n\n if (\n potentialValue.includes('\\0') ||\n potentialValue.includes('\\r') ||\n potentialValue.includes('\\n')\n ) {\n return false\n }\n\n return true\n}\n\n// https://w3c.github.io/webappsec-referrer-policy/#set-requests-referrer-policy-on-redirect\nfunction setRequestReferrerPolicyOnRedirect (request, actualResponse) {\n // Given a request request and a response actualResponse, this algorithm\n // updates request\u2019s referrer policy according to the Referrer-Policy\n // header (if any) in actualResponse.\n\n // 1. Let policy be the result of executing \u00A7 8.1 Parse a referrer policy\n // from a Referrer-Policy header on actualResponse.\n\n // 8.1 Parse a referrer policy from a Referrer-Policy header\n // 1. Let policy-tokens be the result of extracting header list values given `Referrer-Policy` and response\u2019s header list.\n const { headersList } = actualResponse\n // 2. Let policy be the empty string.\n // 3. For each token in policy-tokens, if token is a referrer policy and token is not the empty string, then set policy to token.\n // 4. Return policy.\n const policyHeader = (headersList.get('referrer-policy') ?? '').split(',')\n\n // Note: As the referrer-policy can contain multiple policies\n // separated by comma, we need to loop through all of them\n // and pick the first valid one.\n // Ref: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy#specify_a_fallback_policy\n let policy = ''\n if (policyHeader.length > 0) {\n // The right-most policy takes precedence.\n // The left-most policy is the fallback.\n for (let i = policyHeader.length; i !== 0; i--) {\n const token = policyHeader[i - 1].trim()\n if (referrerPolicyTokens.has(token)) {\n policy = token\n break\n }\n }\n }\n\n // 2. If policy is not the empty string, then set request\u2019s referrer policy to policy.\n if (policy !== '') {\n request.referrerPolicy = policy\n }\n}\n\n// https://fetch.spec.whatwg.org/#cross-origin-resource-policy-check\nfunction crossOriginResourcePolicyCheck () {\n // TODO\n return 'allowed'\n}\n\n// https://fetch.spec.whatwg.org/#concept-cors-check\nfunction corsCheck () {\n // TODO\n return 'success'\n}\n\n// https://fetch.spec.whatwg.org/#concept-tao-check\nfunction TAOCheck () {\n // TODO\n return 'success'\n}\n\nfunction appendFetchMetadata (httpRequest) {\n // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-dest-header\n // TODO\n\n // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-mode-header\n\n // 1. Assert: r\u2019s url is a potentially trustworthy URL.\n // TODO\n\n // 2. Let header be a Structured Header whose value is a token.\n let header = null\n\n // 3. Set header\u2019s value to r\u2019s mode.\n header = httpRequest.mode\n\n // 4. Set a structured field value `Sec-Fetch-Mode`/header in r\u2019s header list.\n httpRequest.headersList.set('sec-fetch-mode', header)\n\n // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-site-header\n // TODO\n\n // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-user-header\n // TODO\n}\n\n// https://fetch.spec.whatwg.org/#append-a-request-origin-header\nfunction appendRequestOriginHeader (request) {\n // 1. Let serializedOrigin be the result of byte-serializing a request origin with request.\n let serializedOrigin = request.origin\n\n // 2. If request\u2019s response tainting is \"cors\" or request\u2019s mode is \"websocket\", then append (`Origin`, serializedOrigin) to request\u2019s header list.\n if (request.responseTainting === 'cors' || request.mode === 'websocket') {\n if (serializedOrigin) {\n request.headersList.append('origin', serializedOrigin)\n }\n\n // 3. Otherwise, if request\u2019s method is neither `GET` nor `HEAD`, then:\n } else if (request.method !== 'GET' && request.method !== 'HEAD') {\n // 1. Switch on request\u2019s referrer policy:\n switch (request.referrerPolicy) {\n case 'no-referrer':\n // Set serializedOrigin to `null`.\n serializedOrigin = null\n break\n case 'no-referrer-when-downgrade':\n case 'strict-origin':\n case 'strict-origin-when-cross-origin':\n // If request\u2019s origin is a tuple origin, its scheme is \"https\", and request\u2019s current URL\u2019s scheme is not \"https\", then set serializedOrigin to `null`.\n if (request.origin && urlHasHttpsScheme(request.origin) && !urlHasHttpsScheme(requestCurrentURL(request))) {\n serializedOrigin = null\n }\n break\n case 'same-origin':\n // If request\u2019s origin is not same origin with request\u2019s current URL\u2019s origin, then set serializedOrigin to `null`.\n if (!sameOrigin(request, requestCurrentURL(request))) {\n serializedOrigin = null\n }\n break\n default:\n // Do nothing.\n }\n\n if (serializedOrigin) {\n // 2. Append (`Origin`, serializedOrigin) to request\u2019s header list.\n request.headersList.append('origin', serializedOrigin)\n }\n }\n}\n\nfunction coarsenedSharedCurrentTime (crossOriginIsolatedCapability) {\n // TODO\n return performance.now()\n}\n\n// https://fetch.spec.whatwg.org/#create-an-opaque-timing-info\nfunction createOpaqueTimingInfo (timingInfo) {\n return {\n startTime: timingInfo.startTime ?? 0,\n redirectStartTime: 0,\n redirectEndTime: 0,\n postRedirectStartTime: timingInfo.startTime ?? 0,\n finalServiceWorkerStartTime: 0,\n finalNetworkResponseStartTime: 0,\n finalNetworkRequestStartTime: 0,\n endTime: 0,\n encodedBodySize: 0,\n decodedBodySize: 0,\n finalConnectionTimingInfo: null\n }\n}\n\n// https://html.spec.whatwg.org/multipage/origin.html#policy-container\nfunction makePolicyContainer () {\n // Note: the fetch spec doesn't make use of embedder policy or CSP list\n return {\n referrerPolicy: 'strict-origin-when-cross-origin'\n }\n}\n\n// https://html.spec.whatwg.org/multipage/origin.html#clone-a-policy-container\nfunction clonePolicyContainer (policyContainer) {\n return {\n referrerPolicy: policyContainer.referrerPolicy\n }\n}\n\n// https://w3c.github.io/webappsec-referrer-policy/#determine-requests-referrer\nfunction determineRequestsReferrer (request) {\n // 1. Let policy be request's referrer policy.\n const policy = request.referrerPolicy\n\n // Note: policy cannot (shouldn't) be null or an empty string.\n assert(policy)\n\n // 2. Let environment be request\u2019s client.\n\n let referrerSource = null\n\n // 3. Switch on request\u2019s referrer:\n if (request.referrer === 'client') {\n // Note: node isn't a browser and doesn't implement document/iframes,\n // so we bypass this step and replace it with our own.\n\n const globalOrigin = getGlobalOrigin()\n\n if (!globalOrigin || globalOrigin.origin === 'null') {\n return 'no-referrer'\n }\n\n // note: we need to clone it as it's mutated\n referrerSource = new URL(globalOrigin)\n } else if (request.referrer instanceof URL) {\n // Let referrerSource be request\u2019s referrer.\n referrerSource = request.referrer\n }\n\n // 4. Let request\u2019s referrerURL be the result of stripping referrerSource for\n // use as a referrer.\n let referrerURL = stripURLForReferrer(referrerSource)\n\n // 5. Let referrerOrigin be the result of stripping referrerSource for use as\n // a referrer, with the origin-only flag set to true.\n const referrerOrigin = stripURLForReferrer(referrerSource, true)\n\n // 6. If the result of serializing referrerURL is a string whose length is\n // greater than 4096, set referrerURL to referrerOrigin.\n if (referrerURL.toString().length > 4096) {\n referrerURL = referrerOrigin\n }\n\n const areSameOrigin = sameOrigin(request, referrerURL)\n const isNonPotentiallyTrustWorthy = isURLPotentiallyTrustworthy(referrerURL) &&\n !isURLPotentiallyTrustworthy(request.url)\n\n // 8. Execute the switch statements corresponding to the value of policy:\n switch (policy) {\n case 'origin': return referrerOrigin != null ? referrerOrigin : stripURLForReferrer(referrerSource, true)\n case 'unsafe-url': return referrerURL\n case 'same-origin':\n return areSameOrigin ? referrerOrigin : 'no-referrer'\n case 'origin-when-cross-origin':\n return areSameOrigin ? referrerURL : referrerOrigin\n case 'strict-origin-when-cross-origin': {\n const currentURL = requestCurrentURL(request)\n\n // 1. If the origin of referrerURL and the origin of request\u2019s current\n // URL are the same, then return referrerURL.\n if (sameOrigin(referrerURL, currentURL)) {\n return referrerURL\n }\n\n // 2. If referrerURL is a potentially trustworthy URL and request\u2019s\n // current URL is not a potentially trustworthy URL, then return no\n // referrer.\n if (isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(currentURL)) {\n return 'no-referrer'\n }\n\n // 3. Return referrerOrigin.\n return referrerOrigin\n }\n case 'strict-origin': // eslint-disable-line\n /**\n * 1. If referrerURL is a potentially trustworthy URL and\n * request\u2019s current URL is not a potentially trustworthy URL,\n * then return no referrer.\n * 2. Return referrerOrigin\n */\n case 'no-referrer-when-downgrade': // eslint-disable-line\n /**\n * 1. If referrerURL is a potentially trustworthy URL and\n * request\u2019s current URL is not a potentially trustworthy URL,\n * then return no referrer.\n * 2. Return referrerOrigin\n */\n\n default: // eslint-disable-line\n return isNonPotentiallyTrustWorthy ? 'no-referrer' : referrerOrigin\n }\n}\n\n/**\n * @see https://w3c.github.io/webappsec-referrer-policy/#strip-url\n * @param {URL} url\n * @param {boolean|undefined} originOnly\n */\nfunction stripURLForReferrer (url, originOnly) {\n // 1. Assert: url is a URL.\n assert(url instanceof URL)\n\n // 2. If url\u2019s scheme is a local scheme, then return no referrer.\n if (url.protocol === 'file:' || url.protocol === 'about:' || url.protocol === 'blank:') {\n return 'no-referrer'\n }\n\n // 3. Set url\u2019s username to the empty string.\n url.username = ''\n\n // 4. Set url\u2019s password to the empty string.\n url.password = ''\n\n // 5. Set url\u2019s fragment to null.\n url.hash = ''\n\n // 6. If the origin-only flag is true, then:\n if (originOnly) {\n // 1. Set url\u2019s path to \u00AB the empty string \u00BB.\n url.pathname = ''\n\n // 2. Set url\u2019s query to null.\n url.search = ''\n }\n\n // 7. Return url.\n return url\n}\n\nfunction isURLPotentiallyTrustworthy (url) {\n if (!(url instanceof URL)) {\n return false\n }\n\n // If child of about, return true\n if (url.href === 'about:blank' || url.href === 'about:srcdoc') {\n return true\n }\n\n // If scheme is data, return true\n if (url.protocol === 'data:') return true\n\n // If file, return true\n if (url.protocol === 'file:') return true\n\n return isOriginPotentiallyTrustworthy(url.origin)\n\n function isOriginPotentiallyTrustworthy (origin) {\n // If origin is explicitly null, return false\n if (origin == null || origin === 'null') return false\n\n const originAsURL = new URL(origin)\n\n // If secure, return true\n if (originAsURL.protocol === 'https:' || originAsURL.protocol === 'wss:') {\n return true\n }\n\n // If localhost or variants, return true\n if (/^127(?:\\.[0-9]+){0,2}\\.[0-9]+$|^\\[(?:0*:)*?:?0*1\\]$/.test(originAsURL.hostname) ||\n (originAsURL.hostname === 'localhost' || originAsURL.hostname.includes('localhost.')) ||\n (originAsURL.hostname.endsWith('.localhost'))) {\n return true\n }\n\n // If any other, return false\n return false\n }\n}\n\n/**\n * @see https://w3c.github.io/webappsec-subresource-integrity/#does-response-match-metadatalist\n * @param {Uint8Array} bytes\n * @param {string} metadataList\n */\nfunction bytesMatch (bytes, metadataList) {\n // If node is not built with OpenSSL support, we cannot check\n // a request's integrity, so allow it by default (the spec will\n // allow requests if an invalid hash is given, as precedence).\n /* istanbul ignore if: only if node is built with --without-ssl */\n if (crypto === undefined) {\n return true\n }\n\n // 1. Let parsedMetadata be the result of parsing metadataList.\n const parsedMetadata = parseMetadata(metadataList)\n\n // 2. If parsedMetadata is no metadata, return true.\n if (parsedMetadata === 'no metadata') {\n return true\n }\n\n // 3. If response is not eligible for integrity validation, return false.\n // TODO\n\n // 4. If parsedMetadata is the empty set, return true.\n if (parsedMetadata.length === 0) {\n return true\n }\n\n // 5. Let metadata be the result of getting the strongest\n // metadata from parsedMetadata.\n const strongest = getStrongestMetadata(parsedMetadata)\n const metadata = filterMetadataListByAlgorithm(parsedMetadata, strongest)\n\n // 6. For each item in metadata:\n for (const item of metadata) {\n // 1. Let algorithm be the alg component of item.\n const algorithm = item.algo\n\n // 2. Let expectedValue be the val component of item.\n const expectedValue = item.hash\n\n // See https://github.com/web-platform-tests/wpt/commit/e4c5cc7a5e48093220528dfdd1c4012dc3837a0e\n // \"be liberal with padding\". This is annoying, and it's not even in the spec.\n\n // 3. Let actualValue be the result of applying algorithm to bytes.\n let actualValue = crypto.createHash(algorithm).update(bytes).digest('base64')\n\n if (actualValue[actualValue.length - 1] === '=') {\n if (actualValue[actualValue.length - 2] === '=') {\n actualValue = actualValue.slice(0, -2)\n } else {\n actualValue = actualValue.slice(0, -1)\n }\n }\n\n // 4. If actualValue is a case-sensitive match for expectedValue,\n // return true.\n if (compareBase64Mixed(actualValue, expectedValue)) {\n return true\n }\n }\n\n // 7. Return false.\n return false\n}\n\n// https://w3c.github.io/webappsec-subresource-integrity/#grammardef-hash-with-options\n// https://www.w3.org/TR/CSP2/#source-list-syntax\n// https://www.rfc-editor.org/rfc/rfc5234#appendix-B.1\nconst parseHashWithOptions = /(?sha256|sha384|sha512)-((?[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\\s|$)( +[!-~]*)?)?/i\n\n/**\n * @see https://w3c.github.io/webappsec-subresource-integrity/#parse-metadata\n * @param {string} metadata\n */\nfunction parseMetadata (metadata) {\n // 1. Let result be the empty set.\n /** @type {{ algo: string, hash: string }[]} */\n const result = []\n\n // 2. Let empty be equal to true.\n let empty = true\n\n // 3. For each token returned by splitting metadata on spaces:\n for (const token of metadata.split(' ')) {\n // 1. Set empty to false.\n empty = false\n\n // 2. Parse token as a hash-with-options.\n const parsedToken = parseHashWithOptions.exec(token)\n\n // 3. If token does not parse, continue to the next token.\n if (\n parsedToken === null ||\n parsedToken.groups === undefined ||\n parsedToken.groups.algo === undefined\n ) {\n // Note: Chromium blocks the request at this point, but Firefox\n // gives a warning that an invalid integrity was given. The\n // correct behavior is to ignore these, and subsequently not\n // check the integrity of the resource.\n continue\n }\n\n // 4. Let algorithm be the hash-algo component of token.\n const algorithm = parsedToken.groups.algo.toLowerCase()\n\n // 5. If algorithm is a hash function recognized by the user\n // agent, add the parsed token to result.\n if (supportedHashes.includes(algorithm)) {\n result.push(parsedToken.groups)\n }\n }\n\n // 4. Return no metadata if empty is true, otherwise return result.\n if (empty === true) {\n return 'no metadata'\n }\n\n return result\n}\n\n/**\n * @param {{ algo: 'sha256' | 'sha384' | 'sha512' }[]} metadataList\n */\nfunction getStrongestMetadata (metadataList) {\n // Let algorithm be the algo component of the first item in metadataList.\n // Can be sha256\n let algorithm = metadataList[0].algo\n // If the algorithm is sha512, then it is the strongest\n // and we can return immediately\n if (algorithm[3] === '5') {\n return algorithm\n }\n\n for (let i = 1; i < metadataList.length; ++i) {\n const metadata = metadataList[i]\n // If the algorithm is sha512, then it is the strongest\n // and we can break the loop immediately\n if (metadata.algo[3] === '5') {\n algorithm = 'sha512'\n break\n // If the algorithm is sha384, then a potential sha256 or sha384 is ignored\n } else if (algorithm[3] === '3') {\n continue\n // algorithm is sha256, check if algorithm is sha384 and if so, set it as\n // the strongest\n } else if (metadata.algo[3] === '3') {\n algorithm = 'sha384'\n }\n }\n return algorithm\n}\n\nfunction filterMetadataListByAlgorithm (metadataList, algorithm) {\n if (metadataList.length === 1) {\n return metadataList\n }\n\n let pos = 0\n for (let i = 0; i < metadataList.length; ++i) {\n if (metadataList[i].algo === algorithm) {\n metadataList[pos++] = metadataList[i]\n }\n }\n\n metadataList.length = pos\n\n return metadataList\n}\n\n/**\n * Compares two base64 strings, allowing for base64url\n * in the second string.\n *\n* @param {string} actualValue always base64\n * @param {string} expectedValue base64 or base64url\n * @returns {boolean}\n */\nfunction compareBase64Mixed (actualValue, expectedValue) {\n if (actualValue.length !== expectedValue.length) {\n return false\n }\n for (let i = 0; i < actualValue.length; ++i) {\n if (actualValue[i] !== expectedValue[i]) {\n if (\n (actualValue[i] === '+' && expectedValue[i] === '-') ||\n (actualValue[i] === '/' && expectedValue[i] === '_')\n ) {\n continue\n }\n return false\n }\n }\n\n return true\n}\n\n// https://w3c.github.io/webappsec-upgrade-insecure-requests/#upgrade-request\nfunction tryUpgradeRequestToAPotentiallyTrustworthyURL (request) {\n // TODO\n}\n\n/**\n * @link {https://html.spec.whatwg.org/multipage/origin.html#same-origin}\n * @param {URL} A\n * @param {URL} B\n */\nfunction sameOrigin (A, B) {\n // 1. If A and B are the same opaque origin, then return true.\n if (A.origin === B.origin && A.origin === 'null') {\n return true\n }\n\n // 2. If A and B are both tuple origins and their schemes,\n // hosts, and port are identical, then return true.\n if (A.protocol === B.protocol && A.hostname === B.hostname && A.port === B.port) {\n return true\n }\n\n // 3. Return false.\n return false\n}\n\nfunction createDeferredPromise () {\n let res\n let rej\n const promise = new Promise((resolve, reject) => {\n res = resolve\n rej = reject\n })\n\n return { promise, resolve: res, reject: rej }\n}\n\nfunction isAborted (fetchParams) {\n return fetchParams.controller.state === 'aborted'\n}\n\nfunction isCancelled (fetchParams) {\n return fetchParams.controller.state === 'aborted' ||\n fetchParams.controller.state === 'terminated'\n}\n\nconst normalizeMethodRecord = {\n delete: 'DELETE',\n DELETE: 'DELETE',\n get: 'GET',\n GET: 'GET',\n head: 'HEAD',\n HEAD: 'HEAD',\n options: 'OPTIONS',\n OPTIONS: 'OPTIONS',\n post: 'POST',\n POST: 'POST',\n put: 'PUT',\n PUT: 'PUT'\n}\n\n// Note: object prototypes should not be able to be referenced. e.g. `Object#hasOwnProperty`.\nObject.setPrototypeOf(normalizeMethodRecord, null)\n\n/**\n * @see https://fetch.spec.whatwg.org/#concept-method-normalize\n * @param {string} method\n */\nfunction normalizeMethod (method) {\n return normalizeMethodRecord[method.toLowerCase()] ?? method\n}\n\n// https://infra.spec.whatwg.org/#serialize-a-javascript-value-to-a-json-string\nfunction serializeJavascriptValueToJSONString (value) {\n // 1. Let result be ? Call(%JSON.stringify%, undefined, \u00AB value \u00BB).\n const result = JSON.stringify(value)\n\n // 2. If result is undefined, then throw a TypeError.\n if (result === undefined) {\n throw new TypeError('Value is not JSON serializable')\n }\n\n // 3. Assert: result is a string.\n assert(typeof result === 'string')\n\n // 4. Return result.\n return result\n}\n\n// https://tc39.es/ecma262/#sec-%25iteratorprototype%25-object\nconst esIteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()))\n\n/**\n * @see https://webidl.spec.whatwg.org/#dfn-iterator-prototype-object\n * @param {() => unknown[]} iterator\n * @param {string} name name of the instance\n * @param {'key'|'value'|'key+value'} kind\n */\nfunction makeIterator (iterator, name, kind) {\n const object = {\n index: 0,\n kind,\n target: iterator\n }\n\n const i = {\n next () {\n // 1. Let interface be the interface for which the iterator prototype object exists.\n\n // 2. Let thisValue be the this value.\n\n // 3. Let object be ? ToObject(thisValue).\n\n // 4. If object is a platform object, then perform a security\n // check, passing:\n\n // 5. If object is not a default iterator object for interface,\n // then throw a TypeError.\n if (Object.getPrototypeOf(this) !== i) {\n throw new TypeError(\n `'next' called on an object that does not implement interface ${name} Iterator.`\n )\n }\n\n // 6. Let index be object\u2019s index.\n // 7. Let kind be object\u2019s kind.\n // 8. Let values be object\u2019s target's value pairs to iterate over.\n const { index, kind, target } = object\n const values = target()\n\n // 9. Let len be the length of values.\n const len = values.length\n\n // 10. If index is greater than or equal to len, then return\n // CreateIterResultObject(undefined, true).\n if (index >= len) {\n return { value: undefined, done: true }\n }\n\n // 11. Let pair be the entry in values at index index.\n const pair = values[index]\n\n // 12. Set object\u2019s index to index + 1.\n object.index = index + 1\n\n // 13. Return the iterator result for pair and kind.\n return iteratorResult(pair, kind)\n },\n // The class string of an iterator prototype object for a given interface is the\n // result of concatenating the identifier of the interface and the string \" Iterator\".\n [Symbol.toStringTag]: `${name} Iterator`\n }\n\n // The [[Prototype]] internal slot of an iterator prototype object must be %IteratorPrototype%.\n Object.setPrototypeOf(i, esIteratorPrototype)\n // esIteratorPrototype needs to be the prototype of i\n // which is the prototype of an empty object. Yes, it's confusing.\n return Object.setPrototypeOf({}, i)\n}\n\n// https://webidl.spec.whatwg.org/#iterator-result\nfunction iteratorResult (pair, kind) {\n let result\n\n // 1. Let result be a value determined by the value of kind:\n switch (kind) {\n case 'key': {\n // 1. Let idlKey be pair\u2019s key.\n // 2. Let key be the result of converting idlKey to an\n // ECMAScript value.\n // 3. result is key.\n result = pair[0]\n break\n }\n case 'value': {\n // 1. Let idlValue be pair\u2019s value.\n // 2. Let value be the result of converting idlValue to\n // an ECMAScript value.\n // 3. result is value.\n result = pair[1]\n break\n }\n case 'key+value': {\n // 1. Let idlKey be pair\u2019s key.\n // 2. Let idlValue be pair\u2019s value.\n // 3. Let key be the result of converting idlKey to an\n // ECMAScript value.\n // 4. Let value be the result of converting idlValue to\n // an ECMAScript value.\n // 5. Let array be ! ArrayCreate(2).\n // 6. Call ! CreateDataProperty(array, \"0\", key).\n // 7. Call ! CreateDataProperty(array, \"1\", value).\n // 8. result is array.\n result = pair\n break\n }\n }\n\n // 2. Return CreateIterResultObject(result, false).\n return { value: result, done: false }\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#body-fully-read\n */\nasync function fullyReadBody (body, processBody, processBodyError) {\n // 1. If taskDestination is null, then set taskDestination to\n // the result of starting a new parallel queue.\n\n // 2. Let successSteps given a byte sequence bytes be to queue a\n // fetch task to run processBody given bytes, with taskDestination.\n const successSteps = processBody\n\n // 3. Let errorSteps be to queue a fetch task to run processBodyError,\n // with taskDestination.\n const errorSteps = processBodyError\n\n // 4. Let reader be the result of getting a reader for body\u2019s stream.\n // If that threw an exception, then run errorSteps with that\n // exception and return.\n let reader\n\n try {\n reader = body.stream.getReader()\n } catch (e) {\n errorSteps(e)\n return\n }\n\n // 5. Read all bytes from reader, given successSteps and errorSteps.\n try {\n const result = await readAllBytes(reader)\n successSteps(result)\n } catch (e) {\n errorSteps(e)\n }\n}\n\n/** @type {ReadableStream} */\nlet ReadableStream = globalThis.ReadableStream\n\nfunction isReadableStreamLike (stream) {\n if (!ReadableStream) {\n ReadableStream = require('stream/web').ReadableStream\n }\n\n return stream instanceof ReadableStream || (\n stream[Symbol.toStringTag] === 'ReadableStream' &&\n typeof stream.tee === 'function'\n )\n}\n\nconst MAXIMUM_ARGUMENT_LENGTH = 65535\n\n/**\n * @see https://infra.spec.whatwg.org/#isomorphic-decode\n * @param {number[]|Uint8Array} input\n */\nfunction isomorphicDecode (input) {\n // 1. To isomorphic decode a byte sequence input, return a string whose code point\n // length is equal to input\u2019s length and whose code points have the same values\n // as the values of input\u2019s bytes, in the same order.\n\n if (input.length < MAXIMUM_ARGUMENT_LENGTH) {\n return String.fromCharCode(...input)\n }\n\n return input.reduce((previous, current) => previous + String.fromCharCode(current), '')\n}\n\n/**\n * @param {ReadableStreamController} controller\n */\nfunction readableStreamClose (controller) {\n try {\n controller.close()\n } catch (err) {\n // TODO: add comment explaining why this error occurs.\n if (!err.message.includes('Controller is already closed')) {\n throw err\n }\n }\n}\n\n/**\n * @see https://infra.spec.whatwg.org/#isomorphic-encode\n * @param {string} input\n */\nfunction isomorphicEncode (input) {\n // 1. Assert: input contains no code points greater than U+00FF.\n for (let i = 0; i < input.length; i++) {\n assert(input.charCodeAt(i) <= 0xFF)\n }\n\n // 2. Return a byte sequence whose length is equal to input\u2019s code\n // point length and whose bytes have the same values as the\n // values of input\u2019s code points, in the same order\n return input\n}\n\n/**\n * @see https://streams.spec.whatwg.org/#readablestreamdefaultreader-read-all-bytes\n * @see https://streams.spec.whatwg.org/#read-loop\n * @param {ReadableStreamDefaultReader} reader\n */\nasync function readAllBytes (reader) {\n const bytes = []\n let byteLength = 0\n\n while (true) {\n const { done, value: chunk } = await reader.read()\n\n if (done) {\n // 1. Call successSteps with bytes.\n return Buffer.concat(bytes, byteLength)\n }\n\n // 1. If chunk is not a Uint8Array object, call failureSteps\n // with a TypeError and abort these steps.\n if (!isUint8Array(chunk)) {\n throw new TypeError('Received non-Uint8Array chunk')\n }\n\n // 2. Append the bytes represented by chunk to bytes.\n bytes.push(chunk)\n byteLength += chunk.length\n\n // 3. Read-loop given reader, bytes, successSteps, and failureSteps.\n }\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#is-local\n * @param {URL} url\n */\nfunction urlIsLocal (url) {\n assert('protocol' in url) // ensure it's a url object\n\n const protocol = url.protocol\n\n return protocol === 'about:' || protocol === 'blob:' || protocol === 'data:'\n}\n\n/**\n * @param {string|URL} url\n */\nfunction urlHasHttpsScheme (url) {\n if (typeof url === 'string') {\n return url.startsWith('https:')\n }\n\n return url.protocol === 'https:'\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#http-scheme\n * @param {URL} url\n */\nfunction urlIsHttpHttpsScheme (url) {\n assert('protocol' in url) // ensure it's a url object\n\n const protocol = url.protocol\n\n return protocol === 'http:' || protocol === 'https:'\n}\n\n/**\n * Fetch supports node >= 16.8.0, but Object.hasOwn was added in v16.9.0.\n */\nconst hasOwn = Object.hasOwn || ((dict, key) => Object.prototype.hasOwnProperty.call(dict, key))\n\nmodule.exports = {\n isAborted,\n isCancelled,\n createDeferredPromise,\n ReadableStreamFrom,\n toUSVString,\n tryUpgradeRequestToAPotentiallyTrustworthyURL,\n coarsenedSharedCurrentTime,\n determineRequestsReferrer,\n makePolicyContainer,\n clonePolicyContainer,\n appendFetchMetadata,\n appendRequestOriginHeader,\n TAOCheck,\n corsCheck,\n crossOriginResourcePolicyCheck,\n createOpaqueTimingInfo,\n setRequestReferrerPolicyOnRedirect,\n isValidHTTPToken,\n requestBadPort,\n requestCurrentURL,\n responseURL,\n responseLocationURL,\n isBlobLike,\n isURLPotentiallyTrustworthy,\n isValidReasonPhrase,\n sameOrigin,\n normalizeMethod,\n serializeJavascriptValueToJSONString,\n makeIterator,\n isValidHeaderName,\n isValidHeaderValue,\n hasOwn,\n isErrorLike,\n fullyReadBody,\n bytesMatch,\n isReadableStreamLike,\n readableStreamClose,\n isomorphicEncode,\n isomorphicDecode,\n urlIsLocal,\n urlHasHttpsScheme,\n urlIsHttpHttpsScheme,\n readAllBytes,\n normalizeMethodRecord,\n parseMetadata\n}\n", "'use strict'\n\nmodule.exports = {\n kUrl: Symbol('url'),\n kHeaders: Symbol('headers'),\n kSignal: Symbol('signal'),\n kState: Symbol('state'),\n kGuard: Symbol('guard'),\n kRealm: Symbol('realm')\n}\n", "'use strict'\n\nconst { types } = require('util')\nconst { hasOwn, toUSVString } = require('./util')\n\n/** @type {import('../../types/webidl').Webidl} */\nconst webidl = {}\nwebidl.converters = {}\nwebidl.util = {}\nwebidl.errors = {}\n\nwebidl.errors.exception = function (message) {\n return new TypeError(`${message.header}: ${message.message}`)\n}\n\nwebidl.errors.conversionFailed = function (context) {\n const plural = context.types.length === 1 ? '' : ' one of'\n const message =\n `${context.argument} could not be converted to` +\n `${plural}: ${context.types.join(', ')}.`\n\n return webidl.errors.exception({\n header: context.prefix,\n message\n })\n}\n\nwebidl.errors.invalidArgument = function (context) {\n return webidl.errors.exception({\n header: context.prefix,\n message: `\"${context.value}\" is an invalid ${context.type}.`\n })\n}\n\n// https://webidl.spec.whatwg.org/#implements\nwebidl.brandCheck = function (V, I, opts = undefined) {\n if (opts?.strict !== false && !(V instanceof I)) {\n throw new TypeError('Illegal invocation')\n } else {\n return V?.[Symbol.toStringTag] === I.prototype[Symbol.toStringTag]\n }\n}\n\nwebidl.argumentLengthCheck = function ({ length }, min, ctx) {\n if (length < min) {\n throw webidl.errors.exception({\n message: `${min} argument${min !== 1 ? 's' : ''} required, ` +\n `but${length ? ' only' : ''} ${length} found.`,\n ...ctx\n })\n }\n}\n\nwebidl.illegalConstructor = function () {\n throw webidl.errors.exception({\n header: 'TypeError',\n message: 'Illegal constructor'\n })\n}\n\n// https://tc39.es/ecma262/#sec-ecmascript-data-types-and-values\nwebidl.util.Type = function (V) {\n switch (typeof V) {\n case 'undefined': return 'Undefined'\n case 'boolean': return 'Boolean'\n case 'string': return 'String'\n case 'symbol': return 'Symbol'\n case 'number': return 'Number'\n case 'bigint': return 'BigInt'\n case 'function':\n case 'object': {\n if (V === null) {\n return 'Null'\n }\n\n return 'Object'\n }\n }\n}\n\n// https://webidl.spec.whatwg.org/#abstract-opdef-converttoint\nwebidl.util.ConvertToInt = function (V, bitLength, signedness, opts = {}) {\n let upperBound\n let lowerBound\n\n // 1. If bitLength is 64, then:\n if (bitLength === 64) {\n // 1. Let upperBound be 2^53 \u2212 1.\n upperBound = Math.pow(2, 53) - 1\n\n // 2. If signedness is \"unsigned\", then let lowerBound be 0.\n if (signedness === 'unsigned') {\n lowerBound = 0\n } else {\n // 3. Otherwise let lowerBound be \u22122^53 + 1.\n lowerBound = Math.pow(-2, 53) + 1\n }\n } else if (signedness === 'unsigned') {\n // 2. Otherwise, if signedness is \"unsigned\", then:\n\n // 1. Let lowerBound be 0.\n lowerBound = 0\n\n // 2. Let upperBound be 2^bitLength \u2212 1.\n upperBound = Math.pow(2, bitLength) - 1\n } else {\n // 3. Otherwise:\n\n // 1. Let lowerBound be -2^bitLength \u2212 1.\n lowerBound = Math.pow(-2, bitLength) - 1\n\n // 2. Let upperBound be 2^bitLength \u2212 1 \u2212 1.\n upperBound = Math.pow(2, bitLength - 1) - 1\n }\n\n // 4. Let x be ? ToNumber(V).\n let x = Number(V)\n\n // 5. If x is \u22120, then set x to +0.\n if (x === 0) {\n x = 0\n }\n\n // 6. If the conversion is to an IDL type associated\n // with the [EnforceRange] extended attribute, then:\n if (opts.enforceRange === true) {\n // 1. If x is NaN, +\u221E, or \u2212\u221E, then throw a TypeError.\n if (\n Number.isNaN(x) ||\n x === Number.POSITIVE_INFINITY ||\n x === Number.NEGATIVE_INFINITY\n ) {\n throw webidl.errors.exception({\n header: 'Integer conversion',\n message: `Could not convert ${V} to an integer.`\n })\n }\n\n // 2. Set x to IntegerPart(x).\n x = webidl.util.IntegerPart(x)\n\n // 3. If x < lowerBound or x > upperBound, then\n // throw a TypeError.\n if (x < lowerBound || x > upperBound) {\n throw webidl.errors.exception({\n header: 'Integer conversion',\n message: `Value must be between ${lowerBound}-${upperBound}, got ${x}.`\n })\n }\n\n // 4. Return x.\n return x\n }\n\n // 7. If x is not NaN and the conversion is to an IDL\n // type associated with the [Clamp] extended\n // attribute, then:\n if (!Number.isNaN(x) && opts.clamp === true) {\n // 1. Set x to min(max(x, lowerBound), upperBound).\n x = Math.min(Math.max(x, lowerBound), upperBound)\n\n // 2. Round x to the nearest integer, choosing the\n // even integer if it lies halfway between two,\n // and choosing +0 rather than \u22120.\n if (Math.floor(x) % 2 === 0) {\n x = Math.floor(x)\n } else {\n x = Math.ceil(x)\n }\n\n // 3. Return x.\n return x\n }\n\n // 8. If x is NaN, +0, +\u221E, or \u2212\u221E, then return +0.\n if (\n Number.isNaN(x) ||\n (x === 0 && Object.is(0, x)) ||\n x === Number.POSITIVE_INFINITY ||\n x === Number.NEGATIVE_INFINITY\n ) {\n return 0\n }\n\n // 9. Set x to IntegerPart(x).\n x = webidl.util.IntegerPart(x)\n\n // 10. Set x to x modulo 2^bitLength.\n x = x % Math.pow(2, bitLength)\n\n // 11. If signedness is \"signed\" and x \u2265 2^bitLength \u2212 1,\n // then return x \u2212 2^bitLength.\n if (signedness === 'signed' && x >= Math.pow(2, bitLength) - 1) {\n return x - Math.pow(2, bitLength)\n }\n\n // 12. Otherwise, return x.\n return x\n}\n\n// https://webidl.spec.whatwg.org/#abstract-opdef-integerpart\nwebidl.util.IntegerPart = function (n) {\n // 1. Let r be floor(abs(n)).\n const r = Math.floor(Math.abs(n))\n\n // 2. If n < 0, then return -1 \u00D7 r.\n if (n < 0) {\n return -1 * r\n }\n\n // 3. Otherwise, return r.\n return r\n}\n\n// https://webidl.spec.whatwg.org/#es-sequence\nwebidl.sequenceConverter = function (converter) {\n return (V) => {\n // 1. If Type(V) is not Object, throw a TypeError.\n if (webidl.util.Type(V) !== 'Object') {\n throw webidl.errors.exception({\n header: 'Sequence',\n message: `Value of type ${webidl.util.Type(V)} is not an Object.`\n })\n }\n\n // 2. Let method be ? GetMethod(V, @@iterator).\n /** @type {Generator} */\n const method = V?.[Symbol.iterator]?.()\n const seq = []\n\n // 3. If method is undefined, throw a TypeError.\n if (\n method === undefined ||\n typeof method.next !== 'function'\n ) {\n throw webidl.errors.exception({\n header: 'Sequence',\n message: 'Object is not an iterator.'\n })\n }\n\n // https://webidl.spec.whatwg.org/#create-sequence-from-iterable\n while (true) {\n const { done, value } = method.next()\n\n if (done) {\n break\n }\n\n seq.push(converter(value))\n }\n\n return seq\n }\n}\n\n// https://webidl.spec.whatwg.org/#es-to-record\nwebidl.recordConverter = function (keyConverter, valueConverter) {\n return (O) => {\n // 1. If Type(O) is not Object, throw a TypeError.\n if (webidl.util.Type(O) !== 'Object') {\n throw webidl.errors.exception({\n header: 'Record',\n message: `Value of type ${webidl.util.Type(O)} is not an Object.`\n })\n }\n\n // 2. Let result be a new empty instance of record.\n const result = {}\n\n if (!types.isProxy(O)) {\n // Object.keys only returns enumerable properties\n const keys = Object.keys(O)\n\n for (const key of keys) {\n // 1. Let typedKey be key converted to an IDL value of type K.\n const typedKey = keyConverter(key)\n\n // 2. Let value be ? Get(O, key).\n // 3. Let typedValue be value converted to an IDL value of type V.\n const typedValue = valueConverter(O[key])\n\n // 4. Set result[typedKey] to typedValue.\n result[typedKey] = typedValue\n }\n\n // 5. Return result.\n return result\n }\n\n // 3. Let keys be ? O.[[OwnPropertyKeys]]().\n const keys = Reflect.ownKeys(O)\n\n // 4. For each key of keys.\n for (const key of keys) {\n // 1. Let desc be ? O.[[GetOwnProperty]](key).\n const desc = Reflect.getOwnPropertyDescriptor(O, key)\n\n // 2. If desc is not undefined and desc.[[Enumerable]] is true:\n if (desc?.enumerable) {\n // 1. Let typedKey be key converted to an IDL value of type K.\n const typedKey = keyConverter(key)\n\n // 2. Let value be ? Get(O, key).\n // 3. Let typedValue be value converted to an IDL value of type V.\n const typedValue = valueConverter(O[key])\n\n // 4. Set result[typedKey] to typedValue.\n result[typedKey] = typedValue\n }\n }\n\n // 5. Return result.\n return result\n }\n}\n\nwebidl.interfaceConverter = function (i) {\n return (V, opts = {}) => {\n if (opts.strict !== false && !(V instanceof i)) {\n throw webidl.errors.exception({\n header: i.name,\n message: `Expected ${V} to be an instance of ${i.name}.`\n })\n }\n\n return V\n }\n}\n\nwebidl.dictionaryConverter = function (converters) {\n return (dictionary) => {\n const type = webidl.util.Type(dictionary)\n const dict = {}\n\n if (type === 'Null' || type === 'Undefined') {\n return dict\n } else if (type !== 'Object') {\n throw webidl.errors.exception({\n header: 'Dictionary',\n message: `Expected ${dictionary} to be one of: Null, Undefined, Object.`\n })\n }\n\n for (const options of converters) {\n const { key, defaultValue, required, converter } = options\n\n if (required === true) {\n if (!hasOwn(dictionary, key)) {\n throw webidl.errors.exception({\n header: 'Dictionary',\n message: `Missing required key \"${key}\".`\n })\n }\n }\n\n let value = dictionary[key]\n const hasDefault = hasOwn(options, 'defaultValue')\n\n // Only use defaultValue if value is undefined and\n // a defaultValue options was provided.\n if (hasDefault && value !== null) {\n value = value ?? defaultValue\n }\n\n // A key can be optional and have no default value.\n // When this happens, do not perform a conversion,\n // and do not assign the key a value.\n if (required || hasDefault || value !== undefined) {\n value = converter(value)\n\n if (\n options.allowedValues &&\n !options.allowedValues.includes(value)\n ) {\n throw webidl.errors.exception({\n header: 'Dictionary',\n message: `${value} is not an accepted type. Expected one of ${options.allowedValues.join(', ')}.`\n })\n }\n\n dict[key] = value\n }\n }\n\n return dict\n }\n}\n\nwebidl.nullableConverter = function (converter) {\n return (V) => {\n if (V === null) {\n return V\n }\n\n return converter(V)\n }\n}\n\n// https://webidl.spec.whatwg.org/#es-DOMString\nwebidl.converters.DOMString = function (V, opts = {}) {\n // 1. If V is null and the conversion is to an IDL type\n // associated with the [LegacyNullToEmptyString]\n // extended attribute, then return the DOMString value\n // that represents the empty string.\n if (V === null && opts.legacyNullToEmptyString) {\n return ''\n }\n\n // 2. Let x be ? ToString(V).\n if (typeof V === 'symbol') {\n throw new TypeError('Could not convert argument of type symbol to string.')\n }\n\n // 3. Return the IDL DOMString value that represents the\n // same sequence of code units as the one the\n // ECMAScript String value x represents.\n return String(V)\n}\n\n// https://webidl.spec.whatwg.org/#es-ByteString\nwebidl.converters.ByteString = function (V) {\n // 1. Let x be ? ToString(V).\n // Note: DOMString converter perform ? ToString(V)\n const x = webidl.converters.DOMString(V)\n\n // 2. If the value of any element of x is greater than\n // 255, then throw a TypeError.\n for (let index = 0; index < x.length; index++) {\n if (x.charCodeAt(index) > 255) {\n throw new TypeError(\n 'Cannot convert argument to a ByteString because the character at ' +\n `index ${index} has a value of ${x.charCodeAt(index)} which is greater than 255.`\n )\n }\n }\n\n // 3. Return an IDL ByteString value whose length is the\n // length of x, and where the value of each element is\n // the value of the corresponding element of x.\n return x\n}\n\n// https://webidl.spec.whatwg.org/#es-USVString\nwebidl.converters.USVString = toUSVString\n\n// https://webidl.spec.whatwg.org/#es-boolean\nwebidl.converters.boolean = function (V) {\n // 1. Let x be the result of computing ToBoolean(V).\n const x = Boolean(V)\n\n // 2. Return the IDL boolean value that is the one that represents\n // the same truth value as the ECMAScript Boolean value x.\n return x\n}\n\n// https://webidl.spec.whatwg.org/#es-any\nwebidl.converters.any = function (V) {\n return V\n}\n\n// https://webidl.spec.whatwg.org/#es-long-long\nwebidl.converters['long long'] = function (V) {\n // 1. Let x be ? ConvertToInt(V, 64, \"signed\").\n const x = webidl.util.ConvertToInt(V, 64, 'signed')\n\n // 2. Return the IDL long long value that represents\n // the same numeric value as x.\n return x\n}\n\n// https://webidl.spec.whatwg.org/#es-unsigned-long-long\nwebidl.converters['unsigned long long'] = function (V) {\n // 1. Let x be ? ConvertToInt(V, 64, \"unsigned\").\n const x = webidl.util.ConvertToInt(V, 64, 'unsigned')\n\n // 2. Return the IDL unsigned long long value that\n // represents the same numeric value as x.\n return x\n}\n\n// https://webidl.spec.whatwg.org/#es-unsigned-long\nwebidl.converters['unsigned long'] = function (V) {\n // 1. Let x be ? ConvertToInt(V, 32, \"unsigned\").\n const x = webidl.util.ConvertToInt(V, 32, 'unsigned')\n\n // 2. Return the IDL unsigned long value that\n // represents the same numeric value as x.\n return x\n}\n\n// https://webidl.spec.whatwg.org/#es-unsigned-short\nwebidl.converters['unsigned short'] = function (V, opts) {\n // 1. Let x be ? ConvertToInt(V, 16, \"unsigned\").\n const x = webidl.util.ConvertToInt(V, 16, 'unsigned', opts)\n\n // 2. Return the IDL unsigned short value that represents\n // the same numeric value as x.\n return x\n}\n\n// https://webidl.spec.whatwg.org/#idl-ArrayBuffer\nwebidl.converters.ArrayBuffer = function (V, opts = {}) {\n // 1. If Type(V) is not Object, or V does not have an\n // [[ArrayBufferData]] internal slot, then throw a\n // TypeError.\n // see: https://tc39.es/ecma262/#sec-properties-of-the-arraybuffer-instances\n // see: https://tc39.es/ecma262/#sec-properties-of-the-sharedarraybuffer-instances\n if (\n webidl.util.Type(V) !== 'Object' ||\n !types.isAnyArrayBuffer(V)\n ) {\n throw webidl.errors.conversionFailed({\n prefix: `${V}`,\n argument: `${V}`,\n types: ['ArrayBuffer']\n })\n }\n\n // 2. If the conversion is not to an IDL type associated\n // with the [AllowShared] extended attribute, and\n // IsSharedArrayBuffer(V) is true, then throw a\n // TypeError.\n if (opts.allowShared === false && types.isSharedArrayBuffer(V)) {\n throw webidl.errors.exception({\n header: 'ArrayBuffer',\n message: 'SharedArrayBuffer is not allowed.'\n })\n }\n\n // 3. If the conversion is not to an IDL type associated\n // with the [AllowResizable] extended attribute, and\n // IsResizableArrayBuffer(V) is true, then throw a\n // TypeError.\n // Note: resizable ArrayBuffers are currently a proposal.\n\n // 4. Return the IDL ArrayBuffer value that is a\n // reference to the same object as V.\n return V\n}\n\nwebidl.converters.TypedArray = function (V, T, opts = {}) {\n // 1. Let T be the IDL type V is being converted to.\n\n // 2. If Type(V) is not Object, or V does not have a\n // [[TypedArrayName]] internal slot with a value\n // equal to T\u2019s name, then throw a TypeError.\n if (\n webidl.util.Type(V) !== 'Object' ||\n !types.isTypedArray(V) ||\n V.constructor.name !== T.name\n ) {\n throw webidl.errors.conversionFailed({\n prefix: `${T.name}`,\n argument: `${V}`,\n types: [T.name]\n })\n }\n\n // 3. If the conversion is not to an IDL type associated\n // with the [AllowShared] extended attribute, and\n // IsSharedArrayBuffer(V.[[ViewedArrayBuffer]]) is\n // true, then throw a TypeError.\n if (opts.allowShared === false && types.isSharedArrayBuffer(V.buffer)) {\n throw webidl.errors.exception({\n header: 'ArrayBuffer',\n message: 'SharedArrayBuffer is not allowed.'\n })\n }\n\n // 4. If the conversion is not to an IDL type associated\n // with the [AllowResizable] extended attribute, and\n // IsResizableArrayBuffer(V.[[ViewedArrayBuffer]]) is\n // true, then throw a TypeError.\n // Note: resizable array buffers are currently a proposal\n\n // 5. Return the IDL value of type T that is a reference\n // to the same object as V.\n return V\n}\n\nwebidl.converters.DataView = function (V, opts = {}) {\n // 1. If Type(V) is not Object, or V does not have a\n // [[DataView]] internal slot, then throw a TypeError.\n if (webidl.util.Type(V) !== 'Object' || !types.isDataView(V)) {\n throw webidl.errors.exception({\n header: 'DataView',\n message: 'Object is not a DataView.'\n })\n }\n\n // 2. If the conversion is not to an IDL type associated\n // with the [AllowShared] extended attribute, and\n // IsSharedArrayBuffer(V.[[ViewedArrayBuffer]]) is true,\n // then throw a TypeError.\n if (opts.allowShared === false && types.isSharedArrayBuffer(V.buffer)) {\n throw webidl.errors.exception({\n header: 'ArrayBuffer',\n message: 'SharedArrayBuffer is not allowed.'\n })\n }\n\n // 3. If the conversion is not to an IDL type associated\n // with the [AllowResizable] extended attribute, and\n // IsResizableArrayBuffer(V.[[ViewedArrayBuffer]]) is\n // true, then throw a TypeError.\n // Note: resizable ArrayBuffers are currently a proposal\n\n // 4. Return the IDL DataView value that is a reference\n // to the same object as V.\n return V\n}\n\n// https://webidl.spec.whatwg.org/#BufferSource\nwebidl.converters.BufferSource = function (V, opts = {}) {\n if (types.isAnyArrayBuffer(V)) {\n return webidl.converters.ArrayBuffer(V, opts)\n }\n\n if (types.isTypedArray(V)) {\n return webidl.converters.TypedArray(V, V.constructor)\n }\n\n if (types.isDataView(V)) {\n return webidl.converters.DataView(V, opts)\n }\n\n throw new TypeError(`Could not convert ${V} to a BufferSource.`)\n}\n\nwebidl.converters['sequence'] = webidl.sequenceConverter(\n webidl.converters.ByteString\n)\n\nwebidl.converters['sequence>'] = webidl.sequenceConverter(\n webidl.converters['sequence']\n)\n\nwebidl.converters['record'] = webidl.recordConverter(\n webidl.converters.ByteString,\n webidl.converters.ByteString\n)\n\nmodule.exports = {\n webidl\n}\n", "const assert = require('assert')\nconst { atob } = require('buffer')\nconst { isomorphicDecode } = require('./util')\n\nconst encoder = new TextEncoder()\n\n/**\n * @see https://mimesniff.spec.whatwg.org/#http-token-code-point\n */\nconst HTTP_TOKEN_CODEPOINTS = /^[!#$%&'*+-.^_|~A-Za-z0-9]+$/\nconst HTTP_WHITESPACE_REGEX = /(\\u000A|\\u000D|\\u0009|\\u0020)/ // eslint-disable-line\n/**\n * @see https://mimesniff.spec.whatwg.org/#http-quoted-string-token-code-point\n */\nconst HTTP_QUOTED_STRING_TOKENS = /[\\u0009|\\u0020-\\u007E|\\u0080-\\u00FF]/ // eslint-disable-line\n\n// https://fetch.spec.whatwg.org/#data-url-processor\n/** @param {URL} dataURL */\nfunction dataURLProcessor (dataURL) {\n // 1. Assert: dataURL\u2019s scheme is \"data\".\n assert(dataURL.protocol === 'data:')\n\n // 2. Let input be the result of running the URL\n // serializer on dataURL with exclude fragment\n // set to true.\n let input = URLSerializer(dataURL, true)\n\n // 3. Remove the leading \"data:\" string from input.\n input = input.slice(5)\n\n // 4. Let position point at the start of input.\n const position = { position: 0 }\n\n // 5. Let mimeType be the result of collecting a\n // sequence of code points that are not equal\n // to U+002C (,), given position.\n let mimeType = collectASequenceOfCodePointsFast(\n ',',\n input,\n position\n )\n\n // 6. Strip leading and trailing ASCII whitespace\n // from mimeType.\n // Undici implementation note: we need to store the\n // length because if the mimetype has spaces removed,\n // the wrong amount will be sliced from the input in\n // step #9\n const mimeTypeLength = mimeType.length\n mimeType = removeASCIIWhitespace(mimeType, true, true)\n\n // 7. If position is past the end of input, then\n // return failure\n if (position.position >= input.length) {\n return 'failure'\n }\n\n // 8. Advance position by 1.\n position.position++\n\n // 9. Let encodedBody be the remainder of input.\n const encodedBody = input.slice(mimeTypeLength + 1)\n\n // 10. Let body be the percent-decoding of encodedBody.\n let body = stringPercentDecode(encodedBody)\n\n // 11. If mimeType ends with U+003B (;), followed by\n // zero or more U+0020 SPACE, followed by an ASCII\n // case-insensitive match for \"base64\", then:\n if (/;(\\u0020){0,}base64$/i.test(mimeType)) {\n // 1. Let stringBody be the isomorphic decode of body.\n const stringBody = isomorphicDecode(body)\n\n // 2. Set body to the forgiving-base64 decode of\n // stringBody.\n body = forgivingBase64(stringBody)\n\n // 3. If body is failure, then return failure.\n if (body === 'failure') {\n return 'failure'\n }\n\n // 4. Remove the last 6 code points from mimeType.\n mimeType = mimeType.slice(0, -6)\n\n // 5. Remove trailing U+0020 SPACE code points from mimeType,\n // if any.\n mimeType = mimeType.replace(/(\\u0020)+$/, '')\n\n // 6. Remove the last U+003B (;) code point from mimeType.\n mimeType = mimeType.slice(0, -1)\n }\n\n // 12. If mimeType starts with U+003B (;), then prepend\n // \"text/plain\" to mimeType.\n if (mimeType.startsWith(';')) {\n mimeType = 'text/plain' + mimeType\n }\n\n // 13. Let mimeTypeRecord be the result of parsing\n // mimeType.\n let mimeTypeRecord = parseMIMEType(mimeType)\n\n // 14. If mimeTypeRecord is failure, then set\n // mimeTypeRecord to text/plain;charset=US-ASCII.\n if (mimeTypeRecord === 'failure') {\n mimeTypeRecord = parseMIMEType('text/plain;charset=US-ASCII')\n }\n\n // 15. Return a new data: URL struct whose MIME\n // type is mimeTypeRecord and body is body.\n // https://fetch.spec.whatwg.org/#data-url-struct\n return { mimeType: mimeTypeRecord, body }\n}\n\n// https://url.spec.whatwg.org/#concept-url-serializer\n/**\n * @param {URL} url\n * @param {boolean} excludeFragment\n */\nfunction URLSerializer (url, excludeFragment = false) {\n if (!excludeFragment) {\n return url.href\n }\n\n const href = url.href\n const hashLength = url.hash.length\n\n return hashLength === 0 ? href : href.substring(0, href.length - hashLength)\n}\n\n// https://infra.spec.whatwg.org/#collect-a-sequence-of-code-points\n/**\n * @param {(char: string) => boolean} condition\n * @param {string} input\n * @param {{ position: number }} position\n */\nfunction collectASequenceOfCodePoints (condition, input, position) {\n // 1. Let result be the empty string.\n let result = ''\n\n // 2. While position doesn\u2019t point past the end of input and the\n // code point at position within input meets the condition condition:\n while (position.position < input.length && condition(input[position.position])) {\n // 1. Append that code point to the end of result.\n result += input[position.position]\n\n // 2. Advance position by 1.\n position.position++\n }\n\n // 3. Return result.\n return result\n}\n\n/**\n * A faster collectASequenceOfCodePoints that only works when comparing a single character.\n * @param {string} char\n * @param {string} input\n * @param {{ position: number }} position\n */\nfunction collectASequenceOfCodePointsFast (char, input, position) {\n const idx = input.indexOf(char, position.position)\n const start = position.position\n\n if (idx === -1) {\n position.position = input.length\n return input.slice(start)\n }\n\n position.position = idx\n return input.slice(start, position.position)\n}\n\n// https://url.spec.whatwg.org/#string-percent-decode\n/** @param {string} input */\nfunction stringPercentDecode (input) {\n // 1. Let bytes be the UTF-8 encoding of input.\n const bytes = encoder.encode(input)\n\n // 2. Return the percent-decoding of bytes.\n return percentDecode(bytes)\n}\n\n// https://url.spec.whatwg.org/#percent-decode\n/** @param {Uint8Array} input */\nfunction percentDecode (input) {\n // 1. Let output be an empty byte sequence.\n /** @type {number[]} */\n const output = []\n\n // 2. For each byte byte in input:\n for (let i = 0; i < input.length; i++) {\n const byte = input[i]\n\n // 1. If byte is not 0x25 (%), then append byte to output.\n if (byte !== 0x25) {\n output.push(byte)\n\n // 2. Otherwise, if byte is 0x25 (%) and the next two bytes\n // after byte in input are not in the ranges\n // 0x30 (0) to 0x39 (9), 0x41 (A) to 0x46 (F),\n // and 0x61 (a) to 0x66 (f), all inclusive, append byte\n // to output.\n } else if (\n byte === 0x25 &&\n !/^[0-9A-Fa-f]{2}$/i.test(String.fromCharCode(input[i + 1], input[i + 2]))\n ) {\n output.push(0x25)\n\n // 3. Otherwise:\n } else {\n // 1. Let bytePoint be the two bytes after byte in input,\n // decoded, and then interpreted as hexadecimal number.\n const nextTwoBytes = String.fromCharCode(input[i + 1], input[i + 2])\n const bytePoint = Number.parseInt(nextTwoBytes, 16)\n\n // 2. Append a byte whose value is bytePoint to output.\n output.push(bytePoint)\n\n // 3. Skip the next two bytes in input.\n i += 2\n }\n }\n\n // 3. Return output.\n return Uint8Array.from(output)\n}\n\n// https://mimesniff.spec.whatwg.org/#parse-a-mime-type\n/** @param {string} input */\nfunction parseMIMEType (input) {\n // 1. Remove any leading and trailing HTTP whitespace\n // from input.\n input = removeHTTPWhitespace(input, true, true)\n\n // 2. Let position be a position variable for input,\n // initially pointing at the start of input.\n const position = { position: 0 }\n\n // 3. Let type be the result of collecting a sequence\n // of code points that are not U+002F (/) from\n // input, given position.\n const type = collectASequenceOfCodePointsFast(\n '/',\n input,\n position\n )\n\n // 4. If type is the empty string or does not solely\n // contain HTTP token code points, then return failure.\n // https://mimesniff.spec.whatwg.org/#http-token-code-point\n if (type.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(type)) {\n return 'failure'\n }\n\n // 5. If position is past the end of input, then return\n // failure\n if (position.position > input.length) {\n return 'failure'\n }\n\n // 6. Advance position by 1. (This skips past U+002F (/).)\n position.position++\n\n // 7. Let subtype be the result of collecting a sequence of\n // code points that are not U+003B (;) from input, given\n // position.\n let subtype = collectASequenceOfCodePointsFast(\n ';',\n input,\n position\n )\n\n // 8. Remove any trailing HTTP whitespace from subtype.\n subtype = removeHTTPWhitespace(subtype, false, true)\n\n // 9. If subtype is the empty string or does not solely\n // contain HTTP token code points, then return failure.\n if (subtype.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(subtype)) {\n return 'failure'\n }\n\n const typeLowercase = type.toLowerCase()\n const subtypeLowercase = subtype.toLowerCase()\n\n // 10. Let mimeType be a new MIME type record whose type\n // is type, in ASCII lowercase, and subtype is subtype,\n // in ASCII lowercase.\n // https://mimesniff.spec.whatwg.org/#mime-type\n const mimeType = {\n type: typeLowercase,\n subtype: subtypeLowercase,\n /** @type {Map} */\n parameters: new Map(),\n // https://mimesniff.spec.whatwg.org/#mime-type-essence\n essence: `${typeLowercase}/${subtypeLowercase}`\n }\n\n // 11. While position is not past the end of input:\n while (position.position < input.length) {\n // 1. Advance position by 1. (This skips past U+003B (;).)\n position.position++\n\n // 2. Collect a sequence of code points that are HTTP\n // whitespace from input given position.\n collectASequenceOfCodePoints(\n // https://fetch.spec.whatwg.org/#http-whitespace\n char => HTTP_WHITESPACE_REGEX.test(char),\n input,\n position\n )\n\n // 3. Let parameterName be the result of collecting a\n // sequence of code points that are not U+003B (;)\n // or U+003D (=) from input, given position.\n let parameterName = collectASequenceOfCodePoints(\n (char) => char !== ';' && char !== '=',\n input,\n position\n )\n\n // 4. Set parameterName to parameterName, in ASCII\n // lowercase.\n parameterName = parameterName.toLowerCase()\n\n // 5. If position is not past the end of input, then:\n if (position.position < input.length) {\n // 1. If the code point at position within input is\n // U+003B (;), then continue.\n if (input[position.position] === ';') {\n continue\n }\n\n // 2. Advance position by 1. (This skips past U+003D (=).)\n position.position++\n }\n\n // 6. If position is past the end of input, then break.\n if (position.position > input.length) {\n break\n }\n\n // 7. Let parameterValue be null.\n let parameterValue = null\n\n // 8. If the code point at position within input is\n // U+0022 (\"), then:\n if (input[position.position] === '\"') {\n // 1. Set parameterValue to the result of collecting\n // an HTTP quoted string from input, given position\n // and the extract-value flag.\n parameterValue = collectAnHTTPQuotedString(input, position, true)\n\n // 2. Collect a sequence of code points that are not\n // U+003B (;) from input, given position.\n collectASequenceOfCodePointsFast(\n ';',\n input,\n position\n )\n\n // 9. Otherwise:\n } else {\n // 1. Set parameterValue to the result of collecting\n // a sequence of code points that are not U+003B (;)\n // from input, given position.\n parameterValue = collectASequenceOfCodePointsFast(\n ';',\n input,\n position\n )\n\n // 2. Remove any trailing HTTP whitespace from parameterValue.\n parameterValue = removeHTTPWhitespace(parameterValue, false, true)\n\n // 3. If parameterValue is the empty string, then continue.\n if (parameterValue.length === 0) {\n continue\n }\n }\n\n // 10. If all of the following are true\n // - parameterName is not the empty string\n // - parameterName solely contains HTTP token code points\n // - parameterValue solely contains HTTP quoted-string token code points\n // - mimeType\u2019s parameters[parameterName] does not exist\n // then set mimeType\u2019s parameters[parameterName] to parameterValue.\n if (\n parameterName.length !== 0 &&\n HTTP_TOKEN_CODEPOINTS.test(parameterName) &&\n (parameterValue.length === 0 || HTTP_QUOTED_STRING_TOKENS.test(parameterValue)) &&\n !mimeType.parameters.has(parameterName)\n ) {\n mimeType.parameters.set(parameterName, parameterValue)\n }\n }\n\n // 12. Return mimeType.\n return mimeType\n}\n\n// https://infra.spec.whatwg.org/#forgiving-base64-decode\n/** @param {string} data */\nfunction forgivingBase64 (data) {\n // 1. Remove all ASCII whitespace from data.\n data = data.replace(/[\\u0009\\u000A\\u000C\\u000D\\u0020]/g, '') // eslint-disable-line\n\n // 2. If data\u2019s code point length divides by 4 leaving\n // no remainder, then:\n if (data.length % 4 === 0) {\n // 1. If data ends with one or two U+003D (=) code points,\n // then remove them from data.\n data = data.replace(/=?=$/, '')\n }\n\n // 3. If data\u2019s code point length divides by 4 leaving\n // a remainder of 1, then return failure.\n if (data.length % 4 === 1) {\n return 'failure'\n }\n\n // 4. If data contains a code point that is not one of\n // U+002B (+)\n // U+002F (/)\n // ASCII alphanumeric\n // then return failure.\n if (/[^+/0-9A-Za-z]/.test(data)) {\n return 'failure'\n }\n\n const binary = atob(data)\n const bytes = new Uint8Array(binary.length)\n\n for (let byte = 0; byte < binary.length; byte++) {\n bytes[byte] = binary.charCodeAt(byte)\n }\n\n return bytes\n}\n\n// https://fetch.spec.whatwg.org/#collect-an-http-quoted-string\n// tests: https://fetch.spec.whatwg.org/#example-http-quoted-string\n/**\n * @param {string} input\n * @param {{ position: number }} position\n * @param {boolean?} extractValue\n */\nfunction collectAnHTTPQuotedString (input, position, extractValue) {\n // 1. Let positionStart be position.\n const positionStart = position.position\n\n // 2. Let value be the empty string.\n let value = ''\n\n // 3. Assert: the code point at position within input\n // is U+0022 (\").\n assert(input[position.position] === '\"')\n\n // 4. Advance position by 1.\n position.position++\n\n // 5. While true:\n while (true) {\n // 1. Append the result of collecting a sequence of code points\n // that are not U+0022 (\") or U+005C (\\) from input, given\n // position, to value.\n value += collectASequenceOfCodePoints(\n (char) => char !== '\"' && char !== '\\\\',\n input,\n position\n )\n\n // 2. If position is past the end of input, then break.\n if (position.position >= input.length) {\n break\n }\n\n // 3. Let quoteOrBackslash be the code point at position within\n // input.\n const quoteOrBackslash = input[position.position]\n\n // 4. Advance position by 1.\n position.position++\n\n // 5. If quoteOrBackslash is U+005C (\\), then:\n if (quoteOrBackslash === '\\\\') {\n // 1. If position is past the end of input, then append\n // U+005C (\\) to value and break.\n if (position.position >= input.length) {\n value += '\\\\'\n break\n }\n\n // 2. Append the code point at position within input to value.\n value += input[position.position]\n\n // 3. Advance position by 1.\n position.position++\n\n // 6. Otherwise:\n } else {\n // 1. Assert: quoteOrBackslash is U+0022 (\").\n assert(quoteOrBackslash === '\"')\n\n // 2. Break.\n break\n }\n }\n\n // 6. If the extract-value flag is set, then return value.\n if (extractValue) {\n return value\n }\n\n // 7. Return the code points from positionStart to position,\n // inclusive, within input.\n return input.slice(positionStart, position.position)\n}\n\n/**\n * @see https://mimesniff.spec.whatwg.org/#serialize-a-mime-type\n */\nfunction serializeAMimeType (mimeType) {\n assert(mimeType !== 'failure')\n const { parameters, essence } = mimeType\n\n // 1. Let serialization be the concatenation of mimeType\u2019s\n // type, U+002F (/), and mimeType\u2019s subtype.\n let serialization = essence\n\n // 2. For each name \u2192 value of mimeType\u2019s parameters:\n for (let [name, value] of parameters.entries()) {\n // 1. Append U+003B (;) to serialization.\n serialization += ';'\n\n // 2. Append name to serialization.\n serialization += name\n\n // 3. Append U+003D (=) to serialization.\n serialization += '='\n\n // 4. If value does not solely contain HTTP token code\n // points or value is the empty string, then:\n if (!HTTP_TOKEN_CODEPOINTS.test(value)) {\n // 1. Precede each occurence of U+0022 (\") or\n // U+005C (\\) in value with U+005C (\\).\n value = value.replace(/(\\\\|\")/g, '\\\\$1')\n\n // 2. Prepend U+0022 (\") to value.\n value = '\"' + value\n\n // 3. Append U+0022 (\") to value.\n value += '\"'\n }\n\n // 5. Append value to serialization.\n serialization += value\n }\n\n // 3. Return serialization.\n return serialization\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#http-whitespace\n * @param {string} char\n */\nfunction isHTTPWhiteSpace (char) {\n return char === '\\r' || char === '\\n' || char === '\\t' || char === ' '\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#http-whitespace\n * @param {string} str\n */\nfunction removeHTTPWhitespace (str, leading = true, trailing = true) {\n let lead = 0\n let trail = str.length - 1\n\n if (leading) {\n for (; lead < str.length && isHTTPWhiteSpace(str[lead]); lead++);\n }\n\n if (trailing) {\n for (; trail > 0 && isHTTPWhiteSpace(str[trail]); trail--);\n }\n\n return str.slice(lead, trail + 1)\n}\n\n/**\n * @see https://infra.spec.whatwg.org/#ascii-whitespace\n * @param {string} char\n */\nfunction isASCIIWhitespace (char) {\n return char === '\\r' || char === '\\n' || char === '\\t' || char === '\\f' || char === ' '\n}\n\n/**\n * @see https://infra.spec.whatwg.org/#strip-leading-and-trailing-ascii-whitespace\n */\nfunction removeASCIIWhitespace (str, leading = true, trailing = true) {\n let lead = 0\n let trail = str.length - 1\n\n if (leading) {\n for (; lead < str.length && isASCIIWhitespace(str[lead]); lead++);\n }\n\n if (trailing) {\n for (; trail > 0 && isASCIIWhitespace(str[trail]); trail--);\n }\n\n return str.slice(lead, trail + 1)\n}\n\nmodule.exports = {\n dataURLProcessor,\n URLSerializer,\n collectASequenceOfCodePoints,\n collectASequenceOfCodePointsFast,\n stringPercentDecode,\n parseMIMEType,\n collectAnHTTPQuotedString,\n serializeAMimeType\n}\n", "'use strict'\n\nconst { Blob, File: NativeFile } = require('buffer')\nconst { types } = require('util')\nconst { kState } = require('./symbols')\nconst { isBlobLike } = require('./util')\nconst { webidl } = require('./webidl')\nconst { parseMIMEType, serializeAMimeType } = require('./dataURL')\nconst { kEnumerableProperty } = require('../core/util')\nconst encoder = new TextEncoder()\n\nclass File extends Blob {\n constructor (fileBits, fileName, options = {}) {\n // The File constructor is invoked with two or three parameters, depending\n // on whether the optional dictionary parameter is used. When the File()\n // constructor is invoked, user agents must run the following steps:\n webidl.argumentLengthCheck(arguments, 2, { header: 'File constructor' })\n\n fileBits = webidl.converters['sequence'](fileBits)\n fileName = webidl.converters.USVString(fileName)\n options = webidl.converters.FilePropertyBag(options)\n\n // 1. Let bytes be the result of processing blob parts given fileBits and\n // options.\n // Note: Blob handles this for us\n\n // 2. Let n be the fileName argument to the constructor.\n const n = fileName\n\n // 3. Process FilePropertyBag dictionary argument by running the following\n // substeps:\n\n // 1. If the type member is provided and is not the empty string, let t\n // be set to the type dictionary member. If t contains any characters\n // outside the range U+0020 to U+007E, then set t to the empty string\n // and return from these substeps.\n // 2. Convert every character in t to ASCII lowercase.\n let t = options.type\n let d\n\n // eslint-disable-next-line no-labels\n substep: {\n if (t) {\n t = parseMIMEType(t)\n\n if (t === 'failure') {\n t = ''\n // eslint-disable-next-line no-labels\n break substep\n }\n\n t = serializeAMimeType(t).toLowerCase()\n }\n\n // 3. If the lastModified member is provided, let d be set to the\n // lastModified dictionary member. If it is not provided, set d to the\n // current date and time represented as the number of milliseconds since\n // the Unix Epoch (which is the equivalent of Date.now() [ECMA-262]).\n d = options.lastModified\n }\n\n // 4. Return a new File object F such that:\n // F refers to the bytes byte sequence.\n // F.size is set to the number of total bytes in bytes.\n // F.name is set to n.\n // F.type is set to t.\n // F.lastModified is set to d.\n\n super(processBlobParts(fileBits, options), { type: t })\n this[kState] = {\n name: n,\n lastModified: d,\n type: t\n }\n }\n\n get name () {\n webidl.brandCheck(this, File)\n\n return this[kState].name\n }\n\n get lastModified () {\n webidl.brandCheck(this, File)\n\n return this[kState].lastModified\n }\n\n get type () {\n webidl.brandCheck(this, File)\n\n return this[kState].type\n }\n}\n\nclass FileLike {\n constructor (blobLike, fileName, options = {}) {\n // TODO: argument idl type check\n\n // The File constructor is invoked with two or three parameters, depending\n // on whether the optional dictionary parameter is used. When the File()\n // constructor is invoked, user agents must run the following steps:\n\n // 1. Let bytes be the result of processing blob parts given fileBits and\n // options.\n\n // 2. Let n be the fileName argument to the constructor.\n const n = fileName\n\n // 3. Process FilePropertyBag dictionary argument by running the following\n // substeps:\n\n // 1. If the type member is provided and is not the empty string, let t\n // be set to the type dictionary member. If t contains any characters\n // outside the range U+0020 to U+007E, then set t to the empty string\n // and return from these substeps.\n // TODO\n const t = options.type\n\n // 2. Convert every character in t to ASCII lowercase.\n // TODO\n\n // 3. If the lastModified member is provided, let d be set to the\n // lastModified dictionary member. If it is not provided, set d to the\n // current date and time represented as the number of milliseconds since\n // the Unix Epoch (which is the equivalent of Date.now() [ECMA-262]).\n const d = options.lastModified ?? Date.now()\n\n // 4. Return a new File object F such that:\n // F refers to the bytes byte sequence.\n // F.size is set to the number of total bytes in bytes.\n // F.name is set to n.\n // F.type is set to t.\n // F.lastModified is set to d.\n\n this[kState] = {\n blobLike,\n name: n,\n type: t,\n lastModified: d\n }\n }\n\n stream (...args) {\n webidl.brandCheck(this, FileLike)\n\n return this[kState].blobLike.stream(...args)\n }\n\n arrayBuffer (...args) {\n webidl.brandCheck(this, FileLike)\n\n return this[kState].blobLike.arrayBuffer(...args)\n }\n\n slice (...args) {\n webidl.brandCheck(this, FileLike)\n\n return this[kState].blobLike.slice(...args)\n }\n\n text (...args) {\n webidl.brandCheck(this, FileLike)\n\n return this[kState].blobLike.text(...args)\n }\n\n get size () {\n webidl.brandCheck(this, FileLike)\n\n return this[kState].blobLike.size\n }\n\n get type () {\n webidl.brandCheck(this, FileLike)\n\n return this[kState].blobLike.type\n }\n\n get name () {\n webidl.brandCheck(this, FileLike)\n\n return this[kState].name\n }\n\n get lastModified () {\n webidl.brandCheck(this, FileLike)\n\n return this[kState].lastModified\n }\n\n get [Symbol.toStringTag] () {\n return 'File'\n }\n}\n\nObject.defineProperties(File.prototype, {\n [Symbol.toStringTag]: {\n value: 'File',\n configurable: true\n },\n name: kEnumerableProperty,\n lastModified: kEnumerableProperty\n})\n\nwebidl.converters.Blob = webidl.interfaceConverter(Blob)\n\nwebidl.converters.BlobPart = function (V, opts) {\n if (webidl.util.Type(V) === 'Object') {\n if (isBlobLike(V)) {\n return webidl.converters.Blob(V, { strict: false })\n }\n\n if (\n ArrayBuffer.isView(V) ||\n types.isAnyArrayBuffer(V)\n ) {\n return webidl.converters.BufferSource(V, opts)\n }\n }\n\n return webidl.converters.USVString(V, opts)\n}\n\nwebidl.converters['sequence'] = webidl.sequenceConverter(\n webidl.converters.BlobPart\n)\n\n// https://www.w3.org/TR/FileAPI/#dfn-FilePropertyBag\nwebidl.converters.FilePropertyBag = webidl.dictionaryConverter([\n {\n key: 'lastModified',\n converter: webidl.converters['long long'],\n get defaultValue () {\n return Date.now()\n }\n },\n {\n key: 'type',\n converter: webidl.converters.DOMString,\n defaultValue: ''\n },\n {\n key: 'endings',\n converter: (value) => {\n value = webidl.converters.DOMString(value)\n value = value.toLowerCase()\n\n if (value !== 'native') {\n value = 'transparent'\n }\n\n return value\n },\n defaultValue: 'transparent'\n }\n])\n\n/**\n * @see https://www.w3.org/TR/FileAPI/#process-blob-parts\n * @param {(NodeJS.TypedArray|Blob|string)[]} parts\n * @param {{ type: string, endings: string }} options\n */\nfunction processBlobParts (parts, options) {\n // 1. Let bytes be an empty sequence of bytes.\n /** @type {NodeJS.TypedArray[]} */\n const bytes = []\n\n // 2. For each element in parts:\n for (const element of parts) {\n // 1. If element is a USVString, run the following substeps:\n if (typeof element === 'string') {\n // 1. Let s be element.\n let s = element\n\n // 2. If the endings member of options is \"native\", set s\n // to the result of converting line endings to native\n // of element.\n if (options.endings === 'native') {\n s = convertLineEndingsNative(s)\n }\n\n // 3. Append the result of UTF-8 encoding s to bytes.\n bytes.push(encoder.encode(s))\n } else if (\n types.isAnyArrayBuffer(element) ||\n types.isTypedArray(element)\n ) {\n // 2. If element is a BufferSource, get a copy of the\n // bytes held by the buffer source, and append those\n // bytes to bytes.\n if (!element.buffer) { // ArrayBuffer\n bytes.push(new Uint8Array(element))\n } else {\n bytes.push(\n new Uint8Array(element.buffer, element.byteOffset, element.byteLength)\n )\n }\n } else if (isBlobLike(element)) {\n // 3. If element is a Blob, append the bytes it represents\n // to bytes.\n bytes.push(element)\n }\n }\n\n // 3. Return bytes.\n return bytes\n}\n\n/**\n * @see https://www.w3.org/TR/FileAPI/#convert-line-endings-to-native\n * @param {string} s\n */\nfunction convertLineEndingsNative (s) {\n // 1. Let native line ending be be the code point U+000A LF.\n let nativeLineEnding = '\\n'\n\n // 2. If the underlying platform\u2019s conventions are to\n // represent newlines as a carriage return and line feed\n // sequence, set native line ending to the code point\n // U+000D CR followed by the code point U+000A LF.\n if (process.platform === 'win32') {\n nativeLineEnding = '\\r\\n'\n }\n\n return s.replace(/\\r?\\n/g, nativeLineEnding)\n}\n\n// If this function is moved to ./util.js, some tools (such as\n// rollup) will warn about circular dependencies. See:\n// https://github.com/nodejs/undici/issues/1629\nfunction isFileLike (object) {\n return (\n (NativeFile && object instanceof NativeFile) ||\n object instanceof File || (\n object &&\n (typeof object.stream === 'function' ||\n typeof object.arrayBuffer === 'function') &&\n object[Symbol.toStringTag] === 'File'\n )\n )\n}\n\nmodule.exports = { File, FileLike, isFileLike }\n", "'use strict'\n\nconst { isBlobLike, toUSVString, makeIterator } = require('./util')\nconst { kState } = require('./symbols')\nconst { File: UndiciFile, FileLike, isFileLike } = require('./file')\nconst { webidl } = require('./webidl')\nconst { Blob, File: NativeFile } = require('buffer')\n\n/** @type {globalThis['File']} */\nconst File = NativeFile ?? UndiciFile\n\n// https://xhr.spec.whatwg.org/#formdata\nclass FormData {\n constructor (form) {\n if (form !== undefined) {\n throw webidl.errors.conversionFailed({\n prefix: 'FormData constructor',\n argument: 'Argument 1',\n types: ['undefined']\n })\n }\n\n this[kState] = []\n }\n\n append (name, value, filename = undefined) {\n webidl.brandCheck(this, FormData)\n\n webidl.argumentLengthCheck(arguments, 2, { header: 'FormData.append' })\n\n if (arguments.length === 3 && !isBlobLike(value)) {\n throw new TypeError(\n \"Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'\"\n )\n }\n\n // 1. Let value be value if given; otherwise blobValue.\n\n name = webidl.converters.USVString(name)\n value = isBlobLike(value)\n ? webidl.converters.Blob(value, { strict: false })\n : webidl.converters.USVString(value)\n filename = arguments.length === 3\n ? webidl.converters.USVString(filename)\n : undefined\n\n // 2. Let entry be the result of creating an entry with\n // name, value, and filename if given.\n const entry = makeEntry(name, value, filename)\n\n // 3. Append entry to this\u2019s entry list.\n this[kState].push(entry)\n }\n\n delete (name) {\n webidl.brandCheck(this, FormData)\n\n webidl.argumentLengthCheck(arguments, 1, { header: 'FormData.delete' })\n\n name = webidl.converters.USVString(name)\n\n // The delete(name) method steps are to remove all entries whose name\n // is name from this\u2019s entry list.\n this[kState] = this[kState].filter(entry => entry.name !== name)\n }\n\n get (name) {\n webidl.brandCheck(this, FormData)\n\n webidl.argumentLengthCheck(arguments, 1, { header: 'FormData.get' })\n\n name = webidl.converters.USVString(name)\n\n // 1. If there is no entry whose name is name in this\u2019s entry list,\n // then return null.\n const idx = this[kState].findIndex((entry) => entry.name === name)\n if (idx === -1) {\n return null\n }\n\n // 2. Return the value of the first entry whose name is name from\n // this\u2019s entry list.\n return this[kState][idx].value\n }\n\n getAll (name) {\n webidl.brandCheck(this, FormData)\n\n webidl.argumentLengthCheck(arguments, 1, { header: 'FormData.getAll' })\n\n name = webidl.converters.USVString(name)\n\n // 1. If there is no entry whose name is name in this\u2019s entry list,\n // then return the empty list.\n // 2. Return the values of all entries whose name is name, in order,\n // from this\u2019s entry list.\n return this[kState]\n .filter((entry) => entry.name === name)\n .map((entry) => entry.value)\n }\n\n has (name) {\n webidl.brandCheck(this, FormData)\n\n webidl.argumentLengthCheck(arguments, 1, { header: 'FormData.has' })\n\n name = webidl.converters.USVString(name)\n\n // The has(name) method steps are to return true if there is an entry\n // whose name is name in this\u2019s entry list; otherwise false.\n return this[kState].findIndex((entry) => entry.name === name) !== -1\n }\n\n set (name, value, filename = undefined) {\n webidl.brandCheck(this, FormData)\n\n webidl.argumentLengthCheck(arguments, 2, { header: 'FormData.set' })\n\n if (arguments.length === 3 && !isBlobLike(value)) {\n throw new TypeError(\n \"Failed to execute 'set' on 'FormData': parameter 2 is not of type 'Blob'\"\n )\n }\n\n // The set(name, value) and set(name, blobValue, filename) method steps\n // are:\n\n // 1. Let value be value if given; otherwise blobValue.\n\n name = webidl.converters.USVString(name)\n value = isBlobLike(value)\n ? webidl.converters.Blob(value, { strict: false })\n : webidl.converters.USVString(value)\n filename = arguments.length === 3\n ? toUSVString(filename)\n : undefined\n\n // 2. Let entry be the result of creating an entry with name, value, and\n // filename if given.\n const entry = makeEntry(name, value, filename)\n\n // 3. If there are entries in this\u2019s entry list whose name is name, then\n // replace the first such entry with entry and remove the others.\n const idx = this[kState].findIndex((entry) => entry.name === name)\n if (idx !== -1) {\n this[kState] = [\n ...this[kState].slice(0, idx),\n entry,\n ...this[kState].slice(idx + 1).filter((entry) => entry.name !== name)\n ]\n } else {\n // 4. Otherwise, append entry to this\u2019s entry list.\n this[kState].push(entry)\n }\n }\n\n entries () {\n webidl.brandCheck(this, FormData)\n\n return makeIterator(\n () => this[kState].map(pair => [pair.name, pair.value]),\n 'FormData',\n 'key+value'\n )\n }\n\n keys () {\n webidl.brandCheck(this, FormData)\n\n return makeIterator(\n () => this[kState].map(pair => [pair.name, pair.value]),\n 'FormData',\n 'key'\n )\n }\n\n values () {\n webidl.brandCheck(this, FormData)\n\n return makeIterator(\n () => this[kState].map(pair => [pair.name, pair.value]),\n 'FormData',\n 'value'\n )\n }\n\n /**\n * @param {(value: string, key: string, self: FormData) => void} callbackFn\n * @param {unknown} thisArg\n */\n forEach (callbackFn, thisArg = globalThis) {\n webidl.brandCheck(this, FormData)\n\n webidl.argumentLengthCheck(arguments, 1, { header: 'FormData.forEach' })\n\n if (typeof callbackFn !== 'function') {\n throw new TypeError(\n \"Failed to execute 'forEach' on 'FormData': parameter 1 is not of type 'Function'.\"\n )\n }\n\n for (const [key, value] of this) {\n callbackFn.apply(thisArg, [value, key, this])\n }\n }\n}\n\nFormData.prototype[Symbol.iterator] = FormData.prototype.entries\n\nObject.defineProperties(FormData.prototype, {\n [Symbol.toStringTag]: {\n value: 'FormData',\n configurable: true\n }\n})\n\n/**\n * @see https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#create-an-entry\n * @param {string} name\n * @param {string|Blob} value\n * @param {?string} filename\n * @returns\n */\nfunction makeEntry (name, value, filename) {\n // 1. Set name to the result of converting name into a scalar value string.\n // \"To convert a string into a scalar value string, replace any surrogates\n // with U+FFFD.\"\n // see: https://nodejs.org/dist/latest-v18.x/docs/api/buffer.html#buftostringencoding-start-end\n name = Buffer.from(name).toString('utf8')\n\n // 2. If value is a string, then set value to the result of converting\n // value into a scalar value string.\n if (typeof value === 'string') {\n value = Buffer.from(value).toString('utf8')\n } else {\n // 3. Otherwise:\n\n // 1. If value is not a File object, then set value to a new File object,\n // representing the same bytes, whose name attribute value is \"blob\"\n if (!isFileLike(value)) {\n value = value instanceof Blob\n ? new File([value], 'blob', { type: value.type })\n : new FileLike(value, 'blob', { type: value.type })\n }\n\n // 2. If filename is given, then set value to a new File object,\n // representing the same bytes, whose name attribute is filename.\n if (filename !== undefined) {\n /** @type {FilePropertyBag} */\n const options = {\n type: value.type,\n lastModified: value.lastModified\n }\n\n value = (NativeFile && value instanceof NativeFile) || value instanceof UndiciFile\n ? new File([value], filename, options)\n : new FileLike(value, filename, options)\n }\n }\n\n // 4. Return an entry whose name is name and whose value is value.\n return { name, value }\n}\n\nmodule.exports = { FormData }\n", "'use strict'\n\nconst Busboy = require('@fastify/busboy')\nconst util = require('../core/util')\nconst {\n ReadableStreamFrom,\n isBlobLike,\n isReadableStreamLike,\n readableStreamClose,\n createDeferredPromise,\n fullyReadBody\n} = require('./util')\nconst { FormData } = require('./formdata')\nconst { kState } = require('./symbols')\nconst { webidl } = require('./webidl')\nconst { DOMException, structuredClone } = require('./constants')\nconst { Blob, File: NativeFile } = require('buffer')\nconst { kBodyUsed } = require('../core/symbols')\nconst assert = require('assert')\nconst { isErrored } = require('../core/util')\nconst { isUint8Array, isArrayBuffer } = require('util/types')\nconst { File: UndiciFile } = require('./file')\nconst { parseMIMEType, serializeAMimeType } = require('./dataURL')\n\nlet ReadableStream = globalThis.ReadableStream\n\n/** @type {globalThis['File']} */\nconst File = NativeFile ?? UndiciFile\nconst textEncoder = new TextEncoder()\nconst textDecoder = new TextDecoder()\n\n// https://fetch.spec.whatwg.org/#concept-bodyinit-extract\nfunction extractBody (object, keepalive = false) {\n if (!ReadableStream) {\n ReadableStream = require('stream/web').ReadableStream\n }\n\n // 1. Let stream be null.\n let stream = null\n\n // 2. If object is a ReadableStream object, then set stream to object.\n if (object instanceof ReadableStream) {\n stream = object\n } else if (isBlobLike(object)) {\n // 3. Otherwise, if object is a Blob object, set stream to the\n // result of running object\u2019s get stream.\n stream = object.stream()\n } else {\n // 4. Otherwise, set stream to a new ReadableStream object, and set\n // up stream.\n stream = new ReadableStream({\n async pull (controller) {\n controller.enqueue(\n typeof source === 'string' ? textEncoder.encode(source) : source\n )\n queueMicrotask(() => readableStreamClose(controller))\n },\n start () {},\n type: undefined\n })\n }\n\n // 5. Assert: stream is a ReadableStream object.\n assert(isReadableStreamLike(stream))\n\n // 6. Let action be null.\n let action = null\n\n // 7. Let source be null.\n let source = null\n\n // 8. Let length be null.\n let length = null\n\n // 9. Let type be null.\n let type = null\n\n // 10. Switch on object:\n if (typeof object === 'string') {\n // Set source to the UTF-8 encoding of object.\n // Note: setting source to a Uint8Array here breaks some mocking assumptions.\n source = object\n\n // Set type to `text/plain;charset=UTF-8`.\n type = 'text/plain;charset=UTF-8'\n } else if (object instanceof URLSearchParams) {\n // URLSearchParams\n\n // spec says to run application/x-www-form-urlencoded on body.list\n // this is implemented in Node.js as apart of an URLSearchParams instance toString method\n // See: https://github.com/nodejs/node/blob/e46c680bf2b211bbd52cf959ca17ee98c7f657f5/lib/internal/url.js#L490\n // and https://github.com/nodejs/node/blob/e46c680bf2b211bbd52cf959ca17ee98c7f657f5/lib/internal/url.js#L1100\n\n // Set source to the result of running the application/x-www-form-urlencoded serializer with object\u2019s list.\n source = object.toString()\n\n // Set type to `application/x-www-form-urlencoded;charset=UTF-8`.\n type = 'application/x-www-form-urlencoded;charset=UTF-8'\n } else if (isArrayBuffer(object)) {\n // BufferSource/ArrayBuffer\n\n // Set source to a copy of the bytes held by object.\n source = new Uint8Array(object.slice())\n } else if (ArrayBuffer.isView(object)) {\n // BufferSource/ArrayBufferView\n\n // Set source to a copy of the bytes held by object.\n source = new Uint8Array(object.buffer.slice(object.byteOffset, object.byteOffset + object.byteLength))\n } else if (util.isFormDataLike(object)) {\n const boundary = `----formdata-undici-0${`${Math.floor(Math.random() * 1e11)}`.padStart(11, '0')}`\n const prefix = `--${boundary}\\r\\nContent-Disposition: form-data`\n\n /*! formdata-polyfill. MIT License. Jimmy W\u00E4rting */\n const escape = (str) =>\n str.replace(/\\n/g, '%0A').replace(/\\r/g, '%0D').replace(/\"/g, '%22')\n const normalizeLinefeeds = (value) => value.replace(/\\r?\\n|\\r/g, '\\r\\n')\n\n // Set action to this step: run the multipart/form-data\n // encoding algorithm, with object\u2019s entry list and UTF-8.\n // - This ensures that the body is immutable and can't be changed afterwords\n // - That the content-length is calculated in advance.\n // - And that all parts are pre-encoded and ready to be sent.\n\n const blobParts = []\n const rn = new Uint8Array([13, 10]) // '\\r\\n'\n length = 0\n let hasUnknownSizeValue = false\n\n for (const [name, value] of object) {\n if (typeof value === 'string') {\n const chunk = textEncoder.encode(prefix +\n `; name=\"${escape(normalizeLinefeeds(name))}\"` +\n `\\r\\n\\r\\n${normalizeLinefeeds(value)}\\r\\n`)\n blobParts.push(chunk)\n length += chunk.byteLength\n } else {\n const chunk = textEncoder.encode(`${prefix}; name=\"${escape(normalizeLinefeeds(name))}\"` +\n (value.name ? `; filename=\"${escape(value.name)}\"` : '') + '\\r\\n' +\n `Content-Type: ${\n value.type || 'application/octet-stream'\n }\\r\\n\\r\\n`)\n blobParts.push(chunk, value, rn)\n if (typeof value.size === 'number') {\n length += chunk.byteLength + value.size + rn.byteLength\n } else {\n hasUnknownSizeValue = true\n }\n }\n }\n\n const chunk = textEncoder.encode(`--${boundary}--`)\n blobParts.push(chunk)\n length += chunk.byteLength\n if (hasUnknownSizeValue) {\n length = null\n }\n\n // Set source to object.\n source = object\n\n action = async function * () {\n for (const part of blobParts) {\n if (part.stream) {\n yield * part.stream()\n } else {\n yield part\n }\n }\n }\n\n // Set type to `multipart/form-data; boundary=`,\n // followed by the multipart/form-data boundary string generated\n // by the multipart/form-data encoding algorithm.\n type = 'multipart/form-data; boundary=' + boundary\n } else if (isBlobLike(object)) {\n // Blob\n\n // Set source to object.\n source = object\n\n // Set length to object\u2019s size.\n length = object.size\n\n // If object\u2019s type attribute is not the empty byte sequence, set\n // type to its value.\n if (object.type) {\n type = object.type\n }\n } else if (typeof object[Symbol.asyncIterator] === 'function') {\n // If keepalive is true, then throw a TypeError.\n if (keepalive) {\n throw new TypeError('keepalive')\n }\n\n // If object is disturbed or locked, then throw a TypeError.\n if (util.isDisturbed(object) || object.locked) {\n throw new TypeError(\n 'Response body object should not be disturbed or locked'\n )\n }\n\n stream =\n object instanceof ReadableStream ? object : ReadableStreamFrom(object)\n }\n\n // 11. If source is a byte sequence, then set action to a\n // step that returns source and length to source\u2019s length.\n if (typeof source === 'string' || util.isBuffer(source)) {\n length = Buffer.byteLength(source)\n }\n\n // 12. If action is non-null, then run these steps in in parallel:\n if (action != null) {\n // Run action.\n let iterator\n stream = new ReadableStream({\n async start () {\n iterator = action(object)[Symbol.asyncIterator]()\n },\n async pull (controller) {\n const { value, done } = await iterator.next()\n if (done) {\n // When running action is done, close stream.\n queueMicrotask(() => {\n controller.close()\n })\n } else {\n // Whenever one or more bytes are available and stream is not errored,\n // enqueue a Uint8Array wrapping an ArrayBuffer containing the available\n // bytes into stream.\n if (!isErrored(stream)) {\n controller.enqueue(new Uint8Array(value))\n }\n }\n return controller.desiredSize > 0\n },\n async cancel (reason) {\n await iterator.return()\n },\n type: undefined\n })\n }\n\n // 13. Let body be a body whose stream is stream, source is source,\n // and length is length.\n const body = { stream, source, length }\n\n // 14. Return (body, type).\n return [body, type]\n}\n\n// https://fetch.spec.whatwg.org/#bodyinit-safely-extract\nfunction safelyExtractBody (object, keepalive = false) {\n if (!ReadableStream) {\n // istanbul ignore next\n ReadableStream = require('stream/web').ReadableStream\n }\n\n // To safely extract a body and a `Content-Type` value from\n // a byte sequence or BodyInit object object, run these steps:\n\n // 1. If object is a ReadableStream object, then:\n if (object instanceof ReadableStream) {\n // Assert: object is neither disturbed nor locked.\n // istanbul ignore next\n assert(!util.isDisturbed(object), 'The body has already been consumed.')\n // istanbul ignore next\n assert(!object.locked, 'The stream is locked.')\n }\n\n // 2. Return the results of extracting object.\n return extractBody(object, keepalive)\n}\n\nfunction cloneBody (body) {\n // To clone a body body, run these steps:\n\n // https://fetch.spec.whatwg.org/#concept-body-clone\n\n // 1. Let \u00AB out1, out2 \u00BB be the result of teeing body\u2019s stream.\n const [out1, out2] = body.stream.tee()\n const out2Clone = structuredClone(out2, { transfer: [out2] })\n // This, for whatever reasons, unrefs out2Clone which allows\n // the process to exit by itself.\n const [, finalClone] = out2Clone.tee()\n\n // 2. Set body\u2019s stream to out1.\n body.stream = out1\n\n // 3. Return a body whose stream is out2 and other members are copied from body.\n return {\n stream: finalClone,\n length: body.length,\n source: body.source\n }\n}\n\nasync function * consumeBody (body) {\n if (body) {\n if (isUint8Array(body)) {\n yield body\n } else {\n const stream = body.stream\n\n if (util.isDisturbed(stream)) {\n throw new TypeError('The body has already been consumed.')\n }\n\n if (stream.locked) {\n throw new TypeError('The stream is locked.')\n }\n\n // Compat.\n stream[kBodyUsed] = true\n\n yield * stream\n }\n }\n}\n\nfunction throwIfAborted (state) {\n if (state.aborted) {\n throw new DOMException('The operation was aborted.', 'AbortError')\n }\n}\n\nfunction bodyMixinMethods (instance) {\n const methods = {\n blob () {\n // The blob() method steps are to return the result of\n // running consume body with this and the following step\n // given a byte sequence bytes: return a Blob whose\n // contents are bytes and whose type attribute is this\u2019s\n // MIME type.\n return specConsumeBody(this, (bytes) => {\n let mimeType = bodyMimeType(this)\n\n if (mimeType === 'failure') {\n mimeType = ''\n } else if (mimeType) {\n mimeType = serializeAMimeType(mimeType)\n }\n\n // Return a Blob whose contents are bytes and type attribute\n // is mimeType.\n return new Blob([bytes], { type: mimeType })\n }, instance)\n },\n\n arrayBuffer () {\n // The arrayBuffer() method steps are to return the result\n // of running consume body with this and the following step\n // given a byte sequence bytes: return a new ArrayBuffer\n // whose contents are bytes.\n return specConsumeBody(this, (bytes) => {\n return new Uint8Array(bytes).buffer\n }, instance)\n },\n\n text () {\n // The text() method steps are to return the result of running\n // consume body with this and UTF-8 decode.\n return specConsumeBody(this, utf8DecodeBytes, instance)\n },\n\n json () {\n // The json() method steps are to return the result of running\n // consume body with this and parse JSON from bytes.\n return specConsumeBody(this, parseJSONFromBytes, instance)\n },\n\n async formData () {\n webidl.brandCheck(this, instance)\n\n throwIfAborted(this[kState])\n\n const contentType = this.headers.get('Content-Type')\n\n // If mimeType\u2019s essence is \"multipart/form-data\", then:\n if (/multipart\\/form-data/.test(contentType)) {\n const headers = {}\n for (const [key, value] of this.headers) headers[key.toLowerCase()] = value\n\n const responseFormData = new FormData()\n\n let busboy\n\n try {\n busboy = new Busboy({\n headers,\n preservePath: true\n })\n } catch (err) {\n throw new DOMException(`${err}`, 'AbortError')\n }\n\n busboy.on('field', (name, value) => {\n responseFormData.append(name, value)\n })\n busboy.on('file', (name, value, filename, encoding, mimeType) => {\n const chunks = []\n\n if (encoding === 'base64' || encoding.toLowerCase() === 'base64') {\n let base64chunk = ''\n\n value.on('data', (chunk) => {\n base64chunk += chunk.toString().replace(/[\\r\\n]/gm, '')\n\n const end = base64chunk.length - base64chunk.length % 4\n chunks.push(Buffer.from(base64chunk.slice(0, end), 'base64'))\n\n base64chunk = base64chunk.slice(end)\n })\n value.on('end', () => {\n chunks.push(Buffer.from(base64chunk, 'base64'))\n responseFormData.append(name, new File(chunks, filename, { type: mimeType }))\n })\n } else {\n value.on('data', (chunk) => {\n chunks.push(chunk)\n })\n value.on('end', () => {\n responseFormData.append(name, new File(chunks, filename, { type: mimeType }))\n })\n }\n })\n\n const busboyResolve = new Promise((resolve, reject) => {\n busboy.on('finish', resolve)\n busboy.on('error', (err) => reject(new TypeError(err)))\n })\n\n if (this.body !== null) for await (const chunk of consumeBody(this[kState].body)) busboy.write(chunk)\n busboy.end()\n await busboyResolve\n\n return responseFormData\n } else if (/application\\/x-www-form-urlencoded/.test(contentType)) {\n // Otherwise, if mimeType\u2019s essence is \"application/x-www-form-urlencoded\", then:\n\n // 1. Let entries be the result of parsing bytes.\n let entries\n try {\n let text = ''\n // application/x-www-form-urlencoded parser will keep the BOM.\n // https://url.spec.whatwg.org/#concept-urlencoded-parser\n // Note that streaming decoder is stateful and cannot be reused\n const streamingDecoder = new TextDecoder('utf-8', { ignoreBOM: true })\n\n for await (const chunk of consumeBody(this[kState].body)) {\n if (!isUint8Array(chunk)) {\n throw new TypeError('Expected Uint8Array chunk')\n }\n text += streamingDecoder.decode(chunk, { stream: true })\n }\n text += streamingDecoder.decode()\n entries = new URLSearchParams(text)\n } catch (err) {\n // istanbul ignore next: Unclear when new URLSearchParams can fail on a string.\n // 2. If entries is failure, then throw a TypeError.\n throw Object.assign(new TypeError(), { cause: err })\n }\n\n // 3. Return a new FormData object whose entries are entries.\n const formData = new FormData()\n for (const [name, value] of entries) {\n formData.append(name, value)\n }\n return formData\n } else {\n // Wait a tick before checking if the request has been aborted.\n // Otherwise, a TypeError can be thrown when an AbortError should.\n await Promise.resolve()\n\n throwIfAborted(this[kState])\n\n // Otherwise, throw a TypeError.\n throw webidl.errors.exception({\n header: `${instance.name}.formData`,\n message: 'Could not parse content as FormData.'\n })\n }\n }\n }\n\n return methods\n}\n\nfunction mixinBody (prototype) {\n Object.assign(prototype.prototype, bodyMixinMethods(prototype))\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#concept-body-consume-body\n * @param {Response|Request} object\n * @param {(value: unknown) => unknown} convertBytesToJSValue\n * @param {Response|Request} instance\n */\nasync function specConsumeBody (object, convertBytesToJSValue, instance) {\n webidl.brandCheck(object, instance)\n\n throwIfAborted(object[kState])\n\n // 1. If object is unusable, then return a promise rejected\n // with a TypeError.\n if (bodyUnusable(object[kState].body)) {\n throw new TypeError('Body is unusable')\n }\n\n // 2. Let promise be a new promise.\n const promise = createDeferredPromise()\n\n // 3. Let errorSteps given error be to reject promise with error.\n const errorSteps = (error) => promise.reject(error)\n\n // 4. Let successSteps given a byte sequence data be to resolve\n // promise with the result of running convertBytesToJSValue\n // with data. If that threw an exception, then run errorSteps\n // with that exception.\n const successSteps = (data) => {\n try {\n promise.resolve(convertBytesToJSValue(data))\n } catch (e) {\n errorSteps(e)\n }\n }\n\n // 5. If object\u2019s body is null, then run successSteps with an\n // empty byte sequence.\n if (object[kState].body == null) {\n successSteps(new Uint8Array())\n return promise.promise\n }\n\n // 6. Otherwise, fully read object\u2019s body given successSteps,\n // errorSteps, and object\u2019s relevant global object.\n await fullyReadBody(object[kState].body, successSteps, errorSteps)\n\n // 7. Return promise.\n return promise.promise\n}\n\n// https://fetch.spec.whatwg.org/#body-unusable\nfunction bodyUnusable (body) {\n // An object including the Body interface mixin is\n // said to be unusable if its body is non-null and\n // its body\u2019s stream is disturbed or locked.\n return body != null && (body.stream.locked || util.isDisturbed(body.stream))\n}\n\n/**\n * @see https://encoding.spec.whatwg.org/#utf-8-decode\n * @param {Buffer} buffer\n */\nfunction utf8DecodeBytes (buffer) {\n if (buffer.length === 0) {\n return ''\n }\n\n // 1. Let buffer be the result of peeking three bytes from\n // ioQueue, converted to a byte sequence.\n\n // 2. If buffer is 0xEF 0xBB 0xBF, then read three\n // bytes from ioQueue. (Do nothing with those bytes.)\n if (buffer[0] === 0xEF && buffer[1] === 0xBB && buffer[2] === 0xBF) {\n buffer = buffer.subarray(3)\n }\n\n // 3. Process a queue with an instance of UTF-8\u2019s\n // decoder, ioQueue, output, and \"replacement\".\n const output = textDecoder.decode(buffer)\n\n // 4. Return output.\n return output\n}\n\n/**\n * @see https://infra.spec.whatwg.org/#parse-json-bytes-to-a-javascript-value\n * @param {Uint8Array} bytes\n */\nfunction parseJSONFromBytes (bytes) {\n return JSON.parse(utf8DecodeBytes(bytes))\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#concept-body-mime-type\n * @param {import('./response').Response|import('./request').Request} object\n */\nfunction bodyMimeType (object) {\n const { headersList } = object[kState]\n const contentType = headersList.get('content-type')\n\n if (contentType === null) {\n return 'failure'\n }\n\n return parseMIMEType(contentType)\n}\n\nmodule.exports = {\n extractBody,\n safelyExtractBody,\n cloneBody,\n mixinBody\n}\n", "'use strict'\n\nconst {\n InvalidArgumentError,\n NotSupportedError\n} = require('./errors')\nconst assert = require('assert')\nconst { kHTTP2BuildRequest, kHTTP2CopyHeaders, kHTTP1BuildRequest } = require('./symbols')\nconst util = require('./util')\n\n// tokenRegExp and headerCharRegex have been lifted from\n// https://github.com/nodejs/node/blob/main/lib/_http_common.js\n\n/**\n * Verifies that the given val is a valid HTTP token\n * per the rules defined in RFC 7230\n * See https://tools.ietf.org/html/rfc7230#section-3.2.6\n */\nconst tokenRegExp = /^[\\^_`a-zA-Z\\-0-9!#$%&'*+.|~]+$/\n\n/**\n * Matches if val contains an invalid field-vchar\n * field-value = *( field-content / obs-fold )\n * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ]\n * field-vchar = VCHAR / obs-text\n */\nconst headerCharRegex = /[^\\t\\x20-\\x7e\\x80-\\xff]/\n\n// Verifies that a given path is valid does not contain control chars \\x00 to \\x20\nconst invalidPathRegex = /[^\\u0021-\\u00ff]/\n\nconst kHandler = Symbol('handler')\n\nconst channels = {}\n\nlet extractBody\n\ntry {\n const diagnosticsChannel = require('diagnostics_channel')\n channels.create = diagnosticsChannel.channel('undici:request:create')\n channels.bodySent = diagnosticsChannel.channel('undici:request:bodySent')\n channels.headers = diagnosticsChannel.channel('undici:request:headers')\n channels.trailers = diagnosticsChannel.channel('undici:request:trailers')\n channels.error = diagnosticsChannel.channel('undici:request:error')\n} catch {\n channels.create = { hasSubscribers: false }\n channels.bodySent = { hasSubscribers: false }\n channels.headers = { hasSubscribers: false }\n channels.trailers = { hasSubscribers: false }\n channels.error = { hasSubscribers: false }\n}\n\nclass Request {\n constructor (origin, {\n path,\n method,\n body,\n headers,\n query,\n idempotent,\n blocking,\n upgrade,\n headersTimeout,\n bodyTimeout,\n reset,\n throwOnError,\n expectContinue\n }, handler) {\n if (typeof path !== 'string') {\n throw new InvalidArgumentError('path must be a string')\n } else if (\n path[0] !== '/' &&\n !(path.startsWith('http://') || path.startsWith('https://')) &&\n method !== 'CONNECT'\n ) {\n throw new InvalidArgumentError('path must be an absolute URL or start with a slash')\n } else if (invalidPathRegex.exec(path) !== null) {\n throw new InvalidArgumentError('invalid request path')\n }\n\n if (typeof method !== 'string') {\n throw new InvalidArgumentError('method must be a string')\n } else if (tokenRegExp.exec(method) === null) {\n throw new InvalidArgumentError('invalid request method')\n }\n\n if (upgrade && typeof upgrade !== 'string') {\n throw new InvalidArgumentError('upgrade must be a string')\n }\n\n if (headersTimeout != null && (!Number.isFinite(headersTimeout) || headersTimeout < 0)) {\n throw new InvalidArgumentError('invalid headersTimeout')\n }\n\n if (bodyTimeout != null && (!Number.isFinite(bodyTimeout) || bodyTimeout < 0)) {\n throw new InvalidArgumentError('invalid bodyTimeout')\n }\n\n if (reset != null && typeof reset !== 'boolean') {\n throw new InvalidArgumentError('invalid reset')\n }\n\n if (expectContinue != null && typeof expectContinue !== 'boolean') {\n throw new InvalidArgumentError('invalid expectContinue')\n }\n\n this.headersTimeout = headersTimeout\n\n this.bodyTimeout = bodyTimeout\n\n this.throwOnError = throwOnError === true\n\n this.method = method\n\n this.abort = null\n\n if (body == null) {\n this.body = null\n } else if (util.isStream(body)) {\n this.body = body\n\n const rState = this.body._readableState\n if (!rState || !rState.autoDestroy) {\n this.endHandler = function autoDestroy () {\n util.destroy(this)\n }\n this.body.on('end', this.endHandler)\n }\n\n this.errorHandler = err => {\n if (this.abort) {\n this.abort(err)\n } else {\n this.error = err\n }\n }\n this.body.on('error', this.errorHandler)\n } else if (util.isBuffer(body)) {\n this.body = body.byteLength ? body : null\n } else if (ArrayBuffer.isView(body)) {\n this.body = body.buffer.byteLength ? Buffer.from(body.buffer, body.byteOffset, body.byteLength) : null\n } else if (body instanceof ArrayBuffer) {\n this.body = body.byteLength ? Buffer.from(body) : null\n } else if (typeof body === 'string') {\n this.body = body.length ? Buffer.from(body) : null\n } else if (util.isFormDataLike(body) || util.isIterable(body) || util.isBlobLike(body)) {\n this.body = body\n } else {\n throw new InvalidArgumentError('body must be a string, a Buffer, a Readable stream, an iterable, or an async iterable')\n }\n\n this.completed = false\n\n this.aborted = false\n\n this.upgrade = upgrade || null\n\n this.path = query ? util.buildURL(path, query) : path\n\n this.origin = origin\n\n this.idempotent = idempotent == null\n ? method === 'HEAD' || method === 'GET'\n : idempotent\n\n this.blocking = blocking == null ? false : blocking\n\n this.reset = reset == null ? null : reset\n\n this.host = null\n\n this.contentLength = null\n\n this.contentType = null\n\n this.headers = ''\n\n // Only for H2\n this.expectContinue = expectContinue != null ? expectContinue : false\n\n if (Array.isArray(headers)) {\n if (headers.length % 2 !== 0) {\n throw new InvalidArgumentError('headers array must be even')\n }\n for (let i = 0; i < headers.length; i += 2) {\n processHeader(this, headers[i], headers[i + 1])\n }\n } else if (headers && typeof headers === 'object') {\n const keys = Object.keys(headers)\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i]\n processHeader(this, key, headers[key])\n }\n } else if (headers != null) {\n throw new InvalidArgumentError('headers must be an object or an array')\n }\n\n if (util.isFormDataLike(this.body)) {\n if (util.nodeMajor < 16 || (util.nodeMajor === 16 && util.nodeMinor < 8)) {\n throw new InvalidArgumentError('Form-Data bodies are only supported in node v16.8 and newer.')\n }\n\n if (!extractBody) {\n extractBody = require('../fetch/body.js').extractBody\n }\n\n const [bodyStream, contentType] = extractBody(body)\n if (this.contentType == null) {\n this.contentType = contentType\n this.headers += `content-type: ${contentType}\\r\\n`\n }\n this.body = bodyStream.stream\n this.contentLength = bodyStream.length\n } else if (util.isBlobLike(body) && this.contentType == null && body.type) {\n this.contentType = body.type\n this.headers += `content-type: ${body.type}\\r\\n`\n }\n\n util.validateHandler(handler, method, upgrade)\n\n this.servername = util.getServerName(this.host)\n\n this[kHandler] = handler\n\n if (channels.create.hasSubscribers) {\n channels.create.publish({ request: this })\n }\n }\n\n onBodySent (chunk) {\n if (this[kHandler].onBodySent) {\n try {\n return this[kHandler].onBodySent(chunk)\n } catch (err) {\n this.abort(err)\n }\n }\n }\n\n onRequestSent () {\n if (channels.bodySent.hasSubscribers) {\n channels.bodySent.publish({ request: this })\n }\n\n if (this[kHandler].onRequestSent) {\n try {\n return this[kHandler].onRequestSent()\n } catch (err) {\n this.abort(err)\n }\n }\n }\n\n onConnect (abort) {\n assert(!this.aborted)\n assert(!this.completed)\n\n if (this.error) {\n abort(this.error)\n } else {\n this.abort = abort\n return this[kHandler].onConnect(abort)\n }\n }\n\n onHeaders (statusCode, headers, resume, statusText) {\n assert(!this.aborted)\n assert(!this.completed)\n\n if (channels.headers.hasSubscribers) {\n channels.headers.publish({ request: this, response: { statusCode, headers, statusText } })\n }\n\n try {\n return this[kHandler].onHeaders(statusCode, headers, resume, statusText)\n } catch (err) {\n this.abort(err)\n }\n }\n\n onData (chunk) {\n assert(!this.aborted)\n assert(!this.completed)\n\n try {\n return this[kHandler].onData(chunk)\n } catch (err) {\n this.abort(err)\n return false\n }\n }\n\n onUpgrade (statusCode, headers, socket) {\n assert(!this.aborted)\n assert(!this.completed)\n\n return this[kHandler].onUpgrade(statusCode, headers, socket)\n }\n\n onComplete (trailers) {\n this.onFinally()\n\n assert(!this.aborted)\n\n this.completed = true\n if (channels.trailers.hasSubscribers) {\n channels.trailers.publish({ request: this, trailers })\n }\n\n try {\n return this[kHandler].onComplete(trailers)\n } catch (err) {\n // TODO (fix): This might be a bad idea?\n this.onError(err)\n }\n }\n\n onError (error) {\n this.onFinally()\n\n if (channels.error.hasSubscribers) {\n channels.error.publish({ request: this, error })\n }\n\n if (this.aborted) {\n return\n }\n this.aborted = true\n\n return this[kHandler].onError(error)\n }\n\n onFinally () {\n if (this.errorHandler) {\n this.body.off('error', this.errorHandler)\n this.errorHandler = null\n }\n\n if (this.endHandler) {\n this.body.off('end', this.endHandler)\n this.endHandler = null\n }\n }\n\n // TODO: adjust to support H2\n addHeader (key, value) {\n processHeader(this, key, value)\n return this\n }\n\n static [kHTTP1BuildRequest] (origin, opts, handler) {\n // TODO: Migrate header parsing here, to make Requests\n // HTTP agnostic\n return new Request(origin, opts, handler)\n }\n\n static [kHTTP2BuildRequest] (origin, opts, handler) {\n const headers = opts.headers\n opts = { ...opts, headers: null }\n\n const request = new Request(origin, opts, handler)\n\n request.headers = {}\n\n if (Array.isArray(headers)) {\n if (headers.length % 2 !== 0) {\n throw new InvalidArgumentError('headers array must be even')\n }\n for (let i = 0; i < headers.length; i += 2) {\n processHeader(request, headers[i], headers[i + 1], true)\n }\n } else if (headers && typeof headers === 'object') {\n const keys = Object.keys(headers)\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i]\n processHeader(request, key, headers[key], true)\n }\n } else if (headers != null) {\n throw new InvalidArgumentError('headers must be an object or an array')\n }\n\n return request\n }\n\n static [kHTTP2CopyHeaders] (raw) {\n const rawHeaders = raw.split('\\r\\n')\n const headers = {}\n\n for (const header of rawHeaders) {\n const [key, value] = header.split(': ')\n\n if (value == null || value.length === 0) continue\n\n if (headers[key]) headers[key] += `,${value}`\n else headers[key] = value\n }\n\n return headers\n }\n}\n\nfunction processHeaderValue (key, val, skipAppend) {\n if (val && typeof val === 'object') {\n throw new InvalidArgumentError(`invalid ${key} header`)\n }\n\n val = val != null ? `${val}` : ''\n\n if (headerCharRegex.exec(val) !== null) {\n throw new InvalidArgumentError(`invalid ${key} header`)\n }\n\n return skipAppend ? val : `${key}: ${val}\\r\\n`\n}\n\nfunction processHeader (request, key, val, skipAppend = false) {\n if (val && (typeof val === 'object' && !Array.isArray(val))) {\n throw new InvalidArgumentError(`invalid ${key} header`)\n } else if (val === undefined) {\n return\n }\n\n if (\n request.host === null &&\n key.length === 4 &&\n key.toLowerCase() === 'host'\n ) {\n if (headerCharRegex.exec(val) !== null) {\n throw new InvalidArgumentError(`invalid ${key} header`)\n }\n // Consumed by Client\n request.host = val\n } else if (\n request.contentLength === null &&\n key.length === 14 &&\n key.toLowerCase() === 'content-length'\n ) {\n request.contentLength = parseInt(val, 10)\n if (!Number.isFinite(request.contentLength)) {\n throw new InvalidArgumentError('invalid content-length header')\n }\n } else if (\n request.contentType === null &&\n key.length === 12 &&\n key.toLowerCase() === 'content-type'\n ) {\n request.contentType = val\n if (skipAppend) request.headers[key] = processHeaderValue(key, val, skipAppend)\n else request.headers += processHeaderValue(key, val)\n } else if (\n key.length === 17 &&\n key.toLowerCase() === 'transfer-encoding'\n ) {\n throw new InvalidArgumentError('invalid transfer-encoding header')\n } else if (\n key.length === 10 &&\n key.toLowerCase() === 'connection'\n ) {\n const value = typeof val === 'string' ? val.toLowerCase() : null\n if (value !== 'close' && value !== 'keep-alive') {\n throw new InvalidArgumentError('invalid connection header')\n } else if (value === 'close') {\n request.reset = true\n }\n } else if (\n key.length === 10 &&\n key.toLowerCase() === 'keep-alive'\n ) {\n throw new InvalidArgumentError('invalid keep-alive header')\n } else if (\n key.length === 7 &&\n key.toLowerCase() === 'upgrade'\n ) {\n throw new InvalidArgumentError('invalid upgrade header')\n } else if (\n key.length === 6 &&\n key.toLowerCase() === 'expect'\n ) {\n throw new NotSupportedError('expect header not supported')\n } else if (tokenRegExp.exec(key) === null) {\n throw new InvalidArgumentError('invalid header key')\n } else {\n if (Array.isArray(val)) {\n for (let i = 0; i < val.length; i++) {\n if (skipAppend) {\n if (request.headers[key]) request.headers[key] += `,${processHeaderValue(key, val[i], skipAppend)}`\n else request.headers[key] = processHeaderValue(key, val[i], skipAppend)\n } else {\n request.headers += processHeaderValue(key, val[i])\n }\n }\n } else {\n if (skipAppend) request.headers[key] = processHeaderValue(key, val, skipAppend)\n else request.headers += processHeaderValue(key, val)\n }\n }\n}\n\nmodule.exports = Request\n", "'use strict'\n\nconst EventEmitter = require('events')\n\nclass Dispatcher extends EventEmitter {\n dispatch () {\n throw new Error('not implemented')\n }\n\n close () {\n throw new Error('not implemented')\n }\n\n destroy () {\n throw new Error('not implemented')\n }\n}\n\nmodule.exports = Dispatcher\n", "'use strict'\n\nconst Dispatcher = require('./dispatcher')\nconst {\n ClientDestroyedError,\n ClientClosedError,\n InvalidArgumentError\n} = require('./core/errors')\nconst { kDestroy, kClose, kDispatch, kInterceptors } = require('./core/symbols')\n\nconst kDestroyed = Symbol('destroyed')\nconst kClosed = Symbol('closed')\nconst kOnDestroyed = Symbol('onDestroyed')\nconst kOnClosed = Symbol('onClosed')\nconst kInterceptedDispatch = Symbol('Intercepted Dispatch')\n\nclass DispatcherBase extends Dispatcher {\n constructor () {\n super()\n\n this[kDestroyed] = false\n this[kOnDestroyed] = null\n this[kClosed] = false\n this[kOnClosed] = []\n }\n\n get destroyed () {\n return this[kDestroyed]\n }\n\n get closed () {\n return this[kClosed]\n }\n\n get interceptors () {\n return this[kInterceptors]\n }\n\n set interceptors (newInterceptors) {\n if (newInterceptors) {\n for (let i = newInterceptors.length - 1; i >= 0; i--) {\n const interceptor = this[kInterceptors][i]\n if (typeof interceptor !== 'function') {\n throw new InvalidArgumentError('interceptor must be an function')\n }\n }\n }\n\n this[kInterceptors] = newInterceptors\n }\n\n close (callback) {\n if (callback === undefined) {\n return new Promise((resolve, reject) => {\n this.close((err, data) => {\n return err ? reject(err) : resolve(data)\n })\n })\n }\n\n if (typeof callback !== 'function') {\n throw new InvalidArgumentError('invalid callback')\n }\n\n if (this[kDestroyed]) {\n queueMicrotask(() => callback(new ClientDestroyedError(), null))\n return\n }\n\n if (this[kClosed]) {\n if (this[kOnClosed]) {\n this[kOnClosed].push(callback)\n } else {\n queueMicrotask(() => callback(null, null))\n }\n return\n }\n\n this[kClosed] = true\n this[kOnClosed].push(callback)\n\n const onClosed = () => {\n const callbacks = this[kOnClosed]\n this[kOnClosed] = null\n for (let i = 0; i < callbacks.length; i++) {\n callbacks[i](null, null)\n }\n }\n\n // Should not error.\n this[kClose]()\n .then(() => this.destroy())\n .then(() => {\n queueMicrotask(onClosed)\n })\n }\n\n destroy (err, callback) {\n if (typeof err === 'function') {\n callback = err\n err = null\n }\n\n if (callback === undefined) {\n return new Promise((resolve, reject) => {\n this.destroy(err, (err, data) => {\n return err ? /* istanbul ignore next: should never error */ reject(err) : resolve(data)\n })\n })\n }\n\n if (typeof callback !== 'function') {\n throw new InvalidArgumentError('invalid callback')\n }\n\n if (this[kDestroyed]) {\n if (this[kOnDestroyed]) {\n this[kOnDestroyed].push(callback)\n } else {\n queueMicrotask(() => callback(null, null))\n }\n return\n }\n\n if (!err) {\n err = new ClientDestroyedError()\n }\n\n this[kDestroyed] = true\n this[kOnDestroyed] = this[kOnDestroyed] || []\n this[kOnDestroyed].push(callback)\n\n const onDestroyed = () => {\n const callbacks = this[kOnDestroyed]\n this[kOnDestroyed] = null\n for (let i = 0; i < callbacks.length; i++) {\n callbacks[i](null, null)\n }\n }\n\n // Should not error.\n this[kDestroy](err).then(() => {\n queueMicrotask(onDestroyed)\n })\n }\n\n [kInterceptedDispatch] (opts, handler) {\n if (!this[kInterceptors] || this[kInterceptors].length === 0) {\n this[kInterceptedDispatch] = this[kDispatch]\n return this[kDispatch](opts, handler)\n }\n\n let dispatch = this[kDispatch].bind(this)\n for (let i = this[kInterceptors].length - 1; i >= 0; i--) {\n dispatch = this[kInterceptors][i](dispatch)\n }\n this[kInterceptedDispatch] = dispatch\n return dispatch(opts, handler)\n }\n\n dispatch (opts, handler) {\n if (!handler || typeof handler !== 'object') {\n throw new InvalidArgumentError('handler must be an object')\n }\n\n try {\n if (!opts || typeof opts !== 'object') {\n throw new InvalidArgumentError('opts must be an object.')\n }\n\n if (this[kDestroyed] || this[kOnDestroyed]) {\n throw new ClientDestroyedError()\n }\n\n if (this[kClosed]) {\n throw new ClientClosedError()\n }\n\n return this[kInterceptedDispatch](opts, handler)\n } catch (err) {\n if (typeof handler.onError !== 'function') {\n throw new InvalidArgumentError('invalid onError method')\n }\n\n handler.onError(err)\n\n return false\n }\n }\n}\n\nmodule.exports = DispatcherBase\n", "'use strict'\n\nconst net = require('net')\nconst assert = require('assert')\nconst util = require('./util')\nconst { InvalidArgumentError, ConnectTimeoutError } = require('./errors')\n\nlet tls // include tls conditionally since it is not always available\n\n// TODO: session re-use does not wait for the first\n// connection to resolve the session and might therefore\n// resolve the same servername multiple times even when\n// re-use is enabled.\n\nlet SessionCache\n// FIXME: remove workaround when the Node bug is fixed\n// https://github.com/nodejs/node/issues/49344#issuecomment-1741776308\nif (global.FinalizationRegistry && !process.env.NODE_V8_COVERAGE) {\n SessionCache = class WeakSessionCache {\n constructor (maxCachedSessions) {\n this._maxCachedSessions = maxCachedSessions\n this._sessionCache = new Map()\n this._sessionRegistry = new global.FinalizationRegistry((key) => {\n if (this._sessionCache.size < this._maxCachedSessions) {\n return\n }\n\n const ref = this._sessionCache.get(key)\n if (ref !== undefined && ref.deref() === undefined) {\n this._sessionCache.delete(key)\n }\n })\n }\n\n get (sessionKey) {\n const ref = this._sessionCache.get(sessionKey)\n return ref ? ref.deref() : null\n }\n\n set (sessionKey, session) {\n if (this._maxCachedSessions === 0) {\n return\n }\n\n this._sessionCache.set(sessionKey, new WeakRef(session))\n this._sessionRegistry.register(session, sessionKey)\n }\n }\n} else {\n SessionCache = class SimpleSessionCache {\n constructor (maxCachedSessions) {\n this._maxCachedSessions = maxCachedSessions\n this._sessionCache = new Map()\n }\n\n get (sessionKey) {\n return this._sessionCache.get(sessionKey)\n }\n\n set (sessionKey, session) {\n if (this._maxCachedSessions === 0) {\n return\n }\n\n if (this._sessionCache.size >= this._maxCachedSessions) {\n // remove the oldest session\n const { value: oldestKey } = this._sessionCache.keys().next()\n this._sessionCache.delete(oldestKey)\n }\n\n this._sessionCache.set(sessionKey, session)\n }\n }\n}\n\nfunction buildConnector ({ allowH2, maxCachedSessions, socketPath, timeout, ...opts }) {\n if (maxCachedSessions != null && (!Number.isInteger(maxCachedSessions) || maxCachedSessions < 0)) {\n throw new InvalidArgumentError('maxCachedSessions must be a positive integer or zero')\n }\n\n const options = { path: socketPath, ...opts }\n const sessionCache = new SessionCache(maxCachedSessions == null ? 100 : maxCachedSessions)\n timeout = timeout == null ? 10e3 : timeout\n allowH2 = allowH2 != null ? allowH2 : false\n return function connect ({ hostname, host, protocol, port, servername, localAddress, httpSocket }, callback) {\n let socket\n if (protocol === 'https:') {\n if (!tls) {\n tls = require('tls')\n }\n servername = servername || options.servername || util.getServerName(host) || null\n\n const sessionKey = servername || hostname\n const session = sessionCache.get(sessionKey) || null\n\n assert(sessionKey)\n\n socket = tls.connect({\n highWaterMark: 16384, // TLS in node can't have bigger HWM anyway...\n ...options,\n servername,\n session,\n localAddress,\n // TODO(HTTP/2): Add support for h2c\n ALPNProtocols: allowH2 ? ['http/1.1', 'h2'] : ['http/1.1'],\n socket: httpSocket, // upgrade socket connection\n port: port || 443,\n host: hostname\n })\n\n socket\n .on('session', function (session) {\n // TODO (fix): Can a session become invalid once established? Don't think so?\n sessionCache.set(sessionKey, session)\n })\n } else {\n assert(!httpSocket, 'httpSocket can only be sent on TLS update')\n socket = net.connect({\n highWaterMark: 64 * 1024, // Same as nodejs fs streams.\n ...options,\n localAddress,\n port: port || 80,\n host: hostname\n })\n }\n\n // Set TCP keep alive options on the socket here instead of in connect() for the case of assigning the socket\n if (options.keepAlive == null || options.keepAlive) {\n const keepAliveInitialDelay = options.keepAliveInitialDelay === undefined ? 60e3 : options.keepAliveInitialDelay\n socket.setKeepAlive(true, keepAliveInitialDelay)\n }\n\n const cancelTimeout = setupTimeout(() => onConnectTimeout(socket), timeout)\n\n socket\n .setNoDelay(true)\n .once(protocol === 'https:' ? 'secureConnect' : 'connect', function () {\n cancelTimeout()\n\n if (callback) {\n const cb = callback\n callback = null\n cb(null, this)\n }\n })\n .on('error', function (err) {\n cancelTimeout()\n\n if (callback) {\n const cb = callback\n callback = null\n cb(err)\n }\n })\n\n return socket\n }\n}\n\nfunction setupTimeout (onConnectTimeout, timeout) {\n if (!timeout) {\n return () => {}\n }\n\n let s1 = null\n let s2 = null\n const timeoutId = setTimeout(() => {\n // setImmediate is added to make sure that we priotorise socket error events over timeouts\n s1 = setImmediate(() => {\n if (process.platform === 'win32') {\n // Windows needs an extra setImmediate probably due to implementation differences in the socket logic\n s2 = setImmediate(() => onConnectTimeout())\n } else {\n onConnectTimeout()\n }\n })\n }, timeout)\n return () => {\n clearTimeout(timeoutId)\n clearImmediate(s1)\n clearImmediate(s2)\n }\n}\n\nfunction onConnectTimeout (socket) {\n util.destroy(socket, new ConnectTimeoutError())\n}\n\nmodule.exports = buildConnector\n", null, null, "'use strict'\n\nconst util = require('../core/util')\nconst { kBodyUsed } = require('../core/symbols')\nconst assert = require('assert')\nconst { InvalidArgumentError } = require('../core/errors')\nconst EE = require('events')\n\nconst redirectableStatusCodes = [300, 301, 302, 303, 307, 308]\n\nconst kBody = Symbol('body')\n\nclass BodyAsyncIterable {\n constructor (body) {\n this[kBody] = body\n this[kBodyUsed] = false\n }\n\n async * [Symbol.asyncIterator] () {\n assert(!this[kBodyUsed], 'disturbed')\n this[kBodyUsed] = true\n yield * this[kBody]\n }\n}\n\nclass RedirectHandler {\n constructor (dispatch, maxRedirections, opts, handler) {\n if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) {\n throw new InvalidArgumentError('maxRedirections must be a positive number')\n }\n\n util.validateHandler(handler, opts.method, opts.upgrade)\n\n this.dispatch = dispatch\n this.location = null\n this.abort = null\n this.opts = { ...opts, maxRedirections: 0 } // opts must be a copy\n this.maxRedirections = maxRedirections\n this.handler = handler\n this.history = []\n\n if (util.isStream(this.opts.body)) {\n // TODO (fix): Provide some way for the user to cache the file to e.g. /tmp\n // so that it can be dispatched again?\n // TODO (fix): Do we need 100-expect support to provide a way to do this properly?\n if (util.bodyLength(this.opts.body) === 0) {\n this.opts.body\n .on('data', function () {\n assert(false)\n })\n }\n\n if (typeof this.opts.body.readableDidRead !== 'boolean') {\n this.opts.body[kBodyUsed] = false\n EE.prototype.on.call(this.opts.body, 'data', function () {\n this[kBodyUsed] = true\n })\n }\n } else if (this.opts.body && typeof this.opts.body.pipeTo === 'function') {\n // TODO (fix): We can't access ReadableStream internal state\n // to determine whether or not it has been disturbed. This is just\n // a workaround.\n this.opts.body = new BodyAsyncIterable(this.opts.body)\n } else if (\n this.opts.body &&\n typeof this.opts.body !== 'string' &&\n !ArrayBuffer.isView(this.opts.body) &&\n util.isIterable(this.opts.body)\n ) {\n // TODO: Should we allow re-using iterable if !this.opts.idempotent\n // or through some other flag?\n this.opts.body = new BodyAsyncIterable(this.opts.body)\n }\n }\n\n onConnect (abort) {\n this.abort = abort\n this.handler.onConnect(abort, { history: this.history })\n }\n\n onUpgrade (statusCode, headers, socket) {\n this.handler.onUpgrade(statusCode, headers, socket)\n }\n\n onError (error) {\n this.handler.onError(error)\n }\n\n onHeaders (statusCode, headers, resume, statusText) {\n this.location = this.history.length >= this.maxRedirections || util.isDisturbed(this.opts.body)\n ? null\n : parseLocation(statusCode, headers)\n\n if (this.opts.origin) {\n this.history.push(new URL(this.opts.path, this.opts.origin))\n }\n\n if (!this.location) {\n return this.handler.onHeaders(statusCode, headers, resume, statusText)\n }\n\n const { origin, pathname, search } = util.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin)))\n const path = search ? `${pathname}${search}` : pathname\n\n // Remove headers referring to the original URL.\n // By default it is Host only, unless it's a 303 (see below), which removes also all Content-* headers.\n // https://tools.ietf.org/html/rfc7231#section-6.4\n this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin)\n this.opts.path = path\n this.opts.origin = origin\n this.opts.maxRedirections = 0\n this.opts.query = null\n\n // https://tools.ietf.org/html/rfc7231#section-6.4.4\n // In case of HTTP 303, always replace method to be either HEAD or GET\n if (statusCode === 303 && this.opts.method !== 'HEAD') {\n this.opts.method = 'GET'\n this.opts.body = null\n }\n }\n\n onData (chunk) {\n if (this.location) {\n /*\n https://tools.ietf.org/html/rfc7231#section-6.4\n\n TLDR: undici always ignores 3xx response bodies.\n\n Redirection is used to serve the requested resource from another URL, so it is assumes that\n no body is generated (and thus can be ignored). Even though generating a body is not prohibited.\n\n For status 301, 302, 303, 307 and 308 (the latter from RFC 7238), the specs mention that the body usually\n (which means it's optional and not mandated) contain just an hyperlink to the value of\n the Location response header, so the body can be ignored safely.\n\n For status 300, which is \"Multiple Choices\", the spec mentions both generating a Location\n response header AND a response body with the other possible location to follow.\n Since the spec explicitily chooses not to specify a format for such body and leave it to\n servers and browsers implementors, we ignore the body as there is no specified way to eventually parse it.\n */\n } else {\n return this.handler.onData(chunk)\n }\n }\n\n onComplete (trailers) {\n if (this.location) {\n /*\n https://tools.ietf.org/html/rfc7231#section-6.4\n\n TLDR: undici always ignores 3xx response trailers as they are not expected in case of redirections\n and neither are useful if present.\n\n See comment on onData method above for more detailed informations.\n */\n\n this.location = null\n this.abort = null\n\n this.dispatch(this.opts, this)\n } else {\n this.handler.onComplete(trailers)\n }\n }\n\n onBodySent (chunk) {\n if (this.handler.onBodySent) {\n this.handler.onBodySent(chunk)\n }\n }\n}\n\nfunction parseLocation (statusCode, headers) {\n if (redirectableStatusCodes.indexOf(statusCode) === -1) {\n return null\n }\n\n for (let i = 0; i < headers.length; i += 2) {\n if (headers[i].toString().toLowerCase() === 'location') {\n return headers[i + 1]\n }\n }\n}\n\n// https://tools.ietf.org/html/rfc7231#section-6.4.4\nfunction shouldRemoveHeader (header, removeContent, unknownOrigin) {\n if (header.length === 4) {\n return util.headerNameToString(header) === 'host'\n }\n if (removeContent && util.headerNameToString(header).startsWith('content-')) {\n return true\n }\n if (unknownOrigin && (header.length === 13 || header.length === 6 || header.length === 19)) {\n const name = util.headerNameToString(header)\n return name === 'authorization' || name === 'cookie' || name === 'proxy-authorization'\n }\n return false\n}\n\n// https://tools.ietf.org/html/rfc7231#section-6.4\nfunction cleanRequestHeaders (headers, removeContent, unknownOrigin) {\n const ret = []\n if (Array.isArray(headers)) {\n for (let i = 0; i < headers.length; i += 2) {\n if (!shouldRemoveHeader(headers[i], removeContent, unknownOrigin)) {\n ret.push(headers[i], headers[i + 1])\n }\n }\n } else if (headers && typeof headers === 'object') {\n for (const key of Object.keys(headers)) {\n if (!shouldRemoveHeader(key, removeContent, unknownOrigin)) {\n ret.push(key, headers[key])\n }\n }\n } else {\n assert(headers == null, 'headers must be an object or an array')\n }\n return ret\n}\n\nmodule.exports = RedirectHandler\n", "'use strict'\n\nconst RedirectHandler = require('../handler/RedirectHandler')\n\nfunction createRedirectInterceptor ({ maxRedirections: defaultMaxRedirections }) {\n return (dispatch) => {\n return function Intercept (opts, handler) {\n const { maxRedirections = defaultMaxRedirections } = opts\n\n if (!maxRedirections) {\n return dispatch(opts, handler)\n }\n\n const redirectHandler = new RedirectHandler(dispatch, maxRedirections, opts, handler)\n opts = { ...opts, maxRedirections: 0 } // Stop sub dispatcher from also redirecting.\n return dispatch(opts, redirectHandler)\n }\n }\n}\n\nmodule.exports = createRedirectInterceptor\n", "module.exports = 'AGFzbQEAAAABMAhgAX8Bf2ADf39/AX9gBH9/f38Bf2AAAGADf39/AGABfwBgAn9/AGAGf39/f39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQACA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2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QAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCAQDscBAAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxweHyAhIyUoP0BBREVGR0hJSktMTU9QUVJT3gNXWVtcXWBiZWZnaGlqa2xtb3BxcnN0dXZ3eHl6e3x9foABggGFAYYBhwGJAYsBjAGNAY4BjwGQAZEBlAGVAZYBlwGYAZkBmgGbAZwBnQGeAZ8BoAGhAaIBowGkAaU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AEhAQxNCyAAQdIANgIcIAAgATYCFCAAIBA2AgxBACEQDLIBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxNCyAAQdMANgIcIAAgATYCFCAAIBA2AgxBACEQDLEBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxRCyAAQeUANgIcIAAgATYCFCAAIBA2AgxBACEQDLABCyAAQQA2AhwgACABNgIUIABBxoqAgAA2AhAgAEEHNgIMQQAhEAyvAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMSQsgAEHSADYCHCAAIAE2AhQgACAQNgIMQQAhEAyuAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMSQsgAEHTADYCHCAAIAE2AhQgACAQNgIMQQAhEAytAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMTQsgAEHlADYCHCAAIAE2AhQgACAQNgIMQQAhEAysAQsgAEEANgIcIAAgATYCFCAAQdyIgIAANgIQIABBBzYCDEEAIRAMqwELIBBBP0cNASABQQFqIQELQQUhEAyQAQtBACEQIABBADYCHCAAIAE2AhQgAEH9koCAADYCECAAQQc2AgwMqAELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDEILIABB0gA2AhwgACABNgIUIAAgEDYCDEEAIRAMpwELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDEILIABB0wA2AhwgACABNgIUIAAgEDYCDEEAIRAMpgELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDEYLIABB5QA2AhwgACABNgIUIAAgEDYCDEEAIRAMpQELIAAoAgQhASAAQQA2AgQCQCAAIAEgFBCngICAACIBDQAgFCEBDD8LIABB0gA2AhwgACAUNgIUIAAgATYCDEEAIRAMpAELIAAoAgQhASAAQQA2AgQCQCAAIAEgFBCngICAACIBDQAgFCEBDD8LIABB0wA2AhwgACA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AEEAIQEgAkGIBHFBgARGDQAgAkEocUEARyEBCyABC0kBAXsgAEEQav0MAAAAAAAAAAAAAAAAAAAAACIB/QsDACAAIAH9CwMAIABBMGogAf0LAwAgAEEgaiAB/QsDACAAQd0BNgIcQQALewEBfwJAIAAoAgwiAw0AAkAgACgCBEUNACAAIAE2AgQLAkAgACABIAIQxICAgAAiAw0AIAAoAgwPCyAAIAM2AhxBACEDIAAoAgQiAUUNACAAIAEgAiAAKAIIEYGAgIAAACIBRQ0AIAAgAjYCFCAAIAE2AgwgASEDCyADC+TzAQMOfwN+BH8jgICAgABBEGsiAySAgICAACABIQQgASEFIAEhBiABIQcgASEIIAEhCSABIQogASELIAEhDCABIQ0gASEOIAEhDwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCAAKAIcIhBBf2oO3QHaAQHZAQIDBAUGBwgJCgsMDQ7YAQ8Q1wEREtYBExQVFhcYGRob4AHfARwdHtUBHyAhIiMkJdQBJicoKSorLNMB0gEtLtEB0AEvMDEyMzQ1Njc4OTo7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IRAMGwtBqgEhEAwaC0GrASEQDBkLQawBIRAMGAtBrQEhEAwXC0GuASEQDBYLQQEhEAwVC0GvASEQDBQLQbABIRAMEwtBsQEhEAwSC0GzASEQDBELQbIBIRAMEAtBtAEhEAwPC0G1ASEQDA4LQbYBIRAMDQtBtwEhEAwMC0G4ASEQDAsLQbkBIRAMCgtBugEhEAwJC0G7ASEQDAgLQcYBIRAMBwtBvAEhEAwGC0G9ASEQDAULQb4BIRAMBAtBvwEhEAwDC0HAASEQDAILQcIBIRAMAQtBwQEhEAsDQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQ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EQDPYDCyABIgEgAkcNSkE/IRAM9QMLIAEiASACRw1IQTwhEAz0AwsgASIBIAJHDUFBMSEQDPMDCyAALQAuQQFGDesDDIcCCyAAIAEiASACEMCAgIAAQQFHDeYBIABCADcDIAznAQsgACABIgEgAhC0gICAACIQDecBIAEhAQz1AgsCQCABIgEgAkcNAEEGIRAM8AMLIAAgAUEBaiIBIAIQu4CAgAAiEA3oASABIQEMMQsgAEIANwMgQRIhEAzVAwsgASIQIAJHDStBHSEQDO0DCwJAIAEiASACRg0AIAFBAWohAUEQIRAM1AMLQQchEAzsAwsgAEIAIAApAyAiESACIAEiEGutIhJ9IhMgEyARVhs3AyAgESASViIURQ3lAUEIIRAM6wMLAkAgASIBIAJGDQAgAEGJgICAADYCCCAAIAE2AgQgASEBQRQhEAzSAwtBCSEQDOoDCyABIQEgACkDIFAN5AEgASEBDPICCwJAIAEiASACRw0AQQshEAzpAwsgACABQQFqIgEgAhC2gICAACIQDeUBIAEhAQzyAgsgACABIgEgAhC4gICAACIQDeUBIAEhAQzyAgsgACABIgEgAhC4gICAACIQDeYBIAEhAQwNCyAAIAEiASACELqAgIAAIhAN5wEgASEBDPACCwJAIAEiASACRw0AQQ8hEAzlAwsgAS0AACIQQTtGDQggEEENRw3oASABQQFqIQEM7wILIAAgASIBIAIQuoCAgAAiEA3oASABIQEM8gILA0ACQCABLQAAQfC1gIAAai0AACIQQQFGDQAgEEECRw3rASAAKAIEIRAgAEEANgIEIAAgECABQQFqIgEQuYCAgAAiEA3qASABIQEM9AILIAFBAWoiASACRw0AC0ESIRAM4gMLIAAgASIBIAIQuoCAgAAiEA3pASABIQEMCgsgASIBIAJHDQZBGyEQDOADCwJAIAEiASACRw0AQRYhEAzgAwsgAEGKgICAADYCCCAAIAE2AgQgACABIAIQuICAgAAiEA3qASABIQFBICEQDMYDCwJAIAEiASACRg0AA0ACQCABLQAAQfC3gIAAai0AACIQQQJGDQACQCAQQX9qDgTlAewBAOsB7AELIAFBAWohAUEIIRAMyAM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EBaiEBAkAgAC0AKUEjTw0AIAEhAQxZCyAAQQA2AhwgACABNgIUIABB04mAgAA2AhAgAEEINgIMQQAhEAy5AQsgAEEANgIAC0EAIRAgAEEANgIcIAAgATYCFCAAQZCzgIAANgIQIABBCDYCDAy3AQsgAEEANgIAIBdBAWohAQJAIAAtAClBIUcNACABIQEMVgsgAEEANgIcIAAgATYCFCAAQZuKgIAANgIQIABBCDYCDEEAIRAMtgELIABBADYCACAXQQFqIQECQCAALQApIhBBXWpBC08NACABIQEMVQsCQCAQQQZLDQBBASAQdEHKAHFFDQAgASEBDFULQQAhECAAQQA2AhwgACABNgIUIABB94mAgAA2AhAgAEEINgIMDLUBCyAQQRVGDXEgAEEANgIcIAAgATYCFCAAQbmNgIAANgIQIABBGjYCDEEAIRAMtAELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDFQLIABB5QA2AhwgACABNgIUIAAgEDYCDEEAIRAMswELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDE0LIABB0gA2AhwgACABNgIUIAAgEDYCDEEAIRAMsgELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDE0LIABB0wA2AhwgACABNgIUIAAgEDYCDEEAIRAMsQELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDFELIABB5QA2AhwgACABNgIUIAAgEDYCDEEAIRAMsAELIABBADYCHCAAIAE2AhQgAEHGioCAADYCECAAQQc2AgxBACEQDK8BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxJCyAAQdIANgIcIAAgATYCFCAAIBA2AgxBACEQDK4BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxJCyAAQdMANgIcIAAgATYCFCAAIBA2AgxBACEQDK0BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxNCyAAQeUANgIcIAAgATYCFCA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", "// @ts-check\n\n'use strict'\n\n/* global WebAssembly */\n\nconst assert = require('assert')\nconst net = require('net')\nconst http = require('http')\nconst { pipeline } = require('stream')\nconst util = require('./core/util')\nconst timers = require('./timers')\nconst Request = require('./core/request')\nconst DispatcherBase = require('./dispatcher-base')\nconst {\n RequestContentLengthMismatchError,\n ResponseContentLengthMismatchError,\n InvalidArgumentError,\n RequestAbortedError,\n HeadersTimeoutError,\n HeadersOverflowError,\n SocketError,\n InformationalError,\n BodyTimeoutError,\n HTTPParserError,\n ResponseExceededMaxSizeError,\n ClientDestroyedError\n} = require('./core/errors')\nconst buildConnector = require('./core/connect')\nconst {\n kUrl,\n kReset,\n kServerName,\n kClient,\n kBusy,\n kParser,\n kConnect,\n kBlocking,\n kResuming,\n kRunning,\n kPending,\n kSize,\n kWriting,\n kQueue,\n kConnected,\n kConnecting,\n kNeedDrain,\n kNoRef,\n kKeepAliveDefaultTimeout,\n kHostHeader,\n kPendingIdx,\n kRunningIdx,\n kError,\n kPipelining,\n kSocket,\n kKeepAliveTimeoutValue,\n kMaxHeadersSize,\n kKeepAliveMaxTimeout,\n kKeepAliveTimeoutThreshold,\n kHeadersTimeout,\n kBodyTimeout,\n kStrictContentLength,\n kConnector,\n kMaxRedirections,\n kMaxRequests,\n kCounter,\n kClose,\n kDestroy,\n kDispatch,\n kInterceptors,\n kLocalAddress,\n kMaxResponseSize,\n kHTTPConnVersion,\n // HTTP2\n kHost,\n kHTTP2Session,\n kHTTP2SessionState,\n kHTTP2BuildRequest,\n kHTTP2CopyHeaders,\n kHTTP1BuildRequest\n} = require('./core/symbols')\n\n/** @type {import('http2')} */\nlet http2\ntry {\n http2 = require('http2')\n} catch {\n // @ts-ignore\n http2 = { constants: {} }\n}\n\nconst {\n constants: {\n HTTP2_HEADER_AUTHORITY,\n HTTP2_HEADER_METHOD,\n HTTP2_HEADER_PATH,\n HTTP2_HEADER_SCHEME,\n HTTP2_HEADER_CONTENT_LENGTH,\n HTTP2_HEADER_EXPECT,\n HTTP2_HEADER_STATUS\n }\n} = http2\n\n// Experimental\nlet h2ExperimentalWarned = false\n\nconst FastBuffer = Buffer[Symbol.species]\n\nconst kClosedResolve = Symbol('kClosedResolve')\n\nconst channels = {}\n\ntry {\n const diagnosticsChannel = require('diagnostics_channel')\n channels.sendHeaders = diagnosticsChannel.channel('undici:client:sendHeaders')\n channels.beforeConnect = diagnosticsChannel.channel('undici:client:beforeConnect')\n channels.connectError = diagnosticsChannel.channel('undici:client:connectError')\n channels.connected = diagnosticsChannel.channel('undici:client:connected')\n} catch {\n channels.sendHeaders = { hasSubscribers: false }\n channels.beforeConnect = { hasSubscribers: false }\n channels.connectError = { hasSubscribers: false }\n channels.connected = { hasSubscribers: false }\n}\n\n/**\n * @type {import('../types/client').default}\n */\nclass Client extends DispatcherBase {\n /**\n *\n * @param {string|URL} url\n * @param {import('../types/client').Client.Options} options\n */\n constructor (url, {\n interceptors,\n maxHeaderSize,\n headersTimeout,\n socketTimeout,\n requestTimeout,\n connectTimeout,\n bodyTimeout,\n idleTimeout,\n keepAlive,\n keepAliveTimeout,\n maxKeepAliveTimeout,\n keepAliveMaxTimeout,\n keepAliveTimeoutThreshold,\n socketPath,\n pipelining,\n tls,\n strictContentLength,\n maxCachedSessions,\n maxRedirections,\n connect,\n maxRequestsPerClient,\n localAddress,\n maxResponseSize,\n autoSelectFamily,\n autoSelectFamilyAttemptTimeout,\n // h2\n allowH2,\n maxConcurrentStreams\n } = {}) {\n super()\n\n if (keepAlive !== undefined) {\n throw new InvalidArgumentError('unsupported keepAlive, use pipelining=0 instead')\n }\n\n if (socketTimeout !== undefined) {\n throw new InvalidArgumentError('unsupported socketTimeout, use headersTimeout & bodyTimeout instead')\n }\n\n if (requestTimeout !== undefined) {\n throw new InvalidArgumentError('unsupported requestTimeout, use headersTimeout & bodyTimeout instead')\n }\n\n if (idleTimeout !== undefined) {\n throw new InvalidArgumentError('unsupported idleTimeout, use keepAliveTimeout instead')\n }\n\n if (maxKeepAliveTimeout !== undefined) {\n throw new InvalidArgumentError('unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead')\n }\n\n if (maxHeaderSize != null && !Number.isFinite(maxHeaderSize)) {\n throw new InvalidArgumentError('invalid maxHeaderSize')\n }\n\n if (socketPath != null && typeof socketPath !== 'string') {\n throw new InvalidArgumentError('invalid socketPath')\n }\n\n if (connectTimeout != null && (!Number.isFinite(connectTimeout) || connectTimeout < 0)) {\n throw new InvalidArgumentError('invalid connectTimeout')\n }\n\n if (keepAliveTimeout != null && (!Number.isFinite(keepAliveTimeout) || keepAliveTimeout <= 0)) {\n throw new InvalidArgumentError('invalid keepAliveTimeout')\n }\n\n if (keepAliveMaxTimeout != null && (!Number.isFinite(keepAliveMaxTimeout) || keepAliveMaxTimeout <= 0)) {\n throw new InvalidArgumentError('invalid keepAliveMaxTimeout')\n }\n\n if (keepAliveTimeoutThreshold != null && !Number.isFinite(keepAliveTimeoutThreshold)) {\n throw new InvalidArgumentError('invalid keepAliveTimeoutThreshold')\n }\n\n if (headersTimeout != null && (!Number.isInteger(headersTimeout) || headersTimeout < 0)) {\n throw new InvalidArgumentError('headersTimeout must be a positive integer or zero')\n }\n\n if (bodyTimeout != null && (!Number.isInteger(bodyTimeout) || bodyTimeout < 0)) {\n throw new InvalidArgumentError('bodyTimeout must be a positive integer or zero')\n }\n\n if (connect != null && typeof connect !== 'function' && typeof connect !== 'object') {\n throw new InvalidArgumentError('connect must be a function or an object')\n }\n\n if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) {\n throw new InvalidArgumentError('maxRedirections must be a positive number')\n }\n\n if (maxRequestsPerClient != null && (!Number.isInteger(maxRequestsPerClient) || maxRequestsPerClient < 0)) {\n throw new InvalidArgumentError('maxRequestsPerClient must be a positive number')\n }\n\n if (localAddress != null && (typeof localAddress !== 'string' || net.isIP(localAddress) === 0)) {\n throw new InvalidArgumentError('localAddress must be valid string IP address')\n }\n\n if (maxResponseSize != null && (!Number.isInteger(maxResponseSize) || maxResponseSize < -1)) {\n throw new InvalidArgumentError('maxResponseSize must be a positive number')\n }\n\n if (\n autoSelectFamilyAttemptTimeout != null &&\n (!Number.isInteger(autoSelectFamilyAttemptTimeout) || autoSelectFamilyAttemptTimeout < -1)\n ) {\n throw new InvalidArgumentError('autoSelectFamilyAttemptTimeout must be a positive number')\n }\n\n // h2\n if (allowH2 != null && typeof allowH2 !== 'boolean') {\n throw new InvalidArgumentError('allowH2 must be a valid boolean value')\n }\n\n if (maxConcurrentStreams != null && (typeof maxConcurrentStreams !== 'number' || maxConcurrentStreams < 1)) {\n throw new InvalidArgumentError('maxConcurrentStreams must be a possitive integer, greater than 0')\n }\n\n if (typeof connect !== 'function') {\n connect = buildConnector({\n ...tls,\n maxCachedSessions,\n allowH2,\n socketPath,\n timeout: connectTimeout,\n ...(util.nodeHasAutoSelectFamily && autoSelectFamily ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : undefined),\n ...connect\n })\n }\n\n this[kInterceptors] = interceptors && interceptors.Client && Array.isArray(interceptors.Client)\n ? interceptors.Client\n : [createRedirectInterceptor({ maxRedirections })]\n this[kUrl] = util.parseOrigin(url)\n this[kConnector] = connect\n this[kSocket] = null\n this[kPipelining] = pipelining != null ? pipelining : 1\n this[kMaxHeadersSize] = maxHeaderSize || http.maxHeaderSize\n this[kKeepAliveDefaultTimeout] = keepAliveTimeout == null ? 4e3 : keepAliveTimeout\n this[kKeepAliveMaxTimeout] = keepAliveMaxTimeout == null ? 600e3 : keepAliveMaxTimeout\n this[kKeepAliveTimeoutThreshold] = keepAliveTimeoutThreshold == null ? 1e3 : keepAliveTimeoutThreshold\n this[kKeepAliveTimeoutValue] = this[kKeepAliveDefaultTimeout]\n this[kServerName] = null\n this[kLocalAddress] = localAddress != null ? localAddress : null\n this[kResuming] = 0 // 0, idle, 1, scheduled, 2 resuming\n this[kNeedDrain] = 0 // 0, idle, 1, scheduled, 2 resuming\n this[kHostHeader] = `host: ${this[kUrl].hostname}${this[kUrl].port ? `:${this[kUrl].port}` : ''}\\r\\n`\n this[kBodyTimeout] = bodyTimeout != null ? bodyTimeout : 300e3\n this[kHeadersTimeout] = headersTimeout != null ? headersTimeout : 300e3\n this[kStrictContentLength] = strictContentLength == null ? true : strictContentLength\n this[kMaxRedirections] = maxRedirections\n this[kMaxRequests] = maxRequestsPerClient\n this[kClosedResolve] = null\n this[kMaxResponseSize] = maxResponseSize > -1 ? maxResponseSize : -1\n this[kHTTPConnVersion] = 'h1'\n\n // HTTP/2\n this[kHTTP2Session] = null\n this[kHTTP2SessionState] = !allowH2\n ? null\n : {\n // streams: null, // Fixed queue of streams - For future support of `push`\n openStreams: 0, // Keep track of them to decide wether or not unref the session\n maxConcurrentStreams: maxConcurrentStreams != null ? maxConcurrentStreams : 100 // Max peerConcurrentStreams for a Node h2 server\n }\n this[kHost] = `${this[kUrl].hostname}${this[kUrl].port ? `:${this[kUrl].port}` : ''}`\n\n // kQueue is built up of 3 sections separated by\n // the kRunningIdx and kPendingIdx indices.\n // | complete | running | pending |\n // ^ kRunningIdx ^ kPendingIdx ^ kQueue.length\n // kRunningIdx points to the first running element.\n // kPendingIdx points to the first pending element.\n // This implements a fast queue with an amortized\n // time of O(1).\n\n this[kQueue] = []\n this[kRunningIdx] = 0\n this[kPendingIdx] = 0\n }\n\n get pipelining () {\n return this[kPipelining]\n }\n\n set pipelining (value) {\n this[kPipelining] = value\n resume(this, true)\n }\n\n get [kPending] () {\n return this[kQueue].length - this[kPendingIdx]\n }\n\n get [kRunning] () {\n return this[kPendingIdx] - this[kRunningIdx]\n }\n\n get [kSize] () {\n return this[kQueue].length - this[kRunningIdx]\n }\n\n get [kConnected] () {\n return !!this[kSocket] && !this[kConnecting] && !this[kSocket].destroyed\n }\n\n get [kBusy] () {\n const socket = this[kSocket]\n return (\n (socket && (socket[kReset] || socket[kWriting] || socket[kBlocking])) ||\n (this[kSize] >= (this[kPipelining] || 1)) ||\n this[kPending] > 0\n )\n }\n\n /* istanbul ignore: only used for test */\n [kConnect] (cb) {\n connect(this)\n this.once('connect', cb)\n }\n\n [kDispatch] (opts, handler) {\n const origin = opts.origin || this[kUrl].origin\n\n const request = this[kHTTPConnVersion] === 'h2'\n ? Request[kHTTP2BuildRequest](origin, opts, handler)\n : Request[kHTTP1BuildRequest](origin, opts, handler)\n\n this[kQueue].push(request)\n if (this[kResuming]) {\n // Do nothing.\n } else if (util.bodyLength(request.body) == null && util.isIterable(request.body)) {\n // Wait a tick in case stream/iterator is ended in the same tick.\n this[kResuming] = 1\n process.nextTick(resume, this)\n } else {\n resume(this, true)\n }\n\n if (this[kResuming] && this[kNeedDrain] !== 2 && this[kBusy]) {\n this[kNeedDrain] = 2\n }\n\n return this[kNeedDrain] < 2\n }\n\n async [kClose] () {\n // TODO: for H2 we need to gracefully flush the remaining enqueued\n // request and close each stream.\n return new Promise((resolve) => {\n if (!this[kSize]) {\n resolve(null)\n } else {\n this[kClosedResolve] = resolve\n }\n })\n }\n\n async [kDestroy] (err) {\n return new Promise((resolve) => {\n const requests = this[kQueue].splice(this[kPendingIdx])\n for (let i = 0; i < requests.length; i++) {\n const request = requests[i]\n errorRequest(this, request, err)\n }\n\n const callback = () => {\n if (this[kClosedResolve]) {\n // TODO (fix): Should we error here with ClientDestroyedError?\n this[kClosedResolve]()\n this[kClosedResolve] = null\n }\n resolve()\n }\n\n if (this[kHTTP2Session] != null) {\n util.destroy(this[kHTTP2Session], err)\n this[kHTTP2Session] = null\n this[kHTTP2SessionState] = null\n }\n\n if (!this[kSocket]) {\n queueMicrotask(callback)\n } else {\n util.destroy(this[kSocket].on('close', callback), err)\n }\n\n resume(this)\n })\n }\n}\n\nfunction onHttp2SessionError (err) {\n assert(err.code !== 'ERR_TLS_CERT_ALTNAME_INVALID')\n\n this[kSocket][kError] = err\n\n onError(this[kClient], err)\n}\n\nfunction onHttp2FrameError (type, code, id) {\n const err = new InformationalError(`HTTP/2: \"frameError\" received - type ${type}, code ${code}`)\n\n if (id === 0) {\n this[kSocket][kError] = err\n onError(this[kClient], err)\n }\n}\n\nfunction onHttp2SessionEnd () {\n util.destroy(this, new SocketError('other side closed'))\n util.destroy(this[kSocket], new SocketError('other side closed'))\n}\n\nfunction onHTTP2GoAway (code) {\n const client = this[kClient]\n const err = new InformationalError(`HTTP/2: \"GOAWAY\" frame received with code ${code}`)\n client[kSocket] = null\n client[kHTTP2Session] = null\n\n if (client.destroyed) {\n assert(this[kPending] === 0)\n\n // Fail entire queue.\n const requests = client[kQueue].splice(client[kRunningIdx])\n for (let i = 0; i < requests.length; i++) {\n const request = requests[i]\n errorRequest(this, request, err)\n }\n } else if (client[kRunning] > 0) {\n // Fail head of pipeline.\n const request = client[kQueue][client[kRunningIdx]]\n client[kQueue][client[kRunningIdx]++] = null\n\n errorRequest(client, request, err)\n }\n\n client[kPendingIdx] = client[kRunningIdx]\n\n assert(client[kRunning] === 0)\n\n client.emit('disconnect',\n client[kUrl],\n [client],\n err\n )\n\n resume(client)\n}\n\nconst constants = require('./llhttp/constants')\nconst createRedirectInterceptor = require('./interceptor/redirectInterceptor')\nconst EMPTY_BUF = Buffer.alloc(0)\n\nasync function lazyllhttp () {\n const llhttpWasmData = process.env.JEST_WORKER_ID ? require('./llhttp/llhttp-wasm.js') : undefined\n\n let mod\n try {\n mod = await WebAssembly.compile(Buffer.from(require('./llhttp/llhttp_simd-wasm.js'), 'base64'))\n } catch (e) {\n /* istanbul ignore next */\n\n // We could check if the error was caused by the simd option not\n // being enabled, but the occurring of this other error\n // * https://github.com/emscripten-core/emscripten/issues/11495\n // got me to remove that check to avoid breaking Node 12.\n mod = await WebAssembly.compile(Buffer.from(llhttpWasmData || require('./llhttp/llhttp-wasm.js'), 'base64'))\n }\n\n return await WebAssembly.instantiate(mod, {\n env: {\n /* eslint-disable camelcase */\n\n wasm_on_url: (p, at, len) => {\n /* istanbul ignore next */\n return 0\n },\n wasm_on_status: (p, at, len) => {\n assert.strictEqual(currentParser.ptr, p)\n const start = at - currentBufferPtr + currentBufferRef.byteOffset\n return currentParser.onStatus(new FastBuffer(currentBufferRef.buffer, start, len)) || 0\n },\n wasm_on_message_begin: (p) => {\n assert.strictEqual(currentParser.ptr, p)\n return currentParser.onMessageBegin() || 0\n },\n wasm_on_header_field: (p, at, len) => {\n assert.strictEqual(currentParser.ptr, p)\n const start = at - currentBufferPtr + currentBufferRef.byteOffset\n return currentParser.onHeaderField(new FastBuffer(currentBufferRef.buffer, start, len)) || 0\n },\n wasm_on_header_value: (p, at, len) => {\n assert.strictEqual(currentParser.ptr, p)\n const start = at - currentBufferPtr + currentBufferRef.byteOffset\n return currentParser.onHeaderValue(new FastBuffer(currentBufferRef.buffer, start, len)) || 0\n },\n wasm_on_headers_complete: (p, statusCode, upgrade, shouldKeepAlive) => {\n assert.strictEqual(currentParser.ptr, p)\n return currentParser.onHeadersComplete(statusCode, Boolean(upgrade), Boolean(shouldKeepAlive)) || 0\n },\n wasm_on_body: (p, at, len) => {\n assert.strictEqual(currentParser.ptr, p)\n const start = at - currentBufferPtr + currentBufferRef.byteOffset\n return currentParser.onBody(new FastBuffer(currentBufferRef.buffer, start, len)) || 0\n },\n wasm_on_message_complete: (p) => {\n assert.strictEqual(currentParser.ptr, p)\n return currentParser.onMessageComplete() || 0\n }\n\n /* eslint-enable camelcase */\n }\n })\n}\n\nlet llhttpInstance = null\nlet llhttpPromise = lazyllhttp()\nllhttpPromise.catch()\n\nlet currentParser = null\nlet currentBufferRef = null\nlet currentBufferSize = 0\nlet currentBufferPtr = null\n\nconst TIMEOUT_HEADERS = 1\nconst TIMEOUT_BODY = 2\nconst TIMEOUT_IDLE = 3\n\nclass Parser {\n constructor (client, socket, { exports }) {\n assert(Number.isFinite(client[kMaxHeadersSize]) && client[kMaxHeadersSize] > 0)\n\n this.llhttp = exports\n this.ptr = this.llhttp.llhttp_alloc(constants.TYPE.RESPONSE)\n this.client = client\n this.socket = socket\n this.timeout = null\n this.timeoutValue = null\n this.timeoutType = null\n this.statusCode = null\n this.statusText = ''\n this.upgrade = false\n this.headers = []\n this.headersSize = 0\n this.headersMaxSize = client[kMaxHeadersSize]\n this.shouldKeepAlive = false\n this.paused = false\n this.resume = this.resume.bind(this)\n\n this.bytesRead = 0\n\n this.keepAlive = ''\n this.contentLength = ''\n this.connection = ''\n this.maxResponseSize = client[kMaxResponseSize]\n }\n\n setTimeout (value, type) {\n this.timeoutType = type\n if (value !== this.timeoutValue) {\n timers.clearTimeout(this.timeout)\n if (value) {\n this.timeout = timers.setTimeout(onParserTimeout, value, this)\n // istanbul ignore else: only for jest\n if (this.timeout.unref) {\n this.timeout.unref()\n }\n } else {\n this.timeout = null\n }\n this.timeoutValue = value\n } else if (this.timeout) {\n // istanbul ignore else: only for jest\n if (this.timeout.refresh) {\n this.timeout.refresh()\n }\n }\n }\n\n resume () {\n if (this.socket.destroyed || !this.paused) {\n return\n }\n\n assert(this.ptr != null)\n assert(currentParser == null)\n\n this.llhttp.llhttp_resume(this.ptr)\n\n assert(this.timeoutType === TIMEOUT_BODY)\n if (this.timeout) {\n // istanbul ignore else: only for jest\n if (this.timeout.refresh) {\n this.timeout.refresh()\n }\n }\n\n this.paused = false\n this.execute(this.socket.read() || EMPTY_BUF) // Flush parser.\n this.readMore()\n }\n\n readMore () {\n while (!this.paused && this.ptr) {\n const chunk = this.socket.read()\n if (chunk === null) {\n break\n }\n this.execute(chunk)\n }\n }\n\n execute (data) {\n assert(this.ptr != null)\n assert(currentParser == null)\n assert(!this.paused)\n\n const { socket, llhttp } = this\n\n if (data.length > currentBufferSize) {\n if (currentBufferPtr) {\n llhttp.free(currentBufferPtr)\n }\n currentBufferSize = Math.ceil(data.length / 4096) * 4096\n currentBufferPtr = llhttp.malloc(currentBufferSize)\n }\n\n new Uint8Array(llhttp.memory.buffer, currentBufferPtr, currentBufferSize).set(data)\n\n // Call `execute` on the wasm parser.\n // We pass the `llhttp_parser` pointer address, the pointer address of buffer view data,\n // and finally the length of bytes to parse.\n // The return value is an error code or `constants.ERROR.OK`.\n try {\n let ret\n\n try {\n currentBufferRef = data\n currentParser = this\n ret = llhttp.llhttp_execute(this.ptr, currentBufferPtr, data.length)\n /* eslint-disable-next-line no-useless-catch */\n } catch (err) {\n /* istanbul ignore next: difficult to make a test case for */\n throw err\n } finally {\n currentParser = null\n currentBufferRef = null\n }\n\n const offset = llhttp.llhttp_get_error_pos(this.ptr) - currentBufferPtr\n\n if (ret === constants.ERROR.PAUSED_UPGRADE) {\n this.onUpgrade(data.slice(offset))\n } else if (ret === constants.ERROR.PAUSED) {\n this.paused = true\n socket.unshift(data.slice(offset))\n } else if (ret !== constants.ERROR.OK) {\n const ptr = llhttp.llhttp_get_error_reason(this.ptr)\n let message = ''\n /* istanbul ignore else: difficult to make a test case for */\n if (ptr) {\n const len = new Uint8Array(llhttp.memory.buffer, ptr).indexOf(0)\n message =\n 'Response does not match the HTTP/1.1 protocol (' +\n Buffer.from(llhttp.memory.buffer, ptr, len).toString() +\n ')'\n }\n throw new HTTPParserError(message, constants.ERROR[ret], data.slice(offset))\n }\n } catch (err) {\n util.destroy(socket, err)\n }\n }\n\n destroy () {\n assert(this.ptr != null)\n assert(currentParser == null)\n\n this.llhttp.llhttp_free(this.ptr)\n this.ptr = null\n\n timers.clearTimeout(this.timeout)\n this.timeout = null\n this.timeoutValue = null\n this.timeoutType = null\n\n this.paused = false\n }\n\n onStatus (buf) {\n this.statusText = buf.toString()\n }\n\n onMessageBegin () {\n const { socket, client } = this\n\n /* istanbul ignore next: difficult to make a test case for */\n if (socket.destroyed) {\n return -1\n }\n\n const request = client[kQueue][client[kRunningIdx]]\n if (!request) {\n return -1\n }\n }\n\n onHeaderField (buf) {\n const len = this.headers.length\n\n if ((len & 1) === 0) {\n this.headers.push(buf)\n } else {\n this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf])\n }\n\n this.trackHeader(buf.length)\n }\n\n onHeaderValue (buf) {\n let len = this.headers.length\n\n if ((len & 1) === 1) {\n this.headers.push(buf)\n len += 1\n } else {\n this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf])\n }\n\n const key = this.headers[len - 2]\n if (key.length === 10 && key.toString().toLowerCase() === 'keep-alive') {\n this.keepAlive += buf.toString()\n } else if (key.length === 10 && key.toString().toLowerCase() === 'connection') {\n this.connection += buf.toString()\n } else if (key.length === 14 && key.toString().toLowerCase() === 'content-length') {\n this.contentLength += buf.toString()\n }\n\n this.trackHeader(buf.length)\n }\n\n trackHeader (len) {\n this.headersSize += len\n if (this.headersSize >= this.headersMaxSize) {\n util.destroy(this.socket, new HeadersOverflowError())\n }\n }\n\n onUpgrade (head) {\n const { upgrade, client, socket, headers, statusCode } = this\n\n assert(upgrade)\n\n const request = client[kQueue][client[kRunningIdx]]\n assert(request)\n\n assert(!socket.destroyed)\n assert(socket === client[kSocket])\n assert(!this.paused)\n assert(request.upgrade || request.method === 'CONNECT')\n\n this.statusCode = null\n this.statusText = ''\n this.shouldKeepAlive = null\n\n assert(this.headers.length % 2 === 0)\n this.headers = []\n this.headersSize = 0\n\n socket.unshift(head)\n\n socket[kParser].destroy()\n socket[kParser] = null\n\n socket[kClient] = null\n socket[kError] = null\n socket\n .removeListener('error', onSocketError)\n .removeListener('readable', onSocketReadable)\n .removeListener('end', onSocketEnd)\n .removeListener('close', onSocketClose)\n\n client[kSocket] = null\n client[kQueue][client[kRunningIdx]++] = null\n client.emit('disconnect', client[kUrl], [client], new InformationalError('upgrade'))\n\n try {\n request.onUpgrade(statusCode, headers, socket)\n } catch (err) {\n util.destroy(socket, err)\n }\n\n resume(client)\n }\n\n onHeadersComplete (statusCode, upgrade, shouldKeepAlive) {\n const { client, socket, headers, statusText } = this\n\n /* istanbul ignore next: difficult to make a test case for */\n if (socket.destroyed) {\n return -1\n }\n\n const request = client[kQueue][client[kRunningIdx]]\n\n /* istanbul ignore next: difficult to make a test case for */\n if (!request) {\n return -1\n }\n\n assert(!this.upgrade)\n assert(this.statusCode < 200)\n\n if (statusCode === 100) {\n util.destroy(socket, new SocketError('bad response', util.getSocketInfo(socket)))\n return -1\n }\n\n /* this can only happen if server is misbehaving */\n if (upgrade && !request.upgrade) {\n util.destroy(socket, new SocketError('bad upgrade', util.getSocketInfo(socket)))\n return -1\n }\n\n assert.strictEqual(this.timeoutType, TIMEOUT_HEADERS)\n\n this.statusCode = statusCode\n this.shouldKeepAlive = (\n shouldKeepAlive ||\n // Override llhttp value which does not allow keepAlive for HEAD.\n (request.method === 'HEAD' && !socket[kReset] && this.connection.toLowerCase() === 'keep-alive')\n )\n\n if (this.statusCode >= 200) {\n const bodyTimeout = request.bodyTimeout != null\n ? request.bodyTimeout\n : client[kBodyTimeout]\n this.setTimeout(bodyTimeout, TIMEOUT_BODY)\n } else if (this.timeout) {\n // istanbul ignore else: only for jest\n if (this.timeout.refresh) {\n this.timeout.refresh()\n }\n }\n\n if (request.method === 'CONNECT') {\n assert(client[kRunning] === 1)\n this.upgrade = true\n return 2\n }\n\n if (upgrade) {\n assert(client[kRunning] === 1)\n this.upgrade = true\n return 2\n }\n\n assert(this.headers.length % 2 === 0)\n this.headers = []\n this.headersSize = 0\n\n if (this.shouldKeepAlive && client[kPipelining]) {\n const keepAliveTimeout = this.keepAlive ? util.parseKeepAliveTimeout(this.keepAlive) : null\n\n if (keepAliveTimeout != null) {\n const timeout = Math.min(\n keepAliveTimeout - client[kKeepAliveTimeoutThreshold],\n client[kKeepAliveMaxTimeout]\n )\n if (timeout <= 0) {\n socket[kReset] = true\n } else {\n client[kKeepAliveTimeoutValue] = timeout\n }\n } else {\n client[kKeepAliveTimeoutValue] = client[kKeepAliveDefaultTimeout]\n }\n } else {\n // Stop more requests from being dispatched.\n socket[kReset] = true\n }\n\n const pause = request.onHeaders(statusCode, headers, this.resume, statusText) === false\n\n if (request.aborted) {\n return -1\n }\n\n if (request.method === 'HEAD') {\n return 1\n }\n\n if (statusCode < 200) {\n return 1\n }\n\n if (socket[kBlocking]) {\n socket[kBlocking] = false\n resume(client)\n }\n\n return pause ? constants.ERROR.PAUSED : 0\n }\n\n onBody (buf) {\n const { client, socket, statusCode, maxResponseSize } = this\n\n if (socket.destroyed) {\n return -1\n }\n\n const request = client[kQueue][client[kRunningIdx]]\n assert(request)\n\n assert.strictEqual(this.timeoutType, TIMEOUT_BODY)\n if (this.timeout) {\n // istanbul ignore else: only for jest\n if (this.timeout.refresh) {\n this.timeout.refresh()\n }\n }\n\n assert(statusCode >= 200)\n\n if (maxResponseSize > -1 && this.bytesRead + buf.length > maxResponseSize) {\n util.destroy(socket, new ResponseExceededMaxSizeError())\n return -1\n }\n\n this.bytesRead += buf.length\n\n if (request.onData(buf) === false) {\n return constants.ERROR.PAUSED\n }\n }\n\n onMessageComplete () {\n const { client, socket, statusCode, upgrade, headers, contentLength, bytesRead, shouldKeepAlive } = this\n\n if (socket.destroyed && (!statusCode || shouldKeepAlive)) {\n return -1\n }\n\n if (upgrade) {\n return\n }\n\n const request = client[kQueue][client[kRunningIdx]]\n assert(request)\n\n assert(statusCode >= 100)\n\n this.statusCode = null\n this.statusText = ''\n this.bytesRead = 0\n this.contentLength = ''\n this.keepAlive = ''\n this.connection = ''\n\n assert(this.headers.length % 2 === 0)\n this.headers = []\n this.headersSize = 0\n\n if (statusCode < 200) {\n return\n }\n\n /* istanbul ignore next: should be handled by llhttp? */\n if (request.method !== 'HEAD' && contentLength && bytesRead !== parseInt(contentLength, 10)) {\n util.destroy(socket, new ResponseContentLengthMismatchError())\n return -1\n }\n\n request.onComplete(headers)\n\n client[kQueue][client[kRunningIdx]++] = null\n\n if (socket[kWriting]) {\n assert.strictEqual(client[kRunning], 0)\n // Response completed before request.\n util.destroy(socket, new InformationalError('reset'))\n return constants.ERROR.PAUSED\n } else if (!shouldKeepAlive) {\n util.destroy(socket, new InformationalError('reset'))\n return constants.ERROR.PAUSED\n } else if (socket[kReset] && client[kRunning] === 0) {\n // Destroy socket once all requests have completed.\n // The request at the tail of the pipeline is the one\n // that requested reset and no further requests should\n // have been queued since then.\n util.destroy(socket, new InformationalError('reset'))\n return constants.ERROR.PAUSED\n } else if (client[kPipelining] === 1) {\n // We must wait a full event loop cycle to reuse this socket to make sure\n // that non-spec compliant servers are not closing the connection even if they\n // said they won't.\n setImmediate(resume, client)\n } else {\n resume(client)\n }\n }\n}\n\nfunction onParserTimeout (parser) {\n const { socket, timeoutType, client } = parser\n\n /* istanbul ignore else */\n if (timeoutType === TIMEOUT_HEADERS) {\n if (!socket[kWriting] || socket.writableNeedDrain || client[kRunning] > 1) {\n assert(!parser.paused, 'cannot be paused while waiting for headers')\n util.destroy(socket, new HeadersTimeoutError())\n }\n } else if (timeoutType === TIMEOUT_BODY) {\n if (!parser.paused) {\n util.destroy(socket, new BodyTimeoutError())\n }\n } else if (timeoutType === TIMEOUT_IDLE) {\n assert(client[kRunning] === 0 && client[kKeepAliveTimeoutValue])\n util.destroy(socket, new InformationalError('socket idle timeout'))\n }\n}\n\nfunction onSocketReadable () {\n const { [kParser]: parser } = this\n if (parser) {\n parser.readMore()\n }\n}\n\nfunction onSocketError (err) {\n const { [kClient]: client, [kParser]: parser } = this\n\n assert(err.code !== 'ERR_TLS_CERT_ALTNAME_INVALID')\n\n if (client[kHTTPConnVersion] !== 'h2') {\n // On Mac OS, we get an ECONNRESET even if there is a full body to be forwarded\n // to the user.\n if (err.code === 'ECONNRESET' && parser.statusCode && !parser.shouldKeepAlive) {\n // We treat all incoming data so for as a valid response.\n parser.onMessageComplete()\n return\n }\n }\n\n this[kError] = err\n\n onError(this[kClient], err)\n}\n\nfunction onError (client, err) {\n if (\n client[kRunning] === 0 &&\n err.code !== 'UND_ERR_INFO' &&\n err.code !== 'UND_ERR_SOCKET'\n ) {\n // Error is not caused by running request and not a recoverable\n // socket error.\n\n assert(client[kPendingIdx] === client[kRunningIdx])\n\n const requests = client[kQueue].splice(client[kRunningIdx])\n for (let i = 0; i < requests.length; i++) {\n const request = requests[i]\n errorRequest(client, request, err)\n }\n assert(client[kSize] === 0)\n }\n}\n\nfunction onSocketEnd () {\n const { [kParser]: parser, [kClient]: client } = this\n\n if (client[kHTTPConnVersion] !== 'h2') {\n if (parser.statusCode && !parser.shouldKeepAlive) {\n // We treat all incoming data so far as a valid response.\n parser.onMessageComplete()\n return\n }\n }\n\n util.destroy(this, new SocketError('other side closed', util.getSocketInfo(this)))\n}\n\nfunction onSocketClose () {\n const { [kClient]: client, [kParser]: parser } = this\n\n if (client[kHTTPConnVersion] === 'h1' && parser) {\n if (!this[kError] && parser.statusCode && !parser.shouldKeepAlive) {\n // We treat all incoming data so far as a valid response.\n parser.onMessageComplete()\n }\n\n this[kParser].destroy()\n this[kParser] = null\n }\n\n const err = this[kError] || new SocketError('closed', util.getSocketInfo(this))\n\n client[kSocket] = null\n\n if (client.destroyed) {\n assert(client[kPending] === 0)\n\n // Fail entire queue.\n const requests = client[kQueue].splice(client[kRunningIdx])\n for (let i = 0; i < requests.length; i++) {\n const request = requests[i]\n errorRequest(client, request, err)\n }\n } else if (client[kRunning] > 0 && err.code !== 'UND_ERR_INFO') {\n // Fail head of pipeline.\n const request = client[kQueue][client[kRunningIdx]]\n client[kQueue][client[kRunningIdx]++] = null\n\n errorRequest(client, request, err)\n }\n\n client[kPendingIdx] = client[kRunningIdx]\n\n assert(client[kRunning] === 0)\n\n client.emit('disconnect', client[kUrl], [client], err)\n\n resume(client)\n}\n\nasync function connect (client) {\n assert(!client[kConnecting])\n assert(!client[kSocket])\n\n let { host, hostname, protocol, port } = client[kUrl]\n\n // Resolve ipv6\n if (hostname[0] === '[') {\n const idx = hostname.indexOf(']')\n\n assert(idx !== -1)\n const ip = hostname.substring(1, idx)\n\n assert(net.isIP(ip))\n hostname = ip\n }\n\n client[kConnecting] = true\n\n if (channels.beforeConnect.hasSubscribers) {\n channels.beforeConnect.publish({\n connectParams: {\n host,\n hostname,\n protocol,\n port,\n servername: client[kServerName],\n localAddress: client[kLocalAddress]\n },\n connector: client[kConnector]\n })\n }\n\n try {\n const socket = await new Promise((resolve, reject) => {\n client[kConnector]({\n host,\n hostname,\n protocol,\n port,\n servername: client[kServerName],\n localAddress: client[kLocalAddress]\n }, (err, socket) => {\n if (err) {\n reject(err)\n } else {\n resolve(socket)\n }\n })\n })\n\n if (client.destroyed) {\n util.destroy(socket.on('error', () => {}), new ClientDestroyedError())\n return\n }\n\n client[kConnecting] = false\n\n assert(socket)\n\n const isH2 = socket.alpnProtocol === 'h2'\n if (isH2) {\n if (!h2ExperimentalWarned) {\n h2ExperimentalWarned = true\n process.emitWarning('H2 support is experimental, expect them to change at any time.', {\n code: 'UNDICI-H2'\n })\n }\n\n const session = http2.connect(client[kUrl], {\n createConnection: () => socket,\n peerMaxConcurrentStreams: client[kHTTP2SessionState].maxConcurrentStreams\n })\n\n client[kHTTPConnVersion] = 'h2'\n session[kClient] = client\n session[kSocket] = socket\n session.on('error', onHttp2SessionError)\n session.on('frameError', onHttp2FrameError)\n session.on('end', onHttp2SessionEnd)\n session.on('goaway', onHTTP2GoAway)\n session.on('close', onSocketClose)\n session.unref()\n\n client[kHTTP2Session] = session\n socket[kHTTP2Session] = session\n } else {\n if (!llhttpInstance) {\n llhttpInstance = await llhttpPromise\n llhttpPromise = null\n }\n\n socket[kNoRef] = false\n socket[kWriting] = false\n socket[kReset] = false\n socket[kBlocking] = false\n socket[kParser] = new Parser(client, socket, llhttpInstance)\n }\n\n socket[kCounter] = 0\n socket[kMaxRequests] = client[kMaxRequests]\n socket[kClient] = client\n socket[kError] = null\n\n socket\n .on('error', onSocketError)\n .on('readable', onSocketReadable)\n .on('end', onSocketEnd)\n .on('close', onSocketClose)\n\n client[kSocket] = socket\n\n if (channels.connected.hasSubscribers) {\n channels.connected.publish({\n connectParams: {\n host,\n hostname,\n protocol,\n port,\n servername: client[kServerName],\n localAddress: client[kLocalAddress]\n },\n connector: client[kConnector],\n socket\n })\n }\n client.emit('connect', client[kUrl], [client])\n } catch (err) {\n if (client.destroyed) {\n return\n }\n\n client[kConnecting] = false\n\n if (channels.connectError.hasSubscribers) {\n channels.connectError.publish({\n connectParams: {\n host,\n hostname,\n protocol,\n port,\n servername: client[kServerName],\n localAddress: client[kLocalAddress]\n },\n connector: client[kConnector],\n error: err\n })\n }\n\n if (err.code === 'ERR_TLS_CERT_ALTNAME_INVALID') {\n assert(client[kRunning] === 0)\n while (client[kPending] > 0 && client[kQueue][client[kPendingIdx]].servername === client[kServerName]) {\n const request = client[kQueue][client[kPendingIdx]++]\n errorRequest(client, request, err)\n }\n } else {\n onError(client, err)\n }\n\n client.emit('connectionError', client[kUrl], [client], err)\n }\n\n resume(client)\n}\n\nfunction emitDrain (client) {\n client[kNeedDrain] = 0\n client.emit('drain', client[kUrl], [client])\n}\n\nfunction resume (client, sync) {\n if (client[kResuming] === 2) {\n return\n }\n\n client[kResuming] = 2\n\n _resume(client, sync)\n client[kResuming] = 0\n\n if (client[kRunningIdx] > 256) {\n client[kQueue].splice(0, client[kRunningIdx])\n client[kPendingIdx] -= client[kRunningIdx]\n client[kRunningIdx] = 0\n }\n}\n\nfunction _resume (client, sync) {\n while (true) {\n if (client.destroyed) {\n assert(client[kPending] === 0)\n return\n }\n\n if (client[kClosedResolve] && !client[kSize]) {\n client[kClosedResolve]()\n client[kClosedResolve] = null\n return\n }\n\n const socket = client[kSocket]\n\n if (socket && !socket.destroyed && socket.alpnProtocol !== 'h2') {\n if (client[kSize] === 0) {\n if (!socket[kNoRef] && socket.unref) {\n socket.unref()\n socket[kNoRef] = true\n }\n } else if (socket[kNoRef] && socket.ref) {\n socket.ref()\n socket[kNoRef] = false\n }\n\n if (client[kSize] === 0) {\n if (socket[kParser].timeoutType !== TIMEOUT_IDLE) {\n socket[kParser].setTimeout(client[kKeepAliveTimeoutValue], TIMEOUT_IDLE)\n }\n } else if (client[kRunning] > 0 && socket[kParser].statusCode < 200) {\n if (socket[kParser].timeoutType !== TIMEOUT_HEADERS) {\n const request = client[kQueue][client[kRunningIdx]]\n const headersTimeout = request.headersTimeout != null\n ? request.headersTimeout\n : client[kHeadersTimeout]\n socket[kParser].setTimeout(headersTimeout, TIMEOUT_HEADERS)\n }\n }\n }\n\n if (client[kBusy]) {\n client[kNeedDrain] = 2\n } else if (client[kNeedDrain] === 2) {\n if (sync) {\n client[kNeedDrain] = 1\n process.nextTick(emitDrain, client)\n } else {\n emitDrain(client)\n }\n continue\n }\n\n if (client[kPending] === 0) {\n return\n }\n\n if (client[kRunning] >= (client[kPipelining] || 1)) {\n return\n }\n\n const request = client[kQueue][client[kPendingIdx]]\n\n if (client[kUrl].protocol === 'https:' && client[kServerName] !== request.servername) {\n if (client[kRunning] > 0) {\n return\n }\n\n client[kServerName] = request.servername\n\n if (socket && socket.servername !== request.servername) {\n util.destroy(socket, new InformationalError('servername changed'))\n return\n }\n }\n\n if (client[kConnecting]) {\n return\n }\n\n if (!socket && !client[kHTTP2Session]) {\n connect(client)\n return\n }\n\n if (socket.destroyed || socket[kWriting] || socket[kReset] || socket[kBlocking]) {\n return\n }\n\n if (client[kRunning] > 0 && !request.idempotent) {\n // Non-idempotent request cannot be retried.\n // Ensure that no other requests are inflight and\n // could cause failure.\n return\n }\n\n if (client[kRunning] > 0 && (request.upgrade || request.method === 'CONNECT')) {\n // Don't dispatch an upgrade until all preceding requests have completed.\n // A misbehaving server might upgrade the connection before all pipelined\n // request has completed.\n return\n }\n\n if (client[kRunning] > 0 && util.bodyLength(request.body) !== 0 &&\n (util.isStream(request.body) || util.isAsyncIterable(request.body))) {\n // Request with stream or iterator body can error while other requests\n // are inflight and indirectly error those as well.\n // Ensure this doesn't happen by waiting for inflight\n // to complete before dispatching.\n\n // Request with stream or iterator body cannot be retried.\n // Ensure that no other requests are inflight and\n // could cause failure.\n return\n }\n\n if (!request.aborted && write(client, request)) {\n client[kPendingIdx]++\n } else {\n client[kQueue].splice(client[kPendingIdx], 1)\n }\n }\n}\n\n// https://www.rfc-editor.org/rfc/rfc7230#section-3.3.2\nfunction shouldSendContentLength (method) {\n return method !== 'GET' && method !== 'HEAD' && method !== 'OPTIONS' && method !== 'TRACE' && method !== 'CONNECT'\n}\n\nfunction write (client, request) {\n if (client[kHTTPConnVersion] === 'h2') {\n writeH2(client, client[kHTTP2Session], request)\n return\n }\n\n const { body, method, path, host, upgrade, headers, blocking, reset } = request\n\n // https://tools.ietf.org/html/rfc7231#section-4.3.1\n // https://tools.ietf.org/html/rfc7231#section-4.3.2\n // https://tools.ietf.org/html/rfc7231#section-4.3.5\n\n // Sending a payload body on a request that does not\n // expect it can cause undefined behavior on some\n // servers and corrupt connection state. Do not\n // re-use the connection for further requests.\n\n const expectsPayload = (\n method === 'PUT' ||\n method === 'POST' ||\n method === 'PATCH'\n )\n\n if (body && typeof body.read === 'function') {\n // Try to read EOF in order to get length.\n body.read(0)\n }\n\n const bodyLength = util.bodyLength(body)\n\n let contentLength = bodyLength\n\n if (contentLength === null) {\n contentLength = request.contentLength\n }\n\n if (contentLength === 0 && !expectsPayload) {\n // https://tools.ietf.org/html/rfc7230#section-3.3.2\n // A user agent SHOULD NOT send a Content-Length header field when\n // the request message does not contain a payload body and the method\n // semantics do not anticipate such a body.\n\n contentLength = null\n }\n\n // https://github.com/nodejs/undici/issues/2046\n // A user agent may send a Content-Length header with 0 value, this should be allowed.\n if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength !== null && request.contentLength !== contentLength) {\n if (client[kStrictContentLength]) {\n errorRequest(client, request, new RequestContentLengthMismatchError())\n return false\n }\n\n process.emitWarning(new RequestContentLengthMismatchError())\n }\n\n const socket = client[kSocket]\n\n try {\n request.onConnect((err) => {\n if (request.aborted || request.completed) {\n return\n }\n\n errorRequest(client, request, err || new RequestAbortedError())\n\n util.destroy(socket, new InformationalError('aborted'))\n })\n } catch (err) {\n errorRequest(client, request, err)\n }\n\n if (request.aborted) {\n return false\n }\n\n if (method === 'HEAD') {\n // https://github.com/mcollina/undici/issues/258\n // Close after a HEAD request to interop with misbehaving servers\n // that may send a body in the response.\n\n socket[kReset] = true\n }\n\n if (upgrade || method === 'CONNECT') {\n // On CONNECT or upgrade, block pipeline from dispatching further\n // requests on this connection.\n\n socket[kReset] = true\n }\n\n if (reset != null) {\n socket[kReset] = reset\n }\n\n if (client[kMaxRequests] && socket[kCounter]++ >= client[kMaxRequests]) {\n socket[kReset] = true\n }\n\n if (blocking) {\n socket[kBlocking] = true\n }\n\n let header = `${method} ${path} HTTP/1.1\\r\\n`\n\n if (typeof host === 'string') {\n header += `host: ${host}\\r\\n`\n } else {\n header += client[kHostHeader]\n }\n\n if (upgrade) {\n header += `connection: upgrade\\r\\nupgrade: ${upgrade}\\r\\n`\n } else if (client[kPipelining] && !socket[kReset]) {\n header += 'connection: keep-alive\\r\\n'\n } else {\n header += 'connection: close\\r\\n'\n }\n\n if (headers) {\n header += headers\n }\n\n if (channels.sendHeaders.hasSubscribers) {\n channels.sendHeaders.publish({ request, headers: header, socket })\n }\n\n /* istanbul ignore else: assertion */\n if (!body || bodyLength === 0) {\n if (contentLength === 0) {\n socket.write(`${header}content-length: 0\\r\\n\\r\\n`, 'latin1')\n } else {\n assert(contentLength === null, 'no body must not have content length')\n socket.write(`${header}\\r\\n`, 'latin1')\n }\n request.onRequestSent()\n } else if (util.isBuffer(body)) {\n assert(contentLength === body.byteLength, 'buffer body must have content length')\n\n socket.cork()\n socket.write(`${header}content-length: ${contentLength}\\r\\n\\r\\n`, 'latin1')\n socket.write(body)\n socket.uncork()\n request.onBodySent(body)\n request.onRequestSent()\n if (!expectsPayload) {\n socket[kReset] = true\n }\n } else if (util.isBlobLike(body)) {\n if (typeof body.stream === 'function') {\n writeIterable({ body: body.stream(), client, request, socket, contentLength, header, expectsPayload })\n } else {\n writeBlob({ body, client, request, socket, contentLength, header, expectsPayload })\n }\n } else if (util.isStream(body)) {\n writeStream({ body, client, request, socket, contentLength, header, expectsPayload })\n } else if (util.isIterable(body)) {\n writeIterable({ body, client, request, socket, contentLength, header, expectsPayload })\n } else {\n assert(false)\n }\n\n return true\n}\n\nfunction writeH2 (client, session, request) {\n const { body, method, path, host, upgrade, expectContinue, signal, headers: reqHeaders } = request\n\n let headers\n if (typeof reqHeaders === 'string') headers = Request[kHTTP2CopyHeaders](reqHeaders.trim())\n else headers = reqHeaders\n\n if (upgrade) {\n errorRequest(client, request, new Error('Upgrade not supported for H2'))\n return false\n }\n\n try {\n // TODO(HTTP/2): Should we call onConnect immediately or on stream ready event?\n request.onConnect((err) => {\n if (request.aborted || request.completed) {\n return\n }\n\n errorRequest(client, request, err || new RequestAbortedError())\n })\n } catch (err) {\n errorRequest(client, request, err)\n }\n\n if (request.aborted) {\n return false\n }\n\n /** @type {import('node:http2').ClientHttp2Stream} */\n let stream\n const h2State = client[kHTTP2SessionState]\n\n headers[HTTP2_HEADER_AUTHORITY] = host || client[kHost]\n headers[HTTP2_HEADER_METHOD] = method\n\n if (method === 'CONNECT') {\n session.ref()\n // we are already connected, streams are pending, first request\n // will create a new stream. We trigger a request to create the stream and wait until\n // `ready` event is triggered\n // We disabled endStream to allow the user to write to the stream\n stream = session.request(headers, { endStream: false, signal })\n\n if (stream.id && !stream.pending) {\n request.onUpgrade(null, null, stream)\n ++h2State.openStreams\n } else {\n stream.once('ready', () => {\n request.onUpgrade(null, null, stream)\n ++h2State.openStreams\n })\n }\n\n stream.once('close', () => {\n h2State.openStreams -= 1\n // TODO(HTTP/2): unref only if current streams count is 0\n if (h2State.openStreams === 0) session.unref()\n })\n\n return true\n }\n\n // https://tools.ietf.org/html/rfc7540#section-8.3\n // :path and :scheme headers must be omited when sending CONNECT\n\n headers[HTTP2_HEADER_PATH] = path\n headers[HTTP2_HEADER_SCHEME] = 'https'\n\n // https://tools.ietf.org/html/rfc7231#section-4.3.1\n // https://tools.ietf.org/html/rfc7231#section-4.3.2\n // https://tools.ietf.org/html/rfc7231#section-4.3.5\n\n // Sending a payload body on a request that does not\n // expect it can cause undefined behavior on some\n // servers and corrupt connection state. Do not\n // re-use the connection for further requests.\n\n const expectsPayload = (\n method === 'PUT' ||\n method === 'POST' ||\n method === 'PATCH'\n )\n\n if (body && typeof body.read === 'function') {\n // Try to read EOF in order to get length.\n body.read(0)\n }\n\n let contentLength = util.bodyLength(body)\n\n if (contentLength == null) {\n contentLength = request.contentLength\n }\n\n if (contentLength === 0 || !expectsPayload) {\n // https://tools.ietf.org/html/rfc7230#section-3.3.2\n // A user agent SHOULD NOT send a Content-Length header field when\n // the request message does not contain a payload body and the method\n // semantics do not anticipate such a body.\n\n contentLength = null\n }\n\n // https://github.com/nodejs/undici/issues/2046\n // A user agent may send a Content-Length header with 0 value, this should be allowed.\n if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength != null && request.contentLength !== contentLength) {\n if (client[kStrictContentLength]) {\n errorRequest(client, request, new RequestContentLengthMismatchError())\n return false\n }\n\n process.emitWarning(new RequestContentLengthMismatchError())\n }\n\n if (contentLength != null) {\n assert(body, 'no body must not have content length')\n headers[HTTP2_HEADER_CONTENT_LENGTH] = `${contentLength}`\n }\n\n session.ref()\n\n const shouldEndStream = method === 'GET' || method === 'HEAD'\n if (expectContinue) {\n headers[HTTP2_HEADER_EXPECT] = '100-continue'\n stream = session.request(headers, { endStream: shouldEndStream, signal })\n\n stream.once('continue', writeBodyH2)\n } else {\n stream = session.request(headers, {\n endStream: shouldEndStream,\n signal\n })\n writeBodyH2()\n }\n\n // Increment counter as we have new several streams open\n ++h2State.openStreams\n\n stream.once('response', headers => {\n const { [HTTP2_HEADER_STATUS]: statusCode, ...realHeaders } = headers\n\n if (request.onHeaders(Number(statusCode), realHeaders, stream.resume.bind(stream), '') === false) {\n stream.pause()\n }\n })\n\n stream.once('end', () => {\n request.onComplete([])\n })\n\n stream.on('data', (chunk) => {\n if (request.onData(chunk) === false) {\n stream.pause()\n }\n })\n\n stream.once('close', () => {\n h2State.openStreams -= 1\n // TODO(HTTP/2): unref only if current streams count is 0\n if (h2State.openStreams === 0) {\n session.unref()\n }\n })\n\n stream.once('error', function (err) {\n if (client[kHTTP2Session] && !client[kHTTP2Session].destroyed && !this.closed && !this.destroyed) {\n h2State.streams -= 1\n util.destroy(stream, err)\n }\n })\n\n stream.once('frameError', (type, code) => {\n const err = new InformationalError(`HTTP/2: \"frameError\" received - type ${type}, code ${code}`)\n errorRequest(client, request, err)\n\n if (client[kHTTP2Session] && !client[kHTTP2Session].destroyed && !this.closed && !this.destroyed) {\n h2State.streams -= 1\n util.destroy(stream, err)\n }\n })\n\n // stream.on('aborted', () => {\n // // TODO(HTTP/2): Support aborted\n // })\n\n // stream.on('timeout', () => {\n // // TODO(HTTP/2): Support timeout\n // })\n\n // stream.on('push', headers => {\n // // TODO(HTTP/2): Suppor push\n // })\n\n // stream.on('trailers', headers => {\n // // TODO(HTTP/2): Support trailers\n // })\n\n return true\n\n function writeBodyH2 () {\n /* istanbul ignore else: assertion */\n if (!body) {\n request.onRequestSent()\n } else if (util.isBuffer(body)) {\n assert(contentLength === body.byteLength, 'buffer body must have content length')\n stream.cork()\n stream.write(body)\n stream.uncork()\n stream.end()\n request.onBodySent(body)\n request.onRequestSent()\n } else if (util.isBlobLike(body)) {\n if (typeof body.stream === 'function') {\n writeIterable({\n client,\n request,\n contentLength,\n h2stream: stream,\n expectsPayload,\n body: body.stream(),\n socket: client[kSocket],\n header: ''\n })\n } else {\n writeBlob({\n body,\n client,\n request,\n contentLength,\n expectsPayload,\n h2stream: stream,\n header: '',\n socket: client[kSocket]\n })\n }\n } else if (util.isStream(body)) {\n writeStream({\n body,\n client,\n request,\n contentLength,\n expectsPayload,\n socket: client[kSocket],\n h2stream: stream,\n header: ''\n })\n } else if (util.isIterable(body)) {\n writeIterable({\n body,\n client,\n request,\n contentLength,\n expectsPayload,\n header: '',\n h2stream: stream,\n socket: client[kSocket]\n })\n } else {\n assert(false)\n }\n }\n}\n\nfunction writeStream ({ h2stream, body, client, request, socket, contentLength, header, expectsPayload }) {\n assert(contentLength !== 0 || client[kRunning] === 0, 'stream body cannot be pipelined')\n\n if (client[kHTTPConnVersion] === 'h2') {\n // For HTTP/2, is enough to pipe the stream\n const pipe = pipeline(\n body,\n h2stream,\n (err) => {\n if (err) {\n util.destroy(body, err)\n util.destroy(h2stream, err)\n } else {\n request.onRequestSent()\n }\n }\n )\n\n pipe.on('data', onPipeData)\n pipe.once('end', () => {\n pipe.removeListener('data', onPipeData)\n util.destroy(pipe)\n })\n\n function onPipeData (chunk) {\n request.onBodySent(chunk)\n }\n\n return\n }\n\n let finished = false\n\n const writer = new AsyncWriter({ socket, request, contentLength, client, expectsPayload, header })\n\n const onData = function (chunk) {\n if (finished) {\n return\n }\n\n try {\n if (!writer.write(chunk) && this.pause) {\n this.pause()\n }\n } catch (err) {\n util.destroy(this, err)\n }\n }\n const onDrain = function () {\n if (finished) {\n return\n }\n\n if (body.resume) {\n body.resume()\n }\n }\n const onAbort = function () {\n if (finished) {\n return\n }\n const err = new RequestAbortedError()\n queueMicrotask(() => onFinished(err))\n }\n const onFinished = function (err) {\n if (finished) {\n return\n }\n\n finished = true\n\n assert(socket.destroyed || (socket[kWriting] && client[kRunning] <= 1))\n\n socket\n .off('drain', onDrain)\n .off('error', onFinished)\n\n body\n .removeListener('data', onData)\n .removeListener('end', onFinished)\n .removeListener('error', onFinished)\n .removeListener('close', onAbort)\n\n if (!err) {\n try {\n writer.end()\n } catch (er) {\n err = er\n }\n }\n\n writer.destroy(err)\n\n if (err && (err.code !== 'UND_ERR_INFO' || err.message !== 'reset')) {\n util.destroy(body, err)\n } else {\n util.destroy(body)\n }\n }\n\n body\n .on('data', onData)\n .on('end', onFinished)\n .on('error', onFinished)\n .on('close', onAbort)\n\n if (body.resume) {\n body.resume()\n }\n\n socket\n .on('drain', onDrain)\n .on('error', onFinished)\n}\n\nasync function writeBlob ({ h2stream, body, client, request, socket, contentLength, header, expectsPayload }) {\n assert(contentLength === body.size, 'blob body must have content length')\n\n const isH2 = client[kHTTPConnVersion] === 'h2'\n try {\n if (contentLength != null && contentLength !== body.size) {\n throw new RequestContentLengthMismatchError()\n }\n\n const buffer = Buffer.from(await body.arrayBuffer())\n\n if (isH2) {\n h2stream.cork()\n h2stream.write(buffer)\n h2stream.uncork()\n } else {\n socket.cork()\n socket.write(`${header}content-length: ${contentLength}\\r\\n\\r\\n`, 'latin1')\n socket.write(buffer)\n socket.uncork()\n }\n\n request.onBodySent(buffer)\n request.onRequestSent()\n\n if (!expectsPayload) {\n socket[kReset] = true\n }\n\n resume(client)\n } catch (err) {\n util.destroy(isH2 ? h2stream : socket, err)\n }\n}\n\nasync function writeIterable ({ h2stream, body, client, request, socket, contentLength, header, expectsPayload }) {\n assert(contentLength !== 0 || client[kRunning] === 0, 'iterator body cannot be pipelined')\n\n let callback = null\n function onDrain () {\n if (callback) {\n const cb = callback\n callback = null\n cb()\n }\n }\n\n const waitForDrain = () => new Promise((resolve, reject) => {\n assert(callback === null)\n\n if (socket[kError]) {\n reject(socket[kError])\n } else {\n callback = resolve\n }\n })\n\n if (client[kHTTPConnVersion] === 'h2') {\n h2stream\n .on('close', onDrain)\n .on('drain', onDrain)\n\n try {\n // It's up to the user to somehow abort the async iterable.\n for await (const chunk of body) {\n if (socket[kError]) {\n throw socket[kError]\n }\n\n const res = h2stream.write(chunk)\n request.onBodySent(chunk)\n if (!res) {\n await waitForDrain()\n }\n }\n } catch (err) {\n h2stream.destroy(err)\n } finally {\n request.onRequestSent()\n h2stream.end()\n h2stream\n .off('close', onDrain)\n .off('drain', onDrain)\n }\n\n return\n }\n\n socket\n .on('close', onDrain)\n .on('drain', onDrain)\n\n const writer = new AsyncWriter({ socket, request, contentLength, client, expectsPayload, header })\n try {\n // It's up to the user to somehow abort the async iterable.\n for await (const chunk of body) {\n if (socket[kError]) {\n throw socket[kError]\n }\n\n if (!writer.write(chunk)) {\n await waitForDrain()\n }\n }\n\n writer.end()\n } catch (err) {\n writer.destroy(err)\n } finally {\n socket\n .off('close', onDrain)\n .off('drain', onDrain)\n }\n}\n\nclass AsyncWriter {\n constructor ({ socket, request, contentLength, client, expectsPayload, header }) {\n this.socket = socket\n this.request = request\n this.contentLength = contentLength\n this.client = client\n this.bytesWritten = 0\n this.expectsPayload = expectsPayload\n this.header = header\n\n socket[kWriting] = true\n }\n\n write (chunk) {\n const { socket, request, contentLength, client, bytesWritten, expectsPayload, header } = this\n\n if (socket[kError]) {\n throw socket[kError]\n }\n\n if (socket.destroyed) {\n return false\n }\n\n const len = Buffer.byteLength(chunk)\n if (!len) {\n return true\n }\n\n // We should defer writing chunks.\n if (contentLength !== null && bytesWritten + len > contentLength) {\n if (client[kStrictContentLength]) {\n throw new RequestContentLengthMismatchError()\n }\n\n process.emitWarning(new RequestContentLengthMismatchError())\n }\n\n socket.cork()\n\n if (bytesWritten === 0) {\n if (!expectsPayload) {\n socket[kReset] = true\n }\n\n if (contentLength === null) {\n socket.write(`${header}transfer-encoding: chunked\\r\\n`, 'latin1')\n } else {\n socket.write(`${header}content-length: ${contentLength}\\r\\n\\r\\n`, 'latin1')\n }\n }\n\n if (contentLength === null) {\n socket.write(`\\r\\n${len.toString(16)}\\r\\n`, 'latin1')\n }\n\n this.bytesWritten += len\n\n const ret = socket.write(chunk)\n\n socket.uncork()\n\n request.onBodySent(chunk)\n\n if (!ret) {\n if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) {\n // istanbul ignore else: only for jest\n if (socket[kParser].timeout.refresh) {\n socket[kParser].timeout.refresh()\n }\n }\n }\n\n return ret\n }\n\n end () {\n const { socket, contentLength, client, bytesWritten, expectsPayload, header, request } = this\n request.onRequestSent()\n\n socket[kWriting] = false\n\n if (socket[kError]) {\n throw socket[kError]\n }\n\n if (socket.destroyed) {\n return\n }\n\n if (bytesWritten === 0) {\n if (expectsPayload) {\n // https://tools.ietf.org/html/rfc7230#section-3.3.2\n // A user agent SHOULD send a Content-Length in a request message when\n // no Transfer-Encoding is sent and the request method defines a meaning\n // for an enclosed payload body.\n\n socket.write(`${header}content-length: 0\\r\\n\\r\\n`, 'latin1')\n } else {\n socket.write(`${header}\\r\\n`, 'latin1')\n }\n } else if (contentLength === null) {\n socket.write('\\r\\n0\\r\\n\\r\\n', 'latin1')\n }\n\n if (contentLength !== null && bytesWritten !== contentLength) {\n if (client[kStrictContentLength]) {\n throw new RequestContentLengthMismatchError()\n } else {\n process.emitWarning(new RequestContentLengthMismatchError())\n }\n }\n\n if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) {\n // istanbul ignore else: only for jest\n if (socket[kParser].timeout.refresh) {\n socket[kParser].timeout.refresh()\n }\n }\n\n resume(client)\n }\n\n destroy (err) {\n const { socket, client } = this\n\n socket[kWriting] = false\n\n if (err) {\n assert(client[kRunning] <= 1, 'pipeline should only contain this request')\n util.destroy(socket, err)\n }\n }\n}\n\nfunction errorRequest (client, request, err) {\n try {\n request.onError(err)\n assert(request.aborted)\n } catch (err) {\n client.emit('error', err)\n }\n}\n\nmodule.exports = Client\n", "/* eslint-disable */\n\n'use strict'\n\n// Extracted from node/lib/internal/fixed_queue.js\n\n// Currently optimal queue size, tested on V8 6.0 - 6.6. Must be power of two.\nconst kSize = 2048;\nconst kMask = kSize - 1;\n\n// The FixedQueue is implemented as a singly-linked list of fixed-size\n// circular buffers. It looks something like this:\n//\n// head tail\n// | |\n// v v\n// +-----------+ <-----\\ +-----------+ <------\\ +-----------+\n// | [null] | \\----- | next | \\------- | next |\n// +-----------+ +-----------+ +-----------+\n// | item | <-- bottom | item | <-- bottom | [empty] |\n// | item | | item | | [empty] |\n// | item | | item | | [empty] |\n// | item | | item | | [empty] |\n// | item | | item | bottom --> | item |\n// | item | | item | | item |\n// | ... | | ... | | ... |\n// | item | | item | | item |\n// | item | | item | | item |\n// | [empty] | <-- top | item | | item |\n// | [empty] | | item | | item |\n// | [empty] | | [empty] | <-- top top --> | [empty] |\n// +-----------+ +-----------+ +-----------+\n//\n// Or, if there is only one circular buffer, it looks something\n// like either of these:\n//\n// head tail head tail\n// | | | |\n// v v v v\n// +-----------+ +-----------+\n// | [null] | | [null] |\n// +-----------+ +-----------+\n// | [empty] | | item |\n// | [empty] | | item |\n// | item | <-- bottom top --> | [empty] |\n// | item | | [empty] |\n// | [empty] | <-- top bottom --> | item |\n// | [empty] | | item |\n// +-----------+ +-----------+\n//\n// Adding a value means moving `top` forward by one, removing means\n// moving `bottom` forward by one. After reaching the end, the queue\n// wraps around.\n//\n// When `top === bottom` the current queue is empty and when\n// `top + 1 === bottom` it's full. This wastes a single space of storage\n// but allows much quicker checks.\n\nclass FixedCircularBuffer {\n constructor() {\n this.bottom = 0;\n this.top = 0;\n this.list = new Array(kSize);\n this.next = null;\n }\n\n isEmpty() {\n return this.top === this.bottom;\n }\n\n isFull() {\n return ((this.top + 1) & kMask) === this.bottom;\n }\n\n push(data) {\n this.list[this.top] = data;\n this.top = (this.top + 1) & kMask;\n }\n\n shift() {\n const nextItem = this.list[this.bottom];\n if (nextItem === undefined)\n return null;\n this.list[this.bottom] = undefined;\n this.bottom = (this.bottom + 1) & kMask;\n return nextItem;\n }\n}\n\nmodule.exports = class FixedQueue {\n constructor() {\n this.head = this.tail = new FixedCircularBuffer();\n }\n\n isEmpty() {\n return this.head.isEmpty();\n }\n\n push(data) {\n if (this.head.isFull()) {\n // Head is full: Creates a new queue, sets the old queue's `.next` to it,\n // and sets it as the new main queue.\n this.head = this.head.next = new FixedCircularBuffer();\n }\n this.head.push(data);\n }\n\n shift() {\n const tail = this.tail;\n const next = tail.shift();\n if (tail.isEmpty() && tail.next !== null) {\n // If there is another queue, it forms the new tail.\n this.tail = tail.next;\n }\n return next;\n }\n};\n", "const { kFree, kConnected, kPending, kQueued, kRunning, kSize } = require('./core/symbols')\nconst kPool = Symbol('pool')\n\nclass PoolStats {\n constructor (pool) {\n this[kPool] = pool\n }\n\n get connected () {\n return this[kPool][kConnected]\n }\n\n get free () {\n return this[kPool][kFree]\n }\n\n get pending () {\n return this[kPool][kPending]\n }\n\n get queued () {\n return this[kPool][kQueued]\n }\n\n get running () {\n return this[kPool][kRunning]\n }\n\n get size () {\n return this[kPool][kSize]\n }\n}\n\nmodule.exports = PoolStats\n", "'use strict'\n\nconst DispatcherBase = require('./dispatcher-base')\nconst FixedQueue = require('./node/fixed-queue')\nconst { kConnected, kSize, kRunning, kPending, kQueued, kBusy, kFree, kUrl, kClose, kDestroy, kDispatch } = require('./core/symbols')\nconst PoolStats = require('./pool-stats')\n\nconst kClients = Symbol('clients')\nconst kNeedDrain = Symbol('needDrain')\nconst kQueue = Symbol('queue')\nconst kClosedResolve = Symbol('closed resolve')\nconst kOnDrain = Symbol('onDrain')\nconst kOnConnect = Symbol('onConnect')\nconst kOnDisconnect = Symbol('onDisconnect')\nconst kOnConnectionError = Symbol('onConnectionError')\nconst kGetDispatcher = Symbol('get dispatcher')\nconst kAddClient = Symbol('add client')\nconst kRemoveClient = Symbol('remove client')\nconst kStats = Symbol('stats')\n\nclass PoolBase extends DispatcherBase {\n constructor () {\n super()\n\n this[kQueue] = new FixedQueue()\n this[kClients] = []\n this[kQueued] = 0\n\n const pool = this\n\n this[kOnDrain] = function onDrain (origin, targets) {\n const queue = pool[kQueue]\n\n let needDrain = false\n\n while (!needDrain) {\n const item = queue.shift()\n if (!item) {\n break\n }\n pool[kQueued]--\n needDrain = !this.dispatch(item.opts, item.handler)\n }\n\n this[kNeedDrain] = needDrain\n\n if (!this[kNeedDrain] && pool[kNeedDrain]) {\n pool[kNeedDrain] = false\n pool.emit('drain', origin, [pool, ...targets])\n }\n\n if (pool[kClosedResolve] && queue.isEmpty()) {\n Promise\n .all(pool[kClients].map(c => c.close()))\n .then(pool[kClosedResolve])\n }\n }\n\n this[kOnConnect] = (origin, targets) => {\n pool.emit('connect', origin, [pool, ...targets])\n }\n\n this[kOnDisconnect] = (origin, targets, err) => {\n pool.emit('disconnect', origin, [pool, ...targets], err)\n }\n\n this[kOnConnectionError] = (origin, targets, err) => {\n pool.emit('connectionError', origin, [pool, ...targets], err)\n }\n\n this[kStats] = new PoolStats(this)\n }\n\n get [kBusy] () {\n return this[kNeedDrain]\n }\n\n get [kConnected] () {\n return this[kClients].filter(client => client[kConnected]).length\n }\n\n get [kFree] () {\n return this[kClients].filter(client => client[kConnected] && !client[kNeedDrain]).length\n }\n\n get [kPending] () {\n let ret = this[kQueued]\n for (const { [kPending]: pending } of this[kClients]) {\n ret += pending\n }\n return ret\n }\n\n get [kRunning] () {\n let ret = 0\n for (const { [kRunning]: running } of this[kClients]) {\n ret += running\n }\n return ret\n }\n\n get [kSize] () {\n let ret = this[kQueued]\n for (const { [kSize]: size } of this[kClients]) {\n ret += size\n }\n return ret\n }\n\n get stats () {\n return this[kStats]\n }\n\n async [kClose] () {\n if (this[kQueue].isEmpty()) {\n return Promise.all(this[kClients].map(c => c.close()))\n } else {\n return new Promise((resolve) => {\n this[kClosedResolve] = resolve\n })\n }\n }\n\n async [kDestroy] (err) {\n while (true) {\n const item = this[kQueue].shift()\n if (!item) {\n break\n }\n item.handler.onError(err)\n }\n\n return Promise.all(this[kClients].map(c => c.destroy(err)))\n }\n\n [kDispatch] (opts, handler) {\n const dispatcher = this[kGetDispatcher]()\n\n if (!dispatcher) {\n this[kNeedDrain] = true\n this[kQueue].push({ opts, handler })\n this[kQueued]++\n } else if (!dispatcher.dispatch(opts, handler)) {\n dispatcher[kNeedDrain] = true\n this[kNeedDrain] = !this[kGetDispatcher]()\n }\n\n return !this[kNeedDrain]\n }\n\n [kAddClient] (client) {\n client\n .on('drain', this[kOnDrain])\n .on('connect', this[kOnConnect])\n .on('disconnect', this[kOnDisconnect])\n .on('connectionError', this[kOnConnectionError])\n\n this[kClients].push(client)\n\n if (this[kNeedDrain]) {\n process.nextTick(() => {\n if (this[kNeedDrain]) {\n this[kOnDrain](client[kUrl], [this, client])\n }\n })\n }\n\n return this\n }\n\n [kRemoveClient] (client) {\n client.close(() => {\n const idx = this[kClients].indexOf(client)\n if (idx !== -1) {\n this[kClients].splice(idx, 1)\n }\n })\n\n this[kNeedDrain] = this[kClients].some(dispatcher => (\n !dispatcher[kNeedDrain] &&\n dispatcher.closed !== true &&\n dispatcher.destroyed !== true\n ))\n }\n}\n\nmodule.exports = {\n PoolBase,\n kClients,\n kNeedDrain,\n kAddClient,\n kRemoveClient,\n kGetDispatcher\n}\n", "'use strict'\n\nconst {\n PoolBase,\n kClients,\n kNeedDrain,\n kAddClient,\n kGetDispatcher\n} = require('./pool-base')\nconst Client = require('./client')\nconst {\n InvalidArgumentError\n} = require('./core/errors')\nconst util = require('./core/util')\nconst { kUrl, kInterceptors } = require('./core/symbols')\nconst buildConnector = require('./core/connect')\n\nconst kOptions = Symbol('options')\nconst kConnections = Symbol('connections')\nconst kFactory = Symbol('factory')\n\nfunction defaultFactory (origin, opts) {\n return new Client(origin, opts)\n}\n\nclass Pool extends PoolBase {\n constructor (origin, {\n connections,\n factory = defaultFactory,\n connect,\n connectTimeout,\n tls,\n maxCachedSessions,\n socketPath,\n autoSelectFamily,\n autoSelectFamilyAttemptTimeout,\n allowH2,\n ...options\n } = {}) {\n super()\n\n if (connections != null && (!Number.isFinite(connections) || connections < 0)) {\n throw new InvalidArgumentError('invalid connections')\n }\n\n if (typeof factory !== 'function') {\n throw new InvalidArgumentError('factory must be a function.')\n }\n\n if (connect != null && typeof connect !== 'function' && typeof connect !== 'object') {\n throw new InvalidArgumentError('connect must be a function or an object')\n }\n\n if (typeof connect !== 'function') {\n connect = buildConnector({\n ...tls,\n maxCachedSessions,\n allowH2,\n socketPath,\n timeout: connectTimeout,\n ...(util.nodeHasAutoSelectFamily && autoSelectFamily ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : undefined),\n ...connect\n })\n }\n\n this[kInterceptors] = options.interceptors && options.interceptors.Pool && Array.isArray(options.interceptors.Pool)\n ? options.interceptors.Pool\n : []\n this[kConnections] = connections || null\n this[kUrl] = util.parseOrigin(origin)\n this[kOptions] = { ...util.deepClone(options), connect, allowH2 }\n this[kOptions].interceptors = options.interceptors\n ? { ...options.interceptors }\n : undefined\n this[kFactory] = factory\n }\n\n [kGetDispatcher] () {\n let dispatcher = this[kClients].find(dispatcher => !dispatcher[kNeedDrain])\n\n if (dispatcher) {\n return dispatcher\n }\n\n if (!this[kConnections] || this[kClients].length < this[kConnections]) {\n dispatcher = this[kFactory](this[kUrl], this[kOptions])\n this[kAddClient](dispatcher)\n }\n\n return dispatcher\n }\n}\n\nmodule.exports = Pool\n", "'use strict'\n\nconst {\n BalancedPoolMissingUpstreamError,\n InvalidArgumentError\n} = require('./core/errors')\nconst {\n PoolBase,\n kClients,\n kNeedDrain,\n kAddClient,\n kRemoveClient,\n kGetDispatcher\n} = require('./pool-base')\nconst Pool = require('./pool')\nconst { kUrl, kInterceptors } = require('./core/symbols')\nconst { parseOrigin } = require('./core/util')\nconst kFactory = Symbol('factory')\n\nconst kOptions = Symbol('options')\nconst kGreatestCommonDivisor = Symbol('kGreatestCommonDivisor')\nconst kCurrentWeight = Symbol('kCurrentWeight')\nconst kIndex = Symbol('kIndex')\nconst kWeight = Symbol('kWeight')\nconst kMaxWeightPerServer = Symbol('kMaxWeightPerServer')\nconst kErrorPenalty = Symbol('kErrorPenalty')\n\nfunction getGreatestCommonDivisor (a, b) {\n if (b === 0) return a\n return getGreatestCommonDivisor(b, a % b)\n}\n\nfunction defaultFactory (origin, opts) {\n return new Pool(origin, opts)\n}\n\nclass BalancedPool extends PoolBase {\n constructor (upstreams = [], { factory = defaultFactory, ...opts } = {}) {\n super()\n\n this[kOptions] = opts\n this[kIndex] = -1\n this[kCurrentWeight] = 0\n\n this[kMaxWeightPerServer] = this[kOptions].maxWeightPerServer || 100\n this[kErrorPenalty] = this[kOptions].errorPenalty || 15\n\n if (!Array.isArray(upstreams)) {\n upstreams = [upstreams]\n }\n\n if (typeof factory !== 'function') {\n throw new InvalidArgumentError('factory must be a function.')\n }\n\n this[kInterceptors] = opts.interceptors && opts.interceptors.BalancedPool && Array.isArray(opts.interceptors.BalancedPool)\n ? opts.interceptors.BalancedPool\n : []\n this[kFactory] = factory\n\n for (const upstream of upstreams) {\n this.addUpstream(upstream)\n }\n this._updateBalancedPoolStats()\n }\n\n addUpstream (upstream) {\n const upstreamOrigin = parseOrigin(upstream).origin\n\n if (this[kClients].find((pool) => (\n pool[kUrl].origin === upstreamOrigin &&\n pool.closed !== true &&\n pool.destroyed !== true\n ))) {\n return this\n }\n const pool = this[kFactory](upstreamOrigin, Object.assign({}, this[kOptions]))\n\n this[kAddClient](pool)\n pool.on('connect', () => {\n pool[kWeight] = Math.min(this[kMaxWeightPerServer], pool[kWeight] + this[kErrorPenalty])\n })\n\n pool.on('connectionError', () => {\n pool[kWeight] = Math.max(1, pool[kWeight] - this[kErrorPenalty])\n this._updateBalancedPoolStats()\n })\n\n pool.on('disconnect', (...args) => {\n const err = args[2]\n if (err && err.code === 'UND_ERR_SOCKET') {\n // decrease the weight of the pool.\n pool[kWeight] = Math.max(1, pool[kWeight] - this[kErrorPenalty])\n this._updateBalancedPoolStats()\n }\n })\n\n for (const client of this[kClients]) {\n client[kWeight] = this[kMaxWeightPerServer]\n }\n\n this._updateBalancedPoolStats()\n\n return this\n }\n\n _updateBalancedPoolStats () {\n this[kGreatestCommonDivisor] = this[kClients].map(p => p[kWeight]).reduce(getGreatestCommonDivisor, 0)\n }\n\n removeUpstream (upstream) {\n const upstreamOrigin = parseOrigin(upstream).origin\n\n const pool = this[kClients].find((pool) => (\n pool[kUrl].origin === upstreamOrigin &&\n pool.closed !== true &&\n pool.destroyed !== true\n ))\n\n if (pool) {\n this[kRemoveClient](pool)\n }\n\n return this\n }\n\n get upstreams () {\n return this[kClients]\n .filter(dispatcher => dispatcher.closed !== true && dispatcher.destroyed !== true)\n .map((p) => p[kUrl].origin)\n }\n\n [kGetDispatcher] () {\n // We validate that pools is greater than 0,\n // otherwise we would have to wait until an upstream\n // is added, which might never happen.\n if (this[kClients].length === 0) {\n throw new BalancedPoolMissingUpstreamError()\n }\n\n const dispatcher = this[kClients].find(dispatcher => (\n !dispatcher[kNeedDrain] &&\n dispatcher.closed !== true &&\n dispatcher.destroyed !== true\n ))\n\n if (!dispatcher) {\n return\n }\n\n const allClientsBusy = this[kClients].map(pool => pool[kNeedDrain]).reduce((a, b) => a && b, true)\n\n if (allClientsBusy) {\n return\n }\n\n let counter = 0\n\n let maxWeightIndex = this[kClients].findIndex(pool => !pool[kNeedDrain])\n\n while (counter++ < this[kClients].length) {\n this[kIndex] = (this[kIndex] + 1) % this[kClients].length\n const pool = this[kClients][this[kIndex]]\n\n // find pool index with the largest weight\n if (pool[kWeight] > this[kClients][maxWeightIndex][kWeight] && !pool[kNeedDrain]) {\n maxWeightIndex = this[kIndex]\n }\n\n // decrease the current weight every `this[kClients].length`.\n if (this[kIndex] === 0) {\n // Set the current weight to the next lower weight.\n this[kCurrentWeight] = this[kCurrentWeight] - this[kGreatestCommonDivisor]\n\n if (this[kCurrentWeight] <= 0) {\n this[kCurrentWeight] = this[kMaxWeightPerServer]\n }\n }\n if (pool[kWeight] >= this[kCurrentWeight] && (!pool[kNeedDrain])) {\n return pool\n }\n }\n\n this[kCurrentWeight] = this[kClients][maxWeightIndex][kWeight]\n this[kIndex] = maxWeightIndex\n return this[kClients][maxWeightIndex]\n }\n}\n\nmodule.exports = BalancedPool\n", "'use strict'\n\n/* istanbul ignore file: only for Node 12 */\n\nconst { kConnected, kSize } = require('../core/symbols')\n\nclass CompatWeakRef {\n constructor (value) {\n this.value = value\n }\n\n deref () {\n return this.value[kConnected] === 0 && this.value[kSize] === 0\n ? undefined\n : this.value\n }\n}\n\nclass CompatFinalizer {\n constructor (finalizer) {\n this.finalizer = finalizer\n }\n\n register (dispatcher, key) {\n if (dispatcher.on) {\n dispatcher.on('disconnect', () => {\n if (dispatcher[kConnected] === 0 && dispatcher[kSize] === 0) {\n this.finalizer(key)\n }\n })\n }\n }\n}\n\nmodule.exports = function () {\n // FIXME: remove workaround when the Node bug is fixed\n // https://github.com/nodejs/node/issues/49344#issuecomment-1741776308\n if (process.env.NODE_V8_COVERAGE) {\n return {\n WeakRef: CompatWeakRef,\n FinalizationRegistry: CompatFinalizer\n }\n }\n return {\n WeakRef: global.WeakRef || CompatWeakRef,\n FinalizationRegistry: global.FinalizationRegistry || CompatFinalizer\n }\n}\n", "'use strict'\n\nconst { InvalidArgumentError } = require('./core/errors')\nconst { kClients, kRunning, kClose, kDestroy, kDispatch, kInterceptors } = require('./core/symbols')\nconst DispatcherBase = require('./dispatcher-base')\nconst Pool = require('./pool')\nconst Client = require('./client')\nconst util = require('./core/util')\nconst createRedirectInterceptor = require('./interceptor/redirectInterceptor')\nconst { WeakRef, FinalizationRegistry } = require('./compat/dispatcher-weakref')()\n\nconst kOnConnect = Symbol('onConnect')\nconst kOnDisconnect = Symbol('onDisconnect')\nconst kOnConnectionError = Symbol('onConnectionError')\nconst kMaxRedirections = Symbol('maxRedirections')\nconst kOnDrain = Symbol('onDrain')\nconst kFactory = Symbol('factory')\nconst kFinalizer = Symbol('finalizer')\nconst kOptions = Symbol('options')\n\nfunction defaultFactory (origin, opts) {\n return opts && opts.connections === 1\n ? new Client(origin, opts)\n : new Pool(origin, opts)\n}\n\nclass Agent extends DispatcherBase {\n constructor ({ factory = defaultFactory, maxRedirections = 0, connect, ...options } = {}) {\n super()\n\n if (typeof factory !== 'function') {\n throw new InvalidArgumentError('factory must be a function.')\n }\n\n if (connect != null && typeof connect !== 'function' && typeof connect !== 'object') {\n throw new InvalidArgumentError('connect must be a function or an object')\n }\n\n if (!Number.isInteger(maxRedirections) || maxRedirections < 0) {\n throw new InvalidArgumentError('maxRedirections must be a positive number')\n }\n\n if (connect && typeof connect !== 'function') {\n connect = { ...connect }\n }\n\n this[kInterceptors] = options.interceptors && options.interceptors.Agent && Array.isArray(options.interceptors.Agent)\n ? options.interceptors.Agent\n : [createRedirectInterceptor({ maxRedirections })]\n\n this[kOptions] = { ...util.deepClone(options), connect }\n this[kOptions].interceptors = options.interceptors\n ? { ...options.interceptors }\n : undefined\n this[kMaxRedirections] = maxRedirections\n this[kFactory] = factory\n this[kClients] = new Map()\n this[kFinalizer] = new FinalizationRegistry(/* istanbul ignore next: gc is undeterministic */ key => {\n const ref = this[kClients].get(key)\n if (ref !== undefined && ref.deref() === undefined) {\n this[kClients].delete(key)\n }\n })\n\n const agent = this\n\n this[kOnDrain] = (origin, targets) => {\n agent.emit('drain', origin, [agent, ...targets])\n }\n\n this[kOnConnect] = (origin, targets) => {\n agent.emit('connect', origin, [agent, ...targets])\n }\n\n this[kOnDisconnect] = (origin, targets, err) => {\n agent.emit('disconnect', origin, [agent, ...targets], err)\n }\n\n this[kOnConnectionError] = (origin, targets, err) => {\n agent.emit('connectionError', origin, [agent, ...targets], err)\n }\n }\n\n get [kRunning] () {\n let ret = 0\n for (const ref of this[kClients].values()) {\n const client = ref.deref()\n /* istanbul ignore next: gc is undeterministic */\n if (client) {\n ret += client[kRunning]\n }\n }\n return ret\n }\n\n [kDispatch] (opts, handler) {\n let key\n if (opts.origin && (typeof opts.origin === 'string' || opts.origin instanceof URL)) {\n key = String(opts.origin)\n } else {\n throw new InvalidArgumentError('opts.origin must be a non-empty string or URL.')\n }\n\n const ref = this[kClients].get(key)\n\n let dispatcher = ref ? ref.deref() : null\n if (!dispatcher) {\n dispatcher = this[kFactory](opts.origin, this[kOptions])\n .on('drain', this[kOnDrain])\n .on('connect', this[kOnConnect])\n .on('disconnect', this[kOnDisconnect])\n .on('connectionError', this[kOnConnectionError])\n\n this[kClients].set(key, new WeakRef(dispatcher))\n this[kFinalizer].register(dispatcher, key)\n }\n\n return dispatcher.dispatch(opts, handler)\n }\n\n async [kClose] () {\n const closePromises = []\n for (const ref of this[kClients].values()) {\n const client = ref.deref()\n /* istanbul ignore else: gc is undeterministic */\n if (client) {\n closePromises.push(client.close())\n }\n }\n\n await Promise.all(closePromises)\n }\n\n async [kDestroy] (err) {\n const destroyPromises = []\n for (const ref of this[kClients].values()) {\n const client = ref.deref()\n /* istanbul ignore else: gc is undeterministic */\n if (client) {\n destroyPromises.push(client.destroy(err))\n }\n }\n\n await Promise.all(destroyPromises)\n }\n}\n\nmodule.exports = Agent\n", "// Ported from https://github.com/nodejs/undici/pull/907\n\n'use strict'\n\nconst assert = require('assert')\nconst { Readable } = require('stream')\nconst { RequestAbortedError, NotSupportedError, InvalidArgumentError } = require('../core/errors')\nconst util = require('../core/util')\nconst { ReadableStreamFrom, toUSVString } = require('../core/util')\n\nlet Blob\n\nconst kConsume = Symbol('kConsume')\nconst kReading = Symbol('kReading')\nconst kBody = Symbol('kBody')\nconst kAbort = Symbol('abort')\nconst kContentType = Symbol('kContentType')\n\nconst noop = () => {}\n\nmodule.exports = class BodyReadable extends Readable {\n constructor ({\n resume,\n abort,\n contentType = '',\n highWaterMark = 64 * 1024 // Same as nodejs fs streams.\n }) {\n super({\n autoDestroy: true,\n read: resume,\n highWaterMark\n })\n\n this._readableState.dataEmitted = false\n\n this[kAbort] = abort\n this[kConsume] = null\n this[kBody] = null\n this[kContentType] = contentType\n\n // Is stream being consumed through Readable API?\n // This is an optimization so that we avoid checking\n // for 'data' and 'readable' listeners in the hot path\n // inside push().\n this[kReading] = false\n }\n\n destroy (err) {\n if (this.destroyed) {\n // Node < 16\n return this\n }\n\n if (!err && !this._readableState.endEmitted) {\n err = new RequestAbortedError()\n }\n\n if (err) {\n this[kAbort]()\n }\n\n return super.destroy(err)\n }\n\n emit (ev, ...args) {\n if (ev === 'data') {\n // Node < 16.7\n this._readableState.dataEmitted = true\n } else if (ev === 'error') {\n // Node < 16\n this._readableState.errorEmitted = true\n }\n return super.emit(ev, ...args)\n }\n\n on (ev, ...args) {\n if (ev === 'data' || ev === 'readable') {\n this[kReading] = true\n }\n return super.on(ev, ...args)\n }\n\n addListener (ev, ...args) {\n return this.on(ev, ...args)\n }\n\n off (ev, ...args) {\n const ret = super.off(ev, ...args)\n if (ev === 'data' || ev === 'readable') {\n this[kReading] = (\n this.listenerCount('data') > 0 ||\n this.listenerCount('readable') > 0\n )\n }\n return ret\n }\n\n removeListener (ev, ...args) {\n return this.off(ev, ...args)\n }\n\n push (chunk) {\n if (this[kConsume] && chunk !== null && this.readableLength === 0) {\n consumePush(this[kConsume], chunk)\n return this[kReading] ? super.push(chunk) : true\n }\n return super.push(chunk)\n }\n\n // https://fetch.spec.whatwg.org/#dom-body-text\n async text () {\n return consume(this, 'text')\n }\n\n // https://fetch.spec.whatwg.org/#dom-body-json\n async json () {\n return consume(this, 'json')\n }\n\n // https://fetch.spec.whatwg.org/#dom-body-blob\n async blob () {\n return consume(this, 'blob')\n }\n\n // https://fetch.spec.whatwg.org/#dom-body-arraybuffer\n async arrayBuffer () {\n return consume(this, 'arrayBuffer')\n }\n\n // https://fetch.spec.whatwg.org/#dom-body-formdata\n async formData () {\n // TODO: Implement.\n throw new NotSupportedError()\n }\n\n // https://fetch.spec.whatwg.org/#dom-body-bodyused\n get bodyUsed () {\n return util.isDisturbed(this)\n }\n\n // https://fetch.spec.whatwg.org/#dom-body-body\n get body () {\n if (!this[kBody]) {\n this[kBody] = ReadableStreamFrom(this)\n if (this[kConsume]) {\n // TODO: Is this the best way to force a lock?\n this[kBody].getReader() // Ensure stream is locked.\n assert(this[kBody].locked)\n }\n }\n return this[kBody]\n }\n\n dump (opts) {\n let limit = opts && Number.isFinite(opts.limit) ? opts.limit : 262144\n const signal = opts && opts.signal\n\n if (signal) {\n try {\n if (typeof signal !== 'object' || !('aborted' in signal)) {\n throw new InvalidArgumentError('signal must be an AbortSignal')\n }\n util.throwIfAborted(signal)\n } catch (err) {\n return Promise.reject(err)\n }\n }\n\n if (this.closed) {\n return Promise.resolve(null)\n }\n\n return new Promise((resolve, reject) => {\n const signalListenerCleanup = signal\n ? util.addAbortListener(signal, () => {\n this.destroy()\n })\n : noop\n\n this\n .on('close', function () {\n signalListenerCleanup()\n if (signal && signal.aborted) {\n reject(signal.reason || Object.assign(new Error('The operation was aborted'), { name: 'AbortError' }))\n } else {\n resolve(null)\n }\n })\n .on('error', noop)\n .on('data', function (chunk) {\n limit -= chunk.length\n if (limit <= 0) {\n this.destroy()\n }\n })\n .resume()\n })\n }\n}\n\n// https://streams.spec.whatwg.org/#readablestream-locked\nfunction isLocked (self) {\n // Consume is an implicit lock.\n return (self[kBody] && self[kBody].locked === true) || self[kConsume]\n}\n\n// https://fetch.spec.whatwg.org/#body-unusable\nfunction isUnusable (self) {\n return util.isDisturbed(self) || isLocked(self)\n}\n\nasync function consume (stream, type) {\n if (isUnusable(stream)) {\n throw new TypeError('unusable')\n }\n\n assert(!stream[kConsume])\n\n return new Promise((resolve, reject) => {\n stream[kConsume] = {\n type,\n stream,\n resolve,\n reject,\n length: 0,\n body: []\n }\n\n stream\n .on('error', function (err) {\n consumeFinish(this[kConsume], err)\n })\n .on('close', function () {\n if (this[kConsume].body !== null) {\n consumeFinish(this[kConsume], new RequestAbortedError())\n }\n })\n\n process.nextTick(consumeStart, stream[kConsume])\n })\n}\n\nfunction consumeStart (consume) {\n if (consume.body === null) {\n return\n }\n\n const { _readableState: state } = consume.stream\n\n for (const chunk of state.buffer) {\n consumePush(consume, chunk)\n }\n\n if (state.endEmitted) {\n consumeEnd(this[kConsume])\n } else {\n consume.stream.on('end', function () {\n consumeEnd(this[kConsume])\n })\n }\n\n consume.stream.resume()\n\n while (consume.stream.read() != null) {\n // Loop\n }\n}\n\nfunction consumeEnd (consume) {\n const { type, body, resolve, stream, length } = consume\n\n try {\n if (type === 'text') {\n resolve(toUSVString(Buffer.concat(body)))\n } else if (type === 'json') {\n resolve(JSON.parse(Buffer.concat(body)))\n } else if (type === 'arrayBuffer') {\n const dst = new Uint8Array(length)\n\n let pos = 0\n for (const buf of body) {\n dst.set(buf, pos)\n pos += buf.byteLength\n }\n\n resolve(dst.buffer)\n } else if (type === 'blob') {\n if (!Blob) {\n Blob = require('buffer').Blob\n }\n resolve(new Blob(body, { type: stream[kContentType] }))\n }\n\n consumeFinish(consume)\n } catch (err) {\n stream.destroy(err)\n }\n}\n\nfunction consumePush (consume, chunk) {\n consume.length += chunk.length\n consume.body.push(chunk)\n}\n\nfunction consumeFinish (consume, err) {\n if (consume.body === null) {\n return\n }\n\n if (err) {\n consume.reject(err)\n } else {\n consume.resolve()\n }\n\n consume.type = null\n consume.stream = null\n consume.resolve = null\n consume.reject = null\n consume.length = 0\n consume.body = null\n}\n", "const assert = require('assert')\nconst {\n ResponseStatusCodeError\n} = require('../core/errors')\nconst { toUSVString } = require('../core/util')\n\nasync function getResolveErrorBodyCallback ({ callback, body, contentType, statusCode, statusMessage, headers }) {\n assert(body)\n\n let chunks = []\n let limit = 0\n\n for await (const chunk of body) {\n chunks.push(chunk)\n limit += chunk.length\n if (limit > 128 * 1024) {\n chunks = null\n break\n }\n }\n\n if (statusCode === 204 || !contentType || !chunks) {\n process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ''}`, statusCode, headers))\n return\n }\n\n try {\n if (contentType.startsWith('application/json')) {\n const payload = JSON.parse(toUSVString(Buffer.concat(chunks)))\n process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ''}`, statusCode, headers, payload))\n return\n }\n\n if (contentType.startsWith('text/')) {\n const payload = toUSVString(Buffer.concat(chunks))\n process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ''}`, statusCode, headers, payload))\n return\n }\n } catch (err) {\n // Process in a fallback if error\n }\n\n process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ''}`, statusCode, headers))\n}\n\nmodule.exports = { getResolveErrorBodyCallback }\n", "const { addAbortListener } = require('../core/util')\nconst { RequestAbortedError } = require('../core/errors')\n\nconst kListener = Symbol('kListener')\nconst kSignal = Symbol('kSignal')\n\nfunction abort (self) {\n if (self.abort) {\n self.abort()\n } else {\n self.onError(new RequestAbortedError())\n }\n}\n\nfunction addSignal (self, signal) {\n self[kSignal] = null\n self[kListener] = null\n\n if (!signal) {\n return\n }\n\n if (signal.aborted) {\n abort(self)\n return\n }\n\n self[kSignal] = signal\n self[kListener] = () => {\n abort(self)\n }\n\n addAbortListener(self[kSignal], self[kListener])\n}\n\nfunction removeSignal (self) {\n if (!self[kSignal]) {\n return\n }\n\n if ('removeEventListener' in self[kSignal]) {\n self[kSignal].removeEventListener('abort', self[kListener])\n } else {\n self[kSignal].removeListener('abort', self[kListener])\n }\n\n self[kSignal] = null\n self[kListener] = null\n}\n\nmodule.exports = {\n addSignal,\n removeSignal\n}\n", "'use strict'\n\nconst Readable = require('./readable')\nconst {\n InvalidArgumentError,\n RequestAbortedError\n} = require('../core/errors')\nconst util = require('../core/util')\nconst { getResolveErrorBodyCallback } = require('./util')\nconst { AsyncResource } = require('async_hooks')\nconst { addSignal, removeSignal } = require('./abort-signal')\n\nclass RequestHandler extends AsyncResource {\n constructor (opts, callback) {\n if (!opts || typeof opts !== 'object') {\n throw new InvalidArgumentError('invalid opts')\n }\n\n const { signal, method, opaque, body, onInfo, responseHeaders, throwOnError, highWaterMark } = opts\n\n try {\n if (typeof callback !== 'function') {\n throw new InvalidArgumentError('invalid callback')\n }\n\n if (highWaterMark && (typeof highWaterMark !== 'number' || highWaterMark < 0)) {\n throw new InvalidArgumentError('invalid highWaterMark')\n }\n\n if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') {\n throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget')\n }\n\n if (method === 'CONNECT') {\n throw new InvalidArgumentError('invalid method')\n }\n\n if (onInfo && typeof onInfo !== 'function') {\n throw new InvalidArgumentError('invalid onInfo callback')\n }\n\n super('UNDICI_REQUEST')\n } catch (err) {\n if (util.isStream(body)) {\n util.destroy(body.on('error', util.nop), err)\n }\n throw err\n }\n\n this.responseHeaders = responseHeaders || null\n this.opaque = opaque || null\n this.callback = callback\n this.res = null\n this.abort = null\n this.body = body\n this.trailers = {}\n this.context = null\n this.onInfo = onInfo || null\n this.throwOnError = throwOnError\n this.highWaterMark = highWaterMark\n\n if (util.isStream(body)) {\n body.on('error', (err) => {\n this.onError(err)\n })\n }\n\n addSignal(this, signal)\n }\n\n onConnect (abort, context) {\n if (!this.callback) {\n throw new RequestAbortedError()\n }\n\n this.abort = abort\n this.context = context\n }\n\n onHeaders (statusCode, rawHeaders, resume, statusMessage) {\n const { callback, opaque, abort, context, responseHeaders, highWaterMark } = this\n\n const headers = responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders)\n\n if (statusCode < 200) {\n if (this.onInfo) {\n this.onInfo({ statusCode, headers })\n }\n return\n }\n\n const parsedHeaders = responseHeaders === 'raw' ? util.parseHeaders(rawHeaders) : headers\n const contentType = parsedHeaders['content-type']\n const body = new Readable({ resume, abort, contentType, highWaterMark })\n\n this.callback = null\n this.res = body\n if (callback !== null) {\n if (this.throwOnError && statusCode >= 400) {\n this.runInAsyncScope(getResolveErrorBodyCallback, null,\n { callback, body, contentType, statusCode, statusMessage, headers }\n )\n } else {\n this.runInAsyncScope(callback, null, null, {\n statusCode,\n headers,\n trailers: this.trailers,\n opaque,\n body,\n context\n })\n }\n }\n }\n\n onData (chunk) {\n const { res } = this\n return res.push(chunk)\n }\n\n onComplete (trailers) {\n const { res } = this\n\n removeSignal(this)\n\n util.parseHeaders(trailers, this.trailers)\n\n res.push(null)\n }\n\n onError (err) {\n const { res, callback, body, opaque } = this\n\n removeSignal(this)\n\n if (callback) {\n // TODO: Does this need queueMicrotask?\n this.callback = null\n queueMicrotask(() => {\n this.runInAsyncScope(callback, null, err, { opaque })\n })\n }\n\n if (res) {\n this.res = null\n // Ensure all queued handlers are invoked before destroying res.\n queueMicrotask(() => {\n util.destroy(res, err)\n })\n }\n\n if (body) {\n this.body = null\n util.destroy(body, err)\n }\n }\n}\n\nfunction request (opts, callback) {\n if (callback === undefined) {\n return new Promise((resolve, reject) => {\n request.call(this, opts, (err, data) => {\n return err ? reject(err) : resolve(data)\n })\n })\n }\n\n try {\n this.dispatch(opts, new RequestHandler(opts, callback))\n } catch (err) {\n if (typeof callback !== 'function') {\n throw err\n }\n const opaque = opts && opts.opaque\n queueMicrotask(() => callback(err, { opaque }))\n }\n}\n\nmodule.exports = request\nmodule.exports.RequestHandler = RequestHandler\n", "'use strict'\n\nconst { finished, PassThrough } = require('stream')\nconst {\n InvalidArgumentError,\n InvalidReturnValueError,\n RequestAbortedError\n} = require('../core/errors')\nconst util = require('../core/util')\nconst { getResolveErrorBodyCallback } = require('./util')\nconst { AsyncResource } = require('async_hooks')\nconst { addSignal, removeSignal } = require('./abort-signal')\n\nclass StreamHandler extends AsyncResource {\n constructor (opts, factory, callback) {\n if (!opts || typeof opts !== 'object') {\n throw new InvalidArgumentError('invalid opts')\n }\n\n const { signal, method, opaque, body, onInfo, responseHeaders, throwOnError } = opts\n\n try {\n if (typeof callback !== 'function') {\n throw new InvalidArgumentError('invalid callback')\n }\n\n if (typeof factory !== 'function') {\n throw new InvalidArgumentError('invalid factory')\n }\n\n if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') {\n throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget')\n }\n\n if (method === 'CONNECT') {\n throw new InvalidArgumentError('invalid method')\n }\n\n if (onInfo && typeof onInfo !== 'function') {\n throw new InvalidArgumentError('invalid onInfo callback')\n }\n\n super('UNDICI_STREAM')\n } catch (err) {\n if (util.isStream(body)) {\n util.destroy(body.on('error', util.nop), err)\n }\n throw err\n }\n\n this.responseHeaders = responseHeaders || null\n this.opaque = opaque || null\n this.factory = factory\n this.callback = callback\n this.res = null\n this.abort = null\n this.context = null\n this.trailers = null\n this.body = body\n this.onInfo = onInfo || null\n this.throwOnError = throwOnError || false\n\n if (util.isStream(body)) {\n body.on('error', (err) => {\n this.onError(err)\n })\n }\n\n addSignal(this, signal)\n }\n\n onConnect (abort, context) {\n if (!this.callback) {\n throw new RequestAbortedError()\n }\n\n this.abort = abort\n this.context = context\n }\n\n onHeaders (statusCode, rawHeaders, resume, statusMessage) {\n const { factory, opaque, context, callback, responseHeaders } = this\n\n const headers = responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders)\n\n if (statusCode < 200) {\n if (this.onInfo) {\n this.onInfo({ statusCode, headers })\n }\n return\n }\n\n this.factory = null\n\n let res\n\n if (this.throwOnError && statusCode >= 400) {\n const parsedHeaders = responseHeaders === 'raw' ? util.parseHeaders(rawHeaders) : headers\n const contentType = parsedHeaders['content-type']\n res = new PassThrough()\n\n this.callback = null\n this.runInAsyncScope(getResolveErrorBodyCallback, null,\n { callback, body: res, contentType, statusCode, statusMessage, headers }\n )\n } else {\n if (factory === null) {\n return\n }\n\n res = this.runInAsyncScope(factory, null, {\n statusCode,\n headers,\n opaque,\n context\n })\n\n if (\n !res ||\n typeof res.write !== 'function' ||\n typeof res.end !== 'function' ||\n typeof res.on !== 'function'\n ) {\n throw new InvalidReturnValueError('expected Writable')\n }\n\n // TODO: Avoid finished. It registers an unnecessary amount of listeners.\n finished(res, { readable: false }, (err) => {\n const { callback, res, opaque, trailers, abort } = this\n\n this.res = null\n if (err || !res.readable) {\n util.destroy(res, err)\n }\n\n this.callback = null\n this.runInAsyncScope(callback, null, err || null, { opaque, trailers })\n\n if (err) {\n abort()\n }\n })\n }\n\n res.on('drain', resume)\n\n this.res = res\n\n const needDrain = res.writableNeedDrain !== undefined\n ? res.writableNeedDrain\n : res._writableState && res._writableState.needDrain\n\n return needDrain !== true\n }\n\n onData (chunk) {\n const { res } = this\n\n return res ? res.write(chunk) : true\n }\n\n onComplete (trailers) {\n const { res } = this\n\n removeSignal(this)\n\n if (!res) {\n return\n }\n\n this.trailers = util.parseHeaders(trailers)\n\n res.end()\n }\n\n onError (err) {\n const { res, callback, opaque, body } = this\n\n removeSignal(this)\n\n this.factory = null\n\n if (res) {\n this.res = null\n util.destroy(res, err)\n } else if (callback) {\n this.callback = null\n queueMicrotask(() => {\n this.runInAsyncScope(callback, null, err, { opaque })\n })\n }\n\n if (body) {\n this.body = null\n util.destroy(body, err)\n }\n }\n}\n\nfunction stream (opts, factory, callback) {\n if (callback === undefined) {\n return new Promise((resolve, reject) => {\n stream.call(this, opts, factory, (err, data) => {\n return err ? reject(err) : resolve(data)\n })\n })\n }\n\n try {\n this.dispatch(opts, new StreamHandler(opts, factory, callback))\n } catch (err) {\n if (typeof callback !== 'function') {\n throw err\n }\n const opaque = opts && opts.opaque\n queueMicrotask(() => callback(err, { opaque }))\n }\n}\n\nmodule.exports = stream\n", "'use strict'\n\nconst {\n Readable,\n Duplex,\n PassThrough\n} = require('stream')\nconst {\n InvalidArgumentError,\n InvalidReturnValueError,\n RequestAbortedError\n} = require('../core/errors')\nconst util = require('../core/util')\nconst { AsyncResource } = require('async_hooks')\nconst { addSignal, removeSignal } = require('./abort-signal')\nconst assert = require('assert')\n\nconst kResume = Symbol('resume')\n\nclass PipelineRequest extends Readable {\n constructor () {\n super({ autoDestroy: true })\n\n this[kResume] = null\n }\n\n _read () {\n const { [kResume]: resume } = this\n\n if (resume) {\n this[kResume] = null\n resume()\n }\n }\n\n _destroy (err, callback) {\n this._read()\n\n callback(err)\n }\n}\n\nclass PipelineResponse extends Readable {\n constructor (resume) {\n super({ autoDestroy: true })\n this[kResume] = resume\n }\n\n _read () {\n this[kResume]()\n }\n\n _destroy (err, callback) {\n if (!err && !this._readableState.endEmitted) {\n err = new RequestAbortedError()\n }\n\n callback(err)\n }\n}\n\nclass PipelineHandler extends AsyncResource {\n constructor (opts, handler) {\n if (!opts || typeof opts !== 'object') {\n throw new InvalidArgumentError('invalid opts')\n }\n\n if (typeof handler !== 'function') {\n throw new InvalidArgumentError('invalid handler')\n }\n\n const { signal, method, opaque, onInfo, responseHeaders } = opts\n\n if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') {\n throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget')\n }\n\n if (method === 'CONNECT') {\n throw new InvalidArgumentError('invalid method')\n }\n\n if (onInfo && typeof onInfo !== 'function') {\n throw new InvalidArgumentError('invalid onInfo callback')\n }\n\n super('UNDICI_PIPELINE')\n\n this.opaque = opaque || null\n this.responseHeaders = responseHeaders || null\n this.handler = handler\n this.abort = null\n this.context = null\n this.onInfo = onInfo || null\n\n this.req = new PipelineRequest().on('error', util.nop)\n\n this.ret = new Duplex({\n readableObjectMode: opts.objectMode,\n autoDestroy: true,\n read: () => {\n const { body } = this\n\n if (body && body.resume) {\n body.resume()\n }\n },\n write: (chunk, encoding, callback) => {\n const { req } = this\n\n if (req.push(chunk, encoding) || req._readableState.destroyed) {\n callback()\n } else {\n req[kResume] = callback\n }\n },\n destroy: (err, callback) => {\n const { body, req, res, ret, abort } = this\n\n if (!err && !ret._readableState.endEmitted) {\n err = new RequestAbortedError()\n }\n\n if (abort && err) {\n abort()\n }\n\n util.destroy(body, err)\n util.destroy(req, err)\n util.destroy(res, err)\n\n removeSignal(this)\n\n callback(err)\n }\n }).on('prefinish', () => {\n const { req } = this\n\n // Node < 15 does not call _final in same tick.\n req.push(null)\n })\n\n this.res = null\n\n addSignal(this, signal)\n }\n\n onConnect (abort, context) {\n const { ret, res } = this\n\n assert(!res, 'pipeline cannot be retried')\n\n if (ret.destroyed) {\n throw new RequestAbortedError()\n }\n\n this.abort = abort\n this.context = context\n }\n\n onHeaders (statusCode, rawHeaders, resume) {\n const { opaque, handler, context } = this\n\n if (statusCode < 200) {\n if (this.onInfo) {\n const headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders)\n this.onInfo({ statusCode, headers })\n }\n return\n }\n\n this.res = new PipelineResponse(resume)\n\n let body\n try {\n this.handler = null\n const headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders)\n body = this.runInAsyncScope(handler, null, {\n statusCode,\n headers,\n opaque,\n body: this.res,\n context\n })\n } catch (err) {\n this.res.on('error', util.nop)\n throw err\n }\n\n if (!body || typeof body.on !== 'function') {\n throw new InvalidReturnValueError('expected Readable')\n }\n\n body\n .on('data', (chunk) => {\n const { ret, body } = this\n\n if (!ret.push(chunk) && body.pause) {\n body.pause()\n }\n })\n .on('error', (err) => {\n const { ret } = this\n\n util.destroy(ret, err)\n })\n .on('end', () => {\n const { ret } = this\n\n ret.push(null)\n })\n .on('close', () => {\n const { ret } = this\n\n if (!ret._readableState.ended) {\n util.destroy(ret, new RequestAbortedError())\n }\n })\n\n this.body = body\n }\n\n onData (chunk) {\n const { res } = this\n return res.push(chunk)\n }\n\n onComplete (trailers) {\n const { res } = this\n res.push(null)\n }\n\n onError (err) {\n const { ret } = this\n this.handler = null\n util.destroy(ret, err)\n }\n}\n\nfunction pipeline (opts, handler) {\n try {\n const pipelineHandler = new PipelineHandler(opts, handler)\n this.dispatch({ ...opts, body: pipelineHandler.req }, pipelineHandler)\n return pipelineHandler.ret\n } catch (err) {\n return new PassThrough().destroy(err)\n }\n}\n\nmodule.exports = pipeline\n", "'use strict'\n\nconst { InvalidArgumentError, RequestAbortedError, SocketError } = require('../core/errors')\nconst { AsyncResource } = require('async_hooks')\nconst util = require('../core/util')\nconst { addSignal, removeSignal } = require('./abort-signal')\nconst assert = require('assert')\n\nclass UpgradeHandler extends AsyncResource {\n constructor (opts, callback) {\n if (!opts || typeof opts !== 'object') {\n throw new InvalidArgumentError('invalid opts')\n }\n\n if (typeof callback !== 'function') {\n throw new InvalidArgumentError('invalid callback')\n }\n\n const { signal, opaque, responseHeaders } = opts\n\n if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') {\n throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget')\n }\n\n super('UNDICI_UPGRADE')\n\n this.responseHeaders = responseHeaders || null\n this.opaque = opaque || null\n this.callback = callback\n this.abort = null\n this.context = null\n\n addSignal(this, signal)\n }\n\n onConnect (abort, context) {\n if (!this.callback) {\n throw new RequestAbortedError()\n }\n\n this.abort = abort\n this.context = null\n }\n\n onHeaders () {\n throw new SocketError('bad upgrade', null)\n }\n\n onUpgrade (statusCode, rawHeaders, socket) {\n const { callback, opaque, context } = this\n\n assert.strictEqual(statusCode, 101)\n\n removeSignal(this)\n\n this.callback = null\n const headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders)\n this.runInAsyncScope(callback, null, null, {\n headers,\n socket,\n opaque,\n context\n })\n }\n\n onError (err) {\n const { callback, opaque } = this\n\n removeSignal(this)\n\n if (callback) {\n this.callback = null\n queueMicrotask(() => {\n this.runInAsyncScope(callback, null, err, { opaque })\n })\n }\n }\n}\n\nfunction upgrade (opts, callback) {\n if (callback === undefined) {\n return new Promise((resolve, reject) => {\n upgrade.call(this, opts, (err, data) => {\n return err ? reject(err) : resolve(data)\n })\n })\n }\n\n try {\n const upgradeHandler = new UpgradeHandler(opts, callback)\n this.dispatch({\n ...opts,\n method: opts.method || 'GET',\n upgrade: opts.protocol || 'Websocket'\n }, upgradeHandler)\n } catch (err) {\n if (typeof callback !== 'function') {\n throw err\n }\n const opaque = opts && opts.opaque\n queueMicrotask(() => callback(err, { opaque }))\n }\n}\n\nmodule.exports = upgrade\n", "'use strict'\n\nconst { AsyncResource } = require('async_hooks')\nconst { InvalidArgumentError, RequestAbortedError, SocketError } = require('../core/errors')\nconst util = require('../core/util')\nconst { addSignal, removeSignal } = require('./abort-signal')\n\nclass ConnectHandler extends AsyncResource {\n constructor (opts, callback) {\n if (!opts || typeof opts !== 'object') {\n throw new InvalidArgumentError('invalid opts')\n }\n\n if (typeof callback !== 'function') {\n throw new InvalidArgumentError('invalid callback')\n }\n\n const { signal, opaque, responseHeaders } = opts\n\n if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') {\n throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget')\n }\n\n super('UNDICI_CONNECT')\n\n this.opaque = opaque || null\n this.responseHeaders = responseHeaders || null\n this.callback = callback\n this.abort = null\n\n addSignal(this, signal)\n }\n\n onConnect (abort, context) {\n if (!this.callback) {\n throw new RequestAbortedError()\n }\n\n this.abort = abort\n this.context = context\n }\n\n onHeaders () {\n throw new SocketError('bad connect', null)\n }\n\n onUpgrade (statusCode, rawHeaders, socket) {\n const { callback, opaque, context } = this\n\n removeSignal(this)\n\n this.callback = null\n\n let headers = rawHeaders\n // Indicates is an HTTP2Session\n if (headers != null) {\n headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders)\n }\n\n this.runInAsyncScope(callback, null, null, {\n statusCode,\n headers,\n socket,\n opaque,\n context\n })\n }\n\n onError (err) {\n const { callback, opaque } = this\n\n removeSignal(this)\n\n if (callback) {\n this.callback = null\n queueMicrotask(() => {\n this.runInAsyncScope(callback, null, err, { opaque })\n })\n }\n }\n}\n\nfunction connect (opts, callback) {\n if (callback === undefined) {\n return new Promise((resolve, reject) => {\n connect.call(this, opts, (err, data) => {\n return err ? reject(err) : resolve(data)\n })\n })\n }\n\n try {\n const connectHandler = new ConnectHandler(opts, callback)\n this.dispatch({ ...opts, method: 'CONNECT' }, connectHandler)\n } catch (err) {\n if (typeof callback !== 'function') {\n throw err\n }\n const opaque = opts && opts.opaque\n queueMicrotask(() => callback(err, { opaque }))\n }\n}\n\nmodule.exports = connect\n", "'use strict'\n\nmodule.exports.request = require('./api-request')\nmodule.exports.stream = require('./api-stream')\nmodule.exports.pipeline = require('./api-pipeline')\nmodule.exports.upgrade = require('./api-upgrade')\nmodule.exports.connect = require('./api-connect')\n", "'use strict'\n\nconst { UndiciError } = require('../core/errors')\n\nclass MockNotMatchedError extends UndiciError {\n constructor (message) {\n super(message)\n Error.captureStackTrace(this, MockNotMatchedError)\n this.name = 'MockNotMatchedError'\n this.message = message || 'The request does not match any registered mock dispatches'\n this.code = 'UND_MOCK_ERR_MOCK_NOT_MATCHED'\n }\n}\n\nmodule.exports = {\n MockNotMatchedError\n}\n", "'use strict'\n\nmodule.exports = {\n kAgent: Symbol('agent'),\n kOptions: Symbol('options'),\n kFactory: Symbol('factory'),\n kDispatches: Symbol('dispatches'),\n kDispatchKey: Symbol('dispatch key'),\n kDefaultHeaders: Symbol('default headers'),\n kDefaultTrailers: Symbol('default trailers'),\n kContentLength: Symbol('content length'),\n kMockAgent: Symbol('mock agent'),\n kMockAgentSet: Symbol('mock agent set'),\n kMockAgentGet: Symbol('mock agent get'),\n kMockDispatch: Symbol('mock dispatch'),\n kClose: Symbol('close'),\n kOriginalClose: Symbol('original agent close'),\n kOrigin: Symbol('origin'),\n kIsMockActive: Symbol('is mock active'),\n kNetConnect: Symbol('net connect'),\n kGetNetConnect: Symbol('get net connect'),\n kConnected: Symbol('connected')\n}\n", "'use strict'\n\nconst { MockNotMatchedError } = require('./mock-errors')\nconst {\n kDispatches,\n kMockAgent,\n kOriginalDispatch,\n kOrigin,\n kGetNetConnect\n} = require('./mock-symbols')\nconst { buildURL, nop } = require('../core/util')\nconst { STATUS_CODES } = require('http')\nconst {\n types: {\n isPromise\n }\n} = require('util')\n\nfunction matchValue (match, value) {\n if (typeof match === 'string') {\n return match === value\n }\n if (match instanceof RegExp) {\n return match.test(value)\n }\n if (typeof match === 'function') {\n return match(value) === true\n }\n return false\n}\n\nfunction lowerCaseEntries (headers) {\n return Object.fromEntries(\n Object.entries(headers).map(([headerName, headerValue]) => {\n return [headerName.toLocaleLowerCase(), headerValue]\n })\n )\n}\n\n/**\n * @param {import('../../index').Headers|string[]|Record} headers\n * @param {string} key\n */\nfunction getHeaderByName (headers, key) {\n if (Array.isArray(headers)) {\n for (let i = 0; i < headers.length; i += 2) {\n if (headers[i].toLocaleLowerCase() === key.toLocaleLowerCase()) {\n return headers[i + 1]\n }\n }\n\n return undefined\n } else if (typeof headers.get === 'function') {\n return headers.get(key)\n } else {\n return lowerCaseEntries(headers)[key.toLocaleLowerCase()]\n }\n}\n\n/** @param {string[]} headers */\nfunction buildHeadersFromArray (headers) { // fetch HeadersList\n const clone = headers.slice()\n const entries = []\n for (let index = 0; index < clone.length; index += 2) {\n entries.push([clone[index], clone[index + 1]])\n }\n return Object.fromEntries(entries)\n}\n\nfunction matchHeaders (mockDispatch, headers) {\n if (typeof mockDispatch.headers === 'function') {\n if (Array.isArray(headers)) { // fetch HeadersList\n headers = buildHeadersFromArray(headers)\n }\n return mockDispatch.headers(headers ? lowerCaseEntries(headers) : {})\n }\n if (typeof mockDispatch.headers === 'undefined') {\n return true\n }\n if (typeof headers !== 'object' || typeof mockDispatch.headers !== 'object') {\n return false\n }\n\n for (const [matchHeaderName, matchHeaderValue] of Object.entries(mockDispatch.headers)) {\n const headerValue = getHeaderByName(headers, matchHeaderName)\n\n if (!matchValue(matchHeaderValue, headerValue)) {\n return false\n }\n }\n return true\n}\n\nfunction safeUrl (path) {\n if (typeof path !== 'string') {\n return path\n }\n\n const pathSegments = path.split('?')\n\n if (pathSegments.length !== 2) {\n return path\n }\n\n const qp = new URLSearchParams(pathSegments.pop())\n qp.sort()\n return [...pathSegments, qp.toString()].join('?')\n}\n\nfunction matchKey (mockDispatch, { path, method, body, headers }) {\n const pathMatch = matchValue(mockDispatch.path, path)\n const methodMatch = matchValue(mockDispatch.method, method)\n const bodyMatch = typeof mockDispatch.body !== 'undefined' ? matchValue(mockDispatch.body, body) : true\n const headersMatch = matchHeaders(mockDispatch, headers)\n return pathMatch && methodMatch && bodyMatch && headersMatch\n}\n\nfunction getResponseData (data) {\n if (Buffer.isBuffer(data)) {\n return data\n } else if (typeof data === 'object') {\n return JSON.stringify(data)\n } else {\n return data.toString()\n }\n}\n\nfunction getMockDispatch (mockDispatches, key) {\n const basePath = key.query ? buildURL(key.path, key.query) : key.path\n const resolvedPath = typeof basePath === 'string' ? safeUrl(basePath) : basePath\n\n // Match path\n let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path }) => matchValue(safeUrl(path), resolvedPath))\n if (matchedMockDispatches.length === 0) {\n throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`)\n }\n\n // Match method\n matchedMockDispatches = matchedMockDispatches.filter(({ method }) => matchValue(method, key.method))\n if (matchedMockDispatches.length === 0) {\n throw new MockNotMatchedError(`Mock dispatch not matched for method '${key.method}'`)\n }\n\n // Match body\n matchedMockDispatches = matchedMockDispatches.filter(({ body }) => typeof body !== 'undefined' ? matchValue(body, key.body) : true)\n if (matchedMockDispatches.length === 0) {\n throw new MockNotMatchedError(`Mock dispatch not matched for body '${key.body}'`)\n }\n\n // Match headers\n matchedMockDispatches = matchedMockDispatches.filter((mockDispatch) => matchHeaders(mockDispatch, key.headers))\n if (matchedMockDispatches.length === 0) {\n throw new MockNotMatchedError(`Mock dispatch not matched for headers '${typeof key.headers === 'object' ? JSON.stringify(key.headers) : key.headers}'`)\n }\n\n return matchedMockDispatches[0]\n}\n\nfunction addMockDispatch (mockDispatches, key, data) {\n const baseData = { timesInvoked: 0, times: 1, persist: false, consumed: false }\n const replyData = typeof data === 'function' ? { callback: data } : { ...data }\n const newMockDispatch = { ...baseData, ...key, pending: true, data: { error: null, ...replyData } }\n mockDispatches.push(newMockDispatch)\n return newMockDispatch\n}\n\nfunction deleteMockDispatch (mockDispatches, key) {\n const index = mockDispatches.findIndex(dispatch => {\n if (!dispatch.consumed) {\n return false\n }\n return matchKey(dispatch, key)\n })\n if (index !== -1) {\n mockDispatches.splice(index, 1)\n }\n}\n\nfunction buildKey (opts) {\n const { path, method, body, headers, query } = opts\n return {\n path,\n method,\n body,\n headers,\n query\n }\n}\n\nfunction generateKeyValues (data) {\n return Object.entries(data).reduce((keyValuePairs, [key, value]) => [\n ...keyValuePairs,\n Buffer.from(`${key}`),\n Array.isArray(value) ? value.map(x => Buffer.from(`${x}`)) : Buffer.from(`${value}`)\n ], [])\n}\n\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status\n * @param {number} statusCode\n */\nfunction getStatusText (statusCode) {\n return STATUS_CODES[statusCode] || 'unknown'\n}\n\nasync function getResponse (body) {\n const buffers = []\n for await (const data of body) {\n buffers.push(data)\n }\n return Buffer.concat(buffers).toString('utf8')\n}\n\n/**\n * Mock dispatch function used to simulate undici dispatches\n */\nfunction mockDispatch (opts, handler) {\n // Get mock dispatch from built key\n const key = buildKey(opts)\n const mockDispatch = getMockDispatch(this[kDispatches], key)\n\n mockDispatch.timesInvoked++\n\n // Here's where we resolve a callback if a callback is present for the dispatch data.\n if (mockDispatch.data.callback) {\n mockDispatch.data = { ...mockDispatch.data, ...mockDispatch.data.callback(opts) }\n }\n\n // Parse mockDispatch data\n const { data: { statusCode, data, headers, trailers, error }, delay, persist } = mockDispatch\n const { timesInvoked, times } = mockDispatch\n\n // If it's used up and not persistent, mark as consumed\n mockDispatch.consumed = !persist && timesInvoked >= times\n mockDispatch.pending = timesInvoked < times\n\n // If specified, trigger dispatch error\n if (error !== null) {\n deleteMockDispatch(this[kDispatches], key)\n handler.onError(error)\n return true\n }\n\n // Handle the request with a delay if necessary\n if (typeof delay === 'number' && delay > 0) {\n setTimeout(() => {\n handleReply(this[kDispatches])\n }, delay)\n } else {\n handleReply(this[kDispatches])\n }\n\n function handleReply (mockDispatches, _data = data) {\n // fetch's HeadersList is a 1D string array\n const optsHeaders = Array.isArray(opts.headers)\n ? buildHeadersFromArray(opts.headers)\n : opts.headers\n const body = typeof _data === 'function'\n ? _data({ ...opts, headers: optsHeaders })\n : _data\n\n // util.types.isPromise is likely needed for jest.\n if (isPromise(body)) {\n // If handleReply is asynchronous, throwing an error\n // in the callback will reject the promise, rather than\n // synchronously throw the error, which breaks some tests.\n // Rather, we wait for the callback to resolve if it is a\n // promise, and then re-run handleReply with the new body.\n body.then((newData) => handleReply(mockDispatches, newData))\n return\n }\n\n const responseData = getResponseData(body)\n const responseHeaders = generateKeyValues(headers)\n const responseTrailers = generateKeyValues(trailers)\n\n handler.abort = nop\n handler.onHeaders(statusCode, responseHeaders, resume, getStatusText(statusCode))\n handler.onData(Buffer.from(responseData))\n handler.onComplete(responseTrailers)\n deleteMockDispatch(mockDispatches, key)\n }\n\n function resume () {}\n\n return true\n}\n\nfunction buildMockDispatch () {\n const agent = this[kMockAgent]\n const origin = this[kOrigin]\n const originalDispatch = this[kOriginalDispatch]\n\n return function dispatch (opts, handler) {\n if (agent.isMockActive) {\n try {\n mockDispatch.call(this, opts, handler)\n } catch (error) {\n if (error instanceof MockNotMatchedError) {\n const netConnect = agent[kGetNetConnect]()\n if (netConnect === false) {\n throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect disabled)`)\n }\n if (checkNetConnect(netConnect, origin)) {\n originalDispatch.call(this, opts, handler)\n } else {\n throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect is not enabled for this origin)`)\n }\n } else {\n throw error\n }\n }\n } else {\n originalDispatch.call(this, opts, handler)\n }\n }\n}\n\nfunction checkNetConnect (netConnect, origin) {\n const url = new URL(origin)\n if (netConnect === true) {\n return true\n } else if (Array.isArray(netConnect) && netConnect.some((matcher) => matchValue(matcher, url.host))) {\n return true\n }\n return false\n}\n\nfunction buildMockOptions (opts) {\n if (opts) {\n const { agent, ...mockOptions } = opts\n return mockOptions\n }\n}\n\nmodule.exports = {\n getResponseData,\n getMockDispatch,\n addMockDispatch,\n deleteMockDispatch,\n buildKey,\n generateKeyValues,\n matchValue,\n getResponse,\n getStatusText,\n mockDispatch,\n buildMockDispatch,\n checkNetConnect,\n buildMockOptions,\n getHeaderByName\n}\n", "'use strict'\n\nconst { getResponseData, buildKey, addMockDispatch } = require('./mock-utils')\nconst {\n kDispatches,\n kDispatchKey,\n kDefaultHeaders,\n kDefaultTrailers,\n kContentLength,\n kMockDispatch\n} = require('./mock-symbols')\nconst { InvalidArgumentError } = require('../core/errors')\nconst { buildURL } = require('../core/util')\n\n/**\n * Defines the scope API for an interceptor reply\n */\nclass MockScope {\n constructor (mockDispatch) {\n this[kMockDispatch] = mockDispatch\n }\n\n /**\n * Delay a reply by a set amount in ms.\n */\n delay (waitInMs) {\n if (typeof waitInMs !== 'number' || !Number.isInteger(waitInMs) || waitInMs <= 0) {\n throw new InvalidArgumentError('waitInMs must be a valid integer > 0')\n }\n\n this[kMockDispatch].delay = waitInMs\n return this\n }\n\n /**\n * For a defined reply, never mark as consumed.\n */\n persist () {\n this[kMockDispatch].persist = true\n return this\n }\n\n /**\n * Allow one to define a reply for a set amount of matching requests.\n */\n times (repeatTimes) {\n if (typeof repeatTimes !== 'number' || !Number.isInteger(repeatTimes) || repeatTimes <= 0) {\n throw new InvalidArgumentError('repeatTimes must be a valid integer > 0')\n }\n\n this[kMockDispatch].times = repeatTimes\n return this\n }\n}\n\n/**\n * Defines an interceptor for a Mock\n */\nclass MockInterceptor {\n constructor (opts, mockDispatches) {\n if (typeof opts !== 'object') {\n throw new InvalidArgumentError('opts must be an object')\n }\n if (typeof opts.path === 'undefined') {\n throw new InvalidArgumentError('opts.path must be defined')\n }\n if (typeof opts.method === 'undefined') {\n opts.method = 'GET'\n }\n // See https://github.com/nodejs/undici/issues/1245\n // As per RFC 3986, clients are not supposed to send URI\n // fragments to servers when they retrieve a document,\n if (typeof opts.path === 'string') {\n if (opts.query) {\n opts.path = buildURL(opts.path, opts.query)\n } else {\n // Matches https://github.com/nodejs/undici/blob/main/lib/fetch/index.js#L1811\n const parsedURL = new URL(opts.path, 'data://')\n opts.path = parsedURL.pathname + parsedURL.search\n }\n }\n if (typeof opts.method === 'string') {\n opts.method = opts.method.toUpperCase()\n }\n\n this[kDispatchKey] = buildKey(opts)\n this[kDispatches] = mockDispatches\n this[kDefaultHeaders] = {}\n this[kDefaultTrailers] = {}\n this[kContentLength] = false\n }\n\n createMockScopeDispatchData (statusCode, data, responseOptions = {}) {\n const responseData = getResponseData(data)\n const contentLength = this[kContentLength] ? { 'content-length': responseData.length } : {}\n const headers = { ...this[kDefaultHeaders], ...contentLength, ...responseOptions.headers }\n const trailers = { ...this[kDefaultTrailers], ...responseOptions.trailers }\n\n return { statusCode, data, headers, trailers }\n }\n\n validateReplyParameters (statusCode, data, responseOptions) {\n if (typeof statusCode === 'undefined') {\n throw new InvalidArgumentError('statusCode must be defined')\n }\n if (typeof data === 'undefined') {\n throw new InvalidArgumentError('data must be defined')\n }\n if (typeof responseOptions !== 'object') {\n throw new InvalidArgumentError('responseOptions must be an object')\n }\n }\n\n /**\n * Mock an undici request with a defined reply.\n */\n reply (replyData) {\n // Values of reply aren't available right now as they\n // can only be available when the reply callback is invoked.\n if (typeof replyData === 'function') {\n // We'll first wrap the provided callback in another function,\n // this function will properly resolve the data from the callback\n // when invoked.\n const wrappedDefaultsCallback = (opts) => {\n // Our reply options callback contains the parameter for statusCode, data and options.\n const resolvedData = replyData(opts)\n\n // Check if it is in the right format\n if (typeof resolvedData !== 'object') {\n throw new InvalidArgumentError('reply options callback must return an object')\n }\n\n const { statusCode, data = '', responseOptions = {} } = resolvedData\n this.validateReplyParameters(statusCode, data, responseOptions)\n // Since the values can be obtained immediately we return them\n // from this higher order function that will be resolved later.\n return {\n ...this.createMockScopeDispatchData(statusCode, data, responseOptions)\n }\n }\n\n // Add usual dispatch data, but this time set the data parameter to function that will eventually provide data.\n const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], wrappedDefaultsCallback)\n return new MockScope(newMockDispatch)\n }\n\n // We can have either one or three parameters, if we get here,\n // we should have 1-3 parameters. So we spread the arguments of\n // this function to obtain the parameters, since replyData will always\n // just be the statusCode.\n const [statusCode, data = '', responseOptions = {}] = [...arguments]\n this.validateReplyParameters(statusCode, data, responseOptions)\n\n // Send in-already provided data like usual\n const dispatchData = this.createMockScopeDispatchData(statusCode, data, responseOptions)\n const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], dispatchData)\n return new MockScope(newMockDispatch)\n }\n\n /**\n * Mock an undici request with a defined error.\n */\n replyWithError (error) {\n if (typeof error === 'undefined') {\n throw new InvalidArgumentError('error must be defined')\n }\n\n const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], { error })\n return new MockScope(newMockDispatch)\n }\n\n /**\n * Set default reply headers on the interceptor for subsequent replies\n */\n defaultReplyHeaders (headers) {\n if (typeof headers === 'undefined') {\n throw new InvalidArgumentError('headers must be defined')\n }\n\n this[kDefaultHeaders] = headers\n return this\n }\n\n /**\n * Set default reply trailers on the interceptor for subsequent replies\n */\n defaultReplyTrailers (trailers) {\n if (typeof trailers === 'undefined') {\n throw new InvalidArgumentError('trailers must be defined')\n }\n\n this[kDefaultTrailers] = trailers\n return this\n }\n\n /**\n * Set reply content length header for replies on the interceptor\n */\n replyContentLength () {\n this[kContentLength] = true\n return this\n }\n}\n\nmodule.exports.MockInterceptor = MockInterceptor\nmodule.exports.MockScope = MockScope\n", "'use strict'\n\nconst { promisify } = require('util')\nconst Client = require('../client')\nconst { buildMockDispatch } = require('./mock-utils')\nconst {\n kDispatches,\n kMockAgent,\n kClose,\n kOriginalClose,\n kOrigin,\n kOriginalDispatch,\n kConnected\n} = require('./mock-symbols')\nconst { MockInterceptor } = require('./mock-interceptor')\nconst Symbols = require('../core/symbols')\nconst { InvalidArgumentError } = require('../core/errors')\n\n/**\n * MockClient provides an API that extends the Client to influence the mockDispatches.\n */\nclass MockClient extends Client {\n constructor (origin, opts) {\n super(origin, opts)\n\n if (!opts || !opts.agent || typeof opts.agent.dispatch !== 'function') {\n throw new InvalidArgumentError('Argument opts.agent must implement Agent')\n }\n\n this[kMockAgent] = opts.agent\n this[kOrigin] = origin\n this[kDispatches] = []\n this[kConnected] = 1\n this[kOriginalDispatch] = this.dispatch\n this[kOriginalClose] = this.close.bind(this)\n\n this.dispatch = buildMockDispatch.call(this)\n this.close = this[kClose]\n }\n\n get [Symbols.kConnected] () {\n return this[kConnected]\n }\n\n /**\n * Sets up the base interceptor for mocking replies from undici.\n */\n intercept (opts) {\n return new MockInterceptor(opts, this[kDispatches])\n }\n\n async [kClose] () {\n await promisify(this[kOriginalClose])()\n this[kConnected] = 0\n this[kMockAgent][Symbols.kClients].delete(this[kOrigin])\n }\n}\n\nmodule.exports = MockClient\n", "'use strict'\n\nconst { promisify } = require('util')\nconst Pool = require('../pool')\nconst { buildMockDispatch } = require('./mock-utils')\nconst {\n kDispatches,\n kMockAgent,\n kClose,\n kOriginalClose,\n kOrigin,\n kOriginalDispatch,\n kConnected\n} = require('./mock-symbols')\nconst { MockInterceptor } = require('./mock-interceptor')\nconst Symbols = require('../core/symbols')\nconst { InvalidArgumentError } = require('../core/errors')\n\n/**\n * MockPool provides an API that extends the Pool to influence the mockDispatches.\n */\nclass MockPool extends Pool {\n constructor (origin, opts) {\n super(origin, opts)\n\n if (!opts || !opts.agent || typeof opts.agent.dispatch !== 'function') {\n throw new InvalidArgumentError('Argument opts.agent must implement Agent')\n }\n\n this[kMockAgent] = opts.agent\n this[kOrigin] = origin\n this[kDispatches] = []\n this[kConnected] = 1\n this[kOriginalDispatch] = this.dispatch\n this[kOriginalClose] = this.close.bind(this)\n\n this.dispatch = buildMockDispatch.call(this)\n this.close = this[kClose]\n }\n\n get [Symbols.kConnected] () {\n return this[kConnected]\n }\n\n /**\n * Sets up the base interceptor for mocking replies from undici.\n */\n intercept (opts) {\n return new MockInterceptor(opts, this[kDispatches])\n }\n\n async [kClose] () {\n await promisify(this[kOriginalClose])()\n this[kConnected] = 0\n this[kMockAgent][Symbols.kClients].delete(this[kOrigin])\n }\n}\n\nmodule.exports = MockPool\n", "'use strict'\n\nconst singulars = {\n pronoun: 'it',\n is: 'is',\n was: 'was',\n this: 'this'\n}\n\nconst plurals = {\n pronoun: 'they',\n is: 'are',\n was: 'were',\n this: 'these'\n}\n\nmodule.exports = class Pluralizer {\n constructor (singular, plural) {\n this.singular = singular\n this.plural = plural\n }\n\n pluralize (count) {\n const one = count === 1\n const keys = one ? singulars : plurals\n const noun = one ? this.singular : this.plural\n return { ...keys, count, noun }\n }\n}\n", "'use strict'\n\nconst { Transform } = require('stream')\nconst { Console } = require('console')\n\n/**\n * Gets the output of `console.table(\u2026)` as a string.\n */\nmodule.exports = class PendingInterceptorsFormatter {\n constructor ({ disableColors } = {}) {\n this.transform = new Transform({\n transform (chunk, _enc, cb) {\n cb(null, chunk)\n }\n })\n\n this.logger = new Console({\n stdout: this.transform,\n inspectOptions: {\n colors: !disableColors && !process.env.CI\n }\n })\n }\n\n format (pendingInterceptors) {\n const withPrettyHeaders = pendingInterceptors.map(\n ({ method, path, data: { statusCode }, persist, times, timesInvoked, origin }) => ({\n Method: method,\n Origin: origin,\n Path: path,\n 'Status code': statusCode,\n Persistent: persist ? '\u2705' : '\u274C',\n Invocations: timesInvoked,\n Remaining: persist ? Infinity : times - timesInvoked\n }))\n\n this.logger.table(withPrettyHeaders)\n return this.transform.read().toString()\n }\n}\n", "'use strict'\n\nconst { kClients } = require('../core/symbols')\nconst Agent = require('../agent')\nconst {\n kAgent,\n kMockAgentSet,\n kMockAgentGet,\n kDispatches,\n kIsMockActive,\n kNetConnect,\n kGetNetConnect,\n kOptions,\n kFactory\n} = require('./mock-symbols')\nconst MockClient = require('./mock-client')\nconst MockPool = require('./mock-pool')\nconst { matchValue, buildMockOptions } = require('./mock-utils')\nconst { InvalidArgumentError, UndiciError } = require('../core/errors')\nconst Dispatcher = require('../dispatcher')\nconst Pluralizer = require('./pluralizer')\nconst PendingInterceptorsFormatter = require('./pending-interceptors-formatter')\n\nclass FakeWeakRef {\n constructor (value) {\n this.value = value\n }\n\n deref () {\n return this.value\n }\n}\n\nclass MockAgent extends Dispatcher {\n constructor (opts) {\n super(opts)\n\n this[kNetConnect] = true\n this[kIsMockActive] = true\n\n // Instantiate Agent and encapsulate\n if ((opts && opts.agent && typeof opts.agent.dispatch !== 'function')) {\n throw new InvalidArgumentError('Argument opts.agent must implement Agent')\n }\n const agent = opts && opts.agent ? opts.agent : new Agent(opts)\n this[kAgent] = agent\n\n this[kClients] = agent[kClients]\n this[kOptions] = buildMockOptions(opts)\n }\n\n get (origin) {\n let dispatcher = this[kMockAgentGet](origin)\n\n if (!dispatcher) {\n dispatcher = this[kFactory](origin)\n this[kMockAgentSet](origin, dispatcher)\n }\n return dispatcher\n }\n\n dispatch (opts, handler) {\n // Call MockAgent.get to perform additional setup before dispatching as normal\n this.get(opts.origin)\n return this[kAgent].dispatch(opts, handler)\n }\n\n async close () {\n await this[kAgent].close()\n this[kClients].clear()\n }\n\n deactivate () {\n this[kIsMockActive] = false\n }\n\n activate () {\n this[kIsMockActive] = true\n }\n\n enableNetConnect (matcher) {\n if (typeof matcher === 'string' || typeof matcher === 'function' || matcher instanceof RegExp) {\n if (Array.isArray(this[kNetConnect])) {\n this[kNetConnect].push(matcher)\n } else {\n this[kNetConnect] = [matcher]\n }\n } else if (typeof matcher === 'undefined') {\n this[kNetConnect] = true\n } else {\n throw new InvalidArgumentError('Unsupported matcher. Must be one of String|Function|RegExp.')\n }\n }\n\n disableNetConnect () {\n this[kNetConnect] = false\n }\n\n // This is required to bypass issues caused by using global symbols - see:\n // https://github.com/nodejs/undici/issues/1447\n get isMockActive () {\n return this[kIsMockActive]\n }\n\n [kMockAgentSet] (origin, dispatcher) {\n this[kClients].set(origin, new FakeWeakRef(dispatcher))\n }\n\n [kFactory] (origin) {\n const mockOptions = Object.assign({ agent: this }, this[kOptions])\n return this[kOptions] && this[kOptions].connections === 1\n ? new MockClient(origin, mockOptions)\n : new MockPool(origin, mockOptions)\n }\n\n [kMockAgentGet] (origin) {\n // First check if we can immediately find it\n const ref = this[kClients].get(origin)\n if (ref) {\n return ref.deref()\n }\n\n // If the origin is not a string create a dummy parent pool and return to user\n if (typeof origin !== 'string') {\n const dispatcher = this[kFactory]('http://localhost:9999')\n this[kMockAgentSet](origin, dispatcher)\n return dispatcher\n }\n\n // If we match, create a pool and assign the same dispatches\n for (const [keyMatcher, nonExplicitRef] of Array.from(this[kClients])) {\n const nonExplicitDispatcher = nonExplicitRef.deref()\n if (nonExplicitDispatcher && typeof keyMatcher !== 'string' && matchValue(keyMatcher, origin)) {\n const dispatcher = this[kFactory](origin)\n this[kMockAgentSet](origin, dispatcher)\n dispatcher[kDispatches] = nonExplicitDispatcher[kDispatches]\n return dispatcher\n }\n }\n }\n\n [kGetNetConnect] () {\n return this[kNetConnect]\n }\n\n pendingInterceptors () {\n const mockAgentClients = this[kClients]\n\n return Array.from(mockAgentClients.entries())\n .flatMap(([origin, scope]) => scope.deref()[kDispatches].map(dispatch => ({ ...dispatch, origin })))\n .filter(({ pending }) => pending)\n }\n\n assertNoPendingInterceptors ({ pendingInterceptorsFormatter = new PendingInterceptorsFormatter() } = {}) {\n const pending = this.pendingInterceptors()\n\n if (pending.length === 0) {\n return\n }\n\n const pluralizer = new Pluralizer('interceptor', 'interceptors').pluralize(pending.length)\n\n throw new UndiciError(`\n${pluralizer.count} ${pluralizer.noun} ${pluralizer.is} pending:\n\n${pendingInterceptorsFormatter.format(pending)}\n`.trim())\n }\n}\n\nmodule.exports = MockAgent\n", "'use strict'\n\nconst { kProxy, kClose, kDestroy, kInterceptors } = require('./core/symbols')\nconst { URL } = require('url')\nconst Agent = require('./agent')\nconst Pool = require('./pool')\nconst DispatcherBase = require('./dispatcher-base')\nconst { InvalidArgumentError, RequestAbortedError } = require('./core/errors')\nconst buildConnector = require('./core/connect')\n\nconst kAgent = Symbol('proxy agent')\nconst kClient = Symbol('proxy client')\nconst kProxyHeaders = Symbol('proxy headers')\nconst kRequestTls = Symbol('request tls settings')\nconst kProxyTls = Symbol('proxy tls settings')\nconst kConnectEndpoint = Symbol('connect endpoint function')\n\nfunction defaultProtocolPort (protocol) {\n return protocol === 'https:' ? 443 : 80\n}\n\nfunction buildProxyOptions (opts) {\n if (typeof opts === 'string') {\n opts = { uri: opts }\n }\n\n if (!opts || !opts.uri) {\n throw new InvalidArgumentError('Proxy opts.uri is mandatory')\n }\n\n return {\n uri: opts.uri,\n protocol: opts.protocol || 'https'\n }\n}\n\nfunction defaultFactory (origin, opts) {\n return new Pool(origin, opts)\n}\n\nclass ProxyAgent extends DispatcherBase {\n constructor (opts) {\n super(opts)\n this[kProxy] = buildProxyOptions(opts)\n this[kAgent] = new Agent(opts)\n this[kInterceptors] = opts.interceptors && opts.interceptors.ProxyAgent && Array.isArray(opts.interceptors.ProxyAgent)\n ? opts.interceptors.ProxyAgent\n : []\n\n if (typeof opts === 'string') {\n opts = { uri: opts }\n }\n\n if (!opts || !opts.uri) {\n throw new InvalidArgumentError('Proxy opts.uri is mandatory')\n }\n\n const { clientFactory = defaultFactory } = opts\n\n if (typeof clientFactory !== 'function') {\n throw new InvalidArgumentError('Proxy opts.clientFactory must be a function.')\n }\n\n this[kRequestTls] = opts.requestTls\n this[kProxyTls] = opts.proxyTls\n this[kProxyHeaders] = opts.headers || {}\n\n const resolvedUrl = new URL(opts.uri)\n const { origin, port, host, username, password } = resolvedUrl\n\n if (opts.auth && opts.token) {\n throw new InvalidArgumentError('opts.auth cannot be used in combination with opts.token')\n } else if (opts.auth) {\n /* @deprecated in favour of opts.token */\n this[kProxyHeaders]['proxy-authorization'] = `Basic ${opts.auth}`\n } else if (opts.token) {\n this[kProxyHeaders]['proxy-authorization'] = opts.token\n } else if (username && password) {\n this[kProxyHeaders]['proxy-authorization'] = `Basic ${Buffer.from(`${decodeURIComponent(username)}:${decodeURIComponent(password)}`).toString('base64')}`\n }\n\n const connect = buildConnector({ ...opts.proxyTls })\n this[kConnectEndpoint] = buildConnector({ ...opts.requestTls })\n this[kClient] = clientFactory(resolvedUrl, { connect })\n this[kAgent] = new Agent({\n ...opts,\n connect: async (opts, callback) => {\n let requestedHost = opts.host\n if (!opts.port) {\n requestedHost += `:${defaultProtocolPort(opts.protocol)}`\n }\n try {\n const { socket, statusCode } = await this[kClient].connect({\n origin,\n port,\n path: requestedHost,\n signal: opts.signal,\n headers: {\n ...this[kProxyHeaders],\n host\n }\n })\n if (statusCode !== 200) {\n socket.on('error', () => {}).destroy()\n callback(new RequestAbortedError(`Proxy response (${statusCode}) !== 200 when HTTP Tunneling`))\n }\n if (opts.protocol !== 'https:') {\n callback(null, socket)\n return\n }\n let servername\n if (this[kRequestTls]) {\n servername = this[kRequestTls].servername\n } else {\n servername = opts.servername\n }\n this[kConnectEndpoint]({ ...opts, servername, httpSocket: socket }, callback)\n } catch (err) {\n callback(err)\n }\n }\n })\n }\n\n dispatch (opts, handler) {\n const { host } = new URL(opts.origin)\n const headers = buildHeaders(opts.headers)\n throwIfProxyAuthIsSent(headers)\n return this[kAgent].dispatch(\n {\n ...opts,\n headers: {\n ...headers,\n host\n }\n },\n handler\n )\n }\n\n async [kClose] () {\n await this[kAgent].close()\n await this[kClient].close()\n }\n\n async [kDestroy] () {\n await this[kAgent].destroy()\n await this[kClient].destroy()\n }\n}\n\n/**\n * @param {string[] | Record} headers\n * @returns {Record}\n */\nfunction buildHeaders (headers) {\n // When using undici.fetch, the headers list is stored\n // as an array.\n if (Array.isArray(headers)) {\n /** @type {Record} */\n const headersPair = {}\n\n for (let i = 0; i < headers.length; i += 2) {\n headersPair[headers[i]] = headers[i + 1]\n }\n\n return headersPair\n }\n\n return headers\n}\n\n/**\n * @param {Record} headers\n *\n * Previous versions of ProxyAgent suggests the Proxy-Authorization in request headers\n * Nevertheless, it was changed and to avoid a security vulnerability by end users\n * this check was created.\n * It should be removed in the next major version for performance reasons\n */\nfunction throwIfProxyAuthIsSent (headers) {\n const existProxyAuth = headers && Object.keys(headers)\n .find((key) => key.toLowerCase() === 'proxy-authorization')\n if (existProxyAuth) {\n throw new InvalidArgumentError('Proxy-Authorization should be sent in ProxyAgent constructor')\n }\n}\n\nmodule.exports = ProxyAgent\n", "const assert = require('assert')\n\nconst { kRetryHandlerDefaultRetry } = require('../core/symbols')\nconst { RequestRetryError } = require('../core/errors')\nconst { isDisturbed, parseHeaders, parseRangeHeader } = require('../core/util')\n\nfunction calculateRetryAfterHeader (retryAfter) {\n const current = Date.now()\n const diff = new Date(retryAfter).getTime() - current\n\n return diff\n}\n\nclass RetryHandler {\n constructor (opts, handlers) {\n const { retryOptions, ...dispatchOpts } = opts\n const {\n // Retry scoped\n retry: retryFn,\n maxRetries,\n maxTimeout,\n minTimeout,\n timeoutFactor,\n // Response scoped\n methods,\n errorCodes,\n retryAfter,\n statusCodes\n } = retryOptions ?? {}\n\n this.dispatch = handlers.dispatch\n this.handler = handlers.handler\n this.opts = dispatchOpts\n this.abort = null\n this.aborted = false\n this.retryOpts = {\n retry: retryFn ?? RetryHandler[kRetryHandlerDefaultRetry],\n retryAfter: retryAfter ?? true,\n maxTimeout: maxTimeout ?? 30 * 1000, // 30s,\n timeout: minTimeout ?? 500, // .5s\n timeoutFactor: timeoutFactor ?? 2,\n maxRetries: maxRetries ?? 5,\n // What errors we should retry\n methods: methods ?? ['GET', 'HEAD', 'OPTIONS', 'PUT', 'DELETE', 'TRACE'],\n // Indicates which errors to retry\n statusCodes: statusCodes ?? [500, 502, 503, 504, 429],\n // List of errors to retry\n errorCodes: errorCodes ?? [\n 'ECONNRESET',\n 'ECONNREFUSED',\n 'ENOTFOUND',\n 'ENETDOWN',\n 'ENETUNREACH',\n 'EHOSTDOWN',\n 'EHOSTUNREACH',\n 'EPIPE'\n ]\n }\n\n this.retryCount = 0\n this.start = 0\n this.end = null\n this.etag = null\n this.resume = null\n\n // Handle possible onConnect duplication\n this.handler.onConnect(reason => {\n this.aborted = true\n if (this.abort) {\n this.abort(reason)\n } else {\n this.reason = reason\n }\n })\n }\n\n onRequestSent () {\n if (this.handler.onRequestSent) {\n this.handler.onRequestSent()\n }\n }\n\n onUpgrade (statusCode, headers, socket) {\n if (this.handler.onUpgrade) {\n this.handler.onUpgrade(statusCode, headers, socket)\n }\n }\n\n onConnect (abort) {\n if (this.aborted) {\n abort(this.reason)\n } else {\n this.abort = abort\n }\n }\n\n onBodySent (chunk) {\n if (this.handler.onBodySent) return this.handler.onBodySent(chunk)\n }\n\n static [kRetryHandlerDefaultRetry] (err, { state, opts }, cb) {\n const { statusCode, code, headers } = err\n const { method, retryOptions } = opts\n const {\n maxRetries,\n timeout,\n maxTimeout,\n timeoutFactor,\n statusCodes,\n errorCodes,\n methods\n } = retryOptions\n let { counter, currentTimeout } = state\n\n currentTimeout =\n currentTimeout != null && currentTimeout > 0 ? currentTimeout : timeout\n\n // Any code that is not a Undici's originated and allowed to retry\n if (\n code &&\n code !== 'UND_ERR_REQ_RETRY' &&\n code !== 'UND_ERR_SOCKET' &&\n !errorCodes.includes(code)\n ) {\n cb(err)\n return\n }\n\n // If a set of method are provided and the current method is not in the list\n if (Array.isArray(methods) && !methods.includes(method)) {\n cb(err)\n return\n }\n\n // If a set of status code are provided and the current status code is not in the list\n if (\n statusCode != null &&\n Array.isArray(statusCodes) &&\n !statusCodes.includes(statusCode)\n ) {\n cb(err)\n return\n }\n\n // If we reached the max number of retries\n if (counter > maxRetries) {\n cb(err)\n return\n }\n\n let retryAfterHeader = headers != null && headers['retry-after']\n if (retryAfterHeader) {\n retryAfterHeader = Number(retryAfterHeader)\n retryAfterHeader = isNaN(retryAfterHeader)\n ? calculateRetryAfterHeader(retryAfterHeader)\n : retryAfterHeader * 1e3 // Retry-After is in seconds\n }\n\n const retryTimeout =\n retryAfterHeader > 0\n ? Math.min(retryAfterHeader, maxTimeout)\n : Math.min(currentTimeout * timeoutFactor ** counter, maxTimeout)\n\n state.currentTimeout = retryTimeout\n\n setTimeout(() => cb(null), retryTimeout)\n }\n\n onHeaders (statusCode, rawHeaders, resume, statusMessage) {\n const headers = parseHeaders(rawHeaders)\n\n this.retryCount += 1\n\n if (statusCode >= 300) {\n this.abort(\n new RequestRetryError('Request failed', statusCode, {\n headers,\n count: this.retryCount\n })\n )\n return false\n }\n\n // Checkpoint for resume from where we left it\n if (this.resume != null) {\n this.resume = null\n\n if (statusCode !== 206) {\n return true\n }\n\n const contentRange = parseRangeHeader(headers['content-range'])\n // If no content range\n if (!contentRange) {\n this.abort(\n new RequestRetryError('Content-Range mismatch', statusCode, {\n headers,\n count: this.retryCount\n })\n )\n return false\n }\n\n // Let's start with a weak etag check\n if (this.etag != null && this.etag !== headers.etag) {\n this.abort(\n new RequestRetryError('ETag mismatch', statusCode, {\n headers,\n count: this.retryCount\n })\n )\n return false\n }\n\n const { start, size, end = size } = contentRange\n\n assert(this.start === start, 'content-range mismatch')\n assert(this.end == null || this.end === end, 'content-range mismatch')\n\n this.resume = resume\n return true\n }\n\n if (this.end == null) {\n if (statusCode === 206) {\n // First time we receive 206\n const range = parseRangeHeader(headers['content-range'])\n\n if (range == null) {\n return this.handler.onHeaders(\n statusCode,\n rawHeaders,\n resume,\n statusMessage\n )\n }\n\n const { start, size, end = size } = range\n\n assert(\n start != null && Number.isFinite(start) && this.start !== start,\n 'content-range mismatch'\n )\n assert(Number.isFinite(start))\n assert(\n end != null && Number.isFinite(end) && this.end !== end,\n 'invalid content-length'\n )\n\n this.start = start\n this.end = end\n }\n\n // We make our best to checkpoint the body for further range headers\n if (this.end == null) {\n const contentLength = headers['content-length']\n this.end = contentLength != null ? Number(contentLength) : null\n }\n\n assert(Number.isFinite(this.start))\n assert(\n this.end == null || Number.isFinite(this.end),\n 'invalid content-length'\n )\n\n this.resume = resume\n this.etag = headers.etag != null ? headers.etag : null\n\n return this.handler.onHeaders(\n statusCode,\n rawHeaders,\n resume,\n statusMessage\n )\n }\n\n const err = new RequestRetryError('Request failed', statusCode, {\n headers,\n count: this.retryCount\n })\n\n this.abort(err)\n\n return false\n }\n\n onData (chunk) {\n this.start += chunk.length\n\n return this.handler.onData(chunk)\n }\n\n onComplete (rawTrailers) {\n this.retryCount = 0\n return this.handler.onComplete(rawTrailers)\n }\n\n onError (err) {\n if (this.aborted || isDisturbed(this.opts.body)) {\n return this.handler.onError(err)\n }\n\n this.retryOpts.retry(\n err,\n {\n state: { counter: this.retryCount++, currentTimeout: this.retryAfter },\n opts: { retryOptions: this.retryOpts, ...this.opts }\n },\n onRetry.bind(this)\n )\n\n function onRetry (err) {\n if (err != null || this.aborted || isDisturbed(this.opts.body)) {\n return this.handler.onError(err)\n }\n\n if (this.start !== 0) {\n this.opts = {\n ...this.opts,\n headers: {\n ...this.opts.headers,\n range: `bytes=${this.start}-${this.end ?? ''}`\n }\n }\n }\n\n try {\n this.dispatch(this.opts, this)\n } catch (err) {\n this.handler.onError(err)\n }\n }\n }\n}\n\nmodule.exports = RetryHandler\n", "'use strict'\n\n// We include a version number for the Dispatcher API. In case of breaking changes,\n// this version number must be increased to avoid conflicts.\nconst globalDispatcher = Symbol.for('undici.globalDispatcher.1')\nconst { InvalidArgumentError } = require('./core/errors')\nconst Agent = require('./agent')\n\nif (getGlobalDispatcher() === undefined) {\n setGlobalDispatcher(new Agent())\n}\n\nfunction setGlobalDispatcher (agent) {\n if (!agent || typeof agent.dispatch !== 'function') {\n throw new InvalidArgumentError('Argument agent must implement Agent')\n }\n Object.defineProperty(globalThis, globalDispatcher, {\n value: agent,\n writable: true,\n enumerable: false,\n configurable: false\n })\n}\n\nfunction getGlobalDispatcher () {\n return globalThis[globalDispatcher]\n}\n\nmodule.exports = {\n setGlobalDispatcher,\n getGlobalDispatcher\n}\n", "'use strict'\n\nmodule.exports = class DecoratorHandler {\n constructor (handler) {\n this.handler = handler\n }\n\n onConnect (...args) {\n return this.handler.onConnect(...args)\n }\n\n onError (...args) {\n return this.handler.onError(...args)\n }\n\n onUpgrade (...args) {\n return this.handler.onUpgrade(...args)\n }\n\n onHeaders (...args) {\n return this.handler.onHeaders(...args)\n }\n\n onData (...args) {\n return this.handler.onData(...args)\n }\n\n onComplete (...args) {\n return this.handler.onComplete(...args)\n }\n\n onBodySent (...args) {\n return this.handler.onBodySent(...args)\n }\n}\n", "// https://github.com/Ethan-Arrowood/undici-fetch\n\n'use strict'\n\nconst { kHeadersList, kConstruct } = require('../core/symbols')\nconst { kGuard } = require('./symbols')\nconst { kEnumerableProperty } = require('../core/util')\nconst {\n makeIterator,\n isValidHeaderName,\n isValidHeaderValue\n} = require('./util')\nconst { webidl } = require('./webidl')\nconst assert = require('assert')\n\nconst kHeadersMap = Symbol('headers map')\nconst kHeadersSortedMap = Symbol('headers map sorted')\n\n/**\n * @param {number} code\n */\nfunction isHTTPWhiteSpaceCharCode (code) {\n return code === 0x00a || code === 0x00d || code === 0x009 || code === 0x020\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#concept-header-value-normalize\n * @param {string} potentialValue\n */\nfunction headerValueNormalize (potentialValue) {\n // To normalize a byte sequence potentialValue, remove\n // any leading and trailing HTTP whitespace bytes from\n // potentialValue.\n let i = 0; let j = potentialValue.length\n\n while (j > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(j - 1))) --j\n while (j > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(i))) ++i\n\n return i === 0 && j === potentialValue.length ? potentialValue : potentialValue.substring(i, j)\n}\n\nfunction fill (headers, object) {\n // To fill a Headers object headers with a given object object, run these steps:\n\n // 1. If object is a sequence, then for each header in object:\n // Note: webidl conversion to array has already been done.\n if (Array.isArray(object)) {\n for (let i = 0; i < object.length; ++i) {\n const header = object[i]\n // 1. If header does not contain exactly two items, then throw a TypeError.\n if (header.length !== 2) {\n throw webidl.errors.exception({\n header: 'Headers constructor',\n message: `expected name/value pair to be length 2, found ${header.length}.`\n })\n }\n\n // 2. Append (header\u2019s first item, header\u2019s second item) to headers.\n appendHeader(headers, header[0], header[1])\n }\n } else if (typeof object === 'object' && object !== null) {\n // Note: null should throw\n\n // 2. Otherwise, object is a record, then for each key \u2192 value in object,\n // append (key, value) to headers\n const keys = Object.keys(object)\n for (let i = 0; i < keys.length; ++i) {\n appendHeader(headers, keys[i], object[keys[i]])\n }\n } else {\n throw webidl.errors.conversionFailed({\n prefix: 'Headers constructor',\n argument: 'Argument 1',\n types: ['sequence>', 'record']\n })\n }\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#concept-headers-append\n */\nfunction appendHeader (headers, name, value) {\n // 1. Normalize value.\n value = headerValueNormalize(value)\n\n // 2. If name is not a header name or value is not a\n // header value, then throw a TypeError.\n if (!isValidHeaderName(name)) {\n throw webidl.errors.invalidArgument({\n prefix: 'Headers.append',\n value: name,\n type: 'header name'\n })\n } else if (!isValidHeaderValue(value)) {\n throw webidl.errors.invalidArgument({\n prefix: 'Headers.append',\n value,\n type: 'header value'\n })\n }\n\n // 3. If headers\u2019s guard is \"immutable\", then throw a TypeError.\n // 4. Otherwise, if headers\u2019s guard is \"request\" and name is a\n // forbidden header name, return.\n // Note: undici does not implement forbidden header names\n if (headers[kGuard] === 'immutable') {\n throw new TypeError('immutable')\n } else if (headers[kGuard] === 'request-no-cors') {\n // 5. Otherwise, if headers\u2019s guard is \"request-no-cors\":\n // TODO\n }\n\n // 6. Otherwise, if headers\u2019s guard is \"response\" and name is a\n // forbidden response-header name, return.\n\n // 7. Append (name, value) to headers\u2019s header list.\n return headers[kHeadersList].append(name, value)\n\n // 8. If headers\u2019s guard is \"request-no-cors\", then remove\n // privileged no-CORS request headers from headers\n}\n\nclass HeadersList {\n /** @type {[string, string][]|null} */\n cookies = null\n\n constructor (init) {\n if (init instanceof HeadersList) {\n this[kHeadersMap] = new Map(init[kHeadersMap])\n this[kHeadersSortedMap] = init[kHeadersSortedMap]\n this.cookies = init.cookies === null ? null : [...init.cookies]\n } else {\n this[kHeadersMap] = new Map(init)\n this[kHeadersSortedMap] = null\n }\n }\n\n // https://fetch.spec.whatwg.org/#header-list-contains\n contains (name) {\n // A header list list contains a header name name if list\n // contains a header whose name is a byte-case-insensitive\n // match for name.\n name = name.toLowerCase()\n\n return this[kHeadersMap].has(name)\n }\n\n clear () {\n this[kHeadersMap].clear()\n this[kHeadersSortedMap] = null\n this.cookies = null\n }\n\n // https://fetch.spec.whatwg.org/#concept-header-list-append\n append (name, value) {\n this[kHeadersSortedMap] = null\n\n // 1. If list contains name, then set name to the first such\n // header\u2019s name.\n const lowercaseName = name.toLowerCase()\n const exists = this[kHeadersMap].get(lowercaseName)\n\n // 2. Append (name, value) to list.\n if (exists) {\n const delimiter = lowercaseName === 'cookie' ? '; ' : ', '\n this[kHeadersMap].set(lowercaseName, {\n name: exists.name,\n value: `${exists.value}${delimiter}${value}`\n })\n } else {\n this[kHeadersMap].set(lowercaseName, { name, value })\n }\n\n if (lowercaseName === 'set-cookie') {\n this.cookies ??= []\n this.cookies.push(value)\n }\n }\n\n // https://fetch.spec.whatwg.org/#concept-header-list-set\n set (name, value) {\n this[kHeadersSortedMap] = null\n const lowercaseName = name.toLowerCase()\n\n if (lowercaseName === 'set-cookie') {\n this.cookies = [value]\n }\n\n // 1. If list contains name, then set the value of\n // the first such header to value and remove the\n // others.\n // 2. Otherwise, append header (name, value) to list.\n this[kHeadersMap].set(lowercaseName, { name, value })\n }\n\n // https://fetch.spec.whatwg.org/#concept-header-list-delete\n delete (name) {\n this[kHeadersSortedMap] = null\n\n name = name.toLowerCase()\n\n if (name === 'set-cookie') {\n this.cookies = null\n }\n\n this[kHeadersMap].delete(name)\n }\n\n // https://fetch.spec.whatwg.org/#concept-header-list-get\n get (name) {\n const value = this[kHeadersMap].get(name.toLowerCase())\n\n // 1. If list does not contain name, then return null.\n // 2. Return the values of all headers in list whose name\n // is a byte-case-insensitive match for name,\n // separated from each other by 0x2C 0x20, in order.\n return value === undefined ? null : value.value\n }\n\n * [Symbol.iterator] () {\n // use the lowercased name\n for (const [name, { value }] of this[kHeadersMap]) {\n yield [name, value]\n }\n }\n\n get entries () {\n const headers = {}\n\n if (this[kHeadersMap].size) {\n for (const { name, value } of this[kHeadersMap].values()) {\n headers[name] = value\n }\n }\n\n return headers\n }\n}\n\n// https://fetch.spec.whatwg.org/#headers-class\nclass Headers {\n constructor (init = undefined) {\n if (init === kConstruct) {\n return\n }\n this[kHeadersList] = new HeadersList()\n\n // The new Headers(init) constructor steps are:\n\n // 1. Set this\u2019s guard to \"none\".\n this[kGuard] = 'none'\n\n // 2. If init is given, then fill this with init.\n if (init !== undefined) {\n init = webidl.converters.HeadersInit(init)\n fill(this, init)\n }\n }\n\n // https://fetch.spec.whatwg.org/#dom-headers-append\n append (name, value) {\n webidl.brandCheck(this, Headers)\n\n webidl.argumentLengthCheck(arguments, 2, { header: 'Headers.append' })\n\n name = webidl.converters.ByteString(name)\n value = webidl.converters.ByteString(value)\n\n return appendHeader(this, name, value)\n }\n\n // https://fetch.spec.whatwg.org/#dom-headers-delete\n delete (name) {\n webidl.brandCheck(this, Headers)\n\n webidl.argumentLengthCheck(arguments, 1, { header: 'Headers.delete' })\n\n name = webidl.converters.ByteString(name)\n\n // 1. If name is not a header name, then throw a TypeError.\n if (!isValidHeaderName(name)) {\n throw webidl.errors.invalidArgument({\n prefix: 'Headers.delete',\n value: name,\n type: 'header name'\n })\n }\n\n // 2. If this\u2019s guard is \"immutable\", then throw a TypeError.\n // 3. Otherwise, if this\u2019s guard is \"request\" and name is a\n // forbidden header name, return.\n // 4. Otherwise, if this\u2019s guard is \"request-no-cors\", name\n // is not a no-CORS-safelisted request-header name, and\n // name is not a privileged no-CORS request-header name,\n // return.\n // 5. Otherwise, if this\u2019s guard is \"response\" and name is\n // a forbidden response-header name, return.\n // Note: undici does not implement forbidden header names\n if (this[kGuard] === 'immutable') {\n throw new TypeError('immutable')\n } else if (this[kGuard] === 'request-no-cors') {\n // TODO\n }\n\n // 6. If this\u2019s header list does not contain name, then\n // return.\n if (!this[kHeadersList].contains(name)) {\n return\n }\n\n // 7. Delete name from this\u2019s header list.\n // 8. If this\u2019s guard is \"request-no-cors\", then remove\n // privileged no-CORS request headers from this.\n this[kHeadersList].delete(name)\n }\n\n // https://fetch.spec.whatwg.org/#dom-headers-get\n get (name) {\n webidl.brandCheck(this, Headers)\n\n webidl.argumentLengthCheck(arguments, 1, { header: 'Headers.get' })\n\n name = webidl.converters.ByteString(name)\n\n // 1. If name is not a header name, then throw a TypeError.\n if (!isValidHeaderName(name)) {\n throw webidl.errors.invalidArgument({\n prefix: 'Headers.get',\n value: name,\n type: 'header name'\n })\n }\n\n // 2. Return the result of getting name from this\u2019s header\n // list.\n return this[kHeadersList].get(name)\n }\n\n // https://fetch.spec.whatwg.org/#dom-headers-has\n has (name) {\n webidl.brandCheck(this, Headers)\n\n webidl.argumentLengthCheck(arguments, 1, { header: 'Headers.has' })\n\n name = webidl.converters.ByteString(name)\n\n // 1. If name is not a header name, then throw a TypeError.\n if (!isValidHeaderName(name)) {\n throw webidl.errors.invalidArgument({\n prefix: 'Headers.has',\n value: name,\n type: 'header name'\n })\n }\n\n // 2. Return true if this\u2019s header list contains name;\n // otherwise false.\n return this[kHeadersList].contains(name)\n }\n\n // https://fetch.spec.whatwg.org/#dom-headers-set\n set (name, value) {\n webidl.brandCheck(this, Headers)\n\n webidl.argumentLengthCheck(arguments, 2, { header: 'Headers.set' })\n\n name = webidl.converters.ByteString(name)\n value = webidl.converters.ByteString(value)\n\n // 1. Normalize value.\n value = headerValueNormalize(value)\n\n // 2. If name is not a header name or value is not a\n // header value, then throw a TypeError.\n if (!isValidHeaderName(name)) {\n throw webidl.errors.invalidArgument({\n prefix: 'Headers.set',\n value: name,\n type: 'header name'\n })\n } else if (!isValidHeaderValue(value)) {\n throw webidl.errors.invalidArgument({\n prefix: 'Headers.set',\n value,\n type: 'header value'\n })\n }\n\n // 3. If this\u2019s guard is \"immutable\", then throw a TypeError.\n // 4. Otherwise, if this\u2019s guard is \"request\" and name is a\n // forbidden header name, return.\n // 5. Otherwise, if this\u2019s guard is \"request-no-cors\" and\n // name/value is not a no-CORS-safelisted request-header,\n // return.\n // 6. Otherwise, if this\u2019s guard is \"response\" and name is a\n // forbidden response-header name, return.\n // Note: undici does not implement forbidden header names\n if (this[kGuard] === 'immutable') {\n throw new TypeError('immutable')\n } else if (this[kGuard] === 'request-no-cors') {\n // TODO\n }\n\n // 7. Set (name, value) in this\u2019s header list.\n // 8. If this\u2019s guard is \"request-no-cors\", then remove\n // privileged no-CORS request headers from this\n this[kHeadersList].set(name, value)\n }\n\n // https://fetch.spec.whatwg.org/#dom-headers-getsetcookie\n getSetCookie () {\n webidl.brandCheck(this, Headers)\n\n // 1. If this\u2019s header list does not contain `Set-Cookie`, then return \u00AB \u00BB.\n // 2. Return the values of all headers in this\u2019s header list whose name is\n // a byte-case-insensitive match for `Set-Cookie`, in order.\n\n const list = this[kHeadersList].cookies\n\n if (list) {\n return [...list]\n }\n\n return []\n }\n\n // https://fetch.spec.whatwg.org/#concept-header-list-sort-and-combine\n get [kHeadersSortedMap] () {\n if (this[kHeadersList][kHeadersSortedMap]) {\n return this[kHeadersList][kHeadersSortedMap]\n }\n\n // 1. Let headers be an empty list of headers with the key being the name\n // and value the value.\n const headers = []\n\n // 2. Let names be the result of convert header names to a sorted-lowercase\n // set with all the names of the headers in list.\n const names = [...this[kHeadersList]].sort((a, b) => a[0] < b[0] ? -1 : 1)\n const cookies = this[kHeadersList].cookies\n\n // 3. For each name of names:\n for (let i = 0; i < names.length; ++i) {\n const [name, value] = names[i]\n // 1. If name is `set-cookie`, then:\n if (name === 'set-cookie') {\n // 1. Let values be a list of all values of headers in list whose name\n // is a byte-case-insensitive match for name, in order.\n\n // 2. For each value of values:\n // 1. Append (name, value) to headers.\n for (let j = 0; j < cookies.length; ++j) {\n headers.push([name, cookies[j]])\n }\n } else {\n // 2. Otherwise:\n\n // 1. Let value be the result of getting name from list.\n\n // 2. Assert: value is non-null.\n assert(value !== null)\n\n // 3. Append (name, value) to headers.\n headers.push([name, value])\n }\n }\n\n this[kHeadersList][kHeadersSortedMap] = headers\n\n // 4. Return headers.\n return headers\n }\n\n keys () {\n webidl.brandCheck(this, Headers)\n\n if (this[kGuard] === 'immutable') {\n const value = this[kHeadersSortedMap]\n return makeIterator(() => value, 'Headers',\n 'key')\n }\n\n return makeIterator(\n () => [...this[kHeadersSortedMap].values()],\n 'Headers',\n 'key'\n )\n }\n\n values () {\n webidl.brandCheck(this, Headers)\n\n if (this[kGuard] === 'immutable') {\n const value = this[kHeadersSortedMap]\n return makeIterator(() => value, 'Headers',\n 'value')\n }\n\n return makeIterator(\n () => [...this[kHeadersSortedMap].values()],\n 'Headers',\n 'value'\n )\n }\n\n entries () {\n webidl.brandCheck(this, Headers)\n\n if (this[kGuard] === 'immutable') {\n const value = this[kHeadersSortedMap]\n return makeIterator(() => value, 'Headers',\n 'key+value')\n }\n\n return makeIterator(\n () => [...this[kHeadersSortedMap].values()],\n 'Headers',\n 'key+value'\n )\n }\n\n /**\n * @param {(value: string, key: string, self: Headers) => void} callbackFn\n * @param {unknown} thisArg\n */\n forEach (callbackFn, thisArg = globalThis) {\n webidl.brandCheck(this, Headers)\n\n webidl.argumentLengthCheck(arguments, 1, { header: 'Headers.forEach' })\n\n if (typeof callbackFn !== 'function') {\n throw new TypeError(\n \"Failed to execute 'forEach' on 'Headers': parameter 1 is not of type 'Function'.\"\n )\n }\n\n for (const [key, value] of this) {\n callbackFn.apply(thisArg, [value, key, this])\n }\n }\n\n [Symbol.for('nodejs.util.inspect.custom')] () {\n webidl.brandCheck(this, Headers)\n\n return this[kHeadersList]\n }\n}\n\nHeaders.prototype[Symbol.iterator] = Headers.prototype.entries\n\nObject.defineProperties(Headers.prototype, {\n append: kEnumerableProperty,\n delete: kEnumerableProperty,\n get: kEnumerableProperty,\n has: kEnumerableProperty,\n set: kEnumerableProperty,\n getSetCookie: kEnumerableProperty,\n keys: kEnumerableProperty,\n values: kEnumerableProperty,\n entries: kEnumerableProperty,\n forEach: kEnumerableProperty,\n [Symbol.iterator]: { enumerable: false },\n [Symbol.toStringTag]: {\n value: 'Headers',\n configurable: true\n }\n})\n\nwebidl.converters.HeadersInit = function (V) {\n if (webidl.util.Type(V) === 'Object') {\n if (V[Symbol.iterator]) {\n return webidl.converters['sequence>'](V)\n }\n\n return webidl.converters['record'](V)\n }\n\n throw webidl.errors.conversionFailed({\n prefix: 'Headers constructor',\n argument: 'Argument 1',\n types: ['sequence>', 'record']\n })\n}\n\nmodule.exports = {\n fill,\n Headers,\n HeadersList\n}\n", "'use strict'\n\nconst { Headers, HeadersList, fill } = require('./headers')\nconst { extractBody, cloneBody, mixinBody } = require('./body')\nconst util = require('../core/util')\nconst { kEnumerableProperty } = util\nconst {\n isValidReasonPhrase,\n isCancelled,\n isAborted,\n isBlobLike,\n serializeJavascriptValueToJSONString,\n isErrorLike,\n isomorphicEncode\n} = require('./util')\nconst {\n redirectStatusSet,\n nullBodyStatus,\n DOMException\n} = require('./constants')\nconst { kState, kHeaders, kGuard, kRealm } = require('./symbols')\nconst { webidl } = require('./webidl')\nconst { FormData } = require('./formdata')\nconst { getGlobalOrigin } = require('./global')\nconst { URLSerializer } = require('./dataURL')\nconst { kHeadersList, kConstruct } = require('../core/symbols')\nconst assert = require('assert')\nconst { types } = require('util')\n\nconst ReadableStream = globalThis.ReadableStream || require('stream/web').ReadableStream\nconst textEncoder = new TextEncoder('utf-8')\n\n// https://fetch.spec.whatwg.org/#response-class\nclass Response {\n // Creates network error Response.\n static error () {\n // TODO\n const relevantRealm = { settingsObject: {} }\n\n // The static error() method steps are to return the result of creating a\n // Response object, given a new network error, \"immutable\", and this\u2019s\n // relevant Realm.\n const responseObject = new Response()\n responseObject[kState] = makeNetworkError()\n responseObject[kRealm] = relevantRealm\n responseObject[kHeaders][kHeadersList] = responseObject[kState].headersList\n responseObject[kHeaders][kGuard] = 'immutable'\n responseObject[kHeaders][kRealm] = relevantRealm\n return responseObject\n }\n\n // https://fetch.spec.whatwg.org/#dom-response-json\n static json (data, init = {}) {\n webidl.argumentLengthCheck(arguments, 1, { header: 'Response.json' })\n\n if (init !== null) {\n init = webidl.converters.ResponseInit(init)\n }\n\n // 1. Let bytes the result of running serialize a JavaScript value to JSON bytes on data.\n const bytes = textEncoder.encode(\n serializeJavascriptValueToJSONString(data)\n )\n\n // 2. Let body be the result of extracting bytes.\n const body = extractBody(bytes)\n\n // 3. Let responseObject be the result of creating a Response object, given a new response,\n // \"response\", and this\u2019s relevant Realm.\n const relevantRealm = { settingsObject: {} }\n const responseObject = new Response()\n responseObject[kRealm] = relevantRealm\n responseObject[kHeaders][kGuard] = 'response'\n responseObject[kHeaders][kRealm] = relevantRealm\n\n // 4. Perform initialize a response given responseObject, init, and (body, \"application/json\").\n initializeResponse(responseObject, init, { body: body[0], type: 'application/json' })\n\n // 5. Return responseObject.\n return responseObject\n }\n\n // Creates a redirect Response that redirects to url with status status.\n static redirect (url, status = 302) {\n const relevantRealm = { settingsObject: {} }\n\n webidl.argumentLengthCheck(arguments, 1, { header: 'Response.redirect' })\n\n url = webidl.converters.USVString(url)\n status = webidl.converters['unsigned short'](status)\n\n // 1. Let parsedURL be the result of parsing url with current settings\n // object\u2019s API base URL.\n // 2. If parsedURL is failure, then throw a TypeError.\n // TODO: base-URL?\n let parsedURL\n try {\n parsedURL = new URL(url, getGlobalOrigin())\n } catch (err) {\n throw Object.assign(new TypeError('Failed to parse URL from ' + url), {\n cause: err\n })\n }\n\n // 3. If status is not a redirect status, then throw a RangeError.\n if (!redirectStatusSet.has(status)) {\n throw new RangeError('Invalid status code ' + status)\n }\n\n // 4. Let responseObject be the result of creating a Response object,\n // given a new response, \"immutable\", and this\u2019s relevant Realm.\n const responseObject = new Response()\n responseObject[kRealm] = relevantRealm\n responseObject[kHeaders][kGuard] = 'immutable'\n responseObject[kHeaders][kRealm] = relevantRealm\n\n // 5. Set responseObject\u2019s response\u2019s status to status.\n responseObject[kState].status = status\n\n // 6. Let value be parsedURL, serialized and isomorphic encoded.\n const value = isomorphicEncode(URLSerializer(parsedURL))\n\n // 7. Append `Location`/value to responseObject\u2019s response\u2019s header list.\n responseObject[kState].headersList.append('location', value)\n\n // 8. Return responseObject.\n return responseObject\n }\n\n // https://fetch.spec.whatwg.org/#dom-response\n constructor (body = null, init = {}) {\n if (body !== null) {\n body = webidl.converters.BodyInit(body)\n }\n\n init = webidl.converters.ResponseInit(init)\n\n // TODO\n this[kRealm] = { settingsObject: {} }\n\n // 1. Set this\u2019s response to a new response.\n this[kState] = makeResponse({})\n\n // 2. Set this\u2019s headers to a new Headers object with this\u2019s relevant\n // Realm, whose header list is this\u2019s response\u2019s header list and guard\n // is \"response\".\n this[kHeaders] = new Headers(kConstruct)\n this[kHeaders][kGuard] = 'response'\n this[kHeaders][kHeadersList] = this[kState].headersList\n this[kHeaders][kRealm] = this[kRealm]\n\n // 3. Let bodyWithType be null.\n let bodyWithType = null\n\n // 4. If body is non-null, then set bodyWithType to the result of extracting body.\n if (body != null) {\n const [extractedBody, type] = extractBody(body)\n bodyWithType = { body: extractedBody, type }\n }\n\n // 5. Perform initialize a response given this, init, and bodyWithType.\n initializeResponse(this, init, bodyWithType)\n }\n\n // Returns response\u2019s type, e.g., \"cors\".\n get type () {\n webidl.brandCheck(this, Response)\n\n // The type getter steps are to return this\u2019s response\u2019s type.\n return this[kState].type\n }\n\n // Returns response\u2019s URL, if it has one; otherwise the empty string.\n get url () {\n webidl.brandCheck(this, Response)\n\n const urlList = this[kState].urlList\n\n // The url getter steps are to return the empty string if this\u2019s\n // response\u2019s URL is null; otherwise this\u2019s response\u2019s URL,\n // serialized with exclude fragment set to true.\n const url = urlList[urlList.length - 1] ?? null\n\n if (url === null) {\n return ''\n }\n\n return URLSerializer(url, true)\n }\n\n // Returns whether response was obtained through a redirect.\n get redirected () {\n webidl.brandCheck(this, Response)\n\n // The redirected getter steps are to return true if this\u2019s response\u2019s URL\n // list has more than one item; otherwise false.\n return this[kState].urlList.length > 1\n }\n\n // Returns response\u2019s status.\n get status () {\n webidl.brandCheck(this, Response)\n\n // The status getter steps are to return this\u2019s response\u2019s status.\n return this[kState].status\n }\n\n // Returns whether response\u2019s status is an ok status.\n get ok () {\n webidl.brandCheck(this, Response)\n\n // The ok getter steps are to return true if this\u2019s response\u2019s status is an\n // ok status; otherwise false.\n return this[kState].status >= 200 && this[kState].status <= 299\n }\n\n // Returns response\u2019s status message.\n get statusText () {\n webidl.brandCheck(this, Response)\n\n // The statusText getter steps are to return this\u2019s response\u2019s status\n // message.\n return this[kState].statusText\n }\n\n // Returns response\u2019s headers as Headers.\n get headers () {\n webidl.brandCheck(this, Response)\n\n // The headers getter steps are to return this\u2019s headers.\n return this[kHeaders]\n }\n\n get body () {\n webidl.brandCheck(this, Response)\n\n return this[kState].body ? this[kState].body.stream : null\n }\n\n get bodyUsed () {\n webidl.brandCheck(this, Response)\n\n return !!this[kState].body && util.isDisturbed(this[kState].body.stream)\n }\n\n // Returns a clone of response.\n clone () {\n webidl.brandCheck(this, Response)\n\n // 1. If this is unusable, then throw a TypeError.\n if (this.bodyUsed || (this.body && this.body.locked)) {\n throw webidl.errors.exception({\n header: 'Response.clone',\n message: 'Body has already been consumed.'\n })\n }\n\n // 2. Let clonedResponse be the result of cloning this\u2019s response.\n const clonedResponse = cloneResponse(this[kState])\n\n // 3. Return the result of creating a Response object, given\n // clonedResponse, this\u2019s headers\u2019s guard, and this\u2019s relevant Realm.\n const clonedResponseObject = new Response()\n clonedResponseObject[kState] = clonedResponse\n clonedResponseObject[kRealm] = this[kRealm]\n clonedResponseObject[kHeaders][kHeadersList] = clonedResponse.headersList\n clonedResponseObject[kHeaders][kGuard] = this[kHeaders][kGuard]\n clonedResponseObject[kHeaders][kRealm] = this[kHeaders][kRealm]\n\n return clonedResponseObject\n }\n}\n\nmixinBody(Response)\n\nObject.defineProperties(Response.prototype, {\n type: kEnumerableProperty,\n url: kEnumerableProperty,\n status: kEnumerableProperty,\n ok: kEnumerableProperty,\n redirected: kEnumerableProperty,\n statusText: kEnumerableProperty,\n headers: kEnumerableProperty,\n clone: kEnumerableProperty,\n body: kEnumerableProperty,\n bodyUsed: kEnumerableProperty,\n [Symbol.toStringTag]: {\n value: 'Response',\n configurable: true\n }\n})\n\nObject.defineProperties(Response, {\n json: kEnumerableProperty,\n redirect: kEnumerableProperty,\n error: kEnumerableProperty\n})\n\n// https://fetch.spec.whatwg.org/#concept-response-clone\nfunction cloneResponse (response) {\n // To clone a response response, run these steps:\n\n // 1. If response is a filtered response, then return a new identical\n // filtered response whose internal response is a clone of response\u2019s\n // internal response.\n if (response.internalResponse) {\n return filterResponse(\n cloneResponse(response.internalResponse),\n response.type\n )\n }\n\n // 2. Let newResponse be a copy of response, except for its body.\n const newResponse = makeResponse({ ...response, body: null })\n\n // 3. If response\u2019s body is non-null, then set newResponse\u2019s body to the\n // result of cloning response\u2019s body.\n if (response.body != null) {\n newResponse.body = cloneBody(response.body)\n }\n\n // 4. Return newResponse.\n return newResponse\n}\n\nfunction makeResponse (init) {\n return {\n aborted: false,\n rangeRequested: false,\n timingAllowPassed: false,\n requestIncludesCredentials: false,\n type: 'default',\n status: 200,\n timingInfo: null,\n cacheState: '',\n statusText: '',\n ...init,\n headersList: init.headersList\n ? new HeadersList(init.headersList)\n : new HeadersList(),\n urlList: init.urlList ? [...init.urlList] : []\n }\n}\n\nfunction makeNetworkError (reason) {\n const isError = isErrorLike(reason)\n return makeResponse({\n type: 'error',\n status: 0,\n error: isError\n ? reason\n : new Error(reason ? String(reason) : reason),\n aborted: reason && reason.name === 'AbortError'\n })\n}\n\nfunction makeFilteredResponse (response, state) {\n state = {\n internalResponse: response,\n ...state\n }\n\n return new Proxy(response, {\n get (target, p) {\n return p in state ? state[p] : target[p]\n },\n set (target, p, value) {\n assert(!(p in state))\n target[p] = value\n return true\n }\n })\n}\n\n// https://fetch.spec.whatwg.org/#concept-filtered-response\nfunction filterResponse (response, type) {\n // Set response to the following filtered response with response as its\n // internal response, depending on request\u2019s response tainting:\n if (type === 'basic') {\n // A basic filtered response is a filtered response whose type is \"basic\"\n // and header list excludes any headers in internal response\u2019s header list\n // whose name is a forbidden response-header name.\n\n // Note: undici does not implement forbidden response-header names\n return makeFilteredResponse(response, {\n type: 'basic',\n headersList: response.headersList\n })\n } else if (type === 'cors') {\n // A CORS filtered response is a filtered response whose type is \"cors\"\n // and header list excludes any headers in internal response\u2019s header\n // list whose name is not a CORS-safelisted response-header name, given\n // internal response\u2019s CORS-exposed header-name list.\n\n // Note: undici does not implement CORS-safelisted response-header names\n return makeFilteredResponse(response, {\n type: 'cors',\n headersList: response.headersList\n })\n } else if (type === 'opaque') {\n // An opaque filtered response is a filtered response whose type is\n // \"opaque\", URL list is the empty list, status is 0, status message\n // is the empty byte sequence, header list is empty, and body is null.\n\n return makeFilteredResponse(response, {\n type: 'opaque',\n urlList: Object.freeze([]),\n status: 0,\n statusText: '',\n body: null\n })\n } else if (type === 'opaqueredirect') {\n // An opaque-redirect filtered response is a filtered response whose type\n // is \"opaqueredirect\", status is 0, status message is the empty byte\n // sequence, header list is empty, and body is null.\n\n return makeFilteredResponse(response, {\n type: 'opaqueredirect',\n status: 0,\n statusText: '',\n headersList: [],\n body: null\n })\n } else {\n assert(false)\n }\n}\n\n// https://fetch.spec.whatwg.org/#appropriate-network-error\nfunction makeAppropriateNetworkError (fetchParams, err = null) {\n // 1. Assert: fetchParams is canceled.\n assert(isCancelled(fetchParams))\n\n // 2. Return an aborted network error if fetchParams is aborted;\n // otherwise return a network error.\n return isAborted(fetchParams)\n ? makeNetworkError(Object.assign(new DOMException('The operation was aborted.', 'AbortError'), { cause: err }))\n : makeNetworkError(Object.assign(new DOMException('Request was cancelled.'), { cause: err }))\n}\n\n// https://whatpr.org/fetch/1392.html#initialize-a-response\nfunction initializeResponse (response, init, body) {\n // 1. If init[\"status\"] is not in the range 200 to 599, inclusive, then\n // throw a RangeError.\n if (init.status !== null && (init.status < 200 || init.status > 599)) {\n throw new RangeError('init[\"status\"] must be in the range of 200 to 599, inclusive.')\n }\n\n // 2. If init[\"statusText\"] does not match the reason-phrase token production,\n // then throw a TypeError.\n if ('statusText' in init && init.statusText != null) {\n // See, https://datatracker.ietf.org/doc/html/rfc7230#section-3.1.2:\n // reason-phrase = *( HTAB / SP / VCHAR / obs-text )\n if (!isValidReasonPhrase(String(init.statusText))) {\n throw new TypeError('Invalid statusText')\n }\n }\n\n // 3. Set response\u2019s response\u2019s status to init[\"status\"].\n if ('status' in init && init.status != null) {\n response[kState].status = init.status\n }\n\n // 4. Set response\u2019s response\u2019s status message to init[\"statusText\"].\n if ('statusText' in init && init.statusText != null) {\n response[kState].statusText = init.statusText\n }\n\n // 5. If init[\"headers\"] exists, then fill response\u2019s headers with init[\"headers\"].\n if ('headers' in init && init.headers != null) {\n fill(response[kHeaders], init.headers)\n }\n\n // 6. If body was given, then:\n if (body) {\n // 1. If response's status is a null body status, then throw a TypeError.\n if (nullBodyStatus.includes(response.status)) {\n throw webidl.errors.exception({\n header: 'Response constructor',\n message: 'Invalid response status code ' + response.status\n })\n }\n\n // 2. Set response's body to body's body.\n response[kState].body = body.body\n\n // 3. If body's type is non-null and response's header list does not contain\n // `Content-Type`, then append (`Content-Type`, body's type) to response's header list.\n if (body.type != null && !response[kState].headersList.contains('Content-Type')) {\n response[kState].headersList.append('content-type', body.type)\n }\n }\n}\n\nwebidl.converters.ReadableStream = webidl.interfaceConverter(\n ReadableStream\n)\n\nwebidl.converters.FormData = webidl.interfaceConverter(\n FormData\n)\n\nwebidl.converters.URLSearchParams = webidl.interfaceConverter(\n URLSearchParams\n)\n\n// https://fetch.spec.whatwg.org/#typedefdef-xmlhttprequestbodyinit\nwebidl.converters.XMLHttpRequestBodyInit = function (V) {\n if (typeof V === 'string') {\n return webidl.converters.USVString(V)\n }\n\n if (isBlobLike(V)) {\n return webidl.converters.Blob(V, { strict: false })\n }\n\n if (types.isArrayBuffer(V) || types.isTypedArray(V) || types.isDataView(V)) {\n return webidl.converters.BufferSource(V)\n }\n\n if (util.isFormDataLike(V)) {\n return webidl.converters.FormData(V, { strict: false })\n }\n\n if (V instanceof URLSearchParams) {\n return webidl.converters.URLSearchParams(V)\n }\n\n return webidl.converters.DOMString(V)\n}\n\n// https://fetch.spec.whatwg.org/#bodyinit\nwebidl.converters.BodyInit = function (V) {\n if (V instanceof ReadableStream) {\n return webidl.converters.ReadableStream(V)\n }\n\n // Note: the spec doesn't include async iterables,\n // this is an undici extension.\n if (V?.[Symbol.asyncIterator]) {\n return V\n }\n\n return webidl.converters.XMLHttpRequestBodyInit(V)\n}\n\nwebidl.converters.ResponseInit = webidl.dictionaryConverter([\n {\n key: 'status',\n converter: webidl.converters['unsigned short'],\n defaultValue: 200\n },\n {\n key: 'statusText',\n converter: webidl.converters.ByteString,\n defaultValue: ''\n },\n {\n key: 'headers',\n converter: webidl.converters.HeadersInit\n }\n])\n\nmodule.exports = {\n makeNetworkError,\n makeResponse,\n makeAppropriateNetworkError,\n filterResponse,\n Response,\n cloneResponse\n}\n", "/* globals AbortController */\n\n'use strict'\n\nconst { extractBody, mixinBody, cloneBody } = require('./body')\nconst { Headers, fill: fillHeaders, HeadersList } = require('./headers')\nconst { FinalizationRegistry } = require('../compat/dispatcher-weakref')()\nconst util = require('../core/util')\nconst {\n isValidHTTPToken,\n sameOrigin,\n normalizeMethod,\n makePolicyContainer,\n normalizeMethodRecord\n} = require('./util')\nconst {\n forbiddenMethodsSet,\n corsSafeListedMethodsSet,\n referrerPolicy,\n requestRedirect,\n requestMode,\n requestCredentials,\n requestCache,\n requestDuplex\n} = require('./constants')\nconst { kEnumerableProperty } = util\nconst { kHeaders, kSignal, kState, kGuard, kRealm } = require('./symbols')\nconst { webidl } = require('./webidl')\nconst { getGlobalOrigin } = require('./global')\nconst { URLSerializer } = require('./dataURL')\nconst { kHeadersList, kConstruct } = require('../core/symbols')\nconst assert = require('assert')\nconst { getMaxListeners, setMaxListeners, getEventListeners, defaultMaxListeners } = require('events')\n\nlet TransformStream = globalThis.TransformStream\n\nconst kAbortController = Symbol('abortController')\n\nconst requestFinalizer = new FinalizationRegistry(({ signal, abort }) => {\n signal.removeEventListener('abort', abort)\n})\n\n// https://fetch.spec.whatwg.org/#request-class\nclass Request {\n // https://fetch.spec.whatwg.org/#dom-request\n constructor (input, init = {}) {\n if (input === kConstruct) {\n return\n }\n\n webidl.argumentLengthCheck(arguments, 1, { header: 'Request constructor' })\n\n input = webidl.converters.RequestInfo(input)\n init = webidl.converters.RequestInit(init)\n\n // https://html.spec.whatwg.org/multipage/webappapis.html#environment-settings-object\n this[kRealm] = {\n settingsObject: {\n baseUrl: getGlobalOrigin(),\n get origin () {\n return this.baseUrl?.origin\n },\n policyContainer: makePolicyContainer()\n }\n }\n\n // 1. Let request be null.\n let request = null\n\n // 2. Let fallbackMode be null.\n let fallbackMode = null\n\n // 3. Let baseURL be this\u2019s relevant settings object\u2019s API base URL.\n const baseUrl = this[kRealm].settingsObject.baseUrl\n\n // 4. Let signal be null.\n let signal = null\n\n // 5. If input is a string, then:\n if (typeof input === 'string') {\n // 1. Let parsedURL be the result of parsing input with baseURL.\n // 2. If parsedURL is failure, then throw a TypeError.\n let parsedURL\n try {\n parsedURL = new URL(input, baseUrl)\n } catch (err) {\n throw new TypeError('Failed to parse URL from ' + input, { cause: err })\n }\n\n // 3. If parsedURL includes credentials, then throw a TypeError.\n if (parsedURL.username || parsedURL.password) {\n throw new TypeError(\n 'Request cannot be constructed from a URL that includes credentials: ' +\n input\n )\n }\n\n // 4. Set request to a new request whose URL is parsedURL.\n request = makeRequest({ urlList: [parsedURL] })\n\n // 5. Set fallbackMode to \"cors\".\n fallbackMode = 'cors'\n } else {\n // 6. Otherwise:\n\n // 7. Assert: input is a Request object.\n assert(input instanceof Request)\n\n // 8. Set request to input\u2019s request.\n request = input[kState]\n\n // 9. Set signal to input\u2019s signal.\n signal = input[kSignal]\n }\n\n // 7. Let origin be this\u2019s relevant settings object\u2019s origin.\n const origin = this[kRealm].settingsObject.origin\n\n // 8. Let window be \"client\".\n let window = 'client'\n\n // 9. If request\u2019s window is an environment settings object and its origin\n // is same origin with origin, then set window to request\u2019s window.\n if (\n request.window?.constructor?.name === 'EnvironmentSettingsObject' &&\n sameOrigin(request.window, origin)\n ) {\n window = request.window\n }\n\n // 10. If init[\"window\"] exists and is non-null, then throw a TypeError.\n if (init.window != null) {\n throw new TypeError(`'window' option '${window}' must be null`)\n }\n\n // 11. If init[\"window\"] exists, then set window to \"no-window\".\n if ('window' in init) {\n window = 'no-window'\n }\n\n // 12. Set request to a new request with the following properties:\n request = makeRequest({\n // URL request\u2019s URL.\n // undici implementation note: this is set as the first item in request's urlList in makeRequest\n // method request\u2019s method.\n method: request.method,\n // header list A copy of request\u2019s header list.\n // undici implementation note: headersList is cloned in makeRequest\n headersList: request.headersList,\n // unsafe-request flag Set.\n unsafeRequest: request.unsafeRequest,\n // client This\u2019s relevant settings object.\n client: this[kRealm].settingsObject,\n // window window.\n window,\n // priority request\u2019s priority.\n priority: request.priority,\n // origin request\u2019s origin. The propagation of the origin is only significant for navigation requests\n // being handled by a service worker. In this scenario a request can have an origin that is different\n // from the current client.\n origin: request.origin,\n // referrer request\u2019s referrer.\n referrer: request.referrer,\n // referrer policy request\u2019s referrer policy.\n referrerPolicy: request.referrerPolicy,\n // mode request\u2019s mode.\n mode: request.mode,\n // credentials mode request\u2019s credentials mode.\n credentials: request.credentials,\n // cache mode request\u2019s cache mode.\n cache: request.cache,\n // redirect mode request\u2019s redirect mode.\n redirect: request.redirect,\n // integrity metadata request\u2019s integrity metadata.\n integrity: request.integrity,\n // keepalive request\u2019s keepalive.\n keepalive: request.keepalive,\n // reload-navigation flag request\u2019s reload-navigation flag.\n reloadNavigation: request.reloadNavigation,\n // history-navigation flag request\u2019s history-navigation flag.\n historyNavigation: request.historyNavigation,\n // URL list A clone of request\u2019s URL list.\n urlList: [...request.urlList]\n })\n\n const initHasKey = Object.keys(init).length !== 0\n\n // 13. If init is not empty, then:\n if (initHasKey) {\n // 1. If request\u2019s mode is \"navigate\", then set it to \"same-origin\".\n if (request.mode === 'navigate') {\n request.mode = 'same-origin'\n }\n\n // 2. Unset request\u2019s reload-navigation flag.\n request.reloadNavigation = false\n\n // 3. Unset request\u2019s history-navigation flag.\n request.historyNavigation = false\n\n // 4. Set request\u2019s origin to \"client\".\n request.origin = 'client'\n\n // 5. Set request\u2019s referrer to \"client\"\n request.referrer = 'client'\n\n // 6. Set request\u2019s referrer policy to the empty string.\n request.referrerPolicy = ''\n\n // 7. Set request\u2019s URL to request\u2019s current URL.\n request.url = request.urlList[request.urlList.length - 1]\n\n // 8. Set request\u2019s URL list to \u00AB request\u2019s URL \u00BB.\n request.urlList = [request.url]\n }\n\n // 14. If init[\"referrer\"] exists, then:\n if (init.referrer !== undefined) {\n // 1. Let referrer be init[\"referrer\"].\n const referrer = init.referrer\n\n // 2. If referrer is the empty string, then set request\u2019s referrer to \"no-referrer\".\n if (referrer === '') {\n request.referrer = 'no-referrer'\n } else {\n // 1. Let parsedReferrer be the result of parsing referrer with\n // baseURL.\n // 2. If parsedReferrer is failure, then throw a TypeError.\n let parsedReferrer\n try {\n parsedReferrer = new URL(referrer, baseUrl)\n } catch (err) {\n throw new TypeError(`Referrer \"${referrer}\" is not a valid URL.`, { cause: err })\n }\n\n // 3. If one of the following is true\n // - parsedReferrer\u2019s scheme is \"about\" and path is the string \"client\"\n // - parsedReferrer\u2019s origin is not same origin with origin\n // then set request\u2019s referrer to \"client\".\n if (\n (parsedReferrer.protocol === 'about:' && parsedReferrer.hostname === 'client') ||\n (origin && !sameOrigin(parsedReferrer, this[kRealm].settingsObject.baseUrl))\n ) {\n request.referrer = 'client'\n } else {\n // 4. Otherwise, set request\u2019s referrer to parsedReferrer.\n request.referrer = parsedReferrer\n }\n }\n }\n\n // 15. If init[\"referrerPolicy\"] exists, then set request\u2019s referrer policy\n // to it.\n if (init.referrerPolicy !== undefined) {\n request.referrerPolicy = init.referrerPolicy\n }\n\n // 16. Let mode be init[\"mode\"] if it exists, and fallbackMode otherwise.\n let mode\n if (init.mode !== undefined) {\n mode = init.mode\n } else {\n mode = fallbackMode\n }\n\n // 17. If mode is \"navigate\", then throw a TypeError.\n if (mode === 'navigate') {\n throw webidl.errors.exception({\n header: 'Request constructor',\n message: 'invalid request mode navigate.'\n })\n }\n\n // 18. If mode is non-null, set request\u2019s mode to mode.\n if (mode != null) {\n request.mode = mode\n }\n\n // 19. If init[\"credentials\"] exists, then set request\u2019s credentials mode\n // to it.\n if (init.credentials !== undefined) {\n request.credentials = init.credentials\n }\n\n // 18. If init[\"cache\"] exists, then set request\u2019s cache mode to it.\n if (init.cache !== undefined) {\n request.cache = init.cache\n }\n\n // 21. If request\u2019s cache mode is \"only-if-cached\" and request\u2019s mode is\n // not \"same-origin\", then throw a TypeError.\n if (request.cache === 'only-if-cached' && request.mode !== 'same-origin') {\n throw new TypeError(\n \"'only-if-cached' can be set only with 'same-origin' mode\"\n )\n }\n\n // 22. If init[\"redirect\"] exists, then set request\u2019s redirect mode to it.\n if (init.redirect !== undefined) {\n request.redirect = init.redirect\n }\n\n // 23. If init[\"integrity\"] exists, then set request\u2019s integrity metadata to it.\n if (init.integrity != null) {\n request.integrity = String(init.integrity)\n }\n\n // 24. If init[\"keepalive\"] exists, then set request\u2019s keepalive to it.\n if (init.keepalive !== undefined) {\n request.keepalive = Boolean(init.keepalive)\n }\n\n // 25. If init[\"method\"] exists, then:\n if (init.method !== undefined) {\n // 1. Let method be init[\"method\"].\n let method = init.method\n\n // 2. If method is not a method or method is a forbidden method, then\n // throw a TypeError.\n if (!isValidHTTPToken(method)) {\n throw new TypeError(`'${method}' is not a valid HTTP method.`)\n }\n\n if (forbiddenMethodsSet.has(method.toUpperCase())) {\n throw new TypeError(`'${method}' HTTP method is unsupported.`)\n }\n\n // 3. Normalize method.\n method = normalizeMethodRecord[method] ?? normalizeMethod(method)\n\n // 4. Set request\u2019s method to method.\n request.method = method\n }\n\n // 26. If init[\"signal\"] exists, then set signal to it.\n if (init.signal !== undefined) {\n signal = init.signal\n }\n\n // 27. Set this\u2019s request to request.\n this[kState] = request\n\n // 28. Set this\u2019s signal to a new AbortSignal object with this\u2019s relevant\n // Realm.\n // TODO: could this be simplified with AbortSignal.any\n // (https://dom.spec.whatwg.org/#dom-abortsignal-any)\n const ac = new AbortController()\n this[kSignal] = ac.signal\n this[kSignal][kRealm] = this[kRealm]\n\n // 29. If signal is not null, then make this\u2019s signal follow signal.\n if (signal != null) {\n if (\n !signal ||\n typeof signal.aborted !== 'boolean' ||\n typeof signal.addEventListener !== 'function'\n ) {\n throw new TypeError(\n \"Failed to construct 'Request': member signal is not of type AbortSignal.\"\n )\n }\n\n if (signal.aborted) {\n ac.abort(signal.reason)\n } else {\n // Keep a strong ref to ac while request object\n // is alive. This is needed to prevent AbortController\n // from being prematurely garbage collected.\n // See, https://github.com/nodejs/undici/issues/1926.\n this[kAbortController] = ac\n\n const acRef = new WeakRef(ac)\n const abort = function () {\n const ac = acRef.deref()\n if (ac !== undefined) {\n ac.abort(this.reason)\n }\n }\n\n // Third-party AbortControllers may not work with these.\n // See, https://github.com/nodejs/undici/pull/1910#issuecomment-1464495619.\n try {\n // If the max amount of listeners is equal to the default, increase it\n // This is only available in node >= v19.9.0\n if (typeof getMaxListeners === 'function' && getMaxListeners(signal) === defaultMaxListeners) {\n setMaxListeners(100, signal)\n } else if (getEventListeners(signal, 'abort').length >= defaultMaxListeners) {\n setMaxListeners(100, signal)\n }\n } catch {}\n\n util.addAbortListener(signal, abort)\n requestFinalizer.register(ac, { signal, abort })\n }\n }\n\n // 30. Set this\u2019s headers to a new Headers object with this\u2019s relevant\n // Realm, whose header list is request\u2019s header list and guard is\n // \"request\".\n this[kHeaders] = new Headers(kConstruct)\n this[kHeaders][kHeadersList] = request.headersList\n this[kHeaders][kGuard] = 'request'\n this[kHeaders][kRealm] = this[kRealm]\n\n // 31. If this\u2019s request\u2019s mode is \"no-cors\", then:\n if (mode === 'no-cors') {\n // 1. If this\u2019s request\u2019s method is not a CORS-safelisted method,\n // then throw a TypeError.\n if (!corsSafeListedMethodsSet.has(request.method)) {\n throw new TypeError(\n `'${request.method} is unsupported in no-cors mode.`\n )\n }\n\n // 2. Set this\u2019s headers\u2019s guard to \"request-no-cors\".\n this[kHeaders][kGuard] = 'request-no-cors'\n }\n\n // 32. If init is not empty, then:\n if (initHasKey) {\n /** @type {HeadersList} */\n const headersList = this[kHeaders][kHeadersList]\n // 1. Let headers be a copy of this\u2019s headers and its associated header\n // list.\n // 2. If init[\"headers\"] exists, then set headers to init[\"headers\"].\n const headers = init.headers !== undefined ? init.headers : new HeadersList(headersList)\n\n // 3. Empty this\u2019s headers\u2019s header list.\n headersList.clear()\n\n // 4. If headers is a Headers object, then for each header in its header\n // list, append header\u2019s name/header\u2019s value to this\u2019s headers.\n if (headers instanceof HeadersList) {\n for (const [key, val] of headers) {\n headersList.append(key, val)\n }\n // Note: Copy the `set-cookie` meta-data.\n headersList.cookies = headers.cookies\n } else {\n // 5. Otherwise, fill this\u2019s headers with headers.\n fillHeaders(this[kHeaders], headers)\n }\n }\n\n // 33. Let inputBody be input\u2019s request\u2019s body if input is a Request\n // object; otherwise null.\n const inputBody = input instanceof Request ? input[kState].body : null\n\n // 34. If either init[\"body\"] exists and is non-null or inputBody is\n // non-null, and request\u2019s method is `GET` or `HEAD`, then throw a\n // TypeError.\n if (\n (init.body != null || inputBody != null) &&\n (request.method === 'GET' || request.method === 'HEAD')\n ) {\n throw new TypeError('Request with GET/HEAD method cannot have body.')\n }\n\n // 35. Let initBody be null.\n let initBody = null\n\n // 36. If init[\"body\"] exists and is non-null, then:\n if (init.body != null) {\n // 1. Let Content-Type be null.\n // 2. Set initBody and Content-Type to the result of extracting\n // init[\"body\"], with keepalive set to request\u2019s keepalive.\n const [extractedBody, contentType] = extractBody(\n init.body,\n request.keepalive\n )\n initBody = extractedBody\n\n // 3, If Content-Type is non-null and this\u2019s headers\u2019s header list does\n // not contain `Content-Type`, then append `Content-Type`/Content-Type to\n // this\u2019s headers.\n if (contentType && !this[kHeaders][kHeadersList].contains('content-type')) {\n this[kHeaders].append('content-type', contentType)\n }\n }\n\n // 37. Let inputOrInitBody be initBody if it is non-null; otherwise\n // inputBody.\n const inputOrInitBody = initBody ?? inputBody\n\n // 38. If inputOrInitBody is non-null and inputOrInitBody\u2019s source is\n // null, then:\n if (inputOrInitBody != null && inputOrInitBody.source == null) {\n // 1. If initBody is non-null and init[\"duplex\"] does not exist,\n // then throw a TypeError.\n if (initBody != null && init.duplex == null) {\n throw new TypeError('RequestInit: duplex option is required when sending a body.')\n }\n\n // 2. If this\u2019s request\u2019s mode is neither \"same-origin\" nor \"cors\",\n // then throw a TypeError.\n if (request.mode !== 'same-origin' && request.mode !== 'cors') {\n throw new TypeError(\n 'If request is made from ReadableStream, mode should be \"same-origin\" or \"cors\"'\n )\n }\n\n // 3. Set this\u2019s request\u2019s use-CORS-preflight flag.\n request.useCORSPreflightFlag = true\n }\n\n // 39. Let finalBody be inputOrInitBody.\n let finalBody = inputOrInitBody\n\n // 40. If initBody is null and inputBody is non-null, then:\n if (initBody == null && inputBody != null) {\n // 1. If input is unusable, then throw a TypeError.\n if (util.isDisturbed(inputBody.stream) || inputBody.stream.locked) {\n throw new TypeError(\n 'Cannot construct a Request with a Request object that has already been used.'\n )\n }\n\n // 2. Set finalBody to the result of creating a proxy for inputBody.\n if (!TransformStream) {\n TransformStream = require('stream/web').TransformStream\n }\n\n // https://streams.spec.whatwg.org/#readablestream-create-a-proxy\n const identityTransform = new TransformStream()\n inputBody.stream.pipeThrough(identityTransform)\n finalBody = {\n source: inputBody.source,\n length: inputBody.length,\n stream: identityTransform.readable\n }\n }\n\n // 41. Set this\u2019s request\u2019s body to finalBody.\n this[kState].body = finalBody\n }\n\n // Returns request\u2019s HTTP method, which is \"GET\" by default.\n get method () {\n webidl.brandCheck(this, Request)\n\n // The method getter steps are to return this\u2019s request\u2019s method.\n return this[kState].method\n }\n\n // Returns the URL of request as a string.\n get url () {\n webidl.brandCheck(this, Request)\n\n // The url getter steps are to return this\u2019s request\u2019s URL, serialized.\n return URLSerializer(this[kState].url)\n }\n\n // Returns a Headers object consisting of the headers associated with request.\n // Note that headers added in the network layer by the user agent will not\n // be accounted for in this object, e.g., the \"Host\" header.\n get headers () {\n webidl.brandCheck(this, Request)\n\n // The headers getter steps are to return this\u2019s headers.\n return this[kHeaders]\n }\n\n // Returns the kind of resource requested by request, e.g., \"document\"\n // or \"script\".\n get destination () {\n webidl.brandCheck(this, Request)\n\n // The destination getter are to return this\u2019s request\u2019s destination.\n return this[kState].destination\n }\n\n // Returns the referrer of request. Its value can be a same-origin URL if\n // explicitly set in init, the empty string to indicate no referrer, and\n // \"about:client\" when defaulting to the global\u2019s default. This is used\n // during fetching to determine the value of the `Referer` header of the\n // request being made.\n get referrer () {\n webidl.brandCheck(this, Request)\n\n // 1. If this\u2019s request\u2019s referrer is \"no-referrer\", then return the\n // empty string.\n if (this[kState].referrer === 'no-referrer') {\n return ''\n }\n\n // 2. If this\u2019s request\u2019s referrer is \"client\", then return\n // \"about:client\".\n if (this[kState].referrer === 'client') {\n return 'about:client'\n }\n\n // Return this\u2019s request\u2019s referrer, serialized.\n return this[kState].referrer.toString()\n }\n\n // Returns the referrer policy associated with request.\n // This is used during fetching to compute the value of the request\u2019s\n // referrer.\n get referrerPolicy () {\n webidl.brandCheck(this, Request)\n\n // The referrerPolicy getter steps are to return this\u2019s request\u2019s referrer policy.\n return this[kState].referrerPolicy\n }\n\n // Returns the mode associated with request, which is a string indicating\n // whether the request will use CORS, or will be restricted to same-origin\n // URLs.\n get mode () {\n webidl.brandCheck(this, Request)\n\n // The mode getter steps are to return this\u2019s request\u2019s mode.\n return this[kState].mode\n }\n\n // Returns the credentials mode associated with request,\n // which is a string indicating whether credentials will be sent with the\n // request always, never, or only when sent to a same-origin URL.\n get credentials () {\n // The credentials getter steps are to return this\u2019s request\u2019s credentials mode.\n return this[kState].credentials\n }\n\n // Returns the cache mode associated with request,\n // which is a string indicating how the request will\n // interact with the browser\u2019s cache when fetching.\n get cache () {\n webidl.brandCheck(this, Request)\n\n // The cache getter steps are to return this\u2019s request\u2019s cache mode.\n return this[kState].cache\n }\n\n // Returns the redirect mode associated with request,\n // which is a string indicating how redirects for the\n // request will be handled during fetching. A request\n // will follow redirects by default.\n get redirect () {\n webidl.brandCheck(this, Request)\n\n // The redirect getter steps are to return this\u2019s request\u2019s redirect mode.\n return this[kState].redirect\n }\n\n // Returns request\u2019s subresource integrity metadata, which is a\n // cryptographic hash of the resource being fetched. Its value\n // consists of multiple hashes separated by whitespace. [SRI]\n get integrity () {\n webidl.brandCheck(this, Request)\n\n // The integrity getter steps are to return this\u2019s request\u2019s integrity\n // metadata.\n return this[kState].integrity\n }\n\n // Returns a boolean indicating whether or not request can outlive the\n // global in which it was created.\n get keepalive () {\n webidl.brandCheck(this, Request)\n\n // The keepalive getter steps are to return this\u2019s request\u2019s keepalive.\n return this[kState].keepalive\n }\n\n // Returns a boolean indicating whether or not request is for a reload\n // navigation.\n get isReloadNavigation () {\n webidl.brandCheck(this, Request)\n\n // The isReloadNavigation getter steps are to return true if this\u2019s\n // request\u2019s reload-navigation flag is set; otherwise false.\n return this[kState].reloadNavigation\n }\n\n // Returns a boolean indicating whether or not request is for a history\n // navigation (a.k.a. back-foward navigation).\n get isHistoryNavigation () {\n webidl.brandCheck(this, Request)\n\n // The isHistoryNavigation getter steps are to return true if this\u2019s request\u2019s\n // history-navigation flag is set; otherwise false.\n return this[kState].historyNavigation\n }\n\n // Returns the signal associated with request, which is an AbortSignal\n // object indicating whether or not request has been aborted, and its\n // abort event handler.\n get signal () {\n webidl.brandCheck(this, Request)\n\n // The signal getter steps are to return this\u2019s signal.\n return this[kSignal]\n }\n\n get body () {\n webidl.brandCheck(this, Request)\n\n return this[kState].body ? this[kState].body.stream : null\n }\n\n get bodyUsed () {\n webidl.brandCheck(this, Request)\n\n return !!this[kState].body && util.isDisturbed(this[kState].body.stream)\n }\n\n get duplex () {\n webidl.brandCheck(this, Request)\n\n return 'half'\n }\n\n // Returns a clone of request.\n clone () {\n webidl.brandCheck(this, Request)\n\n // 1. If this is unusable, then throw a TypeError.\n if (this.bodyUsed || this.body?.locked) {\n throw new TypeError('unusable')\n }\n\n // 2. Let clonedRequest be the result of cloning this\u2019s request.\n const clonedRequest = cloneRequest(this[kState])\n\n // 3. Let clonedRequestObject be the result of creating a Request object,\n // given clonedRequest, this\u2019s headers\u2019s guard, and this\u2019s relevant Realm.\n const clonedRequestObject = new Request(kConstruct)\n clonedRequestObject[kState] = clonedRequest\n clonedRequestObject[kRealm] = this[kRealm]\n clonedRequestObject[kHeaders] = new Headers(kConstruct)\n clonedRequestObject[kHeaders][kHeadersList] = clonedRequest.headersList\n clonedRequestObject[kHeaders][kGuard] = this[kHeaders][kGuard]\n clonedRequestObject[kHeaders][kRealm] = this[kHeaders][kRealm]\n\n // 4. Make clonedRequestObject\u2019s signal follow this\u2019s signal.\n const ac = new AbortController()\n if (this.signal.aborted) {\n ac.abort(this.signal.reason)\n } else {\n util.addAbortListener(\n this.signal,\n () => {\n ac.abort(this.signal.reason)\n }\n )\n }\n clonedRequestObject[kSignal] = ac.signal\n\n // 4. Return clonedRequestObject.\n return clonedRequestObject\n }\n}\n\nmixinBody(Request)\n\nfunction makeRequest (init) {\n // https://fetch.spec.whatwg.org/#requests\n const request = {\n method: 'GET',\n localURLsOnly: false,\n unsafeRequest: false,\n body: null,\n client: null,\n reservedClient: null,\n replacesClientId: '',\n window: 'client',\n keepalive: false,\n serviceWorkers: 'all',\n initiator: '',\n destination: '',\n priority: null,\n origin: 'client',\n policyContainer: 'client',\n referrer: 'client',\n referrerPolicy: '',\n mode: 'no-cors',\n useCORSPreflightFlag: false,\n credentials: 'same-origin',\n useCredentials: false,\n cache: 'default',\n redirect: 'follow',\n integrity: '',\n cryptoGraphicsNonceMetadata: '',\n parserMetadata: '',\n reloadNavigation: false,\n historyNavigation: false,\n userActivation: false,\n taintedOrigin: false,\n redirectCount: 0,\n responseTainting: 'basic',\n preventNoCacheCacheControlHeaderModification: false,\n done: false,\n timingAllowFailed: false,\n ...init,\n headersList: init.headersList\n ? new HeadersList(init.headersList)\n : new HeadersList()\n }\n request.url = request.urlList[0]\n return request\n}\n\n// https://fetch.spec.whatwg.org/#concept-request-clone\nfunction cloneRequest (request) {\n // To clone a request request, run these steps:\n\n // 1. Let newRequest be a copy of request, except for its body.\n const newRequest = makeRequest({ ...request, body: null })\n\n // 2. If request\u2019s body is non-null, set newRequest\u2019s body to the\n // result of cloning request\u2019s body.\n if (request.body != null) {\n newRequest.body = cloneBody(request.body)\n }\n\n // 3. Return newRequest.\n return newRequest\n}\n\nObject.defineProperties(Request.prototype, {\n method: kEnumerableProperty,\n url: kEnumerableProperty,\n headers: kEnumerableProperty,\n redirect: kEnumerableProperty,\n clone: kEnumerableProperty,\n signal: kEnumerableProperty,\n duplex: kEnumerableProperty,\n destination: kEnumerableProperty,\n body: kEnumerableProperty,\n bodyUsed: kEnumerableProperty,\n isHistoryNavigation: kEnumerableProperty,\n isReloadNavigation: kEnumerableProperty,\n keepalive: kEnumerableProperty,\n integrity: kEnumerableProperty,\n cache: kEnumerableProperty,\n credentials: kEnumerableProperty,\n attribute: kEnumerableProperty,\n referrerPolicy: kEnumerableProperty,\n referrer: kEnumerableProperty,\n mode: kEnumerableProperty,\n [Symbol.toStringTag]: {\n value: 'Request',\n configurable: true\n }\n})\n\nwebidl.converters.Request = webidl.interfaceConverter(\n Request\n)\n\n// https://fetch.spec.whatwg.org/#requestinfo\nwebidl.converters.RequestInfo = function (V) {\n if (typeof V === 'string') {\n return webidl.converters.USVString(V)\n }\n\n if (V instanceof Request) {\n return webidl.converters.Request(V)\n }\n\n return webidl.converters.USVString(V)\n}\n\nwebidl.converters.AbortSignal = webidl.interfaceConverter(\n AbortSignal\n)\n\n// https://fetch.spec.whatwg.org/#requestinit\nwebidl.converters.RequestInit = webidl.dictionaryConverter([\n {\n key: 'method',\n converter: webidl.converters.ByteString\n },\n {\n key: 'headers',\n converter: webidl.converters.HeadersInit\n },\n {\n key: 'body',\n converter: webidl.nullableConverter(\n webidl.converters.BodyInit\n )\n },\n {\n key: 'referrer',\n converter: webidl.converters.USVString\n },\n {\n key: 'referrerPolicy',\n converter: webidl.converters.DOMString,\n // https://w3c.github.io/webappsec-referrer-policy/#referrer-policy\n allowedValues: referrerPolicy\n },\n {\n key: 'mode',\n converter: webidl.converters.DOMString,\n // https://fetch.spec.whatwg.org/#concept-request-mode\n allowedValues: requestMode\n },\n {\n key: 'credentials',\n converter: webidl.converters.DOMString,\n // https://fetch.spec.whatwg.org/#requestcredentials\n allowedValues: requestCredentials\n },\n {\n key: 'cache',\n converter: webidl.converters.DOMString,\n // https://fetch.spec.whatwg.org/#requestcache\n allowedValues: requestCache\n },\n {\n key: 'redirect',\n converter: webidl.converters.DOMString,\n // https://fetch.spec.whatwg.org/#requestredirect\n allowedValues: requestRedirect\n },\n {\n key: 'integrity',\n converter: webidl.converters.DOMString\n },\n {\n key: 'keepalive',\n converter: webidl.converters.boolean\n },\n {\n key: 'signal',\n converter: webidl.nullableConverter(\n (signal) => webidl.converters.AbortSignal(\n signal,\n { strict: false }\n )\n )\n },\n {\n key: 'window',\n converter: webidl.converters.any\n },\n {\n key: 'duplex',\n converter: webidl.converters.DOMString,\n allowedValues: requestDuplex\n }\n])\n\nmodule.exports = { Request, makeRequest }\n", "// https://github.com/Ethan-Arrowood/undici-fetch\n\n'use strict'\n\nconst {\n Response,\n makeNetworkError,\n makeAppropriateNetworkError,\n filterResponse,\n makeResponse\n} = require('./response')\nconst { Headers } = require('./headers')\nconst { Request, makeRequest } = require('./request')\nconst zlib = require('zlib')\nconst {\n bytesMatch,\n makePolicyContainer,\n clonePolicyContainer,\n requestBadPort,\n TAOCheck,\n appendRequestOriginHeader,\n responseLocationURL,\n requestCurrentURL,\n setRequestReferrerPolicyOnRedirect,\n tryUpgradeRequestToAPotentiallyTrustworthyURL,\n createOpaqueTimingInfo,\n appendFetchMetadata,\n corsCheck,\n crossOriginResourcePolicyCheck,\n determineRequestsReferrer,\n coarsenedSharedCurrentTime,\n createDeferredPromise,\n isBlobLike,\n sameOrigin,\n isCancelled,\n isAborted,\n isErrorLike,\n fullyReadBody,\n readableStreamClose,\n isomorphicEncode,\n urlIsLocal,\n urlIsHttpHttpsScheme,\n urlHasHttpsScheme\n} = require('./util')\nconst { kState, kHeaders, kGuard, kRealm } = require('./symbols')\nconst assert = require('assert')\nconst { safelyExtractBody } = require('./body')\nconst {\n redirectStatusSet,\n nullBodyStatus,\n safeMethodsSet,\n requestBodyHeader,\n subresourceSet,\n DOMException\n} = require('./constants')\nconst { kHeadersList } = require('../core/symbols')\nconst EE = require('events')\nconst { Readable, pipeline } = require('stream')\nconst { addAbortListener, isErrored, isReadable, nodeMajor, nodeMinor } = require('../core/util')\nconst { dataURLProcessor, serializeAMimeType } = require('./dataURL')\nconst { TransformStream } = require('stream/web')\nconst { getGlobalDispatcher } = require('../global')\nconst { webidl } = require('./webidl')\nconst { STATUS_CODES } = require('http')\nconst GET_OR_HEAD = ['GET', 'HEAD']\n\n/** @type {import('buffer').resolveObjectURL} */\nlet resolveObjectURL\nlet ReadableStream = globalThis.ReadableStream\n\nclass Fetch extends EE {\n constructor (dispatcher) {\n super()\n\n this.dispatcher = dispatcher\n this.connection = null\n this.dump = false\n this.state = 'ongoing'\n // 2 terminated listeners get added per request,\n // but only 1 gets removed. If there are 20 redirects,\n // 21 listeners will be added.\n // See https://github.com/nodejs/undici/issues/1711\n // TODO (fix): Find and fix root cause for leaked listener.\n this.setMaxListeners(21)\n }\n\n terminate (reason) {\n if (this.state !== 'ongoing') {\n return\n }\n\n this.state = 'terminated'\n this.connection?.destroy(reason)\n this.emit('terminated', reason)\n }\n\n // https://fetch.spec.whatwg.org/#fetch-controller-abort\n abort (error) {\n if (this.state !== 'ongoing') {\n return\n }\n\n // 1. Set controller\u2019s state to \"aborted\".\n this.state = 'aborted'\n\n // 2. Let fallbackError be an \"AbortError\" DOMException.\n // 3. Set error to fallbackError if it is not given.\n if (!error) {\n error = new DOMException('The operation was aborted.', 'AbortError')\n }\n\n // 4. Let serializedError be StructuredSerialize(error).\n // If that threw an exception, catch it, and let\n // serializedError be StructuredSerialize(fallbackError).\n\n // 5. Set controller\u2019s serialized abort reason to serializedError.\n this.serializedAbortReason = error\n\n this.connection?.destroy(error)\n this.emit('terminated', error)\n }\n}\n\n// https://fetch.spec.whatwg.org/#fetch-method\nfunction fetch (input, init = {}) {\n webidl.argumentLengthCheck(arguments, 1, { header: 'globalThis.fetch' })\n\n // 1. Let p be a new promise.\n const p = createDeferredPromise()\n\n // 2. Let requestObject be the result of invoking the initial value of\n // Request as constructor with input and init as arguments. If this throws\n // an exception, reject p with it and return p.\n let requestObject\n\n try {\n requestObject = new Request(input, init)\n } catch (e) {\n p.reject(e)\n return p.promise\n }\n\n // 3. Let request be requestObject\u2019s request.\n const request = requestObject[kState]\n\n // 4. If requestObject\u2019s signal\u2019s aborted flag is set, then:\n if (requestObject.signal.aborted) {\n // 1. Abort the fetch() call with p, request, null, and\n // requestObject\u2019s signal\u2019s abort reason.\n abortFetch(p, request, null, requestObject.signal.reason)\n\n // 2. Return p.\n return p.promise\n }\n\n // 5. Let globalObject be request\u2019s client\u2019s global object.\n const globalObject = request.client.globalObject\n\n // 6. If globalObject is a ServiceWorkerGlobalScope object, then set\n // request\u2019s service-workers mode to \"none\".\n if (globalObject?.constructor?.name === 'ServiceWorkerGlobalScope') {\n request.serviceWorkers = 'none'\n }\n\n // 7. Let responseObject be null.\n let responseObject = null\n\n // 8. Let relevantRealm be this\u2019s relevant Realm.\n const relevantRealm = null\n\n // 9. Let locallyAborted be false.\n let locallyAborted = false\n\n // 10. Let controller be null.\n let controller = null\n\n // 11. Add the following abort steps to requestObject\u2019s signal:\n addAbortListener(\n requestObject.signal,\n () => {\n // 1. Set locallyAborted to true.\n locallyAborted = true\n\n // 2. Assert: controller is non-null.\n assert(controller != null)\n\n // 3. Abort controller with requestObject\u2019s signal\u2019s abort reason.\n controller.abort(requestObject.signal.reason)\n\n // 4. Abort the fetch() call with p, request, responseObject,\n // and requestObject\u2019s signal\u2019s abort reason.\n abortFetch(p, request, responseObject, requestObject.signal.reason)\n }\n )\n\n // 12. Let handleFetchDone given response response be to finalize and\n // report timing with response, globalObject, and \"fetch\".\n const handleFetchDone = (response) =>\n finalizeAndReportTiming(response, 'fetch')\n\n // 13. Set controller to the result of calling fetch given request,\n // with processResponseEndOfBody set to handleFetchDone, and processResponse\n // given response being these substeps:\n\n const processResponse = (response) => {\n // 1. If locallyAborted is true, terminate these substeps.\n if (locallyAborted) {\n return Promise.resolve()\n }\n\n // 2. If response\u2019s aborted flag is set, then:\n if (response.aborted) {\n // 1. Let deserializedError be the result of deserialize a serialized\n // abort reason given controller\u2019s serialized abort reason and\n // relevantRealm.\n\n // 2. Abort the fetch() call with p, request, responseObject, and\n // deserializedError.\n\n abortFetch(p, request, responseObject, controller.serializedAbortReason)\n return Promise.resolve()\n }\n\n // 3. If response is a network error, then reject p with a TypeError\n // and terminate these substeps.\n if (response.type === 'error') {\n p.reject(\n Object.assign(new TypeError('fetch failed'), { cause: response.error })\n )\n return Promise.resolve()\n }\n\n // 4. Set responseObject to the result of creating a Response object,\n // given response, \"immutable\", and relevantRealm.\n responseObject = new Response()\n responseObject[kState] = response\n responseObject[kRealm] = relevantRealm\n responseObject[kHeaders][kHeadersList] = response.headersList\n responseObject[kHeaders][kGuard] = 'immutable'\n responseObject[kHeaders][kRealm] = relevantRealm\n\n // 5. Resolve p with responseObject.\n p.resolve(responseObject)\n }\n\n controller = fetching({\n request,\n processResponseEndOfBody: handleFetchDone,\n processResponse,\n dispatcher: init.dispatcher ?? getGlobalDispatcher() // undici\n })\n\n // 14. Return p.\n return p.promise\n}\n\n// https://fetch.spec.whatwg.org/#finalize-and-report-timing\nfunction finalizeAndReportTiming (response, initiatorType = 'other') {\n // 1. If response is an aborted network error, then return.\n if (response.type === 'error' && response.aborted) {\n return\n }\n\n // 2. If response\u2019s URL list is null or empty, then return.\n if (!response.urlList?.length) {\n return\n }\n\n // 3. Let originalURL be response\u2019s URL list[0].\n const originalURL = response.urlList[0]\n\n // 4. Let timingInfo be response\u2019s timing info.\n let timingInfo = response.timingInfo\n\n // 5. Let cacheState be response\u2019s cache state.\n let cacheState = response.cacheState\n\n // 6. If originalURL\u2019s scheme is not an HTTP(S) scheme, then return.\n if (!urlIsHttpHttpsScheme(originalURL)) {\n return\n }\n\n // 7. If timingInfo is null, then return.\n if (timingInfo === null) {\n return\n }\n\n // 8. If response\u2019s timing allow passed flag is not set, then:\n if (!response.timingAllowPassed) {\n // 1. Set timingInfo to a the result of creating an opaque timing info for timingInfo.\n timingInfo = createOpaqueTimingInfo({\n startTime: timingInfo.startTime\n })\n\n // 2. Set cacheState to the empty string.\n cacheState = ''\n }\n\n // 9. Set timingInfo\u2019s end time to the coarsened shared current time\n // given global\u2019s relevant settings object\u2019s cross-origin isolated\n // capability.\n // TODO: given global\u2019s relevant settings object\u2019s cross-origin isolated\n // capability?\n timingInfo.endTime = coarsenedSharedCurrentTime()\n\n // 10. Set response\u2019s timing info to timingInfo.\n response.timingInfo = timingInfo\n\n // 11. Mark resource timing for timingInfo, originalURL, initiatorType,\n // global, and cacheState.\n markResourceTiming(\n timingInfo,\n originalURL,\n initiatorType,\n globalThis,\n cacheState\n )\n}\n\n// https://w3c.github.io/resource-timing/#dfn-mark-resource-timing\nfunction markResourceTiming (timingInfo, originalURL, initiatorType, globalThis, cacheState) {\n if (nodeMajor > 18 || (nodeMajor === 18 && nodeMinor >= 2)) {\n performance.markResourceTiming(timingInfo, originalURL.href, initiatorType, globalThis, cacheState)\n }\n}\n\n// https://fetch.spec.whatwg.org/#abort-fetch\nfunction abortFetch (p, request, responseObject, error) {\n // Note: AbortSignal.reason was added in node v17.2.0\n // which would give us an undefined error to reject with.\n // Remove this once node v16 is no longer supported.\n if (!error) {\n error = new DOMException('The operation was aborted.', 'AbortError')\n }\n\n // 1. Reject promise with error.\n p.reject(error)\n\n // 2. If request\u2019s body is not null and is readable, then cancel request\u2019s\n // body with error.\n if (request.body != null && isReadable(request.body?.stream)) {\n request.body.stream.cancel(error).catch((err) => {\n if (err.code === 'ERR_INVALID_STATE') {\n // Node bug?\n return\n }\n throw err\n })\n }\n\n // 3. If responseObject is null, then return.\n if (responseObject == null) {\n return\n }\n\n // 4. Let response be responseObject\u2019s response.\n const response = responseObject[kState]\n\n // 5. If response\u2019s body is not null and is readable, then error response\u2019s\n // body with error.\n if (response.body != null && isReadable(response.body?.stream)) {\n response.body.stream.cancel(error).catch((err) => {\n if (err.code === 'ERR_INVALID_STATE') {\n // Node bug?\n return\n }\n throw err\n })\n }\n}\n\n// https://fetch.spec.whatwg.org/#fetching\nfunction fetching ({\n request,\n processRequestBodyChunkLength,\n processRequestEndOfBody,\n processResponse,\n processResponseEndOfBody,\n processResponseConsumeBody,\n useParallelQueue = false,\n dispatcher // undici\n}) {\n // 1. Let taskDestination be null.\n let taskDestination = null\n\n // 2. Let crossOriginIsolatedCapability be false.\n let crossOriginIsolatedCapability = false\n\n // 3. If request\u2019s client is non-null, then:\n if (request.client != null) {\n // 1. Set taskDestination to request\u2019s client\u2019s global object.\n taskDestination = request.client.globalObject\n\n // 2. Set crossOriginIsolatedCapability to request\u2019s client\u2019s cross-origin\n // isolated capability.\n crossOriginIsolatedCapability =\n request.client.crossOriginIsolatedCapability\n }\n\n // 4. If useParallelQueue is true, then set taskDestination to the result of\n // starting a new parallel queue.\n // TODO\n\n // 5. Let timingInfo be a new fetch timing info whose start time and\n // post-redirect start time are the coarsened shared current time given\n // crossOriginIsolatedCapability.\n const currenTime = coarsenedSharedCurrentTime(crossOriginIsolatedCapability)\n const timingInfo = createOpaqueTimingInfo({\n startTime: currenTime\n })\n\n // 6. Let fetchParams be a new fetch params whose\n // request is request,\n // timing info is timingInfo,\n // process request body chunk length is processRequestBodyChunkLength,\n // process request end-of-body is processRequestEndOfBody,\n // process response is processResponse,\n // process response consume body is processResponseConsumeBody,\n // process response end-of-body is processResponseEndOfBody,\n // task destination is taskDestination,\n // and cross-origin isolated capability is crossOriginIsolatedCapability.\n const fetchParams = {\n controller: new Fetch(dispatcher),\n request,\n timingInfo,\n processRequestBodyChunkLength,\n processRequestEndOfBody,\n processResponse,\n processResponseConsumeBody,\n processResponseEndOfBody,\n taskDestination,\n crossOriginIsolatedCapability\n }\n\n // 7. If request\u2019s body is a byte sequence, then set request\u2019s body to\n // request\u2019s body as a body.\n // NOTE: Since fetching is only called from fetch, body should already be\n // extracted.\n assert(!request.body || request.body.stream)\n\n // 8. If request\u2019s window is \"client\", then set request\u2019s window to request\u2019s\n // client, if request\u2019s client\u2019s global object is a Window object; otherwise\n // \"no-window\".\n if (request.window === 'client') {\n // TODO: What if request.client is null?\n request.window =\n request.client?.globalObject?.constructor?.name === 'Window'\n ? request.client\n : 'no-window'\n }\n\n // 9. If request\u2019s origin is \"client\", then set request\u2019s origin to request\u2019s\n // client\u2019s origin.\n if (request.origin === 'client') {\n // TODO: What if request.client is null?\n request.origin = request.client?.origin\n }\n\n // 10. If all of the following conditions are true:\n // TODO\n\n // 11. If request\u2019s policy container is \"client\", then:\n if (request.policyContainer === 'client') {\n // 1. If request\u2019s client is non-null, then set request\u2019s policy\n // container to a clone of request\u2019s client\u2019s policy container. [HTML]\n if (request.client != null) {\n request.policyContainer = clonePolicyContainer(\n request.client.policyContainer\n )\n } else {\n // 2. Otherwise, set request\u2019s policy container to a new policy\n // container.\n request.policyContainer = makePolicyContainer()\n }\n }\n\n // 12. If request\u2019s header list does not contain `Accept`, then:\n if (!request.headersList.contains('accept')) {\n // 1. Let value be `*/*`.\n const value = '*/*'\n\n // 2. A user agent should set value to the first matching statement, if\n // any, switching on request\u2019s destination:\n // \"document\"\n // \"frame\"\n // \"iframe\"\n // `text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8`\n // \"image\"\n // `image/png,image/svg+xml,image/*;q=0.8,*/*;q=0.5`\n // \"style\"\n // `text/css,*/*;q=0.1`\n // TODO\n\n // 3. Append `Accept`/value to request\u2019s header list.\n request.headersList.append('accept', value)\n }\n\n // 13. If request\u2019s header list does not contain `Accept-Language`, then\n // user agents should append `Accept-Language`/an appropriate value to\n // request\u2019s header list.\n if (!request.headersList.contains('accept-language')) {\n request.headersList.append('accept-language', '*')\n }\n\n // 14. If request\u2019s priority is null, then use request\u2019s initiator and\n // destination appropriately in setting request\u2019s priority to a\n // user-agent-defined object.\n if (request.priority === null) {\n // TODO\n }\n\n // 15. If request is a subresource request, then:\n if (subresourceSet.has(request.destination)) {\n // TODO\n }\n\n // 16. Run main fetch given fetchParams.\n mainFetch(fetchParams)\n .catch(err => {\n fetchParams.controller.terminate(err)\n })\n\n // 17. Return fetchParam's controller\n return fetchParams.controller\n}\n\n// https://fetch.spec.whatwg.org/#concept-main-fetch\nasync function mainFetch (fetchParams, recursive = false) {\n // 1. Let request be fetchParams\u2019s request.\n const request = fetchParams.request\n\n // 2. Let response be null.\n let response = null\n\n // 3. If request\u2019s local-URLs-only flag is set and request\u2019s current URL is\n // not local, then set response to a network error.\n if (request.localURLsOnly && !urlIsLocal(requestCurrentURL(request))) {\n response = makeNetworkError('local URLs only')\n }\n\n // 4. Run report Content Security Policy violations for request.\n // TODO\n\n // 5. Upgrade request to a potentially trustworthy URL, if appropriate.\n tryUpgradeRequestToAPotentiallyTrustworthyURL(request)\n\n // 6. If should request be blocked due to a bad port, should fetching request\n // be blocked as mixed content, or should request be blocked by Content\n // Security Policy returns blocked, then set response to a network error.\n if (requestBadPort(request) === 'blocked') {\n response = makeNetworkError('bad port')\n }\n // TODO: should fetching request be blocked as mixed content?\n // TODO: should request be blocked by Content Security Policy?\n\n // 7. If request\u2019s referrer policy is the empty string, then set request\u2019s\n // referrer policy to request\u2019s policy container\u2019s referrer policy.\n if (request.referrerPolicy === '') {\n request.referrerPolicy = request.policyContainer.referrerPolicy\n }\n\n // 8. If request\u2019s referrer is not \"no-referrer\", then set request\u2019s\n // referrer to the result of invoking determine request\u2019s referrer.\n if (request.referrer !== 'no-referrer') {\n request.referrer = determineRequestsReferrer(request)\n }\n\n // 9. Set request\u2019s current URL\u2019s scheme to \"https\" if all of the following\n // conditions are true:\n // - request\u2019s current URL\u2019s scheme is \"http\"\n // - request\u2019s current URL\u2019s host is a domain\n // - Matching request\u2019s current URL\u2019s host per Known HSTS Host Domain Name\n // Matching results in either a superdomain match with an asserted\n // includeSubDomains directive or a congruent match (with or without an\n // asserted includeSubDomains directive). [HSTS]\n // TODO\n\n // 10. If recursive is false, then run the remaining steps in parallel.\n // TODO\n\n // 11. If response is null, then set response to the result of running\n // the steps corresponding to the first matching statement:\n if (response === null) {\n response = await (async () => {\n const currentURL = requestCurrentURL(request)\n\n if (\n // - request\u2019s current URL\u2019s origin is same origin with request\u2019s origin,\n // and request\u2019s response tainting is \"basic\"\n (sameOrigin(currentURL, request.url) && request.responseTainting === 'basic') ||\n // request\u2019s current URL\u2019s scheme is \"data\"\n (currentURL.protocol === 'data:') ||\n // - request\u2019s mode is \"navigate\" or \"websocket\"\n (request.mode === 'navigate' || request.mode === 'websocket')\n ) {\n // 1. Set request\u2019s response tainting to \"basic\".\n request.responseTainting = 'basic'\n\n // 2. Return the result of running scheme fetch given fetchParams.\n return await schemeFetch(fetchParams)\n }\n\n // request\u2019s mode is \"same-origin\"\n if (request.mode === 'same-origin') {\n // 1. Return a network error.\n return makeNetworkError('request mode cannot be \"same-origin\"')\n }\n\n // request\u2019s mode is \"no-cors\"\n if (request.mode === 'no-cors') {\n // 1. If request\u2019s redirect mode is not \"follow\", then return a network\n // error.\n if (request.redirect !== 'follow') {\n return makeNetworkError(\n 'redirect mode cannot be \"follow\" for \"no-cors\" request'\n )\n }\n\n // 2. Set request\u2019s response tainting to \"opaque\".\n request.responseTainting = 'opaque'\n\n // 3. Return the result of running scheme fetch given fetchParams.\n return await schemeFetch(fetchParams)\n }\n\n // request\u2019s current URL\u2019s scheme is not an HTTP(S) scheme\n if (!urlIsHttpHttpsScheme(requestCurrentURL(request))) {\n // Return a network error.\n return makeNetworkError('URL scheme must be a HTTP(S) scheme')\n }\n\n // - request\u2019s use-CORS-preflight flag is set\n // - request\u2019s unsafe-request flag is set and either request\u2019s method is\n // not a CORS-safelisted method or CORS-unsafe request-header names with\n // request\u2019s header list is not empty\n // 1. Set request\u2019s response tainting to \"cors\".\n // 2. Let corsWithPreflightResponse be the result of running HTTP fetch\n // given fetchParams and true.\n // 3. If corsWithPreflightResponse is a network error, then clear cache\n // entries using request.\n // 4. Return corsWithPreflightResponse.\n // TODO\n\n // Otherwise\n // 1. Set request\u2019s response tainting to \"cors\".\n request.responseTainting = 'cors'\n\n // 2. Return the result of running HTTP fetch given fetchParams.\n return await httpFetch(fetchParams)\n })()\n }\n\n // 12. If recursive is true, then return response.\n if (recursive) {\n return response\n }\n\n // 13. If response is not a network error and response is not a filtered\n // response, then:\n if (response.status !== 0 && !response.internalResponse) {\n // If request\u2019s response tainting is \"cors\", then:\n if (request.responseTainting === 'cors') {\n // 1. Let headerNames be the result of extracting header list values\n // given `Access-Control-Expose-Headers` and response\u2019s header list.\n // TODO\n // 2. If request\u2019s credentials mode is not \"include\" and headerNames\n // contains `*`, then set response\u2019s CORS-exposed header-name list to\n // all unique header names in response\u2019s header list.\n // TODO\n // 3. Otherwise, if headerNames is not null or failure, then set\n // response\u2019s CORS-exposed header-name list to headerNames.\n // TODO\n }\n\n // Set response to the following filtered response with response as its\n // internal response, depending on request\u2019s response tainting:\n if (request.responseTainting === 'basic') {\n response = filterResponse(response, 'basic')\n } else if (request.responseTainting === 'cors') {\n response = filterResponse(response, 'cors')\n } else if (request.responseTainting === 'opaque') {\n response = filterResponse(response, 'opaque')\n } else {\n assert(false)\n }\n }\n\n // 14. Let internalResponse be response, if response is a network error,\n // and response\u2019s internal response otherwise.\n let internalResponse =\n response.status === 0 ? response : response.internalResponse\n\n // 15. If internalResponse\u2019s URL list is empty, then set it to a clone of\n // request\u2019s URL list.\n if (internalResponse.urlList.length === 0) {\n internalResponse.urlList.push(...request.urlList)\n }\n\n // 16. If request\u2019s timing allow failed flag is unset, then set\n // internalResponse\u2019s timing allow passed flag.\n if (!request.timingAllowFailed) {\n response.timingAllowPassed = true\n }\n\n // 17. If response is not a network error and any of the following returns\n // blocked\n // - should internalResponse to request be blocked as mixed content\n // - should internalResponse to request be blocked by Content Security Policy\n // - should internalResponse to request be blocked due to its MIME type\n // - should internalResponse to request be blocked due to nosniff\n // TODO\n\n // 18. If response\u2019s type is \"opaque\", internalResponse\u2019s status is 206,\n // internalResponse\u2019s range-requested flag is set, and request\u2019s header\n // list does not contain `Range`, then set response and internalResponse\n // to a network error.\n if (\n response.type === 'opaque' &&\n internalResponse.status === 206 &&\n internalResponse.rangeRequested &&\n !request.headers.contains('range')\n ) {\n response = internalResponse = makeNetworkError()\n }\n\n // 19. If response is not a network error and either request\u2019s method is\n // `HEAD` or `CONNECT`, or internalResponse\u2019s status is a null body status,\n // set internalResponse\u2019s body to null and disregard any enqueuing toward\n // it (if any).\n if (\n response.status !== 0 &&\n (request.method === 'HEAD' ||\n request.method === 'CONNECT' ||\n nullBodyStatus.includes(internalResponse.status))\n ) {\n internalResponse.body = null\n fetchParams.controller.dump = true\n }\n\n // 20. If request\u2019s integrity metadata is not the empty string, then:\n if (request.integrity) {\n // 1. Let processBodyError be this step: run fetch finale given fetchParams\n // and a network error.\n const processBodyError = (reason) =>\n fetchFinale(fetchParams, makeNetworkError(reason))\n\n // 2. If request\u2019s response tainting is \"opaque\", or response\u2019s body is null,\n // then run processBodyError and abort these steps.\n if (request.responseTainting === 'opaque' || response.body == null) {\n processBodyError(response.error)\n return\n }\n\n // 3. Let processBody given bytes be these steps:\n const processBody = (bytes) => {\n // 1. If bytes do not match request\u2019s integrity metadata,\n // then run processBodyError and abort these steps. [SRI]\n if (!bytesMatch(bytes, request.integrity)) {\n processBodyError('integrity mismatch')\n return\n }\n\n // 2. Set response\u2019s body to bytes as a body.\n response.body = safelyExtractBody(bytes)[0]\n\n // 3. Run fetch finale given fetchParams and response.\n fetchFinale(fetchParams, response)\n }\n\n // 4. Fully read response\u2019s body given processBody and processBodyError.\n await fullyReadBody(response.body, processBody, processBodyError)\n } else {\n // 21. Otherwise, run fetch finale given fetchParams and response.\n fetchFinale(fetchParams, response)\n }\n}\n\n// https://fetch.spec.whatwg.org/#concept-scheme-fetch\n// given a fetch params fetchParams\nfunction schemeFetch (fetchParams) {\n // Note: since the connection is destroyed on redirect, which sets fetchParams to a\n // cancelled state, we do not want this condition to trigger *unless* there have been\n // no redirects. See https://github.com/nodejs/undici/issues/1776\n // 1. If fetchParams is canceled, then return the appropriate network error for fetchParams.\n if (isCancelled(fetchParams) && fetchParams.request.redirectCount === 0) {\n return Promise.resolve(makeAppropriateNetworkError(fetchParams))\n }\n\n // 2. Let request be fetchParams\u2019s request.\n const { request } = fetchParams\n\n const { protocol: scheme } = requestCurrentURL(request)\n\n // 3. Switch on request\u2019s current URL\u2019s scheme and run the associated steps:\n switch (scheme) {\n case 'about:': {\n // If request\u2019s current URL\u2019s path is the string \"blank\", then return a new response\n // whose status message is `OK`, header list is \u00AB (`Content-Type`, `text/html;charset=utf-8`) \u00BB,\n // and body is the empty byte sequence as a body.\n\n // Otherwise, return a network error.\n return Promise.resolve(makeNetworkError('about scheme is not supported'))\n }\n case 'blob:': {\n if (!resolveObjectURL) {\n resolveObjectURL = require('buffer').resolveObjectURL\n }\n\n // 1. Let blobURLEntry be request\u2019s current URL\u2019s blob URL entry.\n const blobURLEntry = requestCurrentURL(request)\n\n // https://github.com/web-platform-tests/wpt/blob/7b0ebaccc62b566a1965396e5be7bb2bc06f841f/FileAPI/url/resources/fetch-tests.js#L52-L56\n // Buffer.resolveObjectURL does not ignore URL queries.\n if (blobURLEntry.search.length !== 0) {\n return Promise.resolve(makeNetworkError('NetworkError when attempting to fetch resource.'))\n }\n\n const blobURLEntryObject = resolveObjectURL(blobURLEntry.toString())\n\n // 2. If request\u2019s method is not `GET`, blobURLEntry is null, or blobURLEntry\u2019s\n // object is not a Blob object, then return a network error.\n if (request.method !== 'GET' || !isBlobLike(blobURLEntryObject)) {\n return Promise.resolve(makeNetworkError('invalid method'))\n }\n\n // 3. Let bodyWithType be the result of safely extracting blobURLEntry\u2019s object.\n const bodyWithType = safelyExtractBody(blobURLEntryObject)\n\n // 4. Let body be bodyWithType\u2019s body.\n const body = bodyWithType[0]\n\n // 5. Let length be body\u2019s length, serialized and isomorphic encoded.\n const length = isomorphicEncode(`${body.length}`)\n\n // 6. Let type be bodyWithType\u2019s type if it is non-null; otherwise the empty byte sequence.\n const type = bodyWithType[1] ?? ''\n\n // 7. Return a new response whose status message is `OK`, header list is\n // \u00AB (`Content-Length`, length), (`Content-Type`, type) \u00BB, and body is body.\n const response = makeResponse({\n statusText: 'OK',\n headersList: [\n ['content-length', { name: 'Content-Length', value: length }],\n ['content-type', { name: 'Content-Type', value: type }]\n ]\n })\n\n response.body = body\n\n return Promise.resolve(response)\n }\n case 'data:': {\n // 1. Let dataURLStruct be the result of running the\n // data: URL processor on request\u2019s current URL.\n const currentURL = requestCurrentURL(request)\n const dataURLStruct = dataURLProcessor(currentURL)\n\n // 2. If dataURLStruct is failure, then return a\n // network error.\n if (dataURLStruct === 'failure') {\n return Promise.resolve(makeNetworkError('failed to fetch the data URL'))\n }\n\n // 3. Let mimeType be dataURLStruct\u2019s MIME type, serialized.\n const mimeType = serializeAMimeType(dataURLStruct.mimeType)\n\n // 4. Return a response whose status message is `OK`,\n // header list is \u00AB (`Content-Type`, mimeType) \u00BB,\n // and body is dataURLStruct\u2019s body as a body.\n return Promise.resolve(makeResponse({\n statusText: 'OK',\n headersList: [\n ['content-type', { name: 'Content-Type', value: mimeType }]\n ],\n body: safelyExtractBody(dataURLStruct.body)[0]\n }))\n }\n case 'file:': {\n // For now, unfortunate as it is, file URLs are left as an exercise for the reader.\n // When in doubt, return a network error.\n return Promise.resolve(makeNetworkError('not implemented... yet...'))\n }\n case 'http:':\n case 'https:': {\n // Return the result of running HTTP fetch given fetchParams.\n\n return httpFetch(fetchParams)\n .catch((err) => makeNetworkError(err))\n }\n default: {\n return Promise.resolve(makeNetworkError('unknown scheme'))\n }\n }\n}\n\n// https://fetch.spec.whatwg.org/#finalize-response\nfunction finalizeResponse (fetchParams, response) {\n // 1. Set fetchParams\u2019s request\u2019s done flag.\n fetchParams.request.done = true\n\n // 2, If fetchParams\u2019s process response done is not null, then queue a fetch\n // task to run fetchParams\u2019s process response done given response, with\n // fetchParams\u2019s task destination.\n if (fetchParams.processResponseDone != null) {\n queueMicrotask(() => fetchParams.processResponseDone(response))\n }\n}\n\n// https://fetch.spec.whatwg.org/#fetch-finale\nfunction fetchFinale (fetchParams, response) {\n // 1. If response is a network error, then:\n if (response.type === 'error') {\n // 1. Set response\u2019s URL list to \u00AB fetchParams\u2019s request\u2019s URL list[0] \u00BB.\n response.urlList = [fetchParams.request.urlList[0]]\n\n // 2. Set response\u2019s timing info to the result of creating an opaque timing\n // info for fetchParams\u2019s timing info.\n response.timingInfo = createOpaqueTimingInfo({\n startTime: fetchParams.timingInfo.startTime\n })\n }\n\n // 2. Let processResponseEndOfBody be the following steps:\n const processResponseEndOfBody = () => {\n // 1. Set fetchParams\u2019s request\u2019s done flag.\n fetchParams.request.done = true\n\n // If fetchParams\u2019s process response end-of-body is not null,\n // then queue a fetch task to run fetchParams\u2019s process response\n // end-of-body given response with fetchParams\u2019s task destination.\n if (fetchParams.processResponseEndOfBody != null) {\n queueMicrotask(() => fetchParams.processResponseEndOfBody(response))\n }\n }\n\n // 3. If fetchParams\u2019s process response is non-null, then queue a fetch task\n // to run fetchParams\u2019s process response given response, with fetchParams\u2019s\n // task destination.\n if (fetchParams.processResponse != null) {\n queueMicrotask(() => fetchParams.processResponse(response))\n }\n\n // 4. If response\u2019s body is null, then run processResponseEndOfBody.\n if (response.body == null) {\n processResponseEndOfBody()\n } else {\n // 5. Otherwise:\n\n // 1. Let transformStream be a new a TransformStream.\n\n // 2. Let identityTransformAlgorithm be an algorithm which, given chunk,\n // enqueues chunk in transformStream.\n const identityTransformAlgorithm = (chunk, controller) => {\n controller.enqueue(chunk)\n }\n\n // 3. Set up transformStream with transformAlgorithm set to identityTransformAlgorithm\n // and flushAlgorithm set to processResponseEndOfBody.\n const transformStream = new TransformStream({\n start () {},\n transform: identityTransformAlgorithm,\n flush: processResponseEndOfBody\n }, {\n size () {\n return 1\n }\n }, {\n size () {\n return 1\n }\n })\n\n // 4. Set response\u2019s body to the result of piping response\u2019s body through transformStream.\n response.body = { stream: response.body.stream.pipeThrough(transformStream) }\n }\n\n // 6. If fetchParams\u2019s process response consume body is non-null, then:\n if (fetchParams.processResponseConsumeBody != null) {\n // 1. Let processBody given nullOrBytes be this step: run fetchParams\u2019s\n // process response consume body given response and nullOrBytes.\n const processBody = (nullOrBytes) => fetchParams.processResponseConsumeBody(response, nullOrBytes)\n\n // 2. Let processBodyError be this step: run fetchParams\u2019s process\n // response consume body given response and failure.\n const processBodyError = (failure) => fetchParams.processResponseConsumeBody(response, failure)\n\n // 3. If response\u2019s body is null, then queue a fetch task to run processBody\n // given null, with fetchParams\u2019s task destination.\n if (response.body == null) {\n queueMicrotask(() => processBody(null))\n } else {\n // 4. Otherwise, fully read response\u2019s body given processBody, processBodyError,\n // and fetchParams\u2019s task destination.\n return fullyReadBody(response.body, processBody, processBodyError)\n }\n return Promise.resolve()\n }\n}\n\n// https://fetch.spec.whatwg.org/#http-fetch\nasync function httpFetch (fetchParams) {\n // 1. Let request be fetchParams\u2019s request.\n const request = fetchParams.request\n\n // 2. Let response be null.\n let response = null\n\n // 3. Let actualResponse be null.\n let actualResponse = null\n\n // 4. Let timingInfo be fetchParams\u2019s timing info.\n const timingInfo = fetchParams.timingInfo\n\n // 5. If request\u2019s service-workers mode is \"all\", then:\n if (request.serviceWorkers === 'all') {\n // TODO\n }\n\n // 6. If response is null, then:\n if (response === null) {\n // 1. If makeCORSPreflight is true and one of these conditions is true:\n // TODO\n\n // 2. If request\u2019s redirect mode is \"follow\", then set request\u2019s\n // service-workers mode to \"none\".\n if (request.redirect === 'follow') {\n request.serviceWorkers = 'none'\n }\n\n // 3. Set response and actualResponse to the result of running\n // HTTP-network-or-cache fetch given fetchParams.\n actualResponse = response = await httpNetworkOrCacheFetch(fetchParams)\n\n // 4. If request\u2019s response tainting is \"cors\" and a CORS check\n // for request and response returns failure, then return a network error.\n if (\n request.responseTainting === 'cors' &&\n corsCheck(request, response) === 'failure'\n ) {\n return makeNetworkError('cors failure')\n }\n\n // 5. If the TAO check for request and response returns failure, then set\n // request\u2019s timing allow failed flag.\n if (TAOCheck(request, response) === 'failure') {\n request.timingAllowFailed = true\n }\n }\n\n // 7. If either request\u2019s response tainting or response\u2019s type\n // is \"opaque\", and the cross-origin resource policy check with\n // request\u2019s origin, request\u2019s client, request\u2019s destination,\n // and actualResponse returns blocked, then return a network error.\n if (\n (request.responseTainting === 'opaque' || response.type === 'opaque') &&\n crossOriginResourcePolicyCheck(\n request.origin,\n request.client,\n request.destination,\n actualResponse\n ) === 'blocked'\n ) {\n return makeNetworkError('blocked')\n }\n\n // 8. If actualResponse\u2019s status is a redirect status, then:\n if (redirectStatusSet.has(actualResponse.status)) {\n // 1. If actualResponse\u2019s status is not 303, request\u2019s body is not null,\n // and the connection uses HTTP/2, then user agents may, and are even\n // encouraged to, transmit an RST_STREAM frame.\n // See, https://github.com/whatwg/fetch/issues/1288\n if (request.redirect !== 'manual') {\n fetchParams.controller.connection.destroy()\n }\n\n // 2. Switch on request\u2019s redirect mode:\n if (request.redirect === 'error') {\n // Set response to a network error.\n response = makeNetworkError('unexpected redirect')\n } else if (request.redirect === 'manual') {\n // Set response to an opaque-redirect filtered response whose internal\n // response is actualResponse.\n // NOTE(spec): On the web this would return an `opaqueredirect` response,\n // but that doesn't make sense server side.\n // See https://github.com/nodejs/undici/issues/1193.\n response = actualResponse\n } else if (request.redirect === 'follow') {\n // Set response to the result of running HTTP-redirect fetch given\n // fetchParams and response.\n response = await httpRedirectFetch(fetchParams, response)\n } else {\n assert(false)\n }\n }\n\n // 9. Set response\u2019s timing info to timingInfo.\n response.timingInfo = timingInfo\n\n // 10. Return response.\n return response\n}\n\n// https://fetch.spec.whatwg.org/#http-redirect-fetch\nfunction httpRedirectFetch (fetchParams, response) {\n // 1. Let request be fetchParams\u2019s request.\n const request = fetchParams.request\n\n // 2. Let actualResponse be response, if response is not a filtered response,\n // and response\u2019s internal response otherwise.\n const actualResponse = response.internalResponse\n ? response.internalResponse\n : response\n\n // 3. Let locationURL be actualResponse\u2019s location URL given request\u2019s current\n // URL\u2019s fragment.\n let locationURL\n\n try {\n locationURL = responseLocationURL(\n actualResponse,\n requestCurrentURL(request).hash\n )\n\n // 4. If locationURL is null, then return response.\n if (locationURL == null) {\n return response\n }\n } catch (err) {\n // 5. If locationURL is failure, then return a network error.\n return Promise.resolve(makeNetworkError(err))\n }\n\n // 6. If locationURL\u2019s scheme is not an HTTP(S) scheme, then return a network\n // error.\n if (!urlIsHttpHttpsScheme(locationURL)) {\n return Promise.resolve(makeNetworkError('URL scheme must be a HTTP(S) scheme'))\n }\n\n // 7. If request\u2019s redirect count is 20, then return a network error.\n if (request.redirectCount === 20) {\n return Promise.resolve(makeNetworkError('redirect count exceeded'))\n }\n\n // 8. Increase request\u2019s redirect count by 1.\n request.redirectCount += 1\n\n // 9. If request\u2019s mode is \"cors\", locationURL includes credentials, and\n // request\u2019s origin is not same origin with locationURL\u2019s origin, then return\n // a network error.\n if (\n request.mode === 'cors' &&\n (locationURL.username || locationURL.password) &&\n !sameOrigin(request, locationURL)\n ) {\n return Promise.resolve(makeNetworkError('cross origin not allowed for request mode \"cors\"'))\n }\n\n // 10. If request\u2019s response tainting is \"cors\" and locationURL includes\n // credentials, then return a network error.\n if (\n request.responseTainting === 'cors' &&\n (locationURL.username || locationURL.password)\n ) {\n return Promise.resolve(makeNetworkError(\n 'URL cannot contain credentials for request mode \"cors\"'\n ))\n }\n\n // 11. If actualResponse\u2019s status is not 303, request\u2019s body is non-null,\n // and request\u2019s body\u2019s source is null, then return a network error.\n if (\n actualResponse.status !== 303 &&\n request.body != null &&\n request.body.source == null\n ) {\n return Promise.resolve(makeNetworkError())\n }\n\n // 12. If one of the following is true\n // - actualResponse\u2019s status is 301 or 302 and request\u2019s method is `POST`\n // - actualResponse\u2019s status is 303 and request\u2019s method is not `GET` or `HEAD`\n if (\n ([301, 302].includes(actualResponse.status) && request.method === 'POST') ||\n (actualResponse.status === 303 &&\n !GET_OR_HEAD.includes(request.method))\n ) {\n // then:\n // 1. Set request\u2019s method to `GET` and request\u2019s body to null.\n request.method = 'GET'\n request.body = null\n\n // 2. For each headerName of request-body-header name, delete headerName from\n // request\u2019s header list.\n for (const headerName of requestBodyHeader) {\n request.headersList.delete(headerName)\n }\n }\n\n // 13. If request\u2019s current URL\u2019s origin is not same origin with locationURL\u2019s\n // origin, then for each headerName of CORS non-wildcard request-header name,\n // delete headerName from request\u2019s header list.\n if (!sameOrigin(requestCurrentURL(request), locationURL)) {\n // https://fetch.spec.whatwg.org/#cors-non-wildcard-request-header-name\n request.headersList.delete('authorization')\n\n // https://fetch.spec.whatwg.org/#authentication-entries\n request.headersList.delete('proxy-authorization', true)\n\n // \"Cookie\" and \"Host\" are forbidden request-headers, which undici doesn't implement.\n request.headersList.delete('cookie')\n request.headersList.delete('host')\n }\n\n // 14. If request\u2019s body is non-null, then set request\u2019s body to the first return\n // value of safely extracting request\u2019s body\u2019s source.\n if (request.body != null) {\n assert(request.body.source != null)\n request.body = safelyExtractBody(request.body.source)[0]\n }\n\n // 15. Let timingInfo be fetchParams\u2019s timing info.\n const timingInfo = fetchParams.timingInfo\n\n // 16. Set timingInfo\u2019s redirect end time and post-redirect start time to the\n // coarsened shared current time given fetchParams\u2019s cross-origin isolated\n // capability.\n timingInfo.redirectEndTime = timingInfo.postRedirectStartTime =\n coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability)\n\n // 17. If timingInfo\u2019s redirect start time is 0, then set timingInfo\u2019s\n // redirect start time to timingInfo\u2019s start time.\n if (timingInfo.redirectStartTime === 0) {\n timingInfo.redirectStartTime = timingInfo.startTime\n }\n\n // 18. Append locationURL to request\u2019s URL list.\n request.urlList.push(locationURL)\n\n // 19. Invoke set request\u2019s referrer policy on redirect on request and\n // actualResponse.\n setRequestReferrerPolicyOnRedirect(request, actualResponse)\n\n // 20. Return the result of running main fetch given fetchParams and true.\n return mainFetch(fetchParams, true)\n}\n\n// https://fetch.spec.whatwg.org/#http-network-or-cache-fetch\nasync function httpNetworkOrCacheFetch (\n fetchParams,\n isAuthenticationFetch = false,\n isNewConnectionFetch = false\n) {\n // 1. Let request be fetchParams\u2019s request.\n const request = fetchParams.request\n\n // 2. Let httpFetchParams be null.\n let httpFetchParams = null\n\n // 3. Let httpRequest be null.\n let httpRequest = null\n\n // 4. Let response be null.\n let response = null\n\n // 5. Let storedResponse be null.\n // TODO: cache\n\n // 6. Let httpCache be null.\n const httpCache = null\n\n // 7. Let the revalidatingFlag be unset.\n const revalidatingFlag = false\n\n // 8. Run these steps, but abort when the ongoing fetch is terminated:\n\n // 1. If request\u2019s window is \"no-window\" and request\u2019s redirect mode is\n // \"error\", then set httpFetchParams to fetchParams and httpRequest to\n // request.\n if (request.window === 'no-window' && request.redirect === 'error') {\n httpFetchParams = fetchParams\n httpRequest = request\n } else {\n // Otherwise:\n\n // 1. Set httpRequest to a clone of request.\n httpRequest = makeRequest(request)\n\n // 2. Set httpFetchParams to a copy of fetchParams.\n httpFetchParams = { ...fetchParams }\n\n // 3. Set httpFetchParams\u2019s request to httpRequest.\n httpFetchParams.request = httpRequest\n }\n\n // 3. Let includeCredentials be true if one of\n const includeCredentials =\n request.credentials === 'include' ||\n (request.credentials === 'same-origin' &&\n request.responseTainting === 'basic')\n\n // 4. Let contentLength be httpRequest\u2019s body\u2019s length, if httpRequest\u2019s\n // body is non-null; otherwise null.\n const contentLength = httpRequest.body ? httpRequest.body.length : null\n\n // 5. Let contentLengthHeaderValue be null.\n let contentLengthHeaderValue = null\n\n // 6. If httpRequest\u2019s body is null and httpRequest\u2019s method is `POST` or\n // `PUT`, then set contentLengthHeaderValue to `0`.\n if (\n httpRequest.body == null &&\n ['POST', 'PUT'].includes(httpRequest.method)\n ) {\n contentLengthHeaderValue = '0'\n }\n\n // 7. If contentLength is non-null, then set contentLengthHeaderValue to\n // contentLength, serialized and isomorphic encoded.\n if (contentLength != null) {\n contentLengthHeaderValue = isomorphicEncode(`${contentLength}`)\n }\n\n // 8. If contentLengthHeaderValue is non-null, then append\n // `Content-Length`/contentLengthHeaderValue to httpRequest\u2019s header\n // list.\n if (contentLengthHeaderValue != null) {\n httpRequest.headersList.append('content-length', contentLengthHeaderValue)\n }\n\n // 9. If contentLengthHeaderValue is non-null, then append (`Content-Length`,\n // contentLengthHeaderValue) to httpRequest\u2019s header list.\n\n // 10. If contentLength is non-null and httpRequest\u2019s keepalive is true,\n // then:\n if (contentLength != null && httpRequest.keepalive) {\n // NOTE: keepalive is a noop outside of browser context.\n }\n\n // 11. If httpRequest\u2019s referrer is a URL, then append\n // `Referer`/httpRequest\u2019s referrer, serialized and isomorphic encoded,\n // to httpRequest\u2019s header list.\n if (httpRequest.referrer instanceof URL) {\n httpRequest.headersList.append('referer', isomorphicEncode(httpRequest.referrer.href))\n }\n\n // 12. Append a request `Origin` header for httpRequest.\n appendRequestOriginHeader(httpRequest)\n\n // 13. Append the Fetch metadata headers for httpRequest. [FETCH-METADATA]\n appendFetchMetadata(httpRequest)\n\n // 14. If httpRequest\u2019s header list does not contain `User-Agent`, then\n // user agents should append `User-Agent`/default `User-Agent` value to\n // httpRequest\u2019s header list.\n if (!httpRequest.headersList.contains('user-agent')) {\n httpRequest.headersList.append('user-agent', typeof esbuildDetection === 'undefined' ? 'undici' : 'node')\n }\n\n // 15. If httpRequest\u2019s cache mode is \"default\" and httpRequest\u2019s header\n // list contains `If-Modified-Since`, `If-None-Match`,\n // `If-Unmodified-Since`, `If-Match`, or `If-Range`, then set\n // httpRequest\u2019s cache mode to \"no-store\".\n if (\n httpRequest.cache === 'default' &&\n (httpRequest.headersList.contains('if-modified-since') ||\n httpRequest.headersList.contains('if-none-match') ||\n httpRequest.headersList.contains('if-unmodified-since') ||\n httpRequest.headersList.contains('if-match') ||\n httpRequest.headersList.contains('if-range'))\n ) {\n httpRequest.cache = 'no-store'\n }\n\n // 16. If httpRequest\u2019s cache mode is \"no-cache\", httpRequest\u2019s prevent\n // no-cache cache-control header modification flag is unset, and\n // httpRequest\u2019s header list does not contain `Cache-Control`, then append\n // `Cache-Control`/`max-age=0` to httpRequest\u2019s header list.\n if (\n httpRequest.cache === 'no-cache' &&\n !httpRequest.preventNoCacheCacheControlHeaderModification &&\n !httpRequest.headersList.contains('cache-control')\n ) {\n httpRequest.headersList.append('cache-control', 'max-age=0')\n }\n\n // 17. If httpRequest\u2019s cache mode is \"no-store\" or \"reload\", then:\n if (httpRequest.cache === 'no-store' || httpRequest.cache === 'reload') {\n // 1. If httpRequest\u2019s header list does not contain `Pragma`, then append\n // `Pragma`/`no-cache` to httpRequest\u2019s header list.\n if (!httpRequest.headersList.contains('pragma')) {\n httpRequest.headersList.append('pragma', 'no-cache')\n }\n\n // 2. If httpRequest\u2019s header list does not contain `Cache-Control`,\n // then append `Cache-Control`/`no-cache` to httpRequest\u2019s header list.\n if (!httpRequest.headersList.contains('cache-control')) {\n httpRequest.headersList.append('cache-control', 'no-cache')\n }\n }\n\n // 18. If httpRequest\u2019s header list contains `Range`, then append\n // `Accept-Encoding`/`identity` to httpRequest\u2019s header list.\n if (httpRequest.headersList.contains('range')) {\n httpRequest.headersList.append('accept-encoding', 'identity')\n }\n\n // 19. Modify httpRequest\u2019s header list per HTTP. Do not append a given\n // header if httpRequest\u2019s header list contains that header\u2019s name.\n // TODO: https://github.com/whatwg/fetch/issues/1285#issuecomment-896560129\n if (!httpRequest.headersList.contains('accept-encoding')) {\n if (urlHasHttpsScheme(requestCurrentURL(httpRequest))) {\n httpRequest.headersList.append('accept-encoding', 'br, gzip, deflate')\n } else {\n httpRequest.headersList.append('accept-encoding', 'gzip, deflate')\n }\n }\n\n httpRequest.headersList.delete('host')\n\n // 20. If includeCredentials is true, then:\n if (includeCredentials) {\n // 1. If the user agent is not configured to block cookies for httpRequest\n // (see section 7 of [COOKIES]), then:\n // TODO: credentials\n // 2. If httpRequest\u2019s header list does not contain `Authorization`, then:\n // TODO: credentials\n }\n\n // 21. If there\u2019s a proxy-authentication entry, use it as appropriate.\n // TODO: proxy-authentication\n\n // 22. Set httpCache to the result of determining the HTTP cache\n // partition, given httpRequest.\n // TODO: cache\n\n // 23. If httpCache is null, then set httpRequest\u2019s cache mode to\n // \"no-store\".\n if (httpCache == null) {\n httpRequest.cache = 'no-store'\n }\n\n // 24. If httpRequest\u2019s cache mode is neither \"no-store\" nor \"reload\",\n // then:\n if (httpRequest.mode !== 'no-store' && httpRequest.mode !== 'reload') {\n // TODO: cache\n }\n\n // 9. If aborted, then return the appropriate network error for fetchParams.\n // TODO\n\n // 10. If response is null, then:\n if (response == null) {\n // 1. If httpRequest\u2019s cache mode is \"only-if-cached\", then return a\n // network error.\n if (httpRequest.mode === 'only-if-cached') {\n return makeNetworkError('only if cached')\n }\n\n // 2. Let forwardResponse be the result of running HTTP-network fetch\n // given httpFetchParams, includeCredentials, and isNewConnectionFetch.\n const forwardResponse = await httpNetworkFetch(\n httpFetchParams,\n includeCredentials,\n isNewConnectionFetch\n )\n\n // 3. If httpRequest\u2019s method is unsafe and forwardResponse\u2019s status is\n // in the range 200 to 399, inclusive, invalidate appropriate stored\n // responses in httpCache, as per the \"Invalidation\" chapter of HTTP\n // Caching, and set storedResponse to null. [HTTP-CACHING]\n if (\n !safeMethodsSet.has(httpRequest.method) &&\n forwardResponse.status >= 200 &&\n forwardResponse.status <= 399\n ) {\n // TODO: cache\n }\n\n // 4. If the revalidatingFlag is set and forwardResponse\u2019s status is 304,\n // then:\n if (revalidatingFlag && forwardResponse.status === 304) {\n // TODO: cache\n }\n\n // 5. If response is null, then:\n if (response == null) {\n // 1. Set response to forwardResponse.\n response = forwardResponse\n\n // 2. Store httpRequest and forwardResponse in httpCache, as per the\n // \"Storing Responses in Caches\" chapter of HTTP Caching. [HTTP-CACHING]\n // TODO: cache\n }\n }\n\n // 11. Set response\u2019s URL list to a clone of httpRequest\u2019s URL list.\n response.urlList = [...httpRequest.urlList]\n\n // 12. If httpRequest\u2019s header list contains `Range`, then set response\u2019s\n // range-requested flag.\n if (httpRequest.headersList.contains('range')) {\n response.rangeRequested = true\n }\n\n // 13. Set response\u2019s request-includes-credentials to includeCredentials.\n response.requestIncludesCredentials = includeCredentials\n\n // 14. If response\u2019s status is 401, httpRequest\u2019s response tainting is not\n // \"cors\", includeCredentials is true, and request\u2019s window is an environment\n // settings object, then:\n // TODO\n\n // 15. If response\u2019s status is 407, then:\n if (response.status === 407) {\n // 1. If request\u2019s window is \"no-window\", then return a network error.\n if (request.window === 'no-window') {\n return makeNetworkError()\n }\n\n // 2. ???\n\n // 3. If fetchParams is canceled, then return the appropriate network error for fetchParams.\n if (isCancelled(fetchParams)) {\n return makeAppropriateNetworkError(fetchParams)\n }\n\n // 4. Prompt the end user as appropriate in request\u2019s window and store\n // the result as a proxy-authentication entry. [HTTP-AUTH]\n // TODO: Invoke some kind of callback?\n\n // 5. Set response to the result of running HTTP-network-or-cache fetch given\n // fetchParams.\n // TODO\n return makeNetworkError('proxy authentication required')\n }\n\n // 16. If all of the following are true\n if (\n // response\u2019s status is 421\n response.status === 421 &&\n // isNewConnectionFetch is false\n !isNewConnectionFetch &&\n // request\u2019s body is null, or request\u2019s body is non-null and request\u2019s body\u2019s source is non-null\n (request.body == null || request.body.source != null)\n ) {\n // then:\n\n // 1. If fetchParams is canceled, then return the appropriate network error for fetchParams.\n if (isCancelled(fetchParams)) {\n return makeAppropriateNetworkError(fetchParams)\n }\n\n // 2. Set response to the result of running HTTP-network-or-cache\n // fetch given fetchParams, isAuthenticationFetch, and true.\n\n // TODO (spec): The spec doesn't specify this but we need to cancel\n // the active response before we can start a new one.\n // https://github.com/whatwg/fetch/issues/1293\n fetchParams.controller.connection.destroy()\n\n response = await httpNetworkOrCacheFetch(\n fetchParams,\n isAuthenticationFetch,\n true\n )\n }\n\n // 17. If isAuthenticationFetch is true, then create an authentication entry\n if (isAuthenticationFetch) {\n // TODO\n }\n\n // 18. Return response.\n return response\n}\n\n// https://fetch.spec.whatwg.org/#http-network-fetch\nasync function httpNetworkFetch (\n fetchParams,\n includeCredentials = false,\n forceNewConnection = false\n) {\n assert(!fetchParams.controller.connection || fetchParams.controller.connection.destroyed)\n\n fetchParams.controller.connection = {\n abort: null,\n destroyed: false,\n destroy (err) {\n if (!this.destroyed) {\n this.destroyed = true\n this.abort?.(err ?? new DOMException('The operation was aborted.', 'AbortError'))\n }\n }\n }\n\n // 1. Let request be fetchParams\u2019s request.\n const request = fetchParams.request\n\n // 2. Let response be null.\n let response = null\n\n // 3. Let timingInfo be fetchParams\u2019s timing info.\n const timingInfo = fetchParams.timingInfo\n\n // 4. Let httpCache be the result of determining the HTTP cache partition,\n // given request.\n // TODO: cache\n const httpCache = null\n\n // 5. If httpCache is null, then set request\u2019s cache mode to \"no-store\".\n if (httpCache == null) {\n request.cache = 'no-store'\n }\n\n // 6. Let networkPartitionKey be the result of determining the network\n // partition key given request.\n // TODO\n\n // 7. Let newConnection be \"yes\" if forceNewConnection is true; otherwise\n // \"no\".\n const newConnection = forceNewConnection ? 'yes' : 'no' // eslint-disable-line no-unused-vars\n\n // 8. Switch on request\u2019s mode:\n if (request.mode === 'websocket') {\n // Let connection be the result of obtaining a WebSocket connection,\n // given request\u2019s current URL.\n // TODO\n } else {\n // Let connection be the result of obtaining a connection, given\n // networkPartitionKey, request\u2019s current URL\u2019s origin,\n // includeCredentials, and forceNewConnection.\n // TODO\n }\n\n // 9. Run these steps, but abort when the ongoing fetch is terminated:\n\n // 1. If connection is failure, then return a network error.\n\n // 2. Set timingInfo\u2019s final connection timing info to the result of\n // calling clamp and coarsen connection timing info with connection\u2019s\n // timing info, timingInfo\u2019s post-redirect start time, and fetchParams\u2019s\n // cross-origin isolated capability.\n\n // 3. If connection is not an HTTP/2 connection, request\u2019s body is non-null,\n // and request\u2019s body\u2019s source is null, then append (`Transfer-Encoding`,\n // `chunked`) to request\u2019s header list.\n\n // 4. Set timingInfo\u2019s final network-request start time to the coarsened\n // shared current time given fetchParams\u2019s cross-origin isolated\n // capability.\n\n // 5. Set response to the result of making an HTTP request over connection\n // using request with the following caveats:\n\n // - Follow the relevant requirements from HTTP. [HTTP] [HTTP-SEMANTICS]\n // [HTTP-COND] [HTTP-CACHING] [HTTP-AUTH]\n\n // - If request\u2019s body is non-null, and request\u2019s body\u2019s source is null,\n // then the user agent may have a buffer of up to 64 kibibytes and store\n // a part of request\u2019s body in that buffer. If the user agent reads from\n // request\u2019s body beyond that buffer\u2019s size and the user agent needs to\n // resend request, then instead return a network error.\n\n // - Set timingInfo\u2019s final network-response start time to the coarsened\n // shared current time given fetchParams\u2019s cross-origin isolated capability,\n // immediately after the user agent\u2019s HTTP parser receives the first byte\n // of the response (e.g., frame header bytes for HTTP/2 or response status\n // line for HTTP/1.x).\n\n // - Wait until all the headers are transmitted.\n\n // - Any responses whose status is in the range 100 to 199, inclusive,\n // and is not 101, are to be ignored, except for the purposes of setting\n // timingInfo\u2019s final network-response start time above.\n\n // - If request\u2019s header list contains `Transfer-Encoding`/`chunked` and\n // response is transferred via HTTP/1.0 or older, then return a network\n // error.\n\n // - If the HTTP request results in a TLS client certificate dialog, then:\n\n // 1. If request\u2019s window is an environment settings object, make the\n // dialog available in request\u2019s window.\n\n // 2. Otherwise, return a network error.\n\n // To transmit request\u2019s body body, run these steps:\n let requestBody = null\n // 1. If body is null and fetchParams\u2019s process request end-of-body is\n // non-null, then queue a fetch task given fetchParams\u2019s process request\n // end-of-body and fetchParams\u2019s task destination.\n if (request.body == null && fetchParams.processRequestEndOfBody) {\n queueMicrotask(() => fetchParams.processRequestEndOfBody())\n } else if (request.body != null) {\n // 2. Otherwise, if body is non-null:\n\n // 1. Let processBodyChunk given bytes be these steps:\n const processBodyChunk = async function * (bytes) {\n // 1. If the ongoing fetch is terminated, then abort these steps.\n if (isCancelled(fetchParams)) {\n return\n }\n\n // 2. Run this step in parallel: transmit bytes.\n yield bytes\n\n // 3. If fetchParams\u2019s process request body is non-null, then run\n // fetchParams\u2019s process request body given bytes\u2019s length.\n fetchParams.processRequestBodyChunkLength?.(bytes.byteLength)\n }\n\n // 2. Let processEndOfBody be these steps:\n const processEndOfBody = () => {\n // 1. If fetchParams is canceled, then abort these steps.\n if (isCancelled(fetchParams)) {\n return\n }\n\n // 2. If fetchParams\u2019s process request end-of-body is non-null,\n // then run fetchParams\u2019s process request end-of-body.\n if (fetchParams.processRequestEndOfBody) {\n fetchParams.processRequestEndOfBody()\n }\n }\n\n // 3. Let processBodyError given e be these steps:\n const processBodyError = (e) => {\n // 1. If fetchParams is canceled, then abort these steps.\n if (isCancelled(fetchParams)) {\n return\n }\n\n // 2. If e is an \"AbortError\" DOMException, then abort fetchParams\u2019s controller.\n if (e.name === 'AbortError') {\n fetchParams.controller.abort()\n } else {\n fetchParams.controller.terminate(e)\n }\n }\n\n // 4. Incrementally read request\u2019s body given processBodyChunk, processEndOfBody,\n // processBodyError, and fetchParams\u2019s task destination.\n requestBody = (async function * () {\n try {\n for await (const bytes of request.body.stream) {\n yield * processBodyChunk(bytes)\n }\n processEndOfBody()\n } catch (err) {\n processBodyError(err)\n }\n })()\n }\n\n try {\n // socket is only provided for websockets\n const { body, status, statusText, headersList, socket } = await dispatch({ body: requestBody })\n\n if (socket) {\n response = makeResponse({ status, statusText, headersList, socket })\n } else {\n const iterator = body[Symbol.asyncIterator]()\n fetchParams.controller.next = () => iterator.next()\n\n response = makeResponse({ status, statusText, headersList })\n }\n } catch (err) {\n // 10. If aborted, then:\n if (err.name === 'AbortError') {\n // 1. If connection uses HTTP/2, then transmit an RST_STREAM frame.\n fetchParams.controller.connection.destroy()\n\n // 2. Return the appropriate network error for fetchParams.\n return makeAppropriateNetworkError(fetchParams, err)\n }\n\n return makeNetworkError(err)\n }\n\n // 11. Let pullAlgorithm be an action that resumes the ongoing fetch\n // if it is suspended.\n const pullAlgorithm = () => {\n fetchParams.controller.resume()\n }\n\n // 12. Let cancelAlgorithm be an algorithm that aborts fetchParams\u2019s\n // controller with reason, given reason.\n const cancelAlgorithm = (reason) => {\n fetchParams.controller.abort(reason)\n }\n\n // 13. Let highWaterMark be a non-negative, non-NaN number, chosen by\n // the user agent.\n // TODO\n\n // 14. Let sizeAlgorithm be an algorithm that accepts a chunk object\n // and returns a non-negative, non-NaN, non-infinite number, chosen by the user agent.\n // TODO\n\n // 15. Let stream be a new ReadableStream.\n // 16. Set up stream with pullAlgorithm set to pullAlgorithm,\n // cancelAlgorithm set to cancelAlgorithm, highWaterMark set to\n // highWaterMark, and sizeAlgorithm set to sizeAlgorithm.\n if (!ReadableStream) {\n ReadableStream = require('stream/web').ReadableStream\n }\n\n const stream = new ReadableStream(\n {\n async start (controller) {\n fetchParams.controller.controller = controller\n },\n async pull (controller) {\n await pullAlgorithm(controller)\n },\n async cancel (reason) {\n await cancelAlgorithm(reason)\n }\n },\n {\n highWaterMark: 0,\n size () {\n return 1\n }\n }\n )\n\n // 17. Run these steps, but abort when the ongoing fetch is terminated:\n\n // 1. Set response\u2019s body to a new body whose stream is stream.\n response.body = { stream }\n\n // 2. If response is not a network error and request\u2019s cache mode is\n // not \"no-store\", then update response in httpCache for request.\n // TODO\n\n // 3. If includeCredentials is true and the user agent is not configured\n // to block cookies for request (see section 7 of [COOKIES]), then run the\n // \"set-cookie-string\" parsing algorithm (see section 5.2 of [COOKIES]) on\n // the value of each header whose name is a byte-case-insensitive match for\n // `Set-Cookie` in response\u2019s header list, if any, and request\u2019s current URL.\n // TODO\n\n // 18. If aborted, then:\n // TODO\n\n // 19. Run these steps in parallel:\n\n // 1. Run these steps, but abort when fetchParams is canceled:\n fetchParams.controller.on('terminated', onAborted)\n fetchParams.controller.resume = async () => {\n // 1. While true\n while (true) {\n // 1-3. See onData...\n\n // 4. Set bytes to the result of handling content codings given\n // codings and bytes.\n let bytes\n let isFailure\n try {\n const { done, value } = await fetchParams.controller.next()\n\n if (isAborted(fetchParams)) {\n break\n }\n\n bytes = done ? undefined : value\n } catch (err) {\n if (fetchParams.controller.ended && !timingInfo.encodedBodySize) {\n // zlib doesn't like empty streams.\n bytes = undefined\n } else {\n bytes = err\n\n // err may be propagated from the result of calling readablestream.cancel,\n // which might not be an error. https://github.com/nodejs/undici/issues/2009\n isFailure = true\n }\n }\n\n if (bytes === undefined) {\n // 2. Otherwise, if the bytes transmission for response\u2019s message\n // body is done normally and stream is readable, then close\n // stream, finalize response for fetchParams and response, and\n // abort these in-parallel steps.\n readableStreamClose(fetchParams.controller.controller)\n\n finalizeResponse(fetchParams, response)\n\n return\n }\n\n // 5. Increase timingInfo\u2019s decoded body size by bytes\u2019s length.\n timingInfo.decodedBodySize += bytes?.byteLength ?? 0\n\n // 6. If bytes is failure, then terminate fetchParams\u2019s controller.\n if (isFailure) {\n fetchParams.controller.terminate(bytes)\n return\n }\n\n // 7. Enqueue a Uint8Array wrapping an ArrayBuffer containing bytes\n // into stream.\n fetchParams.controller.controller.enqueue(new Uint8Array(bytes))\n\n // 8. If stream is errored, then terminate the ongoing fetch.\n if (isErrored(stream)) {\n fetchParams.controller.terminate()\n return\n }\n\n // 9. If stream doesn\u2019t need more data ask the user agent to suspend\n // the ongoing fetch.\n if (!fetchParams.controller.controller.desiredSize) {\n return\n }\n }\n }\n\n // 2. If aborted, then:\n function onAborted (reason) {\n // 2. If fetchParams is aborted, then:\n if (isAborted(fetchParams)) {\n // 1. Set response\u2019s aborted flag.\n response.aborted = true\n\n // 2. If stream is readable, then error stream with the result of\n // deserialize a serialized abort reason given fetchParams\u2019s\n // controller\u2019s serialized abort reason and an\n // implementation-defined realm.\n if (isReadable(stream)) {\n fetchParams.controller.controller.error(\n fetchParams.controller.serializedAbortReason\n )\n }\n } else {\n // 3. Otherwise, if stream is readable, error stream with a TypeError.\n if (isReadable(stream)) {\n fetchParams.controller.controller.error(new TypeError('terminated', {\n cause: isErrorLike(reason) ? reason : undefined\n }))\n }\n }\n\n // 4. If connection uses HTTP/2, then transmit an RST_STREAM frame.\n // 5. Otherwise, the user agent should close connection unless it would be bad for performance to do so.\n fetchParams.controller.connection.destroy()\n }\n\n // 20. Return response.\n return response\n\n async function dispatch ({ body }) {\n const url = requestCurrentURL(request)\n /** @type {import('../..').Agent} */\n const agent = fetchParams.controller.dispatcher\n\n return new Promise((resolve, reject) => agent.dispatch(\n {\n path: url.pathname + url.search,\n origin: url.origin,\n method: request.method,\n body: fetchParams.controller.dispatcher.isMockActive ? request.body && (request.body.source || request.body.stream) : body,\n headers: request.headersList.entries,\n maxRedirections: 0,\n upgrade: request.mode === 'websocket' ? 'websocket' : undefined\n },\n {\n body: null,\n abort: null,\n\n onConnect (abort) {\n // TODO (fix): Do we need connection here?\n const { connection } = fetchParams.controller\n\n if (connection.destroyed) {\n abort(new DOMException('The operation was aborted.', 'AbortError'))\n } else {\n fetchParams.controller.on('terminated', abort)\n this.abort = connection.abort = abort\n }\n },\n\n onHeaders (status, headersList, resume, statusText) {\n if (status < 200) {\n return\n }\n\n let codings = []\n let location = ''\n\n const headers = new Headers()\n\n // For H2, the headers are a plain JS object\n // We distinguish between them and iterate accordingly\n if (Array.isArray(headersList)) {\n for (let n = 0; n < headersList.length; n += 2) {\n const key = headersList[n + 0].toString('latin1')\n const val = headersList[n + 1].toString('latin1')\n if (key.toLowerCase() === 'content-encoding') {\n // https://www.rfc-editor.org/rfc/rfc7231#section-3.1.2.1\n // \"All content-coding values are case-insensitive...\"\n codings = val.toLowerCase().split(',').map((x) => x.trim())\n } else if (key.toLowerCase() === 'location') {\n location = val\n }\n\n headers[kHeadersList].append(key, val)\n }\n } else {\n const keys = Object.keys(headersList)\n for (const key of keys) {\n const val = headersList[key]\n if (key.toLowerCase() === 'content-encoding') {\n // https://www.rfc-editor.org/rfc/rfc7231#section-3.1.2.1\n // \"All content-coding values are case-insensitive...\"\n codings = val.toLowerCase().split(',').map((x) => x.trim()).reverse()\n } else if (key.toLowerCase() === 'location') {\n location = val\n }\n\n headers[kHeadersList].append(key, val)\n }\n }\n\n this.body = new Readable({ read: resume })\n\n const decoders = []\n\n const willFollow = request.redirect === 'follow' &&\n location &&\n redirectStatusSet.has(status)\n\n // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Encoding\n if (request.method !== 'HEAD' && request.method !== 'CONNECT' && !nullBodyStatus.includes(status) && !willFollow) {\n for (const coding of codings) {\n // https://www.rfc-editor.org/rfc/rfc9112.html#section-7.2\n if (coding === 'x-gzip' || coding === 'gzip') {\n decoders.push(zlib.createGunzip({\n // Be less strict when decoding compressed responses, since sometimes\n // servers send slightly invalid responses that are still accepted\n // by common browsers.\n // Always using Z_SYNC_FLUSH is what cURL does.\n flush: zlib.constants.Z_SYNC_FLUSH,\n finishFlush: zlib.constants.Z_SYNC_FLUSH\n }))\n } else if (coding === 'deflate') {\n decoders.push(zlib.createInflate())\n } else if (coding === 'br') {\n decoders.push(zlib.createBrotliDecompress())\n } else {\n decoders.length = 0\n break\n }\n }\n }\n\n resolve({\n status,\n statusText,\n headersList: headers[kHeadersList],\n body: decoders.length\n ? pipeline(this.body, ...decoders, () => { })\n : this.body.on('error', () => {})\n })\n\n return true\n },\n\n onData (chunk) {\n if (fetchParams.controller.dump) {\n return\n }\n\n // 1. If one or more bytes have been transmitted from response\u2019s\n // message body, then:\n\n // 1. Let bytes be the transmitted bytes.\n const bytes = chunk\n\n // 2. Let codings be the result of extracting header list values\n // given `Content-Encoding` and response\u2019s header list.\n // See pullAlgorithm.\n\n // 3. Increase timingInfo\u2019s encoded body size by bytes\u2019s length.\n timingInfo.encodedBodySize += bytes.byteLength\n\n // 4. See pullAlgorithm...\n\n return this.body.push(bytes)\n },\n\n onComplete () {\n if (this.abort) {\n fetchParams.controller.off('terminated', this.abort)\n }\n\n fetchParams.controller.ended = true\n\n this.body.push(null)\n },\n\n onError (error) {\n if (this.abort) {\n fetchParams.controller.off('terminated', this.abort)\n }\n\n this.body?.destroy(error)\n\n fetchParams.controller.terminate(error)\n\n reject(error)\n },\n\n onUpgrade (status, headersList, socket) {\n if (status !== 101) {\n return\n }\n\n const headers = new Headers()\n\n for (let n = 0; n < headersList.length; n += 2) {\n const key = headersList[n + 0].toString('latin1')\n const val = headersList[n + 1].toString('latin1')\n\n headers[kHeadersList].append(key, val)\n }\n\n resolve({\n status,\n statusText: STATUS_CODES[status],\n headersList: headers[kHeadersList],\n socket\n })\n\n return true\n }\n }\n ))\n }\n}\n\nmodule.exports = {\n fetch,\n Fetch,\n fetching,\n finalizeAndReportTiming\n}\n", "'use strict'\n\nmodule.exports = {\n kState: Symbol('FileReader state'),\n kResult: Symbol('FileReader result'),\n kError: Symbol('FileReader error'),\n kLastProgressEventFired: Symbol('FileReader last progress event fired timestamp'),\n kEvents: Symbol('FileReader events'),\n kAborted: Symbol('FileReader aborted')\n}\n", "'use strict'\n\nconst { webidl } = require('../fetch/webidl')\n\nconst kState = Symbol('ProgressEvent state')\n\n/**\n * @see https://xhr.spec.whatwg.org/#progressevent\n */\nclass ProgressEvent extends Event {\n constructor (type, eventInitDict = {}) {\n type = webidl.converters.DOMString(type)\n eventInitDict = webidl.converters.ProgressEventInit(eventInitDict ?? {})\n\n super(type, eventInitDict)\n\n this[kState] = {\n lengthComputable: eventInitDict.lengthComputable,\n loaded: eventInitDict.loaded,\n total: eventInitDict.total\n }\n }\n\n get lengthComputable () {\n webidl.brandCheck(this, ProgressEvent)\n\n return this[kState].lengthComputable\n }\n\n get loaded () {\n webidl.brandCheck(this, ProgressEvent)\n\n return this[kState].loaded\n }\n\n get total () {\n webidl.brandCheck(this, ProgressEvent)\n\n return this[kState].total\n }\n}\n\nwebidl.converters.ProgressEventInit = webidl.dictionaryConverter([\n {\n key: 'lengthComputable',\n converter: webidl.converters.boolean,\n defaultValue: false\n },\n {\n key: 'loaded',\n converter: webidl.converters['unsigned long long'],\n defaultValue: 0\n },\n {\n key: 'total',\n converter: webidl.converters['unsigned long long'],\n defaultValue: 0\n },\n {\n key: 'bubbles',\n converter: webidl.converters.boolean,\n defaultValue: false\n },\n {\n key: 'cancelable',\n converter: webidl.converters.boolean,\n defaultValue: false\n },\n {\n key: 'composed',\n converter: webidl.converters.boolean,\n defaultValue: false\n }\n])\n\nmodule.exports = {\n ProgressEvent\n}\n", "'use strict'\n\n/**\n * @see https://encoding.spec.whatwg.org/#concept-encoding-get\n * @param {string|undefined} label\n */\nfunction getEncoding (label) {\n if (!label) {\n return 'failure'\n }\n\n // 1. Remove any leading and trailing ASCII whitespace from label.\n // 2. If label is an ASCII case-insensitive match for any of the\n // labels listed in the table below, then return the\n // corresponding encoding; otherwise return failure.\n switch (label.trim().toLowerCase()) {\n case 'unicode-1-1-utf-8':\n case 'unicode11utf8':\n case 'unicode20utf8':\n case 'utf-8':\n case 'utf8':\n case 'x-unicode20utf8':\n return 'UTF-8'\n case '866':\n case 'cp866':\n case 'csibm866':\n case 'ibm866':\n return 'IBM866'\n case 'csisolatin2':\n case 'iso-8859-2':\n case 'iso-ir-101':\n case 'iso8859-2':\n case 'iso88592':\n case 'iso_8859-2':\n case 'iso_8859-2:1987':\n case 'l2':\n case 'latin2':\n return 'ISO-8859-2'\n case 'csisolatin3':\n case 'iso-8859-3':\n case 'iso-ir-109':\n case 'iso8859-3':\n case 'iso88593':\n case 'iso_8859-3':\n case 'iso_8859-3:1988':\n case 'l3':\n case 'latin3':\n return 'ISO-8859-3'\n case 'csisolatin4':\n case 'iso-8859-4':\n case 'iso-ir-110':\n case 'iso8859-4':\n case 'iso88594':\n case 'iso_8859-4':\n case 'iso_8859-4:1988':\n case 'l4':\n case 'latin4':\n return 'ISO-8859-4'\n case 'csisolatincyrillic':\n case 'cyrillic':\n case 'iso-8859-5':\n case 'iso-ir-144':\n case 'iso8859-5':\n case 'iso88595':\n case 'iso_8859-5':\n case 'iso_8859-5:1988':\n return 'ISO-8859-5'\n case 'arabic':\n case 'asmo-708':\n case 'csiso88596e':\n case 'csiso88596i':\n case 'csisolatinarabic':\n case 'ecma-114':\n case 'iso-8859-6':\n case 'iso-8859-6-e':\n case 'iso-8859-6-i':\n case 'iso-ir-127':\n case 'iso8859-6':\n case 'iso88596':\n case 'iso_8859-6':\n case 'iso_8859-6:1987':\n return 'ISO-8859-6'\n case 'csisolatingreek':\n case 'ecma-118':\n case 'elot_928':\n case 'greek':\n case 'greek8':\n case 'iso-8859-7':\n case 'iso-ir-126':\n case 'iso8859-7':\n case 'iso88597':\n case 'iso_8859-7':\n case 'iso_8859-7:1987':\n case 'sun_eu_greek':\n return 'ISO-8859-7'\n case 'csiso88598e':\n case 'csisolatinhebrew':\n case 'hebrew':\n case 'iso-8859-8':\n case 'iso-8859-8-e':\n case 'iso-ir-138':\n case 'iso8859-8':\n case 'iso88598':\n case 'iso_8859-8':\n case 'iso_8859-8:1988':\n case 'visual':\n return 'ISO-8859-8'\n case 'csiso88598i':\n case 'iso-8859-8-i':\n case 'logical':\n return 'ISO-8859-8-I'\n case 'csisolatin6':\n case 'iso-8859-10':\n case 'iso-ir-157':\n case 'iso8859-10':\n case 'iso885910':\n case 'l6':\n case 'latin6':\n return 'ISO-8859-10'\n case 'iso-8859-13':\n case 'iso8859-13':\n case 'iso885913':\n return 'ISO-8859-13'\n case 'iso-8859-14':\n case 'iso8859-14':\n case 'iso885914':\n return 'ISO-8859-14'\n case 'csisolatin9':\n case 'iso-8859-15':\n case 'iso8859-15':\n case 'iso885915':\n case 'iso_8859-15':\n case 'l9':\n return 'ISO-8859-15'\n case 'iso-8859-16':\n return 'ISO-8859-16'\n case 'cskoi8r':\n case 'koi':\n case 'koi8':\n case 'koi8-r':\n case 'koi8_r':\n return 'KOI8-R'\n case 'koi8-ru':\n case 'koi8-u':\n return 'KOI8-U'\n case 'csmacintosh':\n case 'mac':\n case 'macintosh':\n case 'x-mac-roman':\n return 'macintosh'\n case 'iso-8859-11':\n case 'iso8859-11':\n case 'iso885911':\n case 'tis-620':\n case 'windows-874':\n return 'windows-874'\n case 'cp1250':\n case 'windows-1250':\n case 'x-cp1250':\n return 'windows-1250'\n case 'cp1251':\n case 'windows-1251':\n case 'x-cp1251':\n return 'windows-1251'\n case 'ansi_x3.4-1968':\n case 'ascii':\n case 'cp1252':\n case 'cp819':\n case 'csisolatin1':\n case 'ibm819':\n case 'iso-8859-1':\n case 'iso-ir-100':\n case 'iso8859-1':\n case 'iso88591':\n case 'iso_8859-1':\n case 'iso_8859-1:1987':\n case 'l1':\n case 'latin1':\n case 'us-ascii':\n case 'windows-1252':\n case 'x-cp1252':\n return 'windows-1252'\n case 'cp1253':\n case 'windows-1253':\n case 'x-cp1253':\n return 'windows-1253'\n case 'cp1254':\n case 'csisolatin5':\n case 'iso-8859-9':\n case 'iso-ir-148':\n case 'iso8859-9':\n case 'iso88599':\n case 'iso_8859-9':\n case 'iso_8859-9:1989':\n case 'l5':\n case 'latin5':\n case 'windows-1254':\n case 'x-cp1254':\n return 'windows-1254'\n case 'cp1255':\n case 'windows-1255':\n case 'x-cp1255':\n return 'windows-1255'\n case 'cp1256':\n case 'windows-1256':\n case 'x-cp1256':\n return 'windows-1256'\n case 'cp1257':\n case 'windows-1257':\n case 'x-cp1257':\n return 'windows-1257'\n case 'cp1258':\n case 'windows-1258':\n case 'x-cp1258':\n return 'windows-1258'\n case 'x-mac-cyrillic':\n case 'x-mac-ukrainian':\n return 'x-mac-cyrillic'\n case 'chinese':\n case 'csgb2312':\n case 'csiso58gb231280':\n case 'gb2312':\n case 'gb_2312':\n case 'gb_2312-80':\n case 'gbk':\n case 'iso-ir-58':\n case 'x-gbk':\n return 'GBK'\n case 'gb18030':\n return 'gb18030'\n case 'big5':\n case 'big5-hkscs':\n case 'cn-big5':\n case 'csbig5':\n case 'x-x-big5':\n return 'Big5'\n case 'cseucpkdfmtjapanese':\n case 'euc-jp':\n case 'x-euc-jp':\n return 'EUC-JP'\n case 'csiso2022jp':\n case 'iso-2022-jp':\n return 'ISO-2022-JP'\n case 'csshiftjis':\n case 'ms932':\n case 'ms_kanji':\n case 'shift-jis':\n case 'shift_jis':\n case 'sjis':\n case 'windows-31j':\n case 'x-sjis':\n return 'Shift_JIS'\n case 'cseuckr':\n case 'csksc56011987':\n case 'euc-kr':\n case 'iso-ir-149':\n case 'korean':\n case 'ks_c_5601-1987':\n case 'ks_c_5601-1989':\n case 'ksc5601':\n case 'ksc_5601':\n case 'windows-949':\n return 'EUC-KR'\n case 'csiso2022kr':\n case 'hz-gb-2312':\n case 'iso-2022-cn':\n case 'iso-2022-cn-ext':\n case 'iso-2022-kr':\n case 'replacement':\n return 'replacement'\n case 'unicodefffe':\n case 'utf-16be':\n return 'UTF-16BE'\n case 'csunicode':\n case 'iso-10646-ucs-2':\n case 'ucs-2':\n case 'unicode':\n case 'unicodefeff':\n case 'utf-16':\n case 'utf-16le':\n return 'UTF-16LE'\n case 'x-user-defined':\n return 'x-user-defined'\n default: return 'failure'\n }\n}\n\nmodule.exports = {\n getEncoding\n}\n", "'use strict'\n\nconst {\n kState,\n kError,\n kResult,\n kAborted,\n kLastProgressEventFired\n} = require('./symbols')\nconst { ProgressEvent } = require('./progressevent')\nconst { getEncoding } = require('./encoding')\nconst { DOMException } = require('../fetch/constants')\nconst { serializeAMimeType, parseMIMEType } = require('../fetch/dataURL')\nconst { types } = require('util')\nconst { StringDecoder } = require('string_decoder')\nconst { btoa } = require('buffer')\n\n/** @type {PropertyDescriptor} */\nconst staticPropertyDescriptors = {\n enumerable: true,\n writable: false,\n configurable: false\n}\n\n/**\n * @see https://w3c.github.io/FileAPI/#readOperation\n * @param {import('./filereader').FileReader} fr\n * @param {import('buffer').Blob} blob\n * @param {string} type\n * @param {string?} encodingName\n */\nfunction readOperation (fr, blob, type, encodingName) {\n // 1. If fr\u2019s state is \"loading\", throw an InvalidStateError\n // DOMException.\n if (fr[kState] === 'loading') {\n throw new DOMException('Invalid state', 'InvalidStateError')\n }\n\n // 2. Set fr\u2019s state to \"loading\".\n fr[kState] = 'loading'\n\n // 3. Set fr\u2019s result to null.\n fr[kResult] = null\n\n // 4. Set fr\u2019s error to null.\n fr[kError] = null\n\n // 5. Let stream be the result of calling get stream on blob.\n /** @type {import('stream/web').ReadableStream} */\n const stream = blob.stream()\n\n // 6. Let reader be the result of getting a reader from stream.\n const reader = stream.getReader()\n\n // 7. Let bytes be an empty byte sequence.\n /** @type {Uint8Array[]} */\n const bytes = []\n\n // 8. Let chunkPromise be the result of reading a chunk from\n // stream with reader.\n let chunkPromise = reader.read()\n\n // 9. Let isFirstChunk be true.\n let isFirstChunk = true\n\n // 10. In parallel, while true:\n // Note: \"In parallel\" just means non-blocking\n // Note 2: readOperation itself cannot be async as double\n // reading the body would then reject the promise, instead\n // of throwing an error.\n ;(async () => {\n while (!fr[kAborted]) {\n // 1. Wait for chunkPromise to be fulfilled or rejected.\n try {\n const { done, value } = await chunkPromise\n\n // 2. If chunkPromise is fulfilled, and isFirstChunk is\n // true, queue a task to fire a progress event called\n // loadstart at fr.\n if (isFirstChunk && !fr[kAborted]) {\n queueMicrotask(() => {\n fireAProgressEvent('loadstart', fr)\n })\n }\n\n // 3. Set isFirstChunk to false.\n isFirstChunk = false\n\n // 4. If chunkPromise is fulfilled with an object whose\n // done property is false and whose value property is\n // a Uint8Array object, run these steps:\n if (!done && types.isUint8Array(value)) {\n // 1. Let bs be the byte sequence represented by the\n // Uint8Array object.\n\n // 2. Append bs to bytes.\n bytes.push(value)\n\n // 3. If roughly 50ms have passed since these steps\n // were last invoked, queue a task to fire a\n // progress event called progress at fr.\n if (\n (\n fr[kLastProgressEventFired] === undefined ||\n Date.now() - fr[kLastProgressEventFired] >= 50\n ) &&\n !fr[kAborted]\n ) {\n fr[kLastProgressEventFired] = Date.now()\n queueMicrotask(() => {\n fireAProgressEvent('progress', fr)\n })\n }\n\n // 4. Set chunkPromise to the result of reading a\n // chunk from stream with reader.\n chunkPromise = reader.read()\n } else if (done) {\n // 5. Otherwise, if chunkPromise is fulfilled with an\n // object whose done property is true, queue a task\n // to run the following steps and abort this algorithm:\n queueMicrotask(() => {\n // 1. Set fr\u2019s state to \"done\".\n fr[kState] = 'done'\n\n // 2. Let result be the result of package data given\n // bytes, type, blob\u2019s type, and encodingName.\n try {\n const result = packageData(bytes, type, blob.type, encodingName)\n\n // 4. Else:\n\n if (fr[kAborted]) {\n return\n }\n\n // 1. Set fr\u2019s result to result.\n fr[kResult] = result\n\n // 2. Fire a progress event called load at the fr.\n fireAProgressEvent('load', fr)\n } catch (error) {\n // 3. If package data threw an exception error:\n\n // 1. Set fr\u2019s error to error.\n fr[kError] = error\n\n // 2. Fire a progress event called error at fr.\n fireAProgressEvent('error', fr)\n }\n\n // 5. If fr\u2019s state is not \"loading\", fire a progress\n // event called loadend at the fr.\n if (fr[kState] !== 'loading') {\n fireAProgressEvent('loadend', fr)\n }\n })\n\n break\n }\n } catch (error) {\n if (fr[kAborted]) {\n return\n }\n\n // 6. Otherwise, if chunkPromise is rejected with an\n // error error, queue a task to run the following\n // steps and abort this algorithm:\n queueMicrotask(() => {\n // 1. Set fr\u2019s state to \"done\".\n fr[kState] = 'done'\n\n // 2. Set fr\u2019s error to error.\n fr[kError] = error\n\n // 3. Fire a progress event called error at fr.\n fireAProgressEvent('error', fr)\n\n // 4. If fr\u2019s state is not \"loading\", fire a progress\n // event called loadend at fr.\n if (fr[kState] !== 'loading') {\n fireAProgressEvent('loadend', fr)\n }\n })\n\n break\n }\n }\n })()\n}\n\n/**\n * @see https://w3c.github.io/FileAPI/#fire-a-progress-event\n * @see https://dom.spec.whatwg.org/#concept-event-fire\n * @param {string} e The name of the event\n * @param {import('./filereader').FileReader} reader\n */\nfunction fireAProgressEvent (e, reader) {\n // The progress event e does not bubble. e.bubbles must be false\n // The progress event e is NOT cancelable. e.cancelable must be false\n const event = new ProgressEvent(e, {\n bubbles: false,\n cancelable: false\n })\n\n reader.dispatchEvent(event)\n}\n\n/**\n * @see https://w3c.github.io/FileAPI/#blob-package-data\n * @param {Uint8Array[]} bytes\n * @param {string} type\n * @param {string?} mimeType\n * @param {string?} encodingName\n */\nfunction packageData (bytes, type, mimeType, encodingName) {\n // 1. A Blob has an associated package data algorithm, given\n // bytes, a type, a optional mimeType, and a optional\n // encodingName, which switches on type and runs the\n // associated steps:\n\n switch (type) {\n case 'DataURL': {\n // 1. Return bytes as a DataURL [RFC2397] subject to\n // the considerations below:\n // * Use mimeType as part of the Data URL if it is\n // available in keeping with the Data URL\n // specification [RFC2397].\n // * If mimeType is not available return a Data URL\n // without a media-type. [RFC2397].\n\n // https://datatracker.ietf.org/doc/html/rfc2397#section-3\n // dataurl := \"data:\" [ mediatype ] [ \";base64\" ] \",\" data\n // mediatype := [ type \"/\" subtype ] *( \";\" parameter )\n // data := *urlchar\n // parameter := attribute \"=\" value\n let dataURL = 'data:'\n\n const parsed = parseMIMEType(mimeType || 'application/octet-stream')\n\n if (parsed !== 'failure') {\n dataURL += serializeAMimeType(parsed)\n }\n\n dataURL += ';base64,'\n\n const decoder = new StringDecoder('latin1')\n\n for (const chunk of bytes) {\n dataURL += btoa(decoder.write(chunk))\n }\n\n dataURL += btoa(decoder.end())\n\n return dataURL\n }\n case 'Text': {\n // 1. Let encoding be failure\n let encoding = 'failure'\n\n // 2. If the encodingName is present, set encoding to the\n // result of getting an encoding from encodingName.\n if (encodingName) {\n encoding = getEncoding(encodingName)\n }\n\n // 3. If encoding is failure, and mimeType is present:\n if (encoding === 'failure' && mimeType) {\n // 1. Let type be the result of parse a MIME type\n // given mimeType.\n const type = parseMIMEType(mimeType)\n\n // 2. If type is not failure, set encoding to the result\n // of getting an encoding from type\u2019s parameters[\"charset\"].\n if (type !== 'failure') {\n encoding = getEncoding(type.parameters.get('charset'))\n }\n }\n\n // 4. If encoding is failure, then set encoding to UTF-8.\n if (encoding === 'failure') {\n encoding = 'UTF-8'\n }\n\n // 5. Decode bytes using fallback encoding encoding, and\n // return the result.\n return decode(bytes, encoding)\n }\n case 'ArrayBuffer': {\n // Return a new ArrayBuffer whose contents are bytes.\n const sequence = combineByteSequences(bytes)\n\n return sequence.buffer\n }\n case 'BinaryString': {\n // Return bytes as a binary string, in which every byte\n // is represented by a code unit of equal value [0..255].\n let binaryString = ''\n\n const decoder = new StringDecoder('latin1')\n\n for (const chunk of bytes) {\n binaryString += decoder.write(chunk)\n }\n\n binaryString += decoder.end()\n\n return binaryString\n }\n }\n}\n\n/**\n * @see https://encoding.spec.whatwg.org/#decode\n * @param {Uint8Array[]} ioQueue\n * @param {string} encoding\n */\nfunction decode (ioQueue, encoding) {\n const bytes = combineByteSequences(ioQueue)\n\n // 1. Let BOMEncoding be the result of BOM sniffing ioQueue.\n const BOMEncoding = BOMSniffing(bytes)\n\n let slice = 0\n\n // 2. If BOMEncoding is non-null:\n if (BOMEncoding !== null) {\n // 1. Set encoding to BOMEncoding.\n encoding = BOMEncoding\n\n // 2. Read three bytes from ioQueue, if BOMEncoding is\n // UTF-8; otherwise read two bytes.\n // (Do nothing with those bytes.)\n slice = BOMEncoding === 'UTF-8' ? 3 : 2\n }\n\n // 3. Process a queue with an instance of encoding\u2019s\n // decoder, ioQueue, output, and \"replacement\".\n\n // 4. Return output.\n\n const sliced = bytes.slice(slice)\n return new TextDecoder(encoding).decode(sliced)\n}\n\n/**\n * @see https://encoding.spec.whatwg.org/#bom-sniff\n * @param {Uint8Array} ioQueue\n */\nfunction BOMSniffing (ioQueue) {\n // 1. Let BOM be the result of peeking 3 bytes from ioQueue,\n // converted to a byte sequence.\n const [a, b, c] = ioQueue\n\n // 2. For each of the rows in the table below, starting with\n // the first one and going down, if BOM starts with the\n // bytes given in the first column, then return the\n // encoding given in the cell in the second column of that\n // row. Otherwise, return null.\n if (a === 0xEF && b === 0xBB && c === 0xBF) {\n return 'UTF-8'\n } else if (a === 0xFE && b === 0xFF) {\n return 'UTF-16BE'\n } else if (a === 0xFF && b === 0xFE) {\n return 'UTF-16LE'\n }\n\n return null\n}\n\n/**\n * @param {Uint8Array[]} sequences\n */\nfunction combineByteSequences (sequences) {\n const size = sequences.reduce((a, b) => {\n return a + b.byteLength\n }, 0)\n\n let offset = 0\n\n return sequences.reduce((a, b) => {\n a.set(b, offset)\n offset += b.byteLength\n return a\n }, new Uint8Array(size))\n}\n\nmodule.exports = {\n staticPropertyDescriptors,\n readOperation,\n fireAProgressEvent\n}\n", "'use strict'\n\nconst {\n staticPropertyDescriptors,\n readOperation,\n fireAProgressEvent\n} = require('./util')\nconst {\n kState,\n kError,\n kResult,\n kEvents,\n kAborted\n} = require('./symbols')\nconst { webidl } = require('../fetch/webidl')\nconst { kEnumerableProperty } = require('../core/util')\n\nclass FileReader extends EventTarget {\n constructor () {\n super()\n\n this[kState] = 'empty'\n this[kResult] = null\n this[kError] = null\n this[kEvents] = {\n loadend: null,\n error: null,\n abort: null,\n load: null,\n progress: null,\n loadstart: null\n }\n }\n\n /**\n * @see https://w3c.github.io/FileAPI/#dfn-readAsArrayBuffer\n * @param {import('buffer').Blob} blob\n */\n readAsArrayBuffer (blob) {\n webidl.brandCheck(this, FileReader)\n\n webidl.argumentLengthCheck(arguments, 1, { header: 'FileReader.readAsArrayBuffer' })\n\n blob = webidl.converters.Blob(blob, { strict: false })\n\n // The readAsArrayBuffer(blob) method, when invoked,\n // must initiate a read operation for blob with ArrayBuffer.\n readOperation(this, blob, 'ArrayBuffer')\n }\n\n /**\n * @see https://w3c.github.io/FileAPI/#readAsBinaryString\n * @param {import('buffer').Blob} blob\n */\n readAsBinaryString (blob) {\n webidl.brandCheck(this, FileReader)\n\n webidl.argumentLengthCheck(arguments, 1, { header: 'FileReader.readAsBinaryString' })\n\n blob = webidl.converters.Blob(blob, { strict: false })\n\n // The readAsBinaryString(blob) method, when invoked,\n // must initiate a read operation for blob with BinaryString.\n readOperation(this, blob, 'BinaryString')\n }\n\n /**\n * @see https://w3c.github.io/FileAPI/#readAsDataText\n * @param {import('buffer').Blob} blob\n * @param {string?} encoding\n */\n readAsText (blob, encoding = undefined) {\n webidl.brandCheck(this, FileReader)\n\n webidl.argumentLengthCheck(arguments, 1, { header: 'FileReader.readAsText' })\n\n blob = webidl.converters.Blob(blob, { strict: false })\n\n if (encoding !== undefined) {\n encoding = webidl.converters.DOMString(encoding)\n }\n\n // The readAsText(blob, encoding) method, when invoked,\n // must initiate a read operation for blob with Text and encoding.\n readOperation(this, blob, 'Text', encoding)\n }\n\n /**\n * @see https://w3c.github.io/FileAPI/#dfn-readAsDataURL\n * @param {import('buffer').Blob} blob\n */\n readAsDataURL (blob) {\n webidl.brandCheck(this, FileReader)\n\n webidl.argumentLengthCheck(arguments, 1, { header: 'FileReader.readAsDataURL' })\n\n blob = webidl.converters.Blob(blob, { strict: false })\n\n // The readAsDataURL(blob) method, when invoked, must\n // initiate a read operation for blob with DataURL.\n readOperation(this, blob, 'DataURL')\n }\n\n /**\n * @see https://w3c.github.io/FileAPI/#dfn-abort\n */\n abort () {\n // 1. If this's state is \"empty\" or if this's state is\n // \"done\" set this's result to null and terminate\n // this algorithm.\n if (this[kState] === 'empty' || this[kState] === 'done') {\n this[kResult] = null\n return\n }\n\n // 2. If this's state is \"loading\" set this's state to\n // \"done\" and set this's result to null.\n if (this[kState] === 'loading') {\n this[kState] = 'done'\n this[kResult] = null\n }\n\n // 3. If there are any tasks from this on the file reading\n // task source in an affiliated task queue, then remove\n // those tasks from that task queue.\n this[kAborted] = true\n\n // 4. Terminate the algorithm for the read method being processed.\n // TODO\n\n // 5. Fire a progress event called abort at this.\n fireAProgressEvent('abort', this)\n\n // 6. If this's state is not \"loading\", fire a progress\n // event called loadend at this.\n if (this[kState] !== 'loading') {\n fireAProgressEvent('loadend', this)\n }\n }\n\n /**\n * @see https://w3c.github.io/FileAPI/#dom-filereader-readystate\n */\n get readyState () {\n webidl.brandCheck(this, FileReader)\n\n switch (this[kState]) {\n case 'empty': return this.EMPTY\n case 'loading': return this.LOADING\n case 'done': return this.DONE\n }\n }\n\n /**\n * @see https://w3c.github.io/FileAPI/#dom-filereader-result\n */\n get result () {\n webidl.brandCheck(this, FileReader)\n\n // The result attribute\u2019s getter, when invoked, must return\n // this's result.\n return this[kResult]\n }\n\n /**\n * @see https://w3c.github.io/FileAPI/#dom-filereader-error\n */\n get error () {\n webidl.brandCheck(this, FileReader)\n\n // The error attribute\u2019s getter, when invoked, must return\n // this's error.\n return this[kError]\n }\n\n get onloadend () {\n webidl.brandCheck(this, FileReader)\n\n return this[kEvents].loadend\n }\n\n set onloadend (fn) {\n webidl.brandCheck(this, FileReader)\n\n if (this[kEvents].loadend) {\n this.removeEventListener('loadend', this[kEvents].loadend)\n }\n\n if (typeof fn === 'function') {\n this[kEvents].loadend = fn\n this.addEventListener('loadend', fn)\n } else {\n this[kEvents].loadend = null\n }\n }\n\n get onerror () {\n webidl.brandCheck(this, FileReader)\n\n return this[kEvents].error\n }\n\n set onerror (fn) {\n webidl.brandCheck(this, FileReader)\n\n if (this[kEvents].error) {\n this.removeEventListener('error', this[kEvents].error)\n }\n\n if (typeof fn === 'function') {\n this[kEvents].error = fn\n this.addEventListener('error', fn)\n } else {\n this[kEvents].error = null\n }\n }\n\n get onloadstart () {\n webidl.brandCheck(this, FileReader)\n\n return this[kEvents].loadstart\n }\n\n set onloadstart (fn) {\n webidl.brandCheck(this, FileReader)\n\n if (this[kEvents].loadstart) {\n this.removeEventListener('loadstart', this[kEvents].loadstart)\n }\n\n if (typeof fn === 'function') {\n this[kEvents].loadstart = fn\n this.addEventListener('loadstart', fn)\n } else {\n this[kEvents].loadstart = null\n }\n }\n\n get onprogress () {\n webidl.brandCheck(this, FileReader)\n\n return this[kEvents].progress\n }\n\n set onprogress (fn) {\n webidl.brandCheck(this, FileReader)\n\n if (this[kEvents].progress) {\n this.removeEventListener('progress', this[kEvents].progress)\n }\n\n if (typeof fn === 'function') {\n this[kEvents].progress = fn\n this.addEventListener('progress', fn)\n } else {\n this[kEvents].progress = null\n }\n }\n\n get onload () {\n webidl.brandCheck(this, FileReader)\n\n return this[kEvents].load\n }\n\n set onload (fn) {\n webidl.brandCheck(this, FileReader)\n\n if (this[kEvents].load) {\n this.removeEventListener('load', this[kEvents].load)\n }\n\n if (typeof fn === 'function') {\n this[kEvents].load = fn\n this.addEventListener('load', fn)\n } else {\n this[kEvents].load = null\n }\n }\n\n get onabort () {\n webidl.brandCheck(this, FileReader)\n\n return this[kEvents].abort\n }\n\n set onabort (fn) {\n webidl.brandCheck(this, FileReader)\n\n if (this[kEvents].abort) {\n this.removeEventListener('abort', this[kEvents].abort)\n }\n\n if (typeof fn === 'function') {\n this[kEvents].abort = fn\n this.addEventListener('abort', fn)\n } else {\n this[kEvents].abort = null\n }\n }\n}\n\n// https://w3c.github.io/FileAPI/#dom-filereader-empty\nFileReader.EMPTY = FileReader.prototype.EMPTY = 0\n// https://w3c.github.io/FileAPI/#dom-filereader-loading\nFileReader.LOADING = FileReader.prototype.LOADING = 1\n// https://w3c.github.io/FileAPI/#dom-filereader-done\nFileReader.DONE = FileReader.prototype.DONE = 2\n\nObject.defineProperties(FileReader.prototype, {\n EMPTY: staticPropertyDescriptors,\n LOADING: staticPropertyDescriptors,\n DONE: staticPropertyDescriptors,\n readAsArrayBuffer: kEnumerableProperty,\n readAsBinaryString: kEnumerableProperty,\n readAsText: kEnumerableProperty,\n readAsDataURL: kEnumerableProperty,\n abort: kEnumerableProperty,\n readyState: kEnumerableProperty,\n result: kEnumerableProperty,\n error: kEnumerableProperty,\n onloadstart: kEnumerableProperty,\n onprogress: kEnumerableProperty,\n onload: kEnumerableProperty,\n onabort: kEnumerableProperty,\n onerror: kEnumerableProperty,\n onloadend: kEnumerableProperty,\n [Symbol.toStringTag]: {\n value: 'FileReader',\n writable: false,\n enumerable: false,\n configurable: true\n }\n})\n\nObject.defineProperties(FileReader, {\n EMPTY: staticPropertyDescriptors,\n LOADING: staticPropertyDescriptors,\n DONE: staticPropertyDescriptors\n})\n\nmodule.exports = {\n FileReader\n}\n", "'use strict'\n\nmodule.exports = {\n kConstruct: require('../core/symbols').kConstruct\n}\n", "'use strict'\n\nconst assert = require('assert')\nconst { URLSerializer } = require('../fetch/dataURL')\nconst { isValidHeaderName } = require('../fetch/util')\n\n/**\n * @see https://url.spec.whatwg.org/#concept-url-equals\n * @param {URL} A\n * @param {URL} B\n * @param {boolean | undefined} excludeFragment\n * @returns {boolean}\n */\nfunction urlEquals (A, B, excludeFragment = false) {\n const serializedA = URLSerializer(A, excludeFragment)\n\n const serializedB = URLSerializer(B, excludeFragment)\n\n return serializedA === serializedB\n}\n\n/**\n * @see https://github.com/chromium/chromium/blob/694d20d134cb553d8d89e5500b9148012b1ba299/content/browser/cache_storage/cache_storage_cache.cc#L260-L262\n * @param {string} header\n */\nfunction fieldValues (header) {\n assert(header !== null)\n\n const values = []\n\n for (let value of header.split(',')) {\n value = value.trim()\n\n if (!value.length) {\n continue\n } else if (!isValidHeaderName(value)) {\n continue\n }\n\n values.push(value)\n }\n\n return values\n}\n\nmodule.exports = {\n urlEquals,\n fieldValues\n}\n", "'use strict'\n\nconst { kConstruct } = require('./symbols')\nconst { urlEquals, fieldValues: getFieldValues } = require('./util')\nconst { kEnumerableProperty, isDisturbed } = require('../core/util')\nconst { kHeadersList } = require('../core/symbols')\nconst { webidl } = require('../fetch/webidl')\nconst { Response, cloneResponse } = require('../fetch/response')\nconst { Request } = require('../fetch/request')\nconst { kState, kHeaders, kGuard, kRealm } = require('../fetch/symbols')\nconst { fetching } = require('../fetch/index')\nconst { urlIsHttpHttpsScheme, createDeferredPromise, readAllBytes } = require('../fetch/util')\nconst assert = require('assert')\nconst { getGlobalDispatcher } = require('../global')\n\n/**\n * @see https://w3c.github.io/ServiceWorker/#dfn-cache-batch-operation\n * @typedef {Object} CacheBatchOperation\n * @property {'delete' | 'put'} type\n * @property {any} request\n * @property {any} response\n * @property {import('../../types/cache').CacheQueryOptions} options\n */\n\n/**\n * @see https://w3c.github.io/ServiceWorker/#dfn-request-response-list\n * @typedef {[any, any][]} requestResponseList\n */\n\nclass Cache {\n /**\n * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-request-response-list\n * @type {requestResponseList}\n */\n #relevantRequestResponseList\n\n constructor () {\n if (arguments[0] !== kConstruct) {\n webidl.illegalConstructor()\n }\n\n this.#relevantRequestResponseList = arguments[1]\n }\n\n async match (request, options = {}) {\n webidl.brandCheck(this, Cache)\n webidl.argumentLengthCheck(arguments, 1, { header: 'Cache.match' })\n\n request = webidl.converters.RequestInfo(request)\n options = webidl.converters.CacheQueryOptions(options)\n\n const p = await this.matchAll(request, options)\n\n if (p.length === 0) {\n return\n }\n\n return p[0]\n }\n\n async matchAll (request = undefined, options = {}) {\n webidl.brandCheck(this, Cache)\n\n if (request !== undefined) request = webidl.converters.RequestInfo(request)\n options = webidl.converters.CacheQueryOptions(options)\n\n // 1.\n let r = null\n\n // 2.\n if (request !== undefined) {\n if (request instanceof Request) {\n // 2.1.1\n r = request[kState]\n\n // 2.1.2\n if (r.method !== 'GET' && !options.ignoreMethod) {\n return []\n }\n } else if (typeof request === 'string') {\n // 2.2.1\n r = new Request(request)[kState]\n }\n }\n\n // 5.\n // 5.1\n const responses = []\n\n // 5.2\n if (request === undefined) {\n // 5.2.1\n for (const requestResponse of this.#relevantRequestResponseList) {\n responses.push(requestResponse[1])\n }\n } else { // 5.3\n // 5.3.1\n const requestResponses = this.#queryCache(r, options)\n\n // 5.3.2\n for (const requestResponse of requestResponses) {\n responses.push(requestResponse[1])\n }\n }\n\n // 5.4\n // We don't implement CORs so we don't need to loop over the responses, yay!\n\n // 5.5.1\n const responseList = []\n\n // 5.5.2\n for (const response of responses) {\n // 5.5.2.1\n const responseObject = new Response(response.body?.source ?? null)\n const body = responseObject[kState].body\n responseObject[kState] = response\n responseObject[kState].body = body\n responseObject[kHeaders][kHeadersList] = response.headersList\n responseObject[kHeaders][kGuard] = 'immutable'\n\n responseList.push(responseObject)\n }\n\n // 6.\n return Object.freeze(responseList)\n }\n\n async add (request) {\n webidl.brandCheck(this, Cache)\n webidl.argumentLengthCheck(arguments, 1, { header: 'Cache.add' })\n\n request = webidl.converters.RequestInfo(request)\n\n // 1.\n const requests = [request]\n\n // 2.\n const responseArrayPromise = this.addAll(requests)\n\n // 3.\n return await responseArrayPromise\n }\n\n async addAll (requests) {\n webidl.brandCheck(this, Cache)\n webidl.argumentLengthCheck(arguments, 1, { header: 'Cache.addAll' })\n\n requests = webidl.converters['sequence'](requests)\n\n // 1.\n const responsePromises = []\n\n // 2.\n const requestList = []\n\n // 3.\n for (const request of requests) {\n if (typeof request === 'string') {\n continue\n }\n\n // 3.1\n const r = request[kState]\n\n // 3.2\n if (!urlIsHttpHttpsScheme(r.url) || r.method !== 'GET') {\n throw webidl.errors.exception({\n header: 'Cache.addAll',\n message: 'Expected http/s scheme when method is not GET.'\n })\n }\n }\n\n // 4.\n /** @type {ReturnType[]} */\n const fetchControllers = []\n\n // 5.\n for (const request of requests) {\n // 5.1\n const r = new Request(request)[kState]\n\n // 5.2\n if (!urlIsHttpHttpsScheme(r.url)) {\n throw webidl.errors.exception({\n header: 'Cache.addAll',\n message: 'Expected http/s scheme.'\n })\n }\n\n // 5.4\n r.initiator = 'fetch'\n r.destination = 'subresource'\n\n // 5.5\n requestList.push(r)\n\n // 5.6\n const responsePromise = createDeferredPromise()\n\n // 5.7\n fetchControllers.push(fetching({\n request: r,\n dispatcher: getGlobalDispatcher(),\n processResponse (response) {\n // 1.\n if (response.type === 'error' || response.status === 206 || response.status < 200 || response.status > 299) {\n responsePromise.reject(webidl.errors.exception({\n header: 'Cache.addAll',\n message: 'Received an invalid status code or the request failed.'\n }))\n } else if (response.headersList.contains('vary')) { // 2.\n // 2.1\n const fieldValues = getFieldValues(response.headersList.get('vary'))\n\n // 2.2\n for (const fieldValue of fieldValues) {\n // 2.2.1\n if (fieldValue === '*') {\n responsePromise.reject(webidl.errors.exception({\n header: 'Cache.addAll',\n message: 'invalid vary field value'\n }))\n\n for (const controller of fetchControllers) {\n controller.abort()\n }\n\n return\n }\n }\n }\n },\n processResponseEndOfBody (response) {\n // 1.\n if (response.aborted) {\n responsePromise.reject(new DOMException('aborted', 'AbortError'))\n return\n }\n\n // 2.\n responsePromise.resolve(response)\n }\n }))\n\n // 5.8\n responsePromises.push(responsePromise.promise)\n }\n\n // 6.\n const p = Promise.all(responsePromises)\n\n // 7.\n const responses = await p\n\n // 7.1\n const operations = []\n\n // 7.2\n let index = 0\n\n // 7.3\n for (const response of responses) {\n // 7.3.1\n /** @type {CacheBatchOperation} */\n const operation = {\n type: 'put', // 7.3.2\n request: requestList[index], // 7.3.3\n response // 7.3.4\n }\n\n operations.push(operation) // 7.3.5\n\n index++ // 7.3.6\n }\n\n // 7.5\n const cacheJobPromise = createDeferredPromise()\n\n // 7.6.1\n let errorData = null\n\n // 7.6.2\n try {\n this.#batchCacheOperations(operations)\n } catch (e) {\n errorData = e\n }\n\n // 7.6.3\n queueMicrotask(() => {\n // 7.6.3.1\n if (errorData === null) {\n cacheJobPromise.resolve(undefined)\n } else {\n // 7.6.3.2\n cacheJobPromise.reject(errorData)\n }\n })\n\n // 7.7\n return cacheJobPromise.promise\n }\n\n async put (request, response) {\n webidl.brandCheck(this, Cache)\n webidl.argumentLengthCheck(arguments, 2, { header: 'Cache.put' })\n\n request = webidl.converters.RequestInfo(request)\n response = webidl.converters.Response(response)\n\n // 1.\n let innerRequest = null\n\n // 2.\n if (request instanceof Request) {\n innerRequest = request[kState]\n } else { // 3.\n innerRequest = new Request(request)[kState]\n }\n\n // 4.\n if (!urlIsHttpHttpsScheme(innerRequest.url) || innerRequest.method !== 'GET') {\n throw webidl.errors.exception({\n header: 'Cache.put',\n message: 'Expected an http/s scheme when method is not GET'\n })\n }\n\n // 5.\n const innerResponse = response[kState]\n\n // 6.\n if (innerResponse.status === 206) {\n throw webidl.errors.exception({\n header: 'Cache.put',\n message: 'Got 206 status'\n })\n }\n\n // 7.\n if (innerResponse.headersList.contains('vary')) {\n // 7.1.\n const fieldValues = getFieldValues(innerResponse.headersList.get('vary'))\n\n // 7.2.\n for (const fieldValue of fieldValues) {\n // 7.2.1\n if (fieldValue === '*') {\n throw webidl.errors.exception({\n header: 'Cache.put',\n message: 'Got * vary field value'\n })\n }\n }\n }\n\n // 8.\n if (innerResponse.body && (isDisturbed(innerResponse.body.stream) || innerResponse.body.stream.locked)) {\n throw webidl.errors.exception({\n header: 'Cache.put',\n message: 'Response body is locked or disturbed'\n })\n }\n\n // 9.\n const clonedResponse = cloneResponse(innerResponse)\n\n // 10.\n const bodyReadPromise = createDeferredPromise()\n\n // 11.\n if (innerResponse.body != null) {\n // 11.1\n const stream = innerResponse.body.stream\n\n // 11.2\n const reader = stream.getReader()\n\n // 11.3\n readAllBytes(reader).then(bodyReadPromise.resolve, bodyReadPromise.reject)\n } else {\n bodyReadPromise.resolve(undefined)\n }\n\n // 12.\n /** @type {CacheBatchOperation[]} */\n const operations = []\n\n // 13.\n /** @type {CacheBatchOperation} */\n const operation = {\n type: 'put', // 14.\n request: innerRequest, // 15.\n response: clonedResponse // 16.\n }\n\n // 17.\n operations.push(operation)\n\n // 19.\n const bytes = await bodyReadPromise.promise\n\n if (clonedResponse.body != null) {\n clonedResponse.body.source = bytes\n }\n\n // 19.1\n const cacheJobPromise = createDeferredPromise()\n\n // 19.2.1\n let errorData = null\n\n // 19.2.2\n try {\n this.#batchCacheOperations(operations)\n } catch (e) {\n errorData = e\n }\n\n // 19.2.3\n queueMicrotask(() => {\n // 19.2.3.1\n if (errorData === null) {\n cacheJobPromise.resolve()\n } else { // 19.2.3.2\n cacheJobPromise.reject(errorData)\n }\n })\n\n return cacheJobPromise.promise\n }\n\n async delete (request, options = {}) {\n webidl.brandCheck(this, Cache)\n webidl.argumentLengthCheck(arguments, 1, { header: 'Cache.delete' })\n\n request = webidl.converters.RequestInfo(request)\n options = webidl.converters.CacheQueryOptions(options)\n\n /**\n * @type {Request}\n */\n let r = null\n\n if (request instanceof Request) {\n r = request[kState]\n\n if (r.method !== 'GET' && !options.ignoreMethod) {\n return false\n }\n } else {\n assert(typeof request === 'string')\n\n r = new Request(request)[kState]\n }\n\n /** @type {CacheBatchOperation[]} */\n const operations = []\n\n /** @type {CacheBatchOperation} */\n const operation = {\n type: 'delete',\n request: r,\n options\n }\n\n operations.push(operation)\n\n const cacheJobPromise = createDeferredPromise()\n\n let errorData = null\n let requestResponses\n\n try {\n requestResponses = this.#batchCacheOperations(operations)\n } catch (e) {\n errorData = e\n }\n\n queueMicrotask(() => {\n if (errorData === null) {\n cacheJobPromise.resolve(!!requestResponses?.length)\n } else {\n cacheJobPromise.reject(errorData)\n }\n })\n\n return cacheJobPromise.promise\n }\n\n /**\n * @see https://w3c.github.io/ServiceWorker/#dom-cache-keys\n * @param {any} request\n * @param {import('../../types/cache').CacheQueryOptions} options\n * @returns {readonly Request[]}\n */\n async keys (request = undefined, options = {}) {\n webidl.brandCheck(this, Cache)\n\n if (request !== undefined) request = webidl.converters.RequestInfo(request)\n options = webidl.converters.CacheQueryOptions(options)\n\n // 1.\n let r = null\n\n // 2.\n if (request !== undefined) {\n // 2.1\n if (request instanceof Request) {\n // 2.1.1\n r = request[kState]\n\n // 2.1.2\n if (r.method !== 'GET' && !options.ignoreMethod) {\n return []\n }\n } else if (typeof request === 'string') { // 2.2\n r = new Request(request)[kState]\n }\n }\n\n // 4.\n const promise = createDeferredPromise()\n\n // 5.\n // 5.1\n const requests = []\n\n // 5.2\n if (request === undefined) {\n // 5.2.1\n for (const requestResponse of this.#relevantRequestResponseList) {\n // 5.2.1.1\n requests.push(requestResponse[0])\n }\n } else { // 5.3\n // 5.3.1\n const requestResponses = this.#queryCache(r, options)\n\n // 5.3.2\n for (const requestResponse of requestResponses) {\n // 5.3.2.1\n requests.push(requestResponse[0])\n }\n }\n\n // 5.4\n queueMicrotask(() => {\n // 5.4.1\n const requestList = []\n\n // 5.4.2\n for (const request of requests) {\n const requestObject = new Request('https://a')\n requestObject[kState] = request\n requestObject[kHeaders][kHeadersList] = request.headersList\n requestObject[kHeaders][kGuard] = 'immutable'\n requestObject[kRealm] = request.client\n\n // 5.4.2.1\n requestList.push(requestObject)\n }\n\n // 5.4.3\n promise.resolve(Object.freeze(requestList))\n })\n\n return promise.promise\n }\n\n /**\n * @see https://w3c.github.io/ServiceWorker/#batch-cache-operations-algorithm\n * @param {CacheBatchOperation[]} operations\n * @returns {requestResponseList}\n */\n #batchCacheOperations (operations) {\n // 1.\n const cache = this.#relevantRequestResponseList\n\n // 2.\n const backupCache = [...cache]\n\n // 3.\n const addedItems = []\n\n // 4.1\n const resultList = []\n\n try {\n // 4.2\n for (const operation of operations) {\n // 4.2.1\n if (operation.type !== 'delete' && operation.type !== 'put') {\n throw webidl.errors.exception({\n header: 'Cache.#batchCacheOperations',\n message: 'operation type does not match \"delete\" or \"put\"'\n })\n }\n\n // 4.2.2\n if (operation.type === 'delete' && operation.response != null) {\n throw webidl.errors.exception({\n header: 'Cache.#batchCacheOperations',\n message: 'delete operation should not have an associated response'\n })\n }\n\n // 4.2.3\n if (this.#queryCache(operation.request, operation.options, addedItems).length) {\n throw new DOMException('???', 'InvalidStateError')\n }\n\n // 4.2.4\n let requestResponses\n\n // 4.2.5\n if (operation.type === 'delete') {\n // 4.2.5.1\n requestResponses = this.#queryCache(operation.request, operation.options)\n\n // TODO: the spec is wrong, this is needed to pass WPTs\n if (requestResponses.length === 0) {\n return []\n }\n\n // 4.2.5.2\n for (const requestResponse of requestResponses) {\n const idx = cache.indexOf(requestResponse)\n assert(idx !== -1)\n\n // 4.2.5.2.1\n cache.splice(idx, 1)\n }\n } else if (operation.type === 'put') { // 4.2.6\n // 4.2.6.1\n if (operation.response == null) {\n throw webidl.errors.exception({\n header: 'Cache.#batchCacheOperations',\n message: 'put operation should have an associated response'\n })\n }\n\n // 4.2.6.2\n const r = operation.request\n\n // 4.2.6.3\n if (!urlIsHttpHttpsScheme(r.url)) {\n throw webidl.errors.exception({\n header: 'Cache.#batchCacheOperations',\n message: 'expected http or https scheme'\n })\n }\n\n // 4.2.6.4\n if (r.method !== 'GET') {\n throw webidl.errors.exception({\n header: 'Cache.#batchCacheOperations',\n message: 'not get method'\n })\n }\n\n // 4.2.6.5\n if (operation.options != null) {\n throw webidl.errors.exception({\n header: 'Cache.#batchCacheOperations',\n message: 'options must not be defined'\n })\n }\n\n // 4.2.6.6\n requestResponses = this.#queryCache(operation.request)\n\n // 4.2.6.7\n for (const requestResponse of requestResponses) {\n const idx = cache.indexOf(requestResponse)\n assert(idx !== -1)\n\n // 4.2.6.7.1\n cache.splice(idx, 1)\n }\n\n // 4.2.6.8\n cache.push([operation.request, operation.response])\n\n // 4.2.6.10\n addedItems.push([operation.request, operation.response])\n }\n\n // 4.2.7\n resultList.push([operation.request, operation.response])\n }\n\n // 4.3\n return resultList\n } catch (e) { // 5.\n // 5.1\n this.#relevantRequestResponseList.length = 0\n\n // 5.2\n this.#relevantRequestResponseList = backupCache\n\n // 5.3\n throw e\n }\n }\n\n /**\n * @see https://w3c.github.io/ServiceWorker/#query-cache\n * @param {any} requestQuery\n * @param {import('../../types/cache').CacheQueryOptions} options\n * @param {requestResponseList} targetStorage\n * @returns {requestResponseList}\n */\n #queryCache (requestQuery, options, targetStorage) {\n /** @type {requestResponseList} */\n const resultList = []\n\n const storage = targetStorage ?? this.#relevantRequestResponseList\n\n for (const requestResponse of storage) {\n const [cachedRequest, cachedResponse] = requestResponse\n if (this.#requestMatchesCachedItem(requestQuery, cachedRequest, cachedResponse, options)) {\n resultList.push(requestResponse)\n }\n }\n\n return resultList\n }\n\n /**\n * @see https://w3c.github.io/ServiceWorker/#request-matches-cached-item-algorithm\n * @param {any} requestQuery\n * @param {any} request\n * @param {any | null} response\n * @param {import('../../types/cache').CacheQueryOptions | undefined} options\n * @returns {boolean}\n */\n #requestMatchesCachedItem (requestQuery, request, response = null, options) {\n // if (options?.ignoreMethod === false && request.method === 'GET') {\n // return false\n // }\n\n const queryURL = new URL(requestQuery.url)\n\n const cachedURL = new URL(request.url)\n\n if (options?.ignoreSearch) {\n cachedURL.search = ''\n\n queryURL.search = ''\n }\n\n if (!urlEquals(queryURL, cachedURL, true)) {\n return false\n }\n\n if (\n response == null ||\n options?.ignoreVary ||\n !response.headersList.contains('vary')\n ) {\n return true\n }\n\n const fieldValues = getFieldValues(response.headersList.get('vary'))\n\n for (const fieldValue of fieldValues) {\n if (fieldValue === '*') {\n return false\n }\n\n const requestValue = request.headersList.get(fieldValue)\n const queryValue = requestQuery.headersList.get(fieldValue)\n\n // If one has the header and the other doesn't, or one has\n // a different value than the other, return false\n if (requestValue !== queryValue) {\n return false\n }\n }\n\n return true\n }\n}\n\nObject.defineProperties(Cache.prototype, {\n [Symbol.toStringTag]: {\n value: 'Cache',\n configurable: true\n },\n match: kEnumerableProperty,\n matchAll: kEnumerableProperty,\n add: kEnumerableProperty,\n addAll: kEnumerableProperty,\n put: kEnumerableProperty,\n delete: kEnumerableProperty,\n keys: kEnumerableProperty\n})\n\nconst cacheQueryOptionConverters = [\n {\n key: 'ignoreSearch',\n converter: webidl.converters.boolean,\n defaultValue: false\n },\n {\n key: 'ignoreMethod',\n converter: webidl.converters.boolean,\n defaultValue: false\n },\n {\n key: 'ignoreVary',\n converter: webidl.converters.boolean,\n defaultValue: false\n }\n]\n\nwebidl.converters.CacheQueryOptions = webidl.dictionaryConverter(cacheQueryOptionConverters)\n\nwebidl.converters.MultiCacheQueryOptions = webidl.dictionaryConverter([\n ...cacheQueryOptionConverters,\n {\n key: 'cacheName',\n converter: webidl.converters.DOMString\n }\n])\n\nwebidl.converters.Response = webidl.interfaceConverter(Response)\n\nwebidl.converters['sequence'] = webidl.sequenceConverter(\n webidl.converters.RequestInfo\n)\n\nmodule.exports = {\n Cache\n}\n", "'use strict'\n\nconst { kConstruct } = require('./symbols')\nconst { Cache } = require('./cache')\nconst { webidl } = require('../fetch/webidl')\nconst { kEnumerableProperty } = require('../core/util')\n\nclass CacheStorage {\n /**\n * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-name-to-cache-map\n * @type {Map}\n */\n async has (cacheName) {\n webidl.brandCheck(this, CacheStorage)\n webidl.argumentLengthCheck(arguments, 1, { header: 'CacheStorage.has' })\n\n cacheName = webidl.converters.DOMString(cacheName)\n\n // 2.1.1\n // 2.2\n return this.#caches.has(cacheName)\n }\n\n /**\n * @see https://w3c.github.io/ServiceWorker/#dom-cachestorage-open\n * @param {string} cacheName\n * @returns {Promise}\n */\n async open (cacheName) {\n webidl.brandCheck(this, CacheStorage)\n webidl.argumentLengthCheck(arguments, 1, { header: 'CacheStorage.open' })\n\n cacheName = webidl.converters.DOMString(cacheName)\n\n // 2.1\n if (this.#caches.has(cacheName)) {\n // await caches.open('v1') !== await caches.open('v1')\n\n // 2.1.1\n const cache = this.#caches.get(cacheName)\n\n // 2.1.1.1\n return new Cache(kConstruct, cache)\n }\n\n // 2.2\n const cache = []\n\n // 2.3\n this.#caches.set(cacheName, cache)\n\n // 2.4\n return new Cache(kConstruct, cache)\n }\n\n /**\n * @see https://w3c.github.io/ServiceWorker/#cache-storage-delete\n * @param {string} cacheName\n * @returns {Promise}\n */\n async delete (cacheName) {\n webidl.brandCheck(this, CacheStorage)\n webidl.argumentLengthCheck(arguments, 1, { header: 'CacheStorage.delete' })\n\n cacheName = webidl.converters.DOMString(cacheName)\n\n return this.#caches.delete(cacheName)\n }\n\n /**\n * @see https://w3c.github.io/ServiceWorker/#cache-storage-keys\n * @returns {string[]}\n */\n async keys () {\n webidl.brandCheck(this, CacheStorage)\n\n // 2.1\n const keys = this.#caches.keys()\n\n // 2.2\n return [...keys]\n }\n}\n\nObject.defineProperties(CacheStorage.prototype, {\n [Symbol.toStringTag]: {\n value: 'CacheStorage',\n configurable: true\n },\n match: kEnumerableProperty,\n has: kEnumerableProperty,\n open: kEnumerableProperty,\n delete: kEnumerableProperty,\n keys: kEnumerableProperty\n})\n\nmodule.exports = {\n CacheStorage\n}\n", "'use strict'\n\n// https://wicg.github.io/cookie-store/#cookie-maximum-attribute-value-size\nconst maxAttributeValueSize = 1024\n\n// https://wicg.github.io/cookie-store/#cookie-maximum-name-value-pair-size\nconst maxNameValuePairSize = 4096\n\nmodule.exports = {\n maxAttributeValueSize,\n maxNameValuePairSize\n}\n", "'use strict'\n\nconst assert = require('assert')\nconst { kHeadersList } = require('../core/symbols')\n\nfunction isCTLExcludingHtab (value) {\n if (value.length === 0) {\n return false\n }\n\n for (const char of value) {\n const code = char.charCodeAt(0)\n\n if (\n (code >= 0x00 || code <= 0x08) ||\n (code >= 0x0A || code <= 0x1F) ||\n code === 0x7F\n ) {\n return false\n }\n }\n}\n\n/**\n CHAR = \n token = 1*\n separators = \"(\" | \")\" | \"<\" | \">\" | \"@\"\n | \",\" | \";\" | \":\" | \"\\\" | <\">\n | \"/\" | \"[\" | \"]\" | \"?\" | \"=\"\n | \"{\" | \"}\" | SP | HT\n * @param {string} name\n */\nfunction validateCookieName (name) {\n for (const char of name) {\n const code = char.charCodeAt(0)\n\n if (\n (code <= 0x20 || code > 0x7F) ||\n char === '(' ||\n char === ')' ||\n char === '>' ||\n char === '<' ||\n char === '@' ||\n char === ',' ||\n char === ';' ||\n char === ':' ||\n char === '\\\\' ||\n char === '\"' ||\n char === '/' ||\n char === '[' ||\n char === ']' ||\n char === '?' ||\n char === '=' ||\n char === '{' ||\n char === '}'\n ) {\n throw new Error('Invalid cookie name')\n }\n }\n}\n\n/**\n cookie-value = *cookie-octet / ( DQUOTE *cookie-octet DQUOTE )\n cookie-octet = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E\n ; US-ASCII characters excluding CTLs,\n ; whitespace DQUOTE, comma, semicolon,\n ; and backslash\n * @param {string} value\n */\nfunction validateCookieValue (value) {\n for (const char of value) {\n const code = char.charCodeAt(0)\n\n if (\n code < 0x21 || // exclude CTLs (0-31)\n code === 0x22 ||\n code === 0x2C ||\n code === 0x3B ||\n code === 0x5C ||\n code > 0x7E // non-ascii\n ) {\n throw new Error('Invalid header value')\n }\n }\n}\n\n/**\n * path-value = \n * @param {string} path\n */\nfunction validateCookiePath (path) {\n for (const char of path) {\n const code = char.charCodeAt(0)\n\n if (code < 0x21 || char === ';') {\n throw new Error('Invalid cookie path')\n }\n }\n}\n\n/**\n * I have no idea why these values aren't allowed to be honest,\n * but Deno tests these. - Khafra\n * @param {string} domain\n */\nfunction validateCookieDomain (domain) {\n if (\n domain.startsWith('-') ||\n domain.endsWith('.') ||\n domain.endsWith('-')\n ) {\n throw new Error('Invalid cookie domain')\n }\n}\n\n/**\n * @see https://www.rfc-editor.org/rfc/rfc7231#section-7.1.1.1\n * @param {number|Date} date\n IMF-fixdate = day-name \",\" SP date1 SP time-of-day SP GMT\n ; fixed length/zone/capitalization subset of the format\n ; see Section 3.3 of [RFC5322]\n\n day-name = %x4D.6F.6E ; \"Mon\", case-sensitive\n / %x54.75.65 ; \"Tue\", case-sensitive\n / %x57.65.64 ; \"Wed\", case-sensitive\n / %x54.68.75 ; \"Thu\", case-sensitive\n / %x46.72.69 ; \"Fri\", case-sensitive\n / %x53.61.74 ; \"Sat\", case-sensitive\n / %x53.75.6E ; \"Sun\", case-sensitive\n date1 = day SP month SP year\n ; e.g., 02 Jun 1982\n\n day = 2DIGIT\n month = %x4A.61.6E ; \"Jan\", case-sensitive\n / %x46.65.62 ; \"Feb\", case-sensitive\n / %x4D.61.72 ; \"Mar\", case-sensitive\n / %x41.70.72 ; \"Apr\", case-sensitive\n / %x4D.61.79 ; \"May\", case-sensitive\n / %x4A.75.6E ; \"Jun\", case-sensitive\n / %x4A.75.6C ; \"Jul\", case-sensitive\n / %x41.75.67 ; \"Aug\", case-sensitive\n / %x53.65.70 ; \"Sep\", case-sensitive\n / %x4F.63.74 ; \"Oct\", case-sensitive\n / %x4E.6F.76 ; \"Nov\", case-sensitive\n / %x44.65.63 ; \"Dec\", case-sensitive\n year = 4DIGIT\n\n GMT = %x47.4D.54 ; \"GMT\", case-sensitive\n\n time-of-day = hour \":\" minute \":\" second\n ; 00:00:00 - 23:59:60 (leap second)\n\n hour = 2DIGIT\n minute = 2DIGIT\n second = 2DIGIT\n */\nfunction toIMFDate (date) {\n if (typeof date === 'number') {\n date = new Date(date)\n }\n\n const days = [\n 'Sun', 'Mon', 'Tue', 'Wed',\n 'Thu', 'Fri', 'Sat'\n ]\n\n const months = [\n 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',\n 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'\n ]\n\n const dayName = days[date.getUTCDay()]\n const day = date.getUTCDate().toString().padStart(2, '0')\n const month = months[date.getUTCMonth()]\n const year = date.getUTCFullYear()\n const hour = date.getUTCHours().toString().padStart(2, '0')\n const minute = date.getUTCMinutes().toString().padStart(2, '0')\n const second = date.getUTCSeconds().toString().padStart(2, '0')\n\n return `${dayName}, ${day} ${month} ${year} ${hour}:${minute}:${second} GMT`\n}\n\n/**\n max-age-av = \"Max-Age=\" non-zero-digit *DIGIT\n ; In practice, both expires-av and max-age-av\n ; are limited to dates representable by the\n ; user agent.\n * @param {number} maxAge\n */\nfunction validateCookieMaxAge (maxAge) {\n if (maxAge < 0) {\n throw new Error('Invalid cookie max-age')\n }\n}\n\n/**\n * @see https://www.rfc-editor.org/rfc/rfc6265#section-4.1.1\n * @param {import('./index').Cookie} cookie\n */\nfunction stringify (cookie) {\n if (cookie.name.length === 0) {\n return null\n }\n\n validateCookieName(cookie.name)\n validateCookieValue(cookie.value)\n\n const out = [`${cookie.name}=${cookie.value}`]\n\n // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-cookie-prefixes-00#section-3.1\n // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-cookie-prefixes-00#section-3.2\n if (cookie.name.startsWith('__Secure-')) {\n cookie.secure = true\n }\n\n if (cookie.name.startsWith('__Host-')) {\n cookie.secure = true\n cookie.domain = null\n cookie.path = '/'\n }\n\n if (cookie.secure) {\n out.push('Secure')\n }\n\n if (cookie.httpOnly) {\n out.push('HttpOnly')\n }\n\n if (typeof cookie.maxAge === 'number') {\n validateCookieMaxAge(cookie.maxAge)\n out.push(`Max-Age=${cookie.maxAge}`)\n }\n\n if (cookie.domain) {\n validateCookieDomain(cookie.domain)\n out.push(`Domain=${cookie.domain}`)\n }\n\n if (cookie.path) {\n validateCookiePath(cookie.path)\n out.push(`Path=${cookie.path}`)\n }\n\n if (cookie.expires && cookie.expires.toString() !== 'Invalid Date') {\n out.push(`Expires=${toIMFDate(cookie.expires)}`)\n }\n\n if (cookie.sameSite) {\n out.push(`SameSite=${cookie.sameSite}`)\n }\n\n for (const part of cookie.unparsed) {\n if (!part.includes('=')) {\n throw new Error('Invalid unparsed')\n }\n\n const [key, ...value] = part.split('=')\n\n out.push(`${key.trim()}=${value.join('=')}`)\n }\n\n return out.join('; ')\n}\n\nlet kHeadersListNode\n\nfunction getHeadersList (headers) {\n if (headers[kHeadersList]) {\n return headers[kHeadersList]\n }\n\n if (!kHeadersListNode) {\n kHeadersListNode = Object.getOwnPropertySymbols(headers).find(\n (symbol) => symbol.description === 'headers list'\n )\n\n assert(kHeadersListNode, 'Headers cannot be parsed')\n }\n\n const headersList = headers[kHeadersListNode]\n assert(headersList)\n\n return headersList\n}\n\nmodule.exports = {\n isCTLExcludingHtab,\n stringify,\n getHeadersList\n}\n", "'use strict'\n\nconst { maxNameValuePairSize, maxAttributeValueSize } = require('./constants')\nconst { isCTLExcludingHtab } = require('./util')\nconst { collectASequenceOfCodePointsFast } = require('../fetch/dataURL')\nconst assert = require('assert')\n\n/**\n * @description Parses the field-value attributes of a set-cookie header string.\n * @see https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4\n * @param {string} header\n * @returns if the header is invalid, null will be returned\n */\nfunction parseSetCookie (header) {\n // 1. If the set-cookie-string contains a %x00-08 / %x0A-1F / %x7F\n // character (CTL characters excluding HTAB): Abort these steps and\n // ignore the set-cookie-string entirely.\n if (isCTLExcludingHtab(header)) {\n return null\n }\n\n let nameValuePair = ''\n let unparsedAttributes = ''\n let name = ''\n let value = ''\n\n // 2. If the set-cookie-string contains a %x3B (\";\") character:\n if (header.includes(';')) {\n // 1. The name-value-pair string consists of the characters up to,\n // but not including, the first %x3B (\";\"), and the unparsed-\n // attributes consist of the remainder of the set-cookie-string\n // (including the %x3B (\";\") in question).\n const position = { position: 0 }\n\n nameValuePair = collectASequenceOfCodePointsFast(';', header, position)\n unparsedAttributes = header.slice(position.position)\n } else {\n // Otherwise:\n\n // 1. The name-value-pair string consists of all the characters\n // contained in the set-cookie-string, and the unparsed-\n // attributes is the empty string.\n nameValuePair = header\n }\n\n // 3. If the name-value-pair string lacks a %x3D (\"=\") character, then\n // the name string is empty, and the value string is the value of\n // name-value-pair.\n if (!nameValuePair.includes('=')) {\n value = nameValuePair\n } else {\n // Otherwise, the name string consists of the characters up to, but\n // not including, the first %x3D (\"=\") character, and the (possibly\n // empty) value string consists of the characters after the first\n // %x3D (\"=\") character.\n const position = { position: 0 }\n name = collectASequenceOfCodePointsFast(\n '=',\n nameValuePair,\n position\n )\n value = nameValuePair.slice(position.position + 1)\n }\n\n // 4. Remove any leading or trailing WSP characters from the name\n // string and the value string.\n name = name.trim()\n value = value.trim()\n\n // 5. If the sum of the lengths of the name string and the value string\n // is more than 4096 octets, abort these steps and ignore the set-\n // cookie-string entirely.\n if (name.length + value.length > maxNameValuePairSize) {\n return null\n }\n\n // 6. The cookie-name is the name string, and the cookie-value is the\n // value string.\n return {\n name, value, ...parseUnparsedAttributes(unparsedAttributes)\n }\n}\n\n/**\n * Parses the remaining attributes of a set-cookie header\n * @see https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4\n * @param {string} unparsedAttributes\n * @param {[Object.]={}} cookieAttributeList\n */\nfunction parseUnparsedAttributes (unparsedAttributes, cookieAttributeList = {}) {\n // 1. If the unparsed-attributes string is empty, skip the rest of\n // these steps.\n if (unparsedAttributes.length === 0) {\n return cookieAttributeList\n }\n\n // 2. Discard the first character of the unparsed-attributes (which\n // will be a %x3B (\";\") character).\n assert(unparsedAttributes[0] === ';')\n unparsedAttributes = unparsedAttributes.slice(1)\n\n let cookieAv = ''\n\n // 3. If the remaining unparsed-attributes contains a %x3B (\";\")\n // character:\n if (unparsedAttributes.includes(';')) {\n // 1. Consume the characters of the unparsed-attributes up to, but\n // not including, the first %x3B (\";\") character.\n cookieAv = collectASequenceOfCodePointsFast(\n ';',\n unparsedAttributes,\n { position: 0 }\n )\n unparsedAttributes = unparsedAttributes.slice(cookieAv.length)\n } else {\n // Otherwise:\n\n // 1. Consume the remainder of the unparsed-attributes.\n cookieAv = unparsedAttributes\n unparsedAttributes = ''\n }\n\n // Let the cookie-av string be the characters consumed in this step.\n\n let attributeName = ''\n let attributeValue = ''\n\n // 4. If the cookie-av string contains a %x3D (\"=\") character:\n if (cookieAv.includes('=')) {\n // 1. The (possibly empty) attribute-name string consists of the\n // characters up to, but not including, the first %x3D (\"=\")\n // character, and the (possibly empty) attribute-value string\n // consists of the characters after the first %x3D (\"=\")\n // character.\n const position = { position: 0 }\n\n attributeName = collectASequenceOfCodePointsFast(\n '=',\n cookieAv,\n position\n )\n attributeValue = cookieAv.slice(position.position + 1)\n } else {\n // Otherwise:\n\n // 1. The attribute-name string consists of the entire cookie-av\n // string, and the attribute-value string is empty.\n attributeName = cookieAv\n }\n\n // 5. Remove any leading or trailing WSP characters from the attribute-\n // name string and the attribute-value string.\n attributeName = attributeName.trim()\n attributeValue = attributeValue.trim()\n\n // 6. If the attribute-value is longer than 1024 octets, ignore the\n // cookie-av string and return to Step 1 of this algorithm.\n if (attributeValue.length > maxAttributeValueSize) {\n return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList)\n }\n\n // 7. Process the attribute-name and attribute-value according to the\n // requirements in the following subsections. (Notice that\n // attributes with unrecognized attribute-names are ignored.)\n const attributeNameLowercase = attributeName.toLowerCase()\n\n // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.1\n // If the attribute-name case-insensitively matches the string\n // \"Expires\", the user agent MUST process the cookie-av as follows.\n if (attributeNameLowercase === 'expires') {\n // 1. Let the expiry-time be the result of parsing the attribute-value\n // as cookie-date (see Section 5.1.1).\n const expiryTime = new Date(attributeValue)\n\n // 2. If the attribute-value failed to parse as a cookie date, ignore\n // the cookie-av.\n\n cookieAttributeList.expires = expiryTime\n } else if (attributeNameLowercase === 'max-age') {\n // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.2\n // If the attribute-name case-insensitively matches the string \"Max-\n // Age\", the user agent MUST process the cookie-av as follows.\n\n // 1. If the first character of the attribute-value is not a DIGIT or a\n // \"-\" character, ignore the cookie-av.\n const charCode = attributeValue.charCodeAt(0)\n\n if ((charCode < 48 || charCode > 57) && attributeValue[0] !== '-') {\n return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList)\n }\n\n // 2. If the remainder of attribute-value contains a non-DIGIT\n // character, ignore the cookie-av.\n if (!/^\\d+$/.test(attributeValue)) {\n return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList)\n }\n\n // 3. Let delta-seconds be the attribute-value converted to an integer.\n const deltaSeconds = Number(attributeValue)\n\n // 4. Let cookie-age-limit be the maximum age of the cookie (which\n // SHOULD be 400 days or less, see Section 4.1.2.2).\n\n // 5. Set delta-seconds to the smaller of its present value and cookie-\n // age-limit.\n // deltaSeconds = Math.min(deltaSeconds * 1000, maxExpiresMs)\n\n // 6. If delta-seconds is less than or equal to zero (0), let expiry-\n // time be the earliest representable date and time. Otherwise, let\n // the expiry-time be the current date and time plus delta-seconds\n // seconds.\n // const expiryTime = deltaSeconds <= 0 ? Date.now() : Date.now() + deltaSeconds\n\n // 7. Append an attribute to the cookie-attribute-list with an\n // attribute-name of Max-Age and an attribute-value of expiry-time.\n cookieAttributeList.maxAge = deltaSeconds\n } else if (attributeNameLowercase === 'domain') {\n // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.3\n // If the attribute-name case-insensitively matches the string \"Domain\",\n // the user agent MUST process the cookie-av as follows.\n\n // 1. Let cookie-domain be the attribute-value.\n let cookieDomain = attributeValue\n\n // 2. If cookie-domain starts with %x2E (\".\"), let cookie-domain be\n // cookie-domain without its leading %x2E (\".\").\n if (cookieDomain[0] === '.') {\n cookieDomain = cookieDomain.slice(1)\n }\n\n // 3. Convert the cookie-domain to lower case.\n cookieDomain = cookieDomain.toLowerCase()\n\n // 4. Append an attribute to the cookie-attribute-list with an\n // attribute-name of Domain and an attribute-value of cookie-domain.\n cookieAttributeList.domain = cookieDomain\n } else if (attributeNameLowercase === 'path') {\n // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.4\n // If the attribute-name case-insensitively matches the string \"Path\",\n // the user agent MUST process the cookie-av as follows.\n\n // 1. If the attribute-value is empty or if the first character of the\n // attribute-value is not %x2F (\"/\"):\n let cookiePath = ''\n if (attributeValue.length === 0 || attributeValue[0] !== '/') {\n // 1. Let cookie-path be the default-path.\n cookiePath = '/'\n } else {\n // Otherwise:\n\n // 1. Let cookie-path be the attribute-value.\n cookiePath = attributeValue\n }\n\n // 2. Append an attribute to the cookie-attribute-list with an\n // attribute-name of Path and an attribute-value of cookie-path.\n cookieAttributeList.path = cookiePath\n } else if (attributeNameLowercase === 'secure') {\n // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.5\n // If the attribute-name case-insensitively matches the string \"Secure\",\n // the user agent MUST append an attribute to the cookie-attribute-list\n // with an attribute-name of Secure and an empty attribute-value.\n\n cookieAttributeList.secure = true\n } else if (attributeNameLowercase === 'httponly') {\n // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.6\n // If the attribute-name case-insensitively matches the string\n // \"HttpOnly\", the user agent MUST append an attribute to the cookie-\n // attribute-list with an attribute-name of HttpOnly and an empty\n // attribute-value.\n\n cookieAttributeList.httpOnly = true\n } else if (attributeNameLowercase === 'samesite') {\n // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.7\n // If the attribute-name case-insensitively matches the string\n // \"SameSite\", the user agent MUST process the cookie-av as follows:\n\n // 1. Let enforcement be \"Default\".\n let enforcement = 'Default'\n\n const attributeValueLowercase = attributeValue.toLowerCase()\n // 2. If cookie-av's attribute-value is a case-insensitive match for\n // \"None\", set enforcement to \"None\".\n if (attributeValueLowercase.includes('none')) {\n enforcement = 'None'\n }\n\n // 3. If cookie-av's attribute-value is a case-insensitive match for\n // \"Strict\", set enforcement to \"Strict\".\n if (attributeValueLowercase.includes('strict')) {\n enforcement = 'Strict'\n }\n\n // 4. If cookie-av's attribute-value is a case-insensitive match for\n // \"Lax\", set enforcement to \"Lax\".\n if (attributeValueLowercase.includes('lax')) {\n enforcement = 'Lax'\n }\n\n // 5. Append an attribute to the cookie-attribute-list with an\n // attribute-name of \"SameSite\" and an attribute-value of\n // enforcement.\n cookieAttributeList.sameSite = enforcement\n } else {\n cookieAttributeList.unparsed ??= []\n\n cookieAttributeList.unparsed.push(`${attributeName}=${attributeValue}`)\n }\n\n // 8. Return to Step 1 of this algorithm.\n return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList)\n}\n\nmodule.exports = {\n parseSetCookie,\n parseUnparsedAttributes\n}\n", "'use strict'\n\nconst { parseSetCookie } = require('./parse')\nconst { stringify, getHeadersList } = require('./util')\nconst { webidl } = require('../fetch/webidl')\nconst { Headers } = require('../fetch/headers')\n\n/**\n * @typedef {Object} Cookie\n * @property {string} name\n * @property {string} value\n * @property {Date|number|undefined} expires\n * @property {number|undefined} maxAge\n * @property {string|undefined} domain\n * @property {string|undefined} path\n * @property {boolean|undefined} secure\n * @property {boolean|undefined} httpOnly\n * @property {'Strict'|'Lax'|'None'} sameSite\n * @property {string[]} unparsed\n */\n\n/**\n * @param {Headers} headers\n * @returns {Record}\n */\nfunction getCookies (headers) {\n webidl.argumentLengthCheck(arguments, 1, { header: 'getCookies' })\n\n webidl.brandCheck(headers, Headers, { strict: false })\n\n const cookie = headers.get('cookie')\n const out = {}\n\n if (!cookie) {\n return out\n }\n\n for (const piece of cookie.split(';')) {\n const [name, ...value] = piece.split('=')\n\n out[name.trim()] = value.join('=')\n }\n\n return out\n}\n\n/**\n * @param {Headers} headers\n * @param {string} name\n * @param {{ path?: string, domain?: string }|undefined} attributes\n * @returns {void}\n */\nfunction deleteCookie (headers, name, attributes) {\n webidl.argumentLengthCheck(arguments, 2, { header: 'deleteCookie' })\n\n webidl.brandCheck(headers, Headers, { strict: false })\n\n name = webidl.converters.DOMString(name)\n attributes = webidl.converters.DeleteCookieAttributes(attributes)\n\n // Matches behavior of\n // https://github.com/denoland/deno_std/blob/63827b16330b82489a04614027c33b7904e08be5/http/cookie.ts#L278\n setCookie(headers, {\n name,\n value: '',\n expires: new Date(0),\n ...attributes\n })\n}\n\n/**\n * @param {Headers} headers\n * @returns {Cookie[]}\n */\nfunction getSetCookies (headers) {\n webidl.argumentLengthCheck(arguments, 1, { header: 'getSetCookies' })\n\n webidl.brandCheck(headers, Headers, { strict: false })\n\n const cookies = getHeadersList(headers).cookies\n\n if (!cookies) {\n return []\n }\n\n // In older versions of undici, cookies is a list of name:value.\n return cookies.map((pair) => parseSetCookie(Array.isArray(pair) ? pair[1] : pair))\n}\n\n/**\n * @param {Headers} headers\n * @param {Cookie} cookie\n * @returns {void}\n */\nfunction setCookie (headers, cookie) {\n webidl.argumentLengthCheck(arguments, 2, { header: 'setCookie' })\n\n webidl.brandCheck(headers, Headers, { strict: false })\n\n cookie = webidl.converters.Cookie(cookie)\n\n const str = stringify(cookie)\n\n if (str) {\n headers.append('Set-Cookie', stringify(cookie))\n }\n}\n\nwebidl.converters.DeleteCookieAttributes = webidl.dictionaryConverter([\n {\n converter: webidl.nullableConverter(webidl.converters.DOMString),\n key: 'path',\n defaultValue: null\n },\n {\n converter: webidl.nullableConverter(webidl.converters.DOMString),\n key: 'domain',\n defaultValue: null\n }\n])\n\nwebidl.converters.Cookie = webidl.dictionaryConverter([\n {\n converter: webidl.converters.DOMString,\n key: 'name'\n },\n {\n converter: webidl.converters.DOMString,\n key: 'value'\n },\n {\n converter: webidl.nullableConverter((value) => {\n if (typeof value === 'number') {\n return webidl.converters['unsigned long long'](value)\n }\n\n return new Date(value)\n }),\n key: 'expires',\n defaultValue: null\n },\n {\n converter: webidl.nullableConverter(webidl.converters['long long']),\n key: 'maxAge',\n defaultValue: null\n },\n {\n converter: webidl.nullableConverter(webidl.converters.DOMString),\n key: 'domain',\n defaultValue: null\n },\n {\n converter: webidl.nullableConverter(webidl.converters.DOMString),\n key: 'path',\n defaultValue: null\n },\n {\n converter: webidl.nullableConverter(webidl.converters.boolean),\n key: 'secure',\n defaultValue: null\n },\n {\n converter: webidl.nullableConverter(webidl.converters.boolean),\n key: 'httpOnly',\n defaultValue: null\n },\n {\n converter: webidl.converters.USVString,\n key: 'sameSite',\n allowedValues: ['Strict', 'Lax', 'None']\n },\n {\n converter: webidl.sequenceConverter(webidl.converters.DOMString),\n key: 'unparsed',\n defaultValue: []\n }\n])\n\nmodule.exports = {\n getCookies,\n deleteCookie,\n getSetCookies,\n setCookie\n}\n", "'use strict'\n\n// This is a Globally Unique Identifier unique used\n// to validate that the endpoint accepts websocket\n// connections.\n// See https://www.rfc-editor.org/rfc/rfc6455.html#section-1.3\nconst uid = '258EAFA5-E914-47DA-95CA-C5AB0DC85B11'\n\n/** @type {PropertyDescriptor} */\nconst staticPropertyDescriptors = {\n enumerable: true,\n writable: false,\n configurable: false\n}\n\nconst states = {\n CONNECTING: 0,\n OPEN: 1,\n CLOSING: 2,\n CLOSED: 3\n}\n\nconst opcodes = {\n CONTINUATION: 0x0,\n TEXT: 0x1,\n BINARY: 0x2,\n CLOSE: 0x8,\n PING: 0x9,\n PONG: 0xA\n}\n\nconst maxUnsigned16Bit = 2 ** 16 - 1 // 65535\n\nconst parserStates = {\n INFO: 0,\n PAYLOADLENGTH_16: 2,\n PAYLOADLENGTH_64: 3,\n READ_DATA: 4\n}\n\nconst emptyBuffer = Buffer.allocUnsafe(0)\n\nmodule.exports = {\n uid,\n staticPropertyDescriptors,\n states,\n opcodes,\n maxUnsigned16Bit,\n parserStates,\n emptyBuffer\n}\n", "'use strict'\n\nmodule.exports = {\n kWebSocketURL: Symbol('url'),\n kReadyState: Symbol('ready state'),\n kController: Symbol('controller'),\n kResponse: Symbol('response'),\n kBinaryType: Symbol('binary type'),\n kSentClose: Symbol('sent close'),\n kReceivedClose: Symbol('received close'),\n kByteParser: Symbol('byte parser')\n}\n", "'use strict'\n\nconst { webidl } = require('../fetch/webidl')\nconst { kEnumerableProperty } = require('../core/util')\nconst { MessagePort } = require('worker_threads')\n\n/**\n * @see https://html.spec.whatwg.org/multipage/comms.html#messageevent\n */\nclass MessageEvent extends Event {\n #eventInit\n\n constructor (type, eventInitDict = {}) {\n webidl.argumentLengthCheck(arguments, 1, { header: 'MessageEvent constructor' })\n\n type = webidl.converters.DOMString(type)\n eventInitDict = webidl.converters.MessageEventInit(eventInitDict)\n\n super(type, eventInitDict)\n\n this.#eventInit = eventInitDict\n }\n\n get data () {\n webidl.brandCheck(this, MessageEvent)\n\n return this.#eventInit.data\n }\n\n get origin () {\n webidl.brandCheck(this, MessageEvent)\n\n return this.#eventInit.origin\n }\n\n get lastEventId () {\n webidl.brandCheck(this, MessageEvent)\n\n return this.#eventInit.lastEventId\n }\n\n get source () {\n webidl.brandCheck(this, MessageEvent)\n\n return this.#eventInit.source\n }\n\n get ports () {\n webidl.brandCheck(this, MessageEvent)\n\n if (!Object.isFrozen(this.#eventInit.ports)) {\n Object.freeze(this.#eventInit.ports)\n }\n\n return this.#eventInit.ports\n }\n\n initMessageEvent (\n type,\n bubbles = false,\n cancelable = false,\n data = null,\n origin = '',\n lastEventId = '',\n source = null,\n ports = []\n ) {\n webidl.brandCheck(this, MessageEvent)\n\n webidl.argumentLengthCheck(arguments, 1, { header: 'MessageEvent.initMessageEvent' })\n\n return new MessageEvent(type, {\n bubbles, cancelable, data, origin, lastEventId, source, ports\n })\n }\n}\n\n/**\n * @see https://websockets.spec.whatwg.org/#the-closeevent-interface\n */\nclass CloseEvent extends Event {\n #eventInit\n\n constructor (type, eventInitDict = {}) {\n webidl.argumentLengthCheck(arguments, 1, { header: 'CloseEvent constructor' })\n\n type = webidl.converters.DOMString(type)\n eventInitDict = webidl.converters.CloseEventInit(eventInitDict)\n\n super(type, eventInitDict)\n\n this.#eventInit = eventInitDict\n }\n\n get wasClean () {\n webidl.brandCheck(this, CloseEvent)\n\n return this.#eventInit.wasClean\n }\n\n get code () {\n webidl.brandCheck(this, CloseEvent)\n\n return this.#eventInit.code\n }\n\n get reason () {\n webidl.brandCheck(this, CloseEvent)\n\n return this.#eventInit.reason\n }\n}\n\n// https://html.spec.whatwg.org/multipage/webappapis.html#the-errorevent-interface\nclass ErrorEvent extends Event {\n #eventInit\n\n constructor (type, eventInitDict) {\n webidl.argumentLengthCheck(arguments, 1, { header: 'ErrorEvent constructor' })\n\n super(type, eventInitDict)\n\n type = webidl.converters.DOMString(type)\n eventInitDict = webidl.converters.ErrorEventInit(eventInitDict ?? {})\n\n this.#eventInit = eventInitDict\n }\n\n get message () {\n webidl.brandCheck(this, ErrorEvent)\n\n return this.#eventInit.message\n }\n\n get filename () {\n webidl.brandCheck(this, ErrorEvent)\n\n return this.#eventInit.filename\n }\n\n get lineno () {\n webidl.brandCheck(this, ErrorEvent)\n\n return this.#eventInit.lineno\n }\n\n get colno () {\n webidl.brandCheck(this, ErrorEvent)\n\n return this.#eventInit.colno\n }\n\n get error () {\n webidl.brandCheck(this, ErrorEvent)\n\n return this.#eventInit.error\n }\n}\n\nObject.defineProperties(MessageEvent.prototype, {\n [Symbol.toStringTag]: {\n value: 'MessageEvent',\n configurable: true\n },\n data: kEnumerableProperty,\n origin: kEnumerableProperty,\n lastEventId: kEnumerableProperty,\n source: kEnumerableProperty,\n ports: kEnumerableProperty,\n initMessageEvent: kEnumerableProperty\n})\n\nObject.defineProperties(CloseEvent.prototype, {\n [Symbol.toStringTag]: {\n value: 'CloseEvent',\n configurable: true\n },\n reason: kEnumerableProperty,\n code: kEnumerableProperty,\n wasClean: kEnumerableProperty\n})\n\nObject.defineProperties(ErrorEvent.prototype, {\n [Symbol.toStringTag]: {\n value: 'ErrorEvent',\n configurable: true\n },\n message: kEnumerableProperty,\n filename: kEnumerableProperty,\n lineno: kEnumerableProperty,\n colno: kEnumerableProperty,\n error: kEnumerableProperty\n})\n\nwebidl.converters.MessagePort = webidl.interfaceConverter(MessagePort)\n\nwebidl.converters['sequence'] = webidl.sequenceConverter(\n webidl.converters.MessagePort\n)\n\nconst eventInit = [\n {\n key: 'bubbles',\n converter: webidl.converters.boolean,\n defaultValue: false\n },\n {\n key: 'cancelable',\n converter: webidl.converters.boolean,\n defaultValue: false\n },\n {\n key: 'composed',\n converter: webidl.converters.boolean,\n defaultValue: false\n }\n]\n\nwebidl.converters.MessageEventInit = webidl.dictionaryConverter([\n ...eventInit,\n {\n key: 'data',\n converter: webidl.converters.any,\n defaultValue: null\n },\n {\n key: 'origin',\n converter: webidl.converters.USVString,\n defaultValue: ''\n },\n {\n key: 'lastEventId',\n converter: webidl.converters.DOMString,\n defaultValue: ''\n },\n {\n key: 'source',\n // Node doesn't implement WindowProxy or ServiceWorker, so the only\n // valid value for source is a MessagePort.\n converter: webidl.nullableConverter(webidl.converters.MessagePort),\n defaultValue: null\n },\n {\n key: 'ports',\n converter: webidl.converters['sequence'],\n get defaultValue () {\n return []\n }\n }\n])\n\nwebidl.converters.CloseEventInit = webidl.dictionaryConverter([\n ...eventInit,\n {\n key: 'wasClean',\n converter: webidl.converters.boolean,\n defaultValue: false\n },\n {\n key: 'code',\n converter: webidl.converters['unsigned short'],\n defaultValue: 0\n },\n {\n key: 'reason',\n converter: webidl.converters.USVString,\n defaultValue: ''\n }\n])\n\nwebidl.converters.ErrorEventInit = webidl.dictionaryConverter([\n ...eventInit,\n {\n key: 'message',\n converter: webidl.converters.DOMString,\n defaultValue: ''\n },\n {\n key: 'filename',\n converter: webidl.converters.USVString,\n defaultValue: ''\n },\n {\n key: 'lineno',\n converter: webidl.converters['unsigned long'],\n defaultValue: 0\n },\n {\n key: 'colno',\n converter: webidl.converters['unsigned long'],\n defaultValue: 0\n },\n {\n key: 'error',\n converter: webidl.converters.any\n }\n])\n\nmodule.exports = {\n MessageEvent,\n CloseEvent,\n ErrorEvent\n}\n", "'use strict'\n\nconst { kReadyState, kController, kResponse, kBinaryType, kWebSocketURL } = require('./symbols')\nconst { states, opcodes } = require('./constants')\nconst { MessageEvent, ErrorEvent } = require('./events')\n\n/* globals Blob */\n\n/**\n * @param {import('./websocket').WebSocket} ws\n */\nfunction isEstablished (ws) {\n // If the server's response is validated as provided for above, it is\n // said that _The WebSocket Connection is Established_ and that the\n // WebSocket Connection is in the OPEN state.\n return ws[kReadyState] === states.OPEN\n}\n\n/**\n * @param {import('./websocket').WebSocket} ws\n */\nfunction isClosing (ws) {\n // Upon either sending or receiving a Close control frame, it is said\n // that _The WebSocket Closing Handshake is Started_ and that the\n // WebSocket connection is in the CLOSING state.\n return ws[kReadyState] === states.CLOSING\n}\n\n/**\n * @param {import('./websocket').WebSocket} ws\n */\nfunction isClosed (ws) {\n return ws[kReadyState] === states.CLOSED\n}\n\n/**\n * @see https://dom.spec.whatwg.org/#concept-event-fire\n * @param {string} e\n * @param {EventTarget} target\n * @param {EventInit | undefined} eventInitDict\n */\nfunction fireEvent (e, target, eventConstructor = Event, eventInitDict) {\n // 1. If eventConstructor is not given, then let eventConstructor be Event.\n\n // 2. Let event be the result of creating an event given eventConstructor,\n // in the relevant realm of target.\n // 3. Initialize event\u2019s type attribute to e.\n const event = new eventConstructor(e, eventInitDict) // eslint-disable-line new-cap\n\n // 4. Initialize any other IDL attributes of event as described in the\n // invocation of this algorithm.\n\n // 5. Return the result of dispatching event at target, with legacy target\n // override flag set if set.\n target.dispatchEvent(event)\n}\n\n/**\n * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol\n * @param {import('./websocket').WebSocket} ws\n * @param {number} type Opcode\n * @param {Buffer} data application data\n */\nfunction websocketMessageReceived (ws, type, data) {\n // 1. If ready state is not OPEN (1), then return.\n if (ws[kReadyState] !== states.OPEN) {\n return\n }\n\n // 2. Let dataForEvent be determined by switching on type and binary type:\n let dataForEvent\n\n if (type === opcodes.TEXT) {\n // -> type indicates that the data is Text\n // a new DOMString containing data\n try {\n dataForEvent = new TextDecoder('utf-8', { fatal: true }).decode(data)\n } catch {\n failWebsocketConnection(ws, 'Received invalid UTF-8 in text frame.')\n return\n }\n } else if (type === opcodes.BINARY) {\n if (ws[kBinaryType] === 'blob') {\n // -> type indicates that the data is Binary and binary type is \"blob\"\n // a new Blob object, created in the relevant Realm of the WebSocket\n // object, that represents data as its raw data\n dataForEvent = new Blob([data])\n } else {\n // -> type indicates that the data is Binary and binary type is \"arraybuffer\"\n // a new ArrayBuffer object, created in the relevant Realm of the\n // WebSocket object, whose contents are data\n dataForEvent = new Uint8Array(data).buffer\n }\n }\n\n // 3. Fire an event named message at the WebSocket object, using MessageEvent,\n // with the origin attribute initialized to the serialization of the WebSocket\n // object\u2019s url's origin, and the data attribute initialized to dataForEvent.\n fireEvent('message', ws, MessageEvent, {\n origin: ws[kWebSocketURL].origin,\n data: dataForEvent\n })\n}\n\n/**\n * @see https://datatracker.ietf.org/doc/html/rfc6455\n * @see https://datatracker.ietf.org/doc/html/rfc2616\n * @see https://bugs.chromium.org/p/chromium/issues/detail?id=398407\n * @param {string} protocol\n */\nfunction isValidSubprotocol (protocol) {\n // If present, this value indicates one\n // or more comma-separated subprotocol the client wishes to speak,\n // ordered by preference. The elements that comprise this value\n // MUST be non-empty strings with characters in the range U+0021 to\n // U+007E not including separator characters as defined in\n // [RFC2616] and MUST all be unique strings.\n if (protocol.length === 0) {\n return false\n }\n\n for (const char of protocol) {\n const code = char.charCodeAt(0)\n\n if (\n code < 0x21 ||\n code > 0x7E ||\n char === '(' ||\n char === ')' ||\n char === '<' ||\n char === '>' ||\n char === '@' ||\n char === ',' ||\n char === ';' ||\n char === ':' ||\n char === '\\\\' ||\n char === '\"' ||\n char === '/' ||\n char === '[' ||\n char === ']' ||\n char === '?' ||\n char === '=' ||\n char === '{' ||\n char === '}' ||\n code === 32 || // SP\n code === 9 // HT\n ) {\n return false\n }\n }\n\n return true\n}\n\n/**\n * @see https://datatracker.ietf.org/doc/html/rfc6455#section-7-4\n * @param {number} code\n */\nfunction isValidStatusCode (code) {\n if (code >= 1000 && code < 1015) {\n return (\n code !== 1004 && // reserved\n code !== 1005 && // \"MUST NOT be set as a status code\"\n code !== 1006 // \"MUST NOT be set as a status code\"\n )\n }\n\n return code >= 3000 && code <= 4999\n}\n\n/**\n * @param {import('./websocket').WebSocket} ws\n * @param {string|undefined} reason\n */\nfunction failWebsocketConnection (ws, reason) {\n const { [kController]: controller, [kResponse]: response } = ws\n\n controller.abort()\n\n if (response?.socket && !response.socket.destroyed) {\n response.socket.destroy()\n }\n\n if (reason) {\n fireEvent('error', ws, ErrorEvent, {\n error: new Error(reason)\n })\n }\n}\n\nmodule.exports = {\n isEstablished,\n isClosing,\n isClosed,\n fireEvent,\n isValidSubprotocol,\n isValidStatusCode,\n failWebsocketConnection,\n websocketMessageReceived\n}\n", "'use strict'\n\nconst diagnosticsChannel = require('diagnostics_channel')\nconst { uid, states } = require('./constants')\nconst {\n kReadyState,\n kSentClose,\n kByteParser,\n kReceivedClose\n} = require('./symbols')\nconst { fireEvent, failWebsocketConnection } = require('./util')\nconst { CloseEvent } = require('./events')\nconst { makeRequest } = require('../fetch/request')\nconst { fetching } = require('../fetch/index')\nconst { Headers } = require('../fetch/headers')\nconst { getGlobalDispatcher } = require('../global')\nconst { kHeadersList } = require('../core/symbols')\n\nconst channels = {}\nchannels.open = diagnosticsChannel.channel('undici:websocket:open')\nchannels.close = diagnosticsChannel.channel('undici:websocket:close')\nchannels.socketError = diagnosticsChannel.channel('undici:websocket:socket_error')\n\n/** @type {import('crypto')} */\nlet crypto\ntry {\n crypto = require('crypto')\n} catch {\n\n}\n\n/**\n * @see https://websockets.spec.whatwg.org/#concept-websocket-establish\n * @param {URL} url\n * @param {string|string[]} protocols\n * @param {import('./websocket').WebSocket} ws\n * @param {(response: any) => void} onEstablish\n * @param {Partial} options\n */\nfunction establishWebSocketConnection (url, protocols, ws, onEstablish, options) {\n // 1. Let requestURL be a copy of url, with its scheme set to \"http\", if url\u2019s\n // scheme is \"ws\", and to \"https\" otherwise.\n const requestURL = url\n\n requestURL.protocol = url.protocol === 'ws:' ? 'http:' : 'https:'\n\n // 2. Let request be a new request, whose URL is requestURL, client is client,\n // service-workers mode is \"none\", referrer is \"no-referrer\", mode is\n // \"websocket\", credentials mode is \"include\", cache mode is \"no-store\" ,\n // and redirect mode is \"error\".\n const request = makeRequest({\n urlList: [requestURL],\n serviceWorkers: 'none',\n referrer: 'no-referrer',\n mode: 'websocket',\n credentials: 'include',\n cache: 'no-store',\n redirect: 'error'\n })\n\n // Note: undici extension, allow setting custom headers.\n if (options.headers) {\n const headersList = new Headers(options.headers)[kHeadersList]\n\n request.headersList = headersList\n }\n\n // 3. Append (`Upgrade`, `websocket`) to request\u2019s header list.\n // 4. Append (`Connection`, `Upgrade`) to request\u2019s header list.\n // Note: both of these are handled by undici currently.\n // https://github.com/nodejs/undici/blob/68c269c4144c446f3f1220951338daef4a6b5ec4/lib/client.js#L1397\n\n // 5. Let keyValue be a nonce consisting of a randomly selected\n // 16-byte value that has been forgiving-base64-encoded and\n // isomorphic encoded.\n const keyValue = crypto.randomBytes(16).toString('base64')\n\n // 6. Append (`Sec-WebSocket-Key`, keyValue) to request\u2019s\n // header list.\n request.headersList.append('sec-websocket-key', keyValue)\n\n // 7. Append (`Sec-WebSocket-Version`, `13`) to request\u2019s\n // header list.\n request.headersList.append('sec-websocket-version', '13')\n\n // 8. For each protocol in protocols, combine\n // (`Sec-WebSocket-Protocol`, protocol) in request\u2019s header\n // list.\n for (const protocol of protocols) {\n request.headersList.append('sec-websocket-protocol', protocol)\n }\n\n // 9. Let permessageDeflate be a user-agent defined\n // \"permessage-deflate\" extension header value.\n // https://github.com/mozilla/gecko-dev/blob/ce78234f5e653a5d3916813ff990f053510227bc/netwerk/protocol/websocket/WebSocketChannel.cpp#L2673\n // TODO: enable once permessage-deflate is supported\n const permessageDeflate = '' // 'permessage-deflate; 15'\n\n // 10. Append (`Sec-WebSocket-Extensions`, permessageDeflate) to\n // request\u2019s header list.\n // request.headersList.append('sec-websocket-extensions', permessageDeflate)\n\n // 11. Fetch request with useParallelQueue set to true, and\n // processResponse given response being these steps:\n const controller = fetching({\n request,\n useParallelQueue: true,\n dispatcher: options.dispatcher ?? getGlobalDispatcher(),\n processResponse (response) {\n // 1. If response is a network error or its status is not 101,\n // fail the WebSocket connection.\n if (response.type === 'error' || response.status !== 101) {\n failWebsocketConnection(ws, 'Received network error or non-101 status code.')\n return\n }\n\n // 2. If protocols is not the empty list and extracting header\n // list values given `Sec-WebSocket-Protocol` and response\u2019s\n // header list results in null, failure, or the empty byte\n // sequence, then fail the WebSocket connection.\n if (protocols.length !== 0 && !response.headersList.get('Sec-WebSocket-Protocol')) {\n failWebsocketConnection(ws, 'Server did not respond with sent protocols.')\n return\n }\n\n // 3. Follow the requirements stated step 2 to step 6, inclusive,\n // of the last set of steps in section 4.1 of The WebSocket\n // Protocol to validate response. This either results in fail\n // the WebSocket connection or the WebSocket connection is\n // established.\n\n // 2. If the response lacks an |Upgrade| header field or the |Upgrade|\n // header field contains a value that is not an ASCII case-\n // insensitive match for the value \"websocket\", the client MUST\n // _Fail the WebSocket Connection_.\n if (response.headersList.get('Upgrade')?.toLowerCase() !== 'websocket') {\n failWebsocketConnection(ws, 'Server did not set Upgrade header to \"websocket\".')\n return\n }\n\n // 3. If the response lacks a |Connection| header field or the\n // |Connection| header field doesn't contain a token that is an\n // ASCII case-insensitive match for the value \"Upgrade\", the client\n // MUST _Fail the WebSocket Connection_.\n if (response.headersList.get('Connection')?.toLowerCase() !== 'upgrade') {\n failWebsocketConnection(ws, 'Server did not set Connection header to \"upgrade\".')\n return\n }\n\n // 4. If the response lacks a |Sec-WebSocket-Accept| header field or\n // the |Sec-WebSocket-Accept| contains a value other than the\n // base64-encoded SHA-1 of the concatenation of the |Sec-WebSocket-\n // Key| (as a string, not base64-decoded) with the string \"258EAFA5-\n // E914-47DA-95CA-C5AB0DC85B11\" but ignoring any leading and\n // trailing whitespace, the client MUST _Fail the WebSocket\n // Connection_.\n const secWSAccept = response.headersList.get('Sec-WebSocket-Accept')\n const digest = crypto.createHash('sha1').update(keyValue + uid).digest('base64')\n if (secWSAccept !== digest) {\n failWebsocketConnection(ws, 'Incorrect hash received in Sec-WebSocket-Accept header.')\n return\n }\n\n // 5. If the response includes a |Sec-WebSocket-Extensions| header\n // field and this header field indicates the use of an extension\n // that was not present in the client's handshake (the server has\n // indicated an extension not requested by the client), the client\n // MUST _Fail the WebSocket Connection_. (The parsing of this\n // header field to determine which extensions are requested is\n // discussed in Section 9.1.)\n const secExtension = response.headersList.get('Sec-WebSocket-Extensions')\n\n if (secExtension !== null && secExtension !== permessageDeflate) {\n failWebsocketConnection(ws, 'Received different permessage-deflate than the one set.')\n return\n }\n\n // 6. If the response includes a |Sec-WebSocket-Protocol| header field\n // and this header field indicates the use of a subprotocol that was\n // not present in the client's handshake (the server has indicated a\n // subprotocol not requested by the client), the client MUST _Fail\n // the WebSocket Connection_.\n const secProtocol = response.headersList.get('Sec-WebSocket-Protocol')\n\n if (secProtocol !== null && secProtocol !== request.headersList.get('Sec-WebSocket-Protocol')) {\n failWebsocketConnection(ws, 'Protocol was not set in the opening handshake.')\n return\n }\n\n response.socket.on('data', onSocketData)\n response.socket.on('close', onSocketClose)\n response.socket.on('error', onSocketError)\n\n if (channels.open.hasSubscribers) {\n channels.open.publish({\n address: response.socket.address(),\n protocol: secProtocol,\n extensions: secExtension\n })\n }\n\n onEstablish(response)\n }\n })\n\n return controller\n}\n\n/**\n * @param {Buffer} chunk\n */\nfunction onSocketData (chunk) {\n if (!this.ws[kByteParser].write(chunk)) {\n this.pause()\n }\n}\n\n/**\n * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol\n * @see https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.4\n */\nfunction onSocketClose () {\n const { ws } = this\n\n // If the TCP connection was closed after the\n // WebSocket closing handshake was completed, the WebSocket connection\n // is said to have been closed _cleanly_.\n const wasClean = ws[kSentClose] && ws[kReceivedClose]\n\n let code = 1005\n let reason = ''\n\n const result = ws[kByteParser].closingInfo\n\n if (result) {\n code = result.code ?? 1005\n reason = result.reason\n } else if (!ws[kSentClose]) {\n // If _The WebSocket\n // Connection is Closed_ and no Close control frame was received by the\n // endpoint (such as could occur if the underlying transport connection\n // is lost), _The WebSocket Connection Close Code_ is considered to be\n // 1006.\n code = 1006\n }\n\n // 1. Change the ready state to CLOSED (3).\n ws[kReadyState] = states.CLOSED\n\n // 2. If the user agent was required to fail the WebSocket\n // connection, or if the WebSocket connection was closed\n // after being flagged as full, fire an event named error\n // at the WebSocket object.\n // TODO\n\n // 3. Fire an event named close at the WebSocket object,\n // using CloseEvent, with the wasClean attribute\n // initialized to true if the connection closed cleanly\n // and false otherwise, the code attribute initialized to\n // the WebSocket connection close code, and the reason\n // attribute initialized to the result of applying UTF-8\n // decode without BOM to the WebSocket connection close\n // reason.\n fireEvent('close', ws, CloseEvent, {\n wasClean, code, reason\n })\n\n if (channels.close.hasSubscribers) {\n channels.close.publish({\n websocket: ws,\n code,\n reason\n })\n }\n}\n\nfunction onSocketError (error) {\n const { ws } = this\n\n ws[kReadyState] = states.CLOSING\n\n if (channels.socketError.hasSubscribers) {\n channels.socketError.publish(error)\n }\n\n this.destroy()\n}\n\nmodule.exports = {\n establishWebSocketConnection\n}\n", "'use strict'\n\nconst { maxUnsigned16Bit } = require('./constants')\n\n/** @type {import('crypto')} */\nlet crypto\ntry {\n crypto = require('crypto')\n} catch {\n\n}\n\nclass WebsocketFrameSend {\n /**\n * @param {Buffer|undefined} data\n */\n constructor (data) {\n this.frameData = data\n this.maskKey = crypto.randomBytes(4)\n }\n\n createFrame (opcode) {\n const bodyLength = this.frameData?.byteLength ?? 0\n\n /** @type {number} */\n let payloadLength = bodyLength // 0-125\n let offset = 6\n\n if (bodyLength > maxUnsigned16Bit) {\n offset += 8 // payload length is next 8 bytes\n payloadLength = 127\n } else if (bodyLength > 125) {\n offset += 2 // payload length is next 2 bytes\n payloadLength = 126\n }\n\n const buffer = Buffer.allocUnsafe(bodyLength + offset)\n\n // Clear first 2 bytes, everything else is overwritten\n buffer[0] = buffer[1] = 0\n buffer[0] |= 0x80 // FIN\n buffer[0] = (buffer[0] & 0xF0) + opcode // opcode\n\n /*! ws. MIT License. Einar Otto Stangvik */\n buffer[offset - 4] = this.maskKey[0]\n buffer[offset - 3] = this.maskKey[1]\n buffer[offset - 2] = this.maskKey[2]\n buffer[offset - 1] = this.maskKey[3]\n\n buffer[1] = payloadLength\n\n if (payloadLength === 126) {\n buffer.writeUInt16BE(bodyLength, 2)\n } else if (payloadLength === 127) {\n // Clear extended payload length\n buffer[2] = buffer[3] = 0\n buffer.writeUIntBE(bodyLength, 4, 6)\n }\n\n buffer[1] |= 0x80 // MASK\n\n // mask body\n for (let i = 0; i < bodyLength; i++) {\n buffer[offset + i] = this.frameData[i] ^ this.maskKey[i % 4]\n }\n\n return buffer\n }\n}\n\nmodule.exports = {\n WebsocketFrameSend\n}\n", "'use strict'\n\nconst { Writable } = require('stream')\nconst diagnosticsChannel = require('diagnostics_channel')\nconst { parserStates, opcodes, states, emptyBuffer } = require('./constants')\nconst { kReadyState, kSentClose, kResponse, kReceivedClose } = require('./symbols')\nconst { isValidStatusCode, failWebsocketConnection, websocketMessageReceived } = require('./util')\nconst { WebsocketFrameSend } = require('./frame')\n\n// This code was influenced by ws released under the MIT license.\n// Copyright (c) 2011 Einar Otto Stangvik \n// Copyright (c) 2013 Arnout Kazemier and contributors\n// Copyright (c) 2016 Luigi Pinca and contributors\n\nconst channels = {}\nchannels.ping = diagnosticsChannel.channel('undici:websocket:ping')\nchannels.pong = diagnosticsChannel.channel('undici:websocket:pong')\n\nclass ByteParser extends Writable {\n #buffers = []\n #byteOffset = 0\n\n #state = parserStates.INFO\n\n #info = {}\n #fragments = []\n\n constructor (ws) {\n super()\n\n this.ws = ws\n }\n\n /**\n * @param {Buffer} chunk\n * @param {() => void} callback\n */\n _write (chunk, _, callback) {\n this.#buffers.push(chunk)\n this.#byteOffset += chunk.length\n\n this.run(callback)\n }\n\n /**\n * Runs whenever a new chunk is received.\n * Callback is called whenever there are no more chunks buffering,\n * or not enough bytes are buffered to parse.\n */\n run (callback) {\n while (true) {\n if (this.#state === parserStates.INFO) {\n // If there aren't enough bytes to parse the payload length, etc.\n if (this.#byteOffset < 2) {\n return callback()\n }\n\n const buffer = this.consume(2)\n\n this.#info.fin = (buffer[0] & 0x80) !== 0\n this.#info.opcode = buffer[0] & 0x0F\n\n // If we receive a fragmented message, we use the type of the first\n // frame to parse the full message as binary/text, when it's terminated\n this.#info.originalOpcode ??= this.#info.opcode\n\n this.#info.fragmented = !this.#info.fin && this.#info.opcode !== opcodes.CONTINUATION\n\n if (this.#info.fragmented && this.#info.opcode !== opcodes.BINARY && this.#info.opcode !== opcodes.TEXT) {\n // Only text and binary frames can be fragmented\n failWebsocketConnection(this.ws, 'Invalid frame type was fragmented.')\n return\n }\n\n const payloadLength = buffer[1] & 0x7F\n\n if (payloadLength <= 125) {\n this.#info.payloadLength = payloadLength\n this.#state = parserStates.READ_DATA\n } else if (payloadLength === 126) {\n this.#state = parserStates.PAYLOADLENGTH_16\n } else if (payloadLength === 127) {\n this.#state = parserStates.PAYLOADLENGTH_64\n }\n\n if (this.#info.fragmented && payloadLength > 125) {\n // A fragmented frame can't be fragmented itself\n failWebsocketConnection(this.ws, 'Fragmented frame exceeded 125 bytes.')\n return\n } else if (\n (this.#info.opcode === opcodes.PING ||\n this.#info.opcode === opcodes.PONG ||\n this.#info.opcode === opcodes.CLOSE) &&\n payloadLength > 125\n ) {\n // Control frames can have a payload length of 125 bytes MAX\n failWebsocketConnection(this.ws, 'Payload length for control frame exceeded 125 bytes.')\n return\n } else if (this.#info.opcode === opcodes.CLOSE) {\n if (payloadLength === 1) {\n failWebsocketConnection(this.ws, 'Received close frame with a 1-byte body.')\n return\n }\n\n const body = this.consume(payloadLength)\n\n this.#info.closeInfo = this.parseCloseBody(false, body)\n\n if (!this.ws[kSentClose]) {\n // If an endpoint receives a Close frame and did not previously send a\n // Close frame, the endpoint MUST send a Close frame in response. (When\n // sending a Close frame in response, the endpoint typically echos the\n // status code it received.)\n const body = Buffer.allocUnsafe(2)\n body.writeUInt16BE(this.#info.closeInfo.code, 0)\n const closeFrame = new WebsocketFrameSend(body)\n\n this.ws[kResponse].socket.write(\n closeFrame.createFrame(opcodes.CLOSE),\n (err) => {\n if (!err) {\n this.ws[kSentClose] = true\n }\n }\n )\n }\n\n // Upon either sending or receiving a Close control frame, it is said\n // that _The WebSocket Closing Handshake is Started_ and that the\n // WebSocket connection is in the CLOSING state.\n this.ws[kReadyState] = states.CLOSING\n this.ws[kReceivedClose] = true\n\n this.end()\n\n return\n } else if (this.#info.opcode === opcodes.PING) {\n // Upon receipt of a Ping frame, an endpoint MUST send a Pong frame in\n // response, unless it already received a Close frame.\n // A Pong frame sent in response to a Ping frame must have identical\n // \"Application data\"\n\n const body = this.consume(payloadLength)\n\n if (!this.ws[kReceivedClose]) {\n const frame = new WebsocketFrameSend(body)\n\n this.ws[kResponse].socket.write(frame.createFrame(opcodes.PONG))\n\n if (channels.ping.hasSubscribers) {\n channels.ping.publish({\n payload: body\n })\n }\n }\n\n this.#state = parserStates.INFO\n\n if (this.#byteOffset > 0) {\n continue\n } else {\n callback()\n return\n }\n } else if (this.#info.opcode === opcodes.PONG) {\n // A Pong frame MAY be sent unsolicited. This serves as a\n // unidirectional heartbeat. A response to an unsolicited Pong frame is\n // not expected.\n\n const body = this.consume(payloadLength)\n\n if (channels.pong.hasSubscribers) {\n channels.pong.publish({\n payload: body\n })\n }\n\n if (this.#byteOffset > 0) {\n continue\n } else {\n callback()\n return\n }\n }\n } else if (this.#state === parserStates.PAYLOADLENGTH_16) {\n if (this.#byteOffset < 2) {\n return callback()\n }\n\n const buffer = this.consume(2)\n\n this.#info.payloadLength = buffer.readUInt16BE(0)\n this.#state = parserStates.READ_DATA\n } else if (this.#state === parserStates.PAYLOADLENGTH_64) {\n if (this.#byteOffset < 8) {\n return callback()\n }\n\n const buffer = this.consume(8)\n const upper = buffer.readUInt32BE(0)\n\n // 2^31 is the maxinimum bytes an arraybuffer can contain\n // on 32-bit systems. Although, on 64-bit systems, this is\n // 2^53-1 bytes.\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Invalid_array_length\n // https://source.chromium.org/chromium/chromium/src/+/main:v8/src/common/globals.h;drc=1946212ac0100668f14eb9e2843bdd846e510a1e;bpv=1;bpt=1;l=1275\n // https://source.chromium.org/chromium/chromium/src/+/main:v8/src/objects/js-array-buffer.h;l=34;drc=1946212ac0100668f14eb9e2843bdd846e510a1e\n if (upper > 2 ** 31 - 1) {\n failWebsocketConnection(this.ws, 'Received payload length > 2^31 bytes.')\n return\n }\n\n const lower = buffer.readUInt32BE(4)\n\n this.#info.payloadLength = (upper << 8) + lower\n this.#state = parserStates.READ_DATA\n } else if (this.#state === parserStates.READ_DATA) {\n if (this.#byteOffset < this.#info.payloadLength) {\n // If there is still more data in this chunk that needs to be read\n return callback()\n } else if (this.#byteOffset >= this.#info.payloadLength) {\n // If the server sent multiple frames in a single chunk\n\n const body = this.consume(this.#info.payloadLength)\n\n this.#fragments.push(body)\n\n // If the frame is unfragmented, or a fragmented frame was terminated,\n // a message was received\n if (!this.#info.fragmented || (this.#info.fin && this.#info.opcode === opcodes.CONTINUATION)) {\n const fullMessage = Buffer.concat(this.#fragments)\n\n websocketMessageReceived(this.ws, this.#info.originalOpcode, fullMessage)\n\n this.#info = {}\n this.#fragments.length = 0\n }\n\n this.#state = parserStates.INFO\n }\n }\n\n if (this.#byteOffset > 0) {\n continue\n } else {\n callback()\n break\n }\n }\n }\n\n /**\n * Take n bytes from the buffered Buffers\n * @param {number} n\n * @returns {Buffer|null}\n */\n consume (n) {\n if (n > this.#byteOffset) {\n return null\n } else if (n === 0) {\n return emptyBuffer\n }\n\n if (this.#buffers[0].length === n) {\n this.#byteOffset -= this.#buffers[0].length\n return this.#buffers.shift()\n }\n\n const buffer = Buffer.allocUnsafe(n)\n let offset = 0\n\n while (offset !== n) {\n const next = this.#buffers[0]\n const { length } = next\n\n if (length + offset === n) {\n buffer.set(this.#buffers.shift(), offset)\n break\n } else if (length + offset > n) {\n buffer.set(next.subarray(0, n - offset), offset)\n this.#buffers[0] = next.subarray(n - offset)\n break\n } else {\n buffer.set(this.#buffers.shift(), offset)\n offset += next.length\n }\n }\n\n this.#byteOffset -= n\n\n return buffer\n }\n\n parseCloseBody (onlyCode, data) {\n // https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.5\n /** @type {number|undefined} */\n let code\n\n if (data.length >= 2) {\n // _The WebSocket Connection Close Code_ is\n // defined as the status code (Section 7.4) contained in the first Close\n // control frame received by the application\n code = data.readUInt16BE(0)\n }\n\n if (onlyCode) {\n if (!isValidStatusCode(code)) {\n return null\n }\n\n return { code }\n }\n\n // https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.6\n /** @type {Buffer} */\n let reason = data.subarray(2)\n\n // Remove BOM\n if (reason[0] === 0xEF && reason[1] === 0xBB && reason[2] === 0xBF) {\n reason = reason.subarray(3)\n }\n\n if (code !== undefined && !isValidStatusCode(code)) {\n return null\n }\n\n try {\n // TODO: optimize this\n reason = new TextDecoder('utf-8', { fatal: true }).decode(reason)\n } catch {\n return null\n }\n\n return { code, reason }\n }\n\n get closingInfo () {\n return this.#info.closeInfo\n }\n}\n\nmodule.exports = {\n ByteParser\n}\n", "'use strict'\n\nconst { webidl } = require('../fetch/webidl')\nconst { DOMException } = require('../fetch/constants')\nconst { URLSerializer } = require('../fetch/dataURL')\nconst { getGlobalOrigin } = require('../fetch/global')\nconst { staticPropertyDescriptors, states, opcodes, emptyBuffer } = require('./constants')\nconst {\n kWebSocketURL,\n kReadyState,\n kController,\n kBinaryType,\n kResponse,\n kSentClose,\n kByteParser\n} = require('./symbols')\nconst { isEstablished, isClosing, isValidSubprotocol, failWebsocketConnection, fireEvent } = require('./util')\nconst { establishWebSocketConnection } = require('./connection')\nconst { WebsocketFrameSend } = require('./frame')\nconst { ByteParser } = require('./receiver')\nconst { kEnumerableProperty, isBlobLike } = require('../core/util')\nconst { getGlobalDispatcher } = require('../global')\nconst { types } = require('util')\n\nlet experimentalWarned = false\n\n// https://websockets.spec.whatwg.org/#interface-definition\nclass WebSocket extends EventTarget {\n #events = {\n open: null,\n error: null,\n close: null,\n message: null\n }\n\n #bufferedAmount = 0\n #protocol = ''\n #extensions = ''\n\n /**\n * @param {string} url\n * @param {string|string[]} protocols\n */\n constructor (url, protocols = []) {\n super()\n\n webidl.argumentLengthCheck(arguments, 1, { header: 'WebSocket constructor' })\n\n if (!experimentalWarned) {\n experimentalWarned = true\n process.emitWarning('WebSockets are experimental, expect them to change at any time.', {\n code: 'UNDICI-WS'\n })\n }\n\n const options = webidl.converters['DOMString or sequence or WebSocketInit'](protocols)\n\n url = webidl.converters.USVString(url)\n protocols = options.protocols\n\n // 1. Let baseURL be this's relevant settings object's API base URL.\n const baseURL = getGlobalOrigin()\n\n // 1. Let urlRecord be the result of applying the URL parser to url with baseURL.\n let urlRecord\n\n try {\n urlRecord = new URL(url, baseURL)\n } catch (e) {\n // 3. If urlRecord is failure, then throw a \"SyntaxError\" DOMException.\n throw new DOMException(e, 'SyntaxError')\n }\n\n // 4. If urlRecord\u2019s scheme is \"http\", then set urlRecord\u2019s scheme to \"ws\".\n if (urlRecord.protocol === 'http:') {\n urlRecord.protocol = 'ws:'\n } else if (urlRecord.protocol === 'https:') {\n // 5. Otherwise, if urlRecord\u2019s scheme is \"https\", set urlRecord\u2019s scheme to \"wss\".\n urlRecord.protocol = 'wss:'\n }\n\n // 6. If urlRecord\u2019s scheme is not \"ws\" or \"wss\", then throw a \"SyntaxError\" DOMException.\n if (urlRecord.protocol !== 'ws:' && urlRecord.protocol !== 'wss:') {\n throw new DOMException(\n `Expected a ws: or wss: protocol, got ${urlRecord.protocol}`,\n 'SyntaxError'\n )\n }\n\n // 7. If urlRecord\u2019s fragment is non-null, then throw a \"SyntaxError\"\n // DOMException.\n if (urlRecord.hash || urlRecord.href.endsWith('#')) {\n throw new DOMException('Got fragment', 'SyntaxError')\n }\n\n // 8. If protocols is a string, set protocols to a sequence consisting\n // of just that string.\n if (typeof protocols === 'string') {\n protocols = [protocols]\n }\n\n // 9. If any of the values in protocols occur more than once or otherwise\n // fail to match the requirements for elements that comprise the value\n // of `Sec-WebSocket-Protocol` fields as defined by The WebSocket\n // protocol, then throw a \"SyntaxError\" DOMException.\n if (protocols.length !== new Set(protocols.map(p => p.toLowerCase())).size) {\n throw new DOMException('Invalid Sec-WebSocket-Protocol value', 'SyntaxError')\n }\n\n if (protocols.length > 0 && !protocols.every(p => isValidSubprotocol(p))) {\n throw new DOMException('Invalid Sec-WebSocket-Protocol value', 'SyntaxError')\n }\n\n // 10. Set this's url to urlRecord.\n this[kWebSocketURL] = new URL(urlRecord.href)\n\n // 11. Let client be this's relevant settings object.\n\n // 12. Run this step in parallel:\n\n // 1. Establish a WebSocket connection given urlRecord, protocols,\n // and client.\n this[kController] = establishWebSocketConnection(\n urlRecord,\n protocols,\n this,\n (response) => this.#onConnectionEstablished(response),\n options\n )\n\n // Each WebSocket object has an associated ready state, which is a\n // number representing the state of the connection. Initially it must\n // be CONNECTING (0).\n this[kReadyState] = WebSocket.CONNECTING\n\n // The extensions attribute must initially return the empty string.\n\n // The protocol attribute must initially return the empty string.\n\n // Each WebSocket object has an associated binary type, which is a\n // BinaryType. Initially it must be \"blob\".\n this[kBinaryType] = 'blob'\n }\n\n /**\n * @see https://websockets.spec.whatwg.org/#dom-websocket-close\n * @param {number|undefined} code\n * @param {string|undefined} reason\n */\n close (code = undefined, reason = undefined) {\n webidl.brandCheck(this, WebSocket)\n\n if (code !== undefined) {\n code = webidl.converters['unsigned short'](code, { clamp: true })\n }\n\n if (reason !== undefined) {\n reason = webidl.converters.USVString(reason)\n }\n\n // 1. If code is present, but is neither an integer equal to 1000 nor an\n // integer in the range 3000 to 4999, inclusive, throw an\n // \"InvalidAccessError\" DOMException.\n if (code !== undefined) {\n if (code !== 1000 && (code < 3000 || code > 4999)) {\n throw new DOMException('invalid code', 'InvalidAccessError')\n }\n }\n\n let reasonByteLength = 0\n\n // 2. If reason is present, then run these substeps:\n if (reason !== undefined) {\n // 1. Let reasonBytes be the result of encoding reason.\n // 2. If reasonBytes is longer than 123 bytes, then throw a\n // \"SyntaxError\" DOMException.\n reasonByteLength = Buffer.byteLength(reason)\n\n if (reasonByteLength > 123) {\n throw new DOMException(\n `Reason must be less than 123 bytes; received ${reasonByteLength}`,\n 'SyntaxError'\n )\n }\n }\n\n // 3. Run the first matching steps from the following list:\n if (this[kReadyState] === WebSocket.CLOSING || this[kReadyState] === WebSocket.CLOSED) {\n // If this's ready state is CLOSING (2) or CLOSED (3)\n // Do nothing.\n } else if (!isEstablished(this)) {\n // If the WebSocket connection is not yet established\n // Fail the WebSocket connection and set this's ready state\n // to CLOSING (2).\n failWebsocketConnection(this, 'Connection was closed before it was established.')\n this[kReadyState] = WebSocket.CLOSING\n } else if (!isClosing(this)) {\n // If the WebSocket closing handshake has not yet been started\n // Start the WebSocket closing handshake and set this's ready\n // state to CLOSING (2).\n // - If neither code nor reason is present, the WebSocket Close\n // message must not have a body.\n // - If code is present, then the status code to use in the\n // WebSocket Close message must be the integer given by code.\n // - If reason is also present, then reasonBytes must be\n // provided in the Close message after the status code.\n\n const frame = new WebsocketFrameSend()\n\n // If neither code nor reason is present, the WebSocket Close\n // message must not have a body.\n\n // If code is present, then the status code to use in the\n // WebSocket Close message must be the integer given by code.\n if (code !== undefined && reason === undefined) {\n frame.frameData = Buffer.allocUnsafe(2)\n frame.frameData.writeUInt16BE(code, 0)\n } else if (code !== undefined && reason !== undefined) {\n // If reason is also present, then reasonBytes must be\n // provided in the Close message after the status code.\n frame.frameData = Buffer.allocUnsafe(2 + reasonByteLength)\n frame.frameData.writeUInt16BE(code, 0)\n // the body MAY contain UTF-8-encoded data with value /reason/\n frame.frameData.write(reason, 2, 'utf-8')\n } else {\n frame.frameData = emptyBuffer\n }\n\n /** @type {import('stream').Duplex} */\n const socket = this[kResponse].socket\n\n socket.write(frame.createFrame(opcodes.CLOSE), (err) => {\n if (!err) {\n this[kSentClose] = true\n }\n })\n\n // Upon either sending or receiving a Close control frame, it is said\n // that _The WebSocket Closing Handshake is Started_ and that the\n // WebSocket connection is in the CLOSING state.\n this[kReadyState] = states.CLOSING\n } else {\n // Otherwise\n // Set this's ready state to CLOSING (2).\n this[kReadyState] = WebSocket.CLOSING\n }\n }\n\n /**\n * @see https://websockets.spec.whatwg.org/#dom-websocket-send\n * @param {NodeJS.TypedArray|ArrayBuffer|Blob|string} data\n */\n send (data) {\n webidl.brandCheck(this, WebSocket)\n\n webidl.argumentLengthCheck(arguments, 1, { header: 'WebSocket.send' })\n\n data = webidl.converters.WebSocketSendData(data)\n\n // 1. If this's ready state is CONNECTING, then throw an\n // \"InvalidStateError\" DOMException.\n if (this[kReadyState] === WebSocket.CONNECTING) {\n throw new DOMException('Sent before connected.', 'InvalidStateError')\n }\n\n // 2. Run the appropriate set of steps from the following list:\n // https://datatracker.ietf.org/doc/html/rfc6455#section-6.1\n // https://datatracker.ietf.org/doc/html/rfc6455#section-5.2\n\n if (!isEstablished(this) || isClosing(this)) {\n return\n }\n\n /** @type {import('stream').Duplex} */\n const socket = this[kResponse].socket\n\n // If data is a string\n if (typeof data === 'string') {\n // If the WebSocket connection is established and the WebSocket\n // closing handshake has not yet started, then the user agent\n // must send a WebSocket Message comprised of the data argument\n // using a text frame opcode; if the data cannot be sent, e.g.\n // because it would need to be buffered but the buffer is full,\n // the user agent must flag the WebSocket as full and then close\n // the WebSocket connection. Any invocation of this method with a\n // string argument that does not throw an exception must increase\n // the bufferedAmount attribute by the number of bytes needed to\n // express the argument as UTF-8.\n\n const value = Buffer.from(data)\n const frame = new WebsocketFrameSend(value)\n const buffer = frame.createFrame(opcodes.TEXT)\n\n this.#bufferedAmount += value.byteLength\n socket.write(buffer, () => {\n this.#bufferedAmount -= value.byteLength\n })\n } else if (types.isArrayBuffer(data)) {\n // If the WebSocket connection is established, and the WebSocket\n // closing handshake has not yet started, then the user agent must\n // send a WebSocket Message comprised of data using a binary frame\n // opcode; if the data cannot be sent, e.g. because it would need\n // to be buffered but the buffer is full, the user agent must flag\n // the WebSocket as full and then close the WebSocket connection.\n // The data to be sent is the data stored in the buffer described\n // by the ArrayBuffer object. Any invocation of this method with an\n // ArrayBuffer argument that does not throw an exception must\n // increase the bufferedAmount attribute by the length of the\n // ArrayBuffer in bytes.\n\n const value = Buffer.from(data)\n const frame = new WebsocketFrameSend(value)\n const buffer = frame.createFrame(opcodes.BINARY)\n\n this.#bufferedAmount += value.byteLength\n socket.write(buffer, () => {\n this.#bufferedAmount -= value.byteLength\n })\n } else if (ArrayBuffer.isView(data)) {\n // If the WebSocket connection is established, and the WebSocket\n // closing handshake has not yet started, then the user agent must\n // send a WebSocket Message comprised of data using a binary frame\n // opcode; if the data cannot be sent, e.g. because it would need to\n // be buffered but the buffer is full, the user agent must flag the\n // WebSocket as full and then close the WebSocket connection. The\n // data to be sent is the data stored in the section of the buffer\n // described by the ArrayBuffer object that data references. Any\n // invocation of this method with this kind of argument that does\n // not throw an exception must increase the bufferedAmount attribute\n // by the length of data\u2019s buffer in bytes.\n\n const ab = Buffer.from(data, data.byteOffset, data.byteLength)\n\n const frame = new WebsocketFrameSend(ab)\n const buffer = frame.createFrame(opcodes.BINARY)\n\n this.#bufferedAmount += ab.byteLength\n socket.write(buffer, () => {\n this.#bufferedAmount -= ab.byteLength\n })\n } else if (isBlobLike(data)) {\n // If the WebSocket connection is established, and the WebSocket\n // closing handshake has not yet started, then the user agent must\n // send a WebSocket Message comprised of data using a binary frame\n // opcode; if the data cannot be sent, e.g. because it would need to\n // be buffered but the buffer is full, the user agent must flag the\n // WebSocket as full and then close the WebSocket connection. The data\n // to be sent is the raw data represented by the Blob object. Any\n // invocation of this method with a Blob argument that does not throw\n // an exception must increase the bufferedAmount attribute by the size\n // of the Blob object\u2019s raw data, in bytes.\n\n const frame = new WebsocketFrameSend()\n\n data.arrayBuffer().then((ab) => {\n const value = Buffer.from(ab)\n frame.frameData = value\n const buffer = frame.createFrame(opcodes.BINARY)\n\n this.#bufferedAmount += value.byteLength\n socket.write(buffer, () => {\n this.#bufferedAmount -= value.byteLength\n })\n })\n }\n }\n\n get readyState () {\n webidl.brandCheck(this, WebSocket)\n\n // The readyState getter steps are to return this's ready state.\n return this[kReadyState]\n }\n\n get bufferedAmount () {\n webidl.brandCheck(this, WebSocket)\n\n return this.#bufferedAmount\n }\n\n get url () {\n webidl.brandCheck(this, WebSocket)\n\n // The url getter steps are to return this's url, serialized.\n return URLSerializer(this[kWebSocketURL])\n }\n\n get extensions () {\n webidl.brandCheck(this, WebSocket)\n\n return this.#extensions\n }\n\n get protocol () {\n webidl.brandCheck(this, WebSocket)\n\n return this.#protocol\n }\n\n get onopen () {\n webidl.brandCheck(this, WebSocket)\n\n return this.#events.open\n }\n\n set onopen (fn) {\n webidl.brandCheck(this, WebSocket)\n\n if (this.#events.open) {\n this.removeEventListener('open', this.#events.open)\n }\n\n if (typeof fn === 'function') {\n this.#events.open = fn\n this.addEventListener('open', fn)\n } else {\n this.#events.open = null\n }\n }\n\n get onerror () {\n webidl.brandCheck(this, WebSocket)\n\n return this.#events.error\n }\n\n set onerror (fn) {\n webidl.brandCheck(this, WebSocket)\n\n if (this.#events.error) {\n this.removeEventListener('error', this.#events.error)\n }\n\n if (typeof fn === 'function') {\n this.#events.error = fn\n this.addEventListener('error', fn)\n } else {\n this.#events.error = null\n }\n }\n\n get onclose () {\n webidl.brandCheck(this, WebSocket)\n\n return this.#events.close\n }\n\n set onclose (fn) {\n webidl.brandCheck(this, WebSocket)\n\n if (this.#events.close) {\n this.removeEventListener('close', this.#events.close)\n }\n\n if (typeof fn === 'function') {\n this.#events.close = fn\n this.addEventListener('close', fn)\n } else {\n this.#events.close = null\n }\n }\n\n get onmessage () {\n webidl.brandCheck(this, WebSocket)\n\n return this.#events.message\n }\n\n set onmessage (fn) {\n webidl.brandCheck(this, WebSocket)\n\n if (this.#events.message) {\n this.removeEventListener('message', this.#events.message)\n }\n\n if (typeof fn === 'function') {\n this.#events.message = fn\n this.addEventListener('message', fn)\n } else {\n this.#events.message = null\n }\n }\n\n get binaryType () {\n webidl.brandCheck(this, WebSocket)\n\n return this[kBinaryType]\n }\n\n set binaryType (type) {\n webidl.brandCheck(this, WebSocket)\n\n if (type !== 'blob' && type !== 'arraybuffer') {\n this[kBinaryType] = 'blob'\n } else {\n this[kBinaryType] = type\n }\n }\n\n /**\n * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol\n */\n #onConnectionEstablished (response) {\n // processResponse is called when the \"response\u2019s header list has been received and initialized.\"\n // once this happens, the connection is open\n this[kResponse] = response\n\n const parser = new ByteParser(this)\n parser.on('drain', function onParserDrain () {\n this.ws[kResponse].socket.resume()\n })\n\n response.socket.ws = this\n this[kByteParser] = parser\n\n // 1. Change the ready state to OPEN (1).\n this[kReadyState] = states.OPEN\n\n // 2. Change the extensions attribute\u2019s value to the extensions in use, if\n // it is not the null value.\n // https://datatracker.ietf.org/doc/html/rfc6455#section-9.1\n const extensions = response.headersList.get('sec-websocket-extensions')\n\n if (extensions !== null) {\n this.#extensions = extensions\n }\n\n // 3. Change the protocol attribute\u2019s value to the subprotocol in use, if\n // it is not the null value.\n // https://datatracker.ietf.org/doc/html/rfc6455#section-1.9\n const protocol = response.headersList.get('sec-websocket-protocol')\n\n if (protocol !== null) {\n this.#protocol = protocol\n }\n\n // 4. Fire an event named open at the WebSocket object.\n fireEvent('open', this)\n }\n}\n\n// https://websockets.spec.whatwg.org/#dom-websocket-connecting\nWebSocket.CONNECTING = WebSocket.prototype.CONNECTING = states.CONNECTING\n// https://websockets.spec.whatwg.org/#dom-websocket-open\nWebSocket.OPEN = WebSocket.prototype.OPEN = states.OPEN\n// https://websockets.spec.whatwg.org/#dom-websocket-closing\nWebSocket.CLOSING = WebSocket.prototype.CLOSING = states.CLOSING\n// https://websockets.spec.whatwg.org/#dom-websocket-closed\nWebSocket.CLOSED = WebSocket.prototype.CLOSED = states.CLOSED\n\nObject.defineProperties(WebSocket.prototype, {\n CONNECTING: staticPropertyDescriptors,\n OPEN: staticPropertyDescriptors,\n CLOSING: staticPropertyDescriptors,\n CLOSED: staticPropertyDescriptors,\n url: kEnumerableProperty,\n readyState: kEnumerableProperty,\n bufferedAmount: kEnumerableProperty,\n onopen: kEnumerableProperty,\n onerror: kEnumerableProperty,\n onclose: kEnumerableProperty,\n close: kEnumerableProperty,\n onmessage: kEnumerableProperty,\n binaryType: kEnumerableProperty,\n send: kEnumerableProperty,\n extensions: kEnumerableProperty,\n protocol: kEnumerableProperty,\n [Symbol.toStringTag]: {\n value: 'WebSocket',\n writable: false,\n enumerable: false,\n configurable: true\n }\n})\n\nObject.defineProperties(WebSocket, {\n CONNECTING: staticPropertyDescriptors,\n OPEN: staticPropertyDescriptors,\n CLOSING: staticPropertyDescriptors,\n CLOSED: staticPropertyDescriptors\n})\n\nwebidl.converters['sequence'] = webidl.sequenceConverter(\n webidl.converters.DOMString\n)\n\nwebidl.converters['DOMString or sequence'] = function (V) {\n if (webidl.util.Type(V) === 'Object' && Symbol.iterator in V) {\n return webidl.converters['sequence'](V)\n }\n\n return webidl.converters.DOMString(V)\n}\n\n// This implements the propsal made in https://github.com/whatwg/websockets/issues/42\nwebidl.converters.WebSocketInit = webidl.dictionaryConverter([\n {\n key: 'protocols',\n converter: webidl.converters['DOMString or sequence'],\n get defaultValue () {\n return []\n }\n },\n {\n key: 'dispatcher',\n converter: (V) => V,\n get defaultValue () {\n return getGlobalDispatcher()\n }\n },\n {\n key: 'headers',\n converter: webidl.nullableConverter(webidl.converters.HeadersInit)\n }\n])\n\nwebidl.converters['DOMString or sequence or WebSocketInit'] = function (V) {\n if (webidl.util.Type(V) === 'Object' && !(Symbol.iterator in V)) {\n return webidl.converters.WebSocketInit(V)\n }\n\n return { protocols: webidl.converters['DOMString or sequence'](V) }\n}\n\nwebidl.converters.WebSocketSendData = function (V) {\n if (webidl.util.Type(V) === 'Object') {\n if (isBlobLike(V)) {\n return webidl.converters.Blob(V, { strict: false })\n }\n\n if (ArrayBuffer.isView(V) || types.isAnyArrayBuffer(V)) {\n return webidl.converters.BufferSource(V)\n }\n }\n\n return webidl.converters.USVString(V)\n}\n\nmodule.exports = {\n WebSocket\n}\n", "'use strict'\n\nconst Client = require('./lib/client')\nconst Dispatcher = require('./lib/dispatcher')\nconst errors = require('./lib/core/errors')\nconst Pool = require('./lib/pool')\nconst BalancedPool = require('./lib/balanced-pool')\nconst Agent = require('./lib/agent')\nconst util = require('./lib/core/util')\nconst { InvalidArgumentError } = errors\nconst api = require('./lib/api')\nconst buildConnector = require('./lib/core/connect')\nconst MockClient = require('./lib/mock/mock-client')\nconst MockAgent = require('./lib/mock/mock-agent')\nconst MockPool = require('./lib/mock/mock-pool')\nconst mockErrors = require('./lib/mock/mock-errors')\nconst ProxyAgent = require('./lib/proxy-agent')\nconst RetryHandler = require('./lib/handler/RetryHandler')\nconst { getGlobalDispatcher, setGlobalDispatcher } = require('./lib/global')\nconst DecoratorHandler = require('./lib/handler/DecoratorHandler')\nconst RedirectHandler = require('./lib/handler/RedirectHandler')\nconst createRedirectInterceptor = require('./lib/interceptor/redirectInterceptor')\n\nlet hasCrypto\ntry {\n require('crypto')\n hasCrypto = true\n} catch {\n hasCrypto = false\n}\n\nObject.assign(Dispatcher.prototype, api)\n\nmodule.exports.Dispatcher = Dispatcher\nmodule.exports.Client = Client\nmodule.exports.Pool = Pool\nmodule.exports.BalancedPool = BalancedPool\nmodule.exports.Agent = Agent\nmodule.exports.ProxyAgent = ProxyAgent\nmodule.exports.RetryHandler = RetryHandler\n\nmodule.exports.DecoratorHandler = DecoratorHandler\nmodule.exports.RedirectHandler = RedirectHandler\nmodule.exports.createRedirectInterceptor = createRedirectInterceptor\n\nmodule.exports.buildConnector = buildConnector\nmodule.exports.errors = errors\n\nfunction makeDispatcher (fn) {\n return (url, opts, handler) => {\n if (typeof opts === 'function') {\n handler = opts\n opts = null\n }\n\n if (!url || (typeof url !== 'string' && typeof url !== 'object' && !(url instanceof URL))) {\n throw new InvalidArgumentError('invalid url')\n }\n\n if (opts != null && typeof opts !== 'object') {\n throw new InvalidArgumentError('invalid opts')\n }\n\n if (opts && opts.path != null) {\n if (typeof opts.path !== 'string') {\n throw new InvalidArgumentError('invalid opts.path')\n }\n\n let path = opts.path\n if (!opts.path.startsWith('/')) {\n path = `/${path}`\n }\n\n url = new URL(util.parseOrigin(url).origin + path)\n } else {\n if (!opts) {\n opts = typeof url === 'object' ? url : {}\n }\n\n url = util.parseURL(url)\n }\n\n const { agent, dispatcher = getGlobalDispatcher() } = opts\n\n if (agent) {\n throw new InvalidArgumentError('unsupported opts.agent. Did you mean opts.client?')\n }\n\n return fn.call(dispatcher, {\n ...opts,\n origin: url.origin,\n path: url.search ? `${url.pathname}${url.search}` : url.pathname,\n method: opts.method || (opts.body ? 'PUT' : 'GET')\n }, handler)\n }\n}\n\nmodule.exports.setGlobalDispatcher = setGlobalDispatcher\nmodule.exports.getGlobalDispatcher = getGlobalDispatcher\n\nif (util.nodeMajor > 16 || (util.nodeMajor === 16 && util.nodeMinor >= 8)) {\n let fetchImpl = null\n module.exports.fetch = async function fetch (resource) {\n if (!fetchImpl) {\n fetchImpl = require('./lib/fetch').fetch\n }\n\n try {\n return await fetchImpl(...arguments)\n } catch (err) {\n if (typeof err === 'object') {\n Error.captureStackTrace(err, this)\n }\n\n throw err\n }\n }\n module.exports.Headers = require('./lib/fetch/headers').Headers\n module.exports.Response = require('./lib/fetch/response').Response\n module.exports.Request = require('./lib/fetch/request').Request\n module.exports.FormData = require('./lib/fetch/formdata').FormData\n module.exports.File = require('./lib/fetch/file').File\n module.exports.FileReader = require('./lib/fileapi/filereader').FileReader\n\n const { setGlobalOrigin, getGlobalOrigin } = require('./lib/fetch/global')\n\n module.exports.setGlobalOrigin = setGlobalOrigin\n module.exports.getGlobalOrigin = getGlobalOrigin\n\n const { CacheStorage } = require('./lib/cache/cachestorage')\n const { kConstruct } = require('./lib/cache/symbols')\n\n // Cache & CacheStorage are tightly coupled with fetch. Even if it may run\n // in an older version of Node, it doesn't have any use without fetch.\n module.exports.caches = new CacheStorage(kConstruct)\n}\n\nif (util.nodeMajor >= 16) {\n const { deleteCookie, getCookies, getSetCookies, setCookie } = require('./lib/cookies')\n\n module.exports.deleteCookie = deleteCookie\n module.exports.getCookies = getCookies\n module.exports.getSetCookies = getSetCookies\n module.exports.setCookie = setCookie\n\n const { parseMIMEType, serializeAMimeType } = require('./lib/fetch/dataURL')\n\n module.exports.parseMIMEType = parseMIMEType\n module.exports.serializeAMimeType = serializeAMimeType\n}\n\nif (util.nodeMajor >= 18 && hasCrypto) {\n const { WebSocket } = require('./lib/websocket/websocket')\n\n module.exports.WebSocket = WebSocket\n}\n\nmodule.exports.request = makeDispatcher(api.request)\nmodule.exports.stream = makeDispatcher(api.stream)\nmodule.exports.pipeline = makeDispatcher(api.pipeline)\nmodule.exports.connect = makeDispatcher(api.connect)\nmodule.exports.upgrade = makeDispatcher(api.upgrade)\n\nmodule.exports.MockClient = MockClient\nmodule.exports.MockPool = MockPool\nmodule.exports.MockAgent = MockAgent\nmodule.exports.mockErrors = mockErrors\n", null, null, null, null, null, null, null, null, null, null, null, "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isJsonObject = exports.typeofJsonValue = void 0;\n/**\n * Get the type of a JSON value.\n * Distinguishes between array, null and object.\n */\nfunction typeofJsonValue(value) {\n let t = typeof value;\n if (t == \"object\") {\n if (Array.isArray(value))\n return \"array\";\n if (value === null)\n return \"null\";\n }\n return t;\n}\nexports.typeofJsonValue = typeofJsonValue;\n/**\n * Is this a JSON object (instead of an array or null)?\n */\nfunction isJsonObject(value) {\n return value !== null && typeof value == \"object\" && !Array.isArray(value);\n}\nexports.isJsonObject = isJsonObject;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.base64encode = exports.base64decode = void 0;\n// lookup table from base64 character to byte\nlet encTable = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');\n// lookup table from base64 character *code* to byte because lookup by number is fast\nlet decTable = [];\nfor (let i = 0; i < encTable.length; i++)\n decTable[encTable[i].charCodeAt(0)] = i;\n// support base64url variants\ndecTable[\"-\".charCodeAt(0)] = encTable.indexOf(\"+\");\ndecTable[\"_\".charCodeAt(0)] = encTable.indexOf(\"/\");\n/**\n * Decodes a base64 string to a byte array.\n *\n * - ignores white-space, including line breaks and tabs\n * - allows inner padding (can decode concatenated base64 strings)\n * - does not require padding\n * - understands base64url encoding:\n * \"-\" instead of \"+\",\n * \"_\" instead of \"/\",\n * no padding\n */\nfunction base64decode(base64Str) {\n // estimate byte size, not accounting for inner padding and whitespace\n let es = base64Str.length * 3 / 4;\n // if (es % 3 !== 0)\n // throw new Error('invalid base64 string');\n if (base64Str[base64Str.length - 2] == '=')\n es -= 2;\n else if (base64Str[base64Str.length - 1] == '=')\n es -= 1;\n let bytes = new Uint8Array(es), bytePos = 0, // position in byte array\n groupPos = 0, // position in base64 group\n b, // current byte\n p = 0 // previous byte\n ;\n for (let i = 0; i < base64Str.length; i++) {\n b = decTable[base64Str.charCodeAt(i)];\n if (b === undefined) {\n // noinspection FallThroughInSwitchStatementJS\n switch (base64Str[i]) {\n case '=':\n groupPos = 0; // reset state when padding found\n case '\\n':\n case '\\r':\n case '\\t':\n case ' ':\n continue; // skip white-space, and padding\n default:\n throw Error(`invalid base64 string.`);\n }\n }\n switch (groupPos) {\n case 0:\n p = b;\n groupPos = 1;\n break;\n case 1:\n bytes[bytePos++] = p << 2 | (b & 48) >> 4;\n p = b;\n groupPos = 2;\n break;\n case 2:\n bytes[bytePos++] = (p & 15) << 4 | (b & 60) >> 2;\n p = b;\n groupPos = 3;\n break;\n case 3:\n bytes[bytePos++] = (p & 3) << 6 | b;\n groupPos = 0;\n break;\n }\n }\n if (groupPos == 1)\n throw Error(`invalid base64 string.`);\n return bytes.subarray(0, bytePos);\n}\nexports.base64decode = base64decode;\n/**\n * Encodes a byte array to a base64 string.\n * Adds padding at the end.\n * Does not insert newlines.\n */\nfunction base64encode(bytes) {\n let base64 = '', groupPos = 0, // position in base64 group\n b, // current byte\n p = 0; // carry over from previous byte\n for (let i = 0; i < bytes.length; i++) {\n b = bytes[i];\n switch (groupPos) {\n case 0:\n base64 += encTable[b >> 2];\n p = (b & 3) << 4;\n groupPos = 1;\n break;\n case 1:\n base64 += encTable[p | b >> 4];\n p = (b & 15) << 2;\n groupPos = 2;\n break;\n case 2:\n base64 += encTable[p | b >> 6];\n base64 += encTable[b & 63];\n groupPos = 0;\n break;\n }\n }\n // padding required?\n if (groupPos) {\n base64 += encTable[p];\n base64 += '=';\n if (groupPos == 1)\n base64 += '=';\n }\n return base64;\n}\nexports.base64encode = base64encode;\n", "\"use strict\";\n// Copyright (c) 2016, Daniel Wirtz All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n// * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright\n// notice, this list of conditions and the following disclaimer in the\n// documentation and/or other materials provided with the distribution.\n// * Neither the name of its author, nor the names of its contributors\n// may be used to endorse or promote products derived from this software\n// without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.utf8read = void 0;\nconst fromCharCodes = (chunk) => String.fromCharCode.apply(String, chunk);\n/**\n * @deprecated This function will no longer be exported with the next major\n * release, since protobuf-ts has switch to TextDecoder API. If you need this\n * function, please migrate to @protobufjs/utf8. For context, see\n * https://github.com/timostamm/protobuf-ts/issues/184\n *\n * Reads UTF8 bytes as a string.\n *\n * See [protobufjs / utf8](https://github.com/protobufjs/protobuf.js/blob/9893e35b854621cce64af4bf6be2cff4fb892796/lib/utf8/index.js#L40)\n *\n * Copyright (c) 2016, Daniel Wirtz\n */\nfunction utf8read(bytes) {\n if (bytes.length < 1)\n return \"\";\n let pos = 0, // position in bytes\n parts = [], chunk = [], i = 0, // char offset\n t; // temporary\n let len = bytes.length;\n while (pos < len) {\n t = bytes[pos++];\n if (t < 128)\n chunk[i++] = t;\n else if (t > 191 && t < 224)\n chunk[i++] = (t & 31) << 6 | bytes[pos++] & 63;\n else if (t > 239 && t < 365) {\n t = ((t & 7) << 18 | (bytes[pos++] & 63) << 12 | (bytes[pos++] & 63) << 6 | bytes[pos++] & 63) - 0x10000;\n chunk[i++] = 0xD800 + (t >> 10);\n chunk[i++] = 0xDC00 + (t & 1023);\n }\n else\n chunk[i++] = (t & 15) << 12 | (bytes[pos++] & 63) << 6 | bytes[pos++] & 63;\n if (i > 8191) {\n parts.push(fromCharCodes(chunk));\n i = 0;\n }\n }\n if (parts.length) {\n if (i)\n parts.push(fromCharCodes(chunk.slice(0, i)));\n return parts.join(\"\");\n }\n return fromCharCodes(chunk.slice(0, i));\n}\nexports.utf8read = utf8read;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.WireType = exports.mergeBinaryOptions = exports.UnknownFieldHandler = void 0;\n/**\n * This handler implements the default behaviour for unknown fields.\n * When reading data, unknown fields are stored on the message, in a\n * symbol property.\n * When writing data, the symbol property is queried and unknown fields\n * are serialized into the output again.\n */\nvar UnknownFieldHandler;\n(function (UnknownFieldHandler) {\n /**\n * The symbol used to store unknown fields for a message.\n * The property must conform to `UnknownFieldContainer`.\n */\n UnknownFieldHandler.symbol = Symbol.for(\"protobuf-ts/unknown\");\n /**\n * Store an unknown field during binary read directly on the message.\n * This method is compatible with `BinaryReadOptions.readUnknownField`.\n */\n UnknownFieldHandler.onRead = (typeName, message, fieldNo, wireType, data) => {\n let container = is(message) ? message[UnknownFieldHandler.symbol] : message[UnknownFieldHandler.symbol] = [];\n container.push({ no: fieldNo, wireType, data });\n };\n /**\n * Write unknown fields stored for the message to the writer.\n * This method is compatible with `BinaryWriteOptions.writeUnknownFields`.\n */\n UnknownFieldHandler.onWrite = (typeName, message, writer) => {\n for (let { no, wireType, data } of UnknownFieldHandler.list(message))\n writer.tag(no, wireType).raw(data);\n };\n /**\n * List unknown fields stored for the message.\n * Note that there may be multiples fields with the same number.\n */\n UnknownFieldHandler.list = (message, fieldNo) => {\n if (is(message)) {\n let all = message[UnknownFieldHandler.symbol];\n return fieldNo ? all.filter(uf => uf.no == fieldNo) : all;\n }\n return [];\n };\n /**\n * Returns the last unknown field by field number.\n */\n UnknownFieldHandler.last = (message, fieldNo) => UnknownFieldHandler.list(message, fieldNo).slice(-1)[0];\n const is = (message) => message && Array.isArray(message[UnknownFieldHandler.symbol]);\n})(UnknownFieldHandler = exports.UnknownFieldHandler || (exports.UnknownFieldHandler = {}));\n/**\n * Merges binary write or read options. Later values override earlier values.\n */\nfunction mergeBinaryOptions(a, b) {\n return Object.assign(Object.assign({}, a), b);\n}\nexports.mergeBinaryOptions = mergeBinaryOptions;\n/**\n * Protobuf binary format wire types.\n *\n * A wire type provides just enough information to find the length of the\n * following value.\n *\n * See https://developers.google.com/protocol-buffers/docs/encoding#structure\n */\nvar WireType;\n(function (WireType) {\n /**\n * Used for int32, int64, uint32, uint64, sint32, sint64, bool, enum\n */\n WireType[WireType[\"Varint\"] = 0] = \"Varint\";\n /**\n * Used for fixed64, sfixed64, double.\n * Always 8 bytes with little-endian byte order.\n */\n WireType[WireType[\"Bit64\"] = 1] = \"Bit64\";\n /**\n * Used for string, bytes, embedded messages, packed repeated fields\n *\n * Only repeated numeric types (types which use the varint, 32-bit,\n * or 64-bit wire types) can be packed. In proto3, such fields are\n * packed by default.\n */\n WireType[WireType[\"LengthDelimited\"] = 2] = \"LengthDelimited\";\n /**\n * Used for groups\n * @deprecated\n */\n WireType[WireType[\"StartGroup\"] = 3] = \"StartGroup\";\n /**\n * Used for groups\n * @deprecated\n */\n WireType[WireType[\"EndGroup\"] = 4] = \"EndGroup\";\n /**\n * Used for fixed32, sfixed32, float.\n * Always 4 bytes with little-endian byte order.\n */\n WireType[WireType[\"Bit32\"] = 5] = \"Bit32\";\n})(WireType = exports.WireType || (exports.WireType = {}));\n", "\"use strict\";\n// Copyright 2008 Google Inc. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n// * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n// * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// Code generated by the Protocol Buffer compiler is owned by the owner\n// of the input file used when generating it. This code is not\n// standalone and requires a support library to be linked with it. This\n// support library is itself covered by the above license.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.varint32read = exports.varint32write = exports.int64toString = exports.int64fromString = exports.varint64write = exports.varint64read = void 0;\n/**\n * Read a 64 bit varint as two JS numbers.\n *\n * Returns tuple:\n * [0]: low bits\n * [0]: high bits\n *\n * Copyright 2008 Google Inc. All rights reserved.\n *\n * See https://github.com/protocolbuffers/protobuf/blob/8a71927d74a4ce34efe2d8769fda198f52d20d12/js/experimental/runtime/kernel/buffer_decoder.js#L175\n */\nfunction varint64read() {\n let lowBits = 0;\n let highBits = 0;\n for (let shift = 0; shift < 28; shift += 7) {\n let b = this.buf[this.pos++];\n lowBits |= (b & 0x7F) << shift;\n if ((b & 0x80) == 0) {\n this.assertBounds();\n return [lowBits, highBits];\n }\n }\n let middleByte = this.buf[this.pos++];\n // last four bits of the first 32 bit number\n lowBits |= (middleByte & 0x0F) << 28;\n // 3 upper bits are part of the next 32 bit number\n highBits = (middleByte & 0x70) >> 4;\n if ((middleByte & 0x80) == 0) {\n this.assertBounds();\n return [lowBits, highBits];\n }\n for (let shift = 3; shift <= 31; shift += 7) {\n let b = this.buf[this.pos++];\n highBits |= (b & 0x7F) << shift;\n if ((b & 0x80) == 0) {\n this.assertBounds();\n return [lowBits, highBits];\n }\n }\n throw new Error('invalid varint');\n}\nexports.varint64read = varint64read;\n/**\n * Write a 64 bit varint, given as two JS numbers, to the given bytes array.\n *\n * Copyright 2008 Google Inc. All rights reserved.\n *\n * See https://github.com/protocolbuffers/protobuf/blob/8a71927d74a4ce34efe2d8769fda198f52d20d12/js/experimental/runtime/kernel/writer.js#L344\n */\nfunction varint64write(lo, hi, bytes) {\n for (let i = 0; i < 28; i = i + 7) {\n const shift = lo >>> i;\n const hasNext = !((shift >>> 7) == 0 && hi == 0);\n const byte = (hasNext ? shift | 0x80 : shift) & 0xFF;\n bytes.push(byte);\n if (!hasNext) {\n return;\n }\n }\n const splitBits = ((lo >>> 28) & 0x0F) | ((hi & 0x07) << 4);\n const hasMoreBits = !((hi >> 3) == 0);\n bytes.push((hasMoreBits ? splitBits | 0x80 : splitBits) & 0xFF);\n if (!hasMoreBits) {\n return;\n }\n for (let i = 3; i < 31; i = i + 7) {\n const shift = hi >>> i;\n const hasNext = !((shift >>> 7) == 0);\n const byte = (hasNext ? shift | 0x80 : shift) & 0xFF;\n bytes.push(byte);\n if (!hasNext) {\n return;\n }\n }\n bytes.push((hi >>> 31) & 0x01);\n}\nexports.varint64write = varint64write;\n// constants for binary math\nconst TWO_PWR_32_DBL = (1 << 16) * (1 << 16);\n/**\n * Parse decimal string of 64 bit integer value as two JS numbers.\n *\n * Returns tuple:\n * [0]: minus sign?\n * [1]: low bits\n * [2]: high bits\n *\n * Copyright 2008 Google Inc.\n */\nfunction int64fromString(dec) {\n // Check for minus sign.\n let minus = dec[0] == '-';\n if (minus)\n dec = dec.slice(1);\n // Work 6 decimal digits at a time, acting like we're converting base 1e6\n // digits to binary. This is safe to do with floating point math because\n // Number.isSafeInteger(ALL_32_BITS * 1e6) == true.\n const base = 1e6;\n let lowBits = 0;\n let highBits = 0;\n function add1e6digit(begin, end) {\n // Note: Number('') is 0.\n const digit1e6 = Number(dec.slice(begin, end));\n highBits *= base;\n lowBits = lowBits * base + digit1e6;\n // Carry bits from lowBits to highBits\n if (lowBits >= TWO_PWR_32_DBL) {\n highBits = highBits + ((lowBits / TWO_PWR_32_DBL) | 0);\n lowBits = lowBits % TWO_PWR_32_DBL;\n }\n }\n add1e6digit(-24, -18);\n add1e6digit(-18, -12);\n add1e6digit(-12, -6);\n add1e6digit(-6);\n return [minus, lowBits, highBits];\n}\nexports.int64fromString = int64fromString;\n/**\n * Format 64 bit integer value (as two JS numbers) to decimal string.\n *\n * Copyright 2008 Google Inc.\n */\nfunction int64toString(bitsLow, bitsHigh) {\n // Skip the expensive conversion if the number is small enough to use the\n // built-in conversions.\n if ((bitsHigh >>> 0) <= 0x1FFFFF) {\n return '' + (TWO_PWR_32_DBL * bitsHigh + (bitsLow >>> 0));\n }\n // What this code is doing is essentially converting the input number from\n // base-2 to base-1e7, which allows us to represent the 64-bit range with\n // only 3 (very large) digits. Those digits are then trivial to convert to\n // a base-10 string.\n // The magic numbers used here are -\n // 2^24 = 16777216 = (1,6777216) in base-1e7.\n // 2^48 = 281474976710656 = (2,8147497,6710656) in base-1e7.\n // Split 32:32 representation into 16:24:24 representation so our\n // intermediate digits don't overflow.\n let low = bitsLow & 0xFFFFFF;\n let mid = (((bitsLow >>> 24) | (bitsHigh << 8)) >>> 0) & 0xFFFFFF;\n let high = (bitsHigh >> 16) & 0xFFFF;\n // Assemble our three base-1e7 digits, ignoring carries. The maximum\n // value in a digit at this step is representable as a 48-bit integer, which\n // can be stored in a 64-bit floating point number.\n let digitA = low + (mid * 6777216) + (high * 6710656);\n let digitB = mid + (high * 8147497);\n let digitC = (high * 2);\n // Apply carries from A to B and from B to C.\n let base = 10000000;\n if (digitA >= base) {\n digitB += Math.floor(digitA / base);\n digitA %= base;\n }\n if (digitB >= base) {\n digitC += Math.floor(digitB / base);\n digitB %= base;\n }\n // Convert base-1e7 digits to base-10, with optional leading zeroes.\n function decimalFrom1e7(digit1e7, needLeadingZeros) {\n let partial = digit1e7 ? String(digit1e7) : '';\n if (needLeadingZeros) {\n return '0000000'.slice(partial.length) + partial;\n }\n return partial;\n }\n return decimalFrom1e7(digitC, /*needLeadingZeros=*/ 0) +\n decimalFrom1e7(digitB, /*needLeadingZeros=*/ digitC) +\n // If the final 1e7 digit didn't need leading zeros, we would have\n // returned via the trivial code path at the top.\n decimalFrom1e7(digitA, /*needLeadingZeros=*/ 1);\n}\nexports.int64toString = int64toString;\n/**\n * Write a 32 bit varint, signed or unsigned. Same as `varint64write(0, value, bytes)`\n *\n * Copyright 2008 Google Inc. All rights reserved.\n *\n * See https://github.com/protocolbuffers/protobuf/blob/1b18833f4f2a2f681f4e4a25cdf3b0a43115ec26/js/binary/encoder.js#L144\n */\nfunction varint32write(value, bytes) {\n if (value >= 0) {\n // write value as varint 32\n while (value > 0x7f) {\n bytes.push((value & 0x7f) | 0x80);\n value = value >>> 7;\n }\n bytes.push(value);\n }\n else {\n for (let i = 0; i < 9; i++) {\n bytes.push(value & 127 | 128);\n value = value >> 7;\n }\n bytes.push(1);\n }\n}\nexports.varint32write = varint32write;\n/**\n * Read an unsigned 32 bit varint.\n *\n * See https://github.com/protocolbuffers/protobuf/blob/8a71927d74a4ce34efe2d8769fda198f52d20d12/js/experimental/runtime/kernel/buffer_decoder.js#L220\n */\nfunction varint32read() {\n let b = this.buf[this.pos++];\n let result = b & 0x7F;\n if ((b & 0x80) == 0) {\n this.assertBounds();\n return result;\n }\n b = this.buf[this.pos++];\n result |= (b & 0x7F) << 7;\n if ((b & 0x80) == 0) {\n this.assertBounds();\n return result;\n }\n b = this.buf[this.pos++];\n result |= (b & 0x7F) << 14;\n if ((b & 0x80) == 0) {\n this.assertBounds();\n return result;\n }\n b = this.buf[this.pos++];\n result |= (b & 0x7F) << 21;\n if ((b & 0x80) == 0) {\n this.assertBounds();\n return result;\n }\n // Extract only last 4 bits\n b = this.buf[this.pos++];\n result |= (b & 0x0F) << 28;\n for (let readBytes = 5; ((b & 0x80) !== 0) && readBytes < 10; readBytes++)\n b = this.buf[this.pos++];\n if ((b & 0x80) != 0)\n throw new Error('invalid varint');\n this.assertBounds();\n // Result can have 32 bits, convert it to unsigned\n return result >>> 0;\n}\nexports.varint32read = varint32read;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PbLong = exports.PbULong = exports.detectBi = void 0;\nconst goog_varint_1 = require(\"./goog-varint\");\nlet BI;\nfunction detectBi() {\n const dv = new DataView(new ArrayBuffer(8));\n const ok = globalThis.BigInt !== undefined\n && typeof dv.getBigInt64 === \"function\"\n && typeof dv.getBigUint64 === \"function\"\n && typeof dv.setBigInt64 === \"function\"\n && typeof dv.setBigUint64 === \"function\";\n BI = ok ? {\n MIN: BigInt(\"-9223372036854775808\"),\n MAX: BigInt(\"9223372036854775807\"),\n UMIN: BigInt(\"0\"),\n UMAX: BigInt(\"18446744073709551615\"),\n C: BigInt,\n V: dv,\n } : undefined;\n}\nexports.detectBi = detectBi;\ndetectBi();\nfunction assertBi(bi) {\n if (!bi)\n throw new Error(\"BigInt unavailable, see https://github.com/timostamm/protobuf-ts/blob/v1.0.8/MANUAL.md#bigint-support\");\n}\n// used to validate from(string) input (when bigint is unavailable)\nconst RE_DECIMAL_STR = /^-?[0-9]+$/;\n// constants for binary math\nconst TWO_PWR_32_DBL = 0x100000000;\nconst HALF_2_PWR_32 = 0x080000000;\n// base class for PbLong and PbULong provides shared code\nclass SharedPbLong {\n /**\n * Create a new instance with the given bits.\n */\n constructor(lo, hi) {\n this.lo = lo | 0;\n this.hi = hi | 0;\n }\n /**\n * Is this instance equal to 0?\n */\n isZero() {\n return this.lo == 0 && this.hi == 0;\n }\n /**\n * Convert to a native number.\n */\n toNumber() {\n let result = this.hi * TWO_PWR_32_DBL + (this.lo >>> 0);\n if (!Number.isSafeInteger(result))\n throw new Error(\"cannot convert to safe number\");\n return result;\n }\n}\n/**\n * 64-bit unsigned integer as two 32-bit values.\n * Converts between `string`, `number` and `bigint` representations.\n */\nclass PbULong extends SharedPbLong {\n /**\n * Create instance from a `string`, `number` or `bigint`.\n */\n static from(value) {\n if (BI)\n // noinspection FallThroughInSwitchStatementJS\n switch (typeof value) {\n case \"string\":\n if (value == \"0\")\n return this.ZERO;\n if (value == \"\")\n throw new Error('string is no integer');\n value = BI.C(value);\n case \"number\":\n if (value === 0)\n return this.ZERO;\n value = BI.C(value);\n case \"bigint\":\n if (!value)\n return this.ZERO;\n if (value < BI.UMIN)\n throw new Error('signed value for ulong');\n if (value > BI.UMAX)\n throw new Error('ulong too large');\n BI.V.setBigUint64(0, value, true);\n return new PbULong(BI.V.getInt32(0, true), BI.V.getInt32(4, true));\n }\n else\n switch (typeof value) {\n case \"string\":\n if (value == \"0\")\n return this.ZERO;\n value = value.trim();\n if (!RE_DECIMAL_STR.test(value))\n throw new Error('string is no integer');\n let [minus, lo, hi] = goog_varint_1.int64fromString(value);\n if (minus)\n throw new Error('signed value for ulong');\n return new PbULong(lo, hi);\n case \"number\":\n if (value == 0)\n return this.ZERO;\n if (!Number.isSafeInteger(value))\n throw new Error('number is no integer');\n if (value < 0)\n throw new Error('signed value for ulong');\n return new PbULong(value, value / TWO_PWR_32_DBL);\n }\n throw new Error('unknown value ' + typeof value);\n }\n /**\n * Convert to decimal string.\n */\n toString() {\n return BI ? this.toBigInt().toString() : goog_varint_1.int64toString(this.lo, this.hi);\n }\n /**\n * Convert to native bigint.\n */\n toBigInt() {\n assertBi(BI);\n BI.V.setInt32(0, this.lo, true);\n BI.V.setInt32(4, this.hi, true);\n return BI.V.getBigUint64(0, true);\n }\n}\nexports.PbULong = PbULong;\n/**\n * ulong 0 singleton.\n */\nPbULong.ZERO = new PbULong(0, 0);\n/**\n * 64-bit signed integer as two 32-bit values.\n * Converts between `string`, `number` and `bigint` representations.\n */\nclass PbLong extends SharedPbLong {\n /**\n * Create instance from a `string`, `number` or `bigint`.\n */\n static from(value) {\n if (BI)\n // noinspection FallThroughInSwitchStatementJS\n switch (typeof value) {\n case \"string\":\n if (value == \"0\")\n return this.ZERO;\n if (value == \"\")\n throw new Error('string is no integer');\n value = BI.C(value);\n case \"number\":\n if (value === 0)\n return this.ZERO;\n value = BI.C(value);\n case \"bigint\":\n if (!value)\n return this.ZERO;\n if (value < BI.MIN)\n throw new Error('signed long too small');\n if (value > BI.MAX)\n throw new Error('signed long too large');\n BI.V.setBigInt64(0, value, true);\n return new PbLong(BI.V.getInt32(0, true), BI.V.getInt32(4, true));\n }\n else\n switch (typeof value) {\n case \"string\":\n if (value == \"0\")\n return this.ZERO;\n value = value.trim();\n if (!RE_DECIMAL_STR.test(value))\n throw new Error('string is no integer');\n let [minus, lo, hi] = goog_varint_1.int64fromString(value);\n if (minus) {\n if (hi > HALF_2_PWR_32 || (hi == HALF_2_PWR_32 && lo != 0))\n throw new Error('signed long too small');\n }\n else if (hi >= HALF_2_PWR_32)\n throw new Error('signed long too large');\n let pbl = new PbLong(lo, hi);\n return minus ? pbl.negate() : pbl;\n case \"number\":\n if (value == 0)\n return this.ZERO;\n if (!Number.isSafeInteger(value))\n throw new Error('number is no integer');\n return value > 0\n ? new PbLong(value, value / TWO_PWR_32_DBL)\n : new PbLong(-value, -value / TWO_PWR_32_DBL).negate();\n }\n throw new Error('unknown value ' + typeof value);\n }\n /**\n * Do we have a minus sign?\n */\n isNegative() {\n return (this.hi & HALF_2_PWR_32) !== 0;\n }\n /**\n * Negate two's complement.\n * Invert all the bits and add one to the result.\n */\n negate() {\n let hi = ~this.hi, lo = this.lo;\n if (lo)\n lo = ~lo + 1;\n else\n hi += 1;\n return new PbLong(lo, hi);\n }\n /**\n * Convert to decimal string.\n */\n toString() {\n if (BI)\n return this.toBigInt().toString();\n if (this.isNegative()) {\n let n = this.negate();\n return '-' + goog_varint_1.int64toString(n.lo, n.hi);\n }\n return goog_varint_1.int64toString(this.lo, this.hi);\n }\n /**\n * Convert to native bigint.\n */\n toBigInt() {\n assertBi(BI);\n BI.V.setInt32(0, this.lo, true);\n BI.V.setInt32(4, this.hi, true);\n return BI.V.getBigInt64(0, true);\n }\n}\nexports.PbLong = PbLong;\n/**\n * long 0 singleton.\n */\nPbLong.ZERO = new PbLong(0, 0);\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BinaryReader = exports.binaryReadOptions = void 0;\nconst binary_format_contract_1 = require(\"./binary-format-contract\");\nconst pb_long_1 = require(\"./pb-long\");\nconst goog_varint_1 = require(\"./goog-varint\");\nconst defaultsRead = {\n readUnknownField: true,\n readerFactory: bytes => new BinaryReader(bytes),\n};\n/**\n * Make options for reading binary data form partial options.\n */\nfunction binaryReadOptions(options) {\n return options ? Object.assign(Object.assign({}, defaultsRead), options) : defaultsRead;\n}\nexports.binaryReadOptions = binaryReadOptions;\nclass BinaryReader {\n constructor(buf, textDecoder) {\n this.varint64 = goog_varint_1.varint64read; // dirty cast for `this`\n /**\n * Read a `uint32` field, an unsigned 32 bit varint.\n */\n this.uint32 = goog_varint_1.varint32read; // dirty cast for `this` and access to protected `buf`\n this.buf = buf;\n this.len = buf.length;\n this.pos = 0;\n this.view = new DataView(buf.buffer, buf.byteOffset, buf.byteLength);\n this.textDecoder = textDecoder !== null && textDecoder !== void 0 ? textDecoder : new TextDecoder(\"utf-8\", {\n fatal: true,\n ignoreBOM: true,\n });\n }\n /**\n * Reads a tag - field number and wire type.\n */\n tag() {\n let tag = this.uint32(), fieldNo = tag >>> 3, wireType = tag & 7;\n if (fieldNo <= 0 || wireType < 0 || wireType > 5)\n throw new Error(\"illegal tag: field no \" + fieldNo + \" wire type \" + wireType);\n return [fieldNo, wireType];\n }\n /**\n * Skip one element on the wire and return the skipped data.\n * Supports WireType.StartGroup since v2.0.0-alpha.23.\n */\n skip(wireType) {\n let start = this.pos;\n // noinspection FallThroughInSwitchStatementJS\n switch (wireType) {\n case binary_format_contract_1.WireType.Varint:\n while (this.buf[this.pos++] & 0x80) {\n // ignore\n }\n break;\n case binary_format_contract_1.WireType.Bit64:\n this.pos += 4;\n case binary_format_contract_1.WireType.Bit32:\n this.pos += 4;\n break;\n case binary_format_contract_1.WireType.LengthDelimited:\n let len = this.uint32();\n this.pos += len;\n break;\n case binary_format_contract_1.WireType.StartGroup:\n // From descriptor.proto: Group type is deprecated, not supported in proto3.\n // But we must still be able to parse and treat as unknown.\n let t;\n while ((t = this.tag()[1]) !== binary_format_contract_1.WireType.EndGroup) {\n this.skip(t);\n }\n break;\n default:\n throw new Error(\"cant skip wire type \" + wireType);\n }\n this.assertBounds();\n return this.buf.subarray(start, this.pos);\n }\n /**\n * Throws error if position in byte array is out of range.\n */\n assertBounds() {\n if (this.pos > this.len)\n throw new RangeError(\"premature EOF\");\n }\n /**\n * Read a `int32` field, a signed 32 bit varint.\n */\n int32() {\n return this.uint32() | 0;\n }\n /**\n * Read a `sint32` field, a signed, zigzag-encoded 32-bit varint.\n */\n sint32() {\n let zze = this.uint32();\n // decode zigzag\n return (zze >>> 1) ^ -(zze & 1);\n }\n /**\n * Read a `int64` field, a signed 64-bit varint.\n */\n int64() {\n return new pb_long_1.PbLong(...this.varint64());\n }\n /**\n * Read a `uint64` field, an unsigned 64-bit varint.\n */\n uint64() {\n return new pb_long_1.PbULong(...this.varint64());\n }\n /**\n * Read a `sint64` field, a signed, zig-zag-encoded 64-bit varint.\n */\n sint64() {\n let [lo, hi] = this.varint64();\n // decode zig zag\n let s = -(lo & 1);\n lo = ((lo >>> 1 | (hi & 1) << 31) ^ s);\n hi = (hi >>> 1 ^ s);\n return new pb_long_1.PbLong(lo, hi);\n }\n /**\n * Read a `bool` field, a variant.\n */\n bool() {\n let [lo, hi] = this.varint64();\n return lo !== 0 || hi !== 0;\n }\n /**\n * Read a `fixed32` field, an unsigned, fixed-length 32-bit integer.\n */\n fixed32() {\n return this.view.getUint32((this.pos += 4) - 4, true);\n }\n /**\n * Read a `sfixed32` field, a signed, fixed-length 32-bit integer.\n */\n sfixed32() {\n return this.view.getInt32((this.pos += 4) - 4, true);\n }\n /**\n * Read a `fixed64` field, an unsigned, fixed-length 64 bit integer.\n */\n fixed64() {\n return new pb_long_1.PbULong(this.sfixed32(), this.sfixed32());\n }\n /**\n * Read a `fixed64` field, a signed, fixed-length 64-bit integer.\n */\n sfixed64() {\n return new pb_long_1.PbLong(this.sfixed32(), this.sfixed32());\n }\n /**\n * Read a `float` field, 32-bit floating point number.\n */\n float() {\n return this.view.getFloat32((this.pos += 4) - 4, true);\n }\n /**\n * Read a `double` field, a 64-bit floating point number.\n */\n double() {\n return this.view.getFloat64((this.pos += 8) - 8, true);\n }\n /**\n * Read a `bytes` field, length-delimited arbitrary data.\n */\n bytes() {\n let len = this.uint32();\n let start = this.pos;\n this.pos += len;\n this.assertBounds();\n return this.buf.subarray(start, start + len);\n }\n /**\n * Read a `string` field, length-delimited data converted to UTF-8 text.\n */\n string() {\n return this.textDecoder.decode(this.bytes());\n }\n}\nexports.BinaryReader = BinaryReader;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.assertFloat32 = exports.assertUInt32 = exports.assertInt32 = exports.assertNever = exports.assert = void 0;\n/**\n * assert that condition is true or throw error (with message)\n */\nfunction assert(condition, msg) {\n if (!condition) {\n throw new Error(msg);\n }\n}\nexports.assert = assert;\n/**\n * assert that value cannot exist = type `never`. throw runtime error if it does.\n */\nfunction assertNever(value, msg) {\n throw new Error(msg !== null && msg !== void 0 ? msg : 'Unexpected object: ' + value);\n}\nexports.assertNever = assertNever;\nconst FLOAT32_MAX = 3.4028234663852886e+38, FLOAT32_MIN = -3.4028234663852886e+38, UINT32_MAX = 0xFFFFFFFF, INT32_MAX = 0X7FFFFFFF, INT32_MIN = -0X80000000;\nfunction assertInt32(arg) {\n if (typeof arg !== \"number\")\n throw new Error('invalid int 32: ' + typeof arg);\n if (!Number.isInteger(arg) || arg > INT32_MAX || arg < INT32_MIN)\n throw new Error('invalid int 32: ' + arg);\n}\nexports.assertInt32 = assertInt32;\nfunction assertUInt32(arg) {\n if (typeof arg !== \"number\")\n throw new Error('invalid uint 32: ' + typeof arg);\n if (!Number.isInteger(arg) || arg > UINT32_MAX || arg < 0)\n throw new Error('invalid uint 32: ' + arg);\n}\nexports.assertUInt32 = assertUInt32;\nfunction assertFloat32(arg) {\n if (typeof arg !== \"number\")\n throw new Error('invalid float 32: ' + typeof arg);\n if (!Number.isFinite(arg))\n return;\n if (arg > FLOAT32_MAX || arg < FLOAT32_MIN)\n throw new Error('invalid float 32: ' + arg);\n}\nexports.assertFloat32 = assertFloat32;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BinaryWriter = exports.binaryWriteOptions = void 0;\nconst pb_long_1 = require(\"./pb-long\");\nconst goog_varint_1 = require(\"./goog-varint\");\nconst assert_1 = require(\"./assert\");\nconst defaultsWrite = {\n writeUnknownFields: true,\n writerFactory: () => new BinaryWriter(),\n};\n/**\n * Make options for writing binary data form partial options.\n */\nfunction binaryWriteOptions(options) {\n return options ? Object.assign(Object.assign({}, defaultsWrite), options) : defaultsWrite;\n}\nexports.binaryWriteOptions = binaryWriteOptions;\nclass BinaryWriter {\n constructor(textEncoder) {\n /**\n * Previous fork states.\n */\n this.stack = [];\n this.textEncoder = textEncoder !== null && textEncoder !== void 0 ? textEncoder : new TextEncoder();\n this.chunks = [];\n this.buf = [];\n }\n /**\n * Return all bytes written and reset this writer.\n */\n finish() {\n this.chunks.push(new Uint8Array(this.buf)); // flush the buffer\n let len = 0;\n for (let i = 0; i < this.chunks.length; i++)\n len += this.chunks[i].length;\n let bytes = new Uint8Array(len);\n let offset = 0;\n for (let i = 0; i < this.chunks.length; i++) {\n bytes.set(this.chunks[i], offset);\n offset += this.chunks[i].length;\n }\n this.chunks = [];\n return bytes;\n }\n /**\n * Start a new fork for length-delimited data like a message\n * or a packed repeated field.\n *\n * Must be joined later with `join()`.\n */\n fork() {\n this.stack.push({ chunks: this.chunks, buf: this.buf });\n this.chunks = [];\n this.buf = [];\n return this;\n }\n /**\n * Join the last fork. Write its length and bytes, then\n * return to the previous state.\n */\n join() {\n // get chunk of fork\n let chunk = this.finish();\n // restore previous state\n let prev = this.stack.pop();\n if (!prev)\n throw new Error('invalid state, fork stack empty');\n this.chunks = prev.chunks;\n this.buf = prev.buf;\n // write length of chunk as varint\n this.uint32(chunk.byteLength);\n return this.raw(chunk);\n }\n /**\n * Writes a tag (field number and wire type).\n *\n * Equivalent to `uint32( (fieldNo << 3 | type) >>> 0 )`.\n *\n * Generated code should compute the tag ahead of time and call `uint32()`.\n */\n tag(fieldNo, type) {\n return this.uint32((fieldNo << 3 | type) >>> 0);\n }\n /**\n * Write a chunk of raw bytes.\n */\n raw(chunk) {\n if (this.buf.length) {\n this.chunks.push(new Uint8Array(this.buf));\n this.buf = [];\n }\n this.chunks.push(chunk);\n return this;\n }\n /**\n * Write a `uint32` value, an unsigned 32 bit varint.\n */\n uint32(value) {\n assert_1.assertUInt32(value);\n // write value as varint 32, inlined for speed\n while (value > 0x7f) {\n this.buf.push((value & 0x7f) | 0x80);\n value = value >>> 7;\n }\n this.buf.push(value);\n return this;\n }\n /**\n * Write a `int32` value, a signed 32 bit varint.\n */\n int32(value) {\n assert_1.assertInt32(value);\n goog_varint_1.varint32write(value, this.buf);\n return this;\n }\n /**\n * Write a `bool` value, a variant.\n */\n bool(value) {\n this.buf.push(value ? 1 : 0);\n return this;\n }\n /**\n * Write a `bytes` value, length-delimited arbitrary data.\n */\n bytes(value) {\n this.uint32(value.byteLength); // write length of chunk as varint\n return this.raw(value);\n }\n /**\n * Write a `string` value, length-delimited data converted to UTF-8 text.\n */\n string(value) {\n let chunk = this.textEncoder.encode(value);\n this.uint32(chunk.byteLength); // write length of chunk as varint\n return this.raw(chunk);\n }\n /**\n * Write a `float` value, 32-bit floating point number.\n */\n float(value) {\n assert_1.assertFloat32(value);\n let chunk = new Uint8Array(4);\n new DataView(chunk.buffer).setFloat32(0, value, true);\n return this.raw(chunk);\n }\n /**\n * Write a `double` value, a 64-bit floating point number.\n */\n double(value) {\n let chunk = new Uint8Array(8);\n new DataView(chunk.buffer).setFloat64(0, value, true);\n return this.raw(chunk);\n }\n /**\n * Write a `fixed32` value, an unsigned, fixed-length 32-bit integer.\n */\n fixed32(value) {\n assert_1.assertUInt32(value);\n let chunk = new Uint8Array(4);\n new DataView(chunk.buffer).setUint32(0, value, true);\n return this.raw(chunk);\n }\n /**\n * Write a `sfixed32` value, a signed, fixed-length 32-bit integer.\n */\n sfixed32(value) {\n assert_1.assertInt32(value);\n let chunk = new Uint8Array(4);\n new DataView(chunk.buffer).setInt32(0, value, true);\n return this.raw(chunk);\n }\n /**\n * Write a `sint32` value, a signed, zigzag-encoded 32-bit varint.\n */\n sint32(value) {\n assert_1.assertInt32(value);\n // zigzag encode\n value = ((value << 1) ^ (value >> 31)) >>> 0;\n goog_varint_1.varint32write(value, this.buf);\n return this;\n }\n /**\n * Write a `fixed64` value, a signed, fixed-length 64-bit integer.\n */\n sfixed64(value) {\n let chunk = new Uint8Array(8);\n let view = new DataView(chunk.buffer);\n let long = pb_long_1.PbLong.from(value);\n view.setInt32(0, long.lo, true);\n view.setInt32(4, long.hi, true);\n return this.raw(chunk);\n }\n /**\n * Write a `fixed64` value, an unsigned, fixed-length 64 bit integer.\n */\n fixed64(value) {\n let chunk = new Uint8Array(8);\n let view = new DataView(chunk.buffer);\n let long = pb_long_1.PbULong.from(value);\n view.setInt32(0, long.lo, true);\n view.setInt32(4, long.hi, true);\n return this.raw(chunk);\n }\n /**\n * Write a `int64` value, a signed 64-bit varint.\n */\n int64(value) {\n let long = pb_long_1.PbLong.from(value);\n goog_varint_1.varint64write(long.lo, long.hi, this.buf);\n return this;\n }\n /**\n * Write a `sint64` value, a signed, zig-zag-encoded 64-bit varint.\n */\n sint64(value) {\n let long = pb_long_1.PbLong.from(value), \n // zigzag encode\n sign = long.hi >> 31, lo = (long.lo << 1) ^ sign, hi = ((long.hi << 1) | (long.lo >>> 31)) ^ sign;\n goog_varint_1.varint64write(lo, hi, this.buf);\n return this;\n }\n /**\n * Write a `uint64` value, an unsigned 64-bit varint.\n */\n uint64(value) {\n let long = pb_long_1.PbULong.from(value);\n goog_varint_1.varint64write(long.lo, long.hi, this.buf);\n return this;\n }\n}\nexports.BinaryWriter = BinaryWriter;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.mergeJsonOptions = exports.jsonWriteOptions = exports.jsonReadOptions = void 0;\nconst defaultsWrite = {\n emitDefaultValues: false,\n enumAsInteger: false,\n useProtoFieldName: false,\n prettySpaces: 0,\n}, defaultsRead = {\n ignoreUnknownFields: false,\n};\n/**\n * Make options for reading JSON data from partial options.\n */\nfunction jsonReadOptions(options) {\n return options ? Object.assign(Object.assign({}, defaultsRead), options) : defaultsRead;\n}\nexports.jsonReadOptions = jsonReadOptions;\n/**\n * Make options for writing JSON data from partial options.\n */\nfunction jsonWriteOptions(options) {\n return options ? Object.assign(Object.assign({}, defaultsWrite), options) : defaultsWrite;\n}\nexports.jsonWriteOptions = jsonWriteOptions;\n/**\n * Merges JSON write or read options. Later values override earlier values. Type registries are merged.\n */\nfunction mergeJsonOptions(a, b) {\n var _a, _b;\n let c = Object.assign(Object.assign({}, a), b);\n c.typeRegistry = [...((_a = a === null || a === void 0 ? void 0 : a.typeRegistry) !== null && _a !== void 0 ? _a : []), ...((_b = b === null || b === void 0 ? void 0 : b.typeRegistry) !== null && _b !== void 0 ? _b : [])];\n return c;\n}\nexports.mergeJsonOptions = mergeJsonOptions;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MESSAGE_TYPE = void 0;\n/**\n * The symbol used as a key on message objects to store the message type.\n *\n * Note that this is an experimental feature - it is here to stay, but\n * implementation details may change without notice.\n */\nexports.MESSAGE_TYPE = Symbol.for(\"protobuf-ts/message-type\");\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.lowerCamelCase = void 0;\n/**\n * Converts snake_case to lowerCamelCase.\n *\n * Should behave like protoc:\n * https://github.com/protocolbuffers/protobuf/blob/e8ae137c96444ea313485ed1118c5e43b2099cf1/src/google/protobuf/compiler/java/java_helpers.cc#L118\n */\nfunction lowerCamelCase(snakeCase) {\n let capNext = false;\n const sb = [];\n for (let i = 0; i < snakeCase.length; i++) {\n let next = snakeCase.charAt(i);\n if (next == '_') {\n capNext = true;\n }\n else if (/\\d/.test(next)) {\n sb.push(next);\n capNext = true;\n }\n else if (capNext) {\n sb.push(next.toUpperCase());\n capNext = false;\n }\n else if (i == 0) {\n sb.push(next.toLowerCase());\n }\n else {\n sb.push(next);\n }\n }\n return sb.join('');\n}\nexports.lowerCamelCase = lowerCamelCase;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.readMessageOption = exports.readFieldOption = exports.readFieldOptions = exports.normalizeFieldInfo = exports.RepeatType = exports.LongType = exports.ScalarType = void 0;\nconst lower_camel_case_1 = require(\"./lower-camel-case\");\n/**\n * Scalar value types. This is a subset of field types declared by protobuf\n * enum google.protobuf.FieldDescriptorProto.Type The types GROUP and MESSAGE\n * are omitted, but the numerical values are identical.\n */\nvar ScalarType;\n(function (ScalarType) {\n // 0 is reserved for errors.\n // Order is weird for historical reasons.\n ScalarType[ScalarType[\"DOUBLE\"] = 1] = \"DOUBLE\";\n ScalarType[ScalarType[\"FLOAT\"] = 2] = \"FLOAT\";\n // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if\n // negative values are likely.\n ScalarType[ScalarType[\"INT64\"] = 3] = \"INT64\";\n ScalarType[ScalarType[\"UINT64\"] = 4] = \"UINT64\";\n // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if\n // negative values are likely.\n ScalarType[ScalarType[\"INT32\"] = 5] = \"INT32\";\n ScalarType[ScalarType[\"FIXED64\"] = 6] = \"FIXED64\";\n ScalarType[ScalarType[\"FIXED32\"] = 7] = \"FIXED32\";\n ScalarType[ScalarType[\"BOOL\"] = 8] = \"BOOL\";\n ScalarType[ScalarType[\"STRING\"] = 9] = \"STRING\";\n // Tag-delimited aggregate.\n // Group type is deprecated and not supported in proto3. However, Proto3\n // implementations should still be able to parse the group wire format and\n // treat group fields as unknown fields.\n // TYPE_GROUP = 10,\n // TYPE_MESSAGE = 11, // Length-delimited aggregate.\n // New in version 2.\n ScalarType[ScalarType[\"BYTES\"] = 12] = \"BYTES\";\n ScalarType[ScalarType[\"UINT32\"] = 13] = \"UINT32\";\n // TYPE_ENUM = 14,\n ScalarType[ScalarType[\"SFIXED32\"] = 15] = \"SFIXED32\";\n ScalarType[ScalarType[\"SFIXED64\"] = 16] = \"SFIXED64\";\n ScalarType[ScalarType[\"SINT32\"] = 17] = \"SINT32\";\n ScalarType[ScalarType[\"SINT64\"] = 18] = \"SINT64\";\n})(ScalarType = exports.ScalarType || (exports.ScalarType = {}));\n/**\n * JavaScript representation of 64 bit integral types. Equivalent to the\n * field option \"jstype\".\n *\n * By default, protobuf-ts represents 64 bit types as `bigint`.\n *\n * You can change the default behaviour by enabling the plugin parameter\n * `long_type_string`, which will represent 64 bit types as `string`.\n *\n * Alternatively, you can change the behaviour for individual fields\n * with the field option \"jstype\":\n *\n * ```protobuf\n * uint64 my_field = 1 [jstype = JS_STRING];\n * uint64 other_field = 2 [jstype = JS_NUMBER];\n * ```\n */\nvar LongType;\n(function (LongType) {\n /**\n * Use JavaScript `bigint`.\n *\n * Field option `[jstype = JS_NORMAL]`.\n */\n LongType[LongType[\"BIGINT\"] = 0] = \"BIGINT\";\n /**\n * Use JavaScript `string`.\n *\n * Field option `[jstype = JS_STRING]`.\n */\n LongType[LongType[\"STRING\"] = 1] = \"STRING\";\n /**\n * Use JavaScript `number`.\n *\n * Large values will loose precision.\n *\n * Field option `[jstype = JS_NUMBER]`.\n */\n LongType[LongType[\"NUMBER\"] = 2] = \"NUMBER\";\n})(LongType = exports.LongType || (exports.LongType = {}));\n/**\n * Protobuf 2.1.0 introduced packed repeated fields.\n * Setting the field option `[packed = true]` enables packing.\n *\n * In proto3, all repeated fields are packed by default.\n * Setting the field option `[packed = false]` disables packing.\n *\n * Packed repeated fields are encoded with a single tag,\n * then a length-delimiter, then the element values.\n *\n * Unpacked repeated fields are encoded with a tag and\n * value for each element.\n *\n * `bytes` and `string` cannot be packed.\n */\nvar RepeatType;\n(function (RepeatType) {\n /**\n * The field is not repeated.\n */\n RepeatType[RepeatType[\"NO\"] = 0] = \"NO\";\n /**\n * The field is repeated and should be packed.\n * Invalid for `bytes` and `string`, they cannot be packed.\n */\n RepeatType[RepeatType[\"PACKED\"] = 1] = \"PACKED\";\n /**\n * The field is repeated but should not be packed.\n * The only valid repeat type for repeated `bytes` and `string`.\n */\n RepeatType[RepeatType[\"UNPACKED\"] = 2] = \"UNPACKED\";\n})(RepeatType = exports.RepeatType || (exports.RepeatType = {}));\n/**\n * Turns PartialFieldInfo into FieldInfo.\n */\nfunction normalizeFieldInfo(field) {\n var _a, _b, _c, _d;\n field.localName = (_a = field.localName) !== null && _a !== void 0 ? _a : lower_camel_case_1.lowerCamelCase(field.name);\n field.jsonName = (_b = field.jsonName) !== null && _b !== void 0 ? _b : lower_camel_case_1.lowerCamelCase(field.name);\n field.repeat = (_c = field.repeat) !== null && _c !== void 0 ? _c : RepeatType.NO;\n field.opt = (_d = field.opt) !== null && _d !== void 0 ? _d : (field.repeat ? false : field.oneof ? false : field.kind == \"message\");\n return field;\n}\nexports.normalizeFieldInfo = normalizeFieldInfo;\n/**\n * Read custom field options from a generated message type.\n *\n * @deprecated use readFieldOption()\n */\nfunction readFieldOptions(messageType, fieldName, extensionName, extensionType) {\n var _a;\n const options = (_a = messageType.fields.find((m, i) => m.localName == fieldName || i == fieldName)) === null || _a === void 0 ? void 0 : _a.options;\n return options && options[extensionName] ? extensionType.fromJson(options[extensionName]) : undefined;\n}\nexports.readFieldOptions = readFieldOptions;\nfunction readFieldOption(messageType, fieldName, extensionName, extensionType) {\n var _a;\n const options = (_a = messageType.fields.find((m, i) => m.localName == fieldName || i == fieldName)) === null || _a === void 0 ? void 0 : _a.options;\n if (!options) {\n return undefined;\n }\n const optionVal = options[extensionName];\n if (optionVal === undefined) {\n return optionVal;\n }\n return extensionType ? extensionType.fromJson(optionVal) : optionVal;\n}\nexports.readFieldOption = readFieldOption;\nfunction readMessageOption(messageType, extensionName, extensionType) {\n const options = messageType.options;\n const optionVal = options[extensionName];\n if (optionVal === undefined) {\n return optionVal;\n }\n return extensionType ? extensionType.fromJson(optionVal) : optionVal;\n}\nexports.readMessageOption = readMessageOption;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getSelectedOneofValue = exports.clearOneofValue = exports.setUnknownOneofValue = exports.setOneofValue = exports.getOneofValue = exports.isOneofGroup = void 0;\n/**\n * Is the given value a valid oneof group?\n *\n * We represent protobuf `oneof` as algebraic data types (ADT) in generated\n * code. But when working with messages of unknown type, the ADT does not\n * help us.\n *\n * This type guard checks if the given object adheres to the ADT rules, which\n * are as follows:\n *\n * 1) Must be an object.\n *\n * 2) Must have a \"oneofKind\" discriminator property.\n *\n * 3) If \"oneofKind\" is `undefined`, no member field is selected. The object\n * must not have any other properties.\n *\n * 4) If \"oneofKind\" is a `string`, the member field with this name is\n * selected.\n *\n * 5) If a member field is selected, the object must have a second property\n * with this name. The property must not be `undefined`.\n *\n * 6) No extra properties are allowed. The object has either one property\n * (no selection) or two properties (selection).\n *\n */\nfunction isOneofGroup(any) {\n if (typeof any != 'object' || any === null || !any.hasOwnProperty('oneofKind')) {\n return false;\n }\n switch (typeof any.oneofKind) {\n case \"string\":\n if (any[any.oneofKind] === undefined)\n return false;\n return Object.keys(any).length == 2;\n case \"undefined\":\n return Object.keys(any).length == 1;\n default:\n return false;\n }\n}\nexports.isOneofGroup = isOneofGroup;\n/**\n * Returns the value of the given field in a oneof group.\n */\nfunction getOneofValue(oneof, kind) {\n return oneof[kind];\n}\nexports.getOneofValue = getOneofValue;\nfunction setOneofValue(oneof, kind, value) {\n if (oneof.oneofKind !== undefined) {\n delete oneof[oneof.oneofKind];\n }\n oneof.oneofKind = kind;\n if (value !== undefined) {\n oneof[kind] = value;\n }\n}\nexports.setOneofValue = setOneofValue;\nfunction setUnknownOneofValue(oneof, kind, value) {\n if (oneof.oneofKind !== undefined) {\n delete oneof[oneof.oneofKind];\n }\n oneof.oneofKind = kind;\n if (value !== undefined && kind !== undefined) {\n oneof[kind] = value;\n }\n}\nexports.setUnknownOneofValue = setUnknownOneofValue;\n/**\n * Removes the selected field in a oneof group.\n *\n * Note that the recommended way to modify a oneof group is to set\n * a new object:\n *\n * ```ts\n * message.result = { oneofKind: undefined };\n * ```\n */\nfunction clearOneofValue(oneof) {\n if (oneof.oneofKind !== undefined) {\n delete oneof[oneof.oneofKind];\n }\n oneof.oneofKind = undefined;\n}\nexports.clearOneofValue = clearOneofValue;\n/**\n * Returns the selected value of the given oneof group.\n *\n * Not that the recommended way to access a oneof group is to check\n * the \"oneofKind\" property and let TypeScript narrow down the union\n * type for you:\n *\n * ```ts\n * if (message.result.oneofKind === \"error\") {\n * message.result.error; // string\n * }\n * ```\n *\n * In the rare case you just need the value, and do not care about\n * which protobuf field is selected, you can use this function\n * for convenience.\n */\nfunction getSelectedOneofValue(oneof) {\n if (oneof.oneofKind === undefined) {\n return undefined;\n }\n return oneof[oneof.oneofKind];\n}\nexports.getSelectedOneofValue = getSelectedOneofValue;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ReflectionTypeCheck = void 0;\nconst reflection_info_1 = require(\"./reflection-info\");\nconst oneof_1 = require(\"./oneof\");\n// noinspection JSMethodCanBeStatic\nclass ReflectionTypeCheck {\n constructor(info) {\n var _a;\n this.fields = (_a = info.fields) !== null && _a !== void 0 ? _a : [];\n }\n prepare() {\n if (this.data)\n return;\n const req = [], known = [], oneofs = [];\n for (let field of this.fields) {\n if (field.oneof) {\n if (!oneofs.includes(field.oneof)) {\n oneofs.push(field.oneof);\n req.push(field.oneof);\n known.push(field.oneof);\n }\n }\n else {\n known.push(field.localName);\n switch (field.kind) {\n case \"scalar\":\n case \"enum\":\n if (!field.opt || field.repeat)\n req.push(field.localName);\n break;\n case \"message\":\n if (field.repeat)\n req.push(field.localName);\n break;\n case \"map\":\n req.push(field.localName);\n break;\n }\n }\n }\n this.data = { req, known, oneofs: Object.values(oneofs) };\n }\n /**\n * Is the argument a valid message as specified by the\n * reflection information?\n *\n * Checks all field types recursively. The `depth`\n * specifies how deep into the structure the check will be.\n *\n * With a depth of 0, only the presence of fields\n * is checked.\n *\n * With a depth of 1 or more, the field types are checked.\n *\n * With a depth of 2 or more, the members of map, repeated\n * and message fields are checked.\n *\n * Message fields will be checked recursively with depth - 1.\n *\n * The number of map entries / repeated values being checked\n * is < depth.\n */\n is(message, depth, allowExcessProperties = false) {\n if (depth < 0)\n return true;\n if (message === null || message === undefined || typeof message != 'object')\n return false;\n this.prepare();\n let keys = Object.keys(message), data = this.data;\n // if a required field is missing in arg, this cannot be a T\n if (keys.length < data.req.length || data.req.some(n => !keys.includes(n)))\n return false;\n if (!allowExcessProperties) {\n // if the arg contains a key we dont know, this is not a literal T\n if (keys.some(k => !data.known.includes(k)))\n return false;\n }\n // \"With a depth of 0, only the presence and absence of fields is checked.\"\n // \"With a depth of 1 or more, the field types are checked.\"\n if (depth < 1) {\n return true;\n }\n // check oneof group\n for (const name of data.oneofs) {\n const group = message[name];\n if (!oneof_1.isOneofGroup(group))\n return false;\n if (group.oneofKind === undefined)\n continue;\n const field = this.fields.find(f => f.localName === group.oneofKind);\n if (!field)\n return false; // we found no field, but have a kind, something is wrong\n if (!this.field(group[group.oneofKind], field, allowExcessProperties, depth))\n return false;\n }\n // check types\n for (const field of this.fields) {\n if (field.oneof !== undefined)\n continue;\n if (!this.field(message[field.localName], field, allowExcessProperties, depth))\n return false;\n }\n return true;\n }\n field(arg, field, allowExcessProperties, depth) {\n let repeated = field.repeat;\n switch (field.kind) {\n case \"scalar\":\n if (arg === undefined)\n return field.opt;\n if (repeated)\n return this.scalars(arg, field.T, depth, field.L);\n return this.scalar(arg, field.T, field.L);\n case \"enum\":\n if (arg === undefined)\n return field.opt;\n if (repeated)\n return this.scalars(arg, reflection_info_1.ScalarType.INT32, depth);\n return this.scalar(arg, reflection_info_1.ScalarType.INT32);\n case \"message\":\n if (arg === undefined)\n return true;\n if (repeated)\n return this.messages(arg, field.T(), allowExcessProperties, depth);\n return this.message(arg, field.T(), allowExcessProperties, depth);\n case \"map\":\n if (typeof arg != 'object' || arg === null)\n return false;\n if (depth < 2)\n return true;\n if (!this.mapKeys(arg, field.K, depth))\n return false;\n switch (field.V.kind) {\n case \"scalar\":\n return this.scalars(Object.values(arg), field.V.T, depth, field.V.L);\n case \"enum\":\n return this.scalars(Object.values(arg), reflection_info_1.ScalarType.INT32, depth);\n case \"message\":\n return this.messages(Object.values(arg), field.V.T(), allowExcessProperties, depth);\n }\n break;\n }\n return true;\n }\n message(arg, type, allowExcessProperties, depth) {\n if (allowExcessProperties) {\n return type.isAssignable(arg, depth);\n }\n return type.is(arg, depth);\n }\n messages(arg, type, allowExcessProperties, depth) {\n if (!Array.isArray(arg))\n return false;\n if (depth < 2)\n return true;\n if (allowExcessProperties) {\n for (let i = 0; i < arg.length && i < depth; i++)\n if (!type.isAssignable(arg[i], depth - 1))\n return false;\n }\n else {\n for (let i = 0; i < arg.length && i < depth; i++)\n if (!type.is(arg[i], depth - 1))\n return false;\n }\n return true;\n }\n scalar(arg, type, longType) {\n let argType = typeof arg;\n switch (type) {\n case reflection_info_1.ScalarType.UINT64:\n case reflection_info_1.ScalarType.FIXED64:\n case reflection_info_1.ScalarType.INT64:\n case reflection_info_1.ScalarType.SFIXED64:\n case reflection_info_1.ScalarType.SINT64:\n switch (longType) {\n case reflection_info_1.LongType.BIGINT:\n return argType == \"bigint\";\n case reflection_info_1.LongType.NUMBER:\n return argType == \"number\" && !isNaN(arg);\n default:\n return argType == \"string\";\n }\n case reflection_info_1.ScalarType.BOOL:\n return argType == 'boolean';\n case reflection_info_1.ScalarType.STRING:\n return argType == 'string';\n case reflection_info_1.ScalarType.BYTES:\n return arg instanceof Uint8Array;\n case reflection_info_1.ScalarType.DOUBLE:\n case reflection_info_1.ScalarType.FLOAT:\n return argType == 'number' && !isNaN(arg);\n default:\n // case ScalarType.UINT32:\n // case ScalarType.FIXED32:\n // case ScalarType.INT32:\n // case ScalarType.SINT32:\n // case ScalarType.SFIXED32:\n return argType == 'number' && Number.isInteger(arg);\n }\n }\n scalars(arg, type, depth, longType) {\n if (!Array.isArray(arg))\n return false;\n if (depth < 2)\n return true;\n if (Array.isArray(arg))\n for (let i = 0; i < arg.length && i < depth; i++)\n if (!this.scalar(arg[i], type, longType))\n return false;\n return true;\n }\n mapKeys(map, type, depth) {\n let keys = Object.keys(map);\n switch (type) {\n case reflection_info_1.ScalarType.INT32:\n case reflection_info_1.ScalarType.FIXED32:\n case reflection_info_1.ScalarType.SFIXED32:\n case reflection_info_1.ScalarType.SINT32:\n case reflection_info_1.ScalarType.UINT32:\n return this.scalars(keys.slice(0, depth).map(k => parseInt(k)), type, depth);\n case reflection_info_1.ScalarType.BOOL:\n return this.scalars(keys.slice(0, depth).map(k => k == 'true' ? true : k == 'false' ? false : k), type, depth);\n default:\n return this.scalars(keys, type, depth, reflection_info_1.LongType.STRING);\n }\n }\n}\nexports.ReflectionTypeCheck = ReflectionTypeCheck;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.reflectionLongConvert = void 0;\nconst reflection_info_1 = require(\"./reflection-info\");\n/**\n * Utility method to convert a PbLong or PbUlong to a JavaScript\n * representation during runtime.\n *\n * Works with generated field information, `undefined` is equivalent\n * to `STRING`.\n */\nfunction reflectionLongConvert(long, type) {\n switch (type) {\n case reflection_info_1.LongType.BIGINT:\n return long.toBigInt();\n case reflection_info_1.LongType.NUMBER:\n return long.toNumber();\n default:\n // case undefined:\n // case LongType.STRING:\n return long.toString();\n }\n}\nexports.reflectionLongConvert = reflectionLongConvert;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ReflectionJsonReader = void 0;\nconst json_typings_1 = require(\"./json-typings\");\nconst base64_1 = require(\"./base64\");\nconst reflection_info_1 = require(\"./reflection-info\");\nconst pb_long_1 = require(\"./pb-long\");\nconst assert_1 = require(\"./assert\");\nconst reflection_long_convert_1 = require(\"./reflection-long-convert\");\n/**\n * Reads proto3 messages in canonical JSON format using reflection information.\n *\n * https://developers.google.com/protocol-buffers/docs/proto3#json\n */\nclass ReflectionJsonReader {\n constructor(info) {\n this.info = info;\n }\n prepare() {\n var _a;\n if (this.fMap === undefined) {\n this.fMap = {};\n const fieldsInput = (_a = this.info.fields) !== null && _a !== void 0 ? _a : [];\n for (const field of fieldsInput) {\n this.fMap[field.name] = field;\n this.fMap[field.jsonName] = field;\n this.fMap[field.localName] = field;\n }\n }\n }\n // Cannot parse JSON for #.\n assert(condition, fieldName, jsonValue) {\n if (!condition) {\n let what = json_typings_1.typeofJsonValue(jsonValue);\n if (what == \"number\" || what == \"boolean\")\n what = jsonValue.toString();\n throw new Error(`Cannot parse JSON ${what} for ${this.info.typeName}#${fieldName}`);\n }\n }\n /**\n * Reads a message from canonical JSON format into the target message.\n *\n * Repeated fields are appended. Map entries are added, overwriting\n * existing keys.\n *\n * If a message field is already present, it will be merged with the\n * new data.\n */\n read(input, message, options) {\n this.prepare();\n const oneofsHandled = [];\n for (const [jsonKey, jsonValue] of Object.entries(input)) {\n const field = this.fMap[jsonKey];\n if (!field) {\n if (!options.ignoreUnknownFields)\n throw new Error(`Found unknown field while reading ${this.info.typeName} from JSON format. JSON key: ${jsonKey}`);\n continue;\n }\n const localName = field.localName;\n // handle oneof ADT\n let target; // this will be the target for the field value, whether it is member of a oneof or not\n if (field.oneof) {\n if (jsonValue === null && (field.kind !== 'enum' || field.T()[0] !== 'google.protobuf.NullValue')) {\n continue;\n }\n // since json objects are unordered by specification, it is not possible to take the last of multiple oneofs\n if (oneofsHandled.includes(field.oneof))\n throw new Error(`Multiple members of the oneof group \"${field.oneof}\" of ${this.info.typeName} are present in JSON.`);\n oneofsHandled.push(field.oneof);\n target = message[field.oneof] = {\n oneofKind: localName\n };\n }\n else {\n target = message;\n }\n // we have handled oneof above. we just have read the value into `target`.\n if (field.kind == 'map') {\n if (jsonValue === null) {\n continue;\n }\n // check input\n this.assert(json_typings_1.isJsonObject(jsonValue), field.name, jsonValue);\n // our target to put map entries into\n const fieldObj = target[localName];\n // read entries\n for (const [jsonObjKey, jsonObjValue] of Object.entries(jsonValue)) {\n this.assert(jsonObjValue !== null, field.name + \" map value\", null);\n // read value\n let val;\n switch (field.V.kind) {\n case \"message\":\n val = field.V.T().internalJsonRead(jsonObjValue, options);\n break;\n case \"enum\":\n val = this.enum(field.V.T(), jsonObjValue, field.name, options.ignoreUnknownFields);\n if (val === false)\n continue;\n break;\n case \"scalar\":\n val = this.scalar(jsonObjValue, field.V.T, field.V.L, field.name);\n break;\n }\n this.assert(val !== undefined, field.name + \" map value\", jsonObjValue);\n // read key\n let key = jsonObjKey;\n if (field.K == reflection_info_1.ScalarType.BOOL)\n key = key == \"true\" ? true : key == \"false\" ? false : key;\n key = this.scalar(key, field.K, reflection_info_1.LongType.STRING, field.name).toString();\n fieldObj[key] = val;\n }\n }\n else if (field.repeat) {\n if (jsonValue === null)\n continue;\n // check input\n this.assert(Array.isArray(jsonValue), field.name, jsonValue);\n // our target to put array entries into\n const fieldArr = target[localName];\n // read array entries\n for (const jsonItem of jsonValue) {\n this.assert(jsonItem !== null, field.name, null);\n let val;\n switch (field.kind) {\n case \"message\":\n val = field.T().internalJsonRead(jsonItem, options);\n break;\n case \"enum\":\n val = this.enum(field.T(), jsonItem, field.name, options.ignoreUnknownFields);\n if (val === false)\n continue;\n break;\n case \"scalar\":\n val = this.scalar(jsonItem, field.T, field.L, field.name);\n break;\n }\n this.assert(val !== undefined, field.name, jsonValue);\n fieldArr.push(val);\n }\n }\n else {\n switch (field.kind) {\n case \"message\":\n if (jsonValue === null && field.T().typeName != 'google.protobuf.Value') {\n this.assert(field.oneof === undefined, field.name + \" (oneof member)\", null);\n continue;\n }\n target[localName] = field.T().internalJsonRead(jsonValue, options, target[localName]);\n break;\n case \"enum\":\n let val = this.enum(field.T(), jsonValue, field.name, options.ignoreUnknownFields);\n if (val === false)\n continue;\n target[localName] = val;\n break;\n case \"scalar\":\n target[localName] = this.scalar(jsonValue, field.T, field.L, field.name);\n break;\n }\n }\n }\n }\n /**\n * Returns `false` for unrecognized string representations.\n *\n * google.protobuf.NullValue accepts only JSON `null` (or the old `\"NULL_VALUE\"`).\n */\n enum(type, json, fieldName, ignoreUnknownFields) {\n if (type[0] == 'google.protobuf.NullValue')\n assert_1.assert(json === null || json === \"NULL_VALUE\", `Unable to parse field ${this.info.typeName}#${fieldName}, enum ${type[0]} only accepts null.`);\n if (json === null)\n // we require 0 to be default value for all enums\n return 0;\n switch (typeof json) {\n case \"number\":\n assert_1.assert(Number.isInteger(json), `Unable to parse field ${this.info.typeName}#${fieldName}, enum can only be integral number, got ${json}.`);\n return json;\n case \"string\":\n let localEnumName = json;\n if (type[2] && json.substring(0, type[2].length) === type[2])\n // lookup without the shared prefix\n localEnumName = json.substring(type[2].length);\n let enumNumber = type[1][localEnumName];\n if (typeof enumNumber === 'undefined' && ignoreUnknownFields) {\n return false;\n }\n assert_1.assert(typeof enumNumber == \"number\", `Unable to parse field ${this.info.typeName}#${fieldName}, enum ${type[0]} has no value for \"${json}\".`);\n return enumNumber;\n }\n assert_1.assert(false, `Unable to parse field ${this.info.typeName}#${fieldName}, cannot parse enum value from ${typeof json}\".`);\n }\n scalar(json, type, longType, fieldName) {\n let e;\n try {\n switch (type) {\n // float, double: JSON value will be a number or one of the special string values \"NaN\", \"Infinity\", and \"-Infinity\".\n // Either numbers or strings are accepted. Exponent notation is also accepted.\n case reflection_info_1.ScalarType.DOUBLE:\n case reflection_info_1.ScalarType.FLOAT:\n if (json === null)\n return .0;\n if (json === \"NaN\")\n return Number.NaN;\n if (json === \"Infinity\")\n return Number.POSITIVE_INFINITY;\n if (json === \"-Infinity\")\n return Number.NEGATIVE_INFINITY;\n if (json === \"\") {\n e = \"empty string\";\n break;\n }\n if (typeof json == \"string\" && json.trim().length !== json.length) {\n e = \"extra whitespace\";\n break;\n }\n if (typeof json != \"string\" && typeof json != \"number\") {\n break;\n }\n let float = Number(json);\n if (Number.isNaN(float)) {\n e = \"not a number\";\n break;\n }\n if (!Number.isFinite(float)) {\n // infinity and -infinity are handled by string representation above, so this is an error\n e = \"too large or small\";\n break;\n }\n if (type == reflection_info_1.ScalarType.FLOAT)\n assert_1.assertFloat32(float);\n return float;\n // int32, fixed32, uint32: JSON value will be a decimal number. Either numbers or strings are accepted.\n case reflection_info_1.ScalarType.INT32:\n case reflection_info_1.ScalarType.FIXED32:\n case reflection_info_1.ScalarType.SFIXED32:\n case reflection_info_1.ScalarType.SINT32:\n case reflection_info_1.ScalarType.UINT32:\n if (json === null)\n return 0;\n let int32;\n if (typeof json == \"number\")\n int32 = json;\n else if (json === \"\")\n e = \"empty string\";\n else if (typeof json == \"string\") {\n if (json.trim().length !== json.length)\n e = \"extra whitespace\";\n else\n int32 = Number(json);\n }\n if (int32 === undefined)\n break;\n if (type == reflection_info_1.ScalarType.UINT32)\n assert_1.assertUInt32(int32);\n else\n assert_1.assertInt32(int32);\n return int32;\n // int64, fixed64, uint64: JSON value will be a decimal string. Either numbers or strings are accepted.\n case reflection_info_1.ScalarType.INT64:\n case reflection_info_1.ScalarType.SFIXED64:\n case reflection_info_1.ScalarType.SINT64:\n if (json === null)\n return reflection_long_convert_1.reflectionLongConvert(pb_long_1.PbLong.ZERO, longType);\n if (typeof json != \"number\" && typeof json != \"string\")\n break;\n return reflection_long_convert_1.reflectionLongConvert(pb_long_1.PbLong.from(json), longType);\n case reflection_info_1.ScalarType.FIXED64:\n case reflection_info_1.ScalarType.UINT64:\n if (json === null)\n return reflection_long_convert_1.reflectionLongConvert(pb_long_1.PbULong.ZERO, longType);\n if (typeof json != \"number\" && typeof json != \"string\")\n break;\n return reflection_long_convert_1.reflectionLongConvert(pb_long_1.PbULong.from(json), longType);\n // bool:\n case reflection_info_1.ScalarType.BOOL:\n if (json === null)\n return false;\n if (typeof json !== \"boolean\")\n break;\n return json;\n // string:\n case reflection_info_1.ScalarType.STRING:\n if (json === null)\n return \"\";\n if (typeof json !== \"string\") {\n e = \"extra whitespace\";\n break;\n }\n try {\n encodeURIComponent(json);\n }\n catch (e) {\n e = \"invalid UTF8\";\n break;\n }\n return json;\n // bytes: JSON value will be the data encoded as a string using standard base64 encoding with paddings.\n // Either standard or URL-safe base64 encoding with/without paddings are accepted.\n case reflection_info_1.ScalarType.BYTES:\n if (json === null || json === \"\")\n return new Uint8Array(0);\n if (typeof json !== 'string')\n break;\n return base64_1.base64decode(json);\n }\n }\n catch (error) {\n e = error.message;\n }\n this.assert(false, fieldName + (e ? \" - \" + e : \"\"), json);\n }\n}\nexports.ReflectionJsonReader = ReflectionJsonReader;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ReflectionJsonWriter = void 0;\nconst base64_1 = require(\"./base64\");\nconst pb_long_1 = require(\"./pb-long\");\nconst reflection_info_1 = require(\"./reflection-info\");\nconst assert_1 = require(\"./assert\");\n/**\n * Writes proto3 messages in canonical JSON format using reflection\n * information.\n *\n * https://developers.google.com/protocol-buffers/docs/proto3#json\n */\nclass ReflectionJsonWriter {\n constructor(info) {\n var _a;\n this.fields = (_a = info.fields) !== null && _a !== void 0 ? _a : [];\n }\n /**\n * Converts the message to a JSON object, based on the field descriptors.\n */\n write(message, options) {\n const json = {}, source = message;\n for (const field of this.fields) {\n // field is not part of a oneof, simply write as is\n if (!field.oneof) {\n let jsonValue = this.field(field, source[field.localName], options);\n if (jsonValue !== undefined)\n json[options.useProtoFieldName ? field.name : field.jsonName] = jsonValue;\n continue;\n }\n // field is part of a oneof\n const group = source[field.oneof];\n if (group.oneofKind !== field.localName)\n continue; // not selected, skip\n const opt = field.kind == 'scalar' || field.kind == 'enum'\n ? Object.assign(Object.assign({}, options), { emitDefaultValues: true }) : options;\n let jsonValue = this.field(field, group[field.localName], opt);\n assert_1.assert(jsonValue !== undefined);\n json[options.useProtoFieldName ? field.name : field.jsonName] = jsonValue;\n }\n return json;\n }\n field(field, value, options) {\n let jsonValue = undefined;\n if (field.kind == 'map') {\n assert_1.assert(typeof value == \"object\" && value !== null);\n const jsonObj = {};\n switch (field.V.kind) {\n case \"scalar\":\n for (const [entryKey, entryValue] of Object.entries(value)) {\n const val = this.scalar(field.V.T, entryValue, field.name, false, true);\n assert_1.assert(val !== undefined);\n jsonObj[entryKey.toString()] = val; // JSON standard allows only (double quoted) string as property key\n }\n break;\n case \"message\":\n const messageType = field.V.T();\n for (const [entryKey, entryValue] of Object.entries(value)) {\n const val = this.message(messageType, entryValue, field.name, options);\n assert_1.assert(val !== undefined);\n jsonObj[entryKey.toString()] = val; // JSON standard allows only (double quoted) string as property key\n }\n break;\n case \"enum\":\n const enumInfo = field.V.T();\n for (const [entryKey, entryValue] of Object.entries(value)) {\n assert_1.assert(entryValue === undefined || typeof entryValue == 'number');\n const val = this.enum(enumInfo, entryValue, field.name, false, true, options.enumAsInteger);\n assert_1.assert(val !== undefined);\n jsonObj[entryKey.toString()] = val; // JSON standard allows only (double quoted) string as property key\n }\n break;\n }\n if (options.emitDefaultValues || Object.keys(jsonObj).length > 0)\n jsonValue = jsonObj;\n }\n else if (field.repeat) {\n assert_1.assert(Array.isArray(value));\n const jsonArr = [];\n switch (field.kind) {\n case \"scalar\":\n for (let i = 0; i < value.length; i++) {\n const val = this.scalar(field.T, value[i], field.name, field.opt, true);\n assert_1.assert(val !== undefined);\n jsonArr.push(val);\n }\n break;\n case \"enum\":\n const enumInfo = field.T();\n for (let i = 0; i < value.length; i++) {\n assert_1.assert(value[i] === undefined || typeof value[i] == 'number');\n const val = this.enum(enumInfo, value[i], field.name, field.opt, true, options.enumAsInteger);\n assert_1.assert(val !== undefined);\n jsonArr.push(val);\n }\n break;\n case \"message\":\n const messageType = field.T();\n for (let i = 0; i < value.length; i++) {\n const val = this.message(messageType, value[i], field.name, options);\n assert_1.assert(val !== undefined);\n jsonArr.push(val);\n }\n break;\n }\n // add converted array to json output\n if (options.emitDefaultValues || jsonArr.length > 0 || options.emitDefaultValues)\n jsonValue = jsonArr;\n }\n else {\n switch (field.kind) {\n case \"scalar\":\n jsonValue = this.scalar(field.T, value, field.name, field.opt, options.emitDefaultValues);\n break;\n case \"enum\":\n jsonValue = this.enum(field.T(), value, field.name, field.opt, options.emitDefaultValues, options.enumAsInteger);\n break;\n case \"message\":\n jsonValue = this.message(field.T(), value, field.name, options);\n break;\n }\n }\n return jsonValue;\n }\n /**\n * Returns `null` as the default for google.protobuf.NullValue.\n */\n enum(type, value, fieldName, optional, emitDefaultValues, enumAsInteger) {\n if (type[0] == 'google.protobuf.NullValue')\n return !emitDefaultValues && !optional ? undefined : null;\n if (value === undefined) {\n assert_1.assert(optional);\n return undefined;\n }\n if (value === 0 && !emitDefaultValues && !optional)\n // we require 0 to be default value for all enums\n return undefined;\n assert_1.assert(typeof value == 'number');\n assert_1.assert(Number.isInteger(value));\n if (enumAsInteger || !type[1].hasOwnProperty(value))\n // if we don't now the enum value, just return the number\n return value;\n if (type[2])\n // restore the dropped prefix\n return type[2] + type[1][value];\n return type[1][value];\n }\n message(type, value, fieldName, options) {\n if (value === undefined)\n return options.emitDefaultValues ? null : undefined;\n return type.internalJsonWrite(value, options);\n }\n scalar(type, value, fieldName, optional, emitDefaultValues) {\n if (value === undefined) {\n assert_1.assert(optional);\n return undefined;\n }\n const ed = emitDefaultValues || optional;\n // noinspection FallThroughInSwitchStatementJS\n switch (type) {\n // int32, fixed32, uint32: JSON value will be a decimal number. Either numbers or strings are accepted.\n case reflection_info_1.ScalarType.INT32:\n case reflection_info_1.ScalarType.SFIXED32:\n case reflection_info_1.ScalarType.SINT32:\n if (value === 0)\n return ed ? 0 : undefined;\n assert_1.assertInt32(value);\n return value;\n case reflection_info_1.ScalarType.FIXED32:\n case reflection_info_1.ScalarType.UINT32:\n if (value === 0)\n return ed ? 0 : undefined;\n assert_1.assertUInt32(value);\n return value;\n // float, double: JSON value will be a number or one of the special string values \"NaN\", \"Infinity\", and \"-Infinity\".\n // Either numbers or strings are accepted. Exponent notation is also accepted.\n case reflection_info_1.ScalarType.FLOAT:\n assert_1.assertFloat32(value);\n case reflection_info_1.ScalarType.DOUBLE:\n if (value === 0)\n return ed ? 0 : undefined;\n assert_1.assert(typeof value == 'number');\n if (Number.isNaN(value))\n return 'NaN';\n if (value === Number.POSITIVE_INFINITY)\n return 'Infinity';\n if (value === Number.NEGATIVE_INFINITY)\n return '-Infinity';\n return value;\n // string:\n case reflection_info_1.ScalarType.STRING:\n if (value === \"\")\n return ed ? '' : undefined;\n assert_1.assert(typeof value == 'string');\n return value;\n // bool:\n case reflection_info_1.ScalarType.BOOL:\n if (value === false)\n return ed ? false : undefined;\n assert_1.assert(typeof value == 'boolean');\n return value;\n // JSON value will be a decimal string. Either numbers or strings are accepted.\n case reflection_info_1.ScalarType.UINT64:\n case reflection_info_1.ScalarType.FIXED64:\n assert_1.assert(typeof value == 'number' || typeof value == 'string' || typeof value == 'bigint');\n let ulong = pb_long_1.PbULong.from(value);\n if (ulong.isZero() && !ed)\n return undefined;\n return ulong.toString();\n // JSON value will be a decimal string. Either numbers or strings are accepted.\n case reflection_info_1.ScalarType.INT64:\n case reflection_info_1.ScalarType.SFIXED64:\n case reflection_info_1.ScalarType.SINT64:\n assert_1.assert(typeof value == 'number' || typeof value == 'string' || typeof value == 'bigint');\n let long = pb_long_1.PbLong.from(value);\n if (long.isZero() && !ed)\n return undefined;\n return long.toString();\n // bytes: JSON value will be the data encoded as a string using standard base64 encoding with paddings.\n // Either standard or URL-safe base64 encoding with/without paddings are accepted.\n case reflection_info_1.ScalarType.BYTES:\n assert_1.assert(value instanceof Uint8Array);\n if (!value.byteLength)\n return ed ? \"\" : undefined;\n return base64_1.base64encode(value);\n }\n }\n}\nexports.ReflectionJsonWriter = ReflectionJsonWriter;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.reflectionScalarDefault = void 0;\nconst reflection_info_1 = require(\"./reflection-info\");\nconst reflection_long_convert_1 = require(\"./reflection-long-convert\");\nconst pb_long_1 = require(\"./pb-long\");\n/**\n * Creates the default value for a scalar type.\n */\nfunction reflectionScalarDefault(type, longType = reflection_info_1.LongType.STRING) {\n switch (type) {\n case reflection_info_1.ScalarType.BOOL:\n return false;\n case reflection_info_1.ScalarType.UINT64:\n case reflection_info_1.ScalarType.FIXED64:\n return reflection_long_convert_1.reflectionLongConvert(pb_long_1.PbULong.ZERO, longType);\n case reflection_info_1.ScalarType.INT64:\n case reflection_info_1.ScalarType.SFIXED64:\n case reflection_info_1.ScalarType.SINT64:\n return reflection_long_convert_1.reflectionLongConvert(pb_long_1.PbLong.ZERO, longType);\n case reflection_info_1.ScalarType.DOUBLE:\n case reflection_info_1.ScalarType.FLOAT:\n return 0.0;\n case reflection_info_1.ScalarType.BYTES:\n return new Uint8Array(0);\n case reflection_info_1.ScalarType.STRING:\n return \"\";\n default:\n // case ScalarType.INT32:\n // case ScalarType.UINT32:\n // case ScalarType.SINT32:\n // case ScalarType.FIXED32:\n // case ScalarType.SFIXED32:\n return 0;\n }\n}\nexports.reflectionScalarDefault = reflectionScalarDefault;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ReflectionBinaryReader = void 0;\nconst binary_format_contract_1 = require(\"./binary-format-contract\");\nconst reflection_info_1 = require(\"./reflection-info\");\nconst reflection_long_convert_1 = require(\"./reflection-long-convert\");\nconst reflection_scalar_default_1 = require(\"./reflection-scalar-default\");\n/**\n * Reads proto3 messages in binary format using reflection information.\n *\n * https://developers.google.com/protocol-buffers/docs/encoding\n */\nclass ReflectionBinaryReader {\n constructor(info) {\n this.info = info;\n }\n prepare() {\n var _a;\n if (!this.fieldNoToField) {\n const fieldsInput = (_a = this.info.fields) !== null && _a !== void 0 ? _a : [];\n this.fieldNoToField = new Map(fieldsInput.map(field => [field.no, field]));\n }\n }\n /**\n * Reads a message from binary format into the target message.\n *\n * Repeated fields are appended. Map entries are added, overwriting\n * existing keys.\n *\n * If a message field is already present, it will be merged with the\n * new data.\n */\n read(reader, message, options, length) {\n this.prepare();\n const end = length === undefined ? reader.len : reader.pos + length;\n while (reader.pos < end) {\n // read the tag and find the field\n const [fieldNo, wireType] = reader.tag(), field = this.fieldNoToField.get(fieldNo);\n if (!field) {\n let u = options.readUnknownField;\n if (u == \"throw\")\n throw new Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.info.typeName}`);\n let d = reader.skip(wireType);\n if (u !== false)\n (u === true ? binary_format_contract_1.UnknownFieldHandler.onRead : u)(this.info.typeName, message, fieldNo, wireType, d);\n continue;\n }\n // target object for the field we are reading\n let target = message, repeated = field.repeat, localName = field.localName;\n // if field is member of oneof ADT, use ADT as target\n if (field.oneof) {\n target = target[field.oneof];\n // if other oneof member selected, set new ADT\n if (target.oneofKind !== localName)\n target = message[field.oneof] = {\n oneofKind: localName\n };\n }\n // we have handled oneof above, we just have read the value into `target[localName]`\n switch (field.kind) {\n case \"scalar\":\n case \"enum\":\n let T = field.kind == \"enum\" ? reflection_info_1.ScalarType.INT32 : field.T;\n let L = field.kind == \"scalar\" ? field.L : undefined;\n if (repeated) {\n let arr = target[localName]; // safe to assume presence of array, oneof cannot contain repeated values\n if (wireType == binary_format_contract_1.WireType.LengthDelimited && T != reflection_info_1.ScalarType.STRING && T != reflection_info_1.ScalarType.BYTES) {\n let e = reader.uint32() + reader.pos;\n while (reader.pos < e)\n arr.push(this.scalar(reader, T, L));\n }\n else\n arr.push(this.scalar(reader, T, L));\n }\n else\n target[localName] = this.scalar(reader, T, L);\n break;\n case \"message\":\n if (repeated) {\n let arr = target[localName]; // safe to assume presence of array, oneof cannot contain repeated values\n let msg = field.T().internalBinaryRead(reader, reader.uint32(), options);\n arr.push(msg);\n }\n else\n target[localName] = field.T().internalBinaryRead(reader, reader.uint32(), options, target[localName]);\n break;\n case \"map\":\n let [mapKey, mapVal] = this.mapEntry(field, reader, options);\n // safe to assume presence of map object, oneof cannot contain repeated values\n target[localName][mapKey] = mapVal;\n break;\n }\n }\n }\n /**\n * Read a map field, expecting key field = 1, value field = 2\n */\n mapEntry(field, reader, options) {\n let length = reader.uint32();\n let end = reader.pos + length;\n let key = undefined; // javascript only allows number or string for object properties\n let val = undefined;\n while (reader.pos < end) {\n let [fieldNo, wireType] = reader.tag();\n switch (fieldNo) {\n case 1:\n if (field.K == reflection_info_1.ScalarType.BOOL)\n key = reader.bool().toString();\n else\n // long types are read as string, number types are okay as number\n key = this.scalar(reader, field.K, reflection_info_1.LongType.STRING);\n break;\n case 2:\n switch (field.V.kind) {\n case \"scalar\":\n val = this.scalar(reader, field.V.T, field.V.L);\n break;\n case \"enum\":\n val = reader.int32();\n break;\n case \"message\":\n val = field.V.T().internalBinaryRead(reader, reader.uint32(), options);\n break;\n }\n break;\n default:\n throw new Error(`Unknown field ${fieldNo} (wire type ${wireType}) in map entry for ${this.info.typeName}#${field.name}`);\n }\n }\n if (key === undefined) {\n let keyRaw = reflection_scalar_default_1.reflectionScalarDefault(field.K);\n key = field.K == reflection_info_1.ScalarType.BOOL ? keyRaw.toString() : keyRaw;\n }\n if (val === undefined)\n switch (field.V.kind) {\n case \"scalar\":\n val = reflection_scalar_default_1.reflectionScalarDefault(field.V.T, field.V.L);\n break;\n case \"enum\":\n val = 0;\n break;\n case \"message\":\n val = field.V.T().create();\n break;\n }\n return [key, val];\n }\n scalar(reader, type, longType) {\n switch (type) {\n case reflection_info_1.ScalarType.INT32:\n return reader.int32();\n case reflection_info_1.ScalarType.STRING:\n return reader.string();\n case reflection_info_1.ScalarType.BOOL:\n return reader.bool();\n case reflection_info_1.ScalarType.DOUBLE:\n return reader.double();\n case reflection_info_1.ScalarType.FLOAT:\n return reader.float();\n case reflection_info_1.ScalarType.INT64:\n return reflection_long_convert_1.reflectionLongConvert(reader.int64(), longType);\n case reflection_info_1.ScalarType.UINT64:\n return reflection_long_convert_1.reflectionLongConvert(reader.uint64(), longType);\n case reflection_info_1.ScalarType.FIXED64:\n return reflection_long_convert_1.reflectionLongConvert(reader.fixed64(), longType);\n case reflection_info_1.ScalarType.FIXED32:\n return reader.fixed32();\n case reflection_info_1.ScalarType.BYTES:\n return reader.bytes();\n case reflection_info_1.ScalarType.UINT32:\n return reader.uint32();\n case reflection_info_1.ScalarType.SFIXED32:\n return reader.sfixed32();\n case reflection_info_1.ScalarType.SFIXED64:\n return reflection_long_convert_1.reflectionLongConvert(reader.sfixed64(), longType);\n case reflection_info_1.ScalarType.SINT32:\n return reader.sint32();\n case reflection_info_1.ScalarType.SINT64:\n return reflection_long_convert_1.reflectionLongConvert(reader.sint64(), longType);\n }\n }\n}\nexports.ReflectionBinaryReader = ReflectionBinaryReader;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ReflectionBinaryWriter = void 0;\nconst binary_format_contract_1 = require(\"./binary-format-contract\");\nconst reflection_info_1 = require(\"./reflection-info\");\nconst assert_1 = require(\"./assert\");\nconst pb_long_1 = require(\"./pb-long\");\n/**\n * Writes proto3 messages in binary format using reflection information.\n *\n * https://developers.google.com/protocol-buffers/docs/encoding\n */\nclass ReflectionBinaryWriter {\n constructor(info) {\n this.info = info;\n }\n prepare() {\n if (!this.fields) {\n const fieldsInput = this.info.fields ? this.info.fields.concat() : [];\n this.fields = fieldsInput.sort((a, b) => a.no - b.no);\n }\n }\n /**\n * Writes the message to binary format.\n */\n write(message, writer, options) {\n this.prepare();\n for (const field of this.fields) {\n let value, // this will be our field value, whether it is member of a oneof or not\n emitDefault, // whether we emit the default value (only true for oneof members)\n repeated = field.repeat, localName = field.localName;\n // handle oneof ADT\n if (field.oneof) {\n const group = message[field.oneof];\n if (group.oneofKind !== localName)\n continue; // if field is not selected, skip\n value = group[localName];\n emitDefault = true;\n }\n else {\n value = message[localName];\n emitDefault = false;\n }\n // we have handled oneof above. we just have to honor `emitDefault`.\n switch (field.kind) {\n case \"scalar\":\n case \"enum\":\n let T = field.kind == \"enum\" ? reflection_info_1.ScalarType.INT32 : field.T;\n if (repeated) {\n assert_1.assert(Array.isArray(value));\n if (repeated == reflection_info_1.RepeatType.PACKED)\n this.packed(writer, T, field.no, value);\n else\n for (const item of value)\n this.scalar(writer, T, field.no, item, true);\n }\n else if (value === undefined)\n assert_1.assert(field.opt);\n else\n this.scalar(writer, T, field.no, value, emitDefault || field.opt);\n break;\n case \"message\":\n if (repeated) {\n assert_1.assert(Array.isArray(value));\n for (const item of value)\n this.message(writer, options, field.T(), field.no, item);\n }\n else {\n this.message(writer, options, field.T(), field.no, value);\n }\n break;\n case \"map\":\n assert_1.assert(typeof value == 'object' && value !== null);\n for (const [key, val] of Object.entries(value))\n this.mapEntry(writer, options, field, key, val);\n break;\n }\n }\n let u = options.writeUnknownFields;\n if (u !== false)\n (u === true ? binary_format_contract_1.UnknownFieldHandler.onWrite : u)(this.info.typeName, message, writer);\n }\n mapEntry(writer, options, field, key, value) {\n writer.tag(field.no, binary_format_contract_1.WireType.LengthDelimited);\n writer.fork();\n // javascript only allows number or string for object properties\n // we convert from our representation to the protobuf type\n let keyValue = key;\n switch (field.K) {\n case reflection_info_1.ScalarType.INT32:\n case reflection_info_1.ScalarType.FIXED32:\n case reflection_info_1.ScalarType.UINT32:\n case reflection_info_1.ScalarType.SFIXED32:\n case reflection_info_1.ScalarType.SINT32:\n keyValue = Number.parseInt(key);\n break;\n case reflection_info_1.ScalarType.BOOL:\n assert_1.assert(key == 'true' || key == 'false');\n keyValue = key == 'true';\n break;\n }\n // write key, expecting key field number = 1\n this.scalar(writer, field.K, 1, keyValue, true);\n // write value, expecting value field number = 2\n switch (field.V.kind) {\n case 'scalar':\n this.scalar(writer, field.V.T, 2, value, true);\n break;\n case 'enum':\n this.scalar(writer, reflection_info_1.ScalarType.INT32, 2, value, true);\n break;\n case 'message':\n this.message(writer, options, field.V.T(), 2, value);\n break;\n }\n writer.join();\n }\n message(writer, options, handler, fieldNo, value) {\n if (value === undefined)\n return;\n handler.internalBinaryWrite(value, writer.tag(fieldNo, binary_format_contract_1.WireType.LengthDelimited).fork(), options);\n writer.join();\n }\n /**\n * Write a single scalar value.\n */\n scalar(writer, type, fieldNo, value, emitDefault) {\n let [wireType, method, isDefault] = this.scalarInfo(type, value);\n if (!isDefault || emitDefault) {\n writer.tag(fieldNo, wireType);\n writer[method](value);\n }\n }\n /**\n * Write an array of scalar values in packed format.\n */\n packed(writer, type, fieldNo, value) {\n if (!value.length)\n return;\n assert_1.assert(type !== reflection_info_1.ScalarType.BYTES && type !== reflection_info_1.ScalarType.STRING);\n // write tag\n writer.tag(fieldNo, binary_format_contract_1.WireType.LengthDelimited);\n // begin length-delimited\n writer.fork();\n // write values without tags\n let [, method,] = this.scalarInfo(type);\n for (let i = 0; i < value.length; i++)\n writer[method](value[i]);\n // end length delimited\n writer.join();\n }\n /**\n * Get information for writing a scalar value.\n *\n * Returns tuple:\n * [0]: appropriate WireType\n * [1]: name of the appropriate method of IBinaryWriter\n * [2]: whether the given value is a default value\n *\n * If argument `value` is omitted, [2] is always false.\n */\n scalarInfo(type, value) {\n let t = binary_format_contract_1.WireType.Varint;\n let m;\n let i = value === undefined;\n let d = value === 0;\n switch (type) {\n case reflection_info_1.ScalarType.INT32:\n m = \"int32\";\n break;\n case reflection_info_1.ScalarType.STRING:\n d = i || !value.length;\n t = binary_format_contract_1.WireType.LengthDelimited;\n m = \"string\";\n break;\n case reflection_info_1.ScalarType.BOOL:\n d = value === false;\n m = \"bool\";\n break;\n case reflection_info_1.ScalarType.UINT32:\n m = \"uint32\";\n break;\n case reflection_info_1.ScalarType.DOUBLE:\n t = binary_format_contract_1.WireType.Bit64;\n m = \"double\";\n break;\n case reflection_info_1.ScalarType.FLOAT:\n t = binary_format_contract_1.WireType.Bit32;\n m = \"float\";\n break;\n case reflection_info_1.ScalarType.INT64:\n d = i || pb_long_1.PbLong.from(value).isZero();\n m = \"int64\";\n break;\n case reflection_info_1.ScalarType.UINT64:\n d = i || pb_long_1.PbULong.from(value).isZero();\n m = \"uint64\";\n break;\n case reflection_info_1.ScalarType.FIXED64:\n d = i || pb_long_1.PbULong.from(value).isZero();\n t = binary_format_contract_1.WireType.Bit64;\n m = \"fixed64\";\n break;\n case reflection_info_1.ScalarType.BYTES:\n d = i || !value.byteLength;\n t = binary_format_contract_1.WireType.LengthDelimited;\n m = \"bytes\";\n break;\n case reflection_info_1.ScalarType.FIXED32:\n t = binary_format_contract_1.WireType.Bit32;\n m = \"fixed32\";\n break;\n case reflection_info_1.ScalarType.SFIXED32:\n t = binary_format_contract_1.WireType.Bit32;\n m = \"sfixed32\";\n break;\n case reflection_info_1.ScalarType.SFIXED64:\n d = i || pb_long_1.PbLong.from(value).isZero();\n t = binary_format_contract_1.WireType.Bit64;\n m = \"sfixed64\";\n break;\n case reflection_info_1.ScalarType.SINT32:\n m = \"sint32\";\n break;\n case reflection_info_1.ScalarType.SINT64:\n d = i || pb_long_1.PbLong.from(value).isZero();\n m = \"sint64\";\n break;\n }\n return [t, m, i || d];\n }\n}\nexports.ReflectionBinaryWriter = ReflectionBinaryWriter;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.reflectionCreate = void 0;\nconst reflection_scalar_default_1 = require(\"./reflection-scalar-default\");\nconst message_type_contract_1 = require(\"./message-type-contract\");\n/**\n * Creates an instance of the generic message, using the field\n * information.\n */\nfunction reflectionCreate(type) {\n /**\n * This ternary can be removed in the next major version.\n * The `Object.create()` code path utilizes a new `messagePrototype`\n * property on the `IMessageType` which has this same `MESSAGE_TYPE`\n * non-enumerable property on it. Doing it this way means that we only\n * pay the cost of `Object.defineProperty()` once per `IMessageType`\n * class of once per \"instance\". The falsy code path is only provided\n * for backwards compatibility in cases where the runtime library is\n * updated without also updating the generated code.\n */\n const msg = type.messagePrototype\n ? Object.create(type.messagePrototype)\n : Object.defineProperty({}, message_type_contract_1.MESSAGE_TYPE, { value: type });\n for (let field of type.fields) {\n let name = field.localName;\n if (field.opt)\n continue;\n if (field.oneof)\n msg[field.oneof] = { oneofKind: undefined };\n else if (field.repeat)\n msg[name] = [];\n else\n switch (field.kind) {\n case \"scalar\":\n msg[name] = reflection_scalar_default_1.reflectionScalarDefault(field.T, field.L);\n break;\n case \"enum\":\n // we require 0 to be default value for all enums\n msg[name] = 0;\n break;\n case \"map\":\n msg[name] = {};\n break;\n }\n }\n return msg;\n}\nexports.reflectionCreate = reflectionCreate;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.reflectionMergePartial = void 0;\n/**\n * Copy partial data into the target message.\n *\n * If a singular scalar or enum field is present in the source, it\n * replaces the field in the target.\n *\n * If a singular message field is present in the source, it is merged\n * with the target field by calling mergePartial() of the responsible\n * message type.\n *\n * If a repeated field is present in the source, its values replace\n * all values in the target array, removing extraneous values.\n * Repeated message fields are copied, not merged.\n *\n * If a map field is present in the source, entries are added to the\n * target map, replacing entries with the same key. Entries that only\n * exist in the target remain. Entries with message values are copied,\n * not merged.\n *\n * Note that this function differs from protobuf merge semantics,\n * which appends repeated fields.\n */\nfunction reflectionMergePartial(info, target, source) {\n let fieldValue, // the field value we are working with\n input = source, output; // where we want our field value to go\n for (let field of info.fields) {\n let name = field.localName;\n if (field.oneof) {\n const group = input[field.oneof]; // this is the oneof`s group in the source\n if ((group === null || group === void 0 ? void 0 : group.oneofKind) == undefined) { // the user is free to omit\n continue; // we skip this field, and all other members too\n }\n fieldValue = group[name]; // our value comes from the the oneof group of the source\n output = target[field.oneof]; // and our output is the oneof group of the target\n output.oneofKind = group.oneofKind; // always update discriminator\n if (fieldValue == undefined) {\n delete output[name]; // remove any existing value\n continue; // skip further work on field\n }\n }\n else {\n fieldValue = input[name]; // we are using the source directly\n output = target; // we want our field value to go directly into the target\n if (fieldValue == undefined) {\n continue; // skip further work on field, existing value is used as is\n }\n }\n if (field.repeat)\n output[name].length = fieldValue.length; // resize target array to match source array\n // now we just work with `fieldValue` and `output` to merge the value\n switch (field.kind) {\n case \"scalar\":\n case \"enum\":\n if (field.repeat)\n for (let i = 0; i < fieldValue.length; i++)\n output[name][i] = fieldValue[i]; // not a reference type\n else\n output[name] = fieldValue; // not a reference type\n break;\n case \"message\":\n let T = field.T();\n if (field.repeat)\n for (let i = 0; i < fieldValue.length; i++)\n output[name][i] = T.create(fieldValue[i]);\n else if (output[name] === undefined)\n output[name] = T.create(fieldValue); // nothing to merge with\n else\n T.mergePartial(output[name], fieldValue);\n break;\n case \"map\":\n // Map and repeated fields are simply overwritten, not appended or merged\n switch (field.V.kind) {\n case \"scalar\":\n case \"enum\":\n Object.assign(output[name], fieldValue); // elements are not reference types\n break;\n case \"message\":\n let T = field.V.T();\n for (let k of Object.keys(fieldValue))\n output[name][k] = T.create(fieldValue[k]);\n break;\n }\n break;\n }\n }\n}\nexports.reflectionMergePartial = reflectionMergePartial;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.reflectionEquals = void 0;\nconst reflection_info_1 = require(\"./reflection-info\");\n/**\n * Determines whether two message of the same type have the same field values.\n * Checks for deep equality, traversing repeated fields, oneof groups, maps\n * and messages recursively.\n * Will also return true if both messages are `undefined`.\n */\nfunction reflectionEquals(info, a, b) {\n if (a === b)\n return true;\n if (!a || !b)\n return false;\n for (let field of info.fields) {\n let localName = field.localName;\n let val_a = field.oneof ? a[field.oneof][localName] : a[localName];\n let val_b = field.oneof ? b[field.oneof][localName] : b[localName];\n switch (field.kind) {\n case \"enum\":\n case \"scalar\":\n let t = field.kind == \"enum\" ? reflection_info_1.ScalarType.INT32 : field.T;\n if (!(field.repeat\n ? repeatedPrimitiveEq(t, val_a, val_b)\n : primitiveEq(t, val_a, val_b)))\n return false;\n break;\n case \"map\":\n if (!(field.V.kind == \"message\"\n ? repeatedMsgEq(field.V.T(), objectValues(val_a), objectValues(val_b))\n : repeatedPrimitiveEq(field.V.kind == \"enum\" ? reflection_info_1.ScalarType.INT32 : field.V.T, objectValues(val_a), objectValues(val_b))))\n return false;\n break;\n case \"message\":\n let T = field.T();\n if (!(field.repeat\n ? repeatedMsgEq(T, val_a, val_b)\n : T.equals(val_a, val_b)))\n return false;\n break;\n }\n }\n return true;\n}\nexports.reflectionEquals = reflectionEquals;\nconst objectValues = Object.values;\nfunction primitiveEq(type, a, b) {\n if (a === b)\n return true;\n if (type !== reflection_info_1.ScalarType.BYTES)\n return false;\n let ba = a;\n let bb = b;\n if (ba.length !== bb.length)\n return false;\n for (let i = 0; i < ba.length; i++)\n if (ba[i] != bb[i])\n return false;\n return true;\n}\nfunction repeatedPrimitiveEq(type, a, b) {\n if (a.length !== b.length)\n return false;\n for (let i = 0; i < a.length; i++)\n if (!primitiveEq(type, a[i], b[i]))\n return false;\n return true;\n}\nfunction repeatedMsgEq(type, a, b) {\n if (a.length !== b.length)\n return false;\n for (let i = 0; i < a.length; i++)\n if (!type.equals(a[i], b[i]))\n return false;\n return true;\n}\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MessageType = void 0;\nconst message_type_contract_1 = require(\"./message-type-contract\");\nconst reflection_info_1 = require(\"./reflection-info\");\nconst reflection_type_check_1 = require(\"./reflection-type-check\");\nconst reflection_json_reader_1 = require(\"./reflection-json-reader\");\nconst reflection_json_writer_1 = require(\"./reflection-json-writer\");\nconst reflection_binary_reader_1 = require(\"./reflection-binary-reader\");\nconst reflection_binary_writer_1 = require(\"./reflection-binary-writer\");\nconst reflection_create_1 = require(\"./reflection-create\");\nconst reflection_merge_partial_1 = require(\"./reflection-merge-partial\");\nconst json_typings_1 = require(\"./json-typings\");\nconst json_format_contract_1 = require(\"./json-format-contract\");\nconst reflection_equals_1 = require(\"./reflection-equals\");\nconst binary_writer_1 = require(\"./binary-writer\");\nconst binary_reader_1 = require(\"./binary-reader\");\nconst baseDescriptors = Object.getOwnPropertyDescriptors(Object.getPrototypeOf({}));\n/**\n * This standard message type provides reflection-based\n * operations to work with a message.\n */\nclass MessageType {\n constructor(name, fields, options) {\n this.defaultCheckDepth = 16;\n this.typeName = name;\n this.fields = fields.map(reflection_info_1.normalizeFieldInfo);\n this.options = options !== null && options !== void 0 ? options : {};\n this.messagePrototype = Object.create(null, Object.assign(Object.assign({}, baseDescriptors), { [message_type_contract_1.MESSAGE_TYPE]: { value: this } }));\n this.refTypeCheck = new reflection_type_check_1.ReflectionTypeCheck(this);\n this.refJsonReader = new reflection_json_reader_1.ReflectionJsonReader(this);\n this.refJsonWriter = new reflection_json_writer_1.ReflectionJsonWriter(this);\n this.refBinReader = new reflection_binary_reader_1.ReflectionBinaryReader(this);\n this.refBinWriter = new reflection_binary_writer_1.ReflectionBinaryWriter(this);\n }\n create(value) {\n let message = reflection_create_1.reflectionCreate(this);\n if (value !== undefined) {\n reflection_merge_partial_1.reflectionMergePartial(this, message, value);\n }\n return message;\n }\n /**\n * Clone the message.\n *\n * Unknown fields are discarded.\n */\n clone(message) {\n let copy = this.create();\n reflection_merge_partial_1.reflectionMergePartial(this, copy, message);\n return copy;\n }\n /**\n * Determines whether two message of the same type have the same field values.\n * Checks for deep equality, traversing repeated fields, oneof groups, maps\n * and messages recursively.\n * Will also return true if both messages are `undefined`.\n */\n equals(a, b) {\n return reflection_equals_1.reflectionEquals(this, a, b);\n }\n /**\n * Is the given value assignable to our message type\n * and contains no [excess properties](https://www.typescriptlang.org/docs/handbook/interfaces.html#excess-property-checks)?\n */\n is(arg, depth = this.defaultCheckDepth) {\n return this.refTypeCheck.is(arg, depth, false);\n }\n /**\n * Is the given value assignable to our message type,\n * regardless of [excess properties](https://www.typescriptlang.org/docs/handbook/interfaces.html#excess-property-checks)?\n */\n isAssignable(arg, depth = this.defaultCheckDepth) {\n return this.refTypeCheck.is(arg, depth, true);\n }\n /**\n * Copy partial data into the target message.\n */\n mergePartial(target, source) {\n reflection_merge_partial_1.reflectionMergePartial(this, target, source);\n }\n /**\n * Create a new message from binary format.\n */\n fromBinary(data, options) {\n let opt = binary_reader_1.binaryReadOptions(options);\n return this.internalBinaryRead(opt.readerFactory(data), data.byteLength, opt);\n }\n /**\n * Read a new message from a JSON value.\n */\n fromJson(json, options) {\n return this.internalJsonRead(json, json_format_contract_1.jsonReadOptions(options));\n }\n /**\n * Read a new message from a JSON string.\n * This is equivalent to `T.fromJson(JSON.parse(json))`.\n */\n fromJsonString(json, options) {\n let value = JSON.parse(json);\n return this.fromJson(value, options);\n }\n /**\n * Write the message to canonical JSON value.\n */\n toJson(message, options) {\n return this.internalJsonWrite(message, json_format_contract_1.jsonWriteOptions(options));\n }\n /**\n * Convert the message to canonical JSON string.\n * This is equivalent to `JSON.stringify(T.toJson(t))`\n */\n toJsonString(message, options) {\n var _a;\n let value = this.toJson(message, options);\n return JSON.stringify(value, null, (_a = options === null || options === void 0 ? void 0 : options.prettySpaces) !== null && _a !== void 0 ? _a : 0);\n }\n /**\n * Write the message to binary format.\n */\n toBinary(message, options) {\n let opt = binary_writer_1.binaryWriteOptions(options);\n return this.internalBinaryWrite(message, opt.writerFactory(), opt).finish();\n }\n /**\n * This is an internal method. If you just want to read a message from\n * JSON, use `fromJson()` or `fromJsonString()`.\n *\n * Reads JSON value and merges the fields into the target\n * according to protobuf rules. If the target is omitted,\n * a new instance is created first.\n */\n internalJsonRead(json, options, target) {\n if (json !== null && typeof json == \"object\" && !Array.isArray(json)) {\n let message = target !== null && target !== void 0 ? target : this.create();\n this.refJsonReader.read(json, message, options);\n return message;\n }\n throw new Error(`Unable to parse message ${this.typeName} from JSON ${json_typings_1.typeofJsonValue(json)}.`);\n }\n /**\n * This is an internal method. If you just want to write a message\n * to JSON, use `toJson()` or `toJsonString().\n *\n * Writes JSON value and returns it.\n */\n internalJsonWrite(message, options) {\n return this.refJsonWriter.write(message, options);\n }\n /**\n * This is an internal method. If you just want to write a message\n * in binary format, use `toBinary()`.\n *\n * Serializes the message in binary format and appends it to the given\n * writer. Returns passed writer.\n */\n internalBinaryWrite(message, writer, options) {\n this.refBinWriter.write(message, writer, options);\n return writer;\n }\n /**\n * This is an internal method. If you just want to read a message from\n * binary data, use `fromBinary()`.\n *\n * Reads data from binary format and merges the fields into\n * the target according to protobuf rules. If the target is\n * omitted, a new instance is created first.\n */\n internalBinaryRead(reader, length, options, target) {\n let message = target !== null && target !== void 0 ? target : this.create();\n this.refBinReader.read(reader, message, options, length);\n return message;\n }\n}\nexports.MessageType = MessageType;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.containsMessageType = void 0;\nconst message_type_contract_1 = require(\"./message-type-contract\");\n/**\n * Check if the provided object is a proto message.\n *\n * Note that this is an experimental feature - it is here to stay, but\n * implementation details may change without notice.\n */\nfunction containsMessageType(msg) {\n return msg[message_type_contract_1.MESSAGE_TYPE] != null;\n}\nexports.containsMessageType = containsMessageType;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.listEnumNumbers = exports.listEnumNames = exports.listEnumValues = exports.isEnumObject = void 0;\n/**\n * Is this a lookup object generated by Typescript, for a Typescript enum\n * generated by protobuf-ts?\n *\n * - No `const enum` (enum must not be inlined, we need reverse mapping).\n * - No string enum (we need int32 for protobuf).\n * - Must have a value for 0 (otherwise, we would need to support custom default values).\n */\nfunction isEnumObject(arg) {\n if (typeof arg != 'object' || arg === null) {\n return false;\n }\n if (!arg.hasOwnProperty(0)) {\n return false;\n }\n for (let k of Object.keys(arg)) {\n let num = parseInt(k);\n if (!Number.isNaN(num)) {\n // is there a name for the number?\n let nam = arg[num];\n if (nam === undefined)\n return false;\n // does the name resolve back to the number?\n if (arg[nam] !== num)\n return false;\n }\n else {\n // is there a number for the name?\n let num = arg[k];\n if (num === undefined)\n return false;\n // is it a string enum?\n if (typeof num !== 'number')\n return false;\n // do we know the number?\n if (arg[num] === undefined)\n return false;\n }\n }\n return true;\n}\nexports.isEnumObject = isEnumObject;\n/**\n * Lists all values of a Typescript enum, as an array of objects with a \"name\"\n * property and a \"number\" property.\n *\n * Note that it is possible that a number appears more than once, because it is\n * possible to have aliases in an enum.\n *\n * Throws if the enum does not adhere to the rules of enums generated by\n * protobuf-ts. See `isEnumObject()`.\n */\nfunction listEnumValues(enumObject) {\n if (!isEnumObject(enumObject))\n throw new Error(\"not a typescript enum object\");\n let values = [];\n for (let [name, number] of Object.entries(enumObject))\n if (typeof number == \"number\")\n values.push({ name, number });\n return values;\n}\nexports.listEnumValues = listEnumValues;\n/**\n * Lists the names of a Typescript enum.\n *\n * Throws if the enum does not adhere to the rules of enums generated by\n * protobuf-ts. See `isEnumObject()`.\n */\nfunction listEnumNames(enumObject) {\n return listEnumValues(enumObject).map(val => val.name);\n}\nexports.listEnumNames = listEnumNames;\n/**\n * Lists the numbers of a Typescript enum.\n *\n * Throws if the enum does not adhere to the rules of enums generated by\n * protobuf-ts. See `isEnumObject()`.\n */\nfunction listEnumNumbers(enumObject) {\n return listEnumValues(enumObject)\n .map(val => val.number)\n .filter((num, index, arr) => arr.indexOf(num) == index);\n}\nexports.listEnumNumbers = listEnumNumbers;\n", "\"use strict\";\n// Public API of the protobuf-ts runtime.\n// Note: we do not use `export * from ...` to help tree shakers,\n// webpack verbose output hints that this should be useful\nObject.defineProperty(exports, \"__esModule\", { value: true });\n// Convenience JSON typings and corresponding type guards\nvar json_typings_1 = require(\"./json-typings\");\nObject.defineProperty(exports, \"typeofJsonValue\", { enumerable: true, get: function () { return json_typings_1.typeofJsonValue; } });\nObject.defineProperty(exports, \"isJsonObject\", { enumerable: true, get: function () { return json_typings_1.isJsonObject; } });\n// Base 64 encoding\nvar base64_1 = require(\"./base64\");\nObject.defineProperty(exports, \"base64decode\", { enumerable: true, get: function () { return base64_1.base64decode; } });\nObject.defineProperty(exports, \"base64encode\", { enumerable: true, get: function () { return base64_1.base64encode; } });\n// UTF8 encoding\nvar protobufjs_utf8_1 = require(\"./protobufjs-utf8\");\nObject.defineProperty(exports, \"utf8read\", { enumerable: true, get: function () { return protobufjs_utf8_1.utf8read; } });\n// Binary format contracts, options for reading and writing, for example\nvar binary_format_contract_1 = require(\"./binary-format-contract\");\nObject.defineProperty(exports, \"WireType\", { enumerable: true, get: function () { return binary_format_contract_1.WireType; } });\nObject.defineProperty(exports, \"mergeBinaryOptions\", { enumerable: true, get: function () { return binary_format_contract_1.mergeBinaryOptions; } });\nObject.defineProperty(exports, \"UnknownFieldHandler\", { enumerable: true, get: function () { return binary_format_contract_1.UnknownFieldHandler; } });\n// Standard IBinaryReader implementation\nvar binary_reader_1 = require(\"./binary-reader\");\nObject.defineProperty(exports, \"BinaryReader\", { enumerable: true, get: function () { return binary_reader_1.BinaryReader; } });\nObject.defineProperty(exports, \"binaryReadOptions\", { enumerable: true, get: function () { return binary_reader_1.binaryReadOptions; } });\n// Standard IBinaryWriter implementation\nvar binary_writer_1 = require(\"./binary-writer\");\nObject.defineProperty(exports, \"BinaryWriter\", { enumerable: true, get: function () { return binary_writer_1.BinaryWriter; } });\nObject.defineProperty(exports, \"binaryWriteOptions\", { enumerable: true, get: function () { return binary_writer_1.binaryWriteOptions; } });\n// Int64 and UInt64 implementations required for the binary format\nvar pb_long_1 = require(\"./pb-long\");\nObject.defineProperty(exports, \"PbLong\", { enumerable: true, get: function () { return pb_long_1.PbLong; } });\nObject.defineProperty(exports, \"PbULong\", { enumerable: true, get: function () { return pb_long_1.PbULong; } });\n// JSON format contracts, options for reading and writing, for example\nvar json_format_contract_1 = require(\"./json-format-contract\");\nObject.defineProperty(exports, \"jsonReadOptions\", { enumerable: true, get: function () { return json_format_contract_1.jsonReadOptions; } });\nObject.defineProperty(exports, \"jsonWriteOptions\", { enumerable: true, get: function () { return json_format_contract_1.jsonWriteOptions; } });\nObject.defineProperty(exports, \"mergeJsonOptions\", { enumerable: true, get: function () { return json_format_contract_1.mergeJsonOptions; } });\n// Message type contract\nvar message_type_contract_1 = require(\"./message-type-contract\");\nObject.defineProperty(exports, \"MESSAGE_TYPE\", { enumerable: true, get: function () { return message_type_contract_1.MESSAGE_TYPE; } });\n// Message type implementation via reflection\nvar message_type_1 = require(\"./message-type\");\nObject.defineProperty(exports, \"MessageType\", { enumerable: true, get: function () { return message_type_1.MessageType; } });\n// Reflection info, generated by the plugin, exposed to the user, used by reflection ops\nvar reflection_info_1 = require(\"./reflection-info\");\nObject.defineProperty(exports, \"ScalarType\", { enumerable: true, get: function () { return reflection_info_1.ScalarType; } });\nObject.defineProperty(exports, \"LongType\", { enumerable: true, get: function () { return reflection_info_1.LongType; } });\nObject.defineProperty(exports, \"RepeatType\", { enumerable: true, get: function () { return reflection_info_1.RepeatType; } });\nObject.defineProperty(exports, \"normalizeFieldInfo\", { enumerable: true, get: function () { return reflection_info_1.normalizeFieldInfo; } });\nObject.defineProperty(exports, \"readFieldOptions\", { enumerable: true, get: function () { return reflection_info_1.readFieldOptions; } });\nObject.defineProperty(exports, \"readFieldOption\", { enumerable: true, get: function () { return reflection_info_1.readFieldOption; } });\nObject.defineProperty(exports, \"readMessageOption\", { enumerable: true, get: function () { return reflection_info_1.readMessageOption; } });\n// Message operations via reflection\nvar reflection_type_check_1 = require(\"./reflection-type-check\");\nObject.defineProperty(exports, \"ReflectionTypeCheck\", { enumerable: true, get: function () { return reflection_type_check_1.ReflectionTypeCheck; } });\nvar reflection_create_1 = require(\"./reflection-create\");\nObject.defineProperty(exports, \"reflectionCreate\", { enumerable: true, get: function () { return reflection_create_1.reflectionCreate; } });\nvar reflection_scalar_default_1 = require(\"./reflection-scalar-default\");\nObject.defineProperty(exports, \"reflectionScalarDefault\", { enumerable: true, get: function () { return reflection_scalar_default_1.reflectionScalarDefault; } });\nvar reflection_merge_partial_1 = require(\"./reflection-merge-partial\");\nObject.defineProperty(exports, \"reflectionMergePartial\", { enumerable: true, get: function () { return reflection_merge_partial_1.reflectionMergePartial; } });\nvar reflection_equals_1 = require(\"./reflection-equals\");\nObject.defineProperty(exports, \"reflectionEquals\", { enumerable: true, get: function () { return reflection_equals_1.reflectionEquals; } });\nvar reflection_binary_reader_1 = require(\"./reflection-binary-reader\");\nObject.defineProperty(exports, \"ReflectionBinaryReader\", { enumerable: true, get: function () { return reflection_binary_reader_1.ReflectionBinaryReader; } });\nvar reflection_binary_writer_1 = require(\"./reflection-binary-writer\");\nObject.defineProperty(exports, \"ReflectionBinaryWriter\", { enumerable: true, get: function () { return reflection_binary_writer_1.ReflectionBinaryWriter; } });\nvar reflection_json_reader_1 = require(\"./reflection-json-reader\");\nObject.defineProperty(exports, \"ReflectionJsonReader\", { enumerable: true, get: function () { return reflection_json_reader_1.ReflectionJsonReader; } });\nvar reflection_json_writer_1 = require(\"./reflection-json-writer\");\nObject.defineProperty(exports, \"ReflectionJsonWriter\", { enumerable: true, get: function () { return reflection_json_writer_1.ReflectionJsonWriter; } });\nvar reflection_contains_message_type_1 = require(\"./reflection-contains-message-type\");\nObject.defineProperty(exports, \"containsMessageType\", { enumerable: true, get: function () { return reflection_contains_message_type_1.containsMessageType; } });\n// Oneof helpers\nvar oneof_1 = require(\"./oneof\");\nObject.defineProperty(exports, \"isOneofGroup\", { enumerable: true, get: function () { return oneof_1.isOneofGroup; } });\nObject.defineProperty(exports, \"setOneofValue\", { enumerable: true, get: function () { return oneof_1.setOneofValue; } });\nObject.defineProperty(exports, \"getOneofValue\", { enumerable: true, get: function () { return oneof_1.getOneofValue; } });\nObject.defineProperty(exports, \"clearOneofValue\", { enumerable: true, get: function () { return oneof_1.clearOneofValue; } });\nObject.defineProperty(exports, \"getSelectedOneofValue\", { enumerable: true, get: function () { return oneof_1.getSelectedOneofValue; } });\n// Enum object type guard and reflection util, may be interesting to the user.\nvar enum_object_1 = require(\"./enum-object\");\nObject.defineProperty(exports, \"listEnumValues\", { enumerable: true, get: function () { return enum_object_1.listEnumValues; } });\nObject.defineProperty(exports, \"listEnumNames\", { enumerable: true, get: function () { return enum_object_1.listEnumNames; } });\nObject.defineProperty(exports, \"listEnumNumbers\", { enumerable: true, get: function () { return enum_object_1.listEnumNumbers; } });\nObject.defineProperty(exports, \"isEnumObject\", { enumerable: true, get: function () { return enum_object_1.isEnumObject; } });\n// lowerCamelCase() is exported for plugin, rpc-runtime and other rpc packages\nvar lower_camel_case_1 = require(\"./lower-camel-case\");\nObject.defineProperty(exports, \"lowerCamelCase\", { enumerable: true, get: function () { return lower_camel_case_1.lowerCamelCase; } });\n// assertion functions are exported for plugin, may also be useful to user\nvar assert_1 = require(\"./assert\");\nObject.defineProperty(exports, \"assert\", { enumerable: true, get: function () { return assert_1.assert; } });\nObject.defineProperty(exports, \"assertNever\", { enumerable: true, get: function () { return assert_1.assertNever; } });\nObject.defineProperty(exports, \"assertInt32\", { enumerable: true, get: function () { return assert_1.assertInt32; } });\nObject.defineProperty(exports, \"assertUInt32\", { enumerable: true, get: function () { return assert_1.assertUInt32; } });\nObject.defineProperty(exports, \"assertFloat32\", { enumerable: true, get: function () { return assert_1.assertFloat32; } });\n", null, null, "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.readServiceOption = exports.readMethodOption = exports.readMethodOptions = exports.normalizeMethodInfo = void 0;\nconst runtime_1 = require(\"@protobuf-ts/runtime\");\n/**\n * Turns PartialMethodInfo into MethodInfo.\n */\nfunction normalizeMethodInfo(method, service) {\n var _a, _b, _c;\n let m = method;\n m.service = service;\n m.localName = (_a = m.localName) !== null && _a !== void 0 ? _a : runtime_1.lowerCamelCase(m.name);\n // noinspection PointlessBooleanExpressionJS\n m.serverStreaming = !!m.serverStreaming;\n // noinspection PointlessBooleanExpressionJS\n m.clientStreaming = !!m.clientStreaming;\n m.options = (_b = m.options) !== null && _b !== void 0 ? _b : {};\n m.idempotency = (_c = m.idempotency) !== null && _c !== void 0 ? _c : undefined;\n return m;\n}\nexports.normalizeMethodInfo = normalizeMethodInfo;\n/**\n * Read custom method options from a generated service client.\n *\n * @deprecated use readMethodOption()\n */\nfunction readMethodOptions(service, methodName, extensionName, extensionType) {\n var _a;\n const options = (_a = service.methods.find((m, i) => m.localName === methodName || i === methodName)) === null || _a === void 0 ? void 0 : _a.options;\n return options && options[extensionName] ? extensionType.fromJson(options[extensionName]) : undefined;\n}\nexports.readMethodOptions = readMethodOptions;\nfunction readMethodOption(service, methodName, extensionName, extensionType) {\n var _a;\n const options = (_a = service.methods.find((m, i) => m.localName === methodName || i === methodName)) === null || _a === void 0 ? void 0 : _a.options;\n if (!options) {\n return undefined;\n }\n const optionVal = options[extensionName];\n if (optionVal === undefined) {\n return optionVal;\n }\n return extensionType ? extensionType.fromJson(optionVal) : optionVal;\n}\nexports.readMethodOption = readMethodOption;\nfunction readServiceOption(service, extensionName, extensionType) {\n const options = service.options;\n if (!options) {\n return undefined;\n }\n const optionVal = options[extensionName];\n if (optionVal === undefined) {\n return optionVal;\n }\n return extensionType ? extensionType.fromJson(optionVal) : optionVal;\n}\nexports.readServiceOption = readServiceOption;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ServiceType = void 0;\nconst reflection_info_1 = require(\"./reflection-info\");\nclass ServiceType {\n constructor(typeName, methods, options) {\n this.typeName = typeName;\n this.methods = methods.map(i => reflection_info_1.normalizeMethodInfo(i, this));\n this.options = options !== null && options !== void 0 ? options : {};\n }\n}\nexports.ServiceType = ServiceType;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RpcError = void 0;\n/**\n * An error that occurred while calling a RPC method.\n */\nclass RpcError extends Error {\n constructor(message, code = 'UNKNOWN', meta) {\n super(message);\n this.name = 'RpcError';\n // see https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-2.html#example\n Object.setPrototypeOf(this, new.target.prototype);\n this.code = code;\n this.meta = meta !== null && meta !== void 0 ? meta : {};\n }\n toString() {\n const l = [this.name + ': ' + this.message];\n if (this.code) {\n l.push('');\n l.push('Code: ' + this.code);\n }\n if (this.serviceName && this.methodName) {\n l.push('Method: ' + this.serviceName + '/' + this.methodName);\n }\n let m = Object.entries(this.meta);\n if (m.length) {\n l.push('');\n l.push('Meta:');\n for (let [k, v] of m) {\n l.push(` ${k}: ${v}`);\n }\n }\n return l.join('\\n');\n }\n}\nexports.RpcError = RpcError;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.mergeRpcOptions = void 0;\nconst runtime_1 = require(\"@protobuf-ts/runtime\");\n/**\n * Merges custom RPC options with defaults. Returns a new instance and keeps\n * the \"defaults\" and the \"options\" unmodified.\n *\n * Merges `RpcMetadata` \"meta\", overwriting values from \"defaults\" with\n * values from \"options\". Does not append values to existing entries.\n *\n * Merges \"jsonOptions\", including \"jsonOptions.typeRegistry\", by creating\n * a new array that contains types from \"options.jsonOptions.typeRegistry\"\n * first, then types from \"defaults.jsonOptions.typeRegistry\".\n *\n * Merges \"binaryOptions\".\n *\n * Merges \"interceptors\" by creating a new array that contains interceptors\n * from \"defaults\" first, then interceptors from \"options\".\n *\n * Works with objects that extend `RpcOptions`, but only if the added\n * properties are of type Date, primitive like string, boolean, or Array\n * of primitives. If you have other property types, you have to merge them\n * yourself.\n */\nfunction mergeRpcOptions(defaults, options) {\n if (!options)\n return defaults;\n let o = {};\n copy(defaults, o);\n copy(options, o);\n for (let key of Object.keys(options)) {\n let val = options[key];\n switch (key) {\n case \"jsonOptions\":\n o.jsonOptions = runtime_1.mergeJsonOptions(defaults.jsonOptions, o.jsonOptions);\n break;\n case \"binaryOptions\":\n o.binaryOptions = runtime_1.mergeBinaryOptions(defaults.binaryOptions, o.binaryOptions);\n break;\n case \"meta\":\n o.meta = {};\n copy(defaults.meta, o.meta);\n copy(options.meta, o.meta);\n break;\n case \"interceptors\":\n o.interceptors = defaults.interceptors ? defaults.interceptors.concat(val) : val.concat();\n break;\n }\n }\n return o;\n}\nexports.mergeRpcOptions = mergeRpcOptions;\nfunction copy(a, into) {\n if (!a)\n return;\n let c = into;\n for (let [k, v] of Object.entries(a)) {\n if (v instanceof Date)\n c[k] = new Date(v.getTime());\n else if (Array.isArray(v))\n c[k] = v.concat();\n else\n c[k] = v;\n }\n}\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Deferred = exports.DeferredState = void 0;\nvar DeferredState;\n(function (DeferredState) {\n DeferredState[DeferredState[\"PENDING\"] = 0] = \"PENDING\";\n DeferredState[DeferredState[\"REJECTED\"] = 1] = \"REJECTED\";\n DeferredState[DeferredState[\"RESOLVED\"] = 2] = \"RESOLVED\";\n})(DeferredState = exports.DeferredState || (exports.DeferredState = {}));\n/**\n * A deferred promise. This is a \"controller\" for a promise, which lets you\n * pass a promise around and reject or resolve it from the outside.\n *\n * Warning: This class is to be used with care. Using it can make code very\n * difficult to read. It is intended for use in library code that exposes\n * promises, not for regular business logic.\n */\nclass Deferred {\n /**\n * @param preventUnhandledRejectionWarning - prevents the warning\n * \"Unhandled Promise rejection\" by adding a noop rejection handler.\n * Working with calls returned from the runtime-rpc package in an\n * async function usually means awaiting one call property after\n * the other. This means that the \"status\" is not being awaited when\n * an earlier await for the \"headers\" is rejected. This causes the\n * \"unhandled promise reject\" warning. A more correct behaviour for\n * calls might be to become aware whether at least one of the\n * promises is handled and swallow the rejection warning for the\n * others.\n */\n constructor(preventUnhandledRejectionWarning = true) {\n this._state = DeferredState.PENDING;\n this._promise = new Promise((resolve, reject) => {\n this._resolve = resolve;\n this._reject = reject;\n });\n if (preventUnhandledRejectionWarning) {\n this._promise.catch(_ => { });\n }\n }\n /**\n * Get the current state of the promise.\n */\n get state() {\n return this._state;\n }\n /**\n * Get the deferred promise.\n */\n get promise() {\n return this._promise;\n }\n /**\n * Resolve the promise. Throws if the promise is already resolved or rejected.\n */\n resolve(value) {\n if (this.state !== DeferredState.PENDING)\n throw new Error(`cannot resolve ${DeferredState[this.state].toLowerCase()}`);\n this._resolve(value);\n this._state = DeferredState.RESOLVED;\n }\n /**\n * Reject the promise. Throws if the promise is already resolved or rejected.\n */\n reject(reason) {\n if (this.state !== DeferredState.PENDING)\n throw new Error(`cannot reject ${DeferredState[this.state].toLowerCase()}`);\n this._reject(reason);\n this._state = DeferredState.REJECTED;\n }\n /**\n * Resolve the promise. Ignore if not pending.\n */\n resolvePending(val) {\n if (this._state === DeferredState.PENDING)\n this.resolve(val);\n }\n /**\n * Reject the promise. Ignore if not pending.\n */\n rejectPending(reason) {\n if (this._state === DeferredState.PENDING)\n this.reject(reason);\n }\n}\nexports.Deferred = Deferred;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RpcOutputStreamController = void 0;\nconst deferred_1 = require(\"./deferred\");\nconst runtime_1 = require(\"@protobuf-ts/runtime\");\n/**\n * A `RpcOutputStream` that you control.\n */\nclass RpcOutputStreamController {\n constructor() {\n this._lis = {\n nxt: [],\n msg: [],\n err: [],\n cmp: [],\n };\n this._closed = false;\n }\n // --- RpcOutputStream callback API\n onNext(callback) {\n return this.addLis(callback, this._lis.nxt);\n }\n onMessage(callback) {\n return this.addLis(callback, this._lis.msg);\n }\n onError(callback) {\n return this.addLis(callback, this._lis.err);\n }\n onComplete(callback) {\n return this.addLis(callback, this._lis.cmp);\n }\n addLis(callback, list) {\n list.push(callback);\n return () => {\n let i = list.indexOf(callback);\n if (i >= 0)\n list.splice(i, 1);\n };\n }\n // remove all listeners\n clearLis() {\n for (let l of Object.values(this._lis))\n l.splice(0, l.length);\n }\n // --- Controller API\n /**\n * Is this stream already closed by a completion or error?\n */\n get closed() {\n return this._closed !== false;\n }\n /**\n * Emit message, close with error, or close successfully, but only one\n * at a time.\n * Can be used to wrap a stream by using the other stream's `onNext`.\n */\n notifyNext(message, error, complete) {\n runtime_1.assert((message ? 1 : 0) + (error ? 1 : 0) + (complete ? 1 : 0) <= 1, 'only one emission at a time');\n if (message)\n this.notifyMessage(message);\n if (error)\n this.notifyError(error);\n if (complete)\n this.notifyComplete();\n }\n /**\n * Emits a new message. Throws if stream is closed.\n *\n * Triggers onNext and onMessage callbacks.\n */\n notifyMessage(message) {\n runtime_1.assert(!this.closed, 'stream is closed');\n this.pushIt({ value: message, done: false });\n this._lis.msg.forEach(l => l(message));\n this._lis.nxt.forEach(l => l(message, undefined, false));\n }\n /**\n * Closes the stream with an error. Throws if stream is closed.\n *\n * Triggers onNext and onError callbacks.\n */\n notifyError(error) {\n runtime_1.assert(!this.closed, 'stream is closed');\n this._closed = error;\n this.pushIt(error);\n this._lis.err.forEach(l => l(error));\n this._lis.nxt.forEach(l => l(undefined, error, false));\n this.clearLis();\n }\n /**\n * Closes the stream successfully. Throws if stream is closed.\n *\n * Triggers onNext and onComplete callbacks.\n */\n notifyComplete() {\n runtime_1.assert(!this.closed, 'stream is closed');\n this._closed = true;\n this.pushIt({ value: null, done: true });\n this._lis.cmp.forEach(l => l());\n this._lis.nxt.forEach(l => l(undefined, undefined, true));\n this.clearLis();\n }\n /**\n * Creates an async iterator (that can be used with `for await {...}`)\n * to consume the stream.\n *\n * Some things to note:\n * - If an error occurs, the `for await` will throw it.\n * - If an error occurred before the `for await` was started, `for await`\n * will re-throw it.\n * - If the stream is already complete, the `for await` will be empty.\n * - If your `for await` consumes slower than the stream produces,\n * for example because you are relaying messages in a slow operation,\n * messages are queued.\n */\n [Symbol.asyncIterator]() {\n // init the iterator state, enabling pushIt()\n if (!this._itState) {\n this._itState = { q: [] };\n }\n // if we are closed, we are definitely not receiving any more messages.\n // but we can't let the iterator get stuck. we want to either:\n // a) finish the new iterator immediately, because we are completed\n // b) reject the new iterator, because we errored\n if (this._closed === true)\n this.pushIt({ value: null, done: true });\n else if (this._closed !== false)\n this.pushIt(this._closed);\n // the async iterator\n return {\n next: () => {\n let state = this._itState;\n runtime_1.assert(state, \"bad state\"); // if we don't have a state here, code is broken\n // there should be no pending result.\n // did the consumer call next() before we resolved our previous result promise?\n runtime_1.assert(!state.p, \"iterator contract broken\");\n // did we produce faster than the iterator consumed?\n // return the oldest result from the queue.\n let first = state.q.shift();\n if (first)\n return (\"value\" in first) ? Promise.resolve(first) : Promise.reject(first);\n // we have no result ATM, but we promise one.\n // as soon as we have a result, we must resolve promise.\n state.p = new deferred_1.Deferred();\n return state.p.promise;\n },\n };\n }\n // \"push\" a new iterator result.\n // this either resolves a pending promise, or enqueues the result.\n pushIt(result) {\n let state = this._itState;\n if (!state)\n return;\n // is the consumer waiting for us?\n if (state.p) {\n // yes, consumer is waiting for this promise.\n const p = state.p;\n runtime_1.assert(p.state == deferred_1.DeferredState.PENDING, \"iterator contract broken\");\n // resolve the promise\n (\"value\" in result) ? p.resolve(result) : p.reject(result);\n // must cleanup, otherwise iterator.next() would pick it up again.\n delete state.p;\n }\n else {\n // we are producing faster than the iterator consumes.\n // push result onto queue.\n state.q.push(result);\n }\n }\n}\nexports.RpcOutputStreamController = RpcOutputStreamController;\n", "\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.UnaryCall = void 0;\n/**\n * A unary RPC call. Unary means there is exactly one input message and\n * exactly one output message unless an error occurred.\n */\nclass UnaryCall {\n constructor(method, requestHeaders, request, headers, response, status, trailers) {\n this.method = method;\n this.requestHeaders = requestHeaders;\n this.request = request;\n this.headers = headers;\n this.response = response;\n this.status = status;\n this.trailers = trailers;\n }\n /**\n * If you are only interested in the final outcome of this call,\n * you can await it to receive a `FinishedUnaryCall`.\n */\n then(onfulfilled, onrejected) {\n return this.promiseFinished().then(value => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, reason => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason));\n }\n promiseFinished() {\n return __awaiter(this, void 0, void 0, function* () {\n let [headers, response, status, trailers] = yield Promise.all([this.headers, this.response, this.status, this.trailers]);\n return {\n method: this.method,\n requestHeaders: this.requestHeaders,\n request: this.request,\n headers,\n response,\n status,\n trailers\n };\n });\n }\n}\nexports.UnaryCall = UnaryCall;\n", "\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ServerStreamingCall = void 0;\n/**\n * A server streaming RPC call. The client provides exactly one input message\n * but the server may respond with 0, 1, or more messages.\n */\nclass ServerStreamingCall {\n constructor(method, requestHeaders, request, headers, response, status, trailers) {\n this.method = method;\n this.requestHeaders = requestHeaders;\n this.request = request;\n this.headers = headers;\n this.responses = response;\n this.status = status;\n this.trailers = trailers;\n }\n /**\n * Instead of awaiting the response status and trailers, you can\n * just as well await this call itself to receive the server outcome.\n * You should first setup some listeners to the `request` to\n * see the actual messages the server replied with.\n */\n then(onfulfilled, onrejected) {\n return this.promiseFinished().then(value => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, reason => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason));\n }\n promiseFinished() {\n return __awaiter(this, void 0, void 0, function* () {\n let [headers, status, trailers] = yield Promise.all([this.headers, this.status, this.trailers]);\n return {\n method: this.method,\n requestHeaders: this.requestHeaders,\n request: this.request,\n headers,\n status,\n trailers,\n };\n });\n }\n}\nexports.ServerStreamingCall = ServerStreamingCall;\n", "\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ClientStreamingCall = void 0;\n/**\n * A client streaming RPC call. This means that the clients sends 0, 1, or\n * more messages to the server, and the server replies with exactly one\n * message.\n */\nclass ClientStreamingCall {\n constructor(method, requestHeaders, request, headers, response, status, trailers) {\n this.method = method;\n this.requestHeaders = requestHeaders;\n this.requests = request;\n this.headers = headers;\n this.response = response;\n this.status = status;\n this.trailers = trailers;\n }\n /**\n * Instead of awaiting the response status and trailers, you can\n * just as well await this call itself to receive the server outcome.\n * Note that it may still be valid to send more request messages.\n */\n then(onfulfilled, onrejected) {\n return this.promiseFinished().then(value => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, reason => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason));\n }\n promiseFinished() {\n return __awaiter(this, void 0, void 0, function* () {\n let [headers, response, status, trailers] = yield Promise.all([this.headers, this.response, this.status, this.trailers]);\n return {\n method: this.method,\n requestHeaders: this.requestHeaders,\n headers,\n response,\n status,\n trailers\n };\n });\n }\n}\nexports.ClientStreamingCall = ClientStreamingCall;\n", "\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DuplexStreamingCall = void 0;\n/**\n * A duplex streaming RPC call. This means that the clients sends an\n * arbitrary amount of messages to the server, while at the same time,\n * the server sends an arbitrary amount of messages to the client.\n */\nclass DuplexStreamingCall {\n constructor(method, requestHeaders, request, headers, response, status, trailers) {\n this.method = method;\n this.requestHeaders = requestHeaders;\n this.requests = request;\n this.headers = headers;\n this.responses = response;\n this.status = status;\n this.trailers = trailers;\n }\n /**\n * Instead of awaiting the response status and trailers, you can\n * just as well await this call itself to receive the server outcome.\n * Note that it may still be valid to send more request messages.\n */\n then(onfulfilled, onrejected) {\n return this.promiseFinished().then(value => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, reason => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason));\n }\n promiseFinished() {\n return __awaiter(this, void 0, void 0, function* () {\n let [headers, status, trailers] = yield Promise.all([this.headers, this.status, this.trailers]);\n return {\n method: this.method,\n requestHeaders: this.requestHeaders,\n headers,\n status,\n trailers,\n };\n });\n }\n}\nexports.DuplexStreamingCall = DuplexStreamingCall;\n", "\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TestTransport = void 0;\nconst rpc_error_1 = require(\"./rpc-error\");\nconst runtime_1 = require(\"@protobuf-ts/runtime\");\nconst rpc_output_stream_1 = require(\"./rpc-output-stream\");\nconst rpc_options_1 = require(\"./rpc-options\");\nconst unary_call_1 = require(\"./unary-call\");\nconst server_streaming_call_1 = require(\"./server-streaming-call\");\nconst client_streaming_call_1 = require(\"./client-streaming-call\");\nconst duplex_streaming_call_1 = require(\"./duplex-streaming-call\");\n/**\n * Transport for testing.\n */\nclass TestTransport {\n /**\n * Initialize with mock data. Omitted fields have default value.\n */\n constructor(data) {\n /**\n * Suppress warning / error about uncaught rejections of\n * \"status\" and \"trailers\".\n */\n this.suppressUncaughtRejections = true;\n this.headerDelay = 10;\n this.responseDelay = 50;\n this.betweenResponseDelay = 10;\n this.afterResponseDelay = 10;\n this.data = data !== null && data !== void 0 ? data : {};\n }\n /**\n * Sent message(s) during the last operation.\n */\n get sentMessages() {\n if (this.lastInput instanceof TestInputStream) {\n return this.lastInput.sent;\n }\n else if (typeof this.lastInput == \"object\") {\n return [this.lastInput.single];\n }\n return [];\n }\n /**\n * Sending message(s) completed?\n */\n get sendComplete() {\n if (this.lastInput instanceof TestInputStream) {\n return this.lastInput.completed;\n }\n else if (typeof this.lastInput == \"object\") {\n return true;\n }\n return false;\n }\n // Creates a promise for response headers from the mock data.\n promiseHeaders() {\n var _a;\n const headers = (_a = this.data.headers) !== null && _a !== void 0 ? _a : TestTransport.defaultHeaders;\n return headers instanceof rpc_error_1.RpcError\n ? Promise.reject(headers)\n : Promise.resolve(headers);\n }\n // Creates a promise for a single, valid, message from the mock data.\n promiseSingleResponse(method) {\n if (this.data.response instanceof rpc_error_1.RpcError) {\n return Promise.reject(this.data.response);\n }\n let r;\n if (Array.isArray(this.data.response)) {\n runtime_1.assert(this.data.response.length > 0);\n r = this.data.response[0];\n }\n else if (this.data.response !== undefined) {\n r = this.data.response;\n }\n else {\n r = method.O.create();\n }\n runtime_1.assert(method.O.is(r));\n return Promise.resolve(r);\n }\n /**\n * Pushes response messages from the mock data to the output stream.\n * If an error response, status or trailers are mocked, the stream is\n * closed with the respective error.\n * Otherwise, stream is completed successfully.\n *\n * The returned promise resolves when the stream is closed. It should\n * not reject. If it does, code is broken.\n */\n streamResponses(method, stream, abort) {\n return __awaiter(this, void 0, void 0, function* () {\n // normalize \"data.response\" into an array of valid output messages\n const messages = [];\n if (this.data.response === undefined) {\n messages.push(method.O.create());\n }\n else if (Array.isArray(this.data.response)) {\n for (let msg of this.data.response) {\n runtime_1.assert(method.O.is(msg));\n messages.push(msg);\n }\n }\n else if (!(this.data.response instanceof rpc_error_1.RpcError)) {\n runtime_1.assert(method.O.is(this.data.response));\n messages.push(this.data.response);\n }\n // start the stream with an initial delay.\n // if the request is cancelled, notify() error and exit.\n try {\n yield delay(this.responseDelay, abort)(undefined);\n }\n catch (error) {\n stream.notifyError(error);\n return;\n }\n // if error response was mocked, notify() error (stream is now closed with error) and exit.\n if (this.data.response instanceof rpc_error_1.RpcError) {\n stream.notifyError(this.data.response);\n return;\n }\n // regular response messages were mocked. notify() them.\n for (let msg of messages) {\n stream.notifyMessage(msg);\n // add a short delay between responses\n // if the request is cancelled, notify() error and exit.\n try {\n yield delay(this.betweenResponseDelay, abort)(undefined);\n }\n catch (error) {\n stream.notifyError(error);\n return;\n }\n }\n // error status was mocked, notify() error (stream is now closed with error) and exit.\n if (this.data.status instanceof rpc_error_1.RpcError) {\n stream.notifyError(this.data.status);\n return;\n }\n // error trailers were mocked, notify() error (stream is now closed with error) and exit.\n if (this.data.trailers instanceof rpc_error_1.RpcError) {\n stream.notifyError(this.data.trailers);\n return;\n }\n // stream completed successfully\n stream.notifyComplete();\n });\n }\n // Creates a promise for response status from the mock data.\n promiseStatus() {\n var _a;\n const status = (_a = this.data.status) !== null && _a !== void 0 ? _a : TestTransport.defaultStatus;\n return status instanceof rpc_error_1.RpcError\n ? Promise.reject(status)\n : Promise.resolve(status);\n }\n // Creates a promise for response trailers from the mock data.\n promiseTrailers() {\n var _a;\n const trailers = (_a = this.data.trailers) !== null && _a !== void 0 ? _a : TestTransport.defaultTrailers;\n return trailers instanceof rpc_error_1.RpcError\n ? Promise.reject(trailers)\n : Promise.resolve(trailers);\n }\n maybeSuppressUncaught(...promise) {\n if (this.suppressUncaughtRejections) {\n for (let p of promise) {\n p.catch(() => {\n });\n }\n }\n }\n mergeOptions(options) {\n return rpc_options_1.mergeRpcOptions({}, options);\n }\n unary(method, input, options) {\n var _a;\n const requestHeaders = (_a = options.meta) !== null && _a !== void 0 ? _a : {}, headersPromise = this.promiseHeaders()\n .then(delay(this.headerDelay, options.abort)), responsePromise = headersPromise\n .catch(_ => {\n })\n .then(delay(this.responseDelay, options.abort))\n .then(_ => this.promiseSingleResponse(method)), statusPromise = responsePromise\n .catch(_ => {\n })\n .then(delay(this.afterResponseDelay, options.abort))\n .then(_ => this.promiseStatus()), trailersPromise = responsePromise\n .catch(_ => {\n })\n .then(delay(this.afterResponseDelay, options.abort))\n .then(_ => this.promiseTrailers());\n this.maybeSuppressUncaught(statusPromise, trailersPromise);\n this.lastInput = { single: input };\n return new unary_call_1.UnaryCall(method, requestHeaders, input, headersPromise, responsePromise, statusPromise, trailersPromise);\n }\n serverStreaming(method, input, options) {\n var _a;\n const requestHeaders = (_a = options.meta) !== null && _a !== void 0 ? _a : {}, headersPromise = this.promiseHeaders()\n .then(delay(this.headerDelay, options.abort)), outputStream = new rpc_output_stream_1.RpcOutputStreamController(), responseStreamClosedPromise = headersPromise\n .then(delay(this.responseDelay, options.abort))\n .catch(() => {\n })\n .then(() => this.streamResponses(method, outputStream, options.abort))\n .then(delay(this.afterResponseDelay, options.abort)), statusPromise = responseStreamClosedPromise\n .then(() => this.promiseStatus()), trailersPromise = responseStreamClosedPromise\n .then(() => this.promiseTrailers());\n this.maybeSuppressUncaught(statusPromise, trailersPromise);\n this.lastInput = { single: input };\n return new server_streaming_call_1.ServerStreamingCall(method, requestHeaders, input, headersPromise, outputStream, statusPromise, trailersPromise);\n }\n clientStreaming(method, options) {\n var _a;\n const requestHeaders = (_a = options.meta) !== null && _a !== void 0 ? _a : {}, headersPromise = this.promiseHeaders()\n .then(delay(this.headerDelay, options.abort)), responsePromise = headersPromise\n .catch(_ => {\n })\n .then(delay(this.responseDelay, options.abort))\n .then(_ => this.promiseSingleResponse(method)), statusPromise = responsePromise\n .catch(_ => {\n })\n .then(delay(this.afterResponseDelay, options.abort))\n .then(_ => this.promiseStatus()), trailersPromise = responsePromise\n .catch(_ => {\n })\n .then(delay(this.afterResponseDelay, options.abort))\n .then(_ => this.promiseTrailers());\n this.maybeSuppressUncaught(statusPromise, trailersPromise);\n this.lastInput = new TestInputStream(this.data, options.abort);\n return new client_streaming_call_1.ClientStreamingCall(method, requestHeaders, this.lastInput, headersPromise, responsePromise, statusPromise, trailersPromise);\n }\n duplex(method, options) {\n var _a;\n const requestHeaders = (_a = options.meta) !== null && _a !== void 0 ? _a : {}, headersPromise = this.promiseHeaders()\n .then(delay(this.headerDelay, options.abort)), outputStream = new rpc_output_stream_1.RpcOutputStreamController(), responseStreamClosedPromise = headersPromise\n .then(delay(this.responseDelay, options.abort))\n .catch(() => {\n })\n .then(() => this.streamResponses(method, outputStream, options.abort))\n .then(delay(this.afterResponseDelay, options.abort)), statusPromise = responseStreamClosedPromise\n .then(() => this.promiseStatus()), trailersPromise = responseStreamClosedPromise\n .then(() => this.promiseTrailers());\n this.maybeSuppressUncaught(statusPromise, trailersPromise);\n this.lastInput = new TestInputStream(this.data, options.abort);\n return new duplex_streaming_call_1.DuplexStreamingCall(method, requestHeaders, this.lastInput, headersPromise, outputStream, statusPromise, trailersPromise);\n }\n}\nexports.TestTransport = TestTransport;\nTestTransport.defaultHeaders = {\n responseHeader: \"test\"\n};\nTestTransport.defaultStatus = {\n code: \"OK\", detail: \"all good\"\n};\nTestTransport.defaultTrailers = {\n responseTrailer: \"test\"\n};\nfunction delay(ms, abort) {\n return (v) => new Promise((resolve, reject) => {\n if (abort === null || abort === void 0 ? void 0 : abort.aborted) {\n reject(new rpc_error_1.RpcError(\"user cancel\", \"CANCELLED\"));\n }\n else {\n const id = setTimeout(() => resolve(v), ms);\n if (abort) {\n abort.addEventListener(\"abort\", ev => {\n clearTimeout(id);\n reject(new rpc_error_1.RpcError(\"user cancel\", \"CANCELLED\"));\n });\n }\n }\n });\n}\nclass TestInputStream {\n constructor(data, abort) {\n this._completed = false;\n this._sent = [];\n this.data = data;\n this.abort = abort;\n }\n get sent() {\n return this._sent;\n }\n get completed() {\n return this._completed;\n }\n send(message) {\n if (this.data.inputMessage instanceof rpc_error_1.RpcError) {\n return Promise.reject(this.data.inputMessage);\n }\n const delayMs = this.data.inputMessage === undefined\n ? 10\n : this.data.inputMessage;\n return Promise.resolve(undefined)\n .then(() => {\n this._sent.push(message);\n })\n .then(delay(delayMs, this.abort));\n }\n complete() {\n if (this.data.inputComplete instanceof rpc_error_1.RpcError) {\n return Promise.reject(this.data.inputComplete);\n }\n const delayMs = this.data.inputComplete === undefined\n ? 10\n : this.data.inputComplete;\n return Promise.resolve(undefined)\n .then(() => {\n this._completed = true;\n })\n .then(delay(delayMs, this.abort));\n }\n}\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.stackDuplexStreamingInterceptors = exports.stackClientStreamingInterceptors = exports.stackServerStreamingInterceptors = exports.stackUnaryInterceptors = exports.stackIntercept = void 0;\nconst runtime_1 = require(\"@protobuf-ts/runtime\");\n/**\n * Creates a \"stack\" of of all interceptors specified in the given `RpcOptions`.\n * Used by generated client implementations.\n * @internal\n */\nfunction stackIntercept(kind, transport, method, options, input) {\n var _a, _b, _c, _d;\n if (kind == \"unary\") {\n let tail = (mtd, inp, opt) => transport.unary(mtd, inp, opt);\n for (const curr of ((_a = options.interceptors) !== null && _a !== void 0 ? _a : []).filter(i => i.interceptUnary).reverse()) {\n const next = tail;\n tail = (mtd, inp, opt) => curr.interceptUnary(next, mtd, inp, opt);\n }\n return tail(method, input, options);\n }\n if (kind == \"serverStreaming\") {\n let tail = (mtd, inp, opt) => transport.serverStreaming(mtd, inp, opt);\n for (const curr of ((_b = options.interceptors) !== null && _b !== void 0 ? _b : []).filter(i => i.interceptServerStreaming).reverse()) {\n const next = tail;\n tail = (mtd, inp, opt) => curr.interceptServerStreaming(next, mtd, inp, opt);\n }\n return tail(method, input, options);\n }\n if (kind == \"clientStreaming\") {\n let tail = (mtd, opt) => transport.clientStreaming(mtd, opt);\n for (const curr of ((_c = options.interceptors) !== null && _c !== void 0 ? _c : []).filter(i => i.interceptClientStreaming).reverse()) {\n const next = tail;\n tail = (mtd, opt) => curr.interceptClientStreaming(next, mtd, opt);\n }\n return tail(method, options);\n }\n if (kind == \"duplex\") {\n let tail = (mtd, opt) => transport.duplex(mtd, opt);\n for (const curr of ((_d = options.interceptors) !== null && _d !== void 0 ? _d : []).filter(i => i.interceptDuplex).reverse()) {\n const next = tail;\n tail = (mtd, opt) => curr.interceptDuplex(next, mtd, opt);\n }\n return tail(method, options);\n }\n runtime_1.assertNever(kind);\n}\nexports.stackIntercept = stackIntercept;\n/**\n * @deprecated replaced by `stackIntercept()`, still here to support older generated code\n */\nfunction stackUnaryInterceptors(transport, method, input, options) {\n return stackIntercept(\"unary\", transport, method, options, input);\n}\nexports.stackUnaryInterceptors = stackUnaryInterceptors;\n/**\n * @deprecated replaced by `stackIntercept()`, still here to support older generated code\n */\nfunction stackServerStreamingInterceptors(transport, method, input, options) {\n return stackIntercept(\"serverStreaming\", transport, method, options, input);\n}\nexports.stackServerStreamingInterceptors = stackServerStreamingInterceptors;\n/**\n * @deprecated replaced by `stackIntercept()`, still here to support older generated code\n */\nfunction stackClientStreamingInterceptors(transport, method, options) {\n return stackIntercept(\"clientStreaming\", transport, method, options);\n}\nexports.stackClientStreamingInterceptors = stackClientStreamingInterceptors;\n/**\n * @deprecated replaced by `stackIntercept()`, still here to support older generated code\n */\nfunction stackDuplexStreamingInterceptors(transport, method, options) {\n return stackIntercept(\"duplex\", transport, method, options);\n}\nexports.stackDuplexStreamingInterceptors = stackDuplexStreamingInterceptors;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ServerCallContextController = void 0;\nclass ServerCallContextController {\n constructor(method, headers, deadline, sendResponseHeadersFn, defaultStatus = { code: 'OK', detail: '' }) {\n this._cancelled = false;\n this._listeners = [];\n this.method = method;\n this.headers = headers;\n this.deadline = deadline;\n this.trailers = {};\n this._sendRH = sendResponseHeadersFn;\n this.status = defaultStatus;\n }\n /**\n * Set the call cancelled.\n *\n * Invokes all callbacks registered with onCancel() and\n * sets `cancelled = true`.\n */\n notifyCancelled() {\n if (!this._cancelled) {\n this._cancelled = true;\n for (let l of this._listeners) {\n l();\n }\n }\n }\n /**\n * Send response headers.\n */\n sendResponseHeaders(data) {\n this._sendRH(data);\n }\n /**\n * Is the call cancelled?\n *\n * When the client closes the connection before the server\n * is done, the call is cancelled.\n *\n * If you want to cancel a request on the server, throw a\n * RpcError with the CANCELLED status code.\n */\n get cancelled() {\n return this._cancelled;\n }\n /**\n * Add a callback for cancellation.\n */\n onCancel(callback) {\n const l = this._listeners;\n l.push(callback);\n return () => {\n let i = l.indexOf(callback);\n if (i >= 0)\n l.splice(i, 1);\n };\n }\n}\nexports.ServerCallContextController = ServerCallContextController;\n", "\"use strict\";\n// Public API of the rpc runtime.\n// Note: we do not use `export * from ...` to help tree shakers,\n// webpack verbose output hints that this should be useful\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar service_type_1 = require(\"./service-type\");\nObject.defineProperty(exports, \"ServiceType\", { enumerable: true, get: function () { return service_type_1.ServiceType; } });\nvar reflection_info_1 = require(\"./reflection-info\");\nObject.defineProperty(exports, \"readMethodOptions\", { enumerable: true, get: function () { return reflection_info_1.readMethodOptions; } });\nObject.defineProperty(exports, \"readMethodOption\", { enumerable: true, get: function () { return reflection_info_1.readMethodOption; } });\nObject.defineProperty(exports, \"readServiceOption\", { enumerable: true, get: function () { return reflection_info_1.readServiceOption; } });\nvar rpc_error_1 = require(\"./rpc-error\");\nObject.defineProperty(exports, \"RpcError\", { enumerable: true, get: function () { return rpc_error_1.RpcError; } });\nvar rpc_options_1 = require(\"./rpc-options\");\nObject.defineProperty(exports, \"mergeRpcOptions\", { enumerable: true, get: function () { return rpc_options_1.mergeRpcOptions; } });\nvar rpc_output_stream_1 = require(\"./rpc-output-stream\");\nObject.defineProperty(exports, \"RpcOutputStreamController\", { enumerable: true, get: function () { return rpc_output_stream_1.RpcOutputStreamController; } });\nvar test_transport_1 = require(\"./test-transport\");\nObject.defineProperty(exports, \"TestTransport\", { enumerable: true, get: function () { return test_transport_1.TestTransport; } });\nvar deferred_1 = require(\"./deferred\");\nObject.defineProperty(exports, \"Deferred\", { enumerable: true, get: function () { return deferred_1.Deferred; } });\nObject.defineProperty(exports, \"DeferredState\", { enumerable: true, get: function () { return deferred_1.DeferredState; } });\nvar duplex_streaming_call_1 = require(\"./duplex-streaming-call\");\nObject.defineProperty(exports, \"DuplexStreamingCall\", { enumerable: true, get: function () { return duplex_streaming_call_1.DuplexStreamingCall; } });\nvar client_streaming_call_1 = require(\"./client-streaming-call\");\nObject.defineProperty(exports, \"ClientStreamingCall\", { enumerable: true, get: function () { return client_streaming_call_1.ClientStreamingCall; } });\nvar server_streaming_call_1 = require(\"./server-streaming-call\");\nObject.defineProperty(exports, \"ServerStreamingCall\", { enumerable: true, get: function () { return server_streaming_call_1.ServerStreamingCall; } });\nvar unary_call_1 = require(\"./unary-call\");\nObject.defineProperty(exports, \"UnaryCall\", { enumerable: true, get: function () { return unary_call_1.UnaryCall; } });\nvar rpc_interceptor_1 = require(\"./rpc-interceptor\");\nObject.defineProperty(exports, \"stackIntercept\", { enumerable: true, get: function () { return rpc_interceptor_1.stackIntercept; } });\nObject.defineProperty(exports, \"stackDuplexStreamingInterceptors\", { enumerable: true, get: function () { return rpc_interceptor_1.stackDuplexStreamingInterceptors; } });\nObject.defineProperty(exports, \"stackClientStreamingInterceptors\", { enumerable: true, get: function () { return rpc_interceptor_1.stackClientStreamingInterceptors; } });\nObject.defineProperty(exports, \"stackServerStreamingInterceptors\", { enumerable: true, get: function () { return rpc_interceptor_1.stackServerStreamingInterceptors; } });\nObject.defineProperty(exports, \"stackUnaryInterceptors\", { enumerable: true, get: function () { return rpc_interceptor_1.stackUnaryInterceptors; } });\nvar server_call_context_1 = require(\"./server-call-context\");\nObject.defineProperty(exports, \"ServerCallContextController\", { enumerable: true, get: function () { return server_call_context_1.ServerCallContextController; } });\n", null, "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n", "\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isHook = exports.chainHooks = void 0;\n// ChainHooks creates a new ServerHook which chains the callbacks in\n// each of the constituent hooks passed in. Each hook function will be\n// called in the order of the ServerHooks values passed in.\n//\n// For the erroring hooks, RequestReceived and RequestRouted, any returned\n// errors prevent processing by later hooks.\nfunction chainHooks(...hooks) {\n if (hooks.length === 0) {\n return null;\n }\n if (hooks.length === 1) {\n return hooks[0];\n }\n const serverHook = {\n requestReceived(ctx) {\n return __awaiter(this, void 0, void 0, function* () {\n for (const hook of hooks) {\n if (!hook.requestReceived) {\n continue;\n }\n yield hook.requestReceived(ctx);\n }\n });\n },\n requestPrepared(ctx) {\n return __awaiter(this, void 0, void 0, function* () {\n for (const hook of hooks) {\n if (!hook.requestPrepared) {\n continue;\n }\n console.warn(\"hook requestPrepared is deprecated and will be removed in the next release. \" +\n \"Please use responsePrepared instead.\");\n yield hook.requestPrepared(ctx);\n }\n });\n },\n responsePrepared(ctx) {\n return __awaiter(this, void 0, void 0, function* () {\n for (const hook of hooks) {\n if (!hook.responsePrepared) {\n continue;\n }\n yield hook.responsePrepared(ctx);\n }\n });\n },\n requestSent(ctx) {\n return __awaiter(this, void 0, void 0, function* () {\n for (const hook of hooks) {\n if (!hook.requestSent) {\n continue;\n }\n console.warn(\"hook requestSent is deprecated and will be removed in the next release. \" +\n \"Please use responseSent instead.\");\n yield hook.requestSent(ctx);\n }\n });\n },\n responseSent(ctx) {\n return __awaiter(this, void 0, void 0, function* () {\n for (const hook of hooks) {\n if (!hook.responseSent) {\n continue;\n }\n yield hook.responseSent(ctx);\n }\n });\n },\n requestRouted(ctx) {\n return __awaiter(this, void 0, void 0, function* () {\n for (const hook of hooks) {\n if (!hook.requestRouted) {\n continue;\n }\n yield hook.requestRouted(ctx);\n }\n });\n },\n error(ctx, err) {\n return __awaiter(this, void 0, void 0, function* () {\n for (const hook of hooks) {\n if (!hook.error) {\n continue;\n }\n yield hook.error(ctx, err);\n }\n });\n },\n };\n return serverHook;\n}\nexports.chainHooks = chainHooks;\nfunction isHook(object) {\n return (\"requestReceived\" in object ||\n \"requestPrepared\" in object ||\n \"requestSent\" in object ||\n \"requestRouted\" in object ||\n \"responsePrepared\" in object ||\n \"responseSent\" in object ||\n \"error\" in object);\n}\nexports.isHook = isHook;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isValidErrorCode = exports.httpStatusFromErrorCode = exports.TwirpErrorCode = exports.BadRouteError = exports.InternalServerErrorWith = exports.InternalServerError = exports.RequiredArgumentError = exports.InvalidArgumentError = exports.NotFoundError = exports.TwirpError = void 0;\n/**\n * Represents a twirp error\n */\nclass TwirpError extends Error {\n constructor(code, msg) {\n super(msg);\n this.code = TwirpErrorCode.Internal;\n this.meta = {};\n this.code = code;\n this.msg = msg;\n Object.setPrototypeOf(this, TwirpError.prototype);\n }\n /**\n * Adds a metadata kv to the error\n * @param key\n * @param value\n */\n withMeta(key, value) {\n this.meta[key] = value;\n return this;\n }\n /**\n * Returns a single metadata value\n * return \"\" if not found\n * @param key\n */\n getMeta(key) {\n return this.meta[key] || \"\";\n }\n /**\n * Add the original error cause\n * @param err\n * @param addMeta\n */\n withCause(err, addMeta = false) {\n this._originalCause = err;\n if (addMeta) {\n this.withMeta(\"cause\", err.message);\n }\n return this;\n }\n cause() {\n return this._originalCause;\n }\n /**\n * Returns the error representation to JSON\n */\n toJSON() {\n try {\n return JSON.stringify({\n code: this.code,\n msg: this.msg,\n meta: this.meta,\n });\n }\n catch (e) {\n return `{\"code\": \"internal\", \"msg\": \"There was an error but it could not be serialized into JSON\"}`;\n }\n }\n /**\n * Create a twirp error from an object\n * @param obj\n */\n static fromObject(obj) {\n const code = obj[\"code\"] || TwirpErrorCode.Unknown;\n const msg = obj[\"msg\"] || \"unknown\";\n const error = new TwirpError(code, msg);\n if (obj[\"meta\"]) {\n Object.keys(obj[\"meta\"]).forEach((key) => {\n error.withMeta(key, obj[\"meta\"][key]);\n });\n }\n return error;\n }\n}\nexports.TwirpError = TwirpError;\n/**\n * NotFoundError constructor for the common NotFound error.\n */\nclass NotFoundError extends TwirpError {\n constructor(msg) {\n super(TwirpErrorCode.NotFound, msg);\n }\n}\nexports.NotFoundError = NotFoundError;\n/**\n * InvalidArgumentError constructor for the common InvalidArgument error. Can be\n * used when an argument has invalid format, is a number out of range, is a bad\n * option, etc).\n */\nclass InvalidArgumentError extends TwirpError {\n constructor(argument, validationMsg) {\n super(TwirpErrorCode.InvalidArgument, argument + \" \" + validationMsg);\n this.withMeta(\"argument\", argument);\n }\n}\nexports.InvalidArgumentError = InvalidArgumentError;\n/**\n * RequiredArgumentError is a more specific constructor for InvalidArgument\n * error. Should be used when the argument is required (expected to have a\n * non-zero value).\n */\nclass RequiredArgumentError extends InvalidArgumentError {\n constructor(argument) {\n super(argument, \"is required\");\n }\n}\nexports.RequiredArgumentError = RequiredArgumentError;\n/**\n * InternalError constructor for the common Internal error. Should be used to\n * specify that something bad or unexpected happened.\n */\nclass InternalServerError extends TwirpError {\n constructor(msg) {\n super(TwirpErrorCode.Internal, msg);\n }\n}\nexports.InternalServerError = InternalServerError;\n/**\n * InternalErrorWith makes an internal error, wrapping the original error and using it\n * for the error message, and with metadata \"cause\" with the original error type.\n * This function is used by Twirp services to wrap non-Twirp errors as internal errors.\n * The wrapped error can be extracted later with err.cause()\n */\nclass InternalServerErrorWith extends InternalServerError {\n constructor(err) {\n super(err.message);\n this.withMeta(\"cause\", err.name);\n this.withCause(err);\n }\n}\nexports.InternalServerErrorWith = InternalServerErrorWith;\n/**\n * A standard BadRoute Error\n */\nclass BadRouteError extends TwirpError {\n constructor(msg, method, url) {\n super(TwirpErrorCode.BadRoute, msg);\n this.withMeta(\"twirp_invalid_route\", method + \" \" + url);\n }\n}\nexports.BadRouteError = BadRouteError;\nvar TwirpErrorCode;\n(function (TwirpErrorCode) {\n // Canceled indicates the operation was cancelled (typically by the caller).\n TwirpErrorCode[\"Canceled\"] = \"canceled\";\n // Unknown error. For example when handling errors raised by APIs that do not\n // return enough error information.\n TwirpErrorCode[\"Unknown\"] = \"unknown\";\n // InvalidArgument indicates client specified an invalid argument. It\n // indicates arguments that are problematic regardless of the state of the\n // system (i.e. a malformed file name, required argument, number out of range,\n // etc.).\n TwirpErrorCode[\"InvalidArgument\"] = \"invalid_argument\";\n // Malformed indicates an error occurred while decoding the client's request.\n // This may mean that the message was encoded improperly, or that there is a\n // disagreement in message format between the client and server.\n TwirpErrorCode[\"Malformed\"] = \"malformed\";\n // DeadlineExceeded means operation expired before completion. For operations\n // that change the state of the system, this error may be returned even if the\n // operation has completed successfully (timeout).\n TwirpErrorCode[\"DeadlineExceeded\"] = \"deadline_exceeded\";\n // NotFound means some requested entity was not found.\n TwirpErrorCode[\"NotFound\"] = \"not_found\";\n // BadRoute means that the requested URL path wasn't routable to a Twirp\n // service and method. This is returned by the generated server, and usually\n // shouldn't be returned by applications. Instead, applications should use\n // NotFound or Unimplemented.\n TwirpErrorCode[\"BadRoute\"] = \"bad_route\";\n // AlreadyExists means an attempt to create an entity failed because one\n // already exists.\n TwirpErrorCode[\"AlreadyExists\"] = \"already_exists\";\n // PermissionDenied indicates the caller does not have permission to execute\n // the specified operation. It must not be used if the caller cannot be\n // identified (Unauthenticated).\n TwirpErrorCode[\"PermissionDenied\"] = \"permission_denied\";\n // Unauthenticated indicates the request does not have valid authentication\n // credentials for the operation.\n TwirpErrorCode[\"Unauthenticated\"] = \"unauthenticated\";\n // ResourceExhausted indicates some resource has been exhausted, perhaps a\n // per-user quota, or perhaps the entire file system is out of space.\n TwirpErrorCode[\"ResourceExhausted\"] = \"resource_exhausted\";\n // FailedPrecondition indicates operation was rejected because the system is\n // not in a state required for the operation's execution. For example, doing\n // an rmdir operation on a directory that is non-empty, or on a non-directory\n // object, or when having conflicting read-modify-write on the same resource.\n TwirpErrorCode[\"FailedPrecondition\"] = \"failed_precondition\";\n // Aborted indicates the operation was aborted, typically due to a concurrency\n // issue like sequencer check failures, transaction aborts, etc.\n TwirpErrorCode[\"Aborted\"] = \"aborted\";\n // OutOfRange means operation was attempted past the valid range. For example,\n // seeking or reading past end of a paginated collection.\n //\n // Unlike InvalidArgument, this error indicates a problem that may be fixed if\n // the system state changes (i.e. adding more items to the collection).\n //\n // There is a fair bit of overlap between FailedPrecondition and OutOfRange.\n // We recommend using OutOfRange (the more specific error) when it applies so\n // that callers who are iterating through a space can easily look for an\n // OutOfRange error to detect when they are done.\n TwirpErrorCode[\"OutOfRange\"] = \"out_of_range\";\n // Unimplemented indicates operation is not implemented or not\n // supported/enabled in this service.\n TwirpErrorCode[\"Unimplemented\"] = \"unimplemented\";\n // Internal errors. When some invariants expected by the underlying system\n // have been broken. In other words, something bad happened in the library or\n // backend service. Do not confuse with HTTP Internal Server Error; an\n // Internal error could also happen on the client code, i.e. when parsing a\n // server response.\n TwirpErrorCode[\"Internal\"] = \"internal\";\n // Unavailable indicates the service is currently unavailable. This is a most\n // likely a transient condition and may be corrected by retrying with a\n // backoff.\n TwirpErrorCode[\"Unavailable\"] = \"unavailable\";\n // DataLoss indicates unrecoverable data loss or corruption.\n TwirpErrorCode[\"DataLoss\"] = \"data_loss\";\n})(TwirpErrorCode = exports.TwirpErrorCode || (exports.TwirpErrorCode = {}));\n// ServerHTTPStatusFromErrorCode maps a Twirp error type into a similar HTTP\n// response status. It is used by the Twirp server handler to set the HTTP\n// response status code. Returns 0 if the ErrorCode is invalid.\nfunction httpStatusFromErrorCode(code) {\n switch (code) {\n case TwirpErrorCode.Canceled:\n return 408; // RequestTimeout\n case TwirpErrorCode.Unknown:\n return 500; // Internal Server Error\n case TwirpErrorCode.InvalidArgument:\n return 400; // BadRequest\n case TwirpErrorCode.Malformed:\n return 400; // BadRequest\n case TwirpErrorCode.DeadlineExceeded:\n return 408; // RequestTimeout\n case TwirpErrorCode.NotFound:\n return 404; // Not Found\n case TwirpErrorCode.BadRoute:\n return 404; // Not Found\n case TwirpErrorCode.AlreadyExists:\n return 409; // Conflict\n case TwirpErrorCode.PermissionDenied:\n return 403; // Forbidden\n case TwirpErrorCode.Unauthenticated:\n return 401; // Unauthorized\n case TwirpErrorCode.ResourceExhausted:\n return 429; // Too Many Requests\n case TwirpErrorCode.FailedPrecondition:\n return 412; // Precondition Failed\n case TwirpErrorCode.Aborted:\n return 409; // Conflict\n case TwirpErrorCode.OutOfRange:\n return 400; // Bad Request\n case TwirpErrorCode.Unimplemented:\n return 501; // Not Implemented\n case TwirpErrorCode.Internal:\n return 500; // Internal Server Error\n case TwirpErrorCode.Unavailable:\n return 503; // Service Unavailable\n case TwirpErrorCode.DataLoss:\n return 500; // Internal Server Error\n default:\n return 0; // Invalid!\n }\n}\nexports.httpStatusFromErrorCode = httpStatusFromErrorCode;\n// IsValidErrorCode returns true if is one of the valid predefined constants.\nfunction isValidErrorCode(code) {\n return httpStatusFromErrorCode(code) != 0;\n}\nexports.isValidErrorCode = isValidErrorCode;\n", "\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.parseTwirpPath = exports.getRequestData = exports.validateRequest = exports.getContentType = exports.TwirpContentType = void 0;\nconst errors_1 = require(\"./errors\");\n/**\n * Supported Twirp Content-Type\n */\nvar TwirpContentType;\n(function (TwirpContentType) {\n TwirpContentType[TwirpContentType[\"Protobuf\"] = 0] = \"Protobuf\";\n TwirpContentType[TwirpContentType[\"JSON\"] = 1] = \"JSON\";\n TwirpContentType[TwirpContentType[\"Unknown\"] = 2] = \"Unknown\";\n})(TwirpContentType = exports.TwirpContentType || (exports.TwirpContentType = {}));\n/**\n * Get supported content-type\n * @param mimeType\n */\nfunction getContentType(mimeType) {\n switch (mimeType) {\n case \"application/protobuf\":\n return TwirpContentType.Protobuf;\n case \"application/json\":\n return TwirpContentType.JSON;\n default:\n return TwirpContentType.Unknown;\n }\n}\nexports.getContentType = getContentType;\n/**\n * Validate a twirp request\n * @param ctx\n * @param request\n * @param pathPrefix\n */\nfunction validateRequest(ctx, request, pathPrefix) {\n if (request.method !== \"POST\") {\n const msg = `unsupported method ${request.method} (only POST is allowed)`;\n throw new errors_1.BadRouteError(msg, request.method || \"\", request.url || \"\");\n }\n const path = parseTwirpPath(request.url || \"\");\n if (path.pkgService !==\n (ctx.packageName ? ctx.packageName + \".\" : \"\") + ctx.serviceName) {\n const msg = `no handler for path ${request.url}`;\n throw new errors_1.BadRouteError(msg, request.method || \"\", request.url || \"\");\n }\n if (path.prefix !== pathPrefix) {\n const msg = `invalid path prefix ${path.prefix}, expected ${pathPrefix}, on path ${request.url}`;\n throw new errors_1.BadRouteError(msg, request.method || \"\", request.url || \"\");\n }\n const mimeContentType = request.headers[\"content-type\"] || \"\";\n if (ctx.contentType === TwirpContentType.Unknown) {\n const msg = `unexpected Content-Type: ${request.headers[\"content-type\"]}`;\n throw new errors_1.BadRouteError(msg, request.method || \"\", request.url || \"\");\n }\n return Object.assign(Object.assign({}, path), { mimeContentType, contentType: ctx.contentType });\n}\nexports.validateRequest = validateRequest;\n/**\n * Get request data from the body\n * @param req\n */\nfunction getRequestData(req) {\n return new Promise((resolve, reject) => {\n const reqWithRawBody = req;\n if (reqWithRawBody.rawBody instanceof Buffer) {\n resolve(reqWithRawBody.rawBody);\n return;\n }\n const chunks = [];\n req.on(\"data\", (chunk) => chunks.push(chunk));\n req.on(\"end\", () => __awaiter(this, void 0, void 0, function* () {\n const data = Buffer.concat(chunks);\n resolve(data);\n }));\n req.on(\"error\", (err) => {\n if (req.aborted) {\n reject(new errors_1.TwirpError(errors_1.TwirpErrorCode.DeadlineExceeded, \"failed to read request: deadline exceeded\"));\n }\n else {\n reject(new errors_1.TwirpError(errors_1.TwirpErrorCode.Malformed, err.message).withCause(err));\n }\n });\n req.on(\"close\", () => {\n reject(new errors_1.TwirpError(errors_1.TwirpErrorCode.Canceled, \"failed to read request: context canceled\"));\n });\n });\n}\nexports.getRequestData = getRequestData;\n/**\n * Parses twirp url path\n * @param path\n */\nfunction parseTwirpPath(path) {\n const parts = path.split(\"/\");\n if (parts.length < 2) {\n return {\n pkgService: \"\",\n method: \"\",\n prefix: \"\",\n };\n }\n return {\n method: parts[parts.length - 1],\n pkgService: parts[parts.length - 2],\n prefix: parts.slice(0, parts.length - 2).join(\"/\"),\n };\n}\nexports.parseTwirpPath = parseTwirpPath;\n", "\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.writeError = exports.TwirpServer = void 0;\nconst hooks_1 = require(\"./hooks\");\nconst request_1 = require(\"./request\");\nconst errors_1 = require(\"./errors\");\n/**\n * Runtime server implementation of a TwirpServer\n */\nclass TwirpServer {\n constructor(options) {\n this.pathPrefix = \"/twirp\";\n this.hooks = [];\n this.interceptors = [];\n this.packageName = options.packageName;\n this.serviceName = options.serviceName;\n this.methodList = options.methodList;\n this.matchRoute = options.matchRoute;\n this.service = options.service;\n }\n /**\n * Returns the prefix for this server\n */\n get prefix() {\n return this.pathPrefix;\n }\n /**\n * The http handler for twirp complaint endpoints\n * @param options\n */\n httpHandler(options) {\n return (req, resp) => {\n // setup prefix\n if ((options === null || options === void 0 ? void 0 : options.prefix) !== undefined) {\n this.withPrefix(options.prefix);\n }\n return this._httpHandler(req, resp);\n };\n }\n /**\n * Adds interceptors or hooks to the request stack\n * @param middlewares\n */\n use(...middlewares) {\n middlewares.forEach((middleware) => {\n if (hooks_1.isHook(middleware)) {\n this.hooks.push(middleware);\n return this;\n }\n this.interceptors.push(middleware);\n });\n return this;\n }\n /**\n * Adds a prefix to the service url path\n * @param prefix\n */\n withPrefix(prefix) {\n if (prefix === false) {\n this.pathPrefix = \"\";\n }\n else {\n this.pathPrefix = prefix;\n }\n return this;\n }\n /**\n * Returns the regex matching path for this twirp server\n */\n matchingPath() {\n const baseRegex = this.baseURI().replace(/\\./g, \"\\\\.\");\n return new RegExp(`${baseRegex}\\/(${this.methodList.join(\"|\")})`);\n }\n /**\n * Returns the base URI for this twirp server\n */\n baseURI() {\n return `${this.pathPrefix}/${this.packageName ? this.packageName + \".\" : \"\"}${this.serviceName}`;\n }\n /**\n * Create a twirp context\n * @param req\n * @param res\n * @private\n */\n createContext(req, res) {\n return {\n packageName: this.packageName,\n serviceName: this.serviceName,\n methodName: \"\",\n contentType: request_1.getContentType(req.headers[\"content-type\"]),\n req: req,\n res: res,\n };\n }\n /**\n * Twrip server http handler implementation\n * @param req\n * @param resp\n * @private\n */\n _httpHandler(req, resp) {\n return __awaiter(this, void 0, void 0, function* () {\n const ctx = this.createContext(req, resp);\n try {\n yield this.invokeHook(\"requestReceived\", ctx);\n const { method, mimeContentType } = request_1.validateRequest(ctx, req, this.pathPrefix || \"\");\n const handler = this.matchRoute(method, {\n onMatch: (ctx) => {\n return this.invokeHook(\"requestRouted\", ctx);\n },\n onNotFound: () => {\n const msg = `no handler for path ${req.url}`;\n throw new errors_1.BadRouteError(msg, req.method || \"\", req.url || \"\");\n },\n });\n const body = yield request_1.getRequestData(req);\n const response = yield handler(ctx, this.service, body, this.interceptors);\n yield Promise.all([\n this.invokeHook(\"responsePrepared\", ctx),\n // keep backwards compatibility till next release\n this.invokeHook(\"requestPrepared\", ctx),\n ]);\n resp.statusCode = 200;\n resp.setHeader(\"Content-Type\", mimeContentType);\n resp.end(response);\n }\n catch (e) {\n yield this.invokeHook(\"error\", ctx, mustBeTwirpError(e));\n if (!resp.headersSent) {\n writeError(resp, e);\n }\n }\n finally {\n yield Promise.all([\n this.invokeHook(\"responseSent\", ctx),\n // keep backwards compatibility till next release\n this.invokeHook(\"requestSent\", ctx),\n ]);\n }\n });\n }\n /**\n * Invoke a hook\n * @param hookName\n * @param ctx\n * @param err\n * @protected\n */\n invokeHook(hookName, ctx, err) {\n return __awaiter(this, void 0, void 0, function* () {\n if (this.hooks.length === 0) {\n return;\n }\n const chainedHooks = hooks_1.chainHooks(...this.hooks);\n const hook = chainedHooks === null || chainedHooks === void 0 ? void 0 : chainedHooks[hookName];\n if (hook) {\n yield hook(ctx, err || new errors_1.InternalServerError(\"internal server error\"));\n }\n });\n }\n}\nexports.TwirpServer = TwirpServer;\n/**\n * Write http error response\n * @param res\n * @param error\n */\nfunction writeError(res, error) {\n const twirpError = mustBeTwirpError(error);\n res.setHeader(\"Content-Type\", \"application/json\");\n res.statusCode = errors_1.httpStatusFromErrorCode(twirpError.code);\n res.end(twirpError.toJSON());\n}\nexports.writeError = writeError;\n/**\n * Make sure that the error passed is a TwirpError\n * otherwise it will wrap it into an InternalError\n * @param err\n */\nfunction mustBeTwirpError(err) {\n if (err instanceof errors_1.TwirpError) {\n return err;\n }\n return new errors_1.InternalServerErrorWith(err);\n}\n", "\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.chainInterceptors = void 0;\n// chains multiple Interceptors into a single Interceptor.\n// The first interceptor wraps the second one, and so on.\n// Returns null if interceptors is empty.\nfunction chainInterceptors(...interceptors) {\n if (interceptors.length === 0) {\n return;\n }\n if (interceptors.length === 1) {\n return interceptors[0];\n }\n const first = interceptors[0];\n return (ctx, request, handler) => __awaiter(this, void 0, void 0, function* () {\n let next = handler;\n for (let i = interceptors.length - 1; i > 0; i--) {\n next = ((next) => (ctx, typedRequest) => {\n return interceptors[i](ctx, typedRequest, next);\n })(next);\n }\n return first(ctx, request, next);\n });\n}\nexports.chainInterceptors = chainInterceptors;\n", "'use strict'\n\nfunction _process (v, mod) {\n var i\n var r\n\n if (typeof mod === 'function') {\n r = mod(v)\n if (r !== undefined) {\n v = r\n }\n } else if (Array.isArray(mod)) {\n for (i = 0; i < mod.length; i++) {\n r = mod[i](v)\n if (r !== undefined) {\n v = r\n }\n }\n }\n\n return v\n}\n\nfunction parseKey (key, val) {\n // detect negative index notation\n if (key[0] === '-' && Array.isArray(val) && /^-\\d+$/.test(key)) {\n return val.length + parseInt(key, 10)\n }\n return key\n}\n\nfunction isIndex (k) {\n return /^\\d+$/.test(k)\n}\n\nfunction isObject (val) {\n return Object.prototype.toString.call(val) === '[object Object]'\n}\n\nfunction isArrayOrObject (val) {\n return Object(val) === val\n}\n\nfunction isEmptyObject (val) {\n return Object.keys(val).length === 0\n}\n\nvar blacklist = ['__proto__', 'prototype', 'constructor']\nvar blacklistFilter = function (part) { return blacklist.indexOf(part) === -1 }\n\nfunction parsePath (path, sep) {\n if (path.indexOf('[') >= 0) {\n path = path.replace(/\\[/g, sep).replace(/]/g, '')\n }\n\n var parts = path.split(sep)\n\n var check = parts.filter(blacklistFilter)\n\n if (check.length !== parts.length) {\n throw Error('Refusing to update blacklisted property ' + path)\n }\n\n return parts\n}\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty\n\nfunction DotObject (separator, override, useArray, useBrackets) {\n if (!(this instanceof DotObject)) {\n return new DotObject(separator, override, useArray, useBrackets)\n }\n\n if (typeof override === 'undefined') override = false\n if (typeof useArray === 'undefined') useArray = true\n if (typeof useBrackets === 'undefined') useBrackets = true\n this.separator = separator || '.'\n this.override = override\n this.useArray = useArray\n this.useBrackets = useBrackets\n this.keepArray = false\n\n // contains touched arrays\n this.cleanup = []\n}\n\nvar dotDefault = new DotObject('.', false, true, true)\nfunction wrap (method) {\n return function () {\n return dotDefault[method].apply(dotDefault, arguments)\n }\n}\n\nDotObject.prototype._fill = function (a, obj, v, mod) {\n var k = a.shift()\n\n if (a.length > 0) {\n obj[k] = obj[k] || (this.useArray && isIndex(a[0]) ? [] : {})\n\n if (!isArrayOrObject(obj[k])) {\n if (this.override) {\n obj[k] = {}\n } else {\n if (!(isArrayOrObject(v) && isEmptyObject(v))) {\n throw new Error(\n 'Trying to redefine `' + k + '` which is a ' + typeof obj[k]\n )\n }\n\n return\n }\n }\n\n this._fill(a, obj[k], v, mod)\n } else {\n if (!this.override && isArrayOrObject(obj[k]) && !isEmptyObject(obj[k])) {\n if (!(isArrayOrObject(v) && isEmptyObject(v))) {\n throw new Error(\"Trying to redefine non-empty obj['\" + k + \"']\")\n }\n\n return\n }\n\n obj[k] = _process(v, mod)\n }\n}\n\n/**\n *\n * Converts an object with dotted-key/value pairs to it's expanded version\n *\n * Optionally transformed by a set of modifiers.\n *\n * Usage:\n *\n * var row = {\n * 'nr': 200,\n * 'doc.name': ' My Document '\n * }\n *\n * var mods = {\n * 'doc.name': [_s.trim, _s.underscored]\n * }\n *\n * dot.object(row, mods)\n *\n * @param {Object} obj\n * @param {Object} mods\n */\nDotObject.prototype.object = function (obj, mods) {\n var self = this\n\n Object.keys(obj).forEach(function (k) {\n var mod = mods === undefined ? null : mods[k]\n // normalize array notation.\n var ok = parsePath(k, self.separator).join(self.separator)\n\n if (ok.indexOf(self.separator) !== -1) {\n self._fill(ok.split(self.separator), obj, obj[k], mod)\n delete obj[k]\n } else {\n obj[k] = _process(obj[k], mod)\n }\n })\n\n return obj\n}\n\n/**\n * @param {String} path dotted path\n * @param {String} v value to be set\n * @param {Object} obj object to be modified\n * @param {Function|Array} mod optional modifier\n */\nDotObject.prototype.str = function (path, v, obj, mod) {\n var ok = parsePath(path, this.separator).join(this.separator)\n\n if (path.indexOf(this.separator) !== -1) {\n this._fill(ok.split(this.separator), obj, v, mod)\n } else {\n obj[path] = _process(v, mod)\n }\n\n return obj\n}\n\n/**\n *\n * Pick a value from an object using dot notation.\n *\n * Optionally remove the value\n *\n * @param {String} path\n * @param {Object} obj\n * @param {Boolean} remove\n */\nDotObject.prototype.pick = function (path, obj, remove, reindexArray) {\n var i\n var keys\n var val\n var key\n var cp\n\n keys = parsePath(path, this.separator)\n for (i = 0; i < keys.length; i++) {\n key = parseKey(keys[i], obj)\n if (obj && typeof obj === 'object' && key in obj) {\n if (i === keys.length - 1) {\n if (remove) {\n val = obj[key]\n if (reindexArray && Array.isArray(obj)) {\n obj.splice(key, 1)\n } else {\n delete obj[key]\n }\n if (Array.isArray(obj)) {\n cp = keys.slice(0, -1).join('.')\n if (this.cleanup.indexOf(cp) === -1) {\n this.cleanup.push(cp)\n }\n }\n return val\n } else {\n return obj[key]\n }\n } else {\n obj = obj[key]\n }\n } else {\n return undefined\n }\n }\n if (remove && Array.isArray(obj)) {\n obj = obj.filter(function (n) {\n return n !== undefined\n })\n }\n return obj\n}\n/**\n *\n * Delete value from an object using dot notation.\n *\n * @param {String} path\n * @param {Object} obj\n * @return {any} The removed value\n */\nDotObject.prototype.delete = function (path, obj) {\n return this.remove(path, obj, true)\n}\n\n/**\n *\n * Remove value from an object using dot notation.\n *\n * Will remove multiple items if path is an array.\n * In this case array indexes will be retained until all\n * removals have been processed.\n *\n * Use dot.delete() to automatically re-index arrays.\n *\n * @param {String|Array} path\n * @param {Object} obj\n * @param {Boolean} reindexArray\n * @return {any} The removed value\n */\nDotObject.prototype.remove = function (path, obj, reindexArray) {\n var i\n\n this.cleanup = []\n if (Array.isArray(path)) {\n for (i = 0; i < path.length; i++) {\n this.pick(path[i], obj, true, reindexArray)\n }\n if (!reindexArray) {\n this._cleanup(obj)\n }\n return obj\n } else {\n return this.pick(path, obj, true, reindexArray)\n }\n}\n\nDotObject.prototype._cleanup = function (obj) {\n var ret\n var i\n var keys\n var root\n if (this.cleanup.length) {\n for (i = 0; i < this.cleanup.length; i++) {\n keys = this.cleanup[i].split('.')\n root = keys.splice(0, -1).join('.')\n ret = root ? this.pick(root, obj) : obj\n ret = ret[keys[0]].filter(function (v) {\n return v !== undefined\n })\n this.set(this.cleanup[i], ret, obj)\n }\n this.cleanup = []\n }\n}\n\n/**\n * Alias method for `dot.remove`\n *\n * Note: this is not an alias for dot.delete()\n *\n * @param {String|Array} path\n * @param {Object} obj\n * @param {Boolean} reindexArray\n * @return {any} The removed value\n */\nDotObject.prototype.del = DotObject.prototype.remove\n\n/**\n *\n * Move a property from one place to the other.\n *\n * If the source path does not exist (undefined)\n * the target property will not be set.\n *\n * @param {String} source\n * @param {String} target\n * @param {Object} obj\n * @param {Function|Array} mods\n * @param {Boolean} merge\n */\nDotObject.prototype.move = function (source, target, obj, mods, merge) {\n if (typeof mods === 'function' || Array.isArray(mods)) {\n this.set(target, _process(this.pick(source, obj, true), mods), obj, merge)\n } else {\n merge = mods\n this.set(target, this.pick(source, obj, true), obj, merge)\n }\n\n return obj\n}\n\n/**\n *\n * Transfer a property from one object to another object.\n *\n * If the source path does not exist (undefined)\n * the property on the other object will not be set.\n *\n * @param {String} source\n * @param {String} target\n * @param {Object} obj1\n * @param {Object} obj2\n * @param {Function|Array} mods\n * @param {Boolean} merge\n */\nDotObject.prototype.transfer = function (\n source,\n target,\n obj1,\n obj2,\n mods,\n merge\n) {\n if (typeof mods === 'function' || Array.isArray(mods)) {\n this.set(\n target,\n _process(this.pick(source, obj1, true), mods),\n obj2,\n merge\n )\n } else {\n merge = mods\n this.set(target, this.pick(source, obj1, true), obj2, merge)\n }\n\n return obj2\n}\n\n/**\n *\n * Copy a property from one object to another object.\n *\n * If the source path does not exist (undefined)\n * the property on the other object will not be set.\n *\n * @param {String} source\n * @param {String} target\n * @param {Object} obj1\n * @param {Object} obj2\n * @param {Function|Array} mods\n * @param {Boolean} merge\n */\nDotObject.prototype.copy = function (source, target, obj1, obj2, mods, merge) {\n if (typeof mods === 'function' || Array.isArray(mods)) {\n this.set(\n target,\n _process(\n // clone what is picked\n JSON.parse(JSON.stringify(this.pick(source, obj1, false))),\n mods\n ),\n obj2,\n merge\n )\n } else {\n merge = mods\n this.set(target, this.pick(source, obj1, false), obj2, merge)\n }\n\n return obj2\n}\n\n/**\n *\n * Set a property on an object using dot notation.\n *\n * @param {String} path\n * @param {any} val\n * @param {Object} obj\n * @param {Boolean} merge\n */\nDotObject.prototype.set = function (path, val, obj, merge) {\n var i\n var k\n var keys\n var key\n\n // Do not operate if the value is undefined.\n if (typeof val === 'undefined') {\n return obj\n }\n keys = parsePath(path, this.separator)\n\n for (i = 0; i < keys.length; i++) {\n key = keys[i]\n if (i === keys.length - 1) {\n if (merge && isObject(val) && isObject(obj[key])) {\n for (k in val) {\n if (hasOwnProperty.call(val, k)) {\n obj[key][k] = val[k]\n }\n }\n } else if (merge && Array.isArray(obj[key]) && Array.isArray(val)) {\n for (var j = 0; j < val.length; j++) {\n obj[keys[i]].push(val[j])\n }\n } else {\n obj[key] = val\n }\n } else if (\n // force the value to be an object\n !hasOwnProperty.call(obj, key) ||\n (!isObject(obj[key]) && !Array.isArray(obj[key]))\n ) {\n // initialize as array if next key is numeric\n if (/^\\d+$/.test(keys[i + 1])) {\n obj[key] = []\n } else {\n obj[key] = {}\n }\n }\n obj = obj[key]\n }\n return obj\n}\n\n/**\n *\n * Transform an object\n *\n * Usage:\n *\n * var obj = {\n * \"id\": 1,\n * \"some\": {\n * \"thing\": \"else\"\n * }\n * }\n *\n * var transform = {\n * \"id\": \"nr\",\n * \"some.thing\": \"name\"\n * }\n *\n * var tgt = dot.transform(transform, obj)\n *\n * @param {Object} recipe Transform recipe\n * @param {Object} obj Object to be transformed\n * @param {Array} mods modifiers for the target\n */\nDotObject.prototype.transform = function (recipe, obj, tgt) {\n obj = obj || {}\n tgt = tgt || {}\n Object.keys(recipe).forEach(\n function (key) {\n this.set(recipe[key], this.pick(key, obj), tgt)\n }.bind(this)\n )\n return tgt\n}\n\n/**\n *\n * Convert object to dotted-key/value pair\n *\n * Usage:\n *\n * var tgt = dot.dot(obj)\n *\n * or\n *\n * var tgt = {}\n * dot.dot(obj, tgt)\n *\n * @param {Object} obj source object\n * @param {Object} tgt target object\n * @param {Array} path path array (internal)\n */\nDotObject.prototype.dot = function (obj, tgt, path) {\n tgt = tgt || {}\n path = path || []\n var isArray = Array.isArray(obj)\n\n Object.keys(obj).forEach(\n function (key) {\n var index = isArray && this.useBrackets ? '[' + key + ']' : key\n if (\n isArrayOrObject(obj[key]) &&\n ((isObject(obj[key]) && !isEmptyObject(obj[key])) ||\n (Array.isArray(obj[key]) && !this.keepArray && obj[key].length !== 0))\n ) {\n if (isArray && this.useBrackets) {\n var previousKey = path[path.length - 1] || ''\n return this.dot(\n obj[key],\n tgt,\n path.slice(0, -1).concat(previousKey + index)\n )\n } else {\n return this.dot(obj[key], tgt, path.concat(index))\n }\n } else {\n if (isArray && this.useBrackets) {\n tgt[path.join(this.separator).concat('[' + key + ']')] = obj[key]\n } else {\n tgt[path.concat(index).join(this.separator)] = obj[key]\n }\n }\n }.bind(this)\n )\n return tgt\n}\n\nDotObject.pick = wrap('pick')\nDotObject.move = wrap('move')\nDotObject.transfer = wrap('transfer')\nDotObject.transform = wrap('transform')\nDotObject.copy = wrap('copy')\nDotObject.object = wrap('object')\nDotObject.str = wrap('str')\nDotObject.set = wrap('set')\nDotObject.delete = wrap('delete')\nDotObject.del = DotObject.remove = wrap('remove')\nDotObject.dot = wrap('dot');\n['override', 'overwrite'].forEach(function (prop) {\n Object.defineProperty(DotObject, prop, {\n get: function () {\n return dotDefault.override\n },\n set: function (val) {\n dotDefault.override = !!val\n }\n })\n});\n['useArray', 'keepArray', 'useBrackets'].forEach(function (prop) {\n Object.defineProperty(DotObject, prop, {\n get: function () {\n return dotDefault[prop]\n },\n set: function (val) {\n dotDefault[prop] = val\n }\n })\n})\n\nDotObject._process = _process\n\nmodule.exports = DotObject\n", "\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.FetchRPC = exports.wrapErrorResponseToTwirpError = exports.NodeHttpRPC = void 0;\nconst http = __importStar(require(\"http\"));\nconst https = __importStar(require(\"https\"));\nconst url_1 = require(\"url\");\nconst errors_1 = require(\"./errors\");\n/**\n * a node HTTP RPC implementation\n * @param options\n * @constructor\n */\nconst NodeHttpRPC = (options) => ({\n request(service, method, contentType, data) {\n let client;\n return new Promise((resolve, rejected) => {\n const responseChunks = [];\n const requestData = contentType === \"application/protobuf\"\n ? Buffer.from(data)\n : JSON.stringify(data);\n const url = new url_1.URL(options.baseUrl);\n const isHttps = url.protocol === \"https:\";\n if (isHttps) {\n client = https;\n }\n else {\n client = http;\n }\n const prefix = url.pathname !== \"/\" ? url.pathname : \"\";\n const req = client\n .request(Object.assign(Object.assign({}, (options ? options : {})), { method: \"POST\", protocol: url.protocol, host: url.hostname, port: url.port ? url.port : isHttps ? 443 : 80, path: `${prefix}/${service}/${method}`, headers: Object.assign(Object.assign({}, (options.headers ? options.headers : {})), { \"Content-Type\": contentType, \"Content-Length\": contentType === \"application/protobuf\"\n ? Buffer.byteLength(requestData)\n : Buffer.from(requestData).byteLength }) }), (res) => {\n res.on(\"data\", (chunk) => responseChunks.push(chunk));\n res.on(\"end\", () => {\n const data = Buffer.concat(responseChunks);\n if (res.statusCode != 200) {\n rejected(wrapErrorResponseToTwirpError(data.toString()));\n }\n else {\n if (contentType === \"application/json\") {\n resolve(JSON.parse(data.toString()));\n }\n else {\n resolve(data);\n }\n }\n });\n res.on(\"error\", (err) => {\n rejected(err);\n });\n })\n .on(\"error\", (err) => {\n rejected(err);\n });\n req.end(requestData);\n });\n },\n});\nexports.NodeHttpRPC = NodeHttpRPC;\nfunction wrapErrorResponseToTwirpError(errorResponse) {\n return errors_1.TwirpError.fromObject(JSON.parse(errorResponse));\n}\nexports.wrapErrorResponseToTwirpError = wrapErrorResponseToTwirpError;\n/**\n * a browser fetch RPC implementation\n */\nconst FetchRPC = (options) => ({\n request(service, method, contentType, data) {\n return __awaiter(this, void 0, void 0, function* () {\n const headers = new Headers(options.headers);\n headers.set(\"content-type\", contentType);\n const response = yield fetch(`${options.baseUrl}/${service}/${method}`, Object.assign(Object.assign({}, options), { method: \"POST\", headers, body: data instanceof Uint8Array ? data : JSON.stringify(data) }));\n if (response.status === 200) {\n if (contentType === \"application/json\") {\n return yield response.json();\n }\n return new Uint8Array(yield response.arrayBuffer());\n }\n throw errors_1.TwirpError.fromObject(yield response.json());\n });\n },\n});\nexports.FetchRPC = FetchRPC;\n", "\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Gateway = exports.Pattern = void 0;\nconst querystring_1 = require(\"querystring\");\nconst dotObject = __importStar(require(\"dot-object\"));\nconst request_1 = require(\"./request\");\nconst errors_1 = require(\"./errors\");\nconst http_client_1 = require(\"./http.client\");\nconst server_1 = require(\"./server\");\nvar Pattern;\n(function (Pattern) {\n Pattern[\"POST\"] = \"post\";\n Pattern[\"GET\"] = \"get\";\n Pattern[\"PATCH\"] = \"patch\";\n Pattern[\"PUT\"] = \"put\";\n Pattern[\"DELETE\"] = \"delete\";\n})(Pattern = exports.Pattern || (exports.Pattern = {}));\n/**\n * The Gateway proxies http requests to Twirp Compliant\n * handlers\n */\nclass Gateway {\n constructor(routes) {\n this.routes = routes;\n }\n /**\n * Middleware that rewrite the current request\n * to a Twirp compliant request\n */\n twirpRewrite(prefix = \"/twirp\") {\n return (req, resp, next) => {\n this.rewrite(req, resp, prefix)\n .then(() => next())\n .catch((e) => {\n if (e instanceof errors_1.TwirpError) {\n if (e.code !== errors_1.TwirpErrorCode.NotFound) {\n server_1.writeError(resp, e);\n }\n else {\n next();\n }\n }\n });\n };\n }\n /**\n * Rewrite an incoming request to a Twirp compliant request\n * @param req\n * @param resp\n * @param prefix\n */\n rewrite(req, resp, prefix = \"/twirp\") {\n return __awaiter(this, void 0, void 0, function* () {\n const [match, route] = this.matchRoute(req);\n const body = yield this.prepareTwirpBody(req, match, route);\n const twirpUrl = `${prefix}/${route.packageName}.${route.serviceName}/${route.methodName}`;\n req.url = twirpUrl;\n req.originalUrl = twirpUrl;\n req.method = \"POST\";\n req.headers[\"content-type\"] = \"application/json\";\n req.rawBody = Buffer.from(JSON.stringify(body));\n if (route.responseBodyKey) {\n const endFn = resp.end.bind(resp);\n resp.end = function (chunk) {\n if (resp.statusCode === 200) {\n endFn(`{ \"${route.responseBodyKey}\": ${chunk} }`);\n }\n else {\n endFn(chunk);\n }\n };\n }\n });\n }\n /**\n * Create a reverse proxy handler to\n * proxy http requests to Twirp Compliant handlers\n * @param httpClientOption\n */\n reverseProxy(httpClientOption) {\n const client = http_client_1.NodeHttpRPC(httpClientOption);\n return (req, res) => __awaiter(this, void 0, void 0, function* () {\n try {\n const [match, route] = this.matchRoute(req);\n const body = yield this.prepareTwirpBody(req, match, route);\n const response = yield client.request(`${route.packageName}.${route.serviceName}`, route.methodName, \"application/json\", body);\n res.statusCode = 200;\n res.setHeader(\"content-type\", \"application/json\");\n let jsonResponse;\n if (route.responseBodyKey) {\n jsonResponse = JSON.stringify({ [route.responseBodyKey]: response });\n }\n else {\n jsonResponse = JSON.stringify(response);\n }\n res.end(jsonResponse);\n }\n catch (e) {\n server_1.writeError(res, e);\n }\n });\n }\n /**\n * Prepares twirp body requests using http.google.annotions\n * compliant spec\n *\n * @param req\n * @param match\n * @param route\n * @protected\n */\n prepareTwirpBody(req, match, route) {\n return __awaiter(this, void 0, void 0, function* () {\n const _a = match.params, { query_string } = _a, params = __rest(_a, [\"query_string\"]);\n let requestBody = Object.assign({}, params);\n if (query_string && route.bodyKey !== \"*\") {\n const queryParams = this.parseQueryString(query_string);\n requestBody = Object.assign(Object.assign({}, queryParams), requestBody);\n }\n let body = {};\n if (route.bodyKey) {\n const data = yield request_1.getRequestData(req);\n try {\n const jsonBody = JSON.parse(data.toString() || \"{}\");\n if (route.bodyKey === \"*\") {\n body = jsonBody;\n }\n else {\n body[route.bodyKey] = jsonBody;\n }\n }\n catch (e) {\n const msg = \"the json request could not be decoded\";\n throw new errors_1.TwirpError(errors_1.TwirpErrorCode.Malformed, msg).withCause(e, true);\n }\n }\n return Object.assign(Object.assign({}, body), requestBody);\n });\n }\n /**\n * Matches a route\n * @param req\n */\n matchRoute(req) {\n var _a;\n const httpMethod = (_a = req.method) === null || _a === void 0 ? void 0 : _a.toLowerCase();\n if (!httpMethod) {\n throw new errors_1.BadRouteError(`method not allowed`, req.method || \"\", req.url || \"\");\n }\n const routes = this.routes[httpMethod];\n for (const route of routes) {\n const match = route.matcher(req.url || \"/\");\n if (match) {\n return [match, route];\n }\n }\n throw new errors_1.NotFoundError(`url ${req.url} not found`);\n }\n /**\n * Parse query string\n * @param queryString\n */\n parseQueryString(queryString) {\n const queryParams = querystring_1.parse(queryString.replace(\"?\", \"\"));\n return dotObject.object(queryParams);\n }\n}\nexports.Gateway = Gateway;\n", "\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TwirpContentType = void 0;\n__exportStar(require(\"./context\"), exports);\n__exportStar(require(\"./server\"), exports);\n__exportStar(require(\"./interceptors\"), exports);\n__exportStar(require(\"./hooks\"), exports);\n__exportStar(require(\"./errors\"), exports);\n__exportStar(require(\"./gateway\"), exports);\n__exportStar(require(\"./http.client\"), exports);\nvar request_1 = require(\"./request\");\nObject.defineProperty(exports, \"TwirpContentType\", { enumerable: true, get: function () { return request_1.TwirpContentType; } });\n", null, null, null, null, "{\n \"name\": \"@actions/artifact\",\n \"version\": \"2.1.7\",\n \"preview\": true,\n \"description\": \"Actions artifact lib\",\n \"keywords\": [\n \"github\",\n \"actions\",\n \"artifact\"\n ],\n \"homepage\": \"https://github.com/actions/toolkit/tree/main/packages/artifact\",\n \"license\": \"MIT\",\n \"main\": \"lib/artifact.js\",\n \"types\": \"lib/artifact.d.ts\",\n \"directories\": {\n \"lib\": \"lib\",\n \"test\": \"__tests__\"\n },\n \"files\": [\n \"lib\",\n \"!.DS_Store\"\n ],\n \"publishConfig\": {\n \"access\": \"public\"\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/actions/toolkit.git\",\n \"directory\": \"packages/artifact\"\n },\n \"scripts\": {\n \"audit-moderate\": \"npm install && npm audit --json --audit-level=moderate > audit.json\",\n \"test\": \"cd ../../ && npm run test ./packages/artifact\",\n \"bootstrap\": \"cd ../../ && npm run bootstrap\",\n \"tsc-run\": \"tsc\",\n \"tsc\": \"npm run bootstrap && npm run tsc-run\",\n \"gen:docs\": \"typedoc --plugin typedoc-plugin-markdown --out docs/generated src/artifact.ts --githubPages false --readme none\"\n },\n \"bugs\": {\n \"url\": \"https://github.com/actions/toolkit/issues\"\n },\n \"dependencies\": {\n \"@actions/core\": \"^1.10.0\",\n \"@actions/github\": \"^5.1.1\",\n \"@actions/http-client\": \"^2.1.0\",\n \"@azure/storage-blob\": \"^12.15.0\",\n \"@octokit/core\": \"^3.5.1\",\n \"@octokit/plugin-request-log\": \"^1.0.4\",\n \"@octokit/plugin-retry\": \"^3.0.9\",\n \"@octokit/request-error\": \"^5.0.0\",\n \"@protobuf-ts/plugin\": \"^2.2.3-alpha.1\",\n \"archiver\": \"^7.0.1\",\n \"crypto\": \"^1.0.1\",\n \"jwt-decode\": \"^3.1.2\",\n \"twirp-ts\": \"^2.5.0\",\n \"unzip-stream\": \"^0.3.1\"\n },\n \"devDependencies\": {\n \"@types/archiver\": \"^5.3.2\",\n \"@types/unzip-stream\": \"^0.3.4\",\n \"typedoc\": \"^0.25.4\",\n \"typedoc-plugin-markdown\": \"^3.17.1\",\n \"typescript\": \"^5.2.2\"\n }\n}\n", null, null, null, null, "/**\n * The code was extracted from:\n * https://github.com/davidchambers/Base64.js\n */\n\nvar chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\n\nfunction InvalidCharacterError(message) {\n this.message = message;\n}\n\nInvalidCharacterError.prototype = new Error();\nInvalidCharacterError.prototype.name = \"InvalidCharacterError\";\n\nfunction polyfill(input) {\n var str = String(input).replace(/=+$/, \"\");\n if (str.length % 4 == 1) {\n throw new InvalidCharacterError(\n \"'atob' failed: The string to be decoded is not correctly encoded.\"\n );\n }\n for (\n // initialize result and counters\n var bc = 0, bs, buffer, idx = 0, output = \"\";\n // get next character\n (buffer = str.charAt(idx++));\n // character found in table? initialize bit storage and add its ascii value;\n ~buffer &&\n ((bs = bc % 4 ? bs * 64 + buffer : buffer),\n // and if not first of each 4 characters,\n // convert the first 8 bits to one ascii character\n bc++ % 4) ?\n (output += String.fromCharCode(255 & (bs >> ((-2 * bc) & 6)))) :\n 0\n ) {\n // try to find character in table (0-63, not found => -1)\n buffer = chars.indexOf(buffer);\n }\n return output;\n}\n\nexport default (typeof window !== \"undefined\" &&\n window.atob &&\n window.atob.bind(window)) ||\npolyfill;", "import atob from \"./atob\";\n\nfunction b64DecodeUnicode(str) {\n return decodeURIComponent(\n atob(str).replace(/(.)/g, function(m, p) {\n var code = p.charCodeAt(0).toString(16).toUpperCase();\n if (code.length < 2) {\n code = \"0\" + code;\n }\n return \"%\" + code;\n })\n );\n}\n\nexport default function(str) {\n var output = str.replace(/-/g, \"+\").replace(/_/g, \"/\");\n switch (output.length % 4) {\n case 0:\n break;\n case 2:\n output += \"==\";\n break;\n case 3:\n output += \"=\";\n break;\n default:\n throw \"Illegal base64url string!\";\n }\n\n try {\n return b64DecodeUnicode(output);\n } catch (err) {\n return atob(output);\n }\n}", "\"use strict\";\n\nimport base64_url_decode from \"./base64_url_decode\";\n\nexport function InvalidTokenError(message) {\n this.message = message;\n}\n\nInvalidTokenError.prototype = new Error();\nInvalidTokenError.prototype.name = \"InvalidTokenError\";\n\nexport default function(token, options) {\n if (typeof token !== \"string\") {\n throw new InvalidTokenError(\"Invalid token specified\");\n }\n\n options = options || {};\n var pos = options.header === true ? 0 : 1;\n try {\n return JSON.parse(base64_url_decode(token.split(\".\")[pos]));\n } catch (e) {\n throw new InvalidTokenError(\"Invalid token specified: \" + e.message);\n }\n}", "import jwtDecode, { InvalidTokenError } from \"./index\";\n\nconst wrapper = jwtDecode;\nwrapper.default = jwtDecode;\nwrapper.InvalidTokenError = InvalidTokenError;\nexport default wrapper;", null, "/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n function next() {\n while (env.stack.length) {\n var rec = env.stack.pop();\n try {\n var result = rec.dispose && rec.dispose.call(rec.value);\n if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n catch (e) {\n fail(e);\n }\n }\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n};\n", "// Generated by CoffeeScript 1.12.7\n(function() {\n exports.defaults = {\n \"0.1\": {\n explicitCharkey: false,\n trim: true,\n normalize: true,\n normalizeTags: false,\n attrkey: \"@\",\n charkey: \"#\",\n explicitArray: false,\n ignoreAttrs: false,\n mergeAttrs: false,\n explicitRoot: false,\n validator: null,\n xmlns: false,\n explicitChildren: false,\n childkey: '@@',\n charsAsChildren: false,\n includeWhiteChars: false,\n async: false,\n strict: true,\n attrNameProcessors: null,\n attrValueProcessors: null,\n tagNameProcessors: null,\n valueProcessors: null,\n emptyTag: ''\n },\n \"0.2\": {\n explicitCharkey: false,\n trim: false,\n normalize: false,\n normalizeTags: false,\n attrkey: \"$\",\n charkey: \"_\",\n explicitArray: true,\n ignoreAttrs: false,\n mergeAttrs: false,\n explicitRoot: true,\n validator: null,\n xmlns: false,\n explicitChildren: false,\n preserveChildrenOrder: false,\n childkey: '$$',\n charsAsChildren: false,\n includeWhiteChars: false,\n async: false,\n strict: true,\n attrNameProcessors: null,\n attrValueProcessors: null,\n tagNameProcessors: null,\n valueProcessors: null,\n rootName: 'root',\n xmldec: {\n 'version': '1.0',\n 'encoding': 'UTF-8',\n 'standalone': true\n },\n doctype: null,\n renderOpts: {\n 'pretty': true,\n 'indent': ' ',\n 'newline': '\\n'\n },\n headless: false,\n chunkSize: 10000,\n emptyTag: '',\n cdata: false\n }\n };\n\n}).call(this);\n", "// Generated by CoffeeScript 1.12.7\n(function() {\n var assign, getValue, isArray, isEmpty, isFunction, isObject, isPlainObject,\n slice = [].slice,\n hasProp = {}.hasOwnProperty;\n\n assign = function() {\n var i, key, len, source, sources, target;\n target = arguments[0], sources = 2 <= arguments.length ? slice.call(arguments, 1) : [];\n if (isFunction(Object.assign)) {\n Object.assign.apply(null, arguments);\n } else {\n for (i = 0, len = sources.length; i < len; i++) {\n source = sources[i];\n if (source != null) {\n for (key in source) {\n if (!hasProp.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n }\n }\n return target;\n };\n\n isFunction = function(val) {\n return !!val && Object.prototype.toString.call(val) === '[object Function]';\n };\n\n isObject = function(val) {\n var ref;\n return !!val && ((ref = typeof val) === 'function' || ref === 'object');\n };\n\n isArray = function(val) {\n if (isFunction(Array.isArray)) {\n return Array.isArray(val);\n } else {\n return Object.prototype.toString.call(val) === '[object Array]';\n }\n };\n\n isEmpty = function(val) {\n var key;\n if (isArray(val)) {\n return !val.length;\n } else {\n for (key in val) {\n if (!hasProp.call(val, key)) continue;\n return false;\n }\n return true;\n }\n };\n\n isPlainObject = function(val) {\n var ctor, proto;\n return isObject(val) && (proto = Object.getPrototypeOf(val)) && (ctor = proto.constructor) && (typeof ctor === 'function') && (ctor instanceof ctor) && (Function.prototype.toString.call(ctor) === Function.prototype.toString.call(Object));\n };\n\n getValue = function(obj) {\n if (isFunction(obj.valueOf)) {\n return obj.valueOf();\n } else {\n return obj;\n }\n };\n\n module.exports.assign = assign;\n\n module.exports.isFunction = isFunction;\n\n module.exports.isObject = isObject;\n\n module.exports.isArray = isArray;\n\n module.exports.isEmpty = isEmpty;\n\n module.exports.isPlainObject = isPlainObject;\n\n module.exports.getValue = getValue;\n\n}).call(this);\n", "// Generated by CoffeeScript 1.12.7\n(function() {\n var XMLDOMImplementation;\n\n module.exports = XMLDOMImplementation = (function() {\n function XMLDOMImplementation() {}\n\n XMLDOMImplementation.prototype.hasFeature = function(feature, version) {\n return true;\n };\n\n XMLDOMImplementation.prototype.createDocumentType = function(qualifiedName, publicId, systemId) {\n throw new Error(\"This DOM method is not implemented.\");\n };\n\n XMLDOMImplementation.prototype.createDocument = function(namespaceURI, qualifiedName, doctype) {\n throw new Error(\"This DOM method is not implemented.\");\n };\n\n XMLDOMImplementation.prototype.createHTMLDocument = function(title) {\n throw new Error(\"This DOM method is not implemented.\");\n };\n\n XMLDOMImplementation.prototype.getFeature = function(feature, version) {\n throw new Error(\"This DOM method is not implemented.\");\n };\n\n return XMLDOMImplementation;\n\n })();\n\n}).call(this);\n", "// Generated by CoffeeScript 1.12.7\n(function() {\n var XMLDOMErrorHandler;\n\n module.exports = XMLDOMErrorHandler = (function() {\n function XMLDOMErrorHandler() {}\n\n XMLDOMErrorHandler.prototype.handleError = function(error) {\n throw new Error(error);\n };\n\n return XMLDOMErrorHandler;\n\n })();\n\n}).call(this);\n", "// Generated by CoffeeScript 1.12.7\n(function() {\n var XMLDOMStringList;\n\n module.exports = XMLDOMStringList = (function() {\n function XMLDOMStringList(arr) {\n this.arr = arr || [];\n }\n\n Object.defineProperty(XMLDOMStringList.prototype, 'length', {\n get: function() {\n return this.arr.length;\n }\n });\n\n XMLDOMStringList.prototype.item = function(index) {\n return this.arr[index] || null;\n };\n\n XMLDOMStringList.prototype.contains = function(str) {\n return this.arr.indexOf(str) !== -1;\n };\n\n return XMLDOMStringList;\n\n })();\n\n}).call(this);\n", "// Generated by CoffeeScript 1.12.7\n(function() {\n var XMLDOMConfiguration, XMLDOMErrorHandler, XMLDOMStringList;\n\n XMLDOMErrorHandler = require('./XMLDOMErrorHandler');\n\n XMLDOMStringList = require('./XMLDOMStringList');\n\n module.exports = XMLDOMConfiguration = (function() {\n function XMLDOMConfiguration() {\n var clonedSelf;\n this.defaultParams = {\n \"canonical-form\": false,\n \"cdata-sections\": false,\n \"comments\": false,\n \"datatype-normalization\": false,\n \"element-content-whitespace\": true,\n \"entities\": true,\n \"error-handler\": new XMLDOMErrorHandler(),\n \"infoset\": true,\n \"validate-if-schema\": false,\n \"namespaces\": true,\n \"namespace-declarations\": true,\n \"normalize-characters\": false,\n \"schema-location\": '',\n \"schema-type\": '',\n \"split-cdata-sections\": true,\n \"validate\": false,\n \"well-formed\": true\n };\n this.params = clonedSelf = Object.create(this.defaultParams);\n }\n\n Object.defineProperty(XMLDOMConfiguration.prototype, 'parameterNames', {\n get: function() {\n return new XMLDOMStringList(Object.keys(this.defaultParams));\n }\n });\n\n XMLDOMConfiguration.prototype.getParameter = function(name) {\n if (this.params.hasOwnProperty(name)) {\n return this.params[name];\n } else {\n return null;\n }\n };\n\n XMLDOMConfiguration.prototype.canSetParameter = function(name, value) {\n return true;\n };\n\n XMLDOMConfiguration.prototype.setParameter = function(name, value) {\n if (value != null) {\n return this.params[name] = value;\n } else {\n return delete this.params[name];\n }\n };\n\n return XMLDOMConfiguration;\n\n })();\n\n}).call(this);\n", "// Generated by CoffeeScript 1.12.7\n(function() {\n module.exports = {\n Element: 1,\n Attribute: 2,\n Text: 3,\n CData: 4,\n EntityReference: 5,\n EntityDeclaration: 6,\n ProcessingInstruction: 7,\n Comment: 8,\n Document: 9,\n DocType: 10,\n DocumentFragment: 11,\n NotationDeclaration: 12,\n Declaration: 201,\n Raw: 202,\n AttributeDeclaration: 203,\n ElementDeclaration: 204,\n Dummy: 205\n };\n\n}).call(this);\n", "// Generated by CoffeeScript 1.12.7\n(function() {\n var NodeType, XMLAttribute, XMLNode;\n\n NodeType = require('./NodeType');\n\n XMLNode = require('./XMLNode');\n\n module.exports = XMLAttribute = (function() {\n function XMLAttribute(parent, name, value) {\n this.parent = parent;\n if (this.parent) {\n this.options = this.parent.options;\n this.stringify = this.parent.stringify;\n }\n if (name == null) {\n throw new Error(\"Missing attribute name. \" + this.debugInfo(name));\n }\n this.name = this.stringify.name(name);\n this.value = this.stringify.attValue(value);\n this.type = NodeType.Attribute;\n this.isId = false;\n this.schemaTypeInfo = null;\n }\n\n Object.defineProperty(XMLAttribute.prototype, 'nodeType', {\n get: function() {\n return this.type;\n }\n });\n\n Object.defineProperty(XMLAttribute.prototype, 'ownerElement', {\n get: function() {\n return this.parent;\n }\n });\n\n Object.defineProperty(XMLAttribute.prototype, 'textContent', {\n get: function() {\n return this.value;\n },\n set: function(value) {\n return this.value = value || '';\n }\n });\n\n Object.defineProperty(XMLAttribute.prototype, 'namespaceURI', {\n get: function() {\n return '';\n }\n });\n\n Object.defineProperty(XMLAttribute.prototype, 'prefix', {\n get: function() {\n return '';\n }\n });\n\n Object.defineProperty(XMLAttribute.prototype, 'localName', {\n get: function() {\n return this.name;\n }\n });\n\n Object.defineProperty(XMLAttribute.prototype, 'specified', {\n get: function() {\n return true;\n }\n });\n\n XMLAttribute.prototype.clone = function() {\n return Object.create(this);\n };\n\n XMLAttribute.prototype.toString = function(options) {\n return this.options.writer.attribute(this, this.options.writer.filterOptions(options));\n };\n\n XMLAttribute.prototype.debugInfo = function(name) {\n name = name || this.name;\n if (name == null) {\n return \"parent: <\" + this.parent.name + \">\";\n } else {\n return \"attribute: {\" + name + \"}, parent: <\" + this.parent.name + \">\";\n }\n };\n\n XMLAttribute.prototype.isEqualNode = function(node) {\n if (node.namespaceURI !== this.namespaceURI) {\n return false;\n }\n if (node.prefix !== this.prefix) {\n return false;\n }\n if (node.localName !== this.localName) {\n return false;\n }\n if (node.value !== this.value) {\n return false;\n }\n return true;\n };\n\n return XMLAttribute;\n\n })();\n\n}).call(this);\n", "// Generated by CoffeeScript 1.12.7\n(function() {\n var XMLNamedNodeMap;\n\n module.exports = XMLNamedNodeMap = (function() {\n function XMLNamedNodeMap(nodes) {\n this.nodes = nodes;\n }\n\n Object.defineProperty(XMLNamedNodeMap.prototype, 'length', {\n get: function() {\n return Object.keys(this.nodes).length || 0;\n }\n });\n\n XMLNamedNodeMap.prototype.clone = function() {\n return this.nodes = null;\n };\n\n XMLNamedNodeMap.prototype.getNamedItem = function(name) {\n return this.nodes[name];\n };\n\n XMLNamedNodeMap.prototype.setNamedItem = function(node) {\n var oldNode;\n oldNode = this.nodes[node.nodeName];\n this.nodes[node.nodeName] = node;\n return oldNode || null;\n };\n\n XMLNamedNodeMap.prototype.removeNamedItem = function(name) {\n var oldNode;\n oldNode = this.nodes[name];\n delete this.nodes[name];\n return oldNode || null;\n };\n\n XMLNamedNodeMap.prototype.item = function(index) {\n return this.nodes[Object.keys(this.nodes)[index]] || null;\n };\n\n XMLNamedNodeMap.prototype.getNamedItemNS = function(namespaceURI, localName) {\n throw new Error(\"This DOM method is not implemented.\");\n };\n\n XMLNamedNodeMap.prototype.setNamedItemNS = function(node) {\n throw new Error(\"This DOM method is not implemented.\");\n };\n\n XMLNamedNodeMap.prototype.removeNamedItemNS = function(namespaceURI, localName) {\n throw new Error(\"This DOM method is not implemented.\");\n };\n\n return XMLNamedNodeMap;\n\n })();\n\n}).call(this);\n", "// Generated by CoffeeScript 1.12.7\n(function() {\n var NodeType, XMLAttribute, XMLElement, XMLNamedNodeMap, XMLNode, getValue, isFunction, isObject, ref,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n ref = require('./Utility'), isObject = ref.isObject, isFunction = ref.isFunction, getValue = ref.getValue;\n\n XMLNode = require('./XMLNode');\n\n NodeType = require('./NodeType');\n\n XMLAttribute = require('./XMLAttribute');\n\n XMLNamedNodeMap = require('./XMLNamedNodeMap');\n\n module.exports = XMLElement = (function(superClass) {\n extend(XMLElement, superClass);\n\n function XMLElement(parent, name, attributes) {\n var child, j, len, ref1;\n XMLElement.__super__.constructor.call(this, parent);\n if (name == null) {\n throw new Error(\"Missing element name. \" + this.debugInfo());\n }\n this.name = this.stringify.name(name);\n this.type = NodeType.Element;\n this.attribs = {};\n this.schemaTypeInfo = null;\n if (attributes != null) {\n this.attribute(attributes);\n }\n if (parent.type === NodeType.Document) {\n this.isRoot = true;\n this.documentObject = parent;\n parent.rootObject = this;\n if (parent.children) {\n ref1 = parent.children;\n for (j = 0, len = ref1.length; j < len; j++) {\n child = ref1[j];\n if (child.type === NodeType.DocType) {\n child.name = this.name;\n break;\n }\n }\n }\n }\n }\n\n Object.defineProperty(XMLElement.prototype, 'tagName', {\n get: function() {\n return this.name;\n }\n });\n\n Object.defineProperty(XMLElement.prototype, 'namespaceURI', {\n get: function() {\n return '';\n }\n });\n\n Object.defineProperty(XMLElement.prototype, 'prefix', {\n get: function() {\n return '';\n }\n });\n\n Object.defineProperty(XMLElement.prototype, 'localName', {\n get: function() {\n return this.name;\n }\n });\n\n Object.defineProperty(XMLElement.prototype, 'id', {\n get: function() {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n });\n\n Object.defineProperty(XMLElement.prototype, 'className', {\n get: function() {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n });\n\n Object.defineProperty(XMLElement.prototype, 'classList', {\n get: function() {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n });\n\n Object.defineProperty(XMLElement.prototype, 'attributes', {\n get: function() {\n if (!this.attributeMap || !this.attributeMap.nodes) {\n this.attributeMap = new XMLNamedNodeMap(this.attribs);\n }\n return this.attributeMap;\n }\n });\n\n XMLElement.prototype.clone = function() {\n var att, attName, clonedSelf, ref1;\n clonedSelf = Object.create(this);\n if (clonedSelf.isRoot) {\n clonedSelf.documentObject = null;\n }\n clonedSelf.attribs = {};\n ref1 = this.attribs;\n for (attName in ref1) {\n if (!hasProp.call(ref1, attName)) continue;\n att = ref1[attName];\n clonedSelf.attribs[attName] = att.clone();\n }\n clonedSelf.children = [];\n this.children.forEach(function(child) {\n var clonedChild;\n clonedChild = child.clone();\n clonedChild.parent = clonedSelf;\n return clonedSelf.children.push(clonedChild);\n });\n return clonedSelf;\n };\n\n XMLElement.prototype.attribute = function(name, value) {\n var attName, attValue;\n if (name != null) {\n name = getValue(name);\n }\n if (isObject(name)) {\n for (attName in name) {\n if (!hasProp.call(name, attName)) continue;\n attValue = name[attName];\n this.attribute(attName, attValue);\n }\n } else {\n if (isFunction(value)) {\n value = value.apply();\n }\n if (this.options.keepNullAttributes && (value == null)) {\n this.attribs[name] = new XMLAttribute(this, name, \"\");\n } else if (value != null) {\n this.attribs[name] = new XMLAttribute(this, name, value);\n }\n }\n return this;\n };\n\n XMLElement.prototype.removeAttribute = function(name) {\n var attName, j, len;\n if (name == null) {\n throw new Error(\"Missing attribute name. \" + this.debugInfo());\n }\n name = getValue(name);\n if (Array.isArray(name)) {\n for (j = 0, len = name.length; j < len; j++) {\n attName = name[j];\n delete this.attribs[attName];\n }\n } else {\n delete this.attribs[name];\n }\n return this;\n };\n\n XMLElement.prototype.toString = function(options) {\n return this.options.writer.element(this, this.options.writer.filterOptions(options));\n };\n\n XMLElement.prototype.att = function(name, value) {\n return this.attribute(name, value);\n };\n\n XMLElement.prototype.a = function(name, value) {\n return this.attribute(name, value);\n };\n\n XMLElement.prototype.getAttribute = function(name) {\n if (this.attribs.hasOwnProperty(name)) {\n return this.attribs[name].value;\n } else {\n return null;\n }\n };\n\n XMLElement.prototype.setAttribute = function(name, value) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLElement.prototype.getAttributeNode = function(name) {\n if (this.attribs.hasOwnProperty(name)) {\n return this.attribs[name];\n } else {\n return null;\n }\n };\n\n XMLElement.prototype.setAttributeNode = function(newAttr) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLElement.prototype.removeAttributeNode = function(oldAttr) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLElement.prototype.getElementsByTagName = function(name) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLElement.prototype.getAttributeNS = function(namespaceURI, localName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLElement.prototype.setAttributeNS = function(namespaceURI, qualifiedName, value) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLElement.prototype.removeAttributeNS = function(namespaceURI, localName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLElement.prototype.getAttributeNodeNS = function(namespaceURI, localName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLElement.prototype.setAttributeNodeNS = function(newAttr) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLElement.prototype.getElementsByTagNameNS = function(namespaceURI, localName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLElement.prototype.hasAttribute = function(name) {\n return this.attribs.hasOwnProperty(name);\n };\n\n XMLElement.prototype.hasAttributeNS = function(namespaceURI, localName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLElement.prototype.setIdAttribute = function(name, isId) {\n if (this.attribs.hasOwnProperty(name)) {\n return this.attribs[name].isId;\n } else {\n return isId;\n }\n };\n\n XMLElement.prototype.setIdAttributeNS = function(namespaceURI, localName, isId) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLElement.prototype.setIdAttributeNode = function(idAttr, isId) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLElement.prototype.getElementsByTagName = function(tagname) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLElement.prototype.getElementsByTagNameNS = function(namespaceURI, localName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLElement.prototype.getElementsByClassName = function(classNames) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLElement.prototype.isEqualNode = function(node) {\n var i, j, ref1;\n if (!XMLElement.__super__.isEqualNode.apply(this, arguments).isEqualNode(node)) {\n return false;\n }\n if (node.namespaceURI !== this.namespaceURI) {\n return false;\n }\n if (node.prefix !== this.prefix) {\n return false;\n }\n if (node.localName !== this.localName) {\n return false;\n }\n if (node.attribs.length !== this.attribs.length) {\n return false;\n }\n for (i = j = 0, ref1 = this.attribs.length - 1; 0 <= ref1 ? j <= ref1 : j >= ref1; i = 0 <= ref1 ? ++j : --j) {\n if (!this.attribs[i].isEqualNode(node.attribs[i])) {\n return false;\n }\n }\n return true;\n };\n\n return XMLElement;\n\n })(XMLNode);\n\n}).call(this);\n", "// Generated by CoffeeScript 1.12.7\n(function() {\n var XMLCharacterData, XMLNode,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n XMLNode = require('./XMLNode');\n\n module.exports = XMLCharacterData = (function(superClass) {\n extend(XMLCharacterData, superClass);\n\n function XMLCharacterData(parent) {\n XMLCharacterData.__super__.constructor.call(this, parent);\n this.value = '';\n }\n\n Object.defineProperty(XMLCharacterData.prototype, 'data', {\n get: function() {\n return this.value;\n },\n set: function(value) {\n return this.value = value || '';\n }\n });\n\n Object.defineProperty(XMLCharacterData.prototype, 'length', {\n get: function() {\n return this.value.length;\n }\n });\n\n Object.defineProperty(XMLCharacterData.prototype, 'textContent', {\n get: function() {\n return this.value;\n },\n set: function(value) {\n return this.value = value || '';\n }\n });\n\n XMLCharacterData.prototype.clone = function() {\n return Object.create(this);\n };\n\n XMLCharacterData.prototype.substringData = function(offset, count) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLCharacterData.prototype.appendData = function(arg) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLCharacterData.prototype.insertData = function(offset, arg) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLCharacterData.prototype.deleteData = function(offset, count) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLCharacterData.prototype.replaceData = function(offset, count, arg) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLCharacterData.prototype.isEqualNode = function(node) {\n if (!XMLCharacterData.__super__.isEqualNode.apply(this, arguments).isEqualNode(node)) {\n return false;\n }\n if (node.data !== this.data) {\n return false;\n }\n return true;\n };\n\n return XMLCharacterData;\n\n })(XMLNode);\n\n}).call(this);\n", "// Generated by CoffeeScript 1.12.7\n(function() {\n var NodeType, XMLCData, XMLCharacterData,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n NodeType = require('./NodeType');\n\n XMLCharacterData = require('./XMLCharacterData');\n\n module.exports = XMLCData = (function(superClass) {\n extend(XMLCData, superClass);\n\n function XMLCData(parent, text) {\n XMLCData.__super__.constructor.call(this, parent);\n if (text == null) {\n throw new Error(\"Missing CDATA text. \" + this.debugInfo());\n }\n this.name = \"#cdata-section\";\n this.type = NodeType.CData;\n this.value = this.stringify.cdata(text);\n }\n\n XMLCData.prototype.clone = function() {\n return Object.create(this);\n };\n\n XMLCData.prototype.toString = function(options) {\n return this.options.writer.cdata(this, this.options.writer.filterOptions(options));\n };\n\n return XMLCData;\n\n })(XMLCharacterData);\n\n}).call(this);\n", "// Generated by CoffeeScript 1.12.7\n(function() {\n var NodeType, XMLCharacterData, XMLComment,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n NodeType = require('./NodeType');\n\n XMLCharacterData = require('./XMLCharacterData');\n\n module.exports = XMLComment = (function(superClass) {\n extend(XMLComment, superClass);\n\n function XMLComment(parent, text) {\n XMLComment.__super__.constructor.call(this, parent);\n if (text == null) {\n throw new Error(\"Missing comment text. \" + this.debugInfo());\n }\n this.name = \"#comment\";\n this.type = NodeType.Comment;\n this.value = this.stringify.comment(text);\n }\n\n XMLComment.prototype.clone = function() {\n return Object.create(this);\n };\n\n XMLComment.prototype.toString = function(options) {\n return this.options.writer.comment(this, this.options.writer.filterOptions(options));\n };\n\n return XMLComment;\n\n })(XMLCharacterData);\n\n}).call(this);\n", "// Generated by CoffeeScript 1.12.7\n(function() {\n var NodeType, XMLDeclaration, XMLNode, isObject,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n isObject = require('./Utility').isObject;\n\n XMLNode = require('./XMLNode');\n\n NodeType = require('./NodeType');\n\n module.exports = XMLDeclaration = (function(superClass) {\n extend(XMLDeclaration, superClass);\n\n function XMLDeclaration(parent, version, encoding, standalone) {\n var ref;\n XMLDeclaration.__super__.constructor.call(this, parent);\n if (isObject(version)) {\n ref = version, version = ref.version, encoding = ref.encoding, standalone = ref.standalone;\n }\n if (!version) {\n version = '1.0';\n }\n this.type = NodeType.Declaration;\n this.version = this.stringify.xmlVersion(version);\n if (encoding != null) {\n this.encoding = this.stringify.xmlEncoding(encoding);\n }\n if (standalone != null) {\n this.standalone = this.stringify.xmlStandalone(standalone);\n }\n }\n\n XMLDeclaration.prototype.toString = function(options) {\n return this.options.writer.declaration(this, this.options.writer.filterOptions(options));\n };\n\n return XMLDeclaration;\n\n })(XMLNode);\n\n}).call(this);\n", "// Generated by CoffeeScript 1.12.7\n(function() {\n var NodeType, XMLDTDAttList, XMLNode,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n XMLNode = require('./XMLNode');\n\n NodeType = require('./NodeType');\n\n module.exports = XMLDTDAttList = (function(superClass) {\n extend(XMLDTDAttList, superClass);\n\n function XMLDTDAttList(parent, elementName, attributeName, attributeType, defaultValueType, defaultValue) {\n XMLDTDAttList.__super__.constructor.call(this, parent);\n if (elementName == null) {\n throw new Error(\"Missing DTD element name. \" + this.debugInfo());\n }\n if (attributeName == null) {\n throw new Error(\"Missing DTD attribute name. \" + this.debugInfo(elementName));\n }\n if (!attributeType) {\n throw new Error(\"Missing DTD attribute type. \" + this.debugInfo(elementName));\n }\n if (!defaultValueType) {\n throw new Error(\"Missing DTD attribute default. \" + this.debugInfo(elementName));\n }\n if (defaultValueType.indexOf('#') !== 0) {\n defaultValueType = '#' + defaultValueType;\n }\n if (!defaultValueType.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/)) {\n throw new Error(\"Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. \" + this.debugInfo(elementName));\n }\n if (defaultValue && !defaultValueType.match(/^(#FIXED|#DEFAULT)$/)) {\n throw new Error(\"Default value only applies to #FIXED or #DEFAULT. \" + this.debugInfo(elementName));\n }\n this.elementName = this.stringify.name(elementName);\n this.type = NodeType.AttributeDeclaration;\n this.attributeName = this.stringify.name(attributeName);\n this.attributeType = this.stringify.dtdAttType(attributeType);\n if (defaultValue) {\n this.defaultValue = this.stringify.dtdAttDefault(defaultValue);\n }\n this.defaultValueType = defaultValueType;\n }\n\n XMLDTDAttList.prototype.toString = function(options) {\n return this.options.writer.dtdAttList(this, this.options.writer.filterOptions(options));\n };\n\n return XMLDTDAttList;\n\n })(XMLNode);\n\n}).call(this);\n", "// Generated by CoffeeScript 1.12.7\n(function() {\n var NodeType, XMLDTDEntity, XMLNode, isObject,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n isObject = require('./Utility').isObject;\n\n XMLNode = require('./XMLNode');\n\n NodeType = require('./NodeType');\n\n module.exports = XMLDTDEntity = (function(superClass) {\n extend(XMLDTDEntity, superClass);\n\n function XMLDTDEntity(parent, pe, name, value) {\n XMLDTDEntity.__super__.constructor.call(this, parent);\n if (name == null) {\n throw new Error(\"Missing DTD entity name. \" + this.debugInfo(name));\n }\n if (value == null) {\n throw new Error(\"Missing DTD entity value. \" + this.debugInfo(name));\n }\n this.pe = !!pe;\n this.name = this.stringify.name(name);\n this.type = NodeType.EntityDeclaration;\n if (!isObject(value)) {\n this.value = this.stringify.dtdEntityValue(value);\n this.internal = true;\n } else {\n if (!value.pubID && !value.sysID) {\n throw new Error(\"Public and/or system identifiers are required for an external entity. \" + this.debugInfo(name));\n }\n if (value.pubID && !value.sysID) {\n throw new Error(\"System identifier is required for a public external entity. \" + this.debugInfo(name));\n }\n this.internal = false;\n if (value.pubID != null) {\n this.pubID = this.stringify.dtdPubID(value.pubID);\n }\n if (value.sysID != null) {\n this.sysID = this.stringify.dtdSysID(value.sysID);\n }\n if (value.nData != null) {\n this.nData = this.stringify.dtdNData(value.nData);\n }\n if (this.pe && this.nData) {\n throw new Error(\"Notation declaration is not allowed in a parameter entity. \" + this.debugInfo(name));\n }\n }\n }\n\n Object.defineProperty(XMLDTDEntity.prototype, 'publicId', {\n get: function() {\n return this.pubID;\n }\n });\n\n Object.defineProperty(XMLDTDEntity.prototype, 'systemId', {\n get: function() {\n return this.sysID;\n }\n });\n\n Object.defineProperty(XMLDTDEntity.prototype, 'notationName', {\n get: function() {\n return this.nData || null;\n }\n });\n\n Object.defineProperty(XMLDTDEntity.prototype, 'inputEncoding', {\n get: function() {\n return null;\n }\n });\n\n Object.defineProperty(XMLDTDEntity.prototype, 'xmlEncoding', {\n get: function() {\n return null;\n }\n });\n\n Object.defineProperty(XMLDTDEntity.prototype, 'xmlVersion', {\n get: function() {\n return null;\n }\n });\n\n XMLDTDEntity.prototype.toString = function(options) {\n return this.options.writer.dtdEntity(this, this.options.writer.filterOptions(options));\n };\n\n return XMLDTDEntity;\n\n })(XMLNode);\n\n}).call(this);\n", "// Generated by CoffeeScript 1.12.7\n(function() {\n var NodeType, XMLDTDElement, XMLNode,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n XMLNode = require('./XMLNode');\n\n NodeType = require('./NodeType');\n\n module.exports = XMLDTDElement = (function(superClass) {\n extend(XMLDTDElement, superClass);\n\n function XMLDTDElement(parent, name, value) {\n XMLDTDElement.__super__.constructor.call(this, parent);\n if (name == null) {\n throw new Error(\"Missing DTD element name. \" + this.debugInfo());\n }\n if (!value) {\n value = '(#PCDATA)';\n }\n if (Array.isArray(value)) {\n value = '(' + value.join(',') + ')';\n }\n this.name = this.stringify.name(name);\n this.type = NodeType.ElementDeclaration;\n this.value = this.stringify.dtdElementValue(value);\n }\n\n XMLDTDElement.prototype.toString = function(options) {\n return this.options.writer.dtdElement(this, this.options.writer.filterOptions(options));\n };\n\n return XMLDTDElement;\n\n })(XMLNode);\n\n}).call(this);\n", "// Generated by CoffeeScript 1.12.7\n(function() {\n var NodeType, XMLDTDNotation, XMLNode,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n XMLNode = require('./XMLNode');\n\n NodeType = require('./NodeType');\n\n module.exports = XMLDTDNotation = (function(superClass) {\n extend(XMLDTDNotation, superClass);\n\n function XMLDTDNotation(parent, name, value) {\n XMLDTDNotation.__super__.constructor.call(this, parent);\n if (name == null) {\n throw new Error(\"Missing DTD notation name. \" + this.debugInfo(name));\n }\n if (!value.pubID && !value.sysID) {\n throw new Error(\"Public or system identifiers are required for an external entity. \" + this.debugInfo(name));\n }\n this.name = this.stringify.name(name);\n this.type = NodeType.NotationDeclaration;\n if (value.pubID != null) {\n this.pubID = this.stringify.dtdPubID(value.pubID);\n }\n if (value.sysID != null) {\n this.sysID = this.stringify.dtdSysID(value.sysID);\n }\n }\n\n Object.defineProperty(XMLDTDNotation.prototype, 'publicId', {\n get: function() {\n return this.pubID;\n }\n });\n\n Object.defineProperty(XMLDTDNotation.prototype, 'systemId', {\n get: function() {\n return this.sysID;\n }\n });\n\n XMLDTDNotation.prototype.toString = function(options) {\n return this.options.writer.dtdNotation(this, this.options.writer.filterOptions(options));\n };\n\n return XMLDTDNotation;\n\n })(XMLNode);\n\n}).call(this);\n", "// Generated by CoffeeScript 1.12.7\n(function() {\n var NodeType, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDocType, XMLNamedNodeMap, XMLNode, isObject,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n isObject = require('./Utility').isObject;\n\n XMLNode = require('./XMLNode');\n\n NodeType = require('./NodeType');\n\n XMLDTDAttList = require('./XMLDTDAttList');\n\n XMLDTDEntity = require('./XMLDTDEntity');\n\n XMLDTDElement = require('./XMLDTDElement');\n\n XMLDTDNotation = require('./XMLDTDNotation');\n\n XMLNamedNodeMap = require('./XMLNamedNodeMap');\n\n module.exports = XMLDocType = (function(superClass) {\n extend(XMLDocType, superClass);\n\n function XMLDocType(parent, pubID, sysID) {\n var child, i, len, ref, ref1, ref2;\n XMLDocType.__super__.constructor.call(this, parent);\n this.type = NodeType.DocType;\n if (parent.children) {\n ref = parent.children;\n for (i = 0, len = ref.length; i < len; i++) {\n child = ref[i];\n if (child.type === NodeType.Element) {\n this.name = child.name;\n break;\n }\n }\n }\n this.documentObject = parent;\n if (isObject(pubID)) {\n ref1 = pubID, pubID = ref1.pubID, sysID = ref1.sysID;\n }\n if (sysID == null) {\n ref2 = [pubID, sysID], sysID = ref2[0], pubID = ref2[1];\n }\n if (pubID != null) {\n this.pubID = this.stringify.dtdPubID(pubID);\n }\n if (sysID != null) {\n this.sysID = this.stringify.dtdSysID(sysID);\n }\n }\n\n Object.defineProperty(XMLDocType.prototype, 'entities', {\n get: function() {\n var child, i, len, nodes, ref;\n nodes = {};\n ref = this.children;\n for (i = 0, len = ref.length; i < len; i++) {\n child = ref[i];\n if ((child.type === NodeType.EntityDeclaration) && !child.pe) {\n nodes[child.name] = child;\n }\n }\n return new XMLNamedNodeMap(nodes);\n }\n });\n\n Object.defineProperty(XMLDocType.prototype, 'notations', {\n get: function() {\n var child, i, len, nodes, ref;\n nodes = {};\n ref = this.children;\n for (i = 0, len = ref.length; i < len; i++) {\n child = ref[i];\n if (child.type === NodeType.NotationDeclaration) {\n nodes[child.name] = child;\n }\n }\n return new XMLNamedNodeMap(nodes);\n }\n });\n\n Object.defineProperty(XMLDocType.prototype, 'publicId', {\n get: function() {\n return this.pubID;\n }\n });\n\n Object.defineProperty(XMLDocType.prototype, 'systemId', {\n get: function() {\n return this.sysID;\n }\n });\n\n Object.defineProperty(XMLDocType.prototype, 'internalSubset', {\n get: function() {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n });\n\n XMLDocType.prototype.element = function(name, value) {\n var child;\n child = new XMLDTDElement(this, name, value);\n this.children.push(child);\n return this;\n };\n\n XMLDocType.prototype.attList = function(elementName, attributeName, attributeType, defaultValueType, defaultValue) {\n var child;\n child = new XMLDTDAttList(this, elementName, attributeName, attributeType, defaultValueType, defaultValue);\n this.children.push(child);\n return this;\n };\n\n XMLDocType.prototype.entity = function(name, value) {\n var child;\n child = new XMLDTDEntity(this, false, name, value);\n this.children.push(child);\n return this;\n };\n\n XMLDocType.prototype.pEntity = function(name, value) {\n var child;\n child = new XMLDTDEntity(this, true, name, value);\n this.children.push(child);\n return this;\n };\n\n XMLDocType.prototype.notation = function(name, value) {\n var child;\n child = new XMLDTDNotation(this, name, value);\n this.children.push(child);\n return this;\n };\n\n XMLDocType.prototype.toString = function(options) {\n return this.options.writer.docType(this, this.options.writer.filterOptions(options));\n };\n\n XMLDocType.prototype.ele = function(name, value) {\n return this.element(name, value);\n };\n\n XMLDocType.prototype.att = function(elementName, attributeName, attributeType, defaultValueType, defaultValue) {\n return this.attList(elementName, attributeName, attributeType, defaultValueType, defaultValue);\n };\n\n XMLDocType.prototype.ent = function(name, value) {\n return this.entity(name, value);\n };\n\n XMLDocType.prototype.pent = function(name, value) {\n return this.pEntity(name, value);\n };\n\n XMLDocType.prototype.not = function(name, value) {\n return this.notation(name, value);\n };\n\n XMLDocType.prototype.up = function() {\n return this.root() || this.documentObject;\n };\n\n XMLDocType.prototype.isEqualNode = function(node) {\n if (!XMLDocType.__super__.isEqualNode.apply(this, arguments).isEqualNode(node)) {\n return false;\n }\n if (node.name !== this.name) {\n return false;\n }\n if (node.publicId !== this.publicId) {\n return false;\n }\n if (node.systemId !== this.systemId) {\n return false;\n }\n return true;\n };\n\n return XMLDocType;\n\n })(XMLNode);\n\n}).call(this);\n", "// Generated by CoffeeScript 1.12.7\n(function() {\n var NodeType, XMLNode, XMLRaw,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n NodeType = require('./NodeType');\n\n XMLNode = require('./XMLNode');\n\n module.exports = XMLRaw = (function(superClass) {\n extend(XMLRaw, superClass);\n\n function XMLRaw(parent, text) {\n XMLRaw.__super__.constructor.call(this, parent);\n if (text == null) {\n throw new Error(\"Missing raw text. \" + this.debugInfo());\n }\n this.type = NodeType.Raw;\n this.value = this.stringify.raw(text);\n }\n\n XMLRaw.prototype.clone = function() {\n return Object.create(this);\n };\n\n XMLRaw.prototype.toString = function(options) {\n return this.options.writer.raw(this, this.options.writer.filterOptions(options));\n };\n\n return XMLRaw;\n\n })(XMLNode);\n\n}).call(this);\n", "// Generated by CoffeeScript 1.12.7\n(function() {\n var NodeType, XMLCharacterData, XMLText,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n NodeType = require('./NodeType');\n\n XMLCharacterData = require('./XMLCharacterData');\n\n module.exports = XMLText = (function(superClass) {\n extend(XMLText, superClass);\n\n function XMLText(parent, text) {\n XMLText.__super__.constructor.call(this, parent);\n if (text == null) {\n throw new Error(\"Missing element text. \" + this.debugInfo());\n }\n this.name = \"#text\";\n this.type = NodeType.Text;\n this.value = this.stringify.text(text);\n }\n\n Object.defineProperty(XMLText.prototype, 'isElementContentWhitespace', {\n get: function() {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n });\n\n Object.defineProperty(XMLText.prototype, 'wholeText', {\n get: function() {\n var next, prev, str;\n str = '';\n prev = this.previousSibling;\n while (prev) {\n str = prev.data + str;\n prev = prev.previousSibling;\n }\n str += this.data;\n next = this.nextSibling;\n while (next) {\n str = str + next.data;\n next = next.nextSibling;\n }\n return str;\n }\n });\n\n XMLText.prototype.clone = function() {\n return Object.create(this);\n };\n\n XMLText.prototype.toString = function(options) {\n return this.options.writer.text(this, this.options.writer.filterOptions(options));\n };\n\n XMLText.prototype.splitText = function(offset) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLText.prototype.replaceWholeText = function(content) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n return XMLText;\n\n })(XMLCharacterData);\n\n}).call(this);\n", "// Generated by CoffeeScript 1.12.7\n(function() {\n var NodeType, XMLCharacterData, XMLProcessingInstruction,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n NodeType = require('./NodeType');\n\n XMLCharacterData = require('./XMLCharacterData');\n\n module.exports = XMLProcessingInstruction = (function(superClass) {\n extend(XMLProcessingInstruction, superClass);\n\n function XMLProcessingInstruction(parent, target, value) {\n XMLProcessingInstruction.__super__.constructor.call(this, parent);\n if (target == null) {\n throw new Error(\"Missing instruction target. \" + this.debugInfo());\n }\n this.type = NodeType.ProcessingInstruction;\n this.target = this.stringify.insTarget(target);\n this.name = this.target;\n if (value) {\n this.value = this.stringify.insValue(value);\n }\n }\n\n XMLProcessingInstruction.prototype.clone = function() {\n return Object.create(this);\n };\n\n XMLProcessingInstruction.prototype.toString = function(options) {\n return this.options.writer.processingInstruction(this, this.options.writer.filterOptions(options));\n };\n\n XMLProcessingInstruction.prototype.isEqualNode = function(node) {\n if (!XMLProcessingInstruction.__super__.isEqualNode.apply(this, arguments).isEqualNode(node)) {\n return false;\n }\n if (node.target !== this.target) {\n return false;\n }\n return true;\n };\n\n return XMLProcessingInstruction;\n\n })(XMLCharacterData);\n\n}).call(this);\n", "// Generated by CoffeeScript 1.12.7\n(function() {\n var NodeType, XMLDummy, XMLNode,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n XMLNode = require('./XMLNode');\n\n NodeType = require('./NodeType');\n\n module.exports = XMLDummy = (function(superClass) {\n extend(XMLDummy, superClass);\n\n function XMLDummy(parent) {\n XMLDummy.__super__.constructor.call(this, parent);\n this.type = NodeType.Dummy;\n }\n\n XMLDummy.prototype.clone = function() {\n return Object.create(this);\n };\n\n XMLDummy.prototype.toString = function(options) {\n return '';\n };\n\n return XMLDummy;\n\n })(XMLNode);\n\n}).call(this);\n", "// Generated by CoffeeScript 1.12.7\n(function() {\n var XMLNodeList;\n\n module.exports = XMLNodeList = (function() {\n function XMLNodeList(nodes) {\n this.nodes = nodes;\n }\n\n Object.defineProperty(XMLNodeList.prototype, 'length', {\n get: function() {\n return this.nodes.length || 0;\n }\n });\n\n XMLNodeList.prototype.clone = function() {\n return this.nodes = null;\n };\n\n XMLNodeList.prototype.item = function(index) {\n return this.nodes[index] || null;\n };\n\n return XMLNodeList;\n\n })();\n\n}).call(this);\n", "// Generated by CoffeeScript 1.12.7\n(function() {\n module.exports = {\n Disconnected: 1,\n Preceding: 2,\n Following: 4,\n Contains: 8,\n ContainedBy: 16,\n ImplementationSpecific: 32\n };\n\n}).call(this);\n", "// Generated by CoffeeScript 1.12.7\n(function() {\n var DocumentPosition, NodeType, XMLCData, XMLComment, XMLDeclaration, XMLDocType, XMLDummy, XMLElement, XMLNamedNodeMap, XMLNode, XMLNodeList, XMLProcessingInstruction, XMLRaw, XMLText, getValue, isEmpty, isFunction, isObject, ref1,\n hasProp = {}.hasOwnProperty;\n\n ref1 = require('./Utility'), isObject = ref1.isObject, isFunction = ref1.isFunction, isEmpty = ref1.isEmpty, getValue = ref1.getValue;\n\n XMLElement = null;\n\n XMLCData = null;\n\n XMLComment = null;\n\n XMLDeclaration = null;\n\n XMLDocType = null;\n\n XMLRaw = null;\n\n XMLText = null;\n\n XMLProcessingInstruction = null;\n\n XMLDummy = null;\n\n NodeType = null;\n\n XMLNodeList = null;\n\n XMLNamedNodeMap = null;\n\n DocumentPosition = null;\n\n module.exports = XMLNode = (function() {\n function XMLNode(parent1) {\n this.parent = parent1;\n if (this.parent) {\n this.options = this.parent.options;\n this.stringify = this.parent.stringify;\n }\n this.value = null;\n this.children = [];\n this.baseURI = null;\n if (!XMLElement) {\n XMLElement = require('./XMLElement');\n XMLCData = require('./XMLCData');\n XMLComment = require('./XMLComment');\n XMLDeclaration = require('./XMLDeclaration');\n XMLDocType = require('./XMLDocType');\n XMLRaw = require('./XMLRaw');\n XMLText = require('./XMLText');\n XMLProcessingInstruction = require('./XMLProcessingInstruction');\n XMLDummy = require('./XMLDummy');\n NodeType = require('./NodeType');\n XMLNodeList = require('./XMLNodeList');\n XMLNamedNodeMap = require('./XMLNamedNodeMap');\n DocumentPosition = require('./DocumentPosition');\n }\n }\n\n Object.defineProperty(XMLNode.prototype, 'nodeName', {\n get: function() {\n return this.name;\n }\n });\n\n Object.defineProperty(XMLNode.prototype, 'nodeType', {\n get: function() {\n return this.type;\n }\n });\n\n Object.defineProperty(XMLNode.prototype, 'nodeValue', {\n get: function() {\n return this.value;\n }\n });\n\n Object.defineProperty(XMLNode.prototype, 'parentNode', {\n get: function() {\n return this.parent;\n }\n });\n\n Object.defineProperty(XMLNode.prototype, 'childNodes', {\n get: function() {\n if (!this.childNodeList || !this.childNodeList.nodes) {\n this.childNodeList = new XMLNodeList(this.children);\n }\n return this.childNodeList;\n }\n });\n\n Object.defineProperty(XMLNode.prototype, 'firstChild', {\n get: function() {\n return this.children[0] || null;\n }\n });\n\n Object.defineProperty(XMLNode.prototype, 'lastChild', {\n get: function() {\n return this.children[this.children.length - 1] || null;\n }\n });\n\n Object.defineProperty(XMLNode.prototype, 'previousSibling', {\n get: function() {\n var i;\n i = this.parent.children.indexOf(this);\n return this.parent.children[i - 1] || null;\n }\n });\n\n Object.defineProperty(XMLNode.prototype, 'nextSibling', {\n get: function() {\n var i;\n i = this.parent.children.indexOf(this);\n return this.parent.children[i + 1] || null;\n }\n });\n\n Object.defineProperty(XMLNode.prototype, 'ownerDocument', {\n get: function() {\n return this.document() || null;\n }\n });\n\n Object.defineProperty(XMLNode.prototype, 'textContent', {\n get: function() {\n var child, j, len, ref2, str;\n if (this.nodeType === NodeType.Element || this.nodeType === NodeType.DocumentFragment) {\n str = '';\n ref2 = this.children;\n for (j = 0, len = ref2.length; j < len; j++) {\n child = ref2[j];\n if (child.textContent) {\n str += child.textContent;\n }\n }\n return str;\n } else {\n return null;\n }\n },\n set: function(value) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n });\n\n XMLNode.prototype.setParent = function(parent) {\n var child, j, len, ref2, results;\n this.parent = parent;\n if (parent) {\n this.options = parent.options;\n this.stringify = parent.stringify;\n }\n ref2 = this.children;\n results = [];\n for (j = 0, len = ref2.length; j < len; j++) {\n child = ref2[j];\n results.push(child.setParent(this));\n }\n return results;\n };\n\n XMLNode.prototype.element = function(name, attributes, text) {\n var childNode, item, j, k, key, lastChild, len, len1, ref2, ref3, val;\n lastChild = null;\n if (attributes === null && (text == null)) {\n ref2 = [{}, null], attributes = ref2[0], text = ref2[1];\n }\n if (attributes == null) {\n attributes = {};\n }\n attributes = getValue(attributes);\n if (!isObject(attributes)) {\n ref3 = [attributes, text], text = ref3[0], attributes = ref3[1];\n }\n if (name != null) {\n name = getValue(name);\n }\n if (Array.isArray(name)) {\n for (j = 0, len = name.length; j < len; j++) {\n item = name[j];\n lastChild = this.element(item);\n }\n } else if (isFunction(name)) {\n lastChild = this.element(name.apply());\n } else if (isObject(name)) {\n for (key in name) {\n if (!hasProp.call(name, key)) continue;\n val = name[key];\n if (isFunction(val)) {\n val = val.apply();\n }\n if (!this.options.ignoreDecorators && this.stringify.convertAttKey && key.indexOf(this.stringify.convertAttKey) === 0) {\n lastChild = this.attribute(key.substr(this.stringify.convertAttKey.length), val);\n } else if (!this.options.separateArrayItems && Array.isArray(val) && isEmpty(val)) {\n lastChild = this.dummy();\n } else if (isObject(val) && isEmpty(val)) {\n lastChild = this.element(key);\n } else if (!this.options.keepNullNodes && (val == null)) {\n lastChild = this.dummy();\n } else if (!this.options.separateArrayItems && Array.isArray(val)) {\n for (k = 0, len1 = val.length; k < len1; k++) {\n item = val[k];\n childNode = {};\n childNode[key] = item;\n lastChild = this.element(childNode);\n }\n } else if (isObject(val)) {\n if (!this.options.ignoreDecorators && this.stringify.convertTextKey && key.indexOf(this.stringify.convertTextKey) === 0) {\n lastChild = this.element(val);\n } else {\n lastChild = this.element(key);\n lastChild.element(val);\n }\n } else {\n lastChild = this.element(key, val);\n }\n }\n } else if (!this.options.keepNullNodes && text === null) {\n lastChild = this.dummy();\n } else {\n if (!this.options.ignoreDecorators && this.stringify.convertTextKey && name.indexOf(this.stringify.convertTextKey) === 0) {\n lastChild = this.text(text);\n } else if (!this.options.ignoreDecorators && this.stringify.convertCDataKey && name.indexOf(this.stringify.convertCDataKey) === 0) {\n lastChild = this.cdata(text);\n } else if (!this.options.ignoreDecorators && this.stringify.convertCommentKey && name.indexOf(this.stringify.convertCommentKey) === 0) {\n lastChild = this.comment(text);\n } else if (!this.options.ignoreDecorators && this.stringify.convertRawKey && name.indexOf(this.stringify.convertRawKey) === 0) {\n lastChild = this.raw(text);\n } else if (!this.options.ignoreDecorators && this.stringify.convertPIKey && name.indexOf(this.stringify.convertPIKey) === 0) {\n lastChild = this.instruction(name.substr(this.stringify.convertPIKey.length), text);\n } else {\n lastChild = this.node(name, attributes, text);\n }\n }\n if (lastChild == null) {\n throw new Error(\"Could not create any elements with: \" + name + \". \" + this.debugInfo());\n }\n return lastChild;\n };\n\n XMLNode.prototype.insertBefore = function(name, attributes, text) {\n var child, i, newChild, refChild, removed;\n if (name != null ? name.type : void 0) {\n newChild = name;\n refChild = attributes;\n newChild.setParent(this);\n if (refChild) {\n i = children.indexOf(refChild);\n removed = children.splice(i);\n children.push(newChild);\n Array.prototype.push.apply(children, removed);\n } else {\n children.push(newChild);\n }\n return newChild;\n } else {\n if (this.isRoot) {\n throw new Error(\"Cannot insert elements at root level. \" + this.debugInfo(name));\n }\n i = this.parent.children.indexOf(this);\n removed = this.parent.children.splice(i);\n child = this.parent.element(name, attributes, text);\n Array.prototype.push.apply(this.parent.children, removed);\n return child;\n }\n };\n\n XMLNode.prototype.insertAfter = function(name, attributes, text) {\n var child, i, removed;\n if (this.isRoot) {\n throw new Error(\"Cannot insert elements at root level. \" + this.debugInfo(name));\n }\n i = this.parent.children.indexOf(this);\n removed = this.parent.children.splice(i + 1);\n child = this.parent.element(name, attributes, text);\n Array.prototype.push.apply(this.parent.children, removed);\n return child;\n };\n\n XMLNode.prototype.remove = function() {\n var i, ref2;\n if (this.isRoot) {\n throw new Error(\"Cannot remove the root element. \" + this.debugInfo());\n }\n i = this.parent.children.indexOf(this);\n [].splice.apply(this.parent.children, [i, i - i + 1].concat(ref2 = [])), ref2;\n return this.parent;\n };\n\n XMLNode.prototype.node = function(name, attributes, text) {\n var child, ref2;\n if (name != null) {\n name = getValue(name);\n }\n attributes || (attributes = {});\n attributes = getValue(attributes);\n if (!isObject(attributes)) {\n ref2 = [attributes, text], text = ref2[0], attributes = ref2[1];\n }\n child = new XMLElement(this, name, attributes);\n if (text != null) {\n child.text(text);\n }\n this.children.push(child);\n return child;\n };\n\n XMLNode.prototype.text = function(value) {\n var child;\n if (isObject(value)) {\n this.element(value);\n }\n child = new XMLText(this, value);\n this.children.push(child);\n return this;\n };\n\n XMLNode.prototype.cdata = function(value) {\n var child;\n child = new XMLCData(this, value);\n this.children.push(child);\n return this;\n };\n\n XMLNode.prototype.comment = function(value) {\n var child;\n child = new XMLComment(this, value);\n this.children.push(child);\n return this;\n };\n\n XMLNode.prototype.commentBefore = function(value) {\n var child, i, removed;\n i = this.parent.children.indexOf(this);\n removed = this.parent.children.splice(i);\n child = this.parent.comment(value);\n Array.prototype.push.apply(this.parent.children, removed);\n return this;\n };\n\n XMLNode.prototype.commentAfter = function(value) {\n var child, i, removed;\n i = this.parent.children.indexOf(this);\n removed = this.parent.children.splice(i + 1);\n child = this.parent.comment(value);\n Array.prototype.push.apply(this.parent.children, removed);\n return this;\n };\n\n XMLNode.prototype.raw = function(value) {\n var child;\n child = new XMLRaw(this, value);\n this.children.push(child);\n return this;\n };\n\n XMLNode.prototype.dummy = function() {\n var child;\n child = new XMLDummy(this);\n return child;\n };\n\n XMLNode.prototype.instruction = function(target, value) {\n var insTarget, insValue, instruction, j, len;\n if (target != null) {\n target = getValue(target);\n }\n if (value != null) {\n value = getValue(value);\n }\n if (Array.isArray(target)) {\n for (j = 0, len = target.length; j < len; j++) {\n insTarget = target[j];\n this.instruction(insTarget);\n }\n } else if (isObject(target)) {\n for (insTarget in target) {\n if (!hasProp.call(target, insTarget)) continue;\n insValue = target[insTarget];\n this.instruction(insTarget, insValue);\n }\n } else {\n if (isFunction(value)) {\n value = value.apply();\n }\n instruction = new XMLProcessingInstruction(this, target, value);\n this.children.push(instruction);\n }\n return this;\n };\n\n XMLNode.prototype.instructionBefore = function(target, value) {\n var child, i, removed;\n i = this.parent.children.indexOf(this);\n removed = this.parent.children.splice(i);\n child = this.parent.instruction(target, value);\n Array.prototype.push.apply(this.parent.children, removed);\n return this;\n };\n\n XMLNode.prototype.instructionAfter = function(target, value) {\n var child, i, removed;\n i = this.parent.children.indexOf(this);\n removed = this.parent.children.splice(i + 1);\n child = this.parent.instruction(target, value);\n Array.prototype.push.apply(this.parent.children, removed);\n return this;\n };\n\n XMLNode.prototype.declaration = function(version, encoding, standalone) {\n var doc, xmldec;\n doc = this.document();\n xmldec = new XMLDeclaration(doc, version, encoding, standalone);\n if (doc.children.length === 0) {\n doc.children.unshift(xmldec);\n } else if (doc.children[0].type === NodeType.Declaration) {\n doc.children[0] = xmldec;\n } else {\n doc.children.unshift(xmldec);\n }\n return doc.root() || doc;\n };\n\n XMLNode.prototype.dtd = function(pubID, sysID) {\n var child, doc, doctype, i, j, k, len, len1, ref2, ref3;\n doc = this.document();\n doctype = new XMLDocType(doc, pubID, sysID);\n ref2 = doc.children;\n for (i = j = 0, len = ref2.length; j < len; i = ++j) {\n child = ref2[i];\n if (child.type === NodeType.DocType) {\n doc.children[i] = doctype;\n return doctype;\n }\n }\n ref3 = doc.children;\n for (i = k = 0, len1 = ref3.length; k < len1; i = ++k) {\n child = ref3[i];\n if (child.isRoot) {\n doc.children.splice(i, 0, doctype);\n return doctype;\n }\n }\n doc.children.push(doctype);\n return doctype;\n };\n\n XMLNode.prototype.up = function() {\n if (this.isRoot) {\n throw new Error(\"The root node has no parent. Use doc() if you need to get the document object.\");\n }\n return this.parent;\n };\n\n XMLNode.prototype.root = function() {\n var node;\n node = this;\n while (node) {\n if (node.type === NodeType.Document) {\n return node.rootObject;\n } else if (node.isRoot) {\n return node;\n } else {\n node = node.parent;\n }\n }\n };\n\n XMLNode.prototype.document = function() {\n var node;\n node = this;\n while (node) {\n if (node.type === NodeType.Document) {\n return node;\n } else {\n node = node.parent;\n }\n }\n };\n\n XMLNode.prototype.end = function(options) {\n return this.document().end(options);\n };\n\n XMLNode.prototype.prev = function() {\n var i;\n i = this.parent.children.indexOf(this);\n if (i < 1) {\n throw new Error(\"Already at the first node. \" + this.debugInfo());\n }\n return this.parent.children[i - 1];\n };\n\n XMLNode.prototype.next = function() {\n var i;\n i = this.parent.children.indexOf(this);\n if (i === -1 || i === this.parent.children.length - 1) {\n throw new Error(\"Already at the last node. \" + this.debugInfo());\n }\n return this.parent.children[i + 1];\n };\n\n XMLNode.prototype.importDocument = function(doc) {\n var clonedRoot;\n clonedRoot = doc.root().clone();\n clonedRoot.parent = this;\n clonedRoot.isRoot = false;\n this.children.push(clonedRoot);\n return this;\n };\n\n XMLNode.prototype.debugInfo = function(name) {\n var ref2, ref3;\n name = name || this.name;\n if ((name == null) && !((ref2 = this.parent) != null ? ref2.name : void 0)) {\n return \"\";\n } else if (name == null) {\n return \"parent: <\" + this.parent.name + \">\";\n } else if (!((ref3 = this.parent) != null ? ref3.name : void 0)) {\n return \"node: <\" + name + \">\";\n } else {\n return \"node: <\" + name + \">, parent: <\" + this.parent.name + \">\";\n }\n };\n\n XMLNode.prototype.ele = function(name, attributes, text) {\n return this.element(name, attributes, text);\n };\n\n XMLNode.prototype.nod = function(name, attributes, text) {\n return this.node(name, attributes, text);\n };\n\n XMLNode.prototype.txt = function(value) {\n return this.text(value);\n };\n\n XMLNode.prototype.dat = function(value) {\n return this.cdata(value);\n };\n\n XMLNode.prototype.com = function(value) {\n return this.comment(value);\n };\n\n XMLNode.prototype.ins = function(target, value) {\n return this.instruction(target, value);\n };\n\n XMLNode.prototype.doc = function() {\n return this.document();\n };\n\n XMLNode.prototype.dec = function(version, encoding, standalone) {\n return this.declaration(version, encoding, standalone);\n };\n\n XMLNode.prototype.e = function(name, attributes, text) {\n return this.element(name, attributes, text);\n };\n\n XMLNode.prototype.n = function(name, attributes, text) {\n return this.node(name, attributes, text);\n };\n\n XMLNode.prototype.t = function(value) {\n return this.text(value);\n };\n\n XMLNode.prototype.d = function(value) {\n return this.cdata(value);\n };\n\n XMLNode.prototype.c = function(value) {\n return this.comment(value);\n };\n\n XMLNode.prototype.r = function(value) {\n return this.raw(value);\n };\n\n XMLNode.prototype.i = function(target, value) {\n return this.instruction(target, value);\n };\n\n XMLNode.prototype.u = function() {\n return this.up();\n };\n\n XMLNode.prototype.importXMLBuilder = function(doc) {\n return this.importDocument(doc);\n };\n\n XMLNode.prototype.replaceChild = function(newChild, oldChild) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLNode.prototype.removeChild = function(oldChild) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLNode.prototype.appendChild = function(newChild) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLNode.prototype.hasChildNodes = function() {\n return this.children.length !== 0;\n };\n\n XMLNode.prototype.cloneNode = function(deep) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLNode.prototype.normalize = function() {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLNode.prototype.isSupported = function(feature, version) {\n return true;\n };\n\n XMLNode.prototype.hasAttributes = function() {\n return this.attribs.length !== 0;\n };\n\n XMLNode.prototype.compareDocumentPosition = function(other) {\n var ref, res;\n ref = this;\n if (ref === other) {\n return 0;\n } else if (this.document() !== other.document()) {\n res = DocumentPosition.Disconnected | DocumentPosition.ImplementationSpecific;\n if (Math.random() < 0.5) {\n res |= DocumentPosition.Preceding;\n } else {\n res |= DocumentPosition.Following;\n }\n return res;\n } else if (ref.isAncestor(other)) {\n return DocumentPosition.Contains | DocumentPosition.Preceding;\n } else if (ref.isDescendant(other)) {\n return DocumentPosition.Contains | DocumentPosition.Following;\n } else if (ref.isPreceding(other)) {\n return DocumentPosition.Preceding;\n } else {\n return DocumentPosition.Following;\n }\n };\n\n XMLNode.prototype.isSameNode = function(other) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLNode.prototype.lookupPrefix = function(namespaceURI) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLNode.prototype.isDefaultNamespace = function(namespaceURI) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLNode.prototype.lookupNamespaceURI = function(prefix) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLNode.prototype.isEqualNode = function(node) {\n var i, j, ref2;\n if (node.nodeType !== this.nodeType) {\n return false;\n }\n if (node.children.length !== this.children.length) {\n return false;\n }\n for (i = j = 0, ref2 = this.children.length - 1; 0 <= ref2 ? j <= ref2 : j >= ref2; i = 0 <= ref2 ? ++j : --j) {\n if (!this.children[i].isEqualNode(node.children[i])) {\n return false;\n }\n }\n return true;\n };\n\n XMLNode.prototype.getFeature = function(feature, version) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLNode.prototype.setUserData = function(key, data, handler) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLNode.prototype.getUserData = function(key) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLNode.prototype.contains = function(other) {\n if (!other) {\n return false;\n }\n return other === this || this.isDescendant(other);\n };\n\n XMLNode.prototype.isDescendant = function(node) {\n var child, isDescendantChild, j, len, ref2;\n ref2 = this.children;\n for (j = 0, len = ref2.length; j < len; j++) {\n child = ref2[j];\n if (node === child) {\n return true;\n }\n isDescendantChild = child.isDescendant(node);\n if (isDescendantChild) {\n return true;\n }\n }\n return false;\n };\n\n XMLNode.prototype.isAncestor = function(node) {\n return node.isDescendant(this);\n };\n\n XMLNode.prototype.isPreceding = function(node) {\n var nodePos, thisPos;\n nodePos = this.treePosition(node);\n thisPos = this.treePosition(this);\n if (nodePos === -1 || thisPos === -1) {\n return false;\n } else {\n return nodePos < thisPos;\n }\n };\n\n XMLNode.prototype.isFollowing = function(node) {\n var nodePos, thisPos;\n nodePos = this.treePosition(node);\n thisPos = this.treePosition(this);\n if (nodePos === -1 || thisPos === -1) {\n return false;\n } else {\n return nodePos > thisPos;\n }\n };\n\n XMLNode.prototype.treePosition = function(node) {\n var found, pos;\n pos = 0;\n found = false;\n this.foreachTreeNode(this.document(), function(childNode) {\n pos++;\n if (!found && childNode === node) {\n return found = true;\n }\n });\n if (found) {\n return pos;\n } else {\n return -1;\n }\n };\n\n XMLNode.prototype.foreachTreeNode = function(node, func) {\n var child, j, len, ref2, res;\n node || (node = this.document());\n ref2 = node.children;\n for (j = 0, len = ref2.length; j < len; j++) {\n child = ref2[j];\n if (res = func(child)) {\n return res;\n } else {\n res = this.foreachTreeNode(child, func);\n if (res) {\n return res;\n }\n }\n }\n };\n\n return XMLNode;\n\n })();\n\n}).call(this);\n", "// Generated by CoffeeScript 1.12.7\n(function() {\n var XMLStringifier,\n bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },\n hasProp = {}.hasOwnProperty;\n\n module.exports = XMLStringifier = (function() {\n function XMLStringifier(options) {\n this.assertLegalName = bind(this.assertLegalName, this);\n this.assertLegalChar = bind(this.assertLegalChar, this);\n var key, ref, value;\n options || (options = {});\n this.options = options;\n if (!this.options.version) {\n this.options.version = '1.0';\n }\n ref = options.stringify || {};\n for (key in ref) {\n if (!hasProp.call(ref, key)) continue;\n value = ref[key];\n this[key] = value;\n }\n }\n\n XMLStringifier.prototype.name = function(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalName('' + val || '');\n };\n\n XMLStringifier.prototype.text = function(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalChar(this.textEscape('' + val || ''));\n };\n\n XMLStringifier.prototype.cdata = function(val) {\n if (this.options.noValidation) {\n return val;\n }\n val = '' + val || '';\n val = val.replace(']]>', ']]]]>');\n return this.assertLegalChar(val);\n };\n\n XMLStringifier.prototype.comment = function(val) {\n if (this.options.noValidation) {\n return val;\n }\n val = '' + val || '';\n if (val.match(/--/)) {\n throw new Error(\"Comment text cannot contain double-hypen: \" + val);\n }\n return this.assertLegalChar(val);\n };\n\n XMLStringifier.prototype.raw = function(val) {\n if (this.options.noValidation) {\n return val;\n }\n return '' + val || '';\n };\n\n XMLStringifier.prototype.attValue = function(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalChar(this.attEscape(val = '' + val || ''));\n };\n\n XMLStringifier.prototype.insTarget = function(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalChar('' + val || '');\n };\n\n XMLStringifier.prototype.insValue = function(val) {\n if (this.options.noValidation) {\n return val;\n }\n val = '' + val || '';\n if (val.match(/\\?>/)) {\n throw new Error(\"Invalid processing instruction value: \" + val);\n }\n return this.assertLegalChar(val);\n };\n\n XMLStringifier.prototype.xmlVersion = function(val) {\n if (this.options.noValidation) {\n return val;\n }\n val = '' + val || '';\n if (!val.match(/1\\.[0-9]+/)) {\n throw new Error(\"Invalid version number: \" + val);\n }\n return val;\n };\n\n XMLStringifier.prototype.xmlEncoding = function(val) {\n if (this.options.noValidation) {\n return val;\n }\n val = '' + val || '';\n if (!val.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/)) {\n throw new Error(\"Invalid encoding: \" + val);\n }\n return this.assertLegalChar(val);\n };\n\n XMLStringifier.prototype.xmlStandalone = function(val) {\n if (this.options.noValidation) {\n return val;\n }\n if (val) {\n return \"yes\";\n } else {\n return \"no\";\n }\n };\n\n XMLStringifier.prototype.dtdPubID = function(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalChar('' + val || '');\n };\n\n XMLStringifier.prototype.dtdSysID = function(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalChar('' + val || '');\n };\n\n XMLStringifier.prototype.dtdElementValue = function(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalChar('' + val || '');\n };\n\n XMLStringifier.prototype.dtdAttType = function(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalChar('' + val || '');\n };\n\n XMLStringifier.prototype.dtdAttDefault = function(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalChar('' + val || '');\n };\n\n XMLStringifier.prototype.dtdEntityValue = function(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalChar('' + val || '');\n };\n\n XMLStringifier.prototype.dtdNData = function(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalChar('' + val || '');\n };\n\n XMLStringifier.prototype.convertAttKey = '@';\n\n XMLStringifier.prototype.convertPIKey = '?';\n\n XMLStringifier.prototype.convertTextKey = '#text';\n\n XMLStringifier.prototype.convertCDataKey = '#cdata';\n\n XMLStringifier.prototype.convertCommentKey = '#comment';\n\n XMLStringifier.prototype.convertRawKey = '#raw';\n\n XMLStringifier.prototype.assertLegalChar = function(str) {\n var regex, res;\n if (this.options.noValidation) {\n return str;\n }\n regex = '';\n if (this.options.version === '1.0') {\n regex = /[\\0-\\x08\\x0B\\f\\x0E-\\x1F\\uFFFE\\uFFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]/;\n if (res = str.match(regex)) {\n throw new Error(\"Invalid character in string: \" + str + \" at index \" + res.index);\n }\n } else if (this.options.version === '1.1') {\n regex = /[\\0\\uFFFE\\uFFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]/;\n if (res = str.match(regex)) {\n throw new Error(\"Invalid character in string: \" + str + \" at index \" + res.index);\n }\n }\n return str;\n };\n\n XMLStringifier.prototype.assertLegalName = function(str) {\n var regex;\n if (this.options.noValidation) {\n return str;\n }\n this.assertLegalChar(str);\n regex = /^([:A-Z_a-z\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]|[\\uD800-\\uDB7F][\\uDC00-\\uDFFF])([\\x2D\\.0-:A-Z_a-z\\xB7\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u037D\\u037F-\\u1FFF\\u200C\\u200D\\u203F\\u2040\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]|[\\uD800-\\uDB7F][\\uDC00-\\uDFFF])*$/;\n if (!str.match(regex)) {\n throw new Error(\"Invalid character in name\");\n }\n return str;\n };\n\n XMLStringifier.prototype.textEscape = function(str) {\n var ampregex;\n if (this.options.noValidation) {\n return str;\n }\n ampregex = this.options.noDoubleEncoding ? /(?!&\\S+;)&/g : /&/g;\n return str.replace(ampregex, '&').replace(//g, '>').replace(/\\r/g, ' ');\n };\n\n XMLStringifier.prototype.attEscape = function(str) {\n var ampregex;\n if (this.options.noValidation) {\n return str;\n }\n ampregex = this.options.noDoubleEncoding ? /(?!&\\S+;)&/g : /&/g;\n return str.replace(ampregex, '&').replace(/ 0) {\n return new Array(indentLevel).join(options.indent);\n }\n }\n return '';\n };\n\n XMLWriterBase.prototype.endline = function(node, options, level) {\n if (!options.pretty || options.suppressPrettyCount) {\n return '';\n } else {\n return options.newline;\n }\n };\n\n XMLWriterBase.prototype.attribute = function(att, options, level) {\n var r;\n this.openAttribute(att, options, level);\n r = ' ' + att.name + '=\"' + att.value + '\"';\n this.closeAttribute(att, options, level);\n return r;\n };\n\n XMLWriterBase.prototype.cdata = function(node, options, level) {\n var r;\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level) + '' + this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n };\n\n XMLWriterBase.prototype.comment = function(node, options, level) {\n var r;\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level) + '' + this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n };\n\n XMLWriterBase.prototype.declaration = function(node, options, level) {\n var r;\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level) + '';\n r += this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n };\n\n XMLWriterBase.prototype.docType = function(node, options, level) {\n var child, i, len, r, ref;\n level || (level = 0);\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level);\n r += ' 0) {\n r += ' [';\n r += this.endline(node, options, level);\n options.state = WriterState.InsideTag;\n ref = node.children;\n for (i = 0, len = ref.length; i < len; i++) {\n child = ref[i];\n r += this.writeChildNode(child, options, level + 1);\n }\n options.state = WriterState.CloseTag;\n r += ']';\n }\n options.state = WriterState.CloseTag;\n r += options.spaceBeforeSlash + '>';\n r += this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n };\n\n XMLWriterBase.prototype.element = function(node, options, level) {\n var att, child, childNodeCount, firstChildNode, i, j, len, len1, name, prettySuppressed, r, ref, ref1, ref2;\n level || (level = 0);\n prettySuppressed = false;\n r = '';\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r += this.indent(node, options, level) + '<' + node.name;\n ref = node.attribs;\n for (name in ref) {\n if (!hasProp.call(ref, name)) continue;\n att = ref[name];\n r += this.attribute(att, options, level);\n }\n childNodeCount = node.children.length;\n firstChildNode = childNodeCount === 0 ? null : node.children[0];\n if (childNodeCount === 0 || node.children.every(function(e) {\n return (e.type === NodeType.Text || e.type === NodeType.Raw) && e.value === '';\n })) {\n if (options.allowEmpty) {\n r += '>';\n options.state = WriterState.CloseTag;\n r += '' + this.endline(node, options, level);\n } else {\n options.state = WriterState.CloseTag;\n r += options.spaceBeforeSlash + '/>' + this.endline(node, options, level);\n }\n } else if (options.pretty && childNodeCount === 1 && (firstChildNode.type === NodeType.Text || firstChildNode.type === NodeType.Raw) && (firstChildNode.value != null)) {\n r += '>';\n options.state = WriterState.InsideTag;\n options.suppressPrettyCount++;\n prettySuppressed = true;\n r += this.writeChildNode(firstChildNode, options, level + 1);\n options.suppressPrettyCount--;\n prettySuppressed = false;\n options.state = WriterState.CloseTag;\n r += '' + this.endline(node, options, level);\n } else {\n if (options.dontPrettyTextNodes) {\n ref1 = node.children;\n for (i = 0, len = ref1.length; i < len; i++) {\n child = ref1[i];\n if ((child.type === NodeType.Text || child.type === NodeType.Raw) && (child.value != null)) {\n options.suppressPrettyCount++;\n prettySuppressed = true;\n break;\n }\n }\n }\n r += '>' + this.endline(node, options, level);\n options.state = WriterState.InsideTag;\n ref2 = node.children;\n for (j = 0, len1 = ref2.length; j < len1; j++) {\n child = ref2[j];\n r += this.writeChildNode(child, options, level + 1);\n }\n options.state = WriterState.CloseTag;\n r += this.indent(node, options, level) + '';\n if (prettySuppressed) {\n options.suppressPrettyCount--;\n }\n r += this.endline(node, options, level);\n options.state = WriterState.None;\n }\n this.closeNode(node, options, level);\n return r;\n };\n\n XMLWriterBase.prototype.writeChildNode = function(node, options, level) {\n switch (node.type) {\n case NodeType.CData:\n return this.cdata(node, options, level);\n case NodeType.Comment:\n return this.comment(node, options, level);\n case NodeType.Element:\n return this.element(node, options, level);\n case NodeType.Raw:\n return this.raw(node, options, level);\n case NodeType.Text:\n return this.text(node, options, level);\n case NodeType.ProcessingInstruction:\n return this.processingInstruction(node, options, level);\n case NodeType.Dummy:\n return '';\n case NodeType.Declaration:\n return this.declaration(node, options, level);\n case NodeType.DocType:\n return this.docType(node, options, level);\n case NodeType.AttributeDeclaration:\n return this.dtdAttList(node, options, level);\n case NodeType.ElementDeclaration:\n return this.dtdElement(node, options, level);\n case NodeType.EntityDeclaration:\n return this.dtdEntity(node, options, level);\n case NodeType.NotationDeclaration:\n return this.dtdNotation(node, options, level);\n default:\n throw new Error(\"Unknown XML node type: \" + node.constructor.name);\n }\n };\n\n XMLWriterBase.prototype.processingInstruction = function(node, options, level) {\n var r;\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level) + '';\n r += this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n };\n\n XMLWriterBase.prototype.raw = function(node, options, level) {\n var r;\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level);\n options.state = WriterState.InsideTag;\n r += node.value;\n options.state = WriterState.CloseTag;\n r += this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n };\n\n XMLWriterBase.prototype.text = function(node, options, level) {\n var r;\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level);\n options.state = WriterState.InsideTag;\n r += node.value;\n options.state = WriterState.CloseTag;\n r += this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n };\n\n XMLWriterBase.prototype.dtdAttList = function(node, options, level) {\n var r;\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level) + '' + this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n };\n\n XMLWriterBase.prototype.dtdElement = function(node, options, level) {\n var r;\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level) + '' + this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n };\n\n XMLWriterBase.prototype.dtdEntity = function(node, options, level) {\n var r;\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level) + '' + this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n };\n\n XMLWriterBase.prototype.dtdNotation = function(node, options, level) {\n var r;\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level) + '' + this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n };\n\n XMLWriterBase.prototype.openNode = function(node, options, level) {};\n\n XMLWriterBase.prototype.closeNode = function(node, options, level) {};\n\n XMLWriterBase.prototype.openAttribute = function(att, options, level) {};\n\n XMLWriterBase.prototype.closeAttribute = function(att, options, level) {};\n\n return XMLWriterBase;\n\n })();\n\n}).call(this);\n", "// Generated by CoffeeScript 1.12.7\n(function() {\n var XMLStringWriter, XMLWriterBase,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n XMLWriterBase = require('./XMLWriterBase');\n\n module.exports = XMLStringWriter = (function(superClass) {\n extend(XMLStringWriter, superClass);\n\n function XMLStringWriter(options) {\n XMLStringWriter.__super__.constructor.call(this, options);\n }\n\n XMLStringWriter.prototype.document = function(doc, options) {\n var child, i, len, r, ref;\n options = this.filterOptions(options);\n r = '';\n ref = doc.children;\n for (i = 0, len = ref.length; i < len; i++) {\n child = ref[i];\n r += this.writeChildNode(child, options, 0);\n }\n if (options.pretty && r.slice(-options.newline.length) === options.newline) {\n r = r.slice(0, -options.newline.length);\n }\n return r;\n };\n\n return XMLStringWriter;\n\n })(XMLWriterBase);\n\n}).call(this);\n", "// Generated by CoffeeScript 1.12.7\n(function() {\n var NodeType, XMLDOMConfiguration, XMLDOMImplementation, XMLDocument, XMLNode, XMLStringWriter, XMLStringifier, isPlainObject,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n isPlainObject = require('./Utility').isPlainObject;\n\n XMLDOMImplementation = require('./XMLDOMImplementation');\n\n XMLDOMConfiguration = require('./XMLDOMConfiguration');\n\n XMLNode = require('./XMLNode');\n\n NodeType = require('./NodeType');\n\n XMLStringifier = require('./XMLStringifier');\n\n XMLStringWriter = require('./XMLStringWriter');\n\n module.exports = XMLDocument = (function(superClass) {\n extend(XMLDocument, superClass);\n\n function XMLDocument(options) {\n XMLDocument.__super__.constructor.call(this, null);\n this.name = \"#document\";\n this.type = NodeType.Document;\n this.documentURI = null;\n this.domConfig = new XMLDOMConfiguration();\n options || (options = {});\n if (!options.writer) {\n options.writer = new XMLStringWriter();\n }\n this.options = options;\n this.stringify = new XMLStringifier(options);\n }\n\n Object.defineProperty(XMLDocument.prototype, 'implementation', {\n value: new XMLDOMImplementation()\n });\n\n Object.defineProperty(XMLDocument.prototype, 'doctype', {\n get: function() {\n var child, i, len, ref;\n ref = this.children;\n for (i = 0, len = ref.length; i < len; i++) {\n child = ref[i];\n if (child.type === NodeType.DocType) {\n return child;\n }\n }\n return null;\n }\n });\n\n Object.defineProperty(XMLDocument.prototype, 'documentElement', {\n get: function() {\n return this.rootObject || null;\n }\n });\n\n Object.defineProperty(XMLDocument.prototype, 'inputEncoding', {\n get: function() {\n return null;\n }\n });\n\n Object.defineProperty(XMLDocument.prototype, 'strictErrorChecking', {\n get: function() {\n return false;\n }\n });\n\n Object.defineProperty(XMLDocument.prototype, 'xmlEncoding', {\n get: function() {\n if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) {\n return this.children[0].encoding;\n } else {\n return null;\n }\n }\n });\n\n Object.defineProperty(XMLDocument.prototype, 'xmlStandalone', {\n get: function() {\n if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) {\n return this.children[0].standalone === 'yes';\n } else {\n return false;\n }\n }\n });\n\n Object.defineProperty(XMLDocument.prototype, 'xmlVersion', {\n get: function() {\n if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) {\n return this.children[0].version;\n } else {\n return \"1.0\";\n }\n }\n });\n\n Object.defineProperty(XMLDocument.prototype, 'URL', {\n get: function() {\n return this.documentURI;\n }\n });\n\n Object.defineProperty(XMLDocument.prototype, 'origin', {\n get: function() {\n return null;\n }\n });\n\n Object.defineProperty(XMLDocument.prototype, 'compatMode', {\n get: function() {\n return null;\n }\n });\n\n Object.defineProperty(XMLDocument.prototype, 'characterSet', {\n get: function() {\n return null;\n }\n });\n\n Object.defineProperty(XMLDocument.prototype, 'contentType', {\n get: function() {\n return null;\n }\n });\n\n XMLDocument.prototype.end = function(writer) {\n var writerOptions;\n writerOptions = {};\n if (!writer) {\n writer = this.options.writer;\n } else if (isPlainObject(writer)) {\n writerOptions = writer;\n writer = this.options.writer;\n }\n return writer.document(this, writer.filterOptions(writerOptions));\n };\n\n XMLDocument.prototype.toString = function(options) {\n return this.options.writer.document(this, this.options.writer.filterOptions(options));\n };\n\n XMLDocument.prototype.createElement = function(tagName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLDocument.prototype.createDocumentFragment = function() {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLDocument.prototype.createTextNode = function(data) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLDocument.prototype.createComment = function(data) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLDocument.prototype.createCDATASection = function(data) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLDocument.prototype.createProcessingInstruction = function(target, data) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLDocument.prototype.createAttribute = function(name) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLDocument.prototype.createEntityReference = function(name) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLDocument.prototype.getElementsByTagName = function(tagname) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLDocument.prototype.importNode = function(importedNode, deep) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLDocument.prototype.createElementNS = function(namespaceURI, qualifiedName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLDocument.prototype.createAttributeNS = function(namespaceURI, qualifiedName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLDocument.prototype.getElementsByTagNameNS = function(namespaceURI, localName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLDocument.prototype.getElementById = function(elementId) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLDocument.prototype.adoptNode = function(source) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLDocument.prototype.normalizeDocument = function() {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLDocument.prototype.renameNode = function(node, namespaceURI, qualifiedName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLDocument.prototype.getElementsByClassName = function(classNames) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLDocument.prototype.createEvent = function(eventInterface) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLDocument.prototype.createRange = function() {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLDocument.prototype.createNodeIterator = function(root, whatToShow, filter) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLDocument.prototype.createTreeWalker = function(root, whatToShow, filter) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n return XMLDocument;\n\n })(XMLNode);\n\n}).call(this);\n", "// Generated by CoffeeScript 1.12.7\n(function() {\n var NodeType, WriterState, XMLAttribute, XMLCData, XMLComment, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDeclaration, XMLDocType, XMLDocument, XMLDocumentCB, XMLElement, XMLProcessingInstruction, XMLRaw, XMLStringWriter, XMLStringifier, XMLText, getValue, isFunction, isObject, isPlainObject, ref,\n hasProp = {}.hasOwnProperty;\n\n ref = require('./Utility'), isObject = ref.isObject, isFunction = ref.isFunction, isPlainObject = ref.isPlainObject, getValue = ref.getValue;\n\n NodeType = require('./NodeType');\n\n XMLDocument = require('./XMLDocument');\n\n XMLElement = require('./XMLElement');\n\n XMLCData = require('./XMLCData');\n\n XMLComment = require('./XMLComment');\n\n XMLRaw = require('./XMLRaw');\n\n XMLText = require('./XMLText');\n\n XMLProcessingInstruction = require('./XMLProcessingInstruction');\n\n XMLDeclaration = require('./XMLDeclaration');\n\n XMLDocType = require('./XMLDocType');\n\n XMLDTDAttList = require('./XMLDTDAttList');\n\n XMLDTDEntity = require('./XMLDTDEntity');\n\n XMLDTDElement = require('./XMLDTDElement');\n\n XMLDTDNotation = require('./XMLDTDNotation');\n\n XMLAttribute = require('./XMLAttribute');\n\n XMLStringifier = require('./XMLStringifier');\n\n XMLStringWriter = require('./XMLStringWriter');\n\n WriterState = require('./WriterState');\n\n module.exports = XMLDocumentCB = (function() {\n function XMLDocumentCB(options, onData, onEnd) {\n var writerOptions;\n this.name = \"?xml\";\n this.type = NodeType.Document;\n options || (options = {});\n writerOptions = {};\n if (!options.writer) {\n options.writer = new XMLStringWriter();\n } else if (isPlainObject(options.writer)) {\n writerOptions = options.writer;\n options.writer = new XMLStringWriter();\n }\n this.options = options;\n this.writer = options.writer;\n this.writerOptions = this.writer.filterOptions(writerOptions);\n this.stringify = new XMLStringifier(options);\n this.onDataCallback = onData || function() {};\n this.onEndCallback = onEnd || function() {};\n this.currentNode = null;\n this.currentLevel = -1;\n this.openTags = {};\n this.documentStarted = false;\n this.documentCompleted = false;\n this.root = null;\n }\n\n XMLDocumentCB.prototype.createChildNode = function(node) {\n var att, attName, attributes, child, i, len, ref1, ref2;\n switch (node.type) {\n case NodeType.CData:\n this.cdata(node.value);\n break;\n case NodeType.Comment:\n this.comment(node.value);\n break;\n case NodeType.Element:\n attributes = {};\n ref1 = node.attribs;\n for (attName in ref1) {\n if (!hasProp.call(ref1, attName)) continue;\n att = ref1[attName];\n attributes[attName] = att.value;\n }\n this.node(node.name, attributes);\n break;\n case NodeType.Dummy:\n this.dummy();\n break;\n case NodeType.Raw:\n this.raw(node.value);\n break;\n case NodeType.Text:\n this.text(node.value);\n break;\n case NodeType.ProcessingInstruction:\n this.instruction(node.target, node.value);\n break;\n default:\n throw new Error(\"This XML node type is not supported in a JS object: \" + node.constructor.name);\n }\n ref2 = node.children;\n for (i = 0, len = ref2.length; i < len; i++) {\n child = ref2[i];\n this.createChildNode(child);\n if (child.type === NodeType.Element) {\n this.up();\n }\n }\n return this;\n };\n\n XMLDocumentCB.prototype.dummy = function() {\n return this;\n };\n\n XMLDocumentCB.prototype.node = function(name, attributes, text) {\n var ref1;\n if (name == null) {\n throw new Error(\"Missing node name.\");\n }\n if (this.root && this.currentLevel === -1) {\n throw new Error(\"Document can only have one root node. \" + this.debugInfo(name));\n }\n this.openCurrent();\n name = getValue(name);\n if (attributes == null) {\n attributes = {};\n }\n attributes = getValue(attributes);\n if (!isObject(attributes)) {\n ref1 = [attributes, text], text = ref1[0], attributes = ref1[1];\n }\n this.currentNode = new XMLElement(this, name, attributes);\n this.currentNode.children = false;\n this.currentLevel++;\n this.openTags[this.currentLevel] = this.currentNode;\n if (text != null) {\n this.text(text);\n }\n return this;\n };\n\n XMLDocumentCB.prototype.element = function(name, attributes, text) {\n var child, i, len, oldValidationFlag, ref1, root;\n if (this.currentNode && this.currentNode.type === NodeType.DocType) {\n this.dtdElement.apply(this, arguments);\n } else {\n if (Array.isArray(name) || isObject(name) || isFunction(name)) {\n oldValidationFlag = this.options.noValidation;\n this.options.noValidation = true;\n root = new XMLDocument(this.options).element('TEMP_ROOT');\n root.element(name);\n this.options.noValidation = oldValidationFlag;\n ref1 = root.children;\n for (i = 0, len = ref1.length; i < len; i++) {\n child = ref1[i];\n this.createChildNode(child);\n if (child.type === NodeType.Element) {\n this.up();\n }\n }\n } else {\n this.node(name, attributes, text);\n }\n }\n return this;\n };\n\n XMLDocumentCB.prototype.attribute = function(name, value) {\n var attName, attValue;\n if (!this.currentNode || this.currentNode.children) {\n throw new Error(\"att() can only be used immediately after an ele() call in callback mode. \" + this.debugInfo(name));\n }\n if (name != null) {\n name = getValue(name);\n }\n if (isObject(name)) {\n for (attName in name) {\n if (!hasProp.call(name, attName)) continue;\n attValue = name[attName];\n this.attribute(attName, attValue);\n }\n } else {\n if (isFunction(value)) {\n value = value.apply();\n }\n if (this.options.keepNullAttributes && (value == null)) {\n this.currentNode.attribs[name] = new XMLAttribute(this, name, \"\");\n } else if (value != null) {\n this.currentNode.attribs[name] = new XMLAttribute(this, name, value);\n }\n }\n return this;\n };\n\n XMLDocumentCB.prototype.text = function(value) {\n var node;\n this.openCurrent();\n node = new XMLText(this, value);\n this.onData(this.writer.text(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n return this;\n };\n\n XMLDocumentCB.prototype.cdata = function(value) {\n var node;\n this.openCurrent();\n node = new XMLCData(this, value);\n this.onData(this.writer.cdata(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n return this;\n };\n\n XMLDocumentCB.prototype.comment = function(value) {\n var node;\n this.openCurrent();\n node = new XMLComment(this, value);\n this.onData(this.writer.comment(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n return this;\n };\n\n XMLDocumentCB.prototype.raw = function(value) {\n var node;\n this.openCurrent();\n node = new XMLRaw(this, value);\n this.onData(this.writer.raw(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n return this;\n };\n\n XMLDocumentCB.prototype.instruction = function(target, value) {\n var i, insTarget, insValue, len, node;\n this.openCurrent();\n if (target != null) {\n target = getValue(target);\n }\n if (value != null) {\n value = getValue(value);\n }\n if (Array.isArray(target)) {\n for (i = 0, len = target.length; i < len; i++) {\n insTarget = target[i];\n this.instruction(insTarget);\n }\n } else if (isObject(target)) {\n for (insTarget in target) {\n if (!hasProp.call(target, insTarget)) continue;\n insValue = target[insTarget];\n this.instruction(insTarget, insValue);\n }\n } else {\n if (isFunction(value)) {\n value = value.apply();\n }\n node = new XMLProcessingInstruction(this, target, value);\n this.onData(this.writer.processingInstruction(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n }\n return this;\n };\n\n XMLDocumentCB.prototype.declaration = function(version, encoding, standalone) {\n var node;\n this.openCurrent();\n if (this.documentStarted) {\n throw new Error(\"declaration() must be the first node.\");\n }\n node = new XMLDeclaration(this, version, encoding, standalone);\n this.onData(this.writer.declaration(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n return this;\n };\n\n XMLDocumentCB.prototype.doctype = function(root, pubID, sysID) {\n this.openCurrent();\n if (root == null) {\n throw new Error(\"Missing root node name.\");\n }\n if (this.root) {\n throw new Error(\"dtd() must come before the root node.\");\n }\n this.currentNode = new XMLDocType(this, pubID, sysID);\n this.currentNode.rootNodeName = root;\n this.currentNode.children = false;\n this.currentLevel++;\n this.openTags[this.currentLevel] = this.currentNode;\n return this;\n };\n\n XMLDocumentCB.prototype.dtdElement = function(name, value) {\n var node;\n this.openCurrent();\n node = new XMLDTDElement(this, name, value);\n this.onData(this.writer.dtdElement(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n return this;\n };\n\n XMLDocumentCB.prototype.attList = function(elementName, attributeName, attributeType, defaultValueType, defaultValue) {\n var node;\n this.openCurrent();\n node = new XMLDTDAttList(this, elementName, attributeName, attributeType, defaultValueType, defaultValue);\n this.onData(this.writer.dtdAttList(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n return this;\n };\n\n XMLDocumentCB.prototype.entity = function(name, value) {\n var node;\n this.openCurrent();\n node = new XMLDTDEntity(this, false, name, value);\n this.onData(this.writer.dtdEntity(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n return this;\n };\n\n XMLDocumentCB.prototype.pEntity = function(name, value) {\n var node;\n this.openCurrent();\n node = new XMLDTDEntity(this, true, name, value);\n this.onData(this.writer.dtdEntity(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n return this;\n };\n\n XMLDocumentCB.prototype.notation = function(name, value) {\n var node;\n this.openCurrent();\n node = new XMLDTDNotation(this, name, value);\n this.onData(this.writer.dtdNotation(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n return this;\n };\n\n XMLDocumentCB.prototype.up = function() {\n if (this.currentLevel < 0) {\n throw new Error(\"The document node has no parent.\");\n }\n if (this.currentNode) {\n if (this.currentNode.children) {\n this.closeNode(this.currentNode);\n } else {\n this.openNode(this.currentNode);\n }\n this.currentNode = null;\n } else {\n this.closeNode(this.openTags[this.currentLevel]);\n }\n delete this.openTags[this.currentLevel];\n this.currentLevel--;\n return this;\n };\n\n XMLDocumentCB.prototype.end = function() {\n while (this.currentLevel >= 0) {\n this.up();\n }\n return this.onEnd();\n };\n\n XMLDocumentCB.prototype.openCurrent = function() {\n if (this.currentNode) {\n this.currentNode.children = true;\n return this.openNode(this.currentNode);\n }\n };\n\n XMLDocumentCB.prototype.openNode = function(node) {\n var att, chunk, name, ref1;\n if (!node.isOpen) {\n if (!this.root && this.currentLevel === 0 && node.type === NodeType.Element) {\n this.root = node;\n }\n chunk = '';\n if (node.type === NodeType.Element) {\n this.writerOptions.state = WriterState.OpenTag;\n chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + '<' + node.name;\n ref1 = node.attribs;\n for (name in ref1) {\n if (!hasProp.call(ref1, name)) continue;\n att = ref1[name];\n chunk += this.writer.attribute(att, this.writerOptions, this.currentLevel);\n }\n chunk += (node.children ? '>' : '/>') + this.writer.endline(node, this.writerOptions, this.currentLevel);\n this.writerOptions.state = WriterState.InsideTag;\n } else {\n this.writerOptions.state = WriterState.OpenTag;\n chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + '';\n }\n chunk += this.writer.endline(node, this.writerOptions, this.currentLevel);\n }\n this.onData(chunk, this.currentLevel);\n return node.isOpen = true;\n }\n };\n\n XMLDocumentCB.prototype.closeNode = function(node) {\n var chunk;\n if (!node.isClosed) {\n chunk = '';\n this.writerOptions.state = WriterState.CloseTag;\n if (node.type === NodeType.Element) {\n chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + '' + this.writer.endline(node, this.writerOptions, this.currentLevel);\n } else {\n chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + ']>' + this.writer.endline(node, this.writerOptions, this.currentLevel);\n }\n this.writerOptions.state = WriterState.None;\n this.onData(chunk, this.currentLevel);\n return node.isClosed = true;\n }\n };\n\n XMLDocumentCB.prototype.onData = function(chunk, level) {\n this.documentStarted = true;\n return this.onDataCallback(chunk, level + 1);\n };\n\n XMLDocumentCB.prototype.onEnd = function() {\n this.documentCompleted = true;\n return this.onEndCallback();\n };\n\n XMLDocumentCB.prototype.debugInfo = function(name) {\n if (name == null) {\n return \"\";\n } else {\n return \"node: <\" + name + \">\";\n }\n };\n\n XMLDocumentCB.prototype.ele = function() {\n return this.element.apply(this, arguments);\n };\n\n XMLDocumentCB.prototype.nod = function(name, attributes, text) {\n return this.node(name, attributes, text);\n };\n\n XMLDocumentCB.prototype.txt = function(value) {\n return this.text(value);\n };\n\n XMLDocumentCB.prototype.dat = function(value) {\n return this.cdata(value);\n };\n\n XMLDocumentCB.prototype.com = function(value) {\n return this.comment(value);\n };\n\n XMLDocumentCB.prototype.ins = function(target, value) {\n return this.instruction(target, value);\n };\n\n XMLDocumentCB.prototype.dec = function(version, encoding, standalone) {\n return this.declaration(version, encoding, standalone);\n };\n\n XMLDocumentCB.prototype.dtd = function(root, pubID, sysID) {\n return this.doctype(root, pubID, sysID);\n };\n\n XMLDocumentCB.prototype.e = function(name, attributes, text) {\n return this.element(name, attributes, text);\n };\n\n XMLDocumentCB.prototype.n = function(name, attributes, text) {\n return this.node(name, attributes, text);\n };\n\n XMLDocumentCB.prototype.t = function(value) {\n return this.text(value);\n };\n\n XMLDocumentCB.prototype.d = function(value) {\n return this.cdata(value);\n };\n\n XMLDocumentCB.prototype.c = function(value) {\n return this.comment(value);\n };\n\n XMLDocumentCB.prototype.r = function(value) {\n return this.raw(value);\n };\n\n XMLDocumentCB.prototype.i = function(target, value) {\n return this.instruction(target, value);\n };\n\n XMLDocumentCB.prototype.att = function() {\n if (this.currentNode && this.currentNode.type === NodeType.DocType) {\n return this.attList.apply(this, arguments);\n } else {\n return this.attribute.apply(this, arguments);\n }\n };\n\n XMLDocumentCB.prototype.a = function() {\n if (this.currentNode && this.currentNode.type === NodeType.DocType) {\n return this.attList.apply(this, arguments);\n } else {\n return this.attribute.apply(this, arguments);\n }\n };\n\n XMLDocumentCB.prototype.ent = function(name, value) {\n return this.entity(name, value);\n };\n\n XMLDocumentCB.prototype.pent = function(name, value) {\n return this.pEntity(name, value);\n };\n\n XMLDocumentCB.prototype.not = function(name, value) {\n return this.notation(name, value);\n };\n\n return XMLDocumentCB;\n\n })();\n\n}).call(this);\n", "// Generated by CoffeeScript 1.12.7\n(function() {\n var NodeType, WriterState, XMLStreamWriter, XMLWriterBase,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n NodeType = require('./NodeType');\n\n XMLWriterBase = require('./XMLWriterBase');\n\n WriterState = require('./WriterState');\n\n module.exports = XMLStreamWriter = (function(superClass) {\n extend(XMLStreamWriter, superClass);\n\n function XMLStreamWriter(stream, options) {\n this.stream = stream;\n XMLStreamWriter.__super__.constructor.call(this, options);\n }\n\n XMLStreamWriter.prototype.endline = function(node, options, level) {\n if (node.isLastRootNode && options.state === WriterState.CloseTag) {\n return '';\n } else {\n return XMLStreamWriter.__super__.endline.call(this, node, options, level);\n }\n };\n\n XMLStreamWriter.prototype.document = function(doc, options) {\n var child, i, j, k, len, len1, ref, ref1, results;\n ref = doc.children;\n for (i = j = 0, len = ref.length; j < len; i = ++j) {\n child = ref[i];\n child.isLastRootNode = i === doc.children.length - 1;\n }\n options = this.filterOptions(options);\n ref1 = doc.children;\n results = [];\n for (k = 0, len1 = ref1.length; k < len1; k++) {\n child = ref1[k];\n results.push(this.writeChildNode(child, options, 0));\n }\n return results;\n };\n\n XMLStreamWriter.prototype.attribute = function(att, options, level) {\n return this.stream.write(XMLStreamWriter.__super__.attribute.call(this, att, options, level));\n };\n\n XMLStreamWriter.prototype.cdata = function(node, options, level) {\n return this.stream.write(XMLStreamWriter.__super__.cdata.call(this, node, options, level));\n };\n\n XMLStreamWriter.prototype.comment = function(node, options, level) {\n return this.stream.write(XMLStreamWriter.__super__.comment.call(this, node, options, level));\n };\n\n XMLStreamWriter.prototype.declaration = function(node, options, level) {\n return this.stream.write(XMLStreamWriter.__super__.declaration.call(this, node, options, level));\n };\n\n XMLStreamWriter.prototype.docType = function(node, options, level) {\n var child, j, len, ref;\n level || (level = 0);\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n this.stream.write(this.indent(node, options, level));\n this.stream.write(' 0) {\n this.stream.write(' [');\n this.stream.write(this.endline(node, options, level));\n options.state = WriterState.InsideTag;\n ref = node.children;\n for (j = 0, len = ref.length; j < len; j++) {\n child = ref[j];\n this.writeChildNode(child, options, level + 1);\n }\n options.state = WriterState.CloseTag;\n this.stream.write(']');\n }\n options.state = WriterState.CloseTag;\n this.stream.write(options.spaceBeforeSlash + '>');\n this.stream.write(this.endline(node, options, level));\n options.state = WriterState.None;\n return this.closeNode(node, options, level);\n };\n\n XMLStreamWriter.prototype.element = function(node, options, level) {\n var att, child, childNodeCount, firstChildNode, j, len, name, prettySuppressed, ref, ref1;\n level || (level = 0);\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n this.stream.write(this.indent(node, options, level) + '<' + node.name);\n ref = node.attribs;\n for (name in ref) {\n if (!hasProp.call(ref, name)) continue;\n att = ref[name];\n this.attribute(att, options, level);\n }\n childNodeCount = node.children.length;\n firstChildNode = childNodeCount === 0 ? null : node.children[0];\n if (childNodeCount === 0 || node.children.every(function(e) {\n return (e.type === NodeType.Text || e.type === NodeType.Raw) && e.value === '';\n })) {\n if (options.allowEmpty) {\n this.stream.write('>');\n options.state = WriterState.CloseTag;\n this.stream.write('');\n } else {\n options.state = WriterState.CloseTag;\n this.stream.write(options.spaceBeforeSlash + '/>');\n }\n } else if (options.pretty && childNodeCount === 1 && (firstChildNode.type === NodeType.Text || firstChildNode.type === NodeType.Raw) && (firstChildNode.value != null)) {\n this.stream.write('>');\n options.state = WriterState.InsideTag;\n options.suppressPrettyCount++;\n prettySuppressed = true;\n this.writeChildNode(firstChildNode, options, level + 1);\n options.suppressPrettyCount--;\n prettySuppressed = false;\n options.state = WriterState.CloseTag;\n this.stream.write('');\n } else {\n this.stream.write('>' + this.endline(node, options, level));\n options.state = WriterState.InsideTag;\n ref1 = node.children;\n for (j = 0, len = ref1.length; j < len; j++) {\n child = ref1[j];\n this.writeChildNode(child, options, level + 1);\n }\n options.state = WriterState.CloseTag;\n this.stream.write(this.indent(node, options, level) + '');\n }\n this.stream.write(this.endline(node, options, level));\n options.state = WriterState.None;\n return this.closeNode(node, options, level);\n };\n\n XMLStreamWriter.prototype.processingInstruction = function(node, options, level) {\n return this.stream.write(XMLStreamWriter.__super__.processingInstruction.call(this, node, options, level));\n };\n\n XMLStreamWriter.prototype.raw = function(node, options, level) {\n return this.stream.write(XMLStreamWriter.__super__.raw.call(this, node, options, level));\n };\n\n XMLStreamWriter.prototype.text = function(node, options, level) {\n return this.stream.write(XMLStreamWriter.__super__.text.call(this, node, options, level));\n };\n\n XMLStreamWriter.prototype.dtdAttList = function(node, options, level) {\n return this.stream.write(XMLStreamWriter.__super__.dtdAttList.call(this, node, options, level));\n };\n\n XMLStreamWriter.prototype.dtdElement = function(node, options, level) {\n return this.stream.write(XMLStreamWriter.__super__.dtdElement.call(this, node, options, level));\n };\n\n XMLStreamWriter.prototype.dtdEntity = function(node, options, level) {\n return this.stream.write(XMLStreamWriter.__super__.dtdEntity.call(this, node, options, level));\n };\n\n XMLStreamWriter.prototype.dtdNotation = function(node, options, level) {\n return this.stream.write(XMLStreamWriter.__super__.dtdNotation.call(this, node, options, level));\n };\n\n return XMLStreamWriter;\n\n })(XMLWriterBase);\n\n}).call(this);\n", "// Generated by CoffeeScript 1.12.7\n(function() {\n var NodeType, WriterState, XMLDOMImplementation, XMLDocument, XMLDocumentCB, XMLStreamWriter, XMLStringWriter, assign, isFunction, ref;\n\n ref = require('./Utility'), assign = ref.assign, isFunction = ref.isFunction;\n\n XMLDOMImplementation = require('./XMLDOMImplementation');\n\n XMLDocument = require('./XMLDocument');\n\n XMLDocumentCB = require('./XMLDocumentCB');\n\n XMLStringWriter = require('./XMLStringWriter');\n\n XMLStreamWriter = require('./XMLStreamWriter');\n\n NodeType = require('./NodeType');\n\n WriterState = require('./WriterState');\n\n module.exports.create = function(name, xmldec, doctype, options) {\n var doc, root;\n if (name == null) {\n throw new Error(\"Root element needs a name.\");\n }\n options = assign({}, xmldec, doctype, options);\n doc = new XMLDocument(options);\n root = doc.element(name);\n if (!options.headless) {\n doc.declaration(options);\n if ((options.pubID != null) || (options.sysID != null)) {\n doc.dtd(options);\n }\n }\n return root;\n };\n\n module.exports.begin = function(options, onData, onEnd) {\n var ref1;\n if (isFunction(options)) {\n ref1 = [options, onData], onData = ref1[0], onEnd = ref1[1];\n options = {};\n }\n if (onData) {\n return new XMLDocumentCB(options, onData, onEnd);\n } else {\n return new XMLDocument(options);\n }\n };\n\n module.exports.stringWriter = function(options) {\n return new XMLStringWriter(options);\n };\n\n module.exports.streamWriter = function(stream, options) {\n return new XMLStreamWriter(stream, options);\n };\n\n module.exports.implementation = new XMLDOMImplementation();\n\n module.exports.nodeType = NodeType;\n\n module.exports.writerState = WriterState;\n\n}).call(this);\n", "// Generated by CoffeeScript 1.12.7\n(function() {\n \"use strict\";\n var builder, defaults, escapeCDATA, requiresCDATA, wrapCDATA,\n hasProp = {}.hasOwnProperty;\n\n builder = require('xmlbuilder');\n\n defaults = require('./defaults').defaults;\n\n requiresCDATA = function(entry) {\n return typeof entry === \"string\" && (entry.indexOf('&') >= 0 || entry.indexOf('>') >= 0 || entry.indexOf('<') >= 0);\n };\n\n wrapCDATA = function(entry) {\n return \"\";\n };\n\n escapeCDATA = function(entry) {\n return entry.replace(']]>', ']]]]>');\n };\n\n exports.Builder = (function() {\n function Builder(opts) {\n var key, ref, value;\n this.options = {};\n ref = defaults[\"0.2\"];\n for (key in ref) {\n if (!hasProp.call(ref, key)) continue;\n value = ref[key];\n this.options[key] = value;\n }\n for (key in opts) {\n if (!hasProp.call(opts, key)) continue;\n value = opts[key];\n this.options[key] = value;\n }\n }\n\n Builder.prototype.buildObject = function(rootObj) {\n var attrkey, charkey, render, rootElement, rootName;\n attrkey = this.options.attrkey;\n charkey = this.options.charkey;\n if ((Object.keys(rootObj).length === 1) && (this.options.rootName === defaults['0.2'].rootName)) {\n rootName = Object.keys(rootObj)[0];\n rootObj = rootObj[rootName];\n } else {\n rootName = this.options.rootName;\n }\n render = (function(_this) {\n return function(element, obj) {\n var attr, child, entry, index, key, value;\n if (typeof obj !== 'object') {\n if (_this.options.cdata && requiresCDATA(obj)) {\n element.raw(wrapCDATA(obj));\n } else {\n element.txt(obj);\n }\n } else if (Array.isArray(obj)) {\n for (index in obj) {\n if (!hasProp.call(obj, index)) continue;\n child = obj[index];\n for (key in child) {\n entry = child[key];\n element = render(element.ele(key), entry).up();\n }\n }\n } else {\n for (key in obj) {\n if (!hasProp.call(obj, key)) continue;\n child = obj[key];\n if (key === attrkey) {\n if (typeof child === \"object\") {\n for (attr in child) {\n value = child[attr];\n element = element.att(attr, value);\n }\n }\n } else if (key === charkey) {\n if (_this.options.cdata && requiresCDATA(child)) {\n element = element.raw(wrapCDATA(child));\n } else {\n element = element.txt(child);\n }\n } else if (Array.isArray(child)) {\n for (index in child) {\n if (!hasProp.call(child, index)) continue;\n entry = child[index];\n if (typeof entry === 'string') {\n if (_this.options.cdata && requiresCDATA(entry)) {\n element = element.ele(key).raw(wrapCDATA(entry)).up();\n } else {\n element = element.ele(key, entry).up();\n }\n } else {\n element = render(element.ele(key), entry).up();\n }\n }\n } else if (typeof child === \"object\") {\n element = render(element.ele(key), child).up();\n } else {\n if (typeof child === 'string' && _this.options.cdata && requiresCDATA(child)) {\n element = element.ele(key).raw(wrapCDATA(child)).up();\n } else {\n if (child == null) {\n child = '';\n }\n element = element.ele(key, child.toString()).up();\n }\n }\n }\n }\n return element;\n };\n })(this);\n rootElement = builder.create(rootName, this.options.xmldec, this.options.doctype, {\n headless: this.options.headless,\n allowSurrogateChars: this.options.allowSurrogateChars\n });\n return render(rootElement, rootObj).end(this.options.renderOpts);\n };\n\n return Builder;\n\n })();\n\n}).call(this);\n", ";(function (sax) { // wrapper for non-node envs\n sax.parser = function (strict, opt) { return new SAXParser(strict, opt) }\n sax.SAXParser = SAXParser\n sax.SAXStream = SAXStream\n sax.createStream = createStream\n\n // When we pass the MAX_BUFFER_LENGTH position, start checking for buffer overruns.\n // When we check, schedule the next check for MAX_BUFFER_LENGTH - (max(buffer lengths)),\n // since that's the earliest that a buffer overrun could occur. This way, checks are\n // as rare as required, but as often as necessary to ensure never crossing this bound.\n // Furthermore, buffers are only tested at most once per write(), so passing a very\n // large string into write() might have undesirable effects, but this is manageable by\n // the caller, so it is assumed to be safe. Thus, a call to write() may, in the extreme\n // edge case, result in creating at most one complete copy of the string passed in.\n // Set to Infinity to have unlimited buffers.\n sax.MAX_BUFFER_LENGTH = 64 * 1024\n\n var buffers = [\n 'comment', 'sgmlDecl', 'textNode', 'tagName', 'doctype',\n 'procInstName', 'procInstBody', 'entity', 'attribName',\n 'attribValue', 'cdata', 'script'\n ]\n\n sax.EVENTS = [\n 'text',\n 'processinginstruction',\n 'sgmldeclaration',\n 'doctype',\n 'comment',\n 'opentagstart',\n 'attribute',\n 'opentag',\n 'closetag',\n 'opencdata',\n 'cdata',\n 'closecdata',\n 'error',\n 'end',\n 'ready',\n 'script',\n 'opennamespace',\n 'closenamespace'\n ]\n\n function SAXParser (strict, opt) {\n if (!(this instanceof SAXParser)) {\n return new SAXParser(strict, opt)\n }\n\n var parser = this\n clearBuffers(parser)\n parser.q = parser.c = ''\n parser.bufferCheckPosition = sax.MAX_BUFFER_LENGTH\n parser.opt = opt || {}\n parser.opt.lowercase = parser.opt.lowercase || parser.opt.lowercasetags\n parser.looseCase = parser.opt.lowercase ? 'toLowerCase' : 'toUpperCase'\n parser.tags = []\n parser.closed = parser.closedRoot = parser.sawRoot = false\n parser.tag = parser.error = null\n parser.strict = !!strict\n parser.noscript = !!(strict || parser.opt.noscript)\n parser.state = S.BEGIN\n parser.strictEntities = parser.opt.strictEntities\n parser.ENTITIES = parser.strictEntities ? Object.create(sax.XML_ENTITIES) : Object.create(sax.ENTITIES)\n parser.attribList = []\n\n // namespaces form a prototype chain.\n // it always points at the current tag,\n // which protos to its parent tag.\n if (parser.opt.xmlns) {\n parser.ns = Object.create(rootNS)\n }\n\n // mostly just for error reporting\n parser.trackPosition = parser.opt.position !== false\n if (parser.trackPosition) {\n parser.position = parser.line = parser.column = 0\n }\n emit(parser, 'onready')\n }\n\n if (!Object.create) {\n Object.create = function (o) {\n function F () {}\n F.prototype = o\n var newf = new F()\n return newf\n }\n }\n\n if (!Object.keys) {\n Object.keys = function (o) {\n var a = []\n for (var i in o) if (o.hasOwnProperty(i)) a.push(i)\n return a\n }\n }\n\n function checkBufferLength (parser) {\n var maxAllowed = Math.max(sax.MAX_BUFFER_LENGTH, 10)\n var maxActual = 0\n for (var i = 0, l = buffers.length; i < l; i++) {\n var len = parser[buffers[i]].length\n if (len > maxAllowed) {\n // Text/cdata nodes can get big, and since they're buffered,\n // we can get here under normal conditions.\n // Avoid issues by emitting the text node now,\n // so at least it won't get any bigger.\n switch (buffers[i]) {\n case 'textNode':\n closeText(parser)\n break\n\n case 'cdata':\n emitNode(parser, 'oncdata', parser.cdata)\n parser.cdata = ''\n break\n\n case 'script':\n emitNode(parser, 'onscript', parser.script)\n parser.script = ''\n break\n\n default:\n error(parser, 'Max buffer length exceeded: ' + buffers[i])\n }\n }\n maxActual = Math.max(maxActual, len)\n }\n // schedule the next check for the earliest possible buffer overrun.\n var m = sax.MAX_BUFFER_LENGTH - maxActual\n parser.bufferCheckPosition = m + parser.position\n }\n\n function clearBuffers (parser) {\n for (var i = 0, l = buffers.length; i < l; i++) {\n parser[buffers[i]] = ''\n }\n }\n\n function flushBuffers (parser) {\n closeText(parser)\n if (parser.cdata !== '') {\n emitNode(parser, 'oncdata', parser.cdata)\n parser.cdata = ''\n }\n if (parser.script !== '') {\n emitNode(parser, 'onscript', parser.script)\n parser.script = ''\n }\n }\n\n SAXParser.prototype = {\n end: function () { end(this) },\n write: write,\n resume: function () { this.error = null; return this },\n close: function () { return this.write(null) },\n flush: function () { flushBuffers(this) }\n }\n\n var Stream\n try {\n Stream = require('stream').Stream\n } catch (ex) {\n Stream = function () {}\n }\n if (!Stream) Stream = function () {}\n\n var streamWraps = sax.EVENTS.filter(function (ev) {\n return ev !== 'error' && ev !== 'end'\n })\n\n function createStream (strict, opt) {\n return new SAXStream(strict, opt)\n }\n\n function SAXStream (strict, opt) {\n if (!(this instanceof SAXStream)) {\n return new SAXStream(strict, opt)\n }\n\n Stream.apply(this)\n\n this._parser = new SAXParser(strict, opt)\n this.writable = true\n this.readable = true\n\n var me = this\n\n this._parser.onend = function () {\n me.emit('end')\n }\n\n this._parser.onerror = function (er) {\n me.emit('error', er)\n\n // if didn't throw, then means error was handled.\n // go ahead and clear error, so we can write again.\n me._parser.error = null\n }\n\n this._decoder = null\n\n streamWraps.forEach(function (ev) {\n Object.defineProperty(me, 'on' + ev, {\n get: function () {\n return me._parser['on' + ev]\n },\n set: function (h) {\n if (!h) {\n me.removeAllListeners(ev)\n me._parser['on' + ev] = h\n return h\n }\n me.on(ev, h)\n },\n enumerable: true,\n configurable: false\n })\n })\n }\n\n SAXStream.prototype = Object.create(Stream.prototype, {\n constructor: {\n value: SAXStream\n }\n })\n\n SAXStream.prototype.write = function (data) {\n if (typeof Buffer === 'function' &&\n typeof Buffer.isBuffer === 'function' &&\n Buffer.isBuffer(data)) {\n if (!this._decoder) {\n var SD = require('string_decoder').StringDecoder\n this._decoder = new SD('utf8')\n }\n data = this._decoder.write(data)\n }\n\n this._parser.write(data.toString())\n this.emit('data', data)\n return true\n }\n\n SAXStream.prototype.end = function (chunk) {\n if (chunk && chunk.length) {\n this.write(chunk)\n }\n this._parser.end()\n return true\n }\n\n SAXStream.prototype.on = function (ev, handler) {\n var me = this\n if (!me._parser['on' + ev] && streamWraps.indexOf(ev) !== -1) {\n me._parser['on' + ev] = function () {\n var args = arguments.length === 1 ? [arguments[0]] : Array.apply(null, arguments)\n args.splice(0, 0, ev)\n me.emit.apply(me, args)\n }\n }\n\n return Stream.prototype.on.call(me, ev, handler)\n }\n\n // this really needs to be replaced with character classes.\n // XML allows all manner of ridiculous numbers and digits.\n var CDATA = '[CDATA['\n var DOCTYPE = 'DOCTYPE'\n var XML_NAMESPACE = 'http://www.w3.org/XML/1998/namespace'\n var XMLNS_NAMESPACE = 'http://www.w3.org/2000/xmlns/'\n var rootNS = { xml: XML_NAMESPACE, xmlns: XMLNS_NAMESPACE }\n\n // http://www.w3.org/TR/REC-xml/#NT-NameStartChar\n // This implementation works on strings, a single character at a time\n // as such, it cannot ever support astral-plane characters (10000-EFFFF)\n // without a significant breaking change to either this parser, or the\n // JavaScript language. Implementation of an emoji-capable xml parser\n // is left as an exercise for the reader.\n var nameStart = /[:_A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]/\n\n var nameBody = /[:_A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\u00B7\\u0300-\\u036F\\u203F-\\u2040.\\d-]/\n\n var entityStart = /[#:_A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]/\n var entityBody = /[#:_A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\u00B7\\u0300-\\u036F\\u203F-\\u2040.\\d-]/\n\n function isWhitespace (c) {\n return c === ' ' || c === '\\n' || c === '\\r' || c === '\\t'\n }\n\n function isQuote (c) {\n return c === '\"' || c === '\\''\n }\n\n function isAttribEnd (c) {\n return c === '>' || isWhitespace(c)\n }\n\n function isMatch (regex, c) {\n return regex.test(c)\n }\n\n function notMatch (regex, c) {\n return !isMatch(regex, c)\n }\n\n var S = 0\n sax.STATE = {\n BEGIN: S++, // leading byte order mark or whitespace\n BEGIN_WHITESPACE: S++, // leading whitespace\n TEXT: S++, // general stuff\n TEXT_ENTITY: S++, // & and such.\n OPEN_WAKA: S++, // <\n SGML_DECL: S++, // \n SCRIPT: S++, //