From a5209bd6d4a9dede0abf2251d517966d253b69df Mon Sep 17 00:00:00 2001 From: Jake Goulding Date: Mon, 24 Aug 2026 22:02:35 -0400 Subject: [PATCH] Update distribution files --- dist/main/index.js | 52679 +++++++++++++++++++++------------------ dist/main/index.js.map | 2 +- 2 files changed, 28332 insertions(+), 24349 deletions(-) diff --git a/dist/main/index.js b/dist/main/index.js index 7fa326e..0114ddf 100644 --- a/dist/main/index.js +++ b/dist/main/index.js @@ -1,32 +1,36 @@ -var $g40fK$os = require("os"); -var $g40fK$path = require("path"); -var $g40fK$crypto = require("crypto"); -var $g40fK$fs = require("fs"); -var $g40fK$http = require("http"); -var $g40fK$https = require("https"); -var $g40fK$net = require("net"); -var $g40fK$tls = require("tls"); -var $g40fK$events = require("events"); -var $g40fK$assert = require("assert"); -var $g40fK$util = require("util"); -var $g40fK$stream = require("stream"); -var $g40fK$buffer = require("buffer"); -var $g40fK$querystring = require("querystring"); -var $g40fK$streamweb = require("stream/web"); -var $g40fK$utiltypes = require("util/types"); -var $g40fK$nodestream = require("node:stream"); -var $g40fK$nodeutil = require("node:util"); -var $g40fK$nodeevents = require("node:events"); -var $g40fK$perf_hooks = require("perf_hooks"); -var $g40fK$worker_threads = require("worker_threads"); -var $g40fK$async_hooks = require("async_hooks"); -var $g40fK$console = require("console"); -var $g40fK$url = require("url"); -var $g40fK$zlib = require("zlib"); -var $g40fK$string_decoder = require("string_decoder"); -var $g40fK$diagnostics_channel = require("diagnostics_channel"); -var $g40fK$child_process = require("child_process"); -var $g40fK$timers = require("timers"); +require("net"); +var $in2sP$tls = require("tls"); +var $in2sP$http = require("http"); +var $in2sP$https = require("https"); +var $in2sP$events = require("events"); +var $in2sP$assert = require("assert"); +var $in2sP$util = require("util"); +var $in2sP$nodebuffer = require("node:buffer"); +var $in2sP$nodeassert = require("node:assert"); +var $in2sP$nodestream = require("node:stream"); +var $in2sP$nodeutiltypes = require("node:util/types"); +var $in2sP$nodehttp = require("node:http"); +var $in2sP$nodenet = require("node:net"); +var $in2sP$nodeutil = require("node:util"); +var $in2sP$nodequerystring = require("node:querystring"); +var $in2sP$nodeevents = require("node:events"); +var $in2sP$nodezlib = require("node:zlib"); +var $in2sP$nodeperf_hooks = require("node:perf_hooks"); +var $in2sP$nodeworker_threads = require("node:worker_threads"); +var $in2sP$nodeasync_hooks = require("node:async_hooks"); +var $in2sP$nodedns = require("node:dns"); +var $in2sP$string_decoder = require("string_decoder"); +var $in2sP$nodediagnostics_channel = require("node:diagnostics_channel"); +var $in2sP$nodetls = require("node:tls"); +var $in2sP$path = require("path"); +var $in2sP$crypto = require("crypto"); +var $in2sP$fs = require("fs"); +var $in2sP$os = require("os"); +var $in2sP$stream = require("stream"); +var $in2sP$nodeurl = require("node:url"); +var $in2sP$nodeconsole = require("node:console"); +var $in2sP$child_process = require("child_process"); +var $in2sP$timers = require("timers"); function $parcel$export(e, n, v, s) { @@ -70,20133 +74,21906 @@ if (parcelRequire == null) { } var parcelRegister = parcelRequire.register; -parcelRegister("4nrKo", function(module, exports) { -"use strict"; -var $32fed57270c13d3b$var$__createBinding = module.exports && module.exports.__createBinding || (Object.create ? function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = { - enumerable: true, - get: function() { - return m[k]; - } - }; - Object.defineProperty(o, k2, desc); -} : function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -}); -var $32fed57270c13d3b$var$__setModuleDefault = module.exports && module.exports.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { - enumerable: true, - value: v - }); -} : function(o, v) { - o["default"] = v; -}); -var $32fed57270c13d3b$var$__importStar = module.exports && module.exports.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for(var k in mod)if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) $32fed57270c13d3b$var$__createBinding(result, mod, k); - } - $32fed57270c13d3b$var$__setModuleDefault(result, mod); - return result; -}; -var $32fed57270c13d3b$var$__awaiter = module.exports && module.exports.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(module.exports, "__esModule", { - value: true +parcelRegister("476G3", function(module, exports) { + +module.exports = (parcelRequire("45Wo2")); + }); -module.exports.platform = module.exports.toPlatformPath = module.exports.toWin32Path = module.exports.toPosixPath = module.exports.markdownSummary = module.exports.summary = module.exports.getIDToken = module.exports.getState = module.exports.saveState = module.exports.group = module.exports.endGroup = module.exports.startGroup = module.exports.info = module.exports.notice = module.exports.warning = module.exports.error = module.exports.debug = module.exports.isDebug = module.exports.setFailed = module.exports.setCommandEcho = module.exports.setOutput = module.exports.getBooleanInput = module.exports.getMultilineInput = module.exports.getInput = module.exports.addPath = module.exports.setSecret = module.exports.exportVariable = module.exports.ExitCode = void 0; +parcelRegister("45Wo2", function(module, exports) { -var $k5gRT = parcelRequire("k5gRT"); +$parcel$export(module.exports, "httpOverHttp", () => $2fb4eb7400d19b2b$export$25cbd437c61a3835, (v) => $2fb4eb7400d19b2b$export$25cbd437c61a3835 = v); +$parcel$export(module.exports, "httpsOverHttp", () => $2fb4eb7400d19b2b$export$c06e3df7111bae43, (v) => $2fb4eb7400d19b2b$export$c06e3df7111bae43 = v); +$parcel$export(module.exports, "httpOverHttps", () => $2fb4eb7400d19b2b$export$5d50e36ef656139f, (v) => $2fb4eb7400d19b2b$export$5d50e36ef656139f = v); +$parcel$export(module.exports, "httpsOverHttps", () => $2fb4eb7400d19b2b$export$212d6605025321cc, (v) => $2fb4eb7400d19b2b$export$212d6605025321cc = v); +$parcel$export(module.exports, "debug", () => $2fb4eb7400d19b2b$export$1c9f709888824e05, (v) => $2fb4eb7400d19b2b$export$1c9f709888824e05 = v); +var $2fb4eb7400d19b2b$export$25cbd437c61a3835; +var $2fb4eb7400d19b2b$export$c06e3df7111bae43; +var $2fb4eb7400d19b2b$export$5d50e36ef656139f; +var $2fb4eb7400d19b2b$export$212d6605025321cc; +var $2fb4eb7400d19b2b$export$1c9f709888824e05; +'use strict'; -var $edUGt = parcelRequire("edUGt"); -var $2OmXs = parcelRequire("2OmXs"); -const $32fed57270c13d3b$var$os = $32fed57270c13d3b$var$__importStar($g40fK$os); -const $32fed57270c13d3b$var$path = $32fed57270c13d3b$var$__importStar($g40fK$path); -var $lsddV = parcelRequire("lsddV"); -/** - * The code to exit an action - */ var $32fed57270c13d3b$var$ExitCode; -(function(ExitCode) { - /** - * A code indicating that the action was successful - */ ExitCode[ExitCode["Success"] = 0] = "Success"; - /** - * A code indicating that the action was a failure - */ ExitCode[ExitCode["Failure"] = 1] = "Failure"; -})($32fed57270c13d3b$var$ExitCode || (module.exports.ExitCode = $32fed57270c13d3b$var$ExitCode = {})); -//----------------------------------------------------------------------- -// Variables -//----------------------------------------------------------------------- -/** - * Sets env variable for this action and future actions in the job - * @param name the name of the variable to set - * @param val the value of the variable. Non-string values will be converted to a string via JSON.stringify - */ // eslint-disable-next-line @typescript-eslint/no-explicit-any -function $32fed57270c13d3b$var$exportVariable(name, val) { - const convertedVal = (0, $2OmXs.toCommandValue)(val); - process.env[name] = convertedVal; - const filePath = process.env["GITHUB_ENV"] || ""; - if (filePath) return (0, $edUGt.issueFileCommand)("ENV", (0, $edUGt.prepareKeyValueMessage)(name, val)); - (0, $k5gRT.issueCommand)("set-env", { - name: name - }, convertedVal); -} -module.exports.exportVariable = $32fed57270c13d3b$var$exportVariable; -/** - * Registers a secret which will get masked from logs - * @param secret value of the secret - */ function $32fed57270c13d3b$var$setSecret(secret) { - (0, $k5gRT.issueCommand)("add-mask", {}, secret); -} -module.exports.setSecret = $32fed57270c13d3b$var$setSecret; -/** - * Prepends inputPath to the PATH (for this action and future actions) - * @param inputPath - */ function $32fed57270c13d3b$var$addPath(inputPath) { - const filePath = process.env["GITHUB_PATH"] || ""; - if (filePath) (0, $edUGt.issueFileCommand)("PATH", inputPath); - else (0, $k5gRT.issueCommand)("add-path", {}, inputPath); - process.env["PATH"] = `${inputPath}${$32fed57270c13d3b$var$path.delimiter}${process.env["PATH"]}`; -} -module.exports.addPath = $32fed57270c13d3b$var$addPath; -/** - * Gets the value of an input. - * Unless trimWhitespace is set to false in InputOptions, the value is also trimmed. - * Returns an empty string if the value is not defined. - * - * @param name name of the input to get - * @param options optional. See InputOptions. - * @returns string - */ function $32fed57270c13d3b$var$getInput(name, options) { - const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; - if (options && options.required && !val) throw new Error(`Input required and not supplied: ${name}`); - if (options && options.trimWhitespace === false) return val; - return val.trim(); -} -module.exports.getInput = $32fed57270c13d3b$var$getInput; -/** - * Gets the values of an multiline input. Each value is also trimmed. - * - * @param name name of the input to get - * @param options optional. See InputOptions. - * @returns string[] - * - */ function $32fed57270c13d3b$var$getMultilineInput(name, options) { - const inputs = $32fed57270c13d3b$var$getInput(name, options).split("\n").filter((x)=>x !== ""); - if (options && options.trimWhitespace === false) return inputs; - return inputs.map((input)=>input.trim()); -} -module.exports.getMultilineInput = $32fed57270c13d3b$var$getMultilineInput; -/** - * Gets the input value of the boolean type in the YAML 1.2 "core schema" specification. - * Support boolean input list: `true | True | TRUE | false | False | FALSE` . - * The return value is also in boolean type. - * ref: https://yaml.org/spec/1.2/spec.html#id2804923 - * - * @param name name of the input to get - * @param options optional. See InputOptions. - * @returns boolean - */ function $32fed57270c13d3b$var$getBooleanInput(name, options) { - const trueValue = [ - "true", - "True", - "TRUE" - ]; - const falseValue = [ - "false", - "False", - "FALSE" - ]; - const val = $32fed57270c13d3b$var$getInput(name, options); - if (trueValue.includes(val)) return true; - if (falseValue.includes(val)) return false; - throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name}\n` + `Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); -} -module.exports.getBooleanInput = $32fed57270c13d3b$var$getBooleanInput; -/** - * Sets the value of an output. - * - * @param name name of the output to set - * @param value value to store. Non-string values will be converted to a string via JSON.stringify - */ // eslint-disable-next-line @typescript-eslint/no-explicit-any -function $32fed57270c13d3b$var$setOutput(name, value) { - const filePath = process.env["GITHUB_OUTPUT"] || ""; - if (filePath) return (0, $edUGt.issueFileCommand)("OUTPUT", (0, $edUGt.prepareKeyValueMessage)(name, value)); - process.stdout.write($32fed57270c13d3b$var$os.EOL); - (0, $k5gRT.issueCommand)("set-output", { - name: name - }, (0, $2OmXs.toCommandValue)(value)); -} -module.exports.setOutput = $32fed57270c13d3b$var$setOutput; -/** - * Enables or disables the echoing of commands into stdout for the rest of the step. - * Echoing is disabled by default if ACTIONS_STEP_DEBUG is not set. - * - */ function $32fed57270c13d3b$var$setCommandEcho(enabled) { - (0, $k5gRT.issue)("echo", enabled ? "on" : "off"); -} -module.exports.setCommandEcho = $32fed57270c13d3b$var$setCommandEcho; -//----------------------------------------------------------------------- -// Results -//----------------------------------------------------------------------- -/** - * Sets the action status to failed. - * When the action exits it will be with an exit code of 1 - * @param message add error issue message - */ function $32fed57270c13d3b$var$setFailed(message) { - process.exitCode = $32fed57270c13d3b$var$ExitCode.Failure; - $32fed57270c13d3b$var$error(message); -} -module.exports.setFailed = $32fed57270c13d3b$var$setFailed; -//----------------------------------------------------------------------- -// Logging Commands -//----------------------------------------------------------------------- -/** - * Gets whether Actions Step Debug is on or not - */ function $32fed57270c13d3b$var$isDebug() { - return process.env["RUNNER_DEBUG"] === "1"; -} -module.exports.isDebug = $32fed57270c13d3b$var$isDebug; -/** - * Writes debug message to user log - * @param message debug message - */ function $32fed57270c13d3b$var$debug(message) { - (0, $k5gRT.issueCommand)("debug", {}, message); -} -module.exports.debug = $32fed57270c13d3b$var$debug; -/** - * Adds an error issue - * @param message error issue message. Errors will be converted to string via toString() - * @param properties optional properties to add to the annotation. - */ function $32fed57270c13d3b$var$error(message, properties = {}) { - (0, $k5gRT.issueCommand)("error", (0, $2OmXs.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); -} -module.exports.error = $32fed57270c13d3b$var$error; -/** - * Adds a warning issue - * @param message warning issue message. Errors will be converted to string via toString() - * @param properties optional properties to add to the annotation. - */ function $32fed57270c13d3b$var$warning(message, properties = {}) { - (0, $k5gRT.issueCommand)("warning", (0, $2OmXs.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); -} -module.exports.warning = $32fed57270c13d3b$var$warning; -/** - * Adds a notice issue - * @param message notice issue message. Errors will be converted to string via toString() - * @param properties optional properties to add to the annotation. - */ function $32fed57270c13d3b$var$notice(message, properties = {}) { - (0, $k5gRT.issueCommand)("notice", (0, $2OmXs.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + + +$2fb4eb7400d19b2b$export$25cbd437c61a3835 = $2fb4eb7400d19b2b$var$httpOverHttp; +$2fb4eb7400d19b2b$export$c06e3df7111bae43 = $2fb4eb7400d19b2b$var$httpsOverHttp; +$2fb4eb7400d19b2b$export$5d50e36ef656139f = $2fb4eb7400d19b2b$var$httpOverHttps; +$2fb4eb7400d19b2b$export$212d6605025321cc = $2fb4eb7400d19b2b$var$httpsOverHttps; +function $2fb4eb7400d19b2b$var$httpOverHttp(options) { + var agent = new $2fb4eb7400d19b2b$var$TunnelingAgent(options); + agent.request = $in2sP$http.request; + return agent; } -module.exports.notice = $32fed57270c13d3b$var$notice; -/** - * Writes info to log with console.log. - * @param message info message - */ function $32fed57270c13d3b$var$info(message) { - process.stdout.write(message + $32fed57270c13d3b$var$os.EOL); +function $2fb4eb7400d19b2b$var$httpsOverHttp(options) { + var agent = new $2fb4eb7400d19b2b$var$TunnelingAgent(options); + agent.request = $in2sP$http.request; + agent.createSocket = $2fb4eb7400d19b2b$var$createSecureSocket; + agent.defaultPort = 443; + return agent; } -module.exports.info = $32fed57270c13d3b$var$info; -/** - * Begin an output group. - * - * Output until the next `groupEnd` will be foldable in this group - * - * @param name The name of the output group - */ function $32fed57270c13d3b$var$startGroup(name) { - (0, $k5gRT.issue)("group", name); +function $2fb4eb7400d19b2b$var$httpOverHttps(options) { + var agent = new $2fb4eb7400d19b2b$var$TunnelingAgent(options); + agent.request = $in2sP$https.request; + return agent; } -module.exports.startGroup = $32fed57270c13d3b$var$startGroup; -/** - * End an output group. - */ function $32fed57270c13d3b$var$endGroup() { - (0, $k5gRT.issue)("endgroup"); +function $2fb4eb7400d19b2b$var$httpsOverHttps(options) { + var agent = new $2fb4eb7400d19b2b$var$TunnelingAgent(options); + agent.request = $in2sP$https.request; + agent.createSocket = $2fb4eb7400d19b2b$var$createSecureSocket; + agent.defaultPort = 443; + return agent; } -module.exports.endGroup = $32fed57270c13d3b$var$endGroup; -/** - * Wrap an asynchronous function call in a group. - * - * Returns the same type as the function itself. - * - * @param name The name of the group - * @param fn The function to wrap in the group - */ function $32fed57270c13d3b$var$group(name, fn) { - return $32fed57270c13d3b$var$__awaiter(this, void 0, void 0, function*() { - $32fed57270c13d3b$var$startGroup(name); - let result; - try { - result = yield fn(); - } finally{ - $32fed57270c13d3b$var$endGroup(); +function $2fb4eb7400d19b2b$var$TunnelingAgent(options) { + var self = this; + self.options = options || {}; + self.proxyOptions = self.options.proxy || {}; + self.maxSockets = self.options.maxSockets || $in2sP$http.Agent.defaultMaxSockets; + self.requests = []; + self.sockets = []; + self.on('free', function onFree(socket, host, port, localAddress) { + var options = $2fb4eb7400d19b2b$var$toOptions(host, port, localAddress); + for(var i = 0, len = self.requests.length; i < len; ++i){ + var pending = self.requests[i]; + if (pending.host === options.host && pending.port === options.port) { + // Detect the request to connect same origin server, + // reuse the connection. + self.requests.splice(i, 1); + pending.request.onSocket(socket); + return; + } } - return result; - }); -} -module.exports.group = $32fed57270c13d3b$var$group; -//----------------------------------------------------------------------- -// Wrapper action state -//----------------------------------------------------------------------- -/** - * Saves state for current action, the state can only be retrieved by this action's post job execution. - * - * @param name name of the state to store - * @param value value to store. Non-string values will be converted to a string via JSON.stringify - */ // eslint-disable-next-line @typescript-eslint/no-explicit-any -function $32fed57270c13d3b$var$saveState(name, value) { - const filePath = process.env["GITHUB_STATE"] || ""; - if (filePath) return (0, $edUGt.issueFileCommand)("STATE", (0, $edUGt.prepareKeyValueMessage)(name, value)); - (0, $k5gRT.issueCommand)("save-state", { - name: name - }, (0, $2OmXs.toCommandValue)(value)); -} -module.exports.saveState = $32fed57270c13d3b$var$saveState; -/** - * Gets the value of an state set by this action's main execution. - * - * @param name name of the state to get - * @returns string - */ function $32fed57270c13d3b$var$getState(name) { - return process.env[`STATE_${name}`] || ""; -} -module.exports.getState = $32fed57270c13d3b$var$getState; -function $32fed57270c13d3b$var$getIDToken(aud) { - return $32fed57270c13d3b$var$__awaiter(this, void 0, void 0, function*() { - return yield $lsddV.OidcClient.getIDToken(aud); + socket.destroy(); + self.removeSocket(socket); }); } -module.exports.getIDToken = $32fed57270c13d3b$var$getIDToken; - -var $dtwky = parcelRequire("dtwky"); -Object.defineProperty(module.exports, "summary", { - enumerable: true, - get: function() { - return $dtwky.summary; - } -}); - -var $dtwky = parcelRequire("dtwky"); -Object.defineProperty(module.exports, "markdownSummary", { - enumerable: true, - get: function() { - return $dtwky.markdownSummary; +$in2sP$util.inherits($2fb4eb7400d19b2b$var$TunnelingAgent, $in2sP$events.EventEmitter); +$2fb4eb7400d19b2b$var$TunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) { + var self = this; + var options = $2fb4eb7400d19b2b$var$mergeOptions({ + request: req + }, self.options, $2fb4eb7400d19b2b$var$toOptions(host, port, localAddress)); + if (self.sockets.length >= this.maxSockets) { + // We are over limit so we'll add it to the queue. + self.requests.push(options); + return; } -}); - -var $46Zbt = parcelRequire("46Zbt"); -Object.defineProperty(module.exports, "toPosixPath", { - enumerable: true, - get: function() { - return $46Zbt.toPosixPath; + // If we are under maxSockets create a new one. + self.createSocket(options, function(socket) { + socket.on('free', onFree); + socket.on('close', onCloseOrRemove); + socket.on('agentRemove', onCloseOrRemove); + req.onSocket(socket); + function onFree() { + self.emit('free', socket, options); + } + function onCloseOrRemove(err) { + self.removeSocket(socket); + socket.removeListener('free', onFree); + socket.removeListener('close', onCloseOrRemove); + socket.removeListener('agentRemove', onCloseOrRemove); + } + }); +}; +$2fb4eb7400d19b2b$var$TunnelingAgent.prototype.createSocket = function createSocket(options, cb) { + var self = this; + var placeholder = {}; + self.sockets.push(placeholder); + var connectOptions = $2fb4eb7400d19b2b$var$mergeOptions({}, self.proxyOptions, { + method: 'CONNECT', + path: options.host + ':' + options.port, + agent: false, + headers: { + host: options.host + ':' + options.port + } + }); + if (options.localAddress) connectOptions.localAddress = options.localAddress; + if (connectOptions.proxyAuth) { + connectOptions.headers = connectOptions.headers || {}; + connectOptions.headers['Proxy-Authorization'] = 'Basic ' + new Buffer(connectOptions.proxyAuth).toString('base64'); } -}); -Object.defineProperty(module.exports, "toWin32Path", { - enumerable: true, - get: function() { - return $46Zbt.toWin32Path; + $2fb4eb7400d19b2b$var$debug('making CONNECT request'); + var connectReq = self.request(connectOptions); + connectReq.useChunkedEncodingByDefault = false; // for v0.6 + connectReq.once('response', onResponse); // for v0.6 + connectReq.once('upgrade', onUpgrade); // for v0.6 + connectReq.once('connect', onConnect); // for v0.7 or later + connectReq.once('error', onError); + connectReq.end(); + function onResponse(res) { + // Very hacky. This is necessary to avoid http-parser leaks. + res.upgrade = true; } -}); -Object.defineProperty(module.exports, "toPlatformPath", { - enumerable: true, - get: function() { - return $46Zbt.toPlatformPath; + function onUpgrade(res, socket, head) { + // Hacky. + process.nextTick(function() { + onConnect(res, socket, head); + }); } -}); - -/** - * Platform utilities exports - */ module.exports.platform = $32fed57270c13d3b$var$__importStar((parcelRequire("b6FeY"))); - -}); -parcelRegister("k5gRT", function(module, exports) { -"use strict"; -var $e9f15bf914673aaf$var$__createBinding = module.exports && module.exports.__createBinding || (Object.create ? function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = { - enumerable: true, - get: function() { - return m[k]; + function onConnect(res, socket, head) { + connectReq.removeAllListeners(); + socket.removeAllListeners(); + if (res.statusCode !== 200) { + $2fb4eb7400d19b2b$var$debug('tunneling socket could not be established, statusCode=%d', res.statusCode); + socket.destroy(); + var error = new Error("tunneling socket could not be established, statusCode=" + res.statusCode); + error.code = 'ECONNRESET'; + options.request.emit('error', error); + self.removeSocket(placeholder); + return; } - }; - Object.defineProperty(o, k2, desc); -} : function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -}); -var $e9f15bf914673aaf$var$__setModuleDefault = module.exports && module.exports.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { - enumerable: true, - value: v - }); -} : function(o, v) { - o["default"] = v; -}); -var $e9f15bf914673aaf$var$__importStar = module.exports && module.exports.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for(var k in mod)if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) $e9f15bf914673aaf$var$__createBinding(result, mod, k); + if (head.length > 0) { + $2fb4eb7400d19b2b$var$debug('got illegal response body from proxy'); + socket.destroy(); + var error = new Error('got illegal response body from proxy'); + error.code = 'ECONNRESET'; + options.request.emit('error', error); + self.removeSocket(placeholder); + return; + } + $2fb4eb7400d19b2b$var$debug('tunneling connection has established'); + self.sockets[self.sockets.indexOf(placeholder)] = socket; + return cb(socket); + } + function onError(cause) { + connectReq.removeAllListeners(); + $2fb4eb7400d19b2b$var$debug('tunneling socket could not be established, cause=%s\n', cause.message, cause.stack); + var error = new Error("tunneling socket could not be established, cause=" + cause.message); + error.code = 'ECONNRESET'; + options.request.emit('error', error); + self.removeSocket(placeholder); } - $e9f15bf914673aaf$var$__setModuleDefault(result, mod); - return result; }; -Object.defineProperty(module.exports, "__esModule", { - value: true -}); -module.exports.issue = module.exports.issueCommand = void 0; - -const $e9f15bf914673aaf$var$os = $e9f15bf914673aaf$var$__importStar($g40fK$os); - -var $2OmXs = parcelRequire("2OmXs"); -/** - * Commands - * - * Command Format: - * ::name key=value,key=value::message - * - * Examples: - * ::warning::This is the message - * ::set-env name=MY_VAR::some value - */ function $e9f15bf914673aaf$var$issueCommand(command, properties, message) { - const cmd = new $e9f15bf914673aaf$var$Command(command, properties, message); - process.stdout.write(cmd.toString() + $e9f15bf914673aaf$var$os.EOL); -} -module.exports.issueCommand = $e9f15bf914673aaf$var$issueCommand; -function $e9f15bf914673aaf$var$issue(name, message = "") { - $e9f15bf914673aaf$var$issueCommand(name, {}, message); -} -module.exports.issue = $e9f15bf914673aaf$var$issue; -const $e9f15bf914673aaf$var$CMD_STRING = "::"; -class $e9f15bf914673aaf$var$Command { - constructor(command, properties, message){ - if (!command) command = "missing.command"; - this.command = command; - this.properties = properties; - this.message = message; - } - toString() { - let cmdStr = $e9f15bf914673aaf$var$CMD_STRING + this.command; - if (this.properties && Object.keys(this.properties).length > 0) { - cmdStr += " "; - let first = true; - for(const key in this.properties)if (this.properties.hasOwnProperty(key)) { - const val = this.properties[key]; - if (val) { - if (first) first = false; - else cmdStr += ","; - cmdStr += `${key}=${$e9f15bf914673aaf$var$escapeProperty(val)}`; - } +$2fb4eb7400d19b2b$var$TunnelingAgent.prototype.removeSocket = function removeSocket(socket) { + var pos = this.sockets.indexOf(socket); + if (pos === -1) return; + this.sockets.splice(pos, 1); + var pending = this.requests.shift(); + if (pending) // If we have pending requests and a socket gets closed a new one + // needs to be created to take over in the pool for the one that closed. + this.createSocket(pending, function(socket) { + pending.request.onSocket(socket); + }); +}; +function $2fb4eb7400d19b2b$var$createSecureSocket(options, cb) { + var self = this; + $2fb4eb7400d19b2b$var$TunnelingAgent.prototype.createSocket.call(self, options, function(socket) { + var hostHeader = options.request.getHeader('host'); + var tlsOptions = $2fb4eb7400d19b2b$var$mergeOptions({}, self.options, { + socket: socket, + servername: hostHeader ? hostHeader.replace(/:.*$/, '') : options.host + }); + // 0 is dummy port for v0.6 + var secureSocket = $in2sP$tls.connect(0, tlsOptions); + self.sockets[self.sockets.indexOf(socket)] = secureSocket; + cb(secureSocket); + }); +} +function $2fb4eb7400d19b2b$var$toOptions(host, port, localAddress) { + if (typeof host === 'string') return { + host: host, + port: port, + localAddress: localAddress + }; + return host; // for v0.11 or later +} +function $2fb4eb7400d19b2b$var$mergeOptions(target) { + for(var i = 1, len = arguments.length; i < len; ++i){ + var overrides = arguments[i]; + if (typeof overrides === 'object') { + var keys = Object.keys(overrides); + for(var j = 0, keyLen = keys.length; j < keyLen; ++j){ + var k = keys[j]; + if (overrides[k] !== undefined) target[k] = overrides[k]; } } - cmdStr += `${$e9f15bf914673aaf$var$CMD_STRING}${$e9f15bf914673aaf$var$escapeData(this.message)}`; - return cmdStr; } + return target; } -function $e9f15bf914673aaf$var$escapeData(s) { - return (0, $2OmXs.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A"); -} -function $e9f15bf914673aaf$var$escapeProperty(s) { - return (0, $2OmXs.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/:/g, "%3A").replace(/,/g, "%2C"); -} - -}); -parcelRegister("2OmXs", function(module, exports) { -"use strict"; -// We use any as a valid input type -/* eslint-disable @typescript-eslint/no-explicit-any */ Object.defineProperty(module.exports, "__esModule", { - value: true -}); -module.exports.toCommandProperties = module.exports.toCommandValue = void 0; -/** - * Sanitizes an input into a string so it can be passed into issueCommand safely - * @param input input to sanitize into a string - */ function $20c20f4401e695af$var$toCommandValue(input) { - if (input === null || input === undefined) return ""; - else if (typeof input === "string" || input instanceof String) return input; - return JSON.stringify(input); -} -module.exports.toCommandValue = $20c20f4401e695af$var$toCommandValue; -/** - * - * @param annotationProperties - * @returns The command properties to send with the actual annotation command - * See IssueCommandProperties: https://github.com/actions/runner/blob/main/src/Runner.Worker/ActionCommandManager.cs#L646 - */ function $20c20f4401e695af$var$toCommandProperties(annotationProperties) { - if (!Object.keys(annotationProperties).length) return {}; - return { - title: annotationProperties.title, - file: annotationProperties.file, - line: annotationProperties.startLine, - endLine: annotationProperties.endLine, - col: annotationProperties.startColumn, - endColumn: annotationProperties.endColumn - }; -} -module.exports.toCommandProperties = $20c20f4401e695af$var$toCommandProperties; +var $2fb4eb7400d19b2b$var$debug; +if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) $2fb4eb7400d19b2b$var$debug = function() { + var args = Array.prototype.slice.call(arguments); + if (typeof args[0] === 'string') args[0] = 'TUNNEL: ' + args[0]; + else args.unshift('TUNNEL:'); + console.error.apply(console, args); +}; +else $2fb4eb7400d19b2b$var$debug = function() {}; +$2fb4eb7400d19b2b$export$1c9f709888824e05 = $2fb4eb7400d19b2b$var$debug; // for test }); -parcelRegister("edUGt", function(module, exports) { -"use strict"; -// For internal use, subject to change. -var $a5ae3fdc4597056f$var$__createBinding = module.exports && module.exports.__createBinding || (Object.create ? function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = { - enumerable: true, - get: function() { - return m[k]; - } - }; - Object.defineProperty(o, k2, desc); -} : function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -}); -var $a5ae3fdc4597056f$var$__setModuleDefault = module.exports && module.exports.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { - enumerable: true, - value: v - }); -} : function(o, v) { - o["default"] = v; -}); -var $a5ae3fdc4597056f$var$__importStar = module.exports && module.exports.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for(var k in mod)if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) $a5ae3fdc4597056f$var$__createBinding(result, mod, k); - } - $a5ae3fdc4597056f$var$__setModuleDefault(result, mod); - return result; +parcelRegister("gNVEc", function(module, exports) { +module.exports = { + kClose: Symbol('close'), + kDestroy: Symbol('destroy'), + kDispatch: Symbol('dispatch'), + kUrl: Symbol('url'), + kWriting: Symbol('writing'), + kResuming: Symbol('resuming'), + kQueue: Symbol('queue'), + kConnect: Symbol('connect'), + kConnecting: Symbol('connecting'), + kKeepAliveDefaultTimeout: Symbol('default keep alive timeout'), + kKeepAliveMaxTimeout: Symbol('max keep alive timeout'), + kKeepAliveTimeoutThreshold: Symbol('keep alive timeout threshold'), + kKeepAliveTimeoutValue: Symbol('keep alive timeout'), + kKeepAlive: Symbol('keep alive'), + kHeadersTimeout: Symbol('headers timeout'), + kBodyTimeout: Symbol('body timeout'), + kServerName: Symbol('server name'), + kLocalAddress: Symbol('local address'), + kHost: Symbol('host'), + kNoRef: Symbol('no ref'), + kBodyUsed: Symbol('used'), + kBody: Symbol('abstracted request body'), + kRunning: Symbol('running'), + kBlocking: Symbol('blocking'), + kPending: Symbol('pending'), + kSize: Symbol('size'), + kBusy: Symbol('busy'), + kQueued: Symbol('queued'), + kFree: Symbol('free'), + kConnected: Symbol('connected'), + kClosed: Symbol('closed'), + kNeedDrain: Symbol('need drain'), + kReset: Symbol('reset'), + kDestroyed: Symbol.for('nodejs.stream.destroyed'), + kResume: Symbol('resume'), + kOnError: Symbol('on error'), + kMaxHeadersSize: Symbol('max headers size'), + kRunningIdx: Symbol('running index'), + kPendingIdx: Symbol('pending index'), + kError: Symbol('error'), + kClients: Symbol('clients'), + kClient: Symbol('client'), + kParser: Symbol('parser'), + kOnDestroyed: Symbol('destroy callbacks'), + kPipelining: Symbol('pipelining'), + kSocket: Symbol('socket'), + kHostHeader: Symbol('host header'), + kConnector: Symbol('connector'), + kStrictContentLength: Symbol('strict content length'), + kMaxRedirections: Symbol('maxRedirections'), + kMaxRequests: Symbol('maxRequestsPerClient'), + kProxy: Symbol('proxy agent options'), + kCounter: Symbol('socket request counter'), + kInterceptors: Symbol('dispatch interceptors'), + kMaxResponseSize: Symbol('max response size'), + kHTTP2Session: Symbol('http2Session'), + kHTTP2SessionState: Symbol('http2Session state'), + kRetryHandlerDefaultRetry: Symbol('retry agent default retry'), + kConstruct: Symbol('constructable'), + kListeners: Symbol('listeners'), + kHTTPContext: Symbol('http context'), + kMaxConcurrentStreams: Symbol('max concurrent streams'), + kNoProxyAgent: Symbol('no proxy agent'), + kHttpProxyAgent: Symbol('http proxy agent'), + kHttpsProxyAgent: Symbol('https proxy agent') }; -Object.defineProperty(module.exports, "__esModule", { - value: true + }); -module.exports.prepareKeyValueMessage = module.exports.issueFileCommand = void 0; -// We use any as a valid input type -/* eslint-disable @typescript-eslint/no-explicit-any */ const $a5ae3fdc4597056f$var$crypto = $a5ae3fdc4597056f$var$__importStar($g40fK$crypto); +parcelRegister("1o60o", function(module, exports) { +'use strict'; -const $a5ae3fdc4597056f$var$fs = $a5ae3fdc4597056f$var$__importStar($g40fK$fs); +var $102cb0ddf82b005b$require$Buffer = $in2sP$nodebuffer.Buffer; +module.exports = $102cb0ddf82b005b$require$Buffer.from('AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAX8AYAJ/fwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAAy0sBQYAAAIAAAAAAAACAQIAAgICAAADAAAAAAMDAwMBAQEBAQEBAQEAAAIAAAAEBQFwARISBQMBAAIGCAF/AUGA1A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ELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0dIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMsAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0fIAJB0gA2AhwgAiABNgIUIAIgADYCDEEAIQMMrwELIABBP0cNASABQQFqCyEBQQUhAwyUAQtBACEDIAJBADYCHCACIAE2AhQgAkH9EjYCECACQQc2AgwMrAELIAJBADYCHCACIAE2AhQgAkHcCDYCECACQQc2AgxBACEDDKsBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNByACQeUANgIcIAIgATYCFCACIAA2AgxBACEDDKoBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNFiACQdMANgIcIAIgATYCFCACIAA2AgxBACEDDKkBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNGCACQdIANgIcIAIgATYCFCACIAA2AgxBACEDDKgBCyACQQA2AhwgAiABNgIUIAJBxgo2AhAgAkEHNgIMQQAhAwynAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQMgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwymAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRIgAkHTADYCHCACIAE2AhQgAiAANgIMQQAhAwylAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRQgAkHSADYCHCACIAE2AhQgAiAANgIMQQAhAwykAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQAgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwyjAQtB1QAhAwyJAQsgAEEVRwRAIAJBADYCHCACIAE2AhQgAkG5DTYCECACQRo2AgxBACEDDKIBCyACQeQANgIcIAIgATYCFCACQeMXNgIQIAJBFTYCDEEAIQMMoQELIAJBADYCACAGQQFqIQEgAi0AKSIAQSNrQQtJDQQCQCAAQQZLDQBBASAAdEHKAHFFDQAMBQtBACEDIAJBADYCHCACIAE2AhQgAkH3CTYCECACQQg2AgwMoAELIAJBADYCACAGQQFqIQEgAi0AKUEhR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EBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAEH6yAALBAEAAAIAQZDJAAtfAwQAAAQEBAQEBAQEBAQEBQQEBAQEBAQEBAQEBAAEAAYHBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQABAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAQAQfrKAAsEAQAAAQBBkMsACwEBAEGqywALQQIAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAEH6zAALBAEAAAEAQZDNAAsBAQBBms0ACwYCAAAAAAIAQbHNAAs6AwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwBB8M4AC5YBTk9VTkNFRUNLT1VUTkVDVEVURUNSSUJFTFVTSEVURUFEU0VBUkNIUkdFQ1RJVklUWUxFTkRBUlZFT1RJRllQVElPTlNDSFNFQVlTVEFUQ0hHRU9SRElSRUNUT1JUUkNIUEFSQU1FVEVSVVJDRUJTQ1JJQkVBUkRPV05BQ0VJTkROS0NLVUJTQ1JJQkVIVFRQL0FEVFAv', 'base64'); -const $a5ae3fdc4597056f$var$os = $a5ae3fdc4597056f$var$__importStar($g40fK$os); +}); -var $2OmXs = parcelRequire("2OmXs"); -function $a5ae3fdc4597056f$var$issueFileCommand(command, message) { - const filePath = process.env[`GITHUB_${command}`]; - if (!filePath) throw new Error(`Unable to find environment variable for file command ${command}`); - if (!$a5ae3fdc4597056f$var$fs.existsSync(filePath)) throw new Error(`Missing file at path: ${filePath}`); - $a5ae3fdc4597056f$var$fs.appendFileSync(filePath, `${(0, $2OmXs.toCommandValue)(message)}${$a5ae3fdc4597056f$var$os.EOL}`, { - encoding: "utf8" - }); -} -module.exports.issueFileCommand = $a5ae3fdc4597056f$var$issueFileCommand; -function $a5ae3fdc4597056f$var$prepareKeyValueMessage(key, value) { - const delimiter = `ghadelimiter_${$a5ae3fdc4597056f$var$crypto.randomUUID()}`; - const convertedValue = (0, $2OmXs.toCommandValue)(value); - // These should realistically never happen, but just in case someone finds a - // way to exploit uuid generation let's not allow keys or values that contain - // the delimiter. - if (key.includes(delimiter)) throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); - if (convertedValue.includes(delimiter)) throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); - return `${key}<<${delimiter}${$a5ae3fdc4597056f$var$os.EOL}${convertedValue}${$a5ae3fdc4597056f$var$os.EOL}${delimiter}`; -} -module.exports.prepareKeyValueMessage = $a5ae3fdc4597056f$var$prepareKeyValueMessage; +parcelRegister("fTYUf", function(module, exports) { +'use strict'; -}); +var $b93b3cc61562ccbf$require$Buffer = $in2sP$nodebuffer.Buffer; +module.exports = $b93b3cc61562ccbf$require$Buffer.from('AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAX8AYAJ/fwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAAy0sBQYAAAIAAAAAAAACAQIAAgICAAADAAAAAAMDAwMBAQEBAQEBAQEAAAIAAAAEBQFwARISBQMBAAIGCAF/AUGA1AQLB9EFIgZtZW1vcnkCAAtfaW5pdGlhbGl6ZQAIGV9faW5kaXJlY3RfZnVuY3Rpb25fdGFibGUBAAtsbGh0dHBfaW5pdAAJGGxsaHR0cF9zaG91bGRfa2VlcF9hbGl2ZQAvDGxsaHR0cF9hbGxvYw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gtBigEhAyABIARGDaICIAIoAgAiACAEIAFraiEFIAEgAGtBAWohBgNAIAEtAAAgAEGMzwBqLQAARw1kIABBAUYN+gEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMogILQYsBIQMgASAERg2hAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGOzwBqLQAARw1kIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyiAgsgAkEANgIAIAZBAWohAUECDGULQYwBIQMgASAERg2gAiACKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEHwzwBqLQAARw1jIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyhAgsgAkEANgIAIAZBAWohAUEfDGQLQY0BIQMgASAERg2fAiACKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEHyzwBqLQAARw1iIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAygAgsgAkEANgIAIAZBAWohAUEJDGMLIAEgBEYEQEGOASEDDJ8CCwJAAkAgAS0AAEHJAGsOBwBiYmJiYgFiCyABQQFqIQFB+AAhAwyGAgsgAUEBaiEBQfkAIQMMhQILQY8BIQMgASAERg2dAiACKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEGRzwBqLQAARw1gIABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyeAgsgAkEANgIAIAZBAWohAUEYDGELQZABIQMgASAERg2cAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGXzwBqLQAARw1fIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAydAgsgAkEANgIAIAZBAWohAUEXDGALQZEBIQMgASAERg2bAiACKAIAIgAgBCABa2ohBSABIABrQQZqIQYCQANAIAEtAAAgAEGazwBqLQAARw1eIABBBkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgB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0cNASABQQFqCyEBQQUhAwyUAQtBACEDIAJBADYCHCACIAE2AhQgAkH9EjYCECACQQc2AgwMrAELIAJBADYCHCACIAE2AhQgAkHcCDYCECACQQc2AgxBACEDDKsBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNByACQeUANgIcIAIgATYCFCACIAA2AgxBACEDDKoBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNFiACQdMANgIcIAIgATYCFCACIAA2AgxBACEDDKkBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNGCACQdIANgIcIAIgATYCFCACIAA2AgxBACEDDKgBCyACQQA2AhwgAiABNgIUIAJBxgo2AhAgAkEHNgIMQQAhAwynAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQMgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwymAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRIgAkHTADYCHCACIAE2AhQgAiAANgIMQQAhAwylAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRQgAkHSADYCHCACIAE2AhQgAiAANgIMQQAhAwykAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQAgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwyjAQtB1QAhAwyJAQsgAEEVRwRAIAJBADYCHCACIAE2AhQgAkG5DTYCECACQRo2AgxBACEDDKIBCyACQeQANgIcIAIgATYCFCACQeMXNgIQIAJBFTYCDEEAIQMMoQELIAJBADYCACAGQQFqIQEgAi0AKSIAQSNrQQtJDQQCQCAAQQZLDQBBASAAdEHKAHFFDQAMBQtBACEDIAJBADYCHCACIAE2AhQgAkH3CTYCECACQQg2AgwMoAELIAJBADYCACAGQQFqIQEgAi0AKUEhRg0DIAJBADYCHCACIAE2AhQgAkGbCjYCECACQQg2AgxBACEDDJ8BCyACQQA2AgALQQAhAyACQQA2AhwgAiABNgIUIAJBkDM2AhAgAkEINgIMDJ0BCyACQQA2AgAgBkEBaiEBIAItAClBI0kNACACQQA2AhwgAiABNg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QBB+sgACwQBAAACAEGQyQALXwMEAAAEBAQEBAQEBAQEBAUEBAQEBAQEBAQEBAQABAAGBwQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEAAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAEAEH6ygALBAEAAAEAQZDLAAsBAQBBqssAC0ECAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwBB+swACwQBAAABAEGQzQALAQEAQZrNAAsGAgAAAAACAEGxzQALOgMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAQfDOAAuWAU5PVU5DRUVDS09VVE5FQ1RFVEVDUklCRUxVU0hFVEVBRFNFQVJDSFJHRUNUSVZJVFlMRU5EQVJWRU9USUZZUFRJT05TQ0hTRUFZU1RBVENIR0VPUkRJUkVDVE9SVFJDSFBBUkFNRVRFUlVSQ0VCU0NSSUJFQVJET1dOQUNFSU5ETktDS1VCU0NSSUJFSFRUUC9BRFRQLw==', 'base64'); -parcelRegister("lsddV", function(module, exports) { -"use strict"; -var $f9e67874af9e138c$var$__awaiter = module.exports && module.exports.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(module.exports, "__esModule", { - value: true }); -module.exports.OidcClient = void 0; -var $i1NZU = parcelRequire("i1NZU"); +parcelRegister("8masf", function(module, exports) { +'use strict'; -var $ivZ8s = parcelRequire("ivZ8s"); +var $bFRvW = parcelRequire("bFRvW"); -var $4nrKo = parcelRequire("4nrKo"); -class $f9e67874af9e138c$var$OidcClient { - static createHttpClient(allowRetry = true, maxRetry = 10) { - const requestOptions = { - allowRetries: allowRetry, - maxRetries: maxRetry - }; - return new $i1NZU.HttpClient("actions/oidc-client", [ - new $ivZ8s.BearerCredentialHandler($f9e67874af9e138c$var$OidcClient.getRequestToken()) - ], requestOptions); - } - static getRequestToken() { - const token = process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"]; - if (!token) throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable"); - return token; - } - static getIDTokenUrl() { - const runtimeUrl = process.env["ACTIONS_ID_TOKEN_REQUEST_URL"]; - if (!runtimeUrl) throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable"); - return runtimeUrl; - } - static getCall(id_token_url) { - var _a; - return $f9e67874af9e138c$var$__awaiter(this, void 0, void 0, function*() { - const httpclient = $f9e67874af9e138c$var$OidcClient.createHttpClient(); - const res = yield httpclient.getJson(id_token_url).catch((error)=>{ - throw new Error(`Failed to get ID Token. \n - Error Code : ${error.statusCode}\n - Error Message: ${error.message}`); - }); - const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value; - if (!id_token) throw new Error("Response json body do not have ID Token field"); - return id_token; - }); - } - static getIDToken(audience) { - return $f9e67874af9e138c$var$__awaiter(this, void 0, void 0, function*() { - try { - // New ID Token is requested from action service - let id_token_url = $f9e67874af9e138c$var$OidcClient.getIDTokenUrl(); - if (audience) { - const encodedAudience = encodeURIComponent(audience); - id_token_url = `${id_token_url}&audience=${encodedAudience}`; - } - (0, $4nrKo.debug)(`ID token url is ${id_token_url}`); - const id_token = yield $f9e67874af9e138c$var$OidcClient.getCall(id_token_url); - (0, $4nrKo.setSecret)(id_token); - return id_token; - } catch (error) { - throw new Error(`Error message: ${error.message}`); - } - }); - } -} -module.exports.OidcClient = $f9e67874af9e138c$var$OidcClient; +var $7z0I9 = parcelRequire("7z0I9"); +var $61587cda97096cc1$require$ReadableStreamFrom = $7z0I9.ReadableStreamFrom; +var $61587cda97096cc1$require$isBlobLike = $7z0I9.isBlobLike; +var $61587cda97096cc1$require$isReadableStreamLike = $7z0I9.isReadableStreamLike; +var $61587cda97096cc1$require$readableStreamClose = $7z0I9.readableStreamClose; +var $61587cda97096cc1$require$createDeferredPromise = $7z0I9.createDeferredPromise; +var $61587cda97096cc1$require$fullyReadBody = $7z0I9.fullyReadBody; +var $61587cda97096cc1$require$extractMimeType = $7z0I9.extractMimeType; +var $61587cda97096cc1$require$utf8DecodeBytes = $7z0I9.utf8DecodeBytes; -}); -parcelRegister("i1NZU", function(module, exports) { -"use strict"; -/* eslint-disable @typescript-eslint/no-explicit-any */ var $d1ff1a76e22047b6$var$__createBinding = module.exports && module.exports.__createBinding || (Object.create ? function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = { - enumerable: true, - get: function() { - return m[k]; - } - }; - Object.defineProperty(o, k2, desc); -} : function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -}); -var $d1ff1a76e22047b6$var$__setModuleDefault = module.exports && module.exports.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { - enumerable: true, - value: v - }); -} : function(o, v) { - o["default"] = v; -}); -var $d1ff1a76e22047b6$var$__importStar = module.exports && module.exports.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for(var k in mod)if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) $d1ff1a76e22047b6$var$__createBinding(result, mod, k); - } - $d1ff1a76e22047b6$var$__setModuleDefault(result, mod); - return result; -}; -var $d1ff1a76e22047b6$var$__awaiter = module.exports && module.exports.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(module.exports, "__esModule", { - value: true -}); -module.exports.HttpClient = module.exports.isHttps = module.exports.HttpClientResponse = module.exports.HttpClientError = module.exports.getProxyUrl = module.exports.MediaTypes = module.exports.Headers = module.exports.HttpCodes = void 0; +var $kFkJR = parcelRequire("kFkJR"); +var $61587cda97096cc1$require$FormData = $kFkJR.FormData; -const $d1ff1a76e22047b6$var$http = $d1ff1a76e22047b6$var$__importStar($g40fK$http); +var $faXHi = parcelRequire("faXHi"); +var $61587cda97096cc1$require$kState = $faXHi.kState; -const $d1ff1a76e22047b6$var$https = $d1ff1a76e22047b6$var$__importStar($g40fK$https); +var $5HTG7 = parcelRequire("5HTG7"); +var $61587cda97096cc1$require$webidl = $5HTG7.webidl; -const $d1ff1a76e22047b6$var$pm = $d1ff1a76e22047b6$var$__importStar((parcelRequire("iWxXs"))); +var $61587cda97096cc1$require$Blob = $in2sP$nodebuffer.Blob; -const $d1ff1a76e22047b6$var$tunnel = $d1ff1a76e22047b6$var$__importStar((parcelRequire("c8O5t"))); -var $gG0bg = parcelRequire("gG0bg"); -var $d1ff1a76e22047b6$var$HttpCodes; -(function(HttpCodes) { - HttpCodes[HttpCodes["OK"] = 200] = "OK"; - HttpCodes[HttpCodes["MultipleChoices"] = 300] = "MultipleChoices"; - HttpCodes[HttpCodes["MovedPermanently"] = 301] = "MovedPermanently"; - HttpCodes[HttpCodes["ResourceMoved"] = 302] = "ResourceMoved"; - HttpCodes[HttpCodes["SeeOther"] = 303] = "SeeOther"; - HttpCodes[HttpCodes["NotModified"] = 304] = "NotModified"; - HttpCodes[HttpCodes["UseProxy"] = 305] = "UseProxy"; - HttpCodes[HttpCodes["SwitchProxy"] = 306] = "SwitchProxy"; - HttpCodes[HttpCodes["TemporaryRedirect"] = 307] = "TemporaryRedirect"; - HttpCodes[HttpCodes["PermanentRedirect"] = 308] = "PermanentRedirect"; - HttpCodes[HttpCodes["BadRequest"] = 400] = "BadRequest"; - HttpCodes[HttpCodes["Unauthorized"] = 401] = "Unauthorized"; - HttpCodes[HttpCodes["PaymentRequired"] = 402] = "PaymentRequired"; - HttpCodes[HttpCodes["Forbidden"] = 403] = "Forbidden"; - HttpCodes[HttpCodes["NotFound"] = 404] = "NotFound"; - HttpCodes[HttpCodes["MethodNotAllowed"] = 405] = "MethodNotAllowed"; - HttpCodes[HttpCodes["NotAcceptable"] = 406] = "NotAcceptable"; - HttpCodes[HttpCodes["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; - HttpCodes[HttpCodes["RequestTimeout"] = 408] = "RequestTimeout"; - HttpCodes[HttpCodes["Conflict"] = 409] = "Conflict"; - HttpCodes[HttpCodes["Gone"] = 410] = "Gone"; - HttpCodes[HttpCodes["TooManyRequests"] = 429] = "TooManyRequests"; - HttpCodes[HttpCodes["InternalServerError"] = 500] = "InternalServerError"; - HttpCodes[HttpCodes["NotImplemented"] = 501] = "NotImplemented"; - HttpCodes[HttpCodes["BadGateway"] = 502] = "BadGateway"; - HttpCodes[HttpCodes["ServiceUnavailable"] = 503] = "ServiceUnavailable"; - HttpCodes[HttpCodes["GatewayTimeout"] = 504] = "GatewayTimeout"; -})($d1ff1a76e22047b6$var$HttpCodes || (module.exports.HttpCodes = $d1ff1a76e22047b6$var$HttpCodes = {})); -var $d1ff1a76e22047b6$var$Headers; -(function(Headers) { - Headers["Accept"] = "accept"; - Headers["ContentType"] = "content-type"; -})($d1ff1a76e22047b6$var$Headers || (module.exports.Headers = $d1ff1a76e22047b6$var$Headers = {})); -var $d1ff1a76e22047b6$var$MediaTypes; -(function(MediaTypes) { - MediaTypes["ApplicationJson"] = "application/json"; -})($d1ff1a76e22047b6$var$MediaTypes || (module.exports.MediaTypes = $d1ff1a76e22047b6$var$MediaTypes = {})); -/** - * Returns the proxy URL, depending upon the supplied url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ function $d1ff1a76e22047b6$var$getProxyUrl(serverUrl) { - const proxyUrl = $d1ff1a76e22047b6$var$pm.getProxyUrl(new URL(serverUrl)); - return proxyUrl ? proxyUrl.href : ""; -} -module.exports.getProxyUrl = $d1ff1a76e22047b6$var$getProxyUrl; -const $d1ff1a76e22047b6$var$HttpRedirectCodes = [ - $d1ff1a76e22047b6$var$HttpCodes.MovedPermanently, - $d1ff1a76e22047b6$var$HttpCodes.ResourceMoved, - $d1ff1a76e22047b6$var$HttpCodes.SeeOther, - $d1ff1a76e22047b6$var$HttpCodes.TemporaryRedirect, - $d1ff1a76e22047b6$var$HttpCodes.PermanentRedirect -]; -const $d1ff1a76e22047b6$var$HttpResponseRetryCodes = [ - $d1ff1a76e22047b6$var$HttpCodes.BadGateway, - $d1ff1a76e22047b6$var$HttpCodes.ServiceUnavailable, - $d1ff1a76e22047b6$var$HttpCodes.GatewayTimeout -]; -const $d1ff1a76e22047b6$var$RetryableHttpVerbs = [ - "OPTIONS", - "GET", - "DELETE", - "HEAD" -]; -const $d1ff1a76e22047b6$var$ExponentialBackoffCeiling = 10; -const $d1ff1a76e22047b6$var$ExponentialBackoffTimeSlice = 5; -class $d1ff1a76e22047b6$var$HttpClientError extends Error { - constructor(message, statusCode){ - super(message); - this.name = "HttpClientError"; - this.statusCode = statusCode; - Object.setPrototypeOf(this, $d1ff1a76e22047b6$var$HttpClientError.prototype); - } -} -module.exports.HttpClientError = $d1ff1a76e22047b6$var$HttpClientError; -class $d1ff1a76e22047b6$var$HttpClientResponse { - constructor(message){ - this.message = message; +var $61587cda97096cc1$require$isErrored = $in2sP$nodestream.isErrored; +var $61587cda97096cc1$require$isDisturbed = $in2sP$nodestream.isDisturbed; + +var $61587cda97096cc1$require$isArrayBuffer = $in2sP$nodeutiltypes.isArrayBuffer; + +var $30IsM = parcelRequire("30IsM"); +var $61587cda97096cc1$require$serializeAMimeType = $30IsM.serializeAMimeType; + +var $lUSEQ = parcelRequire("lUSEQ"); +var $61587cda97096cc1$require$multipartFormDataParser = $lUSEQ.multipartFormDataParser; +let $61587cda97096cc1$var$random; + +try { + const crypto = $61587cda97096cc1$import$a9cb41e762089626; + $61587cda97096cc1$var$random = (max)=>crypto.randomInt(0, max); +} catch { + $61587cda97096cc1$var$random = (max)=>Math.floor(Math.random(max)); +} +const $61587cda97096cc1$var$textEncoder = new TextEncoder(); +function $61587cda97096cc1$var$noop() {} +const $61587cda97096cc1$var$hasFinalizationRegistry = globalThis.FinalizationRegistry && process.version.indexOf('v18') !== 0; +let $61587cda97096cc1$var$streamRegistry; +if ($61587cda97096cc1$var$hasFinalizationRegistry) $61587cda97096cc1$var$streamRegistry = new FinalizationRegistry((weakRef)=>{ + const stream = weakRef.deref(); + if (stream && !stream.locked && !$61587cda97096cc1$require$isDisturbed(stream) && !$61587cda97096cc1$require$isErrored(stream)) stream.cancel('Response object has been garbage collected').catch($61587cda97096cc1$var$noop); +}); +// https://fetch.spec.whatwg.org/#concept-bodyinit-extract +function $61587cda97096cc1$var$extractBody(object, keepalive = false) { + // 1. Let stream be null. + let stream = null; + // 2. If object is a ReadableStream object, then set stream to object. + if (object instanceof ReadableStream) stream = object; + else if ($61587cda97096cc1$require$isBlobLike(object)) // 3. Otherwise, if object is a Blob object, set stream to the + // result of running object’s get stream. + stream = object.stream(); + else // 4. Otherwise, set stream to a new ReadableStream object, and set + // up stream with byte reading support. + stream = new ReadableStream({ + async pull (controller) { + const buffer = typeof source === 'string' ? $61587cda97096cc1$var$textEncoder.encode(source) : source; + if (buffer.byteLength) controller.enqueue(buffer); + queueMicrotask(()=>$61587cda97096cc1$require$readableStreamClose(controller)); + }, + start () {}, + type: 'bytes' + }); + // 5. Assert: stream is a ReadableStream object. + $in2sP$nodeassert($61587cda97096cc1$require$isReadableStreamLike(stream)); + // 6. Let action be null. + let action = null; + // 7. Let source be null. + let source = null; + // 8. Let length be null. + let length = null; + // 9. Let type be null. + let type = null; + // 10. Switch on object: + if (typeof object === 'string') { + // Set source to the UTF-8 encoding of object. + // Note: setting source to a Uint8Array here breaks some mocking assumptions. + source = object; + // Set type to `text/plain;charset=UTF-8`. + type = 'text/plain;charset=UTF-8'; + } else if (object instanceof URLSearchParams) { + // URLSearchParams + // spec says to run application/x-www-form-urlencoded on body.list + // this is implemented in Node.js as apart of an URLSearchParams instance toString method + // See: https://github.com/nodejs/node/blob/e46c680bf2b211bbd52cf959ca17ee98c7f657f5/lib/internal/url.js#L490 + // and https://github.com/nodejs/node/blob/e46c680bf2b211bbd52cf959ca17ee98c7f657f5/lib/internal/url.js#L1100 + // Set source to the result of running the application/x-www-form-urlencoded serializer with object’s list. + source = object.toString(); + // Set type to `application/x-www-form-urlencoded;charset=UTF-8`. + type = 'application/x-www-form-urlencoded;charset=UTF-8'; + } else if ($61587cda97096cc1$require$isArrayBuffer(object)) // BufferSource/ArrayBuffer + // Set source to a copy of the bytes held by object. + source = new Uint8Array(object.slice()); + else if (ArrayBuffer.isView(object)) // BufferSource/ArrayBufferView + // Set source to a copy of the bytes held by object. + source = new Uint8Array(object.buffer.slice(object.byteOffset, object.byteOffset + object.byteLength)); + else if ($bFRvW.isFormDataLike(object)) { + const boundary = `----formdata-undici-0${`${$61587cda97096cc1$var$random(1e11)}`.padStart(11, '0')}`; + const prefix = `--${boundary}\r\nContent-Disposition: form-data`; + /*! formdata-polyfill. MIT License. Jimmy Wärting */ 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'); + // Set action to this step: run the multipart/form-data + // encoding algorithm, with object’s entry list and UTF-8. + // - This ensures that the body is immutable and can't be changed afterwords + // - That the content-length is calculated in advance. + // - And that all parts are pre-encoded and ready to be sent. + const blobParts = []; + const rn = new Uint8Array([ + 13, + 10 + ]) // '\r\n' + ; + length = 0; + let hasUnknownSizeValue = false; + for (const [name, value] of object)if (typeof value === 'string') { + const chunk = $61587cda97096cc1$var$textEncoder.encode(prefix + `; name="${escape(normalizeLinefeeds(name))}"` + `\r\n\r\n${normalizeLinefeeds(value)}\r\n`); + blobParts.push(chunk); + length += chunk.byteLength; + } else { + const chunk = $61587cda97096cc1$var$textEncoder.encode(`${prefix}; name="${escape(normalizeLinefeeds(name))}"` + (value.name ? `; filename="${escape(value.name)}"` : '') + '\r\n' + `Content-Type: ${value.type || 'application/octet-stream'}\r\n\r\n`); + blobParts.push(chunk, value, rn); + if (typeof value.size === 'number') length += chunk.byteLength + value.size + rn.byteLength; + else hasUnknownSizeValue = true; + } + // CRLF is appended to the body to function with legacy servers and match other implementations. + // https://github.com/curl/curl/blob/3434c6b46e682452973972e8313613dfa58cd690/lib/mime.c#L1029-L1030 + // https://github.com/form-data/form-data/issues/63 + const chunk = $61587cda97096cc1$var$textEncoder.encode(`--${boundary}--\r\n`); + blobParts.push(chunk); + length += chunk.byteLength; + if (hasUnknownSizeValue) length = null; + // Set source to object. + source = object; + action = async function*() { + for (const part of blobParts)if (part.stream) yield* part.stream(); + else yield part; + }; + // Set type to `multipart/form-data; boundary=`, + // followed by the multipart/form-data boundary string generated + // by the multipart/form-data encoding algorithm. + type = `multipart/form-data; boundary=${boundary}`; + } else if ($61587cda97096cc1$require$isBlobLike(object)) { + // Blob + // Set source to object. + source = object; + // Set length to object’s size. + length = object.size; + // If object’s type attribute is not the empty byte sequence, set + // type to its value. + if (object.type) type = object.type; + } else if (typeof object[Symbol.asyncIterator] === 'function') { + // If keepalive is true, then throw a TypeError. + if (keepalive) throw new TypeError('keepalive'); + // If object is disturbed or locked, then throw a TypeError. + if ($bFRvW.isDisturbed(object) || object.locked) throw new TypeError('Response body object should not be disturbed or locked'); + stream = object instanceof ReadableStream ? object : $61587cda97096cc1$require$ReadableStreamFrom(object); } - readBody() { - return $d1ff1a76e22047b6$var$__awaiter(this, void 0, void 0, function*() { - return new Promise((resolve)=>$d1ff1a76e22047b6$var$__awaiter(this, void 0, void 0, function*() { - let output = Buffer.alloc(0); - this.message.on("data", (chunk)=>{ - output = Buffer.concat([ - output, - chunk - ]); - }); - this.message.on("end", ()=>{ - resolve(output.toString()); - }); - })); + // 11. If source is a byte sequence, then set action to a + // step that returns source and length to source’s length. + if (typeof source === 'string' || $bFRvW.isBuffer(source)) length = Buffer.byteLength(source); + // 12. If action is non-null, then run these steps in in parallel: + if (action != null) { + // Run action. + let iterator; + stream = new ReadableStream({ + async start () { + iterator = action(object)[Symbol.asyncIterator](); + }, + async pull (controller) { + const { value: value, done: done } = await iterator.next(); + if (done) // When running action is done, close stream. + queueMicrotask(()=>{ + controller.close(); + controller.byobRequest?.respond(0); + }); + else // Whenever one or more bytes are available and stream is not errored, + // enqueue a Uint8Array wrapping an ArrayBuffer containing the available + // bytes into stream. + if (!$61587cda97096cc1$require$isErrored(stream)) { + const buffer = new Uint8Array(value); + if (buffer.byteLength) controller.enqueue(buffer); + } + return controller.desiredSize > 0; + }, + async cancel (reason) { + await iterator.return(); + }, + type: 'bytes' }); } - readBodyBuffer() { - return $d1ff1a76e22047b6$var$__awaiter(this, void 0, void 0, function*() { - return new Promise((resolve)=>$d1ff1a76e22047b6$var$__awaiter(this, void 0, void 0, function*() { - const chunks = []; - this.message.on("data", (chunk)=>{ - chunks.push(chunk); - }); - this.message.on("end", ()=>{ - resolve(Buffer.concat(chunks)); - }); - })); - }); + // 13. Let body be a body whose stream is stream, source is source, + // and length is length. + const body = { + stream: stream, + source: source, + length: length + }; + // 14. Return (body, type). + return [ + body, + type + ]; +} +// https://fetch.spec.whatwg.org/#bodyinit-safely-extract +function $61587cda97096cc1$var$safelyExtractBody(object, keepalive = false) { + // To safely extract a body and a `Content-Type` value from + // a byte sequence or BodyInit object object, run these steps: + // 1. If object is a ReadableStream object, then: + if (object instanceof ReadableStream) { + // Assert: object is neither disturbed nor locked. + // istanbul ignore next + $in2sP$nodeassert(!$bFRvW.isDisturbed(object), 'The body has already been consumed.'); + // istanbul ignore next + $in2sP$nodeassert(!object.locked, 'The stream is locked.'); } + // 2. Return the results of extracting object. + return $61587cda97096cc1$var$extractBody(object, keepalive); } -module.exports.HttpClientResponse = $d1ff1a76e22047b6$var$HttpClientResponse; -function $d1ff1a76e22047b6$var$isHttps(requestUrl) { - const parsedUrl = new URL(requestUrl); - return parsedUrl.protocol === "https:"; +function $61587cda97096cc1$var$cloneBody(instance, body) { + // To clone a body body, run these steps: + // https://fetch.spec.whatwg.org/#concept-body-clone + // 1. Let « out1, out2 » be the result of teeing body’s stream. + const [out1, out2] = body.stream.tee(); + // 2. Set body’s stream to out1. + body.stream = out1; + // 3. Return a body whose stream is out2 and other members are copied from body. + return { + stream: out2, + length: body.length, + source: body.source + }; } -module.exports.isHttps = $d1ff1a76e22047b6$var$isHttps; -class $d1ff1a76e22047b6$var$HttpClient { - constructor(userAgent, handlers, requestOptions){ - this._ignoreSslError = false; - this._allowRedirects = true; - this._allowRedirectDowngrade = false; - this._maxRedirects = 50; - this._allowRetries = false; - this._maxRetries = 1; - this._keepAlive = false; - this._disposed = false; - this.userAgent = userAgent; - this.handlers = handlers || []; - this.requestOptions = requestOptions; - if (requestOptions) { - if (requestOptions.ignoreSslError != null) this._ignoreSslError = requestOptions.ignoreSslError; - this._socketTimeout = requestOptions.socketTimeout; - if (requestOptions.allowRedirects != null) this._allowRedirects = requestOptions.allowRedirects; - if (requestOptions.allowRedirectDowngrade != null) this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; - if (requestOptions.maxRedirects != null) this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); - if (requestOptions.keepAlive != null) this._keepAlive = requestOptions.keepAlive; - if (requestOptions.allowRetries != null) this._allowRetries = requestOptions.allowRetries; - if (requestOptions.maxRetries != null) this._maxRetries = requestOptions.maxRetries; +function $61587cda97096cc1$var$throwIfAborted(state) { + if (state.aborted) throw new DOMException('The operation was aborted.', 'AbortError'); +} +function $61587cda97096cc1$var$bodyMixinMethods(instance) { + const methods = { + blob () { + // The blob() method steps are to return the result of + // running consume body with this and the following step + // given a byte sequence bytes: return a Blob whose + // contents are bytes and whose type attribute is this’s + // MIME type. + return $61587cda97096cc1$var$consumeBody(this, (bytes)=>{ + let mimeType = $61587cda97096cc1$var$bodyMimeType(this); + if (mimeType === null) mimeType = ''; + else if (mimeType) mimeType = $61587cda97096cc1$require$serializeAMimeType(mimeType); + // Return a Blob whose contents are bytes and type attribute + // is mimeType. + return new $61587cda97096cc1$require$Blob([ + bytes + ], { + type: mimeType + }); + }, instance); + }, + arrayBuffer () { + // The arrayBuffer() method steps are to return the result + // of running consume body with this and the following step + // given a byte sequence bytes: return a new ArrayBuffer + // whose contents are bytes. + return $61587cda97096cc1$var$consumeBody(this, (bytes)=>{ + return new Uint8Array(bytes).buffer; + }, instance); + }, + text () { + // The text() method steps are to return the result of running + // consume body with this and UTF-8 decode. + return $61587cda97096cc1$var$consumeBody(this, $61587cda97096cc1$require$utf8DecodeBytes, instance); + }, + json () { + // The json() method steps are to return the result of running + // consume body with this and parse JSON from bytes. + return $61587cda97096cc1$var$consumeBody(this, $61587cda97096cc1$var$parseJSONFromBytes, instance); + }, + formData () { + // The formData() method steps are to return the result of running + // consume body with this and the following step given a byte sequence bytes: + return $61587cda97096cc1$var$consumeBody(this, (value)=>{ + // 1. Let mimeType be the result of get the MIME type with this. + const mimeType = $61587cda97096cc1$var$bodyMimeType(this); + // 2. If mimeType is non-null, then switch on mimeType’s essence and run + // the corresponding steps: + if (mimeType !== null) switch(mimeType.essence){ + case 'multipart/form-data': + { + // 1. ... [long step] + const parsed = $61587cda97096cc1$require$multipartFormDataParser(value, mimeType); + // 2. If that fails for some reason, then throw a TypeError. + if (parsed === 'failure') throw new TypeError('Failed to parse body as FormData.'); + // 3. Return a new FormData object, appending each entry, + // resulting from the parsing operation, to its entry list. + const fd = new $61587cda97096cc1$require$FormData(); + fd[$61587cda97096cc1$require$kState] = parsed; + return fd; + } + case 'application/x-www-form-urlencoded': + { + // 1. Let entries be the result of parsing bytes. + const entries = new URLSearchParams(value.toString()); + // 2. If entries is failure, then throw a TypeError. + // 3. Return a new FormData object whose entry list is entries. + const fd = new $61587cda97096cc1$require$FormData(); + for (const [name, value] of entries)fd.append(name, value); + return fd; + } + } + // 3. Throw a TypeError. + throw new TypeError('Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".'); + }, instance); + }, + bytes () { + // The bytes() method steps are to return the result of running consume body + // with this and the following step given a byte sequence bytes: return the + // result of creating a Uint8Array from bytes in this’s relevant realm. + return $61587cda97096cc1$var$consumeBody(this, (bytes)=>{ + return new Uint8Array(bytes); + }, instance); } + }; + return methods; +} +function $61587cda97096cc1$var$mixinBody(prototype) { + Object.assign(prototype.prototype, $61587cda97096cc1$var$bodyMixinMethods(prototype)); +} +/** + * @see https://fetch.spec.whatwg.org/#concept-body-consume-body + * @param {Response|Request} object + * @param {(value: unknown) => unknown} convertBytesToJSValue + * @param {Response|Request} instance + */ async function $61587cda97096cc1$var$consumeBody(object, convertBytesToJSValue, instance) { + $61587cda97096cc1$require$webidl.brandCheck(object, instance); + // 1. If object is unusable, then return a promise rejected + // with a TypeError. + if ($61587cda97096cc1$var$bodyUnusable(object)) throw new TypeError('Body is unusable: Body has already been read'); + $61587cda97096cc1$var$throwIfAborted(object[$61587cda97096cc1$require$kState]); + // 2. Let promise be a new promise. + const promise = $61587cda97096cc1$require$createDeferredPromise(); + // 3. Let errorSteps given error be to reject promise with error. + const errorSteps = (error)=>promise.reject(error); + // 4. Let successSteps given a byte sequence data be to resolve + // promise with the result of running convertBytesToJSValue + // with data. If that threw an exception, then run errorSteps + // with that exception. + const successSteps = (data)=>{ + try { + promise.resolve(convertBytesToJSValue(data)); + } catch (e) { + errorSteps(e); + } + }; + // 5. If object’s body is null, then run successSteps with an + // empty byte sequence. + if (object[$61587cda97096cc1$require$kState].body == null) { + successSteps(Buffer.allocUnsafe(0)); + return promise.promise; } - options(requestUrl, additionalHeaders) { - return $d1ff1a76e22047b6$var$__awaiter(this, void 0, void 0, function*() { - return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); - }); - } - get(requestUrl, additionalHeaders) { - return $d1ff1a76e22047b6$var$__awaiter(this, void 0, void 0, function*() { - return this.request("GET", requestUrl, null, additionalHeaders || {}); - }); - } - del(requestUrl, additionalHeaders) { - return $d1ff1a76e22047b6$var$__awaiter(this, void 0, void 0, function*() { - return this.request("DELETE", requestUrl, null, additionalHeaders || {}); - }); - } - post(requestUrl, data, additionalHeaders) { - return $d1ff1a76e22047b6$var$__awaiter(this, void 0, void 0, function*() { - return this.request("POST", requestUrl, data, additionalHeaders || {}); - }); + // 6. Otherwise, fully read object’s body given successSteps, + // errorSteps, and object’s relevant global object. + await $61587cda97096cc1$require$fullyReadBody(object[$61587cda97096cc1$require$kState].body, successSteps, errorSteps); + // 7. Return promise. + return promise.promise; +} +// https://fetch.spec.whatwg.org/#body-unusable +function $61587cda97096cc1$var$bodyUnusable(object) { + const body = object[$61587cda97096cc1$require$kState].body; + // An object including the Body interface mixin is + // said to be unusable if its body is non-null and + // its body’s stream is disturbed or locked. + return body != null && (body.stream.locked || $bFRvW.isDisturbed(body.stream)); +} +/** + * @see https://infra.spec.whatwg.org/#parse-json-bytes-to-a-javascript-value + * @param {Uint8Array} bytes + */ function $61587cda97096cc1$var$parseJSONFromBytes(bytes) { + return JSON.parse($61587cda97096cc1$require$utf8DecodeBytes(bytes)); +} +/** + * @see https://fetch.spec.whatwg.org/#concept-body-mime-type + * @param {import('./response').Response|import('./request').Request} requestOrResponse + */ function $61587cda97096cc1$var$bodyMimeType(requestOrResponse) { + // 1. Let headers be null. + // 2. If requestOrResponse is a Request object, then set headers to requestOrResponse’s request’s header list. + // 3. Otherwise, set headers to requestOrResponse’s response’s header list. + /** @type {import('./headers').HeadersList} */ const headers = requestOrResponse[$61587cda97096cc1$require$kState].headersList; + // 4. Let mimeType be the result of extracting a MIME type from headers. + const mimeType = $61587cda97096cc1$require$extractMimeType(headers); + // 5. If mimeType is failure, then return null. + if (mimeType === 'failure') return null; + // 6. Return mimeType. + return mimeType; +} +module.exports = { + extractBody: $61587cda97096cc1$var$extractBody, + safelyExtractBody: $61587cda97096cc1$var$safelyExtractBody, + cloneBody: $61587cda97096cc1$var$cloneBody, + mixinBody: $61587cda97096cc1$var$mixinBody, + streamRegistry: $61587cda97096cc1$var$streamRegistry, + hasFinalizationRegistry: $61587cda97096cc1$var$hasFinalizationRegistry, + bodyUnusable: $61587cda97096cc1$var$bodyUnusable +}; + +}); +parcelRegister("bFRvW", function(module, exports) { +'use strict'; + + +var $gNVEc = parcelRequire("gNVEc"); +var $87fd08d838e48741$require$kDestroyed = $gNVEc.kDestroyed; +var $87fd08d838e48741$require$kBodyUsed = $gNVEc.kBodyUsed; +var $87fd08d838e48741$require$kListeners = $gNVEc.kListeners; +var $87fd08d838e48741$require$kBody = $gNVEc.kBody; + +var $87fd08d838e48741$require$IncomingMessage = $in2sP$nodehttp.IncomingMessage; + + + +var $87fd08d838e48741$require$Blob = $in2sP$nodebuffer.Blob; + + +var $87fd08d838e48741$require$stringify = $in2sP$nodequerystring.stringify; + +var $87fd08d838e48741$require$EE = $in2sP$nodeevents.EventEmitter; + +var $gTXXK = parcelRequire("gTXXK"); +var $87fd08d838e48741$require$InvalidArgumentError = $gTXXK.InvalidArgumentError; + +var $4xbXj = parcelRequire("4xbXj"); +var $87fd08d838e48741$require$headerNameLowerCasedRecord = $4xbXj.headerNameLowerCasedRecord; + +var $9tJ55 = parcelRequire("9tJ55"); +var $87fd08d838e48741$require$tree = $9tJ55.tree; +const [$87fd08d838e48741$var$nodeMajor, $87fd08d838e48741$var$nodeMinor] = process.versions.node.split('.').map((v)=>Number(v)); +class $87fd08d838e48741$var$BodyAsyncIterable { + constructor(body){ + this[$87fd08d838e48741$require$kBody] = body; + this[$87fd08d838e48741$require$kBodyUsed] = false; } - patch(requestUrl, data, additionalHeaders) { - return $d1ff1a76e22047b6$var$__awaiter(this, void 0, void 0, function*() { - return this.request("PATCH", requestUrl, data, additionalHeaders || {}); + async *[Symbol.asyncIterator]() { + $in2sP$nodeassert(!this[$87fd08d838e48741$require$kBodyUsed], 'disturbed'); + this[$87fd08d838e48741$require$kBodyUsed] = true; + yield* this[$87fd08d838e48741$require$kBody]; + } +} +function $87fd08d838e48741$var$wrapRequestBody(body) { + if ($87fd08d838e48741$var$isStream(body)) { + // TODO (fix): Provide some way for the user to cache the file to e.g. /tmp + // so that it can be dispatched again? + // TODO (fix): Do we need 100-expect support to provide a way to do this properly? + if ($87fd08d838e48741$var$bodyLength(body) === 0) body.on('data', function() { + $in2sP$nodeassert(false); }); + if (typeof body.readableDidRead !== 'boolean') { + body[$87fd08d838e48741$require$kBodyUsed] = false; + $87fd08d838e48741$require$EE.prototype.on.call(body, 'data', function() { + this[$87fd08d838e48741$require$kBodyUsed] = true; + }); + } + return body; + } else if (body && typeof body.pipeTo === 'function') // TODO (fix): We can't access ReadableStream internal state + // to determine whether or not it has been disturbed. This is just + // a workaround. + return new $87fd08d838e48741$var$BodyAsyncIterable(body); + else if (body && typeof body !== 'string' && !ArrayBuffer.isView(body) && $87fd08d838e48741$var$isIterable(body)) // TODO: Should we allow re-using iterable if !this.opts.idempotent + // or through some other flag? + return new $87fd08d838e48741$var$BodyAsyncIterable(body); + else return body; +} +function $87fd08d838e48741$var$nop() {} +function $87fd08d838e48741$var$isStream(obj) { + return obj && typeof obj === 'object' && typeof obj.pipe === 'function' && typeof obj.on === 'function'; +} +// based on https://github.com/node-fetch/fetch-blob/blob/8ab587d34080de94140b54f07168451e7d0b655e/index.js#L229-L241 (MIT License) +function $87fd08d838e48741$var$isBlobLike(object) { + if (object === null) return false; + else if (object instanceof $87fd08d838e48741$require$Blob) return true; + else if (typeof object !== 'object') return false; + else { + const sTag = object[Symbol.toStringTag]; + return (sTag === 'Blob' || sTag === 'File') && ('stream' in object && typeof object.stream === 'function' || 'arrayBuffer' in object && typeof object.arrayBuffer === 'function'); } - put(requestUrl, data, additionalHeaders) { - return $d1ff1a76e22047b6$var$__awaiter(this, void 0, void 0, function*() { - return this.request("PUT", requestUrl, data, additionalHeaders || {}); - }); +} +function $87fd08d838e48741$var$buildURL(url, queryParams) { + if (url.includes('?') || url.includes('#')) throw new Error('Query params cannot be passed when url already contains "?" or "#".'); + const stringified = $87fd08d838e48741$require$stringify(queryParams); + if (stringified) url += '?' + stringified; + return url; +} +function $87fd08d838e48741$var$isValidPort(port) { + const value = parseInt(port, 10); + return value === Number(port) && value >= 0 && value <= 65535; +} +function $87fd08d838e48741$var$isHttpOrHttpsPrefixed(value) { + return value != null && value[0] === 'h' && value[1] === 't' && value[2] === 't' && value[3] === 'p' && (value[4] === ':' || value[4] === 's' && value[5] === ':'); +} +function $87fd08d838e48741$var$parseURL(url) { + if (typeof url === 'string') { + url = new URL(url); + if (!$87fd08d838e48741$var$isHttpOrHttpsPrefixed(url.origin || url.protocol)) throw new $87fd08d838e48741$require$InvalidArgumentError('Invalid URL protocol: the URL must start with `http:` or `https:`.'); + return url; } - head(requestUrl, additionalHeaders) { - return $d1ff1a76e22047b6$var$__awaiter(this, void 0, void 0, function*() { - return this.request("HEAD", requestUrl, null, additionalHeaders || {}); - }); + if (!url || typeof url !== 'object') throw new $87fd08d838e48741$require$InvalidArgumentError('Invalid URL: The URL argument must be a non-null object.'); + if (!(url instanceof URL)) { + if (url.port != null && url.port !== '' && $87fd08d838e48741$var$isValidPort(url.port) === false) throw new $87fd08d838e48741$require$InvalidArgumentError('Invalid URL: port must be a valid integer or a string representation of an integer.'); + if (url.path != null && typeof url.path !== 'string') throw new $87fd08d838e48741$require$InvalidArgumentError('Invalid URL path: the path must be a string or null/undefined.'); + if (url.pathname != null && typeof url.pathname !== 'string') throw new $87fd08d838e48741$require$InvalidArgumentError('Invalid URL pathname: the pathname must be a string or null/undefined.'); + if (url.hostname != null && typeof url.hostname !== 'string') throw new $87fd08d838e48741$require$InvalidArgumentError('Invalid URL hostname: the hostname must be a string or null/undefined.'); + if (url.origin != null && typeof url.origin !== 'string') throw new $87fd08d838e48741$require$InvalidArgumentError('Invalid URL origin: the origin must be a string or null/undefined.'); + if (!$87fd08d838e48741$var$isHttpOrHttpsPrefixed(url.origin || url.protocol)) throw new $87fd08d838e48741$require$InvalidArgumentError('Invalid URL protocol: the URL must start with `http:` or `https:`.'); + const port = url.port != null ? url.port : url.protocol === 'https:' ? 443 : 80; + let origin = url.origin != null ? url.origin : `${url.protocol || ''}//${url.hostname || ''}:${port}`; + let path = url.path != null ? url.path : `${url.pathname || ''}${url.search || ''}`; + if (origin[origin.length - 1] === '/') origin = origin.slice(0, origin.length - 1); + if (path && path[0] !== '/') path = `/${path}`; + // new URL(path, origin) is unsafe when `path` contains an absolute URL + // From https://developer.mozilla.org/en-US/docs/Web/API/URL/URL: + // If first parameter is a relative URL, second param is required, and will be used as the base URL. + // If first parameter is an absolute URL, a given second param will be ignored. + return new URL(`${origin}${path}`); } - sendStream(verb, requestUrl, stream, additionalHeaders) { - return $d1ff1a76e22047b6$var$__awaiter(this, void 0, void 0, function*() { - return this.request(verb, requestUrl, stream, additionalHeaders); - }); + if (!$87fd08d838e48741$var$isHttpOrHttpsPrefixed(url.origin || url.protocol)) throw new $87fd08d838e48741$require$InvalidArgumentError('Invalid URL protocol: the URL must start with `http:` or `https:`.'); + return url; +} +function $87fd08d838e48741$var$parseOrigin(url) { + url = $87fd08d838e48741$var$parseURL(url); + if (url.pathname !== '/' || url.search || url.hash) throw new $87fd08d838e48741$require$InvalidArgumentError('invalid url'); + return url; +} +function $87fd08d838e48741$var$getHostname(host) { + if (host[0] === '[') { + const idx = host.indexOf(']'); + $in2sP$nodeassert(idx !== -1); + return host.substring(1, idx); } - /** - * Gets a typed object from an endpoint - * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise - */ getJson(requestUrl, additionalHeaders = {}) { - return $d1ff1a76e22047b6$var$__awaiter(this, void 0, void 0, function*() { - additionalHeaders[$d1ff1a76e22047b6$var$Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, $d1ff1a76e22047b6$var$Headers.Accept, $d1ff1a76e22047b6$var$MediaTypes.ApplicationJson); - const res = yield this.get(requestUrl, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); + const idx = host.indexOf(':'); + if (idx === -1) return host; + return host.substring(0, idx); +} +// IP addresses are not valid server names per RFC6066 +// > Currently, the only server names supported are DNS hostnames +function $87fd08d838e48741$var$getServerName(host) { + if (!host) return null; + $in2sP$nodeassert(typeof host === 'string'); + const servername = $87fd08d838e48741$var$getHostname(host); + if ($in2sP$nodenet.isIP(servername)) return ''; + return servername; +} +function $87fd08d838e48741$var$deepClone(obj) { + return JSON.parse(JSON.stringify(obj)); +} +function $87fd08d838e48741$var$isAsyncIterable(obj) { + return !!(obj != null && typeof obj[Symbol.asyncIterator] === 'function'); +} +function $87fd08d838e48741$var$isIterable(obj) { + return !!(obj != null && (typeof obj[Symbol.iterator] === 'function' || typeof obj[Symbol.asyncIterator] === 'function')); +} +function $87fd08d838e48741$var$bodyLength(body) { + if (body == null) return 0; + else if ($87fd08d838e48741$var$isStream(body)) { + const state = body._readableState; + return state && state.objectMode === false && state.ended === true && Number.isFinite(state.length) ? state.length : null; + } else if ($87fd08d838e48741$var$isBlobLike(body)) return body.size != null ? body.size : null; + else if ($87fd08d838e48741$var$isBuffer(body)) return body.byteLength; + return null; +} +function $87fd08d838e48741$var$isDestroyed(body) { + return body && !!(body.destroyed || body[$87fd08d838e48741$require$kDestroyed] || $in2sP$nodestream.isDestroyed?.(body)); +} +function $87fd08d838e48741$var$destroy(stream, err) { + if (stream == null || !$87fd08d838e48741$var$isStream(stream) || $87fd08d838e48741$var$isDestroyed(stream)) return; + if (typeof stream.destroy === 'function') { + if (Object.getPrototypeOf(stream).constructor === $87fd08d838e48741$require$IncomingMessage) // See: https://github.com/nodejs/node/pull/38505/files + stream.socket = null; + stream.destroy(err); + } else if (err) queueMicrotask(()=>{ + stream.emit('error', err); + }); + if (stream.destroyed !== true) stream[$87fd08d838e48741$require$kDestroyed] = true; +} +const $87fd08d838e48741$var$KEEPALIVE_TIMEOUT_EXPR = /timeout=(\d+)/; +function $87fd08d838e48741$var$parseKeepAliveTimeout(val) { + const m = val.toString().match($87fd08d838e48741$var$KEEPALIVE_TIMEOUT_EXPR); + return m ? parseInt(m[1], 10) * 1000 : null; +} +/** + * Retrieves a header name and returns its lowercase value. + * @param {string | Buffer} value Header name + * @returns {string} + */ function $87fd08d838e48741$var$headerNameToString(value) { + return typeof value === 'string' ? $87fd08d838e48741$require$headerNameLowerCasedRecord[value] ?? value.toLowerCase() : $87fd08d838e48741$require$tree.lookup(value) ?? value.toString('latin1').toLowerCase(); +} +/** + * Receive the buffer as a string and return its lowercase value. + * @param {Buffer} value Header name + * @returns {string} + */ function $87fd08d838e48741$var$bufferToLowerCasedHeaderName(value) { + return $87fd08d838e48741$require$tree.lookup(value) ?? value.toString('latin1').toLowerCase(); +} +/** + * @param {Record | (Buffer | string | (Buffer | string)[])[]} headers + * @param {Record} [obj] + * @returns {Record} + */ function $87fd08d838e48741$var$parseHeaders(headers, obj) { + if (obj === undefined) obj = {}; + for(let i = 0; i < headers.length; i += 2){ + const key = $87fd08d838e48741$var$headerNameToString(headers[i]); + let val = obj[key]; + if (val) { + if (typeof val === 'string') { + val = [ + val + ]; + obj[key] = val; + } + val.push(headers[i + 1].toString('utf8')); + } else { + const headersValue = headers[i + 1]; + if (typeof headersValue === 'string') obj[key] = headersValue; + else obj[key] = Array.isArray(headersValue) ? headersValue.map((x)=>x.toString('utf8')) : headersValue.toString('utf8'); + } } - postJson(requestUrl, obj, additionalHeaders = {}) { - return $d1ff1a76e22047b6$var$__awaiter(this, void 0, void 0, function*() { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[$d1ff1a76e22047b6$var$Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, $d1ff1a76e22047b6$var$Headers.Accept, $d1ff1a76e22047b6$var$MediaTypes.ApplicationJson); - additionalHeaders[$d1ff1a76e22047b6$var$Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, $d1ff1a76e22047b6$var$Headers.ContentType, $d1ff1a76e22047b6$var$MediaTypes.ApplicationJson); - const res = yield this.post(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); + // See https://github.com/nodejs/node/pull/46528 + if ('content-length' in obj && 'content-disposition' in obj) obj['content-disposition'] = Buffer.from(obj['content-disposition']).toString('latin1'); + return obj; +} +function $87fd08d838e48741$var$parseRawHeaders(headers) { + const len = headers.length; + const ret = new Array(len); + let hasContentLength = false; + let contentDispositionIdx = -1; + let key; + let val; + let kLen = 0; + for(let n = 0; n < headers.length; n += 2){ + key = headers[n]; + val = headers[n + 1]; + typeof key !== 'string' && (key = key.toString()); + typeof val !== 'string' && (val = val.toString('utf8')); + kLen = key.length; + if (kLen === 14 && key[7] === '-' && (key === 'content-length' || key.toLowerCase() === 'content-length')) hasContentLength = true; + else if (kLen === 19 && key[7] === '-' && (key === 'content-disposition' || key.toLowerCase() === 'content-disposition')) contentDispositionIdx = n + 1; + ret[n] = key; + ret[n + 1] = val; } - putJson(requestUrl, obj, additionalHeaders = {}) { - return $d1ff1a76e22047b6$var$__awaiter(this, void 0, void 0, function*() { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[$d1ff1a76e22047b6$var$Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, $d1ff1a76e22047b6$var$Headers.Accept, $d1ff1a76e22047b6$var$MediaTypes.ApplicationJson); - additionalHeaders[$d1ff1a76e22047b6$var$Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, $d1ff1a76e22047b6$var$Headers.ContentType, $d1ff1a76e22047b6$var$MediaTypes.ApplicationJson); - const res = yield this.put(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); + // See https://github.com/nodejs/node/pull/46528 + if (hasContentLength && contentDispositionIdx !== -1) ret[contentDispositionIdx] = Buffer.from(ret[contentDispositionIdx]).toString('latin1'); + return ret; +} +function $87fd08d838e48741$var$isBuffer(buffer) { + // See, https://github.com/mcollina/undici/pull/319 + return buffer instanceof Uint8Array || Buffer.isBuffer(buffer); +} +function $87fd08d838e48741$var$validateHandler(handler, method, upgrade) { + if (!handler || typeof handler !== 'object') throw new $87fd08d838e48741$require$InvalidArgumentError('handler must be an object'); + if (typeof handler.onConnect !== 'function') throw new $87fd08d838e48741$require$InvalidArgumentError('invalid onConnect method'); + if (typeof handler.onError !== 'function') throw new $87fd08d838e48741$require$InvalidArgumentError('invalid onError method'); + if (typeof handler.onBodySent !== 'function' && handler.onBodySent !== undefined) throw new $87fd08d838e48741$require$InvalidArgumentError('invalid onBodySent method'); + if (upgrade || method === 'CONNECT') { + if (typeof handler.onUpgrade !== 'function') throw new $87fd08d838e48741$require$InvalidArgumentError('invalid onUpgrade method'); + } else { + if (typeof handler.onHeaders !== 'function') throw new $87fd08d838e48741$require$InvalidArgumentError('invalid onHeaders method'); + if (typeof handler.onData !== 'function') throw new $87fd08d838e48741$require$InvalidArgumentError('invalid onData method'); + if (typeof handler.onComplete !== 'function') throw new $87fd08d838e48741$require$InvalidArgumentError('invalid onComplete method'); } - patchJson(requestUrl, obj, additionalHeaders = {}) { - return $d1ff1a76e22047b6$var$__awaiter(this, void 0, void 0, function*() { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[$d1ff1a76e22047b6$var$Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, $d1ff1a76e22047b6$var$Headers.Accept, $d1ff1a76e22047b6$var$MediaTypes.ApplicationJson); - additionalHeaders[$d1ff1a76e22047b6$var$Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, $d1ff1a76e22047b6$var$Headers.ContentType, $d1ff1a76e22047b6$var$MediaTypes.ApplicationJson); - const res = yield this.patch(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); +} +// A body is disturbed if it has been read from and it cannot +// be re-used without losing state or data. +function $87fd08d838e48741$var$isDisturbed(body) { + // TODO (fix): Why is body[kBodyUsed] needed? + return !!(body && ($in2sP$nodestream.isDisturbed(body) || body[$87fd08d838e48741$require$kBodyUsed])); +} +function $87fd08d838e48741$var$isErrored(body) { + return !!(body && $in2sP$nodestream.isErrored(body)); +} +function $87fd08d838e48741$var$isReadable(body) { + return !!(body && $in2sP$nodestream.isReadable(body)); +} +function $87fd08d838e48741$var$getSocketInfo(socket) { + return { + localAddress: socket.localAddress, + localPort: socket.localPort, + remoteAddress: socket.remoteAddress, + remotePort: socket.remotePort, + remoteFamily: socket.remoteFamily, + timeout: socket.timeout, + bytesWritten: socket.bytesWritten, + bytesRead: socket.bytesRead + }; +} +/** @type {globalThis['ReadableStream']} */ function $87fd08d838e48741$var$ReadableStreamFrom(iterable) { + // We cannot use ReadableStream.from here because it does not return a byte stream. + let iterator; + return new ReadableStream({ + async start () { + iterator = iterable[Symbol.asyncIterator](); + }, + async pull (controller) { + const { done: done, value: value } = await iterator.next(); + if (done) queueMicrotask(()=>{ + controller.close(); + controller.byobRequest?.respond(0); + }); + else { + const buf = Buffer.isBuffer(value) ? value : Buffer.from(value); + if (buf.byteLength) controller.enqueue(new Uint8Array(buf)); + } + return controller.desiredSize > 0; + }, + async cancel (reason) { + await iterator.return(); + }, + type: 'bytes' + }); +} +// The chunk should be a FormData instance and contains +// all the required methods. +function $87fd08d838e48741$var$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'; +} +function $87fd08d838e48741$var$addAbortListener(signal, listener) { + if ('addEventListener' in signal) { + signal.addEventListener('abort', listener, { + once: true }); + return ()=>signal.removeEventListener('abort', listener); } - /** - * Makes a raw http request. - * All other methods such as get, post, patch, and request ultimately call this. - * Prefer get, del, post and patch - */ request(verb, requestUrl, data, headers) { - return $d1ff1a76e22047b6$var$__awaiter(this, void 0, void 0, function*() { - if (this._disposed) throw new Error("Client has already been disposed."); - const parsedUrl = new URL(requestUrl); - let info = this._prepareRequest(verb, parsedUrl, headers); - // Only perform retries on reads since writes may not be idempotent. - const maxTries = this._allowRetries && $d1ff1a76e22047b6$var$RetryableHttpVerbs.includes(verb) ? this._maxRetries + 1 : 1; - let numTries = 0; - let response; - do { - response = yield this.requestRaw(info, data); - // Check if it's an authentication challenge - if (response && response.message && response.message.statusCode === $d1ff1a76e22047b6$var$HttpCodes.Unauthorized) { - let authenticationHandler; - for (const handler of this.handlers)if (handler.canHandleAuthentication(response)) { - authenticationHandler = handler; - break; - } - if (authenticationHandler) return authenticationHandler.handleAuthentication(this, info, data); - else // We have received an unauthorized response but have no handlers to handle it. - // Let the response return to the caller. - return response; - } - let redirectsRemaining = this._maxRedirects; - while(response.message.statusCode && $d1ff1a76e22047b6$var$HttpRedirectCodes.includes(response.message.statusCode) && this._allowRedirects && redirectsRemaining > 0){ - const redirectUrl = response.message.headers["location"]; - if (!redirectUrl) break; - const parsedRedirectUrl = new URL(redirectUrl); - if (parsedUrl.protocol === "https:" && parsedUrl.protocol !== parsedRedirectUrl.protocol && !this._allowRedirectDowngrade) throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true."); - // we need to finish reading the response before reassigning response - // which will leak the open socket. - yield response.readBody(); - // strip authorization header if redirected to a different hostname - if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { - for(const header in headers)// header names are case insensitive - if (header.toLowerCase() === "authorization") delete headers[header]; - } - // let's make the request with the new redirectUrl - info = this._prepareRequest(verb, parsedRedirectUrl, headers); - response = yield this.requestRaw(info, data); - redirectsRemaining--; - } - if (!response.message.statusCode || !$d1ff1a76e22047b6$var$HttpResponseRetryCodes.includes(response.message.statusCode)) // If not a retry code, return immediately instead of retrying - return response; - numTries += 1; - if (numTries < maxTries) { - yield response.readBody(); - yield this._performExponentialBackoff(numTries); - } - }while (numTries < maxTries); - return response; - }); + signal.addListener('abort', listener); + return ()=>signal.removeListener('abort', listener); +} +const $87fd08d838e48741$var$hasToWellFormed = typeof String.prototype.toWellFormed === 'function'; +const $87fd08d838e48741$var$hasIsWellFormed = typeof String.prototype.isWellFormed === 'function'; +/** + * @param {string} val + */ function $87fd08d838e48741$var$toUSVString(val) { + return $87fd08d838e48741$var$hasToWellFormed ? `${val}`.toWellFormed() : $in2sP$nodeutil.toUSVString(val); +} +/** + * @param {string} val + */ // TODO: move this to webidl +function $87fd08d838e48741$var$isUSVString(val) { + return $87fd08d838e48741$var$hasIsWellFormed ? `${val}`.isWellFormed() : $87fd08d838e48741$var$toUSVString(val) === `${val}`; +} +/** + * @see https://tools.ietf.org/html/rfc7230#section-3.2.6 + * @param {number} c + */ function $87fd08d838e48741$var$isTokenCharCode(c) { + switch(c){ + case 0x22: + case 0x28: + case 0x29: + case 0x2c: + case 0x2f: + case 0x3a: + case 0x3b: + case 0x3c: + case 0x3d: + case 0x3e: + case 0x3f: + case 0x40: + case 0x5b: + case 0x5c: + case 0x5d: + case 0x7b: + case 0x7d: + // DQUOTE and "(),/:;<=>?@[\]{}" + return false; + default: + // VCHAR %x21-7E + return c >= 0x21 && c <= 0x7e; } - /** - * Needs to be called if keepAlive is set to true in request options. - */ dispose() { - if (this._agent) this._agent.destroy(); - this._disposed = true; +} +/** + * @param {string} characters + */ function $87fd08d838e48741$var$isValidHTTPToken(characters) { + if (characters.length === 0) return false; + for(let i = 0; i < characters.length; ++i){ + if (!$87fd08d838e48741$var$isTokenCharCode(characters.charCodeAt(i))) return false; } - /** - * Raw request. - * @param info - * @param data - */ requestRaw(info, data) { - return $d1ff1a76e22047b6$var$__awaiter(this, void 0, void 0, function*() { - return new Promise((resolve, reject)=>{ - function callbackForResult(err, res) { - if (err) reject(err); - else if (!res) // If `err` is not passed, then `res` must be passed. - reject(new Error("Unknown error")); - else resolve(res); - } - this.requestRawWithCallback(info, data, callbackForResult); - }); - }); + return true; +} +// headerCharRegex have been lifted from +// https://github.com/nodejs/node/blob/main/lib/_http_common.js +/** + * Matches if val contains an invalid field-vchar + * field-value = *( field-content / obs-fold ) + * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ] + * field-vchar = VCHAR / obs-text + */ const $87fd08d838e48741$var$headerCharRegex = /[^\t\x20-\x7e\x80-\xff]/; +/** + * @param {string} characters + */ function $87fd08d838e48741$var$isValidHeaderValue(characters) { + return !$87fd08d838e48741$var$headerCharRegex.test(characters); +} +// Parsed accordingly to RFC 9110 +// https://www.rfc-editor.org/rfc/rfc9110#field.content-range +function $87fd08d838e48741$var$parseRangeHeader(range) { + if (range == null || range === '') return { + start: 0, + end: null, + size: null + }; + const m = range ? range.match(/^bytes (\d+)-(\d+)\/(\d+)?$/) : null; + return m ? { + start: parseInt(m[1]), + end: m[2] ? parseInt(m[2]) : null, + size: m[3] ? parseInt(m[3]) : null + } : null; +} +function $87fd08d838e48741$var$addListener(obj, name, listener) { + const listeners = obj[$87fd08d838e48741$require$kListeners] ??= []; + listeners.push([ + name, + listener + ]); + obj.on(name, listener); + return obj; +} +function $87fd08d838e48741$var$removeAllListeners(obj) { + for (const [name, listener] of obj[$87fd08d838e48741$require$kListeners] ?? [])obj.removeListener(name, listener); + obj[$87fd08d838e48741$require$kListeners] = null; +} +function $87fd08d838e48741$var$errorRequest(client, request, err) { + try { + request.onError(err); + $in2sP$nodeassert(request.aborted); + } catch (err) { + client.emit('error', err); + } +} +const $87fd08d838e48741$var$kEnumerableProperty = Object.create(null); +$87fd08d838e48741$var$kEnumerableProperty.enumerable = true; +const $87fd08d838e48741$var$normalizedMethodRecordsBase = { + delete: 'DELETE', + DELETE: 'DELETE', + get: 'GET', + GET: 'GET', + head: 'HEAD', + HEAD: 'HEAD', + options: 'OPTIONS', + OPTIONS: 'OPTIONS', + post: 'POST', + POST: 'POST', + put: 'PUT', + PUT: 'PUT' +}; +const $87fd08d838e48741$var$normalizedMethodRecords = { + ...$87fd08d838e48741$var$normalizedMethodRecordsBase, + patch: 'patch', + PATCH: 'PATCH' +}; +// Note: object prototypes should not be able to be referenced. e.g. `Object#hasOwnProperty`. +Object.setPrototypeOf($87fd08d838e48741$var$normalizedMethodRecordsBase, null); +Object.setPrototypeOf($87fd08d838e48741$var$normalizedMethodRecords, null); +module.exports = { + kEnumerableProperty: $87fd08d838e48741$var$kEnumerableProperty, + nop: $87fd08d838e48741$var$nop, + isDisturbed: $87fd08d838e48741$var$isDisturbed, + isErrored: $87fd08d838e48741$var$isErrored, + isReadable: $87fd08d838e48741$var$isReadable, + toUSVString: $87fd08d838e48741$var$toUSVString, + isUSVString: $87fd08d838e48741$var$isUSVString, + isBlobLike: $87fd08d838e48741$var$isBlobLike, + parseOrigin: $87fd08d838e48741$var$parseOrigin, + parseURL: $87fd08d838e48741$var$parseURL, + getServerName: $87fd08d838e48741$var$getServerName, + isStream: $87fd08d838e48741$var$isStream, + isIterable: $87fd08d838e48741$var$isIterable, + isAsyncIterable: $87fd08d838e48741$var$isAsyncIterable, + isDestroyed: $87fd08d838e48741$var$isDestroyed, + headerNameToString: $87fd08d838e48741$var$headerNameToString, + bufferToLowerCasedHeaderName: $87fd08d838e48741$var$bufferToLowerCasedHeaderName, + addListener: $87fd08d838e48741$var$addListener, + removeAllListeners: $87fd08d838e48741$var$removeAllListeners, + errorRequest: $87fd08d838e48741$var$errorRequest, + parseRawHeaders: $87fd08d838e48741$var$parseRawHeaders, + parseHeaders: $87fd08d838e48741$var$parseHeaders, + parseKeepAliveTimeout: $87fd08d838e48741$var$parseKeepAliveTimeout, + destroy: $87fd08d838e48741$var$destroy, + bodyLength: $87fd08d838e48741$var$bodyLength, + deepClone: $87fd08d838e48741$var$deepClone, + ReadableStreamFrom: $87fd08d838e48741$var$ReadableStreamFrom, + isBuffer: $87fd08d838e48741$var$isBuffer, + validateHandler: $87fd08d838e48741$var$validateHandler, + getSocketInfo: $87fd08d838e48741$var$getSocketInfo, + isFormDataLike: $87fd08d838e48741$var$isFormDataLike, + buildURL: $87fd08d838e48741$var$buildURL, + addAbortListener: $87fd08d838e48741$var$addAbortListener, + isValidHTTPToken: $87fd08d838e48741$var$isValidHTTPToken, + isValidHeaderValue: $87fd08d838e48741$var$isValidHeaderValue, + isTokenCharCode: $87fd08d838e48741$var$isTokenCharCode, + parseRangeHeader: $87fd08d838e48741$var$parseRangeHeader, + normalizedMethodRecordsBase: $87fd08d838e48741$var$normalizedMethodRecordsBase, + normalizedMethodRecords: $87fd08d838e48741$var$normalizedMethodRecords, + isValidPort: $87fd08d838e48741$var$isValidPort, + isHttpOrHttpsPrefixed: $87fd08d838e48741$var$isHttpOrHttpsPrefixed, + nodeMajor: $87fd08d838e48741$var$nodeMajor, + nodeMinor: $87fd08d838e48741$var$nodeMinor, + safeHTTPMethods: [ + 'GET', + 'HEAD', + 'OPTIONS', + 'TRACE' + ], + wrapRequestBody: $87fd08d838e48741$var$wrapRequestBody +}; + +}); +parcelRegister("gTXXK", function(module, exports) { +'use strict'; +const $c4e04bb7316a1f65$var$kUndiciError = Symbol.for('undici.error.UND_ERR'); +class $c4e04bb7316a1f65$var$UndiciError extends Error { + constructor(message){ + super(message); + this.name = 'UndiciError'; + this.code = 'UND_ERR'; } - /** - * Raw request with callback. - * @param info - * @param data - * @param onResult - */ requestRawWithCallback(info, data, onResult) { - if (typeof data === "string") { - if (!info.options.headers) info.options.headers = {}; - info.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8"); - } - let callbackCalled = false; - function handleResult(err, res) { - if (!callbackCalled) { - callbackCalled = true; - onResult(err, res); - } - } - const req = info.httpModule.request(info.options, (msg)=>{ - const res = new $d1ff1a76e22047b6$var$HttpClientResponse(msg); - handleResult(undefined, res); - }); - let socket; - req.on("socket", (sock)=>{ - socket = sock; - }); - // If we ever get disconnected, we want the socket to timeout eventually - req.setTimeout(this._socketTimeout || 180000, ()=>{ - if (socket) socket.end(); - handleResult(new Error(`Request timeout: ${info.options.path}`)); - }); - req.on("error", function(err) { - // err has statusCode property - // res should have headers - handleResult(err); - }); - if (data && typeof data === "string") req.write(data, "utf8"); - if (data && typeof data !== "string") { - data.on("close", function() { - req.end(); - }); - data.pipe(req); - } else req.end(); + static [Symbol.hasInstance](instance) { + return instance && instance[$c4e04bb7316a1f65$var$kUndiciError] === true; } - /** - * Gets an http agent. This function is useful when you need an http agent that handles - * routing through a proxy server - depending upon the url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ getAgent(serverUrl) { - const parsedUrl = new URL(serverUrl); - return this._getAgent(parsedUrl); + [$c4e04bb7316a1f65$var$kUndiciError] = true; +} +const $c4e04bb7316a1f65$var$kConnectTimeoutError = Symbol.for('undici.error.UND_ERR_CONNECT_TIMEOUT'); +class $c4e04bb7316a1f65$var$ConnectTimeoutError extends $c4e04bb7316a1f65$var$UndiciError { + constructor(message){ + super(message); + this.name = 'ConnectTimeoutError'; + this.message = message || 'Connect Timeout Error'; + this.code = 'UND_ERR_CONNECT_TIMEOUT'; } - getAgentDispatcher(serverUrl) { - const parsedUrl = new URL(serverUrl); - const proxyUrl = $d1ff1a76e22047b6$var$pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (!useProxy) return; - return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); + static [Symbol.hasInstance](instance) { + return instance && instance[$c4e04bb7316a1f65$var$kConnectTimeoutError] === true; } - _prepareRequest(method, requestUrl, headers) { - const info = {}; - info.parsedUrl = requestUrl; - const usingSsl = info.parsedUrl.protocol === "https:"; - info.httpModule = usingSsl ? $d1ff1a76e22047b6$var$https : $d1ff1a76e22047b6$var$http; - const defaultPort = usingSsl ? 443 : 80; - info.options = {}; - info.options.host = info.parsedUrl.hostname; - info.options.port = info.parsedUrl.port ? parseInt(info.parsedUrl.port) : defaultPort; - info.options.path = (info.parsedUrl.pathname || "") + (info.parsedUrl.search || ""); - info.options.method = method; - info.options.headers = this._mergeHeaders(headers); - if (this.userAgent != null) info.options.headers["user-agent"] = this.userAgent; - info.options.agent = this._getAgent(info.parsedUrl); - // gives handlers an opportunity to participate - if (this.handlers) for (const handler of this.handlers)handler.prepareRequest(info.options); - return info; + [$c4e04bb7316a1f65$var$kConnectTimeoutError] = true; +} +const $c4e04bb7316a1f65$var$kHeadersTimeoutError = Symbol.for('undici.error.UND_ERR_HEADERS_TIMEOUT'); +class $c4e04bb7316a1f65$var$HeadersTimeoutError extends $c4e04bb7316a1f65$var$UndiciError { + constructor(message){ + super(message); + this.name = 'HeadersTimeoutError'; + this.message = message || 'Headers Timeout Error'; + this.code = 'UND_ERR_HEADERS_TIMEOUT'; } - _mergeHeaders(headers) { - if (this.requestOptions && this.requestOptions.headers) return Object.assign({}, $d1ff1a76e22047b6$var$lowercaseKeys(this.requestOptions.headers), $d1ff1a76e22047b6$var$lowercaseKeys(headers || {})); - return $d1ff1a76e22047b6$var$lowercaseKeys(headers || {}); + static [Symbol.hasInstance](instance) { + return instance && instance[$c4e04bb7316a1f65$var$kHeadersTimeoutError] === true; } - _getExistingOrDefaultHeader(additionalHeaders, header, _default) { - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) clientHeader = $d1ff1a76e22047b6$var$lowercaseKeys(this.requestOptions.headers)[header]; - return additionalHeaders[header] || clientHeader || _default; + [$c4e04bb7316a1f65$var$kHeadersTimeoutError] = true; +} +const $c4e04bb7316a1f65$var$kHeadersOverflowError = Symbol.for('undici.error.UND_ERR_HEADERS_OVERFLOW'); +class $c4e04bb7316a1f65$var$HeadersOverflowError extends $c4e04bb7316a1f65$var$UndiciError { + constructor(message){ + super(message); + this.name = 'HeadersOverflowError'; + this.message = message || 'Headers Overflow Error'; + this.code = 'UND_ERR_HEADERS_OVERFLOW'; } - _getAgent(parsedUrl) { - let agent; - const proxyUrl = $d1ff1a76e22047b6$var$pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (this._keepAlive && useProxy) agent = this._proxyAgent; - if (!useProxy) agent = this._agent; - // if agent is already assigned use that agent. - if (agent) return agent; - const usingSsl = parsedUrl.protocol === "https:"; - let maxSockets = 100; - if (this.requestOptions) maxSockets = this.requestOptions.maxSockets || $d1ff1a76e22047b6$var$http.globalAgent.maxSockets; - // This is `useProxy` again, but we need to check `proxyURl` directly for TypeScripts's flow analysis. - if (proxyUrl && proxyUrl.hostname) { - const agentOptions = { - maxSockets: maxSockets, - keepAlive: this._keepAlive, - proxy: Object.assign(Object.assign({}, (proxyUrl.username || proxyUrl.password) && { - proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` - }), { - host: proxyUrl.hostname, - port: proxyUrl.port - }) - }; - let tunnelAgent; - const overHttps = proxyUrl.protocol === "https:"; - if (usingSsl) tunnelAgent = overHttps ? $d1ff1a76e22047b6$var$tunnel.httpsOverHttps : $d1ff1a76e22047b6$var$tunnel.httpsOverHttp; - else tunnelAgent = overHttps ? $d1ff1a76e22047b6$var$tunnel.httpOverHttps : $d1ff1a76e22047b6$var$tunnel.httpOverHttp; - agent = tunnelAgent(agentOptions); - this._proxyAgent = agent; - } - // if tunneling agent isn't assigned create a new agent - if (!agent) { - const options = { - keepAlive: this._keepAlive, - maxSockets: maxSockets - }; - agent = usingSsl ? new $d1ff1a76e22047b6$var$https.Agent(options) : new $d1ff1a76e22047b6$var$http.Agent(options); - this._agent = agent; - } - if (usingSsl && this._ignoreSslError) // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process - // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options - // we have to cast it to any and change it directly - agent.options = Object.assign(agent.options || {}, { - rejectUnauthorized: false - }); - return agent; + static [Symbol.hasInstance](instance) { + return instance && instance[$c4e04bb7316a1f65$var$kHeadersOverflowError] === true; } - _getProxyAgentDispatcher(parsedUrl, proxyUrl) { - let proxyAgent; - if (this._keepAlive) proxyAgent = this._proxyAgentDispatcher; - // if agent is already assigned use that agent. - if (proxyAgent) return proxyAgent; - const usingSsl = parsedUrl.protocol === "https:"; - proxyAgent = new $gG0bg.ProxyAgent(Object.assign({ - uri: proxyUrl.href, - pipelining: !this._keepAlive ? 0 : 1 - }, (proxyUrl.username || proxyUrl.password) && { - token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString("base64")}` - })); - this._proxyAgentDispatcher = proxyAgent; - if (usingSsl && this._ignoreSslError) // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process - // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options - // we have to cast it to any and change it directly - proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, { - rejectUnauthorized: false - }); - return proxyAgent; + [$c4e04bb7316a1f65$var$kHeadersOverflowError] = true; +} +const $c4e04bb7316a1f65$var$kBodyTimeoutError = Symbol.for('undici.error.UND_ERR_BODY_TIMEOUT'); +class $c4e04bb7316a1f65$var$BodyTimeoutError extends $c4e04bb7316a1f65$var$UndiciError { + constructor(message){ + super(message); + this.name = 'BodyTimeoutError'; + this.message = message || 'Body Timeout Error'; + this.code = 'UND_ERR_BODY_TIMEOUT'; } - _performExponentialBackoff(retryNumber) { - return $d1ff1a76e22047b6$var$__awaiter(this, void 0, void 0, function*() { - retryNumber = Math.min($d1ff1a76e22047b6$var$ExponentialBackoffCeiling, retryNumber); - const ms = $d1ff1a76e22047b6$var$ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); - return new Promise((resolve)=>setTimeout(()=>resolve(), ms)); - }); + static [Symbol.hasInstance](instance) { + return instance && instance[$c4e04bb7316a1f65$var$kBodyTimeoutError] === true; } - _processResponse(res, options) { - return $d1ff1a76e22047b6$var$__awaiter(this, void 0, void 0, function*() { - return new Promise((resolve, reject)=>$d1ff1a76e22047b6$var$__awaiter(this, void 0, void 0, function*() { - const statusCode = res.message.statusCode || 0; - const response = { - statusCode: statusCode, - result: null, - headers: {} - }; - // not found leads to null obj returned - if (statusCode === $d1ff1a76e22047b6$var$HttpCodes.NotFound) resolve(response); - // get the result from the body - function dateTimeDeserializer(key, value) { - if (typeof value === "string") { - const a = new Date(value); - if (!isNaN(a.valueOf())) return a; - } - return value; - } - let obj; - let contents; - try { - contents = yield res.readBody(); - if (contents && contents.length > 0) { - if (options && options.deserializeDates) obj = JSON.parse(contents, dateTimeDeserializer); - else obj = JSON.parse(contents); - response.result = obj; - } - response.headers = res.message.headers; - } catch (err) { - // Invalid resource (contents not json); leaving result obj null - } - // note that 3xx redirects are handled by the http layer. - if (statusCode > 299) { - let msg; - // if exception/error in body, attempt to get better error - if (obj && obj.message) msg = obj.message; - else if (contents && contents.length > 0) // it may be the case that the exception is in the body message as string - msg = contents; - else msg = `Failed request: (${statusCode})`; - const err = new $d1ff1a76e22047b6$var$HttpClientError(msg, statusCode); - err.result = response.result; - reject(err); - } else resolve(response); - })); - }); + [$c4e04bb7316a1f65$var$kBodyTimeoutError] = true; +} +const $c4e04bb7316a1f65$var$kResponseStatusCodeError = Symbol.for('undici.error.UND_ERR_RESPONSE_STATUS_CODE'); +class $c4e04bb7316a1f65$var$ResponseStatusCodeError extends $c4e04bb7316a1f65$var$UndiciError { + constructor(message, statusCode, headers, body){ + super(message); + this.name = 'ResponseStatusCodeError'; + this.message = message || 'Response Status Code Error'; + this.code = 'UND_ERR_RESPONSE_STATUS_CODE'; + this.body = body; + this.status = statusCode; + this.statusCode = statusCode; + this.headers = headers; + } + static [Symbol.hasInstance](instance) { + return instance && instance[$c4e04bb7316a1f65$var$kResponseStatusCodeError] === true; } + [$c4e04bb7316a1f65$var$kResponseStatusCodeError] = true; } -module.exports.HttpClient = $d1ff1a76e22047b6$var$HttpClient; -const $d1ff1a76e22047b6$var$lowercaseKeys = (obj)=>Object.keys(obj).reduce((c, k)=>(c[k.toLowerCase()] = obj[k], c), {}); - -}); -parcelRegister("iWxXs", function(module, exports) { -"use strict"; -Object.defineProperty(module.exports, "__esModule", { - value: true -}); -module.exports.checkBypass = module.exports.getProxyUrl = void 0; -function $dca7fc25afcf9186$var$getProxyUrl(reqUrl) { - const usingSsl = reqUrl.protocol === "https:"; - if ($dca7fc25afcf9186$var$checkBypass(reqUrl)) return undefined; - const proxyVar = (()=>{ - if (usingSsl) return process.env["https_proxy"] || process.env["HTTPS_PROXY"]; - else return process.env["http_proxy"] || process.env["HTTP_PROXY"]; - })(); - if (proxyVar) try { - return new $dca7fc25afcf9186$var$DecodedURL(proxyVar); - } catch (_a) { - if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://")) return new $dca7fc25afcf9186$var$DecodedURL(`http://${proxyVar}`); +const $c4e04bb7316a1f65$var$kInvalidArgumentError = Symbol.for('undici.error.UND_ERR_INVALID_ARG'); +class $c4e04bb7316a1f65$var$InvalidArgumentError extends $c4e04bb7316a1f65$var$UndiciError { + constructor(message){ + super(message); + this.name = 'InvalidArgumentError'; + this.message = message || 'Invalid Argument Error'; + this.code = 'UND_ERR_INVALID_ARG'; } - else return undefined; + static [Symbol.hasInstance](instance) { + return instance && instance[$c4e04bb7316a1f65$var$kInvalidArgumentError] === true; + } + [$c4e04bb7316a1f65$var$kInvalidArgumentError] = true; } -module.exports.getProxyUrl = $dca7fc25afcf9186$var$getProxyUrl; -function $dca7fc25afcf9186$var$checkBypass(reqUrl) { - if (!reqUrl.hostname) return false; - const reqHost = reqUrl.hostname; - if ($dca7fc25afcf9186$var$isLoopbackAddress(reqHost)) return true; - const noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || ""; - if (!noProxy) return false; - // Determine the request port - let reqPort; - if (reqUrl.port) reqPort = Number(reqUrl.port); - else if (reqUrl.protocol === "http:") reqPort = 80; - else if (reqUrl.protocol === "https:") reqPort = 443; - // Format the request hostname and hostname with port - const upperReqHosts = [ - reqUrl.hostname.toUpperCase() - ]; - if (typeof reqPort === "number") upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); - // Compare request host against noproxy - for (const upperNoProxyItem of noProxy.split(",").map((x)=>x.trim().toUpperCase()).filter((x)=>x)){ - if (upperNoProxyItem === "*" || upperReqHosts.some((x)=>x === upperNoProxyItem || x.endsWith(`.${upperNoProxyItem}`) || upperNoProxyItem.startsWith(".") && x.endsWith(`${upperNoProxyItem}`))) return true; +const $c4e04bb7316a1f65$var$kInvalidReturnValueError = Symbol.for('undici.error.UND_ERR_INVALID_RETURN_VALUE'); +class $c4e04bb7316a1f65$var$InvalidReturnValueError extends $c4e04bb7316a1f65$var$UndiciError { + constructor(message){ + super(message); + this.name = 'InvalidReturnValueError'; + this.message = message || 'Invalid Return Value Error'; + this.code = 'UND_ERR_INVALID_RETURN_VALUE'; } - return false; + static [Symbol.hasInstance](instance) { + return instance && instance[$c4e04bb7316a1f65$var$kInvalidReturnValueError] === true; + } + [$c4e04bb7316a1f65$var$kInvalidReturnValueError] = true; } -module.exports.checkBypass = $dca7fc25afcf9186$var$checkBypass; -function $dca7fc25afcf9186$var$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]"); +const $c4e04bb7316a1f65$var$kAbortError = Symbol.for('undici.error.UND_ERR_ABORT'); +class $c4e04bb7316a1f65$var$AbortError extends $c4e04bb7316a1f65$var$UndiciError { + constructor(message){ + super(message); + this.name = 'AbortError'; + this.message = message || 'The operation was aborted'; + this.code = 'UND_ERR_ABORT'; + } + static [Symbol.hasInstance](instance) { + return instance && instance[$c4e04bb7316a1f65$var$kAbortError] === true; + } + [$c4e04bb7316a1f65$var$kAbortError] = true; } -class $dca7fc25afcf9186$var$DecodedURL extends URL { - constructor(url, base){ - super(url, base); - this._decodedUsername = decodeURIComponent(super.username); - this._decodedPassword = decodeURIComponent(super.password); +const $c4e04bb7316a1f65$var$kRequestAbortedError = Symbol.for('undici.error.UND_ERR_ABORTED'); +class $c4e04bb7316a1f65$var$RequestAbortedError extends $c4e04bb7316a1f65$var$AbortError { + constructor(message){ + super(message); + this.name = 'AbortError'; + this.message = message || 'Request aborted'; + this.code = 'UND_ERR_ABORTED'; } - get username() { - return this._decodedUsername; + static [Symbol.hasInstance](instance) { + return instance && instance[$c4e04bb7316a1f65$var$kRequestAbortedError] === true; } - get password() { - return this._decodedPassword; + [$c4e04bb7316a1f65$var$kRequestAbortedError] = true; +} +const $c4e04bb7316a1f65$var$kInformationalError = Symbol.for('undici.error.UND_ERR_INFO'); +class $c4e04bb7316a1f65$var$InformationalError extends $c4e04bb7316a1f65$var$UndiciError { + constructor(message){ + super(message); + this.name = 'InformationalError'; + this.message = message || 'Request information'; + this.code = 'UND_ERR_INFO'; + } + static [Symbol.hasInstance](instance) { + return instance && instance[$c4e04bb7316a1f65$var$kInformationalError] === true; + } + [$c4e04bb7316a1f65$var$kInformationalError] = true; +} +const $c4e04bb7316a1f65$var$kRequestContentLengthMismatchError = Symbol.for('undici.error.UND_ERR_REQ_CONTENT_LENGTH_MISMATCH'); +class $c4e04bb7316a1f65$var$RequestContentLengthMismatchError extends $c4e04bb7316a1f65$var$UndiciError { + constructor(message){ + super(message); + this.name = 'RequestContentLengthMismatchError'; + this.message = message || 'Request body length does not match content-length header'; + this.code = 'UND_ERR_REQ_CONTENT_LENGTH_MISMATCH'; + } + static [Symbol.hasInstance](instance) { + return instance && instance[$c4e04bb7316a1f65$var$kRequestContentLengthMismatchError] === true; + } + [$c4e04bb7316a1f65$var$kRequestContentLengthMismatchError] = true; +} +const $c4e04bb7316a1f65$var$kResponseContentLengthMismatchError = Symbol.for('undici.error.UND_ERR_RES_CONTENT_LENGTH_MISMATCH'); +class $c4e04bb7316a1f65$var$ResponseContentLengthMismatchError extends $c4e04bb7316a1f65$var$UndiciError { + constructor(message){ + super(message); + this.name = 'ResponseContentLengthMismatchError'; + this.message = message || 'Response body length does not match content-length header'; + this.code = 'UND_ERR_RES_CONTENT_LENGTH_MISMATCH'; + } + static [Symbol.hasInstance](instance) { + return instance && instance[$c4e04bb7316a1f65$var$kResponseContentLengthMismatchError] === true; + } + [$c4e04bb7316a1f65$var$kResponseContentLengthMismatchError] = true; +} +const $c4e04bb7316a1f65$var$kClientDestroyedError = Symbol.for('undici.error.UND_ERR_DESTROYED'); +class $c4e04bb7316a1f65$var$ClientDestroyedError extends $c4e04bb7316a1f65$var$UndiciError { + constructor(message){ + super(message); + this.name = 'ClientDestroyedError'; + this.message = message || 'The client is destroyed'; + this.code = 'UND_ERR_DESTROYED'; + } + static [Symbol.hasInstance](instance) { + return instance && instance[$c4e04bb7316a1f65$var$kClientDestroyedError] === true; + } + [$c4e04bb7316a1f65$var$kClientDestroyedError] = true; +} +const $c4e04bb7316a1f65$var$kClientClosedError = Symbol.for('undici.error.UND_ERR_CLOSED'); +class $c4e04bb7316a1f65$var$ClientClosedError extends $c4e04bb7316a1f65$var$UndiciError { + constructor(message){ + super(message); + this.name = 'ClientClosedError'; + this.message = message || 'The client is closed'; + this.code = 'UND_ERR_CLOSED'; + } + static [Symbol.hasInstance](instance) { + return instance && instance[$c4e04bb7316a1f65$var$kClientClosedError] === true; + } + [$c4e04bb7316a1f65$var$kClientClosedError] = true; +} +const $c4e04bb7316a1f65$var$kSocketError = Symbol.for('undici.error.UND_ERR_SOCKET'); +class $c4e04bb7316a1f65$var$SocketError extends $c4e04bb7316a1f65$var$UndiciError { + constructor(message, socket){ + super(message); + this.name = 'SocketError'; + this.message = message || 'Socket error'; + this.code = 'UND_ERR_SOCKET'; + this.socket = socket; + } + static [Symbol.hasInstance](instance) { + return instance && instance[$c4e04bb7316a1f65$var$kSocketError] === true; + } + [$c4e04bb7316a1f65$var$kSocketError] = true; +} +const $c4e04bb7316a1f65$var$kNotSupportedError = Symbol.for('undici.error.UND_ERR_NOT_SUPPORTED'); +class $c4e04bb7316a1f65$var$NotSupportedError extends $c4e04bb7316a1f65$var$UndiciError { + constructor(message){ + super(message); + this.name = 'NotSupportedError'; + this.message = message || 'Not supported error'; + this.code = 'UND_ERR_NOT_SUPPORTED'; + } + static [Symbol.hasInstance](instance) { + return instance && instance[$c4e04bb7316a1f65$var$kNotSupportedError] === true; + } + [$c4e04bb7316a1f65$var$kNotSupportedError] = true; +} +const $c4e04bb7316a1f65$var$kBalancedPoolMissingUpstreamError = Symbol.for('undici.error.UND_ERR_BPL_MISSING_UPSTREAM'); +class $c4e04bb7316a1f65$var$BalancedPoolMissingUpstreamError extends $c4e04bb7316a1f65$var$UndiciError { + constructor(message){ + super(message); + this.name = 'MissingUpstreamError'; + this.message = message || 'No upstream has been added to the BalancedPool'; + this.code = 'UND_ERR_BPL_MISSING_UPSTREAM'; + } + static [Symbol.hasInstance](instance) { + return instance && instance[$c4e04bb7316a1f65$var$kBalancedPoolMissingUpstreamError] === true; + } + [$c4e04bb7316a1f65$var$kBalancedPoolMissingUpstreamError] = true; +} +const $c4e04bb7316a1f65$var$kHTTPParserError = Symbol.for('undici.error.UND_ERR_HTTP_PARSER'); +class $c4e04bb7316a1f65$var$HTTPParserError extends Error { + constructor(message, code, data){ + super(message); + this.name = 'HTTPParserError'; + this.code = code ? `HPE_${code}` : undefined; + this.data = data ? data.toString() : undefined; + } + static [Symbol.hasInstance](instance) { + return instance && instance[$c4e04bb7316a1f65$var$kHTTPParserError] === true; + } + [$c4e04bb7316a1f65$var$kHTTPParserError] = true; +} +const $c4e04bb7316a1f65$var$kResponseExceededMaxSizeError = Symbol.for('undici.error.UND_ERR_RES_EXCEEDED_MAX_SIZE'); +class $c4e04bb7316a1f65$var$ResponseExceededMaxSizeError extends $c4e04bb7316a1f65$var$UndiciError { + constructor(message){ + super(message); + this.name = 'ResponseExceededMaxSizeError'; + this.message = message || 'Response content exceeded max size'; + this.code = 'UND_ERR_RES_EXCEEDED_MAX_SIZE'; + } + static [Symbol.hasInstance](instance) { + return instance && instance[$c4e04bb7316a1f65$var$kResponseExceededMaxSizeError] === true; + } + [$c4e04bb7316a1f65$var$kResponseExceededMaxSizeError] = true; +} +const $c4e04bb7316a1f65$var$kRequestRetryError = Symbol.for('undici.error.UND_ERR_REQ_RETRY'); +class $c4e04bb7316a1f65$var$RequestRetryError extends $c4e04bb7316a1f65$var$UndiciError { + constructor(message, code, { headers: headers, data: data }){ + super(message); + this.name = 'RequestRetryError'; + this.message = message || 'Request retry error'; + this.code = 'UND_ERR_REQ_RETRY'; + this.statusCode = code; + this.data = data; + this.headers = headers; + } + static [Symbol.hasInstance](instance) { + return instance && instance[$c4e04bb7316a1f65$var$kRequestRetryError] === true; } + [$c4e04bb7316a1f65$var$kRequestRetryError] = true; } +const $c4e04bb7316a1f65$var$kResponseError = Symbol.for('undici.error.UND_ERR_RESPONSE'); +class $c4e04bb7316a1f65$var$ResponseError extends $c4e04bb7316a1f65$var$UndiciError { + constructor(message, code, { headers: headers, data: data }){ + super(message); + this.name = 'ResponseError'; + this.message = message || 'Response error'; + this.code = 'UND_ERR_RESPONSE'; + this.statusCode = code; + this.data = data; + this.headers = headers; + } + static [Symbol.hasInstance](instance) { + return instance && instance[$c4e04bb7316a1f65$var$kResponseError] === true; + } + [$c4e04bb7316a1f65$var$kResponseError] = true; +} +const $c4e04bb7316a1f65$var$kSecureProxyConnectionError = Symbol.for('undici.error.UND_ERR_PRX_TLS'); +class $c4e04bb7316a1f65$var$SecureProxyConnectionError extends $c4e04bb7316a1f65$var$UndiciError { + constructor(cause, message, options){ + super(message, { + cause: cause, + ...options ?? {} + }); + this.name = 'SecureProxyConnectionError'; + this.message = message || 'Secure Proxy Connection failed'; + this.code = 'UND_ERR_PRX_TLS'; + this.cause = cause; + } + static [Symbol.hasInstance](instance) { + return instance && instance[$c4e04bb7316a1f65$var$kSecureProxyConnectionError] === true; + } + [$c4e04bb7316a1f65$var$kSecureProxyConnectionError] = true; +} +const $c4e04bb7316a1f65$var$kMessageSizeExceededError = Symbol.for('undici.error.UND_ERR_WS_MESSAGE_SIZE_EXCEEDED'); +class $c4e04bb7316a1f65$var$MessageSizeExceededError extends $c4e04bb7316a1f65$var$UndiciError { + constructor(message){ + super(message); + this.name = 'MessageSizeExceededError'; + this.message = message || 'Max decompressed message size exceeded'; + this.code = 'UND_ERR_WS_MESSAGE_SIZE_EXCEEDED'; + } + static [Symbol.hasInstance](instance) { + return instance && instance[$c4e04bb7316a1f65$var$kMessageSizeExceededError] === true; + } + get [$c4e04bb7316a1f65$var$kMessageSizeExceededError]() { + return true; + } +} +module.exports = { + AbortError: $c4e04bb7316a1f65$var$AbortError, + HTTPParserError: $c4e04bb7316a1f65$var$HTTPParserError, + UndiciError: $c4e04bb7316a1f65$var$UndiciError, + HeadersTimeoutError: $c4e04bb7316a1f65$var$HeadersTimeoutError, + HeadersOverflowError: $c4e04bb7316a1f65$var$HeadersOverflowError, + BodyTimeoutError: $c4e04bb7316a1f65$var$BodyTimeoutError, + RequestContentLengthMismatchError: $c4e04bb7316a1f65$var$RequestContentLengthMismatchError, + ConnectTimeoutError: $c4e04bb7316a1f65$var$ConnectTimeoutError, + ResponseStatusCodeError: $c4e04bb7316a1f65$var$ResponseStatusCodeError, + InvalidArgumentError: $c4e04bb7316a1f65$var$InvalidArgumentError, + InvalidReturnValueError: $c4e04bb7316a1f65$var$InvalidReturnValueError, + RequestAbortedError: $c4e04bb7316a1f65$var$RequestAbortedError, + ClientDestroyedError: $c4e04bb7316a1f65$var$ClientDestroyedError, + ClientClosedError: $c4e04bb7316a1f65$var$ClientClosedError, + InformationalError: $c4e04bb7316a1f65$var$InformationalError, + SocketError: $c4e04bb7316a1f65$var$SocketError, + NotSupportedError: $c4e04bb7316a1f65$var$NotSupportedError, + ResponseContentLengthMismatchError: $c4e04bb7316a1f65$var$ResponseContentLengthMismatchError, + BalancedPoolMissingUpstreamError: $c4e04bb7316a1f65$var$BalancedPoolMissingUpstreamError, + ResponseExceededMaxSizeError: $c4e04bb7316a1f65$var$ResponseExceededMaxSizeError, + RequestRetryError: $c4e04bb7316a1f65$var$RequestRetryError, + ResponseError: $c4e04bb7316a1f65$var$ResponseError, + SecureProxyConnectionError: $c4e04bb7316a1f65$var$SecureProxyConnectionError, + MessageSizeExceededError: $c4e04bb7316a1f65$var$MessageSizeExceededError +}; }); -parcelRegister("c8O5t", function(module, exports) { +parcelRegister("4xbXj", function(module, exports) { +'use strict'; +/** @type {Record} */ const $34d3849c7583273a$var$headerNameLowerCasedRecord = {}; +// https://developer.mozilla.org/docs/Web/HTTP/Headers +const $34d3849c7583273a$var$wellknownHeaderNames = [ + 'Accept', + 'Accept-Encoding', + 'Accept-Language', + 'Accept-Ranges', + 'Access-Control-Allow-Credentials', + 'Access-Control-Allow-Headers', + 'Access-Control-Allow-Methods', + 'Access-Control-Allow-Origin', + 'Access-Control-Expose-Headers', + 'Access-Control-Max-Age', + 'Access-Control-Request-Headers', + 'Access-Control-Request-Method', + 'Age', + 'Allow', + 'Alt-Svc', + 'Alt-Used', + 'Authorization', + 'Cache-Control', + 'Clear-Site-Data', + 'Connection', + 'Content-Disposition', + 'Content-Encoding', + 'Content-Language', + 'Content-Length', + 'Content-Location', + 'Content-Range', + 'Content-Security-Policy', + 'Content-Security-Policy-Report-Only', + 'Content-Type', + 'Cookie', + 'Cross-Origin-Embedder-Policy', + 'Cross-Origin-Opener-Policy', + 'Cross-Origin-Resource-Policy', + 'Date', + 'Device-Memory', + 'Downlink', + 'ECT', + 'ETag', + 'Expect', + 'Expect-CT', + 'Expires', + 'Forwarded', + 'From', + 'Host', + 'If-Match', + 'If-Modified-Since', + 'If-None-Match', + 'If-Range', + 'If-Unmodified-Since', + 'Keep-Alive', + 'Last-Modified', + 'Link', + 'Location', + 'Max-Forwards', + 'Origin', + 'Permissions-Policy', + 'Pragma', + 'Proxy-Authenticate', + 'Proxy-Authorization', + 'RTT', + 'Range', + 'Referer', + 'Referrer-Policy', + 'Refresh', + 'Retry-After', + 'Sec-WebSocket-Accept', + 'Sec-WebSocket-Extensions', + 'Sec-WebSocket-Key', + 'Sec-WebSocket-Protocol', + 'Sec-WebSocket-Version', + 'Server', + 'Server-Timing', + 'Service-Worker-Allowed', + 'Service-Worker-Navigation-Preload', + 'Set-Cookie', + 'SourceMap', + 'Strict-Transport-Security', + 'Supports-Loading-Mode', + 'TE', + 'Timing-Allow-Origin', + 'Trailer', + 'Transfer-Encoding', + 'Upgrade', + 'Upgrade-Insecure-Requests', + 'User-Agent', + 'Vary', + 'Via', + 'WWW-Authenticate', + 'X-Content-Type-Options', + 'X-DNS-Prefetch-Control', + 'X-Frame-Options', + 'X-Permitted-Cross-Domain-Policies', + 'X-Powered-By', + 'X-Requested-With', + 'X-XSS-Protection' +]; +for(let i = 0; i < $34d3849c7583273a$var$wellknownHeaderNames.length; ++i){ + const key = $34d3849c7583273a$var$wellknownHeaderNames[i]; + const lowerCasedKey = key.toLowerCase(); + $34d3849c7583273a$var$headerNameLowerCasedRecord[key] = $34d3849c7583273a$var$headerNameLowerCasedRecord[lowerCasedKey] = lowerCasedKey; +} +// Note: object prototypes should not be able to be referenced. e.g. `Object#hasOwnProperty`. +Object.setPrototypeOf($34d3849c7583273a$var$headerNameLowerCasedRecord, null); +module.exports = { + wellknownHeaderNames: $34d3849c7583273a$var$wellknownHeaderNames, + headerNameLowerCasedRecord: $34d3849c7583273a$var$headerNameLowerCasedRecord +}; + +}); -module.exports = (parcelRequire("aeWIr")); +parcelRegister("9tJ55", function(module, exports) { +'use strict'; + +var $4xbXj = parcelRequire("4xbXj"); +var $6e69caaa070b9536$require$wellknownHeaderNames = $4xbXj.wellknownHeaderNames; +var $6e69caaa070b9536$require$headerNameLowerCasedRecord = $4xbXj.headerNameLowerCasedRecord; +class $6e69caaa070b9536$var$TstNode { + /** @type {any} */ value = null; + /** @type {null | TstNode} */ left = null; + /** @type {null | TstNode} */ middle = null; + /** @type {null | TstNode} */ right = null; + /** @type {number} */ code; + /** + * @param {string} key + * @param {any} value + * @param {number} index + */ constructor(key, value, index){ + if (index === undefined || index >= key.length) throw new TypeError('Unreachable'); + const code = this.code = key.charCodeAt(index); + // check code is ascii string + if (code > 0x7F) throw new TypeError('key must be ascii string'); + if (key.length !== ++index) this.middle = new $6e69caaa070b9536$var$TstNode(key, value, index); + else this.value = value; + } + /** + * @param {string} key + * @param {any} value + */ add(key, value) { + const length = key.length; + if (length === 0) throw new TypeError('Unreachable'); + let index = 0; + let node = this; + while(true){ + const code = key.charCodeAt(index); + // check code is ascii string + if (code > 0x7F) throw new TypeError('key must be ascii string'); + if (node.code === code) { + if (length === ++index) { + node.value = value; + break; + } else if (node.middle !== null) node = node.middle; + else { + node.middle = new $6e69caaa070b9536$var$TstNode(key, value, index); + break; + } + } else if (node.code < code) { + if (node.left !== null) node = node.left; + else { + node.left = new $6e69caaa070b9536$var$TstNode(key, value, index); + break; + } + } else if (node.right !== null) node = node.right; + else { + node.right = new $6e69caaa070b9536$var$TstNode(key, value, index); + break; + } + } + } + /** + * @param {Uint8Array} key + * @return {TstNode | null} + */ search(key) { + const keylength = key.length; + let index = 0; + let node = this; + while(node !== null && index < keylength){ + let code = key[index]; + // A-Z + // First check if it is bigger than 0x5a. + // Lowercase letters have higher char codes than uppercase ones. + // Also we assume that headers will mostly contain lowercase characters. + if (code <= 0x5a && code >= 0x41) // Lowercase for uppercase. + code |= 32; + while(node !== null){ + if (code === node.code) { + if (keylength === ++index) // Returns Node since it is the last key. + return node; + node = node.middle; + break; + } + node = node.code < code ? node.left : node.right; + } + } + return null; + } +} +class $6e69caaa070b9536$var$TernarySearchTree { + /** @type {TstNode | null} */ node = null; + /** + * @param {string} key + * @param {any} value + * */ insert(key, value) { + if (this.node === null) this.node = new $6e69caaa070b9536$var$TstNode(key, value, 0); + else this.node.add(key, value); + } + /** + * @param {Uint8Array} key + * @return {any} + */ lookup(key) { + return this.node?.search(key)?.value ?? null; + } +} +const $6e69caaa070b9536$var$tree = new $6e69caaa070b9536$var$TernarySearchTree(); +for(let i = 0; i < $6e69caaa070b9536$require$wellknownHeaderNames.length; ++i){ + const key = $6e69caaa070b9536$require$headerNameLowerCasedRecord[$6e69caaa070b9536$require$wellknownHeaderNames[i]]; + $6e69caaa070b9536$var$tree.insert(key, key); +} +module.exports = { + TernarySearchTree: $6e69caaa070b9536$var$TernarySearchTree, + tree: $6e69caaa070b9536$var$tree +}; }); -parcelRegister("aeWIr", function(module, exports) { - -$parcel$export(module.exports, "httpOverHttp", () => $7748c1ea21286729$export$25cbd437c61a3835, (v) => $7748c1ea21286729$export$25cbd437c61a3835 = v); -$parcel$export(module.exports, "httpsOverHttp", () => $7748c1ea21286729$export$c06e3df7111bae43, (v) => $7748c1ea21286729$export$c06e3df7111bae43 = v); -$parcel$export(module.exports, "httpOverHttps", () => $7748c1ea21286729$export$5d50e36ef656139f, (v) => $7748c1ea21286729$export$5d50e36ef656139f = v); -$parcel$export(module.exports, "httpsOverHttps", () => $7748c1ea21286729$export$212d6605025321cc, (v) => $7748c1ea21286729$export$212d6605025321cc = v); -$parcel$export(module.exports, "debug", () => $7748c1ea21286729$export$1c9f709888824e05, (v) => $7748c1ea21286729$export$1c9f709888824e05 = v); -var $7748c1ea21286729$export$25cbd437c61a3835; -var $7748c1ea21286729$export$c06e3df7111bae43; -var $7748c1ea21286729$export$5d50e36ef656139f; -var $7748c1ea21286729$export$212d6605025321cc; -var $7748c1ea21286729$export$1c9f709888824e05; -"use strict"; +parcelRegister("7z0I9", function(module, exports) { +'use strict'; +var $581c5a7a077d7ca7$require$Transform = $in2sP$nodestream.Transform; +var $4nb4n = parcelRequire("4nb4n"); +var $581c5a7a077d7ca7$require$redirectStatusSet = $4nb4n.redirectStatusSet; +var $581c5a7a077d7ca7$require$referrerPolicyTokens = $4nb4n.referrerPolicySet; +var $581c5a7a077d7ca7$require$badPortsSet = $4nb4n.badPortsSet; +var $8Dg7Y = parcelRequire("8Dg7Y"); +var $581c5a7a077d7ca7$require$getGlobalOrigin = $8Dg7Y.getGlobalOrigin; -$7748c1ea21286729$export$25cbd437c61a3835 = $7748c1ea21286729$var$httpOverHttp; -$7748c1ea21286729$export$c06e3df7111bae43 = $7748c1ea21286729$var$httpsOverHttp; -$7748c1ea21286729$export$5d50e36ef656139f = $7748c1ea21286729$var$httpOverHttps; -$7748c1ea21286729$export$212d6605025321cc = $7748c1ea21286729$var$httpsOverHttps; -function $7748c1ea21286729$var$httpOverHttp(options) { - var agent = new $7748c1ea21286729$var$TunnelingAgent(options); - agent.request = $g40fK$http.request; - return agent; +var $30IsM = parcelRequire("30IsM"); +var $581c5a7a077d7ca7$require$collectASequenceOfCodePoints = $30IsM.collectASequenceOfCodePoints; +var $581c5a7a077d7ca7$require$collectAnHTTPQuotedString = $30IsM.collectAnHTTPQuotedString; +var $581c5a7a077d7ca7$require$removeChars = $30IsM.removeChars; +var $581c5a7a077d7ca7$require$parseMIMEType = $30IsM.parseMIMEType; + +var $581c5a7a077d7ca7$require$performance = $in2sP$nodeperf_hooks.performance; + +var $bFRvW = parcelRequire("bFRvW"); +var $581c5a7a077d7ca7$require$isBlobLike = $bFRvW.isBlobLike; +var $581c5a7a077d7ca7$require$ReadableStreamFrom = $bFRvW.ReadableStreamFrom; +var $581c5a7a077d7ca7$require$isValidHTTPToken = $bFRvW.isValidHTTPToken; +var $581c5a7a077d7ca7$require$normalizedMethodRecordsBase = $bFRvW.normalizedMethodRecordsBase; + + +var $581c5a7a077d7ca7$require$isUint8Array = $in2sP$nodeutiltypes.isUint8Array; + +var $5HTG7 = parcelRequire("5HTG7"); +var $581c5a7a077d7ca7$require$webidl = $5HTG7.webidl; +let $581c5a7a077d7ca7$var$supportedHashes = []; +// https://nodejs.org/api/crypto.html#determining-if-crypto-support-is-unavailable +/** @type {import('crypto')} */ let $581c5a7a077d7ca7$var$crypto; + +try { + $581c5a7a077d7ca7$var$crypto = $581c5a7a077d7ca7$import$2e3636f386c8cf66; + const possibleRelevantHashes = [ + 'sha256', + 'sha384', + 'sha512' + ]; + $581c5a7a077d7ca7$var$supportedHashes = $581c5a7a077d7ca7$var$crypto.getHashes().filter((hash)=>possibleRelevantHashes.includes(hash)); +/* c8 ignore next 3 */ } catch {} +function $581c5a7a077d7ca7$var$responseURL(response) { + // https://fetch.spec.whatwg.org/#responses + // A response has an associated URL. It is a pointer to the last URL + // in response’s URL list and null if response’s URL list is empty. + const urlList = response.urlList; + const length = urlList.length; + return length === 0 ? null : urlList[length - 1].toString(); } -function $7748c1ea21286729$var$httpsOverHttp(options) { - var agent = new $7748c1ea21286729$var$TunnelingAgent(options); - agent.request = $g40fK$http.request; - agent.createSocket = $7748c1ea21286729$var$createSecureSocket; - agent.defaultPort = 443; - return agent; +// https://fetch.spec.whatwg.org/#concept-response-location-url +function $581c5a7a077d7ca7$var$responseLocationURL(response, requestFragment) { + // 1. If response’s status is not a redirect status, then return null. + if (!$581c5a7a077d7ca7$require$redirectStatusSet.has(response.status)) return null; + // 2. Let location be the result of extracting header list values given + // `Location` and response’s header list. + let location = response.headersList.get('location', true); + // 3. If location is a header value, then set location to the result of + // parsing location with response’s URL. + if (location !== null && $581c5a7a077d7ca7$var$isValidHeaderValue(location)) { + if (!$581c5a7a077d7ca7$var$isValidEncodedURL(location)) // Some websites respond location header in UTF-8 form without encoding them as ASCII + // and major browsers redirect them to correctly UTF-8 encoded addresses. + // Here, we handle that behavior in the same way. + location = $581c5a7a077d7ca7$var$normalizeBinaryStringToUtf8(location); + location = new URL(location, $581c5a7a077d7ca7$var$responseURL(response)); + } + // 4. If location is a URL whose fragment is null, then set location’s + // fragment to requestFragment. + if (location && !location.hash) location.hash = requestFragment; + // 5. Return location. + return location; } -function $7748c1ea21286729$var$httpOverHttps(options) { - var agent = new $7748c1ea21286729$var$TunnelingAgent(options); - agent.request = $g40fK$https.request; - return agent; +/** + * @see https://www.rfc-editor.org/rfc/rfc1738#section-2.2 + * @param {string} url + * @returns {boolean} + */ function $581c5a7a077d7ca7$var$isValidEncodedURL(url) { + for(let i = 0; i < url.length; ++i){ + const code = url.charCodeAt(i); + if (code > 0x7E || // Non-US-ASCII + DEL + code < 0x20 // Control characters NUL - US + ) return false; + } + return true; } -function $7748c1ea21286729$var$httpsOverHttps(options) { - var agent = new $7748c1ea21286729$var$TunnelingAgent(options); - agent.request = $g40fK$https.request; - agent.createSocket = $7748c1ea21286729$var$createSecureSocket; - agent.defaultPort = 443; - return agent; +/** + * If string contains non-ASCII characters, assumes it's UTF-8 encoded and decodes it. + * Since UTF-8 is a superset of ASCII, this will work for ASCII strings as well. + * @param {string} value + * @returns {string} + */ function $581c5a7a077d7ca7$var$normalizeBinaryStringToUtf8(value) { + return Buffer.from(value, 'binary').toString('utf8'); } -function $7748c1ea21286729$var$TunnelingAgent(options) { - var self = this; - self.options = options || {}; - self.proxyOptions = self.options.proxy || {}; - self.maxSockets = self.options.maxSockets || $g40fK$http.Agent.defaultMaxSockets; - self.requests = []; - self.sockets = []; - self.on("free", function onFree(socket, host, port, localAddress) { - var options = $7748c1ea21286729$var$toOptions(host, port, localAddress); - for(var i = 0, len = self.requests.length; i < len; ++i){ - var pending = self.requests[i]; - if (pending.host === options.host && pending.port === options.port) { - // Detect the request to connect same origin server, - // reuse the connection. - self.requests.splice(i, 1); - pending.request.onSocket(socket); - return; - } - } - socket.destroy(); - self.removeSocket(socket); - }); +/** @returns {URL} */ function $581c5a7a077d7ca7$var$requestCurrentURL(request) { + return request.urlList[request.urlList.length - 1]; } -$g40fK$util.inherits($7748c1ea21286729$var$TunnelingAgent, $g40fK$events.EventEmitter); -$7748c1ea21286729$var$TunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) { - var self = this; - var options = $7748c1ea21286729$var$mergeOptions({ - request: req - }, self.options, $7748c1ea21286729$var$toOptions(host, port, localAddress)); - if (self.sockets.length >= this.maxSockets) { - // We are over limit so we'll add it to the queue. - self.requests.push(options); - return; +function $581c5a7a077d7ca7$var$requestBadPort(request) { + // 1. Let url be request’s current URL. + const url = $581c5a7a077d7ca7$var$requestCurrentURL(request); + // 2. If url’s scheme is an HTTP(S) scheme and url’s port is a bad port, + // then return blocked. + if ($581c5a7a077d7ca7$var$urlIsHttpHttpsScheme(url) && $581c5a7a077d7ca7$require$badPortsSet.has(url.port)) return 'blocked'; + // 3. Return allowed. + return 'allowed'; +} +function $581c5a7a077d7ca7$var$isErrorLike(object) { + return object instanceof Error || object?.constructor?.name === 'Error' || object?.constructor?.name === 'DOMException'; +} +// Check whether |statusText| is a ByteString and +// matches the Reason-Phrase token production. +// RFC 2616: https://tools.ietf.org/html/rfc2616 +// RFC 7230: https://tools.ietf.org/html/rfc7230 +// "reason-phrase = *( HTAB / SP / VCHAR / obs-text )" +// https://github.com/chromium/chromium/blob/94.0.4604.1/third_party/blink/renderer/core/fetch/response.cc#L116 +function $581c5a7a077d7ca7$var$isValidReasonPhrase(statusText) { + for(let i = 0; i < statusText.length; ++i){ + const c = statusText.charCodeAt(i); + if (!(c === 0x09 || // HTAB + c >= 0x20 && c <= 0x7e || // SP / VCHAR + c >= 0x80 && c <= 0xff // obs-text + )) return false; } - // If we are under maxSockets create a new one. - self.createSocket(options, function(socket) { - socket.on("free", onFree); - socket.on("close", onCloseOrRemove); - socket.on("agentRemove", onCloseOrRemove); - req.onSocket(socket); - function onFree() { - self.emit("free", socket, options); - } - function onCloseOrRemove(err) { - self.removeSocket(socket); - socket.removeListener("free", onFree); - socket.removeListener("close", onCloseOrRemove); - socket.removeListener("agentRemove", onCloseOrRemove); - } - }); -}; -$7748c1ea21286729$var$TunnelingAgent.prototype.createSocket = function createSocket(options, cb) { - var self = this; - var placeholder = {}; - self.sockets.push(placeholder); - var connectOptions = $7748c1ea21286729$var$mergeOptions({}, self.proxyOptions, { - method: "CONNECT", - path: options.host + ":" + options.port, - agent: false, - headers: { - host: options.host + ":" + options.port + return true; +} +/** + * @see https://fetch.spec.whatwg.org/#header-name + * @param {string} potentialValue + */ const $581c5a7a077d7ca7$var$isValidHeaderName = $581c5a7a077d7ca7$require$isValidHTTPToken; +/** + * @see https://fetch.spec.whatwg.org/#header-value + * @param {string} potentialValue + */ function $581c5a7a077d7ca7$var$isValidHeaderValue(potentialValue) { + // - Has no leading or trailing HTTP tab or space bytes. + // - Contains no 0x00 (NUL) or HTTP newline bytes. + return (potentialValue[0] === '\t' || potentialValue[0] === ' ' || potentialValue[potentialValue.length - 1] === '\t' || potentialValue[potentialValue.length - 1] === ' ' || potentialValue.includes('\n') || potentialValue.includes('\r') || potentialValue.includes('\0')) === false; +} +// https://w3c.github.io/webappsec-referrer-policy/#set-requests-referrer-policy-on-redirect +function $581c5a7a077d7ca7$var$setRequestReferrerPolicyOnRedirect(request, actualResponse) { + // Given a request request and a response actualResponse, this algorithm + // updates request’s referrer policy according to the Referrer-Policy + // header (if any) in actualResponse. + // 1. Let policy be the result of executing § 8.1 Parse a referrer policy + // from a Referrer-Policy header on actualResponse. + // 8.1 Parse a referrer policy from a Referrer-Policy header + // 1. Let policy-tokens be the result of extracting header list values given `Referrer-Policy` and response’s header list. + const { headersList: headersList } = actualResponse; + // 2. Let policy be the empty string. + // 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. + // 4. Return policy. + const policyHeader = (headersList.get('referrer-policy', true) ?? '').split(','); + // Note: As the referrer-policy can contain multiple policies + // separated by comma, we need to loop through all of them + // and pick the first valid one. + // Ref: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy#specify_a_fallback_policy + let policy = ''; + if (policyHeader.length > 0) // The right-most policy takes precedence. + // The left-most policy is the fallback. + for(let i = policyHeader.length; i !== 0; i--){ + const token = policyHeader[i - 1].trim(); + if ($581c5a7a077d7ca7$require$referrerPolicyTokens.has(token)) { + policy = token; + break; } - }); - if (options.localAddress) connectOptions.localAddress = options.localAddress; - if (connectOptions.proxyAuth) { - connectOptions.headers = connectOptions.headers || {}; - connectOptions.headers["Proxy-Authorization"] = "Basic " + new Buffer(connectOptions.proxyAuth).toString("base64"); - } - $7748c1ea21286729$var$debug("making CONNECT request"); - var connectReq = self.request(connectOptions); - connectReq.useChunkedEncodingByDefault = false; // for v0.6 - connectReq.once("response", onResponse); // for v0.6 - connectReq.once("upgrade", onUpgrade); // for v0.6 - connectReq.once("connect", onConnect); // for v0.7 or later - connectReq.once("error", onError); - connectReq.end(); - function onResponse(res) { - // Very hacky. This is necessary to avoid http-parser leaks. - res.upgrade = true; - } - function onUpgrade(res, socket, head) { - // Hacky. - process.nextTick(function() { - onConnect(res, socket, head); - }); } - function onConnect(res, socket, head) { - connectReq.removeAllListeners(); - socket.removeAllListeners(); - if (res.statusCode !== 200) { - $7748c1ea21286729$var$debug("tunneling socket could not be established, statusCode=%d", res.statusCode); - socket.destroy(); - var error = new Error("tunneling socket could not be established, statusCode=" + res.statusCode); - error.code = "ECONNRESET"; - options.request.emit("error", error); - self.removeSocket(placeholder); - return; - } - if (head.length > 0) { - $7748c1ea21286729$var$debug("got illegal response body from proxy"); - socket.destroy(); - var error = new Error("got illegal response body from proxy"); - error.code = "ECONNRESET"; - options.request.emit("error", error); - self.removeSocket(placeholder); - return; + // 2. If policy is not the empty string, then set request’s referrer policy to policy. + if (policy !== '') request.referrerPolicy = policy; +} +// https://fetch.spec.whatwg.org/#cross-origin-resource-policy-check +function $581c5a7a077d7ca7$var$crossOriginResourcePolicyCheck() { + // TODO + return 'allowed'; +} +// https://fetch.spec.whatwg.org/#concept-cors-check +function $581c5a7a077d7ca7$var$corsCheck() { + // TODO + return 'success'; +} +// https://fetch.spec.whatwg.org/#concept-tao-check +function $581c5a7a077d7ca7$var$TAOCheck() { + // TODO + return 'success'; +} +function $581c5a7a077d7ca7$var$appendFetchMetadata(httpRequest) { + // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-dest-header + // TODO + // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-mode-header + // 1. Assert: r’s url is a potentially trustworthy URL. + // TODO + // 2. Let header be a Structured Header whose value is a token. + let header = null; + // 3. Set header’s value to r’s mode. + header = httpRequest.mode; + // 4. Set a structured field value `Sec-Fetch-Mode`/header in r’s header list. + httpRequest.headersList.set('sec-fetch-mode', header, true); +// https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-site-header +// TODO +// https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-user-header +// TODO +} +// https://fetch.spec.whatwg.org/#append-a-request-origin-header +function $581c5a7a077d7ca7$var$appendRequestOriginHeader(request) { + // 1. Let serializedOrigin be the result of byte-serializing a request origin + // with request. + // TODO: implement "byte-serializing a request origin" + let serializedOrigin = request.origin; + // - "'client' is changed to an origin during fetching." + // This doesn't happen in undici (in most cases) because undici, by default, + // has no concept of origin. + // - request.origin can also be set to request.client.origin (client being + // an environment settings object), which is undefined without using + // setGlobalOrigin. + if (serializedOrigin === 'client' || serializedOrigin === undefined) return; + // 2. If request’s response tainting is "cors" or request’s mode is "websocket", + // then append (`Origin`, serializedOrigin) to request’s header list. + // 3. Otherwise, if request’s method is neither `GET` nor `HEAD`, then: + if (request.responseTainting === 'cors' || request.mode === 'websocket') request.headersList.append('origin', serializedOrigin, true); + else if (request.method !== 'GET' && request.method !== 'HEAD') { + // 1. Switch on request’s referrer policy: + switch(request.referrerPolicy){ + case 'no-referrer': + // Set serializedOrigin to `null`. + serializedOrigin = null; + break; + case 'no-referrer-when-downgrade': + case 'strict-origin': + case 'strict-origin-when-cross-origin': + // If request’s origin is a tuple origin, its scheme is "https", and + // request’s current URL’s scheme is not "https", then set + // serializedOrigin to `null`. + if (request.origin && $581c5a7a077d7ca7$var$urlHasHttpsScheme(request.origin) && !$581c5a7a077d7ca7$var$urlHasHttpsScheme($581c5a7a077d7ca7$var$requestCurrentURL(request))) serializedOrigin = null; + break; + case 'same-origin': + // If request’s origin is not same origin with request’s current URL’s + // origin, then set serializedOrigin to `null`. + if (!$581c5a7a077d7ca7$var$sameOrigin(request, $581c5a7a077d7ca7$var$requestCurrentURL(request))) serializedOrigin = null; + break; + default: } - $7748c1ea21286729$var$debug("tunneling connection has established"); - self.sockets[self.sockets.indexOf(placeholder)] = socket; - return cb(socket); - } - function onError(cause) { - connectReq.removeAllListeners(); - $7748c1ea21286729$var$debug("tunneling socket could not be established, cause=%s\n", cause.message, cause.stack); - var error = new Error("tunneling socket could not be established, cause=" + cause.message); - error.code = "ECONNRESET"; - options.request.emit("error", error); - self.removeSocket(placeholder); + // 2. Append (`Origin`, serializedOrigin) to request’s header list. + request.headersList.append('origin', serializedOrigin, true); } -}; -$7748c1ea21286729$var$TunnelingAgent.prototype.removeSocket = function removeSocket(socket) { - var pos = this.sockets.indexOf(socket); - if (pos === -1) return; - this.sockets.splice(pos, 1); - var pending = this.requests.shift(); - if (pending) // If we have pending requests and a socket gets closed a new one - // needs to be created to take over in the pool for the one that closed. - this.createSocket(pending, function(socket) { - pending.request.onSocket(socket); - }); -}; -function $7748c1ea21286729$var$createSecureSocket(options, cb) { - var self = this; - $7748c1ea21286729$var$TunnelingAgent.prototype.createSocket.call(self, options, function(socket) { - var hostHeader = options.request.getHeader("host"); - var tlsOptions = $7748c1ea21286729$var$mergeOptions({}, self.options, { - socket: socket, - servername: hostHeader ? hostHeader.replace(/:.*$/, "") : options.host - }); - // 0 is dummy port for v0.6 - var secureSocket = $g40fK$tls.connect(0, tlsOptions); - self.sockets[self.sockets.indexOf(socket)] = secureSocket; - cb(secureSocket); - }); } -function $7748c1ea21286729$var$toOptions(host, port, localAddress) { - if (typeof host === "string") return { - host: host, - port: port, - localAddress: localAddress +// https://w3c.github.io/hr-time/#dfn-coarsen-time +function $581c5a7a077d7ca7$var$coarsenTime(timestamp, crossOriginIsolatedCapability) { + // TODO + return timestamp; +} +// https://fetch.spec.whatwg.org/#clamp-and-coarsen-connection-timing-info +function $581c5a7a077d7ca7$var$clampAndCoarsenConnectionTimingInfo(connectionTimingInfo, defaultStartTime, crossOriginIsolatedCapability) { + if (!connectionTimingInfo?.startTime || connectionTimingInfo.startTime < defaultStartTime) return { + domainLookupStartTime: defaultStartTime, + domainLookupEndTime: defaultStartTime, + connectionStartTime: defaultStartTime, + connectionEndTime: defaultStartTime, + secureConnectionStartTime: defaultStartTime, + ALPNNegotiatedProtocol: connectionTimingInfo?.ALPNNegotiatedProtocol + }; + return { + domainLookupStartTime: $581c5a7a077d7ca7$var$coarsenTime(connectionTimingInfo.domainLookupStartTime, crossOriginIsolatedCapability), + domainLookupEndTime: $581c5a7a077d7ca7$var$coarsenTime(connectionTimingInfo.domainLookupEndTime, crossOriginIsolatedCapability), + connectionStartTime: $581c5a7a077d7ca7$var$coarsenTime(connectionTimingInfo.connectionStartTime, crossOriginIsolatedCapability), + connectionEndTime: $581c5a7a077d7ca7$var$coarsenTime(connectionTimingInfo.connectionEndTime, crossOriginIsolatedCapability), + secureConnectionStartTime: $581c5a7a077d7ca7$var$coarsenTime(connectionTimingInfo.secureConnectionStartTime, crossOriginIsolatedCapability), + ALPNNegotiatedProtocol: connectionTimingInfo.ALPNNegotiatedProtocol }; - return host; // for v0.11 or later } -function $7748c1ea21286729$var$mergeOptions(target) { - for(var i = 1, len = arguments.length; i < len; ++i){ - var overrides = arguments[i]; - if (typeof overrides === "object") { - var keys = Object.keys(overrides); - for(var j = 0, keyLen = keys.length; j < keyLen; ++j){ - var k = keys[j]; - if (overrides[k] !== undefined) target[k] = overrides[k]; - } - } - } - return target; +// https://w3c.github.io/hr-time/#dfn-coarsened-shared-current-time +function $581c5a7a077d7ca7$var$coarsenedSharedCurrentTime(crossOriginIsolatedCapability) { + return $581c5a7a077d7ca7$var$coarsenTime($581c5a7a077d7ca7$require$performance.now(), crossOriginIsolatedCapability); } -var $7748c1ea21286729$var$debug; -if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) $7748c1ea21286729$var$debug = function() { - var args = Array.prototype.slice.call(arguments); - if (typeof args[0] === "string") args[0] = "TUNNEL: " + args[0]; - else args.unshift("TUNNEL:"); - console.error.apply(console, args); -}; -else $7748c1ea21286729$var$debug = function() {}; -$7748c1ea21286729$export$1c9f709888824e05 = $7748c1ea21286729$var$debug; // for test - -}); - - -parcelRegister("gG0bg", function(module, exports) { - -$parcel$export(module.exports, "ProxyAgent", () => $c240b574fe3d4654$export$6f9e642c23f9615d, (v) => $c240b574fe3d4654$export$6f9e642c23f9615d = v); -$parcel$export(module.exports, "fetch", () => $c240b574fe3d4654$export$e7aa7bc5c1b3cfb3, (v) => $c240b574fe3d4654$export$e7aa7bc5c1b3cfb3 = v); -var $c240b574fe3d4654$export$ab054a1ef92eeb01; -var $c240b574fe3d4654$export$1f2bb630327ac4b6; -var $c240b574fe3d4654$export$14963ee5c8637e11; -var $c240b574fe3d4654$export$3ea9790e91014eeb; -var $c240b574fe3d4654$export$f05c48a4001d5356; -var $c240b574fe3d4654$export$6f9e642c23f9615d; -var $c240b574fe3d4654$export$cfbc337f7857f27a; -var $c240b574fe3d4654$export$c3def51f5c0b7771; -var $c240b574fe3d4654$export$9af91951fcedc08c; -var $c240b574fe3d4654$export$e56ca57b32a6e9c7; -var $c240b574fe3d4654$export$ebbe0f536b18196e; -var $c240b574fe3d4654$export$30f3b02011db23c0; -var $c240b574fe3d4654$export$ea76ac48857e9378; -var $c240b574fe3d4654$export$6f0c702cbe7d6ed8; -var $c240b574fe3d4654$export$e7aa7bc5c1b3cfb3; -var $c240b574fe3d4654$export$79b704688b15c0f4; -var $c240b574fe3d4654$export$9f633d56d7ec90d3; -var $c240b574fe3d4654$export$7fa6c5b6f8193917; -var $c240b574fe3d4654$export$3963aa24c930693c; -var $c240b574fe3d4654$export$b6afa8811b7e644e; -var $c240b574fe3d4654$export$3c8f13373e08d457; -var $c240b574fe3d4654$export$79f8e34925aa870f; -var $c240b574fe3d4654$export$4b73629724933f6e; -// Cache & CacheStorage are tightly coupled with fetch. Even if it may run -// in an older version of Node, it doesn't have any use without fetch. -var $c240b574fe3d4654$export$50ac77867c9f1e40; -var $c240b574fe3d4654$export$b43e45590305ffaa; -var $c240b574fe3d4654$export$f3eb5caaef7b2b34; -var $c240b574fe3d4654$export$14dd963aa71ac36d; -var $c240b574fe3d4654$export$110700823644f4a6; -var $c240b574fe3d4654$export$85e6adb445fa3ef0; -var $c240b574fe3d4654$export$b00e4516a48bbc61; -var $c240b574fe3d4654$export$3909fb301d3dc8c9; -var $c240b574fe3d4654$export$b5fe3f66a567bec0; -var $c240b574fe3d4654$export$4938110305e6185f; -var $c240b574fe3d4654$export$43f28b24e1eb8181; -var $c240b574fe3d4654$export$64605811ab45167f; -var $c240b574fe3d4654$export$ba387509dbaf942e; -var $c240b574fe3d4654$export$8ff68bc3613e0197; -var $c240b574fe3d4654$export$e3431e6e5e89c327; -var $c240b574fe3d4654$export$44e9728040f17046; -var $c240b574fe3d4654$export$7219863409fc71b7; -"use strict"; - -var $dQprK = parcelRequire("dQprK"); - -var $kRVHu = parcelRequire("kRVHu"); - -var $cKdp7 = parcelRequire("cKdp7"); - -var $jIWP2 = parcelRequire("jIWP2"); - -var $lSq1i = parcelRequire("lSq1i"); - -var $3zvEP = parcelRequire("3zvEP"); - -var $gv2nV = parcelRequire("gv2nV"); -const { InvalidArgumentError: $c240b574fe3d4654$var$InvalidArgumentError } = $cKdp7; - -var $iZi4O = parcelRequire("iZi4O"); - -var $h3cex = parcelRequire("h3cex"); - -var $7FGTp = parcelRequire("7FGTp"); - -var $g8veH = parcelRequire("g8veH"); - -var $1OZd4 = parcelRequire("1OZd4"); - -var $6iUQ3 = parcelRequire("6iUQ3"); - -var $2hsMF = parcelRequire("2hsMF"); - -var $hQ6kK = parcelRequire("hQ6kK"); - -var $gvOkt = parcelRequire("gvOkt"); -var $c240b574fe3d4654$require$getGlobalDispatcher = $gvOkt.getGlobalDispatcher; -var $c240b574fe3d4654$require$setGlobalDispatcher = $gvOkt.setGlobalDispatcher; - -var $7SGLv = parcelRequire("7SGLv"); - -var $irTh6 = parcelRequire("irTh6"); - -var $cDfDy = parcelRequire("cDfDy"); -let $c240b574fe3d4654$var$hasCrypto; - -try { - $c240b574fe3d4654$import$be8b60ef5043e98e; - $c240b574fe3d4654$var$hasCrypto = true; -} catch { - $c240b574fe3d4654$var$hasCrypto = false; -} -Object.assign($kRVHu.prototype, $iZi4O); -$c240b574fe3d4654$export$ab054a1ef92eeb01 = $kRVHu; -$c240b574fe3d4654$export$1f2bb630327ac4b6 = $dQprK; -$c240b574fe3d4654$export$14963ee5c8637e11 = $jIWP2; -$c240b574fe3d4654$export$3ea9790e91014eeb = $lSq1i; -$c240b574fe3d4654$export$f05c48a4001d5356 = $3zvEP; -$c240b574fe3d4654$export$6f9e642c23f9615d = $2hsMF; -$c240b574fe3d4654$export$cfbc337f7857f27a = $hQ6kK; -$c240b574fe3d4654$export$c3def51f5c0b7771 = $7SGLv; -$c240b574fe3d4654$export$9af91951fcedc08c = $irTh6; -$c240b574fe3d4654$export$e56ca57b32a6e9c7 = $cDfDy; -$c240b574fe3d4654$export$ebbe0f536b18196e = $h3cex; -$c240b574fe3d4654$export$30f3b02011db23c0 = $cKdp7; -function $c240b574fe3d4654$var$makeDispatcher(fn) { - return (url, opts, handler)=>{ - if (typeof opts === "function") { - handler = opts; - opts = null; - } - if (!url || typeof url !== "string" && typeof url !== "object" && !(url instanceof URL)) throw new $c240b574fe3d4654$var$InvalidArgumentError("invalid url"); - if (opts != null && typeof opts !== "object") throw new $c240b574fe3d4654$var$InvalidArgumentError("invalid opts"); - if (opts && opts.path != null) { - if (typeof opts.path !== "string") throw new $c240b574fe3d4654$var$InvalidArgumentError("invalid opts.path"); - let path = opts.path; - if (!opts.path.startsWith("/")) path = `/${path}`; - url = new URL($gv2nV.parseOrigin(url).origin + path); - } else { - if (!opts) opts = typeof url === "object" ? url : {}; - url = $gv2nV.parseURL(url); - } - const { agent: agent, dispatcher: dispatcher = $c240b574fe3d4654$require$getGlobalDispatcher() } = opts; - if (agent) throw new $c240b574fe3d4654$var$InvalidArgumentError("unsupported opts.agent. Did you mean opts.client?"); - return fn.call(dispatcher, { - ...opts, - origin: url.origin, - path: url.search ? `${url.pathname}${url.search}` : url.pathname, - method: opts.method || (opts.body ? "PUT" : "GET") - }, handler); +// https://fetch.spec.whatwg.org/#create-an-opaque-timing-info +function $581c5a7a077d7ca7$var$createOpaqueTimingInfo(timingInfo) { + return { + startTime: timingInfo.startTime ?? 0, + redirectStartTime: 0, + redirectEndTime: 0, + postRedirectStartTime: timingInfo.startTime ?? 0, + finalServiceWorkerStartTime: 0, + finalNetworkResponseStartTime: 0, + finalNetworkRequestStartTime: 0, + endTime: 0, + encodedBodySize: 0, + decodedBodySize: 0, + finalConnectionTimingInfo: null }; } -$c240b574fe3d4654$export$ea76ac48857e9378 = $c240b574fe3d4654$require$setGlobalDispatcher; -$c240b574fe3d4654$export$6f0c702cbe7d6ed8 = $c240b574fe3d4654$require$getGlobalDispatcher; - - - - - - - - - - -if ($gv2nV.nodeMajor > 16 || $gv2nV.nodeMajor === 16 && $gv2nV.nodeMinor >= 8) { - let fetchImpl = null; - $c240b574fe3d4654$export$e7aa7bc5c1b3cfb3 = async function fetch(resource) { - if (!fetchImpl) fetchImpl = (parcelRequire("lJQOR")).fetch; - try { - return await fetchImpl(...arguments); - } catch (err) { - if (typeof err === "object") Error.captureStackTrace(err, this); - throw err; - } - }; - $c240b574fe3d4654$export$79b704688b15c0f4 = (parcelRequire("gXdj5")).Headers; - $c240b574fe3d4654$export$9f633d56d7ec90d3 = (parcelRequire("lHKGY")).Response; - $c240b574fe3d4654$export$7fa6c5b6f8193917 = (parcelRequire("gY7cH")).Request; - $c240b574fe3d4654$export$3963aa24c930693c = (parcelRequire("40V0q")).FormData; - $c240b574fe3d4654$export$b6afa8811b7e644e = (parcelRequire("ltaTH")).File; - $c240b574fe3d4654$export$3c8f13373e08d457 = (parcelRequire("lOCC7")).FileReader; - const { setGlobalOrigin: setGlobalOrigin, getGlobalOrigin: getGlobalOrigin } = (parcelRequire("5pfdo")); - $c240b574fe3d4654$export$79f8e34925aa870f = setGlobalOrigin; - $c240b574fe3d4654$export$4b73629724933f6e = getGlobalOrigin; - const { CacheStorage: CacheStorage } = (parcelRequire("6Lz7o")); - const { kConstruct: kConstruct } = (parcelRequire("6iKmm")); - $c240b574fe3d4654$export$50ac77867c9f1e40 = new CacheStorage(kConstruct); -} - - -if ($gv2nV.nodeMajor >= 16) { - const { deleteCookie: deleteCookie, getCookies: getCookies, getSetCookies: getSetCookies, setCookie: setCookie } = (parcelRequire("7vf90")); - $c240b574fe3d4654$export$b43e45590305ffaa = deleteCookie; - $c240b574fe3d4654$export$f3eb5caaef7b2b34 = getCookies; - $c240b574fe3d4654$export$14dd963aa71ac36d = getSetCookies; - $c240b574fe3d4654$export$110700823644f4a6 = setCookie; - const { parseMIMEType: parseMIMEType, serializeAMimeType: serializeAMimeType } = (parcelRequire("bNorT")); - $c240b574fe3d4654$export$85e6adb445fa3ef0 = parseMIMEType; - $c240b574fe3d4654$export$b00e4516a48bbc61 = serializeAMimeType; -} - -if ($gv2nV.nodeMajor >= 18 && $c240b574fe3d4654$var$hasCrypto) { - const { WebSocket: WebSocket } = (parcelRequire("gL9m6")); - $c240b574fe3d4654$export$3909fb301d3dc8c9 = WebSocket; -} -$c240b574fe3d4654$export$b5fe3f66a567bec0 = $c240b574fe3d4654$var$makeDispatcher($iZi4O.request); -$c240b574fe3d4654$export$4938110305e6185f = $c240b574fe3d4654$var$makeDispatcher($iZi4O.stream); -$c240b574fe3d4654$export$43f28b24e1eb8181 = $c240b574fe3d4654$var$makeDispatcher($iZi4O.pipeline); -$c240b574fe3d4654$export$64605811ab45167f = $c240b574fe3d4654$var$makeDispatcher($iZi4O.connect); -$c240b574fe3d4654$export$ba387509dbaf942e = $c240b574fe3d4654$var$makeDispatcher($iZi4O.upgrade); -$c240b574fe3d4654$export$8ff68bc3613e0197 = $7FGTp; -$c240b574fe3d4654$export$e3431e6e5e89c327 = $1OZd4; -$c240b574fe3d4654$export$44e9728040f17046 = $g8veH; -$c240b574fe3d4654$export$7219863409fc71b7 = $6iUQ3; - -}); -parcelRegister("dQprK", function(module, exports) { -// @ts-check -"use strict"; - - - - -var $a143ded4cac78640$require$pipeline = $g40fK$stream.pipeline; - -var $gv2nV = parcelRequire("gv2nV"); - -var $7zkd9 = parcelRequire("7zkd9"); - -var $fYRdr = parcelRequire("fYRdr"); - -var $8lFjX = parcelRequire("8lFjX"); - -var $cKdp7 = parcelRequire("cKdp7"); -var $a143ded4cac78640$require$RequestContentLengthMismatchError = $cKdp7.RequestContentLengthMismatchError; -var $a143ded4cac78640$require$ResponseContentLengthMismatchError = $cKdp7.ResponseContentLengthMismatchError; -var $a143ded4cac78640$require$InvalidArgumentError = $cKdp7.InvalidArgumentError; -var $a143ded4cac78640$require$RequestAbortedError = $cKdp7.RequestAbortedError; -var $a143ded4cac78640$require$HeadersTimeoutError = $cKdp7.HeadersTimeoutError; -var $a143ded4cac78640$require$HeadersOverflowError = $cKdp7.HeadersOverflowError; -var $a143ded4cac78640$require$SocketError = $cKdp7.SocketError; -var $a143ded4cac78640$require$InformationalError = $cKdp7.InformationalError; -var $a143ded4cac78640$require$BodyTimeoutError = $cKdp7.BodyTimeoutError; -var $a143ded4cac78640$require$HTTPParserError = $cKdp7.HTTPParserError; -var $a143ded4cac78640$require$ResponseExceededMaxSizeError = $cKdp7.ResponseExceededMaxSizeError; -var $a143ded4cac78640$require$ClientDestroyedError = $cKdp7.ClientDestroyedError; - -var $h3cex = parcelRequire("h3cex"); - -var $hHZvh = parcelRequire("hHZvh"); -var $a143ded4cac78640$require$kUrl = $hHZvh.kUrl; -var $a143ded4cac78640$require$kReset = $hHZvh.kReset; -var $a143ded4cac78640$require$kServerName = $hHZvh.kServerName; -var $a143ded4cac78640$require$kClient = $hHZvh.kClient; -var $a143ded4cac78640$require$kBusy = $hHZvh.kBusy; -var $a143ded4cac78640$require$kParser = $hHZvh.kParser; -var $a143ded4cac78640$require$kConnect = $hHZvh.kConnect; -var $a143ded4cac78640$require$kBlocking = $hHZvh.kBlocking; -var $a143ded4cac78640$require$kResuming = $hHZvh.kResuming; -var $a143ded4cac78640$require$kRunning = $hHZvh.kRunning; -var $a143ded4cac78640$require$kPending = $hHZvh.kPending; -var $a143ded4cac78640$require$kSize = $hHZvh.kSize; -var $a143ded4cac78640$require$kWriting = $hHZvh.kWriting; -var $a143ded4cac78640$require$kQueue = $hHZvh.kQueue; -var $a143ded4cac78640$require$kConnected = $hHZvh.kConnected; -var $a143ded4cac78640$require$kConnecting = $hHZvh.kConnecting; -var $a143ded4cac78640$require$kNeedDrain = $hHZvh.kNeedDrain; -var $a143ded4cac78640$require$kNoRef = $hHZvh.kNoRef; -var $a143ded4cac78640$require$kKeepAliveDefaultTimeout = $hHZvh.kKeepAliveDefaultTimeout; -var $a143ded4cac78640$require$kHostHeader = $hHZvh.kHostHeader; -var $a143ded4cac78640$require$kPendingIdx = $hHZvh.kPendingIdx; -var $a143ded4cac78640$require$kRunningIdx = $hHZvh.kRunningIdx; -var $a143ded4cac78640$require$kError = $hHZvh.kError; -var $a143ded4cac78640$require$kPipelining = $hHZvh.kPipelining; -var $a143ded4cac78640$require$kSocket = $hHZvh.kSocket; -var $a143ded4cac78640$require$kKeepAliveTimeoutValue = $hHZvh.kKeepAliveTimeoutValue; -var $a143ded4cac78640$require$kMaxHeadersSize = $hHZvh.kMaxHeadersSize; -var $a143ded4cac78640$require$kKeepAliveMaxTimeout = $hHZvh.kKeepAliveMaxTimeout; -var $a143ded4cac78640$require$kKeepAliveTimeoutThreshold = $hHZvh.kKeepAliveTimeoutThreshold; -var $a143ded4cac78640$require$kHeadersTimeout = $hHZvh.kHeadersTimeout; -var $a143ded4cac78640$require$kBodyTimeout = $hHZvh.kBodyTimeout; -var $a143ded4cac78640$require$kStrictContentLength = $hHZvh.kStrictContentLength; -var $a143ded4cac78640$require$kConnector = $hHZvh.kConnector; -var $a143ded4cac78640$require$kMaxRedirections = $hHZvh.kMaxRedirections; -var $a143ded4cac78640$require$kMaxRequests = $hHZvh.kMaxRequests; -var $a143ded4cac78640$require$kCounter = $hHZvh.kCounter; -var $a143ded4cac78640$require$kClose = $hHZvh.kClose; -var $a143ded4cac78640$require$kDestroy = $hHZvh.kDestroy; -var $a143ded4cac78640$require$kDispatch = $hHZvh.kDispatch; -var $a143ded4cac78640$require$kInterceptors = $hHZvh.kInterceptors; -var $a143ded4cac78640$require$kLocalAddress = $hHZvh.kLocalAddress; -var $a143ded4cac78640$require$kMaxResponseSize = $hHZvh.kMaxResponseSize; -var $a143ded4cac78640$require$kHTTPConnVersion = $hHZvh.kHTTPConnVersion; -var $a143ded4cac78640$require$kHost = $hHZvh.kHost; -var $a143ded4cac78640$require$kHTTP2Session = $hHZvh.kHTTP2Session; -var $a143ded4cac78640$require$kHTTP2SessionState = $hHZvh.kHTTP2SessionState; -var $a143ded4cac78640$require$kHTTP2BuildRequest = $hHZvh.kHTTP2BuildRequest; -var $a143ded4cac78640$require$kHTTP2CopyHeaders = $hHZvh.kHTTP2CopyHeaders; -var $a143ded4cac78640$require$kHTTP1BuildRequest = $hHZvh.kHTTP1BuildRequest; -/** @type {import('http2')} */ let $a143ded4cac78640$var$http2; - -try { - $a143ded4cac78640$var$http2 = $a143ded4cac78640$import$44c8f355160d282b; -} catch { - // @ts-ignore - $a143ded4cac78640$var$http2 = { - constants: {} +// https://html.spec.whatwg.org/multipage/origin.html#policy-container +function $581c5a7a077d7ca7$var$makePolicyContainer() { + // Note: the fetch spec doesn't make use of embedder policy or CSP list + return { + referrerPolicy: 'strict-origin-when-cross-origin' }; } -const { constants: { HTTP2_HEADER_AUTHORITY: $a143ded4cac78640$var$HTTP2_HEADER_AUTHORITY, HTTP2_HEADER_METHOD: $a143ded4cac78640$var$HTTP2_HEADER_METHOD, HTTP2_HEADER_PATH: $a143ded4cac78640$var$HTTP2_HEADER_PATH, HTTP2_HEADER_SCHEME: $a143ded4cac78640$var$HTTP2_HEADER_SCHEME, HTTP2_HEADER_CONTENT_LENGTH: $a143ded4cac78640$var$HTTP2_HEADER_CONTENT_LENGTH, HTTP2_HEADER_EXPECT: $a143ded4cac78640$var$HTTP2_HEADER_EXPECT, HTTP2_HEADER_STATUS: $a143ded4cac78640$var$HTTP2_HEADER_STATUS } } = $a143ded4cac78640$var$http2; -// Experimental -let $a143ded4cac78640$var$h2ExperimentalWarned = false; -const $a143ded4cac78640$var$FastBuffer = Buffer[Symbol.species]; -const $a143ded4cac78640$var$kClosedResolve = Symbol("kClosedResolve"); -const $a143ded4cac78640$var$channels = {}; - -try { - const diagnosticsChannel = $a143ded4cac78640$import$16898f553f2019a0; - $a143ded4cac78640$var$channels.sendHeaders = diagnosticsChannel.channel("undici:client:sendHeaders"); - $a143ded4cac78640$var$channels.beforeConnect = diagnosticsChannel.channel("undici:client:beforeConnect"); - $a143ded4cac78640$var$channels.connectError = diagnosticsChannel.channel("undici:client:connectError"); - $a143ded4cac78640$var$channels.connected = diagnosticsChannel.channel("undici:client:connected"); -} catch { - $a143ded4cac78640$var$channels.sendHeaders = { - hasSubscribers: false - }; - $a143ded4cac78640$var$channels.beforeConnect = { - hasSubscribers: false - }; - $a143ded4cac78640$var$channels.connectError = { - hasSubscribers: false - }; - $a143ded4cac78640$var$channels.connected = { - hasSubscribers: false +// https://html.spec.whatwg.org/multipage/origin.html#clone-a-policy-container +function $581c5a7a077d7ca7$var$clonePolicyContainer(policyContainer) { + return { + referrerPolicy: policyContainer.referrerPolicy }; } -/** - * @type {import('../types/client').default} - */ class $a143ded4cac78640$var$Client extends $8lFjX { - /** - * - * @param {string|URL} url - * @param {import('../types/client').Client.Options} options - */ constructor(url, { interceptors: interceptors, maxHeaderSize: maxHeaderSize, headersTimeout: headersTimeout, socketTimeout: socketTimeout, requestTimeout: requestTimeout, connectTimeout: connectTimeout, bodyTimeout: bodyTimeout, idleTimeout: idleTimeout, keepAlive: keepAlive, keepAliveTimeout: keepAliveTimeout, maxKeepAliveTimeout: maxKeepAliveTimeout, keepAliveMaxTimeout: keepAliveMaxTimeout, keepAliveTimeoutThreshold: keepAliveTimeoutThreshold, socketPath: socketPath, pipelining: pipelining, tls: tls, strictContentLength: strictContentLength, maxCachedSessions: maxCachedSessions, maxRedirections: maxRedirections, connect: connect, maxRequestsPerClient: maxRequestsPerClient, localAddress: localAddress, maxResponseSize: maxResponseSize, autoSelectFamily: autoSelectFamily, autoSelectFamilyAttemptTimeout: autoSelectFamilyAttemptTimeout, allowH2: // h2 - allowH2, maxConcurrentStreams: maxConcurrentStreams } = {}){ - super(); - if (keepAlive !== undefined) throw new $a143ded4cac78640$require$InvalidArgumentError("unsupported keepAlive, use pipelining=0 instead"); - if (socketTimeout !== undefined) throw new $a143ded4cac78640$require$InvalidArgumentError("unsupported socketTimeout, use headersTimeout & bodyTimeout instead"); - if (requestTimeout !== undefined) throw new $a143ded4cac78640$require$InvalidArgumentError("unsupported requestTimeout, use headersTimeout & bodyTimeout instead"); - if (idleTimeout !== undefined) throw new $a143ded4cac78640$require$InvalidArgumentError("unsupported idleTimeout, use keepAliveTimeout instead"); - if (maxKeepAliveTimeout !== undefined) throw new $a143ded4cac78640$require$InvalidArgumentError("unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead"); - if (maxHeaderSize != null && !Number.isFinite(maxHeaderSize)) throw new $a143ded4cac78640$require$InvalidArgumentError("invalid maxHeaderSize"); - if (socketPath != null && typeof socketPath !== "string") throw new $a143ded4cac78640$require$InvalidArgumentError("invalid socketPath"); - if (connectTimeout != null && (!Number.isFinite(connectTimeout) || connectTimeout < 0)) throw new $a143ded4cac78640$require$InvalidArgumentError("invalid connectTimeout"); - if (keepAliveTimeout != null && (!Number.isFinite(keepAliveTimeout) || keepAliveTimeout <= 0)) throw new $a143ded4cac78640$require$InvalidArgumentError("invalid keepAliveTimeout"); - if (keepAliveMaxTimeout != null && (!Number.isFinite(keepAliveMaxTimeout) || keepAliveMaxTimeout <= 0)) throw new $a143ded4cac78640$require$InvalidArgumentError("invalid keepAliveMaxTimeout"); - if (keepAliveTimeoutThreshold != null && !Number.isFinite(keepAliveTimeoutThreshold)) throw new $a143ded4cac78640$require$InvalidArgumentError("invalid keepAliveTimeoutThreshold"); - if (headersTimeout != null && (!Number.isInteger(headersTimeout) || headersTimeout < 0)) throw new $a143ded4cac78640$require$InvalidArgumentError("headersTimeout must be a positive integer or zero"); - if (bodyTimeout != null && (!Number.isInteger(bodyTimeout) || bodyTimeout < 0)) throw new $a143ded4cac78640$require$InvalidArgumentError("bodyTimeout must be a positive integer or zero"); - if (connect != null && typeof connect !== "function" && typeof connect !== "object") throw new $a143ded4cac78640$require$InvalidArgumentError("connect must be a function or an object"); - if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) throw new $a143ded4cac78640$require$InvalidArgumentError("maxRedirections must be a positive number"); - if (maxRequestsPerClient != null && (!Number.isInteger(maxRequestsPerClient) || maxRequestsPerClient < 0)) throw new $a143ded4cac78640$require$InvalidArgumentError("maxRequestsPerClient must be a positive number"); - if (localAddress != null && (typeof localAddress !== "string" || $g40fK$net.isIP(localAddress) === 0)) throw new $a143ded4cac78640$require$InvalidArgumentError("localAddress must be valid string IP address"); - if (maxResponseSize != null && (!Number.isInteger(maxResponseSize) || maxResponseSize < -1)) throw new $a143ded4cac78640$require$InvalidArgumentError("maxResponseSize must be a positive number"); - if (autoSelectFamilyAttemptTimeout != null && (!Number.isInteger(autoSelectFamilyAttemptTimeout) || autoSelectFamilyAttemptTimeout < -1)) throw new $a143ded4cac78640$require$InvalidArgumentError("autoSelectFamilyAttemptTimeout must be a positive number"); - // h2 - if (allowH2 != null && typeof allowH2 !== "boolean") throw new $a143ded4cac78640$require$InvalidArgumentError("allowH2 must be a valid boolean value"); - if (maxConcurrentStreams != null && (typeof maxConcurrentStreams !== "number" || maxConcurrentStreams < 1)) throw new $a143ded4cac78640$require$InvalidArgumentError("maxConcurrentStreams must be a possitive integer, greater than 0"); - if (typeof connect !== "function") connect = $h3cex({ - ...tls, - maxCachedSessions: maxCachedSessions, - allowH2: allowH2, - socketPath: socketPath, - timeout: connectTimeout, - ...$gv2nV.nodeHasAutoSelectFamily && autoSelectFamily ? { - autoSelectFamily: autoSelectFamily, - autoSelectFamilyAttemptTimeout: autoSelectFamilyAttemptTimeout - } : undefined, - ...connect - }); - this[$a143ded4cac78640$require$kInterceptors] = interceptors && interceptors.Client && Array.isArray(interceptors.Client) ? interceptors.Client : [ - $cDfDy({ - maxRedirections: maxRedirections - }) - ]; - this[$a143ded4cac78640$require$kUrl] = $gv2nV.parseOrigin(url); - this[$a143ded4cac78640$require$kConnector] = connect; - this[$a143ded4cac78640$require$kSocket] = null; - this[$a143ded4cac78640$require$kPipelining] = pipelining != null ? pipelining : 1; - this[$a143ded4cac78640$require$kMaxHeadersSize] = maxHeaderSize || $g40fK$http.maxHeaderSize; - this[$a143ded4cac78640$require$kKeepAliveDefaultTimeout] = keepAliveTimeout == null ? 4e3 : keepAliveTimeout; - this[$a143ded4cac78640$require$kKeepAliveMaxTimeout] = keepAliveMaxTimeout == null ? 600e3 : keepAliveMaxTimeout; - this[$a143ded4cac78640$require$kKeepAliveTimeoutThreshold] = keepAliveTimeoutThreshold == null ? 1e3 : keepAliveTimeoutThreshold; - this[$a143ded4cac78640$require$kKeepAliveTimeoutValue] = this[$a143ded4cac78640$require$kKeepAliveDefaultTimeout]; - this[$a143ded4cac78640$require$kServerName] = null; - this[$a143ded4cac78640$require$kLocalAddress] = localAddress != null ? localAddress : null; - this[$a143ded4cac78640$require$kResuming] = 0 // 0, idle, 1, scheduled, 2 resuming - ; - this[$a143ded4cac78640$require$kNeedDrain] = 0 // 0, idle, 1, scheduled, 2 resuming - ; - this[$a143ded4cac78640$require$kHostHeader] = `host: ${this[$a143ded4cac78640$require$kUrl].hostname}${this[$a143ded4cac78640$require$kUrl].port ? `:${this[$a143ded4cac78640$require$kUrl].port}` : ""}\r\n`; - this[$a143ded4cac78640$require$kBodyTimeout] = bodyTimeout != null ? bodyTimeout : 300e3; - this[$a143ded4cac78640$require$kHeadersTimeout] = headersTimeout != null ? headersTimeout : 300e3; - this[$a143ded4cac78640$require$kStrictContentLength] = strictContentLength == null ? true : strictContentLength; - this[$a143ded4cac78640$require$kMaxRedirections] = maxRedirections; - this[$a143ded4cac78640$require$kMaxRequests] = maxRequestsPerClient; - this[$a143ded4cac78640$var$kClosedResolve] = null; - this[$a143ded4cac78640$require$kMaxResponseSize] = maxResponseSize > -1 ? maxResponseSize : -1; - this[$a143ded4cac78640$require$kHTTPConnVersion] = "h1"; - // HTTP/2 - this[$a143ded4cac78640$require$kHTTP2Session] = null; - this[$a143ded4cac78640$require$kHTTP2SessionState] = !allowH2 ? null : { - // streams: null, // Fixed queue of streams - For future support of `push` - openStreams: 0, - maxConcurrentStreams: maxConcurrentStreams != null ? maxConcurrentStreams : 100 // Max peerConcurrentStreams for a Node h2 server - }; - this[$a143ded4cac78640$require$kHost] = `${this[$a143ded4cac78640$require$kUrl].hostname}${this[$a143ded4cac78640$require$kUrl].port ? `:${this[$a143ded4cac78640$require$kUrl].port}` : ""}`; - // kQueue is built up of 3 sections separated by - // the kRunningIdx and kPendingIdx indices. - // | complete | running | pending | - // ^ kRunningIdx ^ kPendingIdx ^ kQueue.length - // kRunningIdx points to the first running element. - // kPendingIdx points to the first pending element. - // This implements a fast queue with an amortized - // time of O(1). - this[$a143ded4cac78640$require$kQueue] = []; - this[$a143ded4cac78640$require$kRunningIdx] = 0; - this[$a143ded4cac78640$require$kPendingIdx] = 0; - } - get pipelining() { - return this[$a143ded4cac78640$require$kPipelining]; - } - set pipelining(value) { - this[$a143ded4cac78640$require$kPipelining] = value; - $a143ded4cac78640$var$resume(this, true); - } - get [$a143ded4cac78640$require$kPending]() { - return this[$a143ded4cac78640$require$kQueue].length - this[$a143ded4cac78640$require$kPendingIdx]; - } - get [$a143ded4cac78640$require$kRunning]() { - return this[$a143ded4cac78640$require$kPendingIdx] - this[$a143ded4cac78640$require$kRunningIdx]; - } - get [$a143ded4cac78640$require$kSize]() { - return this[$a143ded4cac78640$require$kQueue].length - this[$a143ded4cac78640$require$kRunningIdx]; - } - get [$a143ded4cac78640$require$kConnected]() { - return !!this[$a143ded4cac78640$require$kSocket] && !this[$a143ded4cac78640$require$kConnecting] && !this[$a143ded4cac78640$require$kSocket].destroyed; +// https://w3c.github.io/webappsec-referrer-policy/#determine-requests-referrer +function $581c5a7a077d7ca7$var$determineRequestsReferrer(request) { + // 1. Let policy be request's referrer policy. + const policy = request.referrerPolicy; + // Note: policy cannot (shouldn't) be null or an empty string. + $in2sP$nodeassert(policy); + // 2. Let environment be request’s client. + let referrerSource = null; + // 3. Switch on request’s referrer: + if (request.referrer === 'client') { + // Note: node isn't a browser and doesn't implement document/iframes, + // so we bypass this step and replace it with our own. + const globalOrigin = $581c5a7a077d7ca7$require$getGlobalOrigin(); + if (!globalOrigin || globalOrigin.origin === 'null') return 'no-referrer'; + // note: we need to clone it as it's mutated + referrerSource = new URL(globalOrigin); + } else if (request.referrer instanceof URL) // Let referrerSource be request’s referrer. + referrerSource = request.referrer; + // 4. Let request’s referrerURL be the result of stripping referrerSource for + // use as a referrer. + let referrerURL = $581c5a7a077d7ca7$var$stripURLForReferrer(referrerSource); + // 5. Let referrerOrigin be the result of stripping referrerSource for use as + // a referrer, with the origin-only flag set to true. + const referrerOrigin = $581c5a7a077d7ca7$var$stripURLForReferrer(referrerSource, true); + // 6. If the result of serializing referrerURL is a string whose length is + // greater than 4096, set referrerURL to referrerOrigin. + if (referrerURL.toString().length > 4096) referrerURL = referrerOrigin; + const areSameOrigin = $581c5a7a077d7ca7$var$sameOrigin(request, referrerURL); + const isNonPotentiallyTrustWorthy = $581c5a7a077d7ca7$var$isURLPotentiallyTrustworthy(referrerURL) && !$581c5a7a077d7ca7$var$isURLPotentiallyTrustworthy(request.url); + // 8. Execute the switch statements corresponding to the value of policy: + switch(policy){ + case 'origin': + return referrerOrigin != null ? referrerOrigin : $581c5a7a077d7ca7$var$stripURLForReferrer(referrerSource, true); + case 'unsafe-url': + return referrerURL; + case 'same-origin': + return areSameOrigin ? referrerOrigin : 'no-referrer'; + case 'origin-when-cross-origin': + return areSameOrigin ? referrerURL : referrerOrigin; + case 'strict-origin-when-cross-origin': + { + const currentURL = $581c5a7a077d7ca7$var$requestCurrentURL(request); + // 1. If the origin of referrerURL and the origin of request’s current + // URL are the same, then return referrerURL. + if ($581c5a7a077d7ca7$var$sameOrigin(referrerURL, currentURL)) return referrerURL; + // 2. If referrerURL is a potentially trustworthy URL and request’s + // current URL is not a potentially trustworthy URL, then return no + // referrer. + if ($581c5a7a077d7ca7$var$isURLPotentiallyTrustworthy(referrerURL) && !$581c5a7a077d7ca7$var$isURLPotentiallyTrustworthy(currentURL)) return 'no-referrer'; + // 3. Return referrerOrigin. + return referrerOrigin; + } + case 'strict-origin': + /** + * 1. If referrerURL is a potentially trustworthy URL and + * request’s current URL is not a potentially trustworthy URL, + * then return no referrer. + * 2. Return referrerOrigin + */ case 'no-referrer-when-downgrade': + /** + * 1. If referrerURL is a potentially trustworthy URL and + * request’s current URL is not a potentially trustworthy URL, + * then return no referrer. + * 2. Return referrerOrigin + */ default: + return isNonPotentiallyTrustWorthy ? 'no-referrer' : referrerOrigin; } - get [$a143ded4cac78640$require$kBusy]() { - const socket = this[$a143ded4cac78640$require$kSocket]; - return socket && (socket[$a143ded4cac78640$require$kReset] || socket[$a143ded4cac78640$require$kWriting] || socket[$a143ded4cac78640$require$kBlocking]) || this[$a143ded4cac78640$require$kSize] >= (this[$a143ded4cac78640$require$kPipelining] || 1) || this[$a143ded4cac78640$require$kPending] > 0; +} +/** + * @see https://w3c.github.io/webappsec-referrer-policy/#strip-url + * @param {URL} url + * @param {boolean|undefined} originOnly + */ function $581c5a7a077d7ca7$var$stripURLForReferrer(url, originOnly) { + // 1. Assert: url is a URL. + $in2sP$nodeassert(url instanceof URL); + url = new URL(url); + // 2. If url’s scheme is a local scheme, then return no referrer. + if (url.protocol === 'file:' || url.protocol === 'about:' || url.protocol === 'blank:') return 'no-referrer'; + // 3. Set url’s username to the empty string. + url.username = ''; + // 4. Set url’s password to the empty string. + url.password = ''; + // 5. Set url’s fragment to null. + url.hash = ''; + // 6. If the origin-only flag is true, then: + if (originOnly) { + // 1. Set url’s path to « the empty string ». + url.pathname = ''; + // 2. Set url’s query to null. + url.search = ''; } - /* istanbul ignore: only used for test */ [$a143ded4cac78640$require$kConnect](cb) { - $a143ded4cac78640$var$connect(this); - this.once("connect", cb); + // 7. Return url. + return url; +} +function $581c5a7a077d7ca7$var$isURLPotentiallyTrustworthy(url) { + if (!(url instanceof URL)) return false; + // If child of about, return true + if (url.href === 'about:blank' || url.href === 'about:srcdoc') return true; + // If scheme is data, return true + if (url.protocol === 'data:') return true; + // If file, return true + if (url.protocol === 'file:') return true; + return isOriginPotentiallyTrustworthy(url.origin); + function isOriginPotentiallyTrustworthy(origin) { + // If origin is explicitly null, return false + if (origin == null || origin === 'null') return false; + const originAsURL = new URL(origin); + // If secure, return true + if (originAsURL.protocol === 'https:' || originAsURL.protocol === 'wss:') return true; + // If localhost or variants, return true + if (/^127(?:\.[0-9]+){0,2}\.[0-9]+$|^\[(?:0*:)*?:?0*1\]$/.test(originAsURL.hostname) || originAsURL.hostname === 'localhost' || originAsURL.hostname.includes('localhost.') || originAsURL.hostname.endsWith('.localhost')) return true; + // If any other, return false + return false; } - [$a143ded4cac78640$require$kDispatch](opts, handler) { - const origin = opts.origin || this[$a143ded4cac78640$require$kUrl].origin; - const request = this[$a143ded4cac78640$require$kHTTPConnVersion] === "h2" ? $fYRdr[$a143ded4cac78640$require$kHTTP2BuildRequest](origin, opts, handler) : $fYRdr[$a143ded4cac78640$require$kHTTP1BuildRequest](origin, opts, handler); - this[$a143ded4cac78640$require$kQueue].push(request); - if (this[$a143ded4cac78640$require$kResuming]) ; - else if ($gv2nV.bodyLength(request.body) == null && $gv2nV.isIterable(request.body)) { - // Wait a tick in case stream/iterator is ended in the same tick. - this[$a143ded4cac78640$require$kResuming] = 1; - process.nextTick($a143ded4cac78640$var$resume, this); - } else $a143ded4cac78640$var$resume(this, true); - if (this[$a143ded4cac78640$require$kResuming] && this[$a143ded4cac78640$require$kNeedDrain] !== 2 && this[$a143ded4cac78640$require$kBusy]) this[$a143ded4cac78640$require$kNeedDrain] = 2; - return this[$a143ded4cac78640$require$kNeedDrain] < 2; +} +/** + * @see https://w3c.github.io/webappsec-subresource-integrity/#does-response-match-metadatalist + * @param {Uint8Array} bytes + * @param {string} metadataList + */ function $581c5a7a077d7ca7$var$bytesMatch(bytes, metadataList) { + // If node is not built with OpenSSL support, we cannot check + // a request's integrity, so allow it by default (the spec will + // allow requests if an invalid hash is given, as precedence). + /* istanbul ignore if: only if node is built with --without-ssl */ if ($581c5a7a077d7ca7$var$crypto === undefined) return true; + // 1. Let parsedMetadata be the result of parsing metadataList. + const parsedMetadata = $581c5a7a077d7ca7$var$parseMetadata(metadataList); + // 2. If parsedMetadata is no metadata, return true. + if (parsedMetadata === 'no metadata') return true; + // 3. If response is not eligible for integrity validation, return false. + // TODO + // 4. If parsedMetadata is the empty set, return true. + if (parsedMetadata.length === 0) return true; + // 5. Let metadata be the result of getting the strongest + // metadata from parsedMetadata. + const strongest = $581c5a7a077d7ca7$var$getStrongestMetadata(parsedMetadata); + const metadata = $581c5a7a077d7ca7$var$filterMetadataListByAlgorithm(parsedMetadata, strongest); + // 6. For each item in metadata: + for (const item of metadata){ + // 1. Let algorithm be the alg component of item. + const algorithm = item.algo; + // 2. Let expectedValue be the val component of item. + const expectedValue = item.hash; + // See https://github.com/web-platform-tests/wpt/commit/e4c5cc7a5e48093220528dfdd1c4012dc3837a0e + // "be liberal with padding". This is annoying, and it's not even in the spec. + // 3. Let actualValue be the result of applying algorithm to bytes. + let actualValue = $581c5a7a077d7ca7$var$crypto.createHash(algorithm).update(bytes).digest('base64'); + if (actualValue[actualValue.length - 1] === '=') { + if (actualValue[actualValue.length - 2] === '=') actualValue = actualValue.slice(0, -2); + else actualValue = actualValue.slice(0, -1); + } + // 4. If actualValue is a case-sensitive match for expectedValue, + // return true. + if ($581c5a7a077d7ca7$var$compareBase64Mixed(actualValue, expectedValue)) return true; } - async [$a143ded4cac78640$require$kClose]() { - // TODO: for H2 we need to gracefully flush the remaining enqueued - // request and close each stream. - return new Promise((resolve)=>{ - if (!this[$a143ded4cac78640$require$kSize]) resolve(null); - else this[$a143ded4cac78640$var$kClosedResolve] = resolve; - }); + // 7. Return false. + return false; +} +// https://w3c.github.io/webappsec-subresource-integrity/#grammardef-hash-with-options +// https://www.w3.org/TR/CSP2/#source-list-syntax +// https://www.rfc-editor.org/rfc/rfc5234#appendix-B.1 +const $581c5a7a077d7ca7$var$parseHashWithOptions = /(?sha256|sha384|sha512)-((?[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i; +/** + * @see https://w3c.github.io/webappsec-subresource-integrity/#parse-metadata + * @param {string} metadata + */ function $581c5a7a077d7ca7$var$parseMetadata(metadata) { + // 1. Let result be the empty set. + /** @type {{ algo: string, hash: string }[]} */ const result = []; + // 2. Let empty be equal to true. + let empty = true; + // 3. For each token returned by splitting metadata on spaces: + for (const token of metadata.split(' ')){ + // 1. Set empty to false. + empty = false; + // 2. Parse token as a hash-with-options. + const parsedToken = $581c5a7a077d7ca7$var$parseHashWithOptions.exec(token); + // 3. If token does not parse, continue to the next token. + if (parsedToken === null || parsedToken.groups === undefined || parsedToken.groups.algo === undefined) continue; + // 4. Let algorithm be the hash-algo component of token. + const algorithm = parsedToken.groups.algo.toLowerCase(); + // 5. If algorithm is a hash function recognized by the user + // agent, add the parsed token to result. + if ($581c5a7a077d7ca7$var$supportedHashes.includes(algorithm)) result.push(parsedToken.groups); } - async [$a143ded4cac78640$require$kDestroy](err) { - return new Promise((resolve)=>{ - const requests = this[$a143ded4cac78640$require$kQueue].splice(this[$a143ded4cac78640$require$kPendingIdx]); - for(let i = 0; i < requests.length; i++){ - const request = requests[i]; - $a143ded4cac78640$var$errorRequest(this, request, err); - } - const callback = ()=>{ - if (this[$a143ded4cac78640$var$kClosedResolve]) { - // TODO (fix): Should we error here with ClientDestroyedError? - this[$a143ded4cac78640$var$kClosedResolve](); - this[$a143ded4cac78640$var$kClosedResolve] = null; - } - resolve(); - }; - if (this[$a143ded4cac78640$require$kHTTP2Session] != null) { - $gv2nV.destroy(this[$a143ded4cac78640$require$kHTTP2Session], err); - this[$a143ded4cac78640$require$kHTTP2Session] = null; - this[$a143ded4cac78640$require$kHTTP2SessionState] = null; - } - if (!this[$a143ded4cac78640$require$kSocket]) queueMicrotask(callback); - else $gv2nV.destroy(this[$a143ded4cac78640$require$kSocket].on("close", callback), err); - $a143ded4cac78640$var$resume(this); - }); + // 4. Return no metadata if empty is true, otherwise return result. + if (empty === true) return 'no metadata'; + return result; +} +/** + * @param {{ algo: 'sha256' | 'sha384' | 'sha512' }[]} metadataList + */ function $581c5a7a077d7ca7$var$getStrongestMetadata(metadataList) { + // Let algorithm be the algo component of the first item in metadataList. + // Can be sha256 + let algorithm = metadataList[0].algo; + // If the algorithm is sha512, then it is the strongest + // and we can return immediately + if (algorithm[3] === '5') return algorithm; + for(let i = 1; i < metadataList.length; ++i){ + const metadata = metadataList[i]; + // If the algorithm is sha512, then it is the strongest + // and we can break the loop immediately + if (metadata.algo[3] === '5') { + algorithm = 'sha512'; + break; + // If the algorithm is sha384, then a potential sha256 or sha384 is ignored + } else if (algorithm[3] === '3') continue; + else if (metadata.algo[3] === '3') algorithm = 'sha384'; } + return algorithm; } -function $a143ded4cac78640$var$onHttp2SessionError(err) { - $g40fK$assert(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); - this[$a143ded4cac78640$require$kSocket][$a143ded4cac78640$require$kError] = err; - $a143ded4cac78640$var$onError(this[$a143ded4cac78640$require$kClient], err); +function $581c5a7a077d7ca7$var$filterMetadataListByAlgorithm(metadataList, algorithm) { + if (metadataList.length === 1) return metadataList; + let pos = 0; + for(let i = 0; i < metadataList.length; ++i)if (metadataList[i].algo === algorithm) metadataList[pos++] = metadataList[i]; + metadataList.length = pos; + return metadataList; } -function $a143ded4cac78640$var$onHttp2FrameError(type, code, id) { - const err = new $a143ded4cac78640$require$InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`); - if (id === 0) { - this[$a143ded4cac78640$require$kSocket][$a143ded4cac78640$require$kError] = err; - $a143ded4cac78640$var$onError(this[$a143ded4cac78640$require$kClient], err); - } -} -function $a143ded4cac78640$var$onHttp2SessionEnd() { - $gv2nV.destroy(this, new $a143ded4cac78640$require$SocketError("other side closed")); - $gv2nV.destroy(this[$a143ded4cac78640$require$kSocket], new $a143ded4cac78640$require$SocketError("other side closed")); -} -function $a143ded4cac78640$var$onHTTP2GoAway(code) { - const client = this[$a143ded4cac78640$require$kClient]; - const err = new $a143ded4cac78640$require$InformationalError(`HTTP/2: "GOAWAY" frame received with code ${code}`); - client[$a143ded4cac78640$require$kSocket] = null; - client[$a143ded4cac78640$require$kHTTP2Session] = null; - if (client.destroyed) { - $g40fK$assert(this[$a143ded4cac78640$require$kPending] === 0); - // Fail entire queue. - const requests = client[$a143ded4cac78640$require$kQueue].splice(client[$a143ded4cac78640$require$kRunningIdx]); - for(let i = 0; i < requests.length; i++){ - const request = requests[i]; - $a143ded4cac78640$var$errorRequest(this, request, err); - } - } else if (client[$a143ded4cac78640$require$kRunning] > 0) { - // Fail head of pipeline. - const request = client[$a143ded4cac78640$require$kQueue][client[$a143ded4cac78640$require$kRunningIdx]]; - client[$a143ded4cac78640$require$kQueue][client[$a143ded4cac78640$require$kRunningIdx]++] = null; - $a143ded4cac78640$var$errorRequest(client, request, err); +/** + * Compares two base64 strings, allowing for base64url + * in the second string. + * +* @param {string} actualValue always base64 + * @param {string} expectedValue base64 or base64url + * @returns {boolean} + */ function $581c5a7a077d7ca7$var$compareBase64Mixed(actualValue, expectedValue) { + if (actualValue.length !== expectedValue.length) return false; + for(let i = 0; i < actualValue.length; ++i)if (actualValue[i] !== expectedValue[i]) { + if (actualValue[i] === '+' && expectedValue[i] === '-' || actualValue[i] === '/' && expectedValue[i] === '_') continue; + return false; } - client[$a143ded4cac78640$require$kPendingIdx] = client[$a143ded4cac78640$require$kRunningIdx]; - $g40fK$assert(client[$a143ded4cac78640$require$kRunning] === 0); - client.emit("disconnect", client[$a143ded4cac78640$require$kUrl], [ - client - ], err); - $a143ded4cac78640$var$resume(client); + return true; } - -var $fbG2v = parcelRequire("fbG2v"); - -var $cDfDy = parcelRequire("cDfDy"); -const $a143ded4cac78640$var$EMPTY_BUF = Buffer.alloc(0); - - - -async function $a143ded4cac78640$var$lazyllhttp() { - const llhttpWasmData = process.env.JEST_WORKER_ID ? (parcelRequire("2SOyL")) : undefined; - let mod; - try { - mod = await WebAssembly.compile(Buffer.from((parcelRequire("Qddnq")), "base64")); - } catch (e) { - /* istanbul ignore next */ // We could check if the error was caused by the simd option not - // being enabled, but the occurring of this other error - // * https://github.com/emscripten-core/emscripten/issues/11495 - // got me to remove that check to avoid breaking Node 12. - mod = await WebAssembly.compile(Buffer.from(llhttpWasmData || (parcelRequire("2SOyL")), "base64")); - } - return await WebAssembly.instantiate(mod, { - env: { - /* eslint-disable camelcase */ wasm_on_url: (p, at, len)=>{ - /* istanbul ignore next */ return 0; - }, - wasm_on_status: (p, at, len)=>{ - $g40fK$assert.strictEqual($a143ded4cac78640$var$currentParser.ptr, p); - const start = at - $a143ded4cac78640$var$currentBufferPtr + $a143ded4cac78640$var$currentBufferRef.byteOffset; - return $a143ded4cac78640$var$currentParser.onStatus(new $a143ded4cac78640$var$FastBuffer($a143ded4cac78640$var$currentBufferRef.buffer, start, len)) || 0; - }, - wasm_on_message_begin: (p)=>{ - $g40fK$assert.strictEqual($a143ded4cac78640$var$currentParser.ptr, p); - return $a143ded4cac78640$var$currentParser.onMessageBegin() || 0; - }, - wasm_on_header_field: (p, at, len)=>{ - $g40fK$assert.strictEqual($a143ded4cac78640$var$currentParser.ptr, p); - const start = at - $a143ded4cac78640$var$currentBufferPtr + $a143ded4cac78640$var$currentBufferRef.byteOffset; - return $a143ded4cac78640$var$currentParser.onHeaderField(new $a143ded4cac78640$var$FastBuffer($a143ded4cac78640$var$currentBufferRef.buffer, start, len)) || 0; - }, - wasm_on_header_value: (p, at, len)=>{ - $g40fK$assert.strictEqual($a143ded4cac78640$var$currentParser.ptr, p); - const start = at - $a143ded4cac78640$var$currentBufferPtr + $a143ded4cac78640$var$currentBufferRef.byteOffset; - return $a143ded4cac78640$var$currentParser.onHeaderValue(new $a143ded4cac78640$var$FastBuffer($a143ded4cac78640$var$currentBufferRef.buffer, start, len)) || 0; - }, - wasm_on_headers_complete: (p, statusCode, upgrade, shouldKeepAlive)=>{ - $g40fK$assert.strictEqual($a143ded4cac78640$var$currentParser.ptr, p); - return $a143ded4cac78640$var$currentParser.onHeadersComplete(statusCode, Boolean(upgrade), Boolean(shouldKeepAlive)) || 0; - }, - wasm_on_body: (p, at, len)=>{ - $g40fK$assert.strictEqual($a143ded4cac78640$var$currentParser.ptr, p); - const start = at - $a143ded4cac78640$var$currentBufferPtr + $a143ded4cac78640$var$currentBufferRef.byteOffset; - return $a143ded4cac78640$var$currentParser.onBody(new $a143ded4cac78640$var$FastBuffer($a143ded4cac78640$var$currentBufferRef.buffer, start, len)) || 0; - }, - wasm_on_message_complete: (p)=>{ - $g40fK$assert.strictEqual($a143ded4cac78640$var$currentParser.ptr, p); - return $a143ded4cac78640$var$currentParser.onMessageComplete() || 0; - } - } +// https://w3c.github.io/webappsec-upgrade-insecure-requests/#upgrade-request +function $581c5a7a077d7ca7$var$tryUpgradeRequestToAPotentiallyTrustworthyURL(request) { +// TODO +} +/** + * @link {https://html.spec.whatwg.org/multipage/origin.html#same-origin} + * @param {URL} A + * @param {URL} B + */ function $581c5a7a077d7ca7$var$sameOrigin(A, B) { + // 1. If A and B are the same opaque origin, then return true. + if (A.origin === B.origin && A.origin === 'null') return true; + // 2. If A and B are both tuple origins and their schemes, + // hosts, and port are identical, then return true. + if (A.protocol === B.protocol && A.hostname === B.hostname && A.port === B.port) return true; + // 3. Return false. + return false; +} +function $581c5a7a077d7ca7$var$createDeferredPromise() { + let res; + let rej; + const promise = new Promise((resolve, reject)=>{ + res = resolve; + rej = reject; }); + return { + promise: promise, + resolve: res, + reject: rej + }; } -let $a143ded4cac78640$var$llhttpInstance = null; -let $a143ded4cac78640$var$llhttpPromise = $a143ded4cac78640$var$lazyllhttp(); -$a143ded4cac78640$var$llhttpPromise.catch(); -let $a143ded4cac78640$var$currentParser = null; -let $a143ded4cac78640$var$currentBufferRef = null; -let $a143ded4cac78640$var$currentBufferSize = 0; -let $a143ded4cac78640$var$currentBufferPtr = null; -const $a143ded4cac78640$var$TIMEOUT_HEADERS = 1; -const $a143ded4cac78640$var$TIMEOUT_BODY = 2; -const $a143ded4cac78640$var$TIMEOUT_IDLE = 3; -class $a143ded4cac78640$var$Parser { - constructor(client, socket, { exports: exports }){ - $g40fK$assert(Number.isFinite(client[$a143ded4cac78640$require$kMaxHeadersSize]) && client[$a143ded4cac78640$require$kMaxHeadersSize] > 0); - this.llhttp = exports; - this.ptr = this.llhttp.llhttp_alloc($fbG2v.TYPE.RESPONSE); - this.client = client; - this.socket = socket; - this.timeout = null; - this.timeoutValue = null; - this.timeoutType = null; - this.statusCode = null; - this.statusText = ""; - this.upgrade = false; - this.headers = []; - this.headersSize = 0; - this.headersMaxSize = client[$a143ded4cac78640$require$kMaxHeadersSize]; - this.shouldKeepAlive = false; - this.paused = false; - this.resume = this.resume.bind(this); - this.bytesRead = 0; - this.keepAlive = ""; - this.contentLength = ""; - this.connection = ""; - this.maxResponseSize = client[$a143ded4cac78640$require$kMaxResponseSize]; - } - setTimeout(value, type) { - this.timeoutType = type; - if (value !== this.timeoutValue) { - $7zkd9.clearTimeout(this.timeout); - if (value) { - this.timeout = $7zkd9.setTimeout($a143ded4cac78640$var$onParserTimeout, value, this); - // istanbul ignore else: only for jest - if (this.timeout.unref) this.timeout.unref(); - } else this.timeout = null; - this.timeoutValue = value; - } else if (this.timeout) // istanbul ignore else: only for jest - { - if (this.timeout.refresh) this.timeout.refresh(); - } - } - resume() { - if (this.socket.destroyed || !this.paused) return; - $g40fK$assert(this.ptr != null); - $g40fK$assert($a143ded4cac78640$var$currentParser == null); - this.llhttp.llhttp_resume(this.ptr); - $g40fK$assert(this.timeoutType === $a143ded4cac78640$var$TIMEOUT_BODY); - if (this.timeout) // istanbul ignore else: only for jest - { - if (this.timeout.refresh) this.timeout.refresh(); - } - this.paused = false; - this.execute(this.socket.read() || $a143ded4cac78640$var$EMPTY_BUF) // Flush parser. - ; - this.readMore(); - } - readMore() { - while(!this.paused && this.ptr){ - const chunk = this.socket.read(); - if (chunk === null) break; - this.execute(chunk); +function $581c5a7a077d7ca7$var$isAborted(fetchParams) { + return fetchParams.controller.state === 'aborted'; +} +function $581c5a7a077d7ca7$var$isCancelled(fetchParams) { + return fetchParams.controller.state === 'aborted' || fetchParams.controller.state === 'terminated'; +} +/** + * @see https://fetch.spec.whatwg.org/#concept-method-normalize + * @param {string} method + */ function $581c5a7a077d7ca7$var$normalizeMethod(method) { + return $581c5a7a077d7ca7$require$normalizedMethodRecordsBase[method.toLowerCase()] ?? method; +} +// https://infra.spec.whatwg.org/#serialize-a-javascript-value-to-a-json-string +function $581c5a7a077d7ca7$var$serializeJavascriptValueToJSONString(value) { + // 1. Let result be ? Call(%JSON.stringify%, undefined, « value »). + const result = JSON.stringify(value); + // 2. If result is undefined, then throw a TypeError. + if (result === undefined) throw new TypeError('Value is not JSON serializable'); + // 3. Assert: result is a string. + $in2sP$nodeassert(typeof result === 'string'); + // 4. Return result. + return result; +} +// https://tc39.es/ecma262/#sec-%25iteratorprototype%25-object +const $581c5a7a077d7ca7$var$esIteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())); +/** + * @see https://webidl.spec.whatwg.org/#dfn-iterator-prototype-object + * @param {string} name name of the instance + * @param {symbol} kInternalIterator + * @param {string | number} [keyIndex] + * @param {string | number} [valueIndex] + */ function $581c5a7a077d7ca7$var$createIterator(name, kInternalIterator, keyIndex = 0, valueIndex = 1) { + class FastIterableIterator { + /** @type {any} */ #target; + /** @type {'key' | 'value' | 'key+value'} */ #kind; + /** @type {number} */ #index; + /** + * @see https://webidl.spec.whatwg.org/#dfn-default-iterator-object + * @param {unknown} target + * @param {'key' | 'value' | 'key+value'} kind + */ constructor(target, kind){ + this.#target = target; + this.#kind = kind; + this.#index = 0; + } + next() { + // 1. Let interface be the interface for which the iterator prototype object exists. + // 2. Let thisValue be the this value. + // 3. Let object be ? ToObject(thisValue). + // 4. If object is a platform object, then perform a security + // check, passing: + // 5. If object is not a default iterator object for interface, + // then throw a TypeError. + if (typeof this !== 'object' || this === null || !(#target in this)) throw new TypeError(`'next' called on an object that does not implement interface ${name} Iterator.`); + // 6. Let index be object’s index. + // 7. Let kind be object’s kind. + // 8. Let values be object’s target's value pairs to iterate over. + const index = this.#index; + const values = this.#target[kInternalIterator]; + // 9. Let len be the length of values. + const len = values.length; + // 10. If index is greater than or equal to len, then return + // CreateIterResultObject(undefined, true). + if (index >= len) return { + value: undefined, + done: true + }; + // 11. Let pair be the entry in values at index index. + const { [keyIndex]: key, [valueIndex]: value } = values[index]; + // 12. Set object’s index to index + 1. + this.#index = index + 1; + // 13. Return the iterator result for pair and kind. + // https://webidl.spec.whatwg.org/#iterator-result + // 1. Let result be a value determined by the value of kind: + let result; + switch(this.#kind){ + case 'key': + // 1. Let idlKey be pair’s key. + // 2. Let key be the result of converting idlKey to an + // ECMAScript value. + // 3. result is key. + result = key; + break; + case 'value': + // 1. Let idlValue be pair’s value. + // 2. Let value be the result of converting idlValue to + // an ECMAScript value. + // 3. result is value. + result = value; + break; + case 'key+value': + // 1. Let idlKey be pair’s key. + // 2. Let idlValue be pair’s value. + // 3. Let key be the result of converting idlKey to an + // ECMAScript value. + // 4. Let value be the result of converting idlValue to + // an ECMAScript value. + // 5. Let array be ! ArrayCreate(2). + // 6. Call ! CreateDataProperty(array, "0", key). + // 7. Call ! CreateDataProperty(array, "1", value). + // 8. result is array. + result = [ + key, + value + ]; + break; + } + // 2. Return CreateIterResultObject(result, false). + return { + value: result, + done: false + }; } } - execute(data) { - $g40fK$assert(this.ptr != null); - $g40fK$assert($a143ded4cac78640$var$currentParser == null); - $g40fK$assert(!this.paused); - const { socket: socket, llhttp: llhttp } = this; - if (data.length > $a143ded4cac78640$var$currentBufferSize) { - if ($a143ded4cac78640$var$currentBufferPtr) llhttp.free($a143ded4cac78640$var$currentBufferPtr); - $a143ded4cac78640$var$currentBufferSize = Math.ceil(data.length / 4096) * 4096; - $a143ded4cac78640$var$currentBufferPtr = llhttp.malloc($a143ded4cac78640$var$currentBufferSize); + // https://webidl.spec.whatwg.org/#dfn-iterator-prototype-object + // @ts-ignore + delete FastIterableIterator.prototype.constructor; + Object.setPrototypeOf(FastIterableIterator.prototype, $581c5a7a077d7ca7$var$esIteratorPrototype); + Object.defineProperties(FastIterableIterator.prototype, { + [Symbol.toStringTag]: { + writable: false, + enumerable: false, + configurable: true, + value: `${name} Iterator` + }, + next: { + writable: true, + enumerable: true, + configurable: true } - new Uint8Array(llhttp.memory.buffer, $a143ded4cac78640$var$currentBufferPtr, $a143ded4cac78640$var$currentBufferSize).set(data); - // Call `execute` on the wasm parser. - // We pass the `llhttp_parser` pointer address, the pointer address of buffer view data, - // and finally the length of bytes to parse. - // The return value is an error code or `constants.ERROR.OK`. - try { - let ret; - try { - $a143ded4cac78640$var$currentBufferRef = data; - $a143ded4cac78640$var$currentParser = this; - ret = llhttp.llhttp_execute(this.ptr, $a143ded4cac78640$var$currentBufferPtr, data.length); - /* eslint-disable-next-line no-useless-catch */ } catch (err) { - /* istanbul ignore next: difficult to make a test case for */ throw err; - } finally{ - $a143ded4cac78640$var$currentParser = null; - $a143ded4cac78640$var$currentBufferRef = null; - } - const offset = llhttp.llhttp_get_error_pos(this.ptr) - $a143ded4cac78640$var$currentBufferPtr; - if (ret === $fbG2v.ERROR.PAUSED_UPGRADE) this.onUpgrade(data.slice(offset)); - else if (ret === $fbG2v.ERROR.PAUSED) { - this.paused = true; - socket.unshift(data.slice(offset)); - } else if (ret !== $fbG2v.ERROR.OK) { - const ptr = llhttp.llhttp_get_error_reason(this.ptr); - let message = ""; - /* istanbul ignore else: difficult to make a test case for */ if (ptr) { - const len = new Uint8Array(llhttp.memory.buffer, ptr).indexOf(0); - message = "Response does not match the HTTP/1.1 protocol (" + Buffer.from(llhttp.memory.buffer, ptr, len).toString() + ")"; - } - throw new $a143ded4cac78640$require$HTTPParserError(message, $fbG2v.ERROR[ret], data.slice(offset)); + }); + /** + * @param {unknown} target + * @param {'key' | 'value' | 'key+value'} kind + * @returns {IterableIterator} + */ return function(target, kind) { + return new FastIterableIterator(target, kind); + }; +} +/** + * @see https://webidl.spec.whatwg.org/#dfn-iterator-prototype-object + * @param {string} name name of the instance + * @param {any} object class + * @param {symbol} kInternalIterator + * @param {string | number} [keyIndex] + * @param {string | number} [valueIndex] + */ function $581c5a7a077d7ca7$var$iteratorMixin(name, object, kInternalIterator, keyIndex = 0, valueIndex = 1) { + const makeIterator = $581c5a7a077d7ca7$var$createIterator(name, kInternalIterator, keyIndex, valueIndex); + const properties = { + keys: { + writable: true, + enumerable: true, + configurable: true, + value: function keys() { + $581c5a7a077d7ca7$require$webidl.brandCheck(this, object); + return makeIterator(this, 'key'); + } + }, + values: { + writable: true, + enumerable: true, + configurable: true, + value: function values() { + $581c5a7a077d7ca7$require$webidl.brandCheck(this, object); + return makeIterator(this, 'value'); + } + }, + entries: { + writable: true, + enumerable: true, + configurable: true, + value: function entries() { + $581c5a7a077d7ca7$require$webidl.brandCheck(this, object); + return makeIterator(this, 'key+value'); + } + }, + forEach: { + writable: true, + enumerable: true, + configurable: true, + value: function forEach(callbackfn, thisArg = globalThis) { + $581c5a7a077d7ca7$require$webidl.brandCheck(this, object); + $581c5a7a077d7ca7$require$webidl.argumentLengthCheck(arguments, 1, `${name}.forEach`); + if (typeof callbackfn !== 'function') throw new TypeError(`Failed to execute 'forEach' on '${name}': parameter 1 is not of type 'Function'.`); + for (const { 0: key, 1: value } of makeIterator(this, 'key+value'))callbackfn.call(thisArg, value, key, this); } - } catch (err) { - $gv2nV.destroy(socket, err); } + }; + return Object.defineProperties(object.prototype, { + ...properties, + [Symbol.iterator]: { + writable: true, + enumerable: false, + configurable: true, + value: properties.entries.value + } + }); +} +/** + * @see https://fetch.spec.whatwg.org/#body-fully-read + */ async function $581c5a7a077d7ca7$var$fullyReadBody(body, processBody, processBodyError) { + // 1. If taskDestination is null, then set taskDestination to + // the result of starting a new parallel queue. + // 2. Let successSteps given a byte sequence bytes be to queue a + // fetch task to run processBody given bytes, with taskDestination. + const successSteps = processBody; + // 3. Let errorSteps be to queue a fetch task to run processBodyError, + // with taskDestination. + const errorSteps = processBodyError; + // 4. Let reader be the result of getting a reader for body’s stream. + // If that threw an exception, then run errorSteps with that + // exception and return. + let reader; + try { + reader = body.stream.getReader(); + } catch (e) { + errorSteps(e); + return; } - destroy() { - $g40fK$assert(this.ptr != null); - $g40fK$assert($a143ded4cac78640$var$currentParser == null); - this.llhttp.llhttp_free(this.ptr); - this.ptr = null; - $7zkd9.clearTimeout(this.timeout); - this.timeout = null; - this.timeoutValue = null; - this.timeoutType = null; - this.paused = false; - } - onStatus(buf) { - this.statusText = buf.toString(); + // 5. Read all bytes from reader, given successSteps and errorSteps. + try { + successSteps(await $581c5a7a077d7ca7$var$readAllBytes(reader)); + } catch (e) { + errorSteps(e); } - onMessageBegin() { - const { socket: socket, client: client } = this; - /* istanbul ignore next: difficult to make a test case for */ if (socket.destroyed) return -1; - const request = client[$a143ded4cac78640$require$kQueue][client[$a143ded4cac78640$require$kRunningIdx]]; - if (!request) return -1; +} +function $581c5a7a077d7ca7$var$isReadableStreamLike(stream) { + return stream instanceof ReadableStream || stream[Symbol.toStringTag] === 'ReadableStream' && typeof stream.tee === 'function'; +} +/** + * @param {ReadableStreamController} controller + */ function $581c5a7a077d7ca7$var$readableStreamClose(controller) { + try { + controller.close(); + controller.byobRequest?.respond(0); + } catch (err) { + // TODO: add comment explaining why this error occurs. + if (!err.message.includes('Controller is already closed') && !err.message.includes('ReadableStream is already closed')) throw err; } - onHeaderField(buf) { - const len = this.headers.length; - if ((len & 1) === 0) this.headers.push(buf); - else this.headers[len - 1] = Buffer.concat([ - this.headers[len - 1], - buf - ]); - this.trackHeader(buf.length); - } - onHeaderValue(buf) { - let len = this.headers.length; - if ((len & 1) === 1) { - this.headers.push(buf); - len += 1; - } else this.headers[len - 1] = Buffer.concat([ - this.headers[len - 1], - buf - ]); - const key = this.headers[len - 2]; - if (key.length === 10 && key.toString().toLowerCase() === "keep-alive") this.keepAlive += buf.toString(); - else if (key.length === 10 && key.toString().toLowerCase() === "connection") this.connection += buf.toString(); - else if (key.length === 14 && key.toString().toLowerCase() === "content-length") this.contentLength += buf.toString(); - this.trackHeader(buf.length); - } - trackHeader(len) { - this.headersSize += len; - if (this.headersSize >= this.headersMaxSize) $gv2nV.destroy(this.socket, new $a143ded4cac78640$require$HeadersOverflowError()); - } - onUpgrade(head) { - const { upgrade: upgrade, client: client, socket: socket, headers: headers, statusCode: statusCode } = this; - $g40fK$assert(upgrade); - const request = client[$a143ded4cac78640$require$kQueue][client[$a143ded4cac78640$require$kRunningIdx]]; - $g40fK$assert(request); - $g40fK$assert(!socket.destroyed); - $g40fK$assert(socket === client[$a143ded4cac78640$require$kSocket]); - $g40fK$assert(!this.paused); - $g40fK$assert(request.upgrade || request.method === "CONNECT"); - this.statusCode = null; - this.statusText = ""; - this.shouldKeepAlive = null; - $g40fK$assert(this.headers.length % 2 === 0); - this.headers = []; - this.headersSize = 0; - socket.unshift(head); - socket[$a143ded4cac78640$require$kParser].destroy(); - socket[$a143ded4cac78640$require$kParser] = null; - socket[$a143ded4cac78640$require$kClient] = null; - socket[$a143ded4cac78640$require$kError] = null; - socket.removeListener("error", $a143ded4cac78640$var$onSocketError).removeListener("readable", $a143ded4cac78640$var$onSocketReadable).removeListener("end", $a143ded4cac78640$var$onSocketEnd).removeListener("close", $a143ded4cac78640$var$onSocketClose); - client[$a143ded4cac78640$require$kSocket] = null; - client[$a143ded4cac78640$require$kQueue][client[$a143ded4cac78640$require$kRunningIdx]++] = null; - client.emit("disconnect", client[$a143ded4cac78640$require$kUrl], [ - client - ], new $a143ded4cac78640$require$InformationalError("upgrade")); - try { - request.onUpgrade(statusCode, headers, socket); - } catch (err) { - $gv2nV.destroy(socket, err); - } - $a143ded4cac78640$var$resume(client); - } - onHeadersComplete(statusCode, upgrade, shouldKeepAlive) { - const { client: client, socket: socket, headers: headers, statusText: statusText } = this; - /* istanbul ignore next: difficult to make a test case for */ if (socket.destroyed) return -1; - const request = client[$a143ded4cac78640$require$kQueue][client[$a143ded4cac78640$require$kRunningIdx]]; - /* istanbul ignore next: difficult to make a test case for */ if (!request) return -1; - $g40fK$assert(!this.upgrade); - $g40fK$assert(this.statusCode < 200); - if (statusCode === 100) { - $gv2nV.destroy(socket, new $a143ded4cac78640$require$SocketError("bad response", $gv2nV.getSocketInfo(socket))); - return -1; - } - /* this can only happen if server is misbehaving */ if (upgrade && !request.upgrade) { - $gv2nV.destroy(socket, new $a143ded4cac78640$require$SocketError("bad upgrade", $gv2nV.getSocketInfo(socket))); - return -1; - } - $g40fK$assert.strictEqual(this.timeoutType, $a143ded4cac78640$var$TIMEOUT_HEADERS); - this.statusCode = statusCode; - this.shouldKeepAlive = shouldKeepAlive || // Override llhttp value which does not allow keepAlive for HEAD. - request.method === "HEAD" && !socket[$a143ded4cac78640$require$kReset] && this.connection.toLowerCase() === "keep-alive"; - if (this.statusCode >= 200) { - const bodyTimeout = request.bodyTimeout != null ? request.bodyTimeout : client[$a143ded4cac78640$require$kBodyTimeout]; - this.setTimeout(bodyTimeout, $a143ded4cac78640$var$TIMEOUT_BODY); - } else if (this.timeout) // istanbul ignore else: only for jest - { - if (this.timeout.refresh) this.timeout.refresh(); - } - if (request.method === "CONNECT") { - $g40fK$assert(client[$a143ded4cac78640$require$kRunning] === 1); - this.upgrade = true; - return 2; - } - if (upgrade) { - $g40fK$assert(client[$a143ded4cac78640$require$kRunning] === 1); - this.upgrade = true; - return 2; - } - $g40fK$assert(this.headers.length % 2 === 0); - this.headers = []; - this.headersSize = 0; - if (this.shouldKeepAlive && client[$a143ded4cac78640$require$kPipelining]) { - const keepAliveTimeout = this.keepAlive ? $gv2nV.parseKeepAliveTimeout(this.keepAlive) : null; - if (keepAliveTimeout != null) { - const timeout = Math.min(keepAliveTimeout - client[$a143ded4cac78640$require$kKeepAliveTimeoutThreshold], client[$a143ded4cac78640$require$kKeepAliveMaxTimeout]); - if (timeout <= 0) socket[$a143ded4cac78640$require$kReset] = true; - else client[$a143ded4cac78640$require$kKeepAliveTimeoutValue] = timeout; - } else client[$a143ded4cac78640$require$kKeepAliveTimeoutValue] = client[$a143ded4cac78640$require$kKeepAliveDefaultTimeout]; - } else // Stop more requests from being dispatched. - socket[$a143ded4cac78640$require$kReset] = true; - const pause = request.onHeaders(statusCode, headers, this.resume, statusText) === false; - if (request.aborted) return -1; - if (request.method === "HEAD") return 1; - if (statusCode < 200) return 1; - if (socket[$a143ded4cac78640$require$kBlocking]) { - socket[$a143ded4cac78640$require$kBlocking] = false; - $a143ded4cac78640$var$resume(client); - } - return pause ? $fbG2v.ERROR.PAUSED : 0; - } - onBody(buf) { - const { client: client, socket: socket, statusCode: statusCode, maxResponseSize: maxResponseSize } = this; - if (socket.destroyed) return -1; - const request = client[$a143ded4cac78640$require$kQueue][client[$a143ded4cac78640$require$kRunningIdx]]; - $g40fK$assert(request); - $g40fK$assert.strictEqual(this.timeoutType, $a143ded4cac78640$var$TIMEOUT_BODY); - if (this.timeout) // istanbul ignore else: only for jest - { - if (this.timeout.refresh) this.timeout.refresh(); - } - $g40fK$assert(statusCode >= 200); - if (maxResponseSize > -1 && this.bytesRead + buf.length > maxResponseSize) { - $gv2nV.destroy(socket, new $a143ded4cac78640$require$ResponseExceededMaxSizeError()); - return -1; - } - this.bytesRead += buf.length; - if (request.onData(buf) === false) return $fbG2v.ERROR.PAUSED; - } - onMessageComplete() { - const { client: client, socket: socket, statusCode: statusCode, upgrade: upgrade, headers: headers, contentLength: contentLength, bytesRead: bytesRead, shouldKeepAlive: shouldKeepAlive } = this; - if (socket.destroyed && (!statusCode || shouldKeepAlive)) return -1; - if (upgrade) return; - const request = client[$a143ded4cac78640$require$kQueue][client[$a143ded4cac78640$require$kRunningIdx]]; - $g40fK$assert(request); - $g40fK$assert(statusCode >= 100); - this.statusCode = null; - this.statusText = ""; - this.bytesRead = 0; - this.contentLength = ""; - this.keepAlive = ""; - this.connection = ""; - $g40fK$assert(this.headers.length % 2 === 0); - this.headers = []; - this.headersSize = 0; - if (statusCode < 200) return; - /* istanbul ignore next: should be handled by llhttp? */ if (request.method !== "HEAD" && contentLength && bytesRead !== parseInt(contentLength, 10)) { - $gv2nV.destroy(socket, new $a143ded4cac78640$require$ResponseContentLengthMismatchError()); - return -1; - } - request.onComplete(headers); - client[$a143ded4cac78640$require$kQueue][client[$a143ded4cac78640$require$kRunningIdx]++] = null; - if (socket[$a143ded4cac78640$require$kWriting]) { - $g40fK$assert.strictEqual(client[$a143ded4cac78640$require$kRunning], 0); - // Response completed before request. - $gv2nV.destroy(socket, new $a143ded4cac78640$require$InformationalError("reset")); - return $fbG2v.ERROR.PAUSED; - } else if (!shouldKeepAlive) { - $gv2nV.destroy(socket, new $a143ded4cac78640$require$InformationalError("reset")); - return $fbG2v.ERROR.PAUSED; - } else if (socket[$a143ded4cac78640$require$kReset] && client[$a143ded4cac78640$require$kRunning] === 0) { - // Destroy socket once all requests have completed. - // The request at the tail of the pipeline is the one - // that requested reset and no further requests should - // have been queued since then. - $gv2nV.destroy(socket, new $a143ded4cac78640$require$InformationalError("reset")); - return $fbG2v.ERROR.PAUSED; - } else if (client[$a143ded4cac78640$require$kPipelining] === 1) // We must wait a full event loop cycle to reuse this socket to make sure - // that non-spec compliant servers are not closing the connection even if they - // said they won't. - setImmediate($a143ded4cac78640$var$resume, client); - else $a143ded4cac78640$var$resume(client); - } -} -function $a143ded4cac78640$var$onParserTimeout(parser) { - const { socket: socket, timeoutType: timeoutType, client: client } = parser; - /* istanbul ignore else */ if (timeoutType === $a143ded4cac78640$var$TIMEOUT_HEADERS) { - if (!socket[$a143ded4cac78640$require$kWriting] || socket.writableNeedDrain || client[$a143ded4cac78640$require$kRunning] > 1) { - $g40fK$assert(!parser.paused, "cannot be paused while waiting for headers"); - $gv2nV.destroy(socket, new $a143ded4cac78640$require$HeadersTimeoutError()); - } - } else if (timeoutType === $a143ded4cac78640$var$TIMEOUT_BODY) { - if (!parser.paused) $gv2nV.destroy(socket, new $a143ded4cac78640$require$BodyTimeoutError()); - } else if (timeoutType === $a143ded4cac78640$var$TIMEOUT_IDLE) { - $g40fK$assert(client[$a143ded4cac78640$require$kRunning] === 0 && client[$a143ded4cac78640$require$kKeepAliveTimeoutValue]); - $gv2nV.destroy(socket, new $a143ded4cac78640$require$InformationalError("socket idle timeout")); +} +const $581c5a7a077d7ca7$var$invalidIsomorphicEncodeValueRegex = /[^\x00-\xFF]/ // eslint-disable-line +; +/** + * @see https://infra.spec.whatwg.org/#isomorphic-encode + * @param {string} input + */ function $581c5a7a077d7ca7$var$isomorphicEncode(input) { + // 1. Assert: input contains no code points greater than U+00FF. + $in2sP$nodeassert(!$581c5a7a077d7ca7$var$invalidIsomorphicEncodeValueRegex.test(input)); + // 2. Return a byte sequence whose length is equal to input’s code + // point length and whose bytes have the same values as the + // values of input’s code points, in the same order + return input; +} +/** + * @see https://streams.spec.whatwg.org/#readablestreamdefaultreader-read-all-bytes + * @see https://streams.spec.whatwg.org/#read-loop + * @param {ReadableStreamDefaultReader} reader + */ async function $581c5a7a077d7ca7$var$readAllBytes(reader) { + const bytes = []; + let byteLength = 0; + while(true){ + const { done: done, value: chunk } = await reader.read(); + if (done) // 1. Call successSteps with bytes. + return Buffer.concat(bytes, byteLength); + // 1. If chunk is not a Uint8Array object, call failureSteps + // with a TypeError and abort these steps. + if (!$581c5a7a077d7ca7$require$isUint8Array(chunk)) throw new TypeError('Received non-Uint8Array chunk'); + // 2. Append the bytes represented by chunk to bytes. + bytes.push(chunk); + byteLength += chunk.length; + // 3. Read-loop given reader, bytes, successSteps, and failureSteps. } } -function $a143ded4cac78640$var$onSocketReadable() { - const { [$a143ded4cac78640$require$kParser]: parser } = this; - if (parser) parser.readMore(); +/** + * @see https://fetch.spec.whatwg.org/#is-local + * @param {URL} url + */ function $581c5a7a077d7ca7$var$urlIsLocal(url) { + $in2sP$nodeassert('protocol' in url) // ensure it's a url object + ; + const protocol = url.protocol; + return protocol === 'about:' || protocol === 'blob:' || protocol === 'data:'; } -function $a143ded4cac78640$var$onSocketError(err) { - const { [$a143ded4cac78640$require$kClient]: client, [$a143ded4cac78640$require$kParser]: parser } = this; - $g40fK$assert(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); - if (client[$a143ded4cac78640$require$kHTTPConnVersion] !== "h2") // On Mac OS, we get an ECONNRESET even if there is a full body to be forwarded - // to the user. - { - if (err.code === "ECONNRESET" && parser.statusCode && !parser.shouldKeepAlive) { - // We treat all incoming data so for as a valid response. - parser.onMessageComplete(); - return; - } - } - this[$a143ded4cac78640$require$kError] = err; - $a143ded4cac78640$var$onError(this[$a143ded4cac78640$require$kClient], err); +/** + * @param {string|URL} url + * @returns {boolean} + */ function $581c5a7a077d7ca7$var$urlHasHttpsScheme(url) { + return typeof url === 'string' && url[5] === ':' && url[0] === 'h' && url[1] === 't' && url[2] === 't' && url[3] === 'p' && url[4] === 's' || url.protocol === 'https:'; } -function $a143ded4cac78640$var$onError(client, err) { - if (client[$a143ded4cac78640$require$kRunning] === 0 && err.code !== "UND_ERR_INFO" && err.code !== "UND_ERR_SOCKET") { - // Error is not caused by running request and not a recoverable - // socket error. - $g40fK$assert(client[$a143ded4cac78640$require$kPendingIdx] === client[$a143ded4cac78640$require$kRunningIdx]); - const requests = client[$a143ded4cac78640$require$kQueue].splice(client[$a143ded4cac78640$require$kRunningIdx]); - for(let i = 0; i < requests.length; i++){ - const request = requests[i]; - $a143ded4cac78640$var$errorRequest(client, request, err); - } - $g40fK$assert(client[$a143ded4cac78640$require$kSize] === 0); - } +/** + * @see https://fetch.spec.whatwg.org/#http-scheme + * @param {URL} url + */ function $581c5a7a077d7ca7$var$urlIsHttpHttpsScheme(url) { + $in2sP$nodeassert('protocol' in url) // ensure it's a url object + ; + const protocol = url.protocol; + return protocol === 'http:' || protocol === 'https:'; } -function $a143ded4cac78640$var$onSocketEnd() { - const { [$a143ded4cac78640$require$kParser]: parser, [$a143ded4cac78640$require$kClient]: client } = this; - if (client[$a143ded4cac78640$require$kHTTPConnVersion] !== "h2") { - if (parser.statusCode && !parser.shouldKeepAlive) { - // We treat all incoming data so far as a valid response. - parser.onMessageComplete(); - return; - } - } - $gv2nV.destroy(this, new $a143ded4cac78640$require$SocketError("other side closed", $gv2nV.getSocketInfo(this))); +/** + * @see https://fetch.spec.whatwg.org/#simple-range-header-value + * @param {string} value + * @param {boolean} allowWhitespace + */ function $581c5a7a077d7ca7$var$simpleRangeHeaderValue(value, allowWhitespace) { + // 1. Let data be the isomorphic decoding of value. + // Note: isomorphic decoding takes a sequence of bytes (ie. a Uint8Array) and turns it into a string, + // nothing more. We obviously don't need to do that if value is a string already. + const data = value; + // 2. If data does not start with "bytes", then return failure. + if (!data.startsWith('bytes')) return 'failure'; + // 3. Let position be a position variable for data, initially pointing at the 5th code point of data. + const position = { + position: 5 + }; + // 4. If allowWhitespace is true, collect a sequence of code points that are HTTP tab or space, + // from data given position. + if (allowWhitespace) $581c5a7a077d7ca7$require$collectASequenceOfCodePoints((char)=>char === '\t' || char === ' ', data, position); + // 5. If the code point at position within data is not U+003D (=), then return failure. + if (data.charCodeAt(position.position) !== 0x3D) return 'failure'; + // 6. Advance position by 1. + position.position++; + // 7. If allowWhitespace is true, collect a sequence of code points that are HTTP tab or space, from + // data given position. + if (allowWhitespace) $581c5a7a077d7ca7$require$collectASequenceOfCodePoints((char)=>char === '\t' || char === ' ', data, position); + // 8. Let rangeStart be the result of collecting a sequence of code points that are ASCII digits, + // from data given position. + const rangeStart = $581c5a7a077d7ca7$require$collectASequenceOfCodePoints((char)=>{ + const code = char.charCodeAt(0); + return code >= 0x30 && code <= 0x39; + }, data, position); + // 9. Let rangeStartValue be rangeStart, interpreted as decimal number, if rangeStart is not the + // empty string; otherwise null. + const rangeStartValue = rangeStart.length ? Number(rangeStart) : null; + // 10. If allowWhitespace is true, collect a sequence of code points that are HTTP tab or space, + // from data given position. + if (allowWhitespace) $581c5a7a077d7ca7$require$collectASequenceOfCodePoints((char)=>char === '\t' || char === ' ', data, position); + // 11. If the code point at position within data is not U+002D (-), then return failure. + if (data.charCodeAt(position.position) !== 0x2D) return 'failure'; + // 12. Advance position by 1. + position.position++; + // 13. If allowWhitespace is true, collect a sequence of code points that are HTTP tab + // or space, from data given position. + // Note from Khafra: its the same step as in #8 again lol + if (allowWhitespace) $581c5a7a077d7ca7$require$collectASequenceOfCodePoints((char)=>char === '\t' || char === ' ', data, position); + // 14. Let rangeEnd be the result of collecting a sequence of code points that are + // ASCII digits, from data given position. + // Note from Khafra: you wouldn't guess it, but this is also the same step as #8 + const rangeEnd = $581c5a7a077d7ca7$require$collectASequenceOfCodePoints((char)=>{ + const code = char.charCodeAt(0); + return code >= 0x30 && code <= 0x39; + }, data, position); + // 15. Let rangeEndValue be rangeEnd, interpreted as decimal number, if rangeEnd + // is not the empty string; otherwise null. + // Note from Khafra: THE SAME STEP, AGAIN!!! + // Note: why interpret as a decimal if we only collect ascii digits? + const rangeEndValue = rangeEnd.length ? Number(rangeEnd) : null; + // 16. If position is not past the end of data, then return failure. + if (position.position < data.length) return 'failure'; + // 17. If rangeEndValue and rangeStartValue are null, then return failure. + if (rangeEndValue === null && rangeStartValue === null) return 'failure'; + // 18. If rangeStartValue and rangeEndValue are numbers, and rangeStartValue is + // greater than rangeEndValue, then return failure. + // Note: ... when can they not be numbers? + if (rangeStartValue > rangeEndValue) return 'failure'; + // 19. Return (rangeStartValue, rangeEndValue). + return { + rangeStartValue: rangeStartValue, + rangeEndValue: rangeEndValue + }; } -function $a143ded4cac78640$var$onSocketClose() { - const { [$a143ded4cac78640$require$kClient]: client, [$a143ded4cac78640$require$kParser]: parser } = this; - if (client[$a143ded4cac78640$require$kHTTPConnVersion] === "h1" && parser) { - if (!this[$a143ded4cac78640$require$kError] && parser.statusCode && !parser.shouldKeepAlive) // We treat all incoming data so far as a valid response. - parser.onMessageComplete(); - this[$a143ded4cac78640$require$kParser].destroy(); - this[$a143ded4cac78640$require$kParser] = null; +/** + * @see https://fetch.spec.whatwg.org/#build-a-content-range + * @param {number} rangeStart + * @param {number} rangeEnd + * @param {number} fullLength + */ function $581c5a7a077d7ca7$var$buildContentRange(rangeStart, rangeEnd, fullLength) { + // 1. Let contentRange be `bytes `. + let contentRange = 'bytes '; + // 2. Append rangeStart, serialized and isomorphic encoded, to contentRange. + contentRange += $581c5a7a077d7ca7$var$isomorphicEncode(`${rangeStart}`); + // 3. Append 0x2D (-) to contentRange. + contentRange += '-'; + // 4. Append rangeEnd, serialized and isomorphic encoded to contentRange. + contentRange += $581c5a7a077d7ca7$var$isomorphicEncode(`${rangeEnd}`); + // 5. Append 0x2F (/) to contentRange. + contentRange += '/'; + // 6. Append fullLength, serialized and isomorphic encoded to contentRange. + contentRange += $581c5a7a077d7ca7$var$isomorphicEncode(`${fullLength}`); + // 7. Return contentRange. + return contentRange; +} +// A Stream, which pipes the response to zlib.createInflate() or +// zlib.createInflateRaw() depending on the first byte of the Buffer. +// If the lower byte of the first byte is 0x08, then the stream is +// interpreted as a zlib stream, otherwise it's interpreted as a +// raw deflate stream. +class $581c5a7a077d7ca7$var$InflateStream extends $581c5a7a077d7ca7$require$Transform { + #zlibOptions; + /** @param {zlib.ZlibOptions} [zlibOptions] */ constructor(zlibOptions){ + super(); + this.#zlibOptions = zlibOptions; } - const err = this[$a143ded4cac78640$require$kError] || new $a143ded4cac78640$require$SocketError("closed", $gv2nV.getSocketInfo(this)); - client[$a143ded4cac78640$require$kSocket] = null; - if (client.destroyed) { - $g40fK$assert(client[$a143ded4cac78640$require$kPending] === 0); - // Fail entire queue. - const requests = client[$a143ded4cac78640$require$kQueue].splice(client[$a143ded4cac78640$require$kRunningIdx]); - for(let i = 0; i < requests.length; i++){ - const request = requests[i]; - $a143ded4cac78640$var$errorRequest(client, request, err); + _transform(chunk, encoding, callback) { + if (!this._inflateStream) { + if (chunk.length === 0) { + callback(); + return; + } + this._inflateStream = (chunk[0] & 0x0F) === 0x08 ? $in2sP$nodezlib.createInflate(this.#zlibOptions) : $in2sP$nodezlib.createInflateRaw(this.#zlibOptions); + this._inflateStream.on('data', this.push.bind(this)); + this._inflateStream.on('end', ()=>this.push(null)); + this._inflateStream.on('error', (err)=>this.destroy(err)); } - } else if (client[$a143ded4cac78640$require$kRunning] > 0 && err.code !== "UND_ERR_INFO") { - // Fail head of pipeline. - const request = client[$a143ded4cac78640$require$kQueue][client[$a143ded4cac78640$require$kRunningIdx]]; - client[$a143ded4cac78640$require$kQueue][client[$a143ded4cac78640$require$kRunningIdx]++] = null; - $a143ded4cac78640$var$errorRequest(client, request, err); + this._inflateStream.write(chunk, encoding, callback); } - client[$a143ded4cac78640$require$kPendingIdx] = client[$a143ded4cac78640$require$kRunningIdx]; - $g40fK$assert(client[$a143ded4cac78640$require$kRunning] === 0); - client.emit("disconnect", client[$a143ded4cac78640$require$kUrl], [ - client - ], err); - $a143ded4cac78640$var$resume(client); -} -async function $a143ded4cac78640$var$connect(client) { - $g40fK$assert(!client[$a143ded4cac78640$require$kConnecting]); - $g40fK$assert(!client[$a143ded4cac78640$require$kSocket]); - let { host: host, hostname: hostname, protocol: protocol, port: port } = client[$a143ded4cac78640$require$kUrl]; - // Resolve ipv6 - if (hostname[0] === "[") { - const idx = hostname.indexOf("]"); - $g40fK$assert(idx !== -1); - const ip = hostname.substring(1, idx); - $g40fK$assert($g40fK$net.isIP(ip)); - hostname = ip; - } - client[$a143ded4cac78640$require$kConnecting] = true; - if ($a143ded4cac78640$var$channels.beforeConnect.hasSubscribers) $a143ded4cac78640$var$channels.beforeConnect.publish({ - connectParams: { - host: host, - hostname: hostname, - protocol: protocol, - port: port, - servername: client[$a143ded4cac78640$require$kServerName], - localAddress: client[$a143ded4cac78640$require$kLocalAddress] - }, - connector: client[$a143ded4cac78640$require$kConnector] - }); - try { - const socket = await new Promise((resolve, reject)=>{ - client[$a143ded4cac78640$require$kConnector]({ - host: host, - hostname: hostname, - protocol: protocol, - port: port, - servername: client[$a143ded4cac78640$require$kServerName], - localAddress: client[$a143ded4cac78640$require$kLocalAddress] - }, (err, socket)=>{ - if (err) reject(err); - else resolve(socket); - }); - }); - if (client.destroyed) { - $gv2nV.destroy(socket.on("error", ()=>{}), new $a143ded4cac78640$require$ClientDestroyedError()); - return; + _final(callback) { + if (this._inflateStream) { + this._inflateStream.end(); + this._inflateStream = null; } - client[$a143ded4cac78640$require$kConnecting] = false; - $g40fK$assert(socket); - const isH2 = socket.alpnProtocol === "h2"; - if (isH2) { - if (!$a143ded4cac78640$var$h2ExperimentalWarned) { - $a143ded4cac78640$var$h2ExperimentalWarned = true; - process.emitWarning("H2 support is experimental, expect them to change at any time.", { - code: "UNDICI-H2" - }); - } - const session = $a143ded4cac78640$var$http2.connect(client[$a143ded4cac78640$require$kUrl], { - createConnection: ()=>socket, - peerMaxConcurrentStreams: client[$a143ded4cac78640$require$kHTTP2SessionState].maxConcurrentStreams - }); - client[$a143ded4cac78640$require$kHTTPConnVersion] = "h2"; - session[$a143ded4cac78640$require$kClient] = client; - session[$a143ded4cac78640$require$kSocket] = socket; - session.on("error", $a143ded4cac78640$var$onHttp2SessionError); - session.on("frameError", $a143ded4cac78640$var$onHttp2FrameError); - session.on("end", $a143ded4cac78640$var$onHttp2SessionEnd); - session.on("goaway", $a143ded4cac78640$var$onHTTP2GoAway); - session.on("close", $a143ded4cac78640$var$onSocketClose); - session.unref(); - client[$a143ded4cac78640$require$kHTTP2Session] = session; - socket[$a143ded4cac78640$require$kHTTP2Session] = session; - } else { - if (!$a143ded4cac78640$var$llhttpInstance) { - $a143ded4cac78640$var$llhttpInstance = await $a143ded4cac78640$var$llhttpPromise; - $a143ded4cac78640$var$llhttpPromise = null; - } - socket[$a143ded4cac78640$require$kNoRef] = false; - socket[$a143ded4cac78640$require$kWriting] = false; - socket[$a143ded4cac78640$require$kReset] = false; - socket[$a143ded4cac78640$require$kBlocking] = false; - socket[$a143ded4cac78640$require$kParser] = new $a143ded4cac78640$var$Parser(client, socket, $a143ded4cac78640$var$llhttpInstance); - } - socket[$a143ded4cac78640$require$kCounter] = 0; - socket[$a143ded4cac78640$require$kMaxRequests] = client[$a143ded4cac78640$require$kMaxRequests]; - socket[$a143ded4cac78640$require$kClient] = client; - socket[$a143ded4cac78640$require$kError] = null; - socket.on("error", $a143ded4cac78640$var$onSocketError).on("readable", $a143ded4cac78640$var$onSocketReadable).on("end", $a143ded4cac78640$var$onSocketEnd).on("close", $a143ded4cac78640$var$onSocketClose); - client[$a143ded4cac78640$require$kSocket] = socket; - if ($a143ded4cac78640$var$channels.connected.hasSubscribers) $a143ded4cac78640$var$channels.connected.publish({ - connectParams: { - host: host, - hostname: hostname, - protocol: protocol, - port: port, - servername: client[$a143ded4cac78640$require$kServerName], - localAddress: client[$a143ded4cac78640$require$kLocalAddress] - }, - connector: client[$a143ded4cac78640$require$kConnector], - socket: socket - }); - client.emit("connect", client[$a143ded4cac78640$require$kUrl], [ - client - ]); - } catch (err) { - if (client.destroyed) return; - client[$a143ded4cac78640$require$kConnecting] = false; - if ($a143ded4cac78640$var$channels.connectError.hasSubscribers) $a143ded4cac78640$var$channels.connectError.publish({ - connectParams: { - host: host, - hostname: hostname, - protocol: protocol, - port: port, - servername: client[$a143ded4cac78640$require$kServerName], - localAddress: client[$a143ded4cac78640$require$kLocalAddress] - }, - connector: client[$a143ded4cac78640$require$kConnector], - error: err - }); - if (err.code === "ERR_TLS_CERT_ALTNAME_INVALID") { - $g40fK$assert(client[$a143ded4cac78640$require$kRunning] === 0); - while(client[$a143ded4cac78640$require$kPending] > 0 && client[$a143ded4cac78640$require$kQueue][client[$a143ded4cac78640$require$kPendingIdx]].servername === client[$a143ded4cac78640$require$kServerName]){ - const request = client[$a143ded4cac78640$require$kQueue][client[$a143ded4cac78640$require$kPendingIdx]++]; - $a143ded4cac78640$var$errorRequest(client, request, err); - } - } else $a143ded4cac78640$var$onError(client, err); - client.emit("connectionError", client[$a143ded4cac78640$require$kUrl], [ - client - ], err); + callback(); } - $a143ded4cac78640$var$resume(client); } -function $a143ded4cac78640$var$emitDrain(client) { - client[$a143ded4cac78640$require$kNeedDrain] = 0; - client.emit("drain", client[$a143ded4cac78640$require$kUrl], [ - client - ]); +/** + * @param {zlib.ZlibOptions} [zlibOptions] + * @returns {InflateStream} + */ function $581c5a7a077d7ca7$var$createInflate(zlibOptions) { + return new $581c5a7a077d7ca7$var$InflateStream(zlibOptions); } -function $a143ded4cac78640$var$resume(client, sync) { - if (client[$a143ded4cac78640$require$kResuming] === 2) return; - client[$a143ded4cac78640$require$kResuming] = 2; - $a143ded4cac78640$var$_resume(client, sync); - client[$a143ded4cac78640$require$kResuming] = 0; - if (client[$a143ded4cac78640$require$kRunningIdx] > 256) { - client[$a143ded4cac78640$require$kQueue].splice(0, client[$a143ded4cac78640$require$kRunningIdx]); - client[$a143ded4cac78640$require$kPendingIdx] -= client[$a143ded4cac78640$require$kRunningIdx]; - client[$a143ded4cac78640$require$kRunningIdx] = 0; - } +/** + * @see https://fetch.spec.whatwg.org/#concept-header-extract-mime-type + * @param {import('./headers').HeadersList} headers + */ function $581c5a7a077d7ca7$var$extractMimeType(headers) { + // 1. Let charset be null. + let charset = null; + // 2. Let essence be null. + let essence = null; + // 3. Let mimeType be null. + let mimeType = null; + // 4. Let values be the result of getting, decoding, and splitting `Content-Type` from headers. + const values = $581c5a7a077d7ca7$var$getDecodeSplit('content-type', headers); + // 5. If values is null, then return failure. + if (values === null) return 'failure'; + // 6. For each value of values: + for (const value of values){ + // 6.1. Let temporaryMimeType be the result of parsing value. + const temporaryMimeType = $581c5a7a077d7ca7$require$parseMIMEType(value); + // 6.2. If temporaryMimeType is failure or its essence is "*/*", then continue. + if (temporaryMimeType === 'failure' || temporaryMimeType.essence === '*/*') continue; + // 6.3. Set mimeType to temporaryMimeType. + mimeType = temporaryMimeType; + // 6.4. If mimeType’s essence is not essence, then: + if (mimeType.essence !== essence) { + // 6.4.1. Set charset to null. + charset = null; + // 6.4.2. If mimeType’s parameters["charset"] exists, then set charset to + // mimeType’s parameters["charset"]. + if (mimeType.parameters.has('charset')) charset = mimeType.parameters.get('charset'); + // 6.4.3. Set essence to mimeType’s essence. + essence = mimeType.essence; + } else if (!mimeType.parameters.has('charset') && charset !== null) // 6.5. Otherwise, if mimeType’s parameters["charset"] does not exist, and + // charset is non-null, set mimeType’s parameters["charset"] to charset. + mimeType.parameters.set('charset', charset); + } + // 7. If mimeType is null, then return failure. + if (mimeType == null) return 'failure'; + // 8. Return mimeType. + return mimeType; } -function $a143ded4cac78640$var$_resume(client, sync) { - while(true){ - if (client.destroyed) { - $g40fK$assert(client[$a143ded4cac78640$require$kPending] === 0); - return; - } - if (client[$a143ded4cac78640$var$kClosedResolve] && !client[$a143ded4cac78640$require$kSize]) { - client[$a143ded4cac78640$var$kClosedResolve](); - client[$a143ded4cac78640$var$kClosedResolve] = null; - return; - } - const socket = client[$a143ded4cac78640$require$kSocket]; - if (socket && !socket.destroyed && socket.alpnProtocol !== "h2") { - if (client[$a143ded4cac78640$require$kSize] === 0) { - if (!socket[$a143ded4cac78640$require$kNoRef] && socket.unref) { - socket.unref(); - socket[$a143ded4cac78640$require$kNoRef] = true; - } - } else if (socket[$a143ded4cac78640$require$kNoRef] && socket.ref) { - socket.ref(); - socket[$a143ded4cac78640$require$kNoRef] = false; - } - if (client[$a143ded4cac78640$require$kSize] === 0) { - if (socket[$a143ded4cac78640$require$kParser].timeoutType !== $a143ded4cac78640$var$TIMEOUT_IDLE) socket[$a143ded4cac78640$require$kParser].setTimeout(client[$a143ded4cac78640$require$kKeepAliveTimeoutValue], $a143ded4cac78640$var$TIMEOUT_IDLE); - } else if (client[$a143ded4cac78640$require$kRunning] > 0 && socket[$a143ded4cac78640$require$kParser].statusCode < 200) { - if (socket[$a143ded4cac78640$require$kParser].timeoutType !== $a143ded4cac78640$var$TIMEOUT_HEADERS) { - const request = client[$a143ded4cac78640$require$kQueue][client[$a143ded4cac78640$require$kRunningIdx]]; - const headersTimeout = request.headersTimeout != null ? request.headersTimeout : client[$a143ded4cac78640$require$kHeadersTimeout]; - socket[$a143ded4cac78640$require$kParser].setTimeout(headersTimeout, $a143ded4cac78640$var$TIMEOUT_HEADERS); - } - } - } - if (client[$a143ded4cac78640$require$kBusy]) client[$a143ded4cac78640$require$kNeedDrain] = 2; - else if (client[$a143ded4cac78640$require$kNeedDrain] === 2) { - if (sync) { - client[$a143ded4cac78640$require$kNeedDrain] = 1; - process.nextTick($a143ded4cac78640$var$emitDrain, client); - } else $a143ded4cac78640$var$emitDrain(client); - continue; - } - if (client[$a143ded4cac78640$require$kPending] === 0) return; - if (client[$a143ded4cac78640$require$kRunning] >= (client[$a143ded4cac78640$require$kPipelining] || 1)) return; - const request = client[$a143ded4cac78640$require$kQueue][client[$a143ded4cac78640$require$kPendingIdx]]; - if (client[$a143ded4cac78640$require$kUrl].protocol === "https:" && client[$a143ded4cac78640$require$kServerName] !== request.servername) { - if (client[$a143ded4cac78640$require$kRunning] > 0) return; - client[$a143ded4cac78640$require$kServerName] = request.servername; - if (socket && socket.servername !== request.servername) { - $gv2nV.destroy(socket, new $a143ded4cac78640$require$InformationalError("servername changed")); - return; +/** + * @see https://fetch.spec.whatwg.org/#header-value-get-decode-and-split + * @param {string|null} value + */ function $581c5a7a077d7ca7$var$gettingDecodingSplitting(value) { + // 1. Let input be the result of isomorphic decoding value. + const input = value; + // 2. Let position be a position variable for input, initially pointing at the start of input. + const position = { + position: 0 + }; + // 3. Let values be a list of strings, initially empty. + const values = []; + // 4. Let temporaryValue be the empty string. + let temporaryValue = ''; + // 5. While position is not past the end of input: + while(position.position < input.length){ + // 5.1. Append the result of collecting a sequence of code points that are not U+0022 (") + // or U+002C (,) from input, given position, to temporaryValue. + temporaryValue += $581c5a7a077d7ca7$require$collectASequenceOfCodePoints((char)=>char !== '"' && char !== ',', input, position); + // 5.2. If position is not past the end of input, then: + if (position.position < input.length) { + // 5.2.1. If the code point at position within input is U+0022 ("), then: + if (input.charCodeAt(position.position) === 0x22) { + // 5.2.1.1. Append the result of collecting an HTTP quoted string from input, given position, to temporaryValue. + temporaryValue += $581c5a7a077d7ca7$require$collectAnHTTPQuotedString(input, position); + // 5.2.1.2. If position is not past the end of input, then continue. + if (position.position < input.length) continue; + } else { + // 5.2.2. Otherwise: + // 5.2.2.1. Assert: the code point at position within input is U+002C (,). + $in2sP$nodeassert(input.charCodeAt(position.position) === 0x2C); + // 5.2.2.2. Advance position by 1. + position.position++; } } - if (client[$a143ded4cac78640$require$kConnecting]) return; - if (!socket && !client[$a143ded4cac78640$require$kHTTP2Session]) { - $a143ded4cac78640$var$connect(client); - return; - } - if (socket.destroyed || socket[$a143ded4cac78640$require$kWriting] || socket[$a143ded4cac78640$require$kReset] || socket[$a143ded4cac78640$require$kBlocking]) return; - if (client[$a143ded4cac78640$require$kRunning] > 0 && !request.idempotent) // Non-idempotent request cannot be retried. - // Ensure that no other requests are inflight and - // could cause failure. - return; - if (client[$a143ded4cac78640$require$kRunning] > 0 && (request.upgrade || request.method === "CONNECT")) // Don't dispatch an upgrade until all preceding requests have completed. - // A misbehaving server might upgrade the connection before all pipelined - // request has completed. - return; - if (client[$a143ded4cac78640$require$kRunning] > 0 && $gv2nV.bodyLength(request.body) !== 0 && ($gv2nV.isStream(request.body) || $gv2nV.isAsyncIterable(request.body))) // Request with stream or iterator body can error while other requests - // are inflight and indirectly error those as well. - // Ensure this doesn't happen by waiting for inflight - // to complete before dispatching. - // Request with stream or iterator body cannot be retried. - // Ensure that no other requests are inflight and - // could cause failure. - return; - if (!request.aborted && $a143ded4cac78640$var$write(client, request)) client[$a143ded4cac78640$require$kPendingIdx]++; - else client[$a143ded4cac78640$require$kQueue].splice(client[$a143ded4cac78640$require$kPendingIdx], 1); + // 5.3. Remove all HTTP tab or space from the start and end of temporaryValue. + temporaryValue = $581c5a7a077d7ca7$require$removeChars(temporaryValue, true, true, (char)=>char === 0x9 || char === 0x20); + // 5.4. Append temporaryValue to values. + values.push(temporaryValue); + // 5.6. Set temporaryValue to the empty string. + temporaryValue = ''; } + // 6. Return values. + return values; } -// https://www.rfc-editor.org/rfc/rfc7230#section-3.3.2 -function $a143ded4cac78640$var$shouldSendContentLength(method) { - return method !== "GET" && method !== "HEAD" && method !== "OPTIONS" && method !== "TRACE" && method !== "CONNECT"; +/** + * @see https://fetch.spec.whatwg.org/#concept-header-list-get-decode-split + * @param {string} name lowercase header name + * @param {import('./headers').HeadersList} list + */ function $581c5a7a077d7ca7$var$getDecodeSplit(name, list) { + // 1. Let value be the result of getting name from list. + const value = list.get(name, true); + // 2. If value is null, then return null. + if (value === null) return null; + // 3. Return the result of getting, decoding, and splitting value. + return $581c5a7a077d7ca7$var$gettingDecodingSplitting(value); +} +const $581c5a7a077d7ca7$var$textDecoder = new TextDecoder(); +/** + * @see https://encoding.spec.whatwg.org/#utf-8-decode + * @param {Buffer} buffer + */ function $581c5a7a077d7ca7$var$utf8DecodeBytes(buffer) { + if (buffer.length === 0) return ''; + // 1. Let buffer be the result of peeking three bytes from + // ioQueue, converted to a byte sequence. + // 2. If buffer is 0xEF 0xBB 0xBF, then read three + // bytes from ioQueue. (Do nothing with those bytes.) + if (buffer[0] === 0xEF && buffer[1] === 0xBB && buffer[2] === 0xBF) buffer = buffer.subarray(3); + // 3. Process a queue with an instance of UTF-8’s + // decoder, ioQueue, output, and "replacement". + const output = $581c5a7a077d7ca7$var$textDecoder.decode(buffer); + // 4. Return output. + return output; } -function $a143ded4cac78640$var$write(client, request) { - if (client[$a143ded4cac78640$require$kHTTPConnVersion] === "h2") { - $a143ded4cac78640$var$writeH2(client, client[$a143ded4cac78640$require$kHTTP2Session], request); - return; +class $581c5a7a077d7ca7$var$EnvironmentSettingsObjectBase { + get baseUrl() { + return $581c5a7a077d7ca7$require$getGlobalOrigin(); } - const { body: body, method: method, path: path, host: host, upgrade: upgrade, headers: headers, blocking: blocking, reset: reset } = request; - // https://tools.ietf.org/html/rfc7231#section-4.3.1 - // https://tools.ietf.org/html/rfc7231#section-4.3.2 - // https://tools.ietf.org/html/rfc7231#section-4.3.5 - // Sending a payload body on a request that does not - // expect it can cause undefined behavior on some - // servers and corrupt connection state. Do not - // re-use the connection for further requests. - const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; - if (body && typeof body.read === "function") // Try to read EOF in order to get length. - body.read(0); - const bodyLength = $gv2nV.bodyLength(body); - let contentLength = bodyLength; - if (contentLength === null) contentLength = request.contentLength; - if (contentLength === 0 && !expectsPayload) // https://tools.ietf.org/html/rfc7230#section-3.3.2 - // A user agent SHOULD NOT send a Content-Length header field when - // the request message does not contain a payload body and the method - // semantics do not anticipate such a body. - contentLength = null; - // https://github.com/nodejs/undici/issues/2046 - // A user agent may send a Content-Length header with 0 value, this should be allowed. - if ($a143ded4cac78640$var$shouldSendContentLength(method) && contentLength > 0 && request.contentLength !== null && request.contentLength !== contentLength) { - if (client[$a143ded4cac78640$require$kStrictContentLength]) { - $a143ded4cac78640$var$errorRequest(client, request, new $a143ded4cac78640$require$RequestContentLengthMismatchError()); - return false; - } - process.emitWarning(new $a143ded4cac78640$require$RequestContentLengthMismatchError()); - } - const socket = client[$a143ded4cac78640$require$kSocket]; - try { - request.onConnect((err)=>{ - if (request.aborted || request.completed) return; - $a143ded4cac78640$var$errorRequest(client, request, err || new $a143ded4cac78640$require$RequestAbortedError()); - $gv2nV.destroy(socket, new $a143ded4cac78640$require$InformationalError("aborted")); - }); - } catch (err) { - $a143ded4cac78640$var$errorRequest(client, request, err); + get origin() { + return this.baseUrl?.origin; } - if (request.aborted) return false; - if (method === "HEAD") // https://github.com/mcollina/undici/issues/258 - // Close after a HEAD request to interop with misbehaving servers - // that may send a body in the response. - socket[$a143ded4cac78640$require$kReset] = true; - if (upgrade || method === "CONNECT") // On CONNECT or upgrade, block pipeline from dispatching further - // requests on this connection. - socket[$a143ded4cac78640$require$kReset] = true; - if (reset != null) socket[$a143ded4cac78640$require$kReset] = reset; - if (client[$a143ded4cac78640$require$kMaxRequests] && socket[$a143ded4cac78640$require$kCounter]++ >= client[$a143ded4cac78640$require$kMaxRequests]) socket[$a143ded4cac78640$require$kReset] = true; - if (blocking) socket[$a143ded4cac78640$require$kBlocking] = true; - let header = `${method} ${path} HTTP/1.1\r\n`; - if (typeof host === "string") header += `host: ${host}\r\n`; - else header += client[$a143ded4cac78640$require$kHostHeader]; - if (upgrade) header += `connection: upgrade\r\nupgrade: ${upgrade}\r\n`; - else if (client[$a143ded4cac78640$require$kPipelining] && !socket[$a143ded4cac78640$require$kReset]) header += "connection: keep-alive\r\n"; - else header += "connection: close\r\n"; - if (headers) header += headers; - if ($a143ded4cac78640$var$channels.sendHeaders.hasSubscribers) $a143ded4cac78640$var$channels.sendHeaders.publish({ - request: request, - headers: header, - socket: socket - }); - /* istanbul ignore else: assertion */ if (!body || bodyLength === 0) { - if (contentLength === 0) socket.write(`${header}content-length: 0\r\n\r\n`, "latin1"); - else { - $g40fK$assert(contentLength === null, "no body must not have content length"); - socket.write(`${header}\r\n`, "latin1"); - } - request.onRequestSent(); - } else if ($gv2nV.isBuffer(body)) { - $g40fK$assert(contentLength === body.byteLength, "buffer body must have content length"); - socket.cork(); - socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, "latin1"); - socket.write(body); - socket.uncork(); - request.onBodySent(body); - request.onRequestSent(); - if (!expectsPayload) socket[$a143ded4cac78640$require$kReset] = true; - } else if ($gv2nV.isBlobLike(body)) { - if (typeof body.stream === "function") $a143ded4cac78640$var$writeIterable({ - body: body.stream(), - client: client, - request: request, - socket: socket, - contentLength: contentLength, - header: header, - expectsPayload: expectsPayload - }); - else $a143ded4cac78640$var$writeBlob({ - body: body, - client: client, - request: request, - socket: socket, - contentLength: contentLength, - header: header, - expectsPayload: expectsPayload - }); - } else if ($gv2nV.isStream(body)) $a143ded4cac78640$var$writeStream({ - body: body, - client: client, - request: request, - socket: socket, - contentLength: contentLength, - header: header, - expectsPayload: expectsPayload - }); - else if ($gv2nV.isIterable(body)) $a143ded4cac78640$var$writeIterable({ - body: body, - client: client, - request: request, - socket: socket, - contentLength: contentLength, - header: header, - expectsPayload: expectsPayload - }); - else $g40fK$assert(false); - return true; + policyContainer = $581c5a7a077d7ca7$var$makePolicyContainer(); } -function $a143ded4cac78640$var$writeH2(client, session, request) { - const { body: body, method: method, path: path, host: host, upgrade: upgrade, expectContinue: expectContinue, signal: signal, headers: reqHeaders } = request; - let headers; - if (typeof reqHeaders === "string") headers = $fYRdr[$a143ded4cac78640$require$kHTTP2CopyHeaders](reqHeaders.trim()); - else headers = reqHeaders; - if (upgrade) { - $a143ded4cac78640$var$errorRequest(client, request, new Error("Upgrade not supported for H2")); - return false; - } - try { - // TODO(HTTP/2): Should we call onConnect immediately or on stream ready event? - request.onConnect((err)=>{ - if (request.aborted || request.completed) return; - $a143ded4cac78640$var$errorRequest(client, request, err || new $a143ded4cac78640$require$RequestAbortedError()); - }); - } catch (err) { - $a143ded4cac78640$var$errorRequest(client, request, err); - } - if (request.aborted) return false; - /** @type {import('node:http2').ClientHttp2Stream} */ let stream; - const h2State = client[$a143ded4cac78640$require$kHTTP2SessionState]; - headers[$a143ded4cac78640$var$HTTP2_HEADER_AUTHORITY] = host || client[$a143ded4cac78640$require$kHost]; - headers[$a143ded4cac78640$var$HTTP2_HEADER_METHOD] = method; - if (method === "CONNECT") { - session.ref(); - // we are already connected, streams are pending, first request - // will create a new stream. We trigger a request to create the stream and wait until - // `ready` event is triggered - // We disabled endStream to allow the user to write to the stream - stream = session.request(headers, { - endStream: false, - signal: signal - }); - if (stream.id && !stream.pending) { - request.onUpgrade(null, null, stream); - ++h2State.openStreams; - } else stream.once("ready", ()=>{ - request.onUpgrade(null, null, stream); - ++h2State.openStreams; - }); - stream.once("close", ()=>{ - h2State.openStreams -= 1; - // TODO(HTTP/2): unref only if current streams count is 0 - if (h2State.openStreams === 0) session.unref(); - }); - return true; - } - // https://tools.ietf.org/html/rfc7540#section-8.3 - // :path and :scheme headers must be omited when sending CONNECT - headers[$a143ded4cac78640$var$HTTP2_HEADER_PATH] = path; - headers[$a143ded4cac78640$var$HTTP2_HEADER_SCHEME] = "https"; - // https://tools.ietf.org/html/rfc7231#section-4.3.1 - // https://tools.ietf.org/html/rfc7231#section-4.3.2 - // https://tools.ietf.org/html/rfc7231#section-4.3.5 - // Sending a payload body on a request that does not - // expect it can cause undefined behavior on some - // servers and corrupt connection state. Do not - // re-use the connection for further requests. - const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; - if (body && typeof body.read === "function") // Try to read EOF in order to get length. - body.read(0); - let contentLength = $gv2nV.bodyLength(body); - if (contentLength == null) contentLength = request.contentLength; - if (contentLength === 0 || !expectsPayload) // https://tools.ietf.org/html/rfc7230#section-3.3.2 - // A user agent SHOULD NOT send a Content-Length header field when - // the request message does not contain a payload body and the method - // semantics do not anticipate such a body. - contentLength = null; - // https://github.com/nodejs/undici/issues/2046 - // A user agent may send a Content-Length header with 0 value, this should be allowed. - if ($a143ded4cac78640$var$shouldSendContentLength(method) && contentLength > 0 && request.contentLength != null && request.contentLength !== contentLength) { - if (client[$a143ded4cac78640$require$kStrictContentLength]) { - $a143ded4cac78640$var$errorRequest(client, request, new $a143ded4cac78640$require$RequestContentLengthMismatchError()); - return false; - } - process.emitWarning(new $a143ded4cac78640$require$RequestContentLengthMismatchError()); - } - if (contentLength != null) { - $g40fK$assert(body, "no body must not have content length"); - headers[$a143ded4cac78640$var$HTTP2_HEADER_CONTENT_LENGTH] = `${contentLength}`; - } - session.ref(); - const shouldEndStream = method === "GET" || method === "HEAD"; - if (expectContinue) { - headers[$a143ded4cac78640$var$HTTP2_HEADER_EXPECT] = "100-continue"; - stream = session.request(headers, { - endStream: shouldEndStream, - signal: signal - }); - stream.once("continue", writeBodyH2); - } else { - stream = session.request(headers, { - endStream: shouldEndStream, - signal: signal - }); - writeBodyH2(); - } - // Increment counter as we have new several streams open - ++h2State.openStreams; - stream.once("response", (headers)=>{ - const { [$a143ded4cac78640$var$HTTP2_HEADER_STATUS]: statusCode, ...realHeaders } = headers; - if (request.onHeaders(Number(statusCode), realHeaders, stream.resume.bind(stream), "") === false) stream.pause(); - }); - stream.once("end", ()=>{ - request.onComplete([]); - }); - stream.on("data", (chunk)=>{ - if (request.onData(chunk) === false) stream.pause(); - }); - stream.once("close", ()=>{ - h2State.openStreams -= 1; - // TODO(HTTP/2): unref only if current streams count is 0 - if (h2State.openStreams === 0) session.unref(); - }); - stream.once("error", function(err) { - if (client[$a143ded4cac78640$require$kHTTP2Session] && !client[$a143ded4cac78640$require$kHTTP2Session].destroyed && !this.closed && !this.destroyed) { - h2State.streams -= 1; - $gv2nV.destroy(stream, err); - } - }); - stream.once("frameError", (type, code)=>{ - const err = new $a143ded4cac78640$require$InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`); - $a143ded4cac78640$var$errorRequest(client, request, err); - if (client[$a143ded4cac78640$require$kHTTP2Session] && !client[$a143ded4cac78640$require$kHTTP2Session].destroyed && !this.closed && !this.destroyed) { - h2State.streams -= 1; - $gv2nV.destroy(stream, err); - } - }); - // stream.on('aborted', () => { - // // TODO(HTTP/2): Support aborted - // }) - // stream.on('timeout', () => { - // // TODO(HTTP/2): Support timeout - // }) - // stream.on('push', headers => { - // // TODO(HTTP/2): Suppor push - // }) - // stream.on('trailers', headers => { - // // TODO(HTTP/2): Support trailers - // }) - return true; - function writeBodyH2() { - /* istanbul ignore else: assertion */ if (!body) request.onRequestSent(); - else if ($gv2nV.isBuffer(body)) { - $g40fK$assert(contentLength === body.byteLength, "buffer body must have content length"); - stream.cork(); - stream.write(body); - stream.uncork(); - stream.end(); - request.onBodySent(body); - request.onRequestSent(); - } else if ($gv2nV.isBlobLike(body)) { - if (typeof body.stream === "function") $a143ded4cac78640$var$writeIterable({ - client: client, - request: request, - contentLength: contentLength, - h2stream: stream, - expectsPayload: expectsPayload, - body: body.stream(), - socket: client[$a143ded4cac78640$require$kSocket], - header: "" - }); - else $a143ded4cac78640$var$writeBlob({ - body: body, - client: client, - request: request, - contentLength: contentLength, - expectsPayload: expectsPayload, - h2stream: stream, - header: "", - socket: client[$a143ded4cac78640$require$kSocket] - }); - } else if ($gv2nV.isStream(body)) $a143ded4cac78640$var$writeStream({ - body: body, - client: client, - request: request, - contentLength: contentLength, - expectsPayload: expectsPayload, - socket: client[$a143ded4cac78640$require$kSocket], - h2stream: stream, - header: "" - }); - else if ($gv2nV.isIterable(body)) $a143ded4cac78640$var$writeIterable({ - body: body, - client: client, - request: request, - contentLength: contentLength, - expectsPayload: expectsPayload, - header: "", - h2stream: stream, - socket: client[$a143ded4cac78640$require$kSocket] - }); - else $g40fK$assert(false); - } -} -function $a143ded4cac78640$var$writeStream({ h2stream: h2stream, body: body, client: client, request: request, socket: socket, contentLength: contentLength, header: header, expectsPayload: expectsPayload }) { - $g40fK$assert(contentLength !== 0 || client[$a143ded4cac78640$require$kRunning] === 0, "stream body cannot be pipelined"); - if (client[$a143ded4cac78640$require$kHTTPConnVersion] === "h2") { - // For HTTP/2, is enough to pipe the stream - const pipe = $a143ded4cac78640$require$pipeline(body, h2stream, (err)=>{ - if (err) { - $gv2nV.destroy(body, err); - $gv2nV.destroy(h2stream, err); - } else request.onRequestSent(); - }); - pipe.on("data", onPipeData); - pipe.once("end", ()=>{ - pipe.removeListener("data", onPipeData); - $gv2nV.destroy(pipe); - }); - function onPipeData(chunk) { - request.onBodySent(chunk); - } - return; - } - let finished = false; - const writer = new $a143ded4cac78640$var$AsyncWriter({ - socket: socket, - request: request, - contentLength: contentLength, - client: client, - expectsPayload: expectsPayload, - header: header - }); - const onData = function(chunk) { - if (finished) return; - try { - if (!writer.write(chunk) && this.pause) this.pause(); - } catch (err) { - $gv2nV.destroy(this, err); - } - }; - const onDrain = function() { - if (finished) return; - if (body.resume) body.resume(); - }; - const onAbort = function() { - if (finished) return; - const err = new $a143ded4cac78640$require$RequestAbortedError(); - queueMicrotask(()=>onFinished(err)); - }; - const onFinished = function(err) { - if (finished) return; - finished = true; - $g40fK$assert(socket.destroyed || socket[$a143ded4cac78640$require$kWriting] && client[$a143ded4cac78640$require$kRunning] <= 1); - socket.off("drain", onDrain).off("error", onFinished); - body.removeListener("data", onData).removeListener("end", onFinished).removeListener("error", onFinished).removeListener("close", onAbort); - if (!err) try { - writer.end(); - } catch (er) { - err = er; - } - writer.destroy(err); - if (err && (err.code !== "UND_ERR_INFO" || err.message !== "reset")) $gv2nV.destroy(body, err); - else $gv2nV.destroy(body); - }; - 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); +class $581c5a7a077d7ca7$var$EnvironmentSettingsObject { + settingsObject = new $581c5a7a077d7ca7$var$EnvironmentSettingsObjectBase(); } -async function $a143ded4cac78640$var$writeBlob({ h2stream: h2stream, body: body, client: client, request: request, socket: socket, contentLength: contentLength, header: header, expectsPayload: expectsPayload }) { - $g40fK$assert(contentLength === body.size, "blob body must have content length"); - const isH2 = client[$a143ded4cac78640$require$kHTTPConnVersion] === "h2"; - try { - if (contentLength != null && contentLength !== body.size) throw new $a143ded4cac78640$require$RequestContentLengthMismatchError(); - const buffer = Buffer.from(await body.arrayBuffer()); - if (isH2) { - h2stream.cork(); - h2stream.write(buffer); - h2stream.uncork(); - } else { - socket.cork(); - socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, "latin1"); - socket.write(buffer); - socket.uncork(); - } - request.onBodySent(buffer); - request.onRequestSent(); - if (!expectsPayload) socket[$a143ded4cac78640$require$kReset] = true; - $a143ded4cac78640$var$resume(client); - } catch (err) { - $gv2nV.destroy(isH2 ? h2stream : socket, err); - } +const $581c5a7a077d7ca7$var$environmentSettingsObject = new $581c5a7a077d7ca7$var$EnvironmentSettingsObject(); +module.exports = { + isAborted: $581c5a7a077d7ca7$var$isAborted, + isCancelled: $581c5a7a077d7ca7$var$isCancelled, + isValidEncodedURL: $581c5a7a077d7ca7$var$isValidEncodedURL, + createDeferredPromise: $581c5a7a077d7ca7$var$createDeferredPromise, + ReadableStreamFrom: $581c5a7a077d7ca7$require$ReadableStreamFrom, + tryUpgradeRequestToAPotentiallyTrustworthyURL: $581c5a7a077d7ca7$var$tryUpgradeRequestToAPotentiallyTrustworthyURL, + clampAndCoarsenConnectionTimingInfo: $581c5a7a077d7ca7$var$clampAndCoarsenConnectionTimingInfo, + coarsenedSharedCurrentTime: $581c5a7a077d7ca7$var$coarsenedSharedCurrentTime, + determineRequestsReferrer: $581c5a7a077d7ca7$var$determineRequestsReferrer, + makePolicyContainer: $581c5a7a077d7ca7$var$makePolicyContainer, + clonePolicyContainer: $581c5a7a077d7ca7$var$clonePolicyContainer, + appendFetchMetadata: $581c5a7a077d7ca7$var$appendFetchMetadata, + appendRequestOriginHeader: $581c5a7a077d7ca7$var$appendRequestOriginHeader, + TAOCheck: $581c5a7a077d7ca7$var$TAOCheck, + corsCheck: $581c5a7a077d7ca7$var$corsCheck, + crossOriginResourcePolicyCheck: $581c5a7a077d7ca7$var$crossOriginResourcePolicyCheck, + createOpaqueTimingInfo: $581c5a7a077d7ca7$var$createOpaqueTimingInfo, + setRequestReferrerPolicyOnRedirect: $581c5a7a077d7ca7$var$setRequestReferrerPolicyOnRedirect, + isValidHTTPToken: $581c5a7a077d7ca7$require$isValidHTTPToken, + requestBadPort: $581c5a7a077d7ca7$var$requestBadPort, + requestCurrentURL: $581c5a7a077d7ca7$var$requestCurrentURL, + responseURL: $581c5a7a077d7ca7$var$responseURL, + responseLocationURL: $581c5a7a077d7ca7$var$responseLocationURL, + isBlobLike: $581c5a7a077d7ca7$require$isBlobLike, + isURLPotentiallyTrustworthy: $581c5a7a077d7ca7$var$isURLPotentiallyTrustworthy, + isValidReasonPhrase: $581c5a7a077d7ca7$var$isValidReasonPhrase, + sameOrigin: $581c5a7a077d7ca7$var$sameOrigin, + normalizeMethod: $581c5a7a077d7ca7$var$normalizeMethod, + serializeJavascriptValueToJSONString: $581c5a7a077d7ca7$var$serializeJavascriptValueToJSONString, + iteratorMixin: $581c5a7a077d7ca7$var$iteratorMixin, + createIterator: $581c5a7a077d7ca7$var$createIterator, + isValidHeaderName: $581c5a7a077d7ca7$var$isValidHeaderName, + isValidHeaderValue: $581c5a7a077d7ca7$var$isValidHeaderValue, + isErrorLike: $581c5a7a077d7ca7$var$isErrorLike, + fullyReadBody: $581c5a7a077d7ca7$var$fullyReadBody, + bytesMatch: $581c5a7a077d7ca7$var$bytesMatch, + isReadableStreamLike: $581c5a7a077d7ca7$var$isReadableStreamLike, + readableStreamClose: $581c5a7a077d7ca7$var$readableStreamClose, + isomorphicEncode: $581c5a7a077d7ca7$var$isomorphicEncode, + urlIsLocal: $581c5a7a077d7ca7$var$urlIsLocal, + urlHasHttpsScheme: $581c5a7a077d7ca7$var$urlHasHttpsScheme, + urlIsHttpHttpsScheme: $581c5a7a077d7ca7$var$urlIsHttpHttpsScheme, + readAllBytes: $581c5a7a077d7ca7$var$readAllBytes, + simpleRangeHeaderValue: $581c5a7a077d7ca7$var$simpleRangeHeaderValue, + buildContentRange: $581c5a7a077d7ca7$var$buildContentRange, + parseMetadata: $581c5a7a077d7ca7$var$parseMetadata, + createInflate: $581c5a7a077d7ca7$var$createInflate, + extractMimeType: $581c5a7a077d7ca7$var$extractMimeType, + getDecodeSplit: $581c5a7a077d7ca7$var$getDecodeSplit, + utf8DecodeBytes: $581c5a7a077d7ca7$var$utf8DecodeBytes, + environmentSettingsObject: $581c5a7a077d7ca7$var$environmentSettingsObject +}; + +}); +parcelRegister("4nb4n", function(module, exports) { +'use strict'; +const $32f1e594adb5a8a4$var$corsSafeListedMethods = /** @type {const} */ [ + 'GET', + 'HEAD', + 'POST' +]; +const $32f1e594adb5a8a4$var$corsSafeListedMethodsSet = new Set($32f1e594adb5a8a4$var$corsSafeListedMethods); +const $32f1e594adb5a8a4$var$nullBodyStatus = /** @type {const} */ [ + 101, + 204, + 205, + 304 +]; +const $32f1e594adb5a8a4$var$redirectStatus = /** @type {const} */ [ + 301, + 302, + 303, + 307, + 308 +]; +const $32f1e594adb5a8a4$var$redirectStatusSet = new Set($32f1e594adb5a8a4$var$redirectStatus); +/** + * @see https://fetch.spec.whatwg.org/#block-bad-port + */ const $32f1e594adb5a8a4$var$badPorts = /** @type {const} */ [ + '1', + '7', + '9', + '11', + '13', + '15', + '17', + '19', + '20', + '21', + '22', + '23', + '25', + '37', + '42', + '43', + '53', + '69', + '77', + '79', + '87', + '95', + '101', + '102', + '103', + '104', + '109', + '110', + '111', + '113', + '115', + '117', + '119', + '123', + '135', + '137', + '139', + '143', + '161', + '179', + '389', + '427', + '465', + '512', + '513', + '514', + '515', + '526', + '530', + '531', + '532', + '540', + '548', + '554', + '556', + '563', + '587', + '601', + '636', + '989', + '990', + '993', + '995', + '1719', + '1720', + '1723', + '2049', + '3659', + '4045', + '4190', + '5060', + '5061', + '6000', + '6566', + '6665', + '6666', + '6667', + '6668', + '6669', + '6679', + '6697', + '10080' +]; +const $32f1e594adb5a8a4$var$badPortsSet = new Set($32f1e594adb5a8a4$var$badPorts); +/** + * @see https://w3c.github.io/webappsec-referrer-policy/#referrer-policies + */ const $32f1e594adb5a8a4$var$referrerPolicy = /** @type {const} */ [ + '', + 'no-referrer', + 'no-referrer-when-downgrade', + 'same-origin', + 'origin', + 'strict-origin', + 'origin-when-cross-origin', + 'strict-origin-when-cross-origin', + 'unsafe-url' +]; +const $32f1e594adb5a8a4$var$referrerPolicySet = new Set($32f1e594adb5a8a4$var$referrerPolicy); +const $32f1e594adb5a8a4$var$requestRedirect = /** @type {const} */ [ + 'follow', + 'manual', + 'error' +]; +const $32f1e594adb5a8a4$var$safeMethods = /** @type {const} */ [ + 'GET', + 'HEAD', + 'OPTIONS', + 'TRACE' +]; +const $32f1e594adb5a8a4$var$safeMethodsSet = new Set($32f1e594adb5a8a4$var$safeMethods); +const $32f1e594adb5a8a4$var$requestMode = /** @type {const} */ [ + 'navigate', + 'same-origin', + 'no-cors', + 'cors' +]; +const $32f1e594adb5a8a4$var$requestCredentials = /** @type {const} */ [ + 'omit', + 'same-origin', + 'include' +]; +const $32f1e594adb5a8a4$var$requestCache = /** @type {const} */ [ + 'default', + 'no-store', + 'reload', + 'no-cache', + 'force-cache', + 'only-if-cached' +]; +/** + * @see https://fetch.spec.whatwg.org/#request-body-header-name + */ const $32f1e594adb5a8a4$var$requestBodyHeader = /** @type {const} */ [ + 'content-encoding', + 'content-language', + 'content-location', + 'content-type', + // See https://github.com/nodejs/undici/issues/2021 + // 'Content-Length' is a forbidden header name, which is typically + // removed in the Headers implementation. However, undici doesn't + // filter out headers, so we add it here. + 'content-length' +]; +/** + * @see https://fetch.spec.whatwg.org/#enumdef-requestduplex + */ const $32f1e594adb5a8a4$var$requestDuplex = /** @type {const} */ [ + 'half' +]; +/** + * @see http://fetch.spec.whatwg.org/#forbidden-method + */ const $32f1e594adb5a8a4$var$forbiddenMethods = /** @type {const} */ [ + 'CONNECT', + 'TRACE', + 'TRACK' +]; +const $32f1e594adb5a8a4$var$forbiddenMethodsSet = new Set($32f1e594adb5a8a4$var$forbiddenMethods); +const $32f1e594adb5a8a4$var$subresource = /** @type {const} */ [ + 'audio', + 'audioworklet', + 'font', + 'image', + 'manifest', + 'paintworklet', + 'script', + 'style', + 'track', + 'video', + 'xslt', + '' +]; +const $32f1e594adb5a8a4$var$subresourceSet = new Set($32f1e594adb5a8a4$var$subresource); +module.exports = { + subresource: $32f1e594adb5a8a4$var$subresource, + forbiddenMethods: $32f1e594adb5a8a4$var$forbiddenMethods, + requestBodyHeader: $32f1e594adb5a8a4$var$requestBodyHeader, + referrerPolicy: $32f1e594adb5a8a4$var$referrerPolicy, + requestRedirect: $32f1e594adb5a8a4$var$requestRedirect, + requestMode: $32f1e594adb5a8a4$var$requestMode, + requestCredentials: $32f1e594adb5a8a4$var$requestCredentials, + requestCache: $32f1e594adb5a8a4$var$requestCache, + redirectStatus: $32f1e594adb5a8a4$var$redirectStatus, + corsSafeListedMethods: $32f1e594adb5a8a4$var$corsSafeListedMethods, + nullBodyStatus: $32f1e594adb5a8a4$var$nullBodyStatus, + safeMethods: $32f1e594adb5a8a4$var$safeMethods, + badPorts: $32f1e594adb5a8a4$var$badPorts, + requestDuplex: $32f1e594adb5a8a4$var$requestDuplex, + subresourceSet: $32f1e594adb5a8a4$var$subresourceSet, + badPortsSet: $32f1e594adb5a8a4$var$badPortsSet, + redirectStatusSet: $32f1e594adb5a8a4$var$redirectStatusSet, + corsSafeListedMethodsSet: $32f1e594adb5a8a4$var$corsSafeListedMethodsSet, + safeMethodsSet: $32f1e594adb5a8a4$var$safeMethodsSet, + forbiddenMethodsSet: $32f1e594adb5a8a4$var$forbiddenMethodsSet, + referrerPolicySet: $32f1e594adb5a8a4$var$referrerPolicySet +}; + +}); + +parcelRegister("8Dg7Y", function(module, exports) { +'use strict'; +// In case of breaking changes, increase the version +// number to avoid conflicts. +const $648e79d5ccae6461$var$globalOrigin = Symbol.for('undici.globalOrigin.1'); +function $648e79d5ccae6461$var$getGlobalOrigin() { + return globalThis[$648e79d5ccae6461$var$globalOrigin]; } -async function $a143ded4cac78640$var$writeIterable({ h2stream: h2stream, body: body, client: client, request: request, socket: socket, contentLength: contentLength, header: header, expectsPayload: expectsPayload }) { - $g40fK$assert(contentLength !== 0 || client[$a143ded4cac78640$require$kRunning] === 0, "iterator body cannot be pipelined"); - let callback = null; - function onDrain() { - if (callback) { - const cb = callback; - callback = null; - cb(); - } - } - const waitForDrain = ()=>new Promise((resolve, reject)=>{ - $g40fK$assert(callback === null); - if (socket[$a143ded4cac78640$require$kError]) reject(socket[$a143ded4cac78640$require$kError]); - else callback = resolve; +function $648e79d5ccae6461$var$setGlobalOrigin(newOrigin) { + if (newOrigin === undefined) { + Object.defineProperty(globalThis, $648e79d5ccae6461$var$globalOrigin, { + value: undefined, + writable: true, + enumerable: false, + configurable: false }); - if (client[$a143ded4cac78640$require$kHTTPConnVersion] === "h2") { - h2stream.on("close", onDrain).on("drain", onDrain); - try { - // It's up to the user to somehow abort the async iterable. - for await (const chunk of body){ - if (socket[$a143ded4cac78640$require$kError]) throw socket[$a143ded4cac78640$require$kError]; - const res = h2stream.write(chunk); - request.onBodySent(chunk); - if (!res) await waitForDrain(); - } - } catch (err) { - h2stream.destroy(err); - } finally{ - request.onRequestSent(); - h2stream.end(); - h2stream.off("close", onDrain).off("drain", onDrain); - } return; } - socket.on("close", onDrain).on("drain", onDrain); - const writer = new $a143ded4cac78640$var$AsyncWriter({ - socket: socket, - request: request, - contentLength: contentLength, - client: client, - expectsPayload: expectsPayload, - header: header + const parsedURL = new URL(newOrigin); + if (parsedURL.protocol !== 'http:' && parsedURL.protocol !== 'https:') throw new TypeError(`Only http & https urls are allowed, received ${parsedURL.protocol}`); + Object.defineProperty(globalThis, $648e79d5ccae6461$var$globalOrigin, { + value: parsedURL, + writable: true, + enumerable: false, + configurable: false }); - try { - // It's up to the user to somehow abort the async iterable. - for await (const chunk of body){ - if (socket[$a143ded4cac78640$require$kError]) throw socket[$a143ded4cac78640$require$kError]; - if (!writer.write(chunk)) await waitForDrain(); - } - writer.end(); - } catch (err) { - writer.destroy(err); - } finally{ - socket.off("close", onDrain).off("drain", onDrain); - } -} -class $a143ded4cac78640$var$AsyncWriter { - constructor({ socket: socket, request: request, contentLength: contentLength, client: client, expectsPayload: expectsPayload, header: header }){ - this.socket = socket; - this.request = request; - this.contentLength = contentLength; - this.client = client; - this.bytesWritten = 0; - this.expectsPayload = expectsPayload; - this.header = header; - socket[$a143ded4cac78640$require$kWriting] = true; - } - write(chunk) { - const { socket: socket, request: request, contentLength: contentLength, client: client, bytesWritten: bytesWritten, expectsPayload: expectsPayload, header: header } = this; - if (socket[$a143ded4cac78640$require$kError]) throw socket[$a143ded4cac78640$require$kError]; - if (socket.destroyed) return false; - const len = Buffer.byteLength(chunk); - if (!len) return true; - // We should defer writing chunks. - if (contentLength !== null && bytesWritten + len > contentLength) { - if (client[$a143ded4cac78640$require$kStrictContentLength]) throw new $a143ded4cac78640$require$RequestContentLengthMismatchError(); - process.emitWarning(new $a143ded4cac78640$require$RequestContentLengthMismatchError()); - } - socket.cork(); - if (bytesWritten === 0) { - if (!expectsPayload) socket[$a143ded4cac78640$require$kReset] = true; - if (contentLength === null) socket.write(`${header}transfer-encoding: chunked\r\n`, "latin1"); - else socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, "latin1"); - } - if (contentLength === null) socket.write(`\r\n${len.toString(16)}\r\n`, "latin1"); - this.bytesWritten += len; - const ret = socket.write(chunk); - socket.uncork(); - request.onBodySent(chunk); - if (!ret) { - if (socket[$a143ded4cac78640$require$kParser].timeout && socket[$a143ded4cac78640$require$kParser].timeoutType === $a143ded4cac78640$var$TIMEOUT_HEADERS) // istanbul ignore else: only for jest - { - if (socket[$a143ded4cac78640$require$kParser].timeout.refresh) socket[$a143ded4cac78640$require$kParser].timeout.refresh(); - } - } - return ret; - } - end() { - const { socket: socket, contentLength: contentLength, client: client, bytesWritten: bytesWritten, expectsPayload: expectsPayload, header: header, request: request } = this; - request.onRequestSent(); - socket[$a143ded4cac78640$require$kWriting] = false; - if (socket[$a143ded4cac78640$require$kError]) throw socket[$a143ded4cac78640$require$kError]; - if (socket.destroyed) return; - if (bytesWritten === 0) { - if (expectsPayload) // https://tools.ietf.org/html/rfc7230#section-3.3.2 - // A user agent SHOULD send a Content-Length in a request message when - // no Transfer-Encoding is sent and the request method defines a meaning - // for an enclosed payload body. - socket.write(`${header}content-length: 0\r\n\r\n`, "latin1"); - else socket.write(`${header}\r\n`, "latin1"); - } else if (contentLength === null) socket.write("\r\n0\r\n\r\n", "latin1"); - if (contentLength !== null && bytesWritten !== contentLength) { - if (client[$a143ded4cac78640$require$kStrictContentLength]) throw new $a143ded4cac78640$require$RequestContentLengthMismatchError(); - else process.emitWarning(new $a143ded4cac78640$require$RequestContentLengthMismatchError()); - } - if (socket[$a143ded4cac78640$require$kParser].timeout && socket[$a143ded4cac78640$require$kParser].timeoutType === $a143ded4cac78640$var$TIMEOUT_HEADERS) // istanbul ignore else: only for jest - { - if (socket[$a143ded4cac78640$require$kParser].timeout.refresh) socket[$a143ded4cac78640$require$kParser].timeout.refresh(); - } - $a143ded4cac78640$var$resume(client); - } - destroy(err) { - const { socket: socket, client: client } = this; - socket[$a143ded4cac78640$require$kWriting] = false; - if (err) { - $g40fK$assert(client[$a143ded4cac78640$require$kRunning] <= 1, "pipeline should only contain this request"); - $gv2nV.destroy(socket, err); - } - } } -function $a143ded4cac78640$var$errorRequest(client, request, err) { - try { - request.onError(err); - $g40fK$assert(request.aborted); - } catch (err) { - client.emit("error", err); - } -} -module.exports = $a143ded4cac78640$var$Client; +module.exports = { + getGlobalOrigin: $648e79d5ccae6461$var$getGlobalOrigin, + setGlobalOrigin: $648e79d5ccae6461$var$setGlobalOrigin +}; }); -parcelRegister("gv2nV", function(module, exports) { -"use strict"; +parcelRegister("30IsM", function(module, exports) { +'use strict'; -var $hHZvh = parcelRequire("hHZvh"); -var $c031642e1317efac$require$kDestroyed = $hHZvh.kDestroyed; -var $c031642e1317efac$require$kBodyUsed = $hHZvh.kBodyUsed; - -var $c031642e1317efac$require$IncomingMessage = $g40fK$http.IncomingMessage; - - - -var $cKdp7 = parcelRequire("cKdp7"); -var $c031642e1317efac$require$InvalidArgumentError = $cKdp7.InvalidArgumentError; - -var $c031642e1317efac$require$Blob = $g40fK$buffer.Blob; - - -var $c031642e1317efac$require$stringify = $g40fK$querystring.stringify; - -var $dWYzz = parcelRequire("dWYzz"); -var $c031642e1317efac$require$headerNameLowerCasedRecord = $dWYzz.headerNameLowerCasedRecord; -const [$c031642e1317efac$var$nodeMajor, $c031642e1317efac$var$nodeMinor] = process.versions.node.split(".").map((v)=>Number(v)); -function $c031642e1317efac$var$nop() {} -function $c031642e1317efac$var$isStream(obj) { - return obj && typeof obj === "object" && typeof obj.pipe === "function" && typeof obj.on === "function"; -} -// based on https://github.com/node-fetch/fetch-blob/blob/8ab587d34080de94140b54f07168451e7d0b655e/index.js#L229-L241 (MIT License) -function $c031642e1317efac$var$isBlobLike(object) { - return $c031642e1317efac$require$Blob && object instanceof $c031642e1317efac$require$Blob || object && typeof object === "object" && (typeof object.stream === "function" || typeof object.arrayBuffer === "function") && /^(Blob|File)$/.test(object[Symbol.toStringTag]); -} -function $c031642e1317efac$var$buildURL(url, queryParams) { - if (url.includes("?") || url.includes("#")) throw new Error('Query params cannot be passed when url already contains "?" or "#".'); - const stringified = $c031642e1317efac$require$stringify(queryParams); - if (stringified) url += "?" + stringified; - return url; -} -function $c031642e1317efac$var$parseURL(url) { - if (typeof url === "string") { - url = new URL(url); - if (!/^https?:/.test(url.origin || url.protocol)) throw new $c031642e1317efac$require$InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); - return url; - } - if (!url || typeof url !== "object") throw new $c031642e1317efac$require$InvalidArgumentError("Invalid URL: The URL argument must be a non-null object."); - if (!/^https?:/.test(url.origin || url.protocol)) throw new $c031642e1317efac$require$InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); - if (!(url instanceof URL)) { - if (url.port != null && url.port !== "" && !Number.isFinite(parseInt(url.port))) throw new $c031642e1317efac$require$InvalidArgumentError("Invalid URL: port must be a valid integer or a string representation of an integer."); - if (url.path != null && typeof url.path !== "string") throw new $c031642e1317efac$require$InvalidArgumentError("Invalid URL path: the path must be a string or null/undefined."); - if (url.pathname != null && typeof url.pathname !== "string") throw new $c031642e1317efac$require$InvalidArgumentError("Invalid URL pathname: the pathname must be a string or null/undefined."); - if (url.hostname != null && typeof url.hostname !== "string") throw new $c031642e1317efac$require$InvalidArgumentError("Invalid URL hostname: the hostname must be a string or null/undefined."); - if (url.origin != null && typeof url.origin !== "string") throw new $c031642e1317efac$require$InvalidArgumentError("Invalid URL origin: the origin must be a string or null/undefined."); - const port = url.port != null ? url.port : url.protocol === "https:" ? 443 : 80; - let origin = url.origin != null ? url.origin : `${url.protocol}//${url.hostname}:${port}`; - let path = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; - if (origin.endsWith("/")) origin = origin.substring(0, origin.length - 1); - if (path && !path.startsWith("/")) path = `/${path}`; - // new URL(path, origin) is unsafe when `path` contains an absolute URL - // From https://developer.mozilla.org/en-US/docs/Web/API/URL/URL: - // If first parameter is a relative URL, second param is required, and will be used as the base URL. - // If first parameter is an absolute URL, a given second param will be ignored. - url = new URL(origin + path); +const $2313dca1bf40a27a$var$encoder = new TextEncoder(); +/** + * @see https://mimesniff.spec.whatwg.org/#http-token-code-point + */ const $2313dca1bf40a27a$var$HTTP_TOKEN_CODEPOINTS = /^[!#$%&'*+\-.^_|~A-Za-z0-9]+$/; +const $2313dca1bf40a27a$var$HTTP_WHITESPACE_REGEX = /[\u000A\u000D\u0009\u0020]/ // eslint-disable-line +; +const $2313dca1bf40a27a$var$ASCII_WHITESPACE_REPLACE_REGEX = /[\u0009\u000A\u000C\u000D\u0020]/g // eslint-disable-line +; +/** + * @see https://mimesniff.spec.whatwg.org/#http-quoted-string-token-code-point + */ const $2313dca1bf40a27a$var$HTTP_QUOTED_STRING_TOKENS = /^[\u0009\u0020-\u007E\u0080-\u00FF]+$/ // eslint-disable-line +; +// https://fetch.spec.whatwg.org/#data-url-processor +/** @param {URL} dataURL */ function $2313dca1bf40a27a$var$dataURLProcessor(dataURL) { + // 1. Assert: dataURL’s scheme is "data". + $in2sP$nodeassert(dataURL.protocol === 'data:'); + // 2. Let input be the result of running the URL + // serializer on dataURL with exclude fragment + // set to true. + let input = $2313dca1bf40a27a$var$URLSerializer(dataURL, true); + // 3. Remove the leading "data:" string from input. + input = input.slice(5); + // 4. Let position point at the start of input. + const position = { + position: 0 + }; + // 5. Let mimeType be the result of collecting a + // sequence of code points that are not equal + // to U+002C (,), given position. + let mimeType = $2313dca1bf40a27a$var$collectASequenceOfCodePointsFast(',', input, position); + // 6. Strip leading and trailing ASCII whitespace + // from mimeType. + // Undici implementation note: we need to store the + // length because if the mimetype has spaces removed, + // the wrong amount will be sliced from the input in + // step #9 + const mimeTypeLength = mimeType.length; + mimeType = $2313dca1bf40a27a$var$removeASCIIWhitespace(mimeType, true, true); + // 7. If position is past the end of input, then + // return failure + if (position.position >= input.length) return 'failure'; + // 8. Advance position by 1. + position.position++; + // 9. Let encodedBody be the remainder of input. + const encodedBody = input.slice(mimeTypeLength + 1); + // 10. Let body be the percent-decoding of encodedBody. + let body = $2313dca1bf40a27a$var$stringPercentDecode(encodedBody); + // 11. If mimeType ends with U+003B (;), followed by + // zero or more U+0020 SPACE, followed by an ASCII + // case-insensitive match for "base64", then: + if (/;(\u0020){0,}base64$/i.test(mimeType)) { + // 1. Let stringBody be the isomorphic decode of body. + const stringBody = $2313dca1bf40a27a$var$isomorphicDecode(body); + // 2. Set body to the forgiving-base64 decode of + // stringBody. + body = $2313dca1bf40a27a$var$forgivingBase64(stringBody); + // 3. If body is failure, then return failure. + if (body === 'failure') return 'failure'; + // 4. Remove the last 6 code points from mimeType. + mimeType = mimeType.slice(0, -6); + // 5. Remove trailing U+0020 SPACE code points from mimeType, + // if any. + mimeType = mimeType.replace(/(\u0020)+$/, ''); + // 6. Remove the last U+003B (;) code point from mimeType. + mimeType = mimeType.slice(0, -1); } - return url; + // 12. If mimeType starts with U+003B (;), then prepend + // "text/plain" to mimeType. + if (mimeType.startsWith(';')) mimeType = 'text/plain' + mimeType; + // 13. Let mimeTypeRecord be the result of parsing + // mimeType. + let mimeTypeRecord = $2313dca1bf40a27a$var$parseMIMEType(mimeType); + // 14. If mimeTypeRecord is failure, then set + // mimeTypeRecord to text/plain;charset=US-ASCII. + if (mimeTypeRecord === 'failure') mimeTypeRecord = $2313dca1bf40a27a$var$parseMIMEType('text/plain;charset=US-ASCII'); + // 15. Return a new data: URL struct whose MIME + // type is mimeTypeRecord and body is body. + // https://fetch.spec.whatwg.org/#data-url-struct + return { + mimeType: mimeTypeRecord, + body: body + }; } -function $c031642e1317efac$var$parseOrigin(url) { - url = $c031642e1317efac$var$parseURL(url); - if (url.pathname !== "/" || url.search || url.hash) throw new $c031642e1317efac$require$InvalidArgumentError("invalid url"); - return url; +// https://url.spec.whatwg.org/#concept-url-serializer +/** + * @param {URL} url + * @param {boolean} excludeFragment + */ function $2313dca1bf40a27a$var$URLSerializer(url, excludeFragment = false) { + if (!excludeFragment) return url.href; + const href = url.href; + const hashLength = url.hash.length; + const serialized = hashLength === 0 ? href : href.substring(0, href.length - hashLength); + if (!hashLength && href.endsWith('#')) return serialized.slice(0, -1); + return serialized; } -function $c031642e1317efac$var$getHostname(host) { - if (host[0] === "[") { - const idx = host.indexOf("]"); - $g40fK$assert(idx !== -1); - return host.substring(1, idx); +// https://infra.spec.whatwg.org/#collect-a-sequence-of-code-points +/** + * @param {(char: string) => boolean} condition + * @param {string} input + * @param {{ position: number }} position + */ function $2313dca1bf40a27a$var$collectASequenceOfCodePoints(condition, input, position) { + // 1. Let result be the empty string. + let result = ''; + // 2. While position doesn’t point past the end of input and the + // code point at position within input meets the condition condition: + while(position.position < input.length && condition(input[position.position])){ + // 1. Append that code point to the end of result. + result += input[position.position]; + // 2. Advance position by 1. + position.position++; } - const idx = host.indexOf(":"); - if (idx === -1) return host; - return host.substring(0, idx); -} -// IP addresses are not valid server names per RFC6066 -// > Currently, the only server names supported are DNS hostnames -function $c031642e1317efac$var$getServerName(host) { - if (!host) return null; - $g40fK$assert.strictEqual(typeof host, "string"); - const servername = $c031642e1317efac$var$getHostname(host); - if ($g40fK$net.isIP(servername)) return ""; - return servername; -} -function $c031642e1317efac$var$deepClone(obj) { - return JSON.parse(JSON.stringify(obj)); -} -function $c031642e1317efac$var$isAsyncIterable(obj) { - return !!(obj != null && typeof obj[Symbol.asyncIterator] === "function"); -} -function $c031642e1317efac$var$isIterable(obj) { - return !!(obj != null && (typeof obj[Symbol.iterator] === "function" || typeof obj[Symbol.asyncIterator] === "function")); -} -function $c031642e1317efac$var$bodyLength(body) { - if (body == null) return 0; - else if ($c031642e1317efac$var$isStream(body)) { - const state = body._readableState; - return state && state.objectMode === false && state.ended === true && Number.isFinite(state.length) ? state.length : null; - } else if ($c031642e1317efac$var$isBlobLike(body)) return body.size != null ? body.size : null; - else if ($c031642e1317efac$var$isBuffer(body)) return body.byteLength; - return null; + // 3. Return result. + return result; } -function $c031642e1317efac$var$isDestroyed(stream) { - return !stream || !!(stream.destroyed || stream[$c031642e1317efac$require$kDestroyed]); +/** + * A faster collectASequenceOfCodePoints that only works when comparing a single character. + * @param {string} char + * @param {string} input + * @param {{ position: number }} position + */ function $2313dca1bf40a27a$var$collectASequenceOfCodePointsFast(char, input, position) { + const idx = input.indexOf(char, position.position); + const start = position.position; + if (idx === -1) { + position.position = input.length; + return input.slice(start); + } + position.position = idx; + return input.slice(start, position.position); } -function $c031642e1317efac$var$isReadableAborted(stream) { - const state = stream && stream._readableState; - return $c031642e1317efac$var$isDestroyed(stream) && state && !state.endEmitted; +// https://url.spec.whatwg.org/#string-percent-decode +/** @param {string} input */ function $2313dca1bf40a27a$var$stringPercentDecode(input) { + // 1. Let bytes be the UTF-8 encoding of input. + const bytes = $2313dca1bf40a27a$var$encoder.encode(input); + // 2. Return the percent-decoding of bytes. + return $2313dca1bf40a27a$var$percentDecode(bytes); } -function $c031642e1317efac$var$destroy(stream, err) { - if (stream == null || !$c031642e1317efac$var$isStream(stream) || $c031642e1317efac$var$isDestroyed(stream)) return; - if (typeof stream.destroy === "function") { - if (Object.getPrototypeOf(stream).constructor === $c031642e1317efac$require$IncomingMessage) // See: https://github.com/nodejs/node/pull/38505/files - stream.socket = null; - stream.destroy(err); - } else if (err) process.nextTick((stream, err)=>{ - stream.emit("error", err); - }, stream, err); - if (stream.destroyed !== true) stream[$c031642e1317efac$require$kDestroyed] = true; -} -const $c031642e1317efac$var$KEEPALIVE_TIMEOUT_EXPR = /timeout=(\d+)/; -function $c031642e1317efac$var$parseKeepAliveTimeout(val) { - const m = val.toString().match($c031642e1317efac$var$KEEPALIVE_TIMEOUT_EXPR); - return m ? parseInt(m[1], 10) * 1000 : null; +/** + * @param {number} byte + */ function $2313dca1bf40a27a$var$isHexCharByte(byte) { + // 0-9 A-F a-f + return byte >= 0x30 && byte <= 0x39 || byte >= 0x41 && byte <= 0x46 || byte >= 0x61 && byte <= 0x66; } /** - * Retrieves a header name and returns its lowercase value. - * @param {string | Buffer} value Header name - * @returns {string} - */ function $c031642e1317efac$var$headerNameToString(value) { - return $c031642e1317efac$require$headerNameLowerCasedRecord[value] || value.toLowerCase(); + * @param {number} byte + */ function $2313dca1bf40a27a$var$hexByteToNumber(byte) { + return(// 0-9 + byte >= 0x30 && byte <= 0x39 ? byte - 48 : (byte & 0xDF) - 55); } -function $c031642e1317efac$var$parseHeaders(headers, obj = {}) { - // For H2 support - if (!Array.isArray(headers)) return headers; - for(let i = 0; i < headers.length; i += 2){ - const key = headers[i].toString().toLowerCase(); - let val = obj[key]; - if (!val) { - if (Array.isArray(headers[i + 1])) obj[key] = headers[i + 1].map((x)=>x.toString("utf8")); - else obj[key] = headers[i + 1].toString("utf8"); - } else { - if (!Array.isArray(val)) { - val = [ - val - ]; - obj[key] = val; - } - val.push(headers[i + 1].toString("utf8")); +// https://url.spec.whatwg.org/#percent-decode +/** @param {Uint8Array} input */ function $2313dca1bf40a27a$var$percentDecode(input) { + const length = input.length; + // 1. Let output be an empty byte sequence. + /** @type {Uint8Array} */ const output = new Uint8Array(length); + let j = 0; + // 2. For each byte byte in input: + for(let i = 0; i < length; ++i){ + const byte = input[i]; + // 1. If byte is not 0x25 (%), then append byte to output. + if (byte !== 0x25) output[j++] = byte; + else if (byte === 0x25 && !($2313dca1bf40a27a$var$isHexCharByte(input[i + 1]) && $2313dca1bf40a27a$var$isHexCharByte(input[i + 2]))) output[j++] = 0x25; + else { + // 1. Let bytePoint be the two bytes after byte in input, + // decoded, and then interpreted as hexadecimal number. + // 2. Append a byte whose value is bytePoint to output. + output[j++] = $2313dca1bf40a27a$var$hexByteToNumber(input[i + 1]) << 4 | $2313dca1bf40a27a$var$hexByteToNumber(input[i + 2]); + // 3. Skip the next two bytes in input. + i += 2; } } - // See https://github.com/nodejs/node/pull/46528 - if ("content-length" in obj && "content-disposition" in obj) obj["content-disposition"] = Buffer.from(obj["content-disposition"]).toString("latin1"); - return obj; -} -function $c031642e1317efac$var$parseRawHeaders(headers) { - const ret = []; - let hasContentLength = false; - let contentDispositionIdx = -1; - for(let n = 0; n < headers.length; n += 2){ - const key = headers[n + 0].toString(); - const val = headers[n + 1].toString("utf8"); - if (key.length === 14 && (key === "content-length" || key.toLowerCase() === "content-length")) { - ret.push(key, val); - hasContentLength = true; - } else if (key.length === 19 && (key === "content-disposition" || key.toLowerCase() === "content-disposition")) contentDispositionIdx = ret.push(key, val) - 1; - else ret.push(key, val); - } - // See https://github.com/nodejs/node/pull/46528 - if (hasContentLength && contentDispositionIdx !== -1) ret[contentDispositionIdx] = Buffer.from(ret[contentDispositionIdx]).toString("latin1"); - return ret; -} -function $c031642e1317efac$var$isBuffer(buffer) { - // See, https://github.com/mcollina/undici/pull/319 - return buffer instanceof Uint8Array || Buffer.isBuffer(buffer); -} -function $c031642e1317efac$var$validateHandler(handler, method, upgrade) { - if (!handler || typeof handler !== "object") throw new $c031642e1317efac$require$InvalidArgumentError("handler must be an object"); - if (typeof handler.onConnect !== "function") throw new $c031642e1317efac$require$InvalidArgumentError("invalid onConnect method"); - if (typeof handler.onError !== "function") throw new $c031642e1317efac$require$InvalidArgumentError("invalid onError method"); - if (typeof handler.onBodySent !== "function" && handler.onBodySent !== undefined) throw new $c031642e1317efac$require$InvalidArgumentError("invalid onBodySent method"); - if (upgrade || method === "CONNECT") { - if (typeof handler.onUpgrade !== "function") throw new $c031642e1317efac$require$InvalidArgumentError("invalid onUpgrade method"); - } else { - if (typeof handler.onHeaders !== "function") throw new $c031642e1317efac$require$InvalidArgumentError("invalid onHeaders method"); - if (typeof handler.onData !== "function") throw new $c031642e1317efac$require$InvalidArgumentError("invalid onData method"); - if (typeof handler.onComplete !== "function") throw new $c031642e1317efac$require$InvalidArgumentError("invalid onComplete method"); - } -} -// A body is disturbed if it has been read from and it cannot -// be re-used without losing state or data. -function $c031642e1317efac$var$isDisturbed(body) { - return !!(body && ($g40fK$stream.isDisturbed ? $g40fK$stream.isDisturbed(body) || body[$c031642e1317efac$require$kBodyUsed] // TODO (fix): Why is body[kBodyUsed] needed? - : body[$c031642e1317efac$require$kBodyUsed] || body.readableDidRead || body._readableState && body._readableState.dataEmitted || $c031642e1317efac$var$isReadableAborted(body))); -} -function $c031642e1317efac$var$isErrored(body) { - return !!(body && ($g40fK$stream.isErrored ? $g40fK$stream.isErrored(body) : /state: 'errored'/.test($g40fK$util.inspect(body)))); -} -function $c031642e1317efac$var$isReadable(body) { - return !!(body && ($g40fK$stream.isReadable ? $g40fK$stream.isReadable(body) : /state: 'readable'/.test($g40fK$util.inspect(body)))); + // 3. Return output. + return length === j ? output : output.subarray(0, j); } -function $c031642e1317efac$var$getSocketInfo(socket) { - return { - localAddress: socket.localAddress, - localPort: socket.localPort, - remoteAddress: socket.remoteAddress, - remotePort: socket.remotePort, - remoteFamily: socket.remoteFamily, - timeout: socket.timeout, - bytesWritten: socket.bytesWritten, - bytesRead: socket.bytesRead +// https://mimesniff.spec.whatwg.org/#parse-a-mime-type +/** @param {string} input */ function $2313dca1bf40a27a$var$parseMIMEType(input) { + // 1. Remove any leading and trailing HTTP whitespace + // from input. + input = $2313dca1bf40a27a$var$removeHTTPWhitespace(input, true, true); + // 2. Let position be a position variable for input, + // initially pointing at the start of input. + const position = { + position: 0 + }; + // 3. Let type be the result of collecting a sequence + // of code points that are not U+002F (/) from + // input, given position. + const type = $2313dca1bf40a27a$var$collectASequenceOfCodePointsFast('/', input, position); + // 4. If type is the empty string or does not solely + // contain HTTP token code points, then return failure. + // https://mimesniff.spec.whatwg.org/#http-token-code-point + if (type.length === 0 || !$2313dca1bf40a27a$var$HTTP_TOKEN_CODEPOINTS.test(type)) return 'failure'; + // 5. If position is past the end of input, then return + // failure + if (position.position > input.length) return 'failure'; + // 6. Advance position by 1. (This skips past U+002F (/).) + position.position++; + // 7. Let subtype be the result of collecting a sequence of + // code points that are not U+003B (;) from input, given + // position. + let subtype = $2313dca1bf40a27a$var$collectASequenceOfCodePointsFast(';', input, position); + // 8. Remove any trailing HTTP whitespace from subtype. + subtype = $2313dca1bf40a27a$var$removeHTTPWhitespace(subtype, false, true); + // 9. If subtype is the empty string or does not solely + // contain HTTP token code points, then return failure. + if (subtype.length === 0 || !$2313dca1bf40a27a$var$HTTP_TOKEN_CODEPOINTS.test(subtype)) return 'failure'; + const typeLowercase = type.toLowerCase(); + const subtypeLowercase = subtype.toLowerCase(); + // 10. Let mimeType be a new MIME type record whose type + // is type, in ASCII lowercase, and subtype is subtype, + // in ASCII lowercase. + // https://mimesniff.spec.whatwg.org/#mime-type + const mimeType = { + type: typeLowercase, + subtype: subtypeLowercase, + /** @type {Map} */ parameters: new Map(), + // https://mimesniff.spec.whatwg.org/#mime-type-essence + essence: `${typeLowercase}/${subtypeLowercase}` }; + // 11. While position is not past the end of input: + while(position.position < input.length){ + // 1. Advance position by 1. (This skips past U+003B (;).) + position.position++; + // 2. Collect a sequence of code points that are HTTP + // whitespace from input given position. + $2313dca1bf40a27a$var$collectASequenceOfCodePoints(// https://fetch.spec.whatwg.org/#http-whitespace + (char)=>$2313dca1bf40a27a$var$HTTP_WHITESPACE_REGEX.test(char), input, position); + // 3. Let parameterName be the result of collecting a + // sequence of code points that are not U+003B (;) + // or U+003D (=) from input, given position. + let parameterName = $2313dca1bf40a27a$var$collectASequenceOfCodePoints((char)=>char !== ';' && char !== '=', input, position); + // 4. Set parameterName to parameterName, in ASCII + // lowercase. + parameterName = parameterName.toLowerCase(); + // 5. If position is not past the end of input, then: + if (position.position < input.length) { + // 1. If the code point at position within input is + // U+003B (;), then continue. + if (input[position.position] === ';') continue; + // 2. Advance position by 1. (This skips past U+003D (=).) + position.position++; + } + // 6. If position is past the end of input, then break. + if (position.position > input.length) break; + // 7. Let parameterValue be null. + let parameterValue = null; + // 8. If the code point at position within input is + // U+0022 ("), then: + if (input[position.position] === '"') { + // 1. Set parameterValue to the result of collecting + // an HTTP quoted string from input, given position + // and the extract-value flag. + parameterValue = $2313dca1bf40a27a$var$collectAnHTTPQuotedString(input, position, true); + // 2. Collect a sequence of code points that are not + // U+003B (;) from input, given position. + $2313dca1bf40a27a$var$collectASequenceOfCodePointsFast(';', input, position); + // 9. Otherwise: + } else { + // 1. Set parameterValue to the result of collecting + // a sequence of code points that are not U+003B (;) + // from input, given position. + parameterValue = $2313dca1bf40a27a$var$collectASequenceOfCodePointsFast(';', input, position); + // 2. Remove any trailing HTTP whitespace from parameterValue. + parameterValue = $2313dca1bf40a27a$var$removeHTTPWhitespace(parameterValue, false, true); + // 3. If parameterValue is the empty string, then continue. + if (parameterValue.length === 0) continue; + } + // 10. If all of the following are true + // - parameterName is not the empty string + // - parameterName solely contains HTTP token code points + // - parameterValue solely contains HTTP quoted-string token code points + // - mimeType’s parameters[parameterName] does not exist + // then set mimeType’s parameters[parameterName] to parameterValue. + if (parameterName.length !== 0 && $2313dca1bf40a27a$var$HTTP_TOKEN_CODEPOINTS.test(parameterName) && (parameterValue.length === 0 || $2313dca1bf40a27a$var$HTTP_QUOTED_STRING_TOKENS.test(parameterValue)) && !mimeType.parameters.has(parameterName)) mimeType.parameters.set(parameterName, parameterValue); + } + // 12. Return mimeType. + return mimeType; } -async function* $c031642e1317efac$var$convertIterableToBuffer(iterable) { - for await (const chunk of iterable)yield Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk); +// https://infra.spec.whatwg.org/#forgiving-base64-decode +/** @param {string} data */ function $2313dca1bf40a27a$var$forgivingBase64(data) { + // 1. Remove all ASCII whitespace from data. + data = data.replace($2313dca1bf40a27a$var$ASCII_WHITESPACE_REPLACE_REGEX, '') // eslint-disable-line + ; + let dataLength = data.length; + // 2. If data’s code point length divides by 4 leaving + // no remainder, then: + if (dataLength % 4 === 0) // 1. If data ends with one or two U+003D (=) code points, + // then remove them from data. + { + if (data.charCodeAt(dataLength - 1) === 0x003D) { + --dataLength; + if (data.charCodeAt(dataLength - 1) === 0x003D) --dataLength; + } + } + // 3. If data’s code point length divides by 4 leaving + // a remainder of 1, then return failure. + if (dataLength % 4 === 1) return 'failure'; + // 4. If data contains a code point that is not one of + // U+002B (+) + // U+002F (/) + // ASCII alphanumeric + // then return failure. + if (/[^+/0-9A-Za-z]/.test(data.length === dataLength ? data : data.substring(0, dataLength))) return 'failure'; + const buffer = Buffer.from(data, 'base64'); + return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength); } -let $c031642e1317efac$var$ReadableStream; - -function $c031642e1317efac$var$ReadableStreamFrom(iterable) { - if (!$c031642e1317efac$var$ReadableStream) $c031642e1317efac$var$ReadableStream = $g40fK$streamweb.ReadableStream; - if ($c031642e1317efac$var$ReadableStream.from) return $c031642e1317efac$var$ReadableStream.from($c031642e1317efac$var$convertIterableToBuffer(iterable)); - let iterator; - return new $c031642e1317efac$var$ReadableStream({ - async start () { - iterator = iterable[Symbol.asyncIterator](); - }, - async pull (controller) { - const { done: done, value: value } = await iterator.next(); - if (done) queueMicrotask(()=>{ - controller.close(); - }); - else { - const buf = Buffer.isBuffer(value) ? value : Buffer.from(value); - controller.enqueue(new Uint8Array(buf)); +// https://fetch.spec.whatwg.org/#collect-an-http-quoted-string +// tests: https://fetch.spec.whatwg.org/#example-http-quoted-string +/** + * @param {string} input + * @param {{ position: number }} position + * @param {boolean?} extractValue + */ function $2313dca1bf40a27a$var$collectAnHTTPQuotedString(input, position, extractValue) { + // 1. Let positionStart be position. + const positionStart = position.position; + // 2. Let value be the empty string. + let value = ''; + // 3. Assert: the code point at position within input + // is U+0022 ("). + $in2sP$nodeassert(input[position.position] === '"'); + // 4. Advance position by 1. + position.position++; + // 5. While true: + while(true){ + // 1. Append the result of collecting a sequence of code points + // that are not U+0022 (") or U+005C (\) from input, given + // position, to value. + value += $2313dca1bf40a27a$var$collectASequenceOfCodePoints((char)=>char !== '"' && char !== '\\', input, position); + // 2. If position is past the end of input, then break. + if (position.position >= input.length) break; + // 3. Let quoteOrBackslash be the code point at position within + // input. + const quoteOrBackslash = input[position.position]; + // 4. Advance position by 1. + position.position++; + // 5. If quoteOrBackslash is U+005C (\), then: + if (quoteOrBackslash === '\\') { + // 1. If position is past the end of input, then append + // U+005C (\) to value and break. + if (position.position >= input.length) { + value += '\\'; + break; } - return controller.desiredSize > 0; - }, - async cancel (reason) { - await iterator.return(); + // 2. Append the code point at position within input to value. + value += input[position.position]; + // 3. Advance position by 1. + position.position++; + // 6. Otherwise: + } else { + // 1. Assert: quoteOrBackslash is U+0022 ("). + $in2sP$nodeassert(quoteOrBackslash === '"'); + break; } - }, 0); -} -// The chunk should be a FormData instance and contains -// all the required methods. -function $c031642e1317efac$var$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"; -} -function $c031642e1317efac$var$throwIfAborted(signal) { - if (!signal) return; - if (typeof signal.throwIfAborted === "function") signal.throwIfAborted(); - else if (signal.aborted) { - // DOMException not available < v17.0.0 - const err = new Error("The operation was aborted"); - err.name = "AbortError"; - throw err; } + // 6. If the extract-value flag is set, then return value. + if (extractValue) return value; + // 7. Return the code points from positionStart to position, + // inclusive, within input. + return input.slice(positionStart, position.position); } -function $c031642e1317efac$var$addAbortListener(signal, listener) { - if ("addEventListener" in signal) { - signal.addEventListener("abort", listener, { - once: true - }); - return ()=>signal.removeEventListener("abort", listener); +/** + * @see https://mimesniff.spec.whatwg.org/#serialize-a-mime-type + */ function $2313dca1bf40a27a$var$serializeAMimeType(mimeType) { + $in2sP$nodeassert(mimeType !== 'failure'); + const { parameters: parameters, essence: essence } = mimeType; + // 1. Let serialization be the concatenation of mimeType’s + // type, U+002F (/), and mimeType’s subtype. + let serialization = essence; + // 2. For each name → value of mimeType’s parameters: + for (let [name, value] of parameters.entries()){ + // 1. Append U+003B (;) to serialization. + serialization += ';'; + // 2. Append name to serialization. + serialization += name; + // 3. Append U+003D (=) to serialization. + serialization += '='; + // 4. If value does not solely contain HTTP token code + // points or value is the empty string, then: + if (!$2313dca1bf40a27a$var$HTTP_TOKEN_CODEPOINTS.test(value)) { + // 1. Precede each occurrence of U+0022 (") or + // U+005C (\) in value with U+005C (\). + value = value.replace(/(\\|")/g, '\\$1'); + // 2. Prepend U+0022 (") to value. + value = '"' + value; + // 3. Append U+0022 (") to value. + value += '"'; + } + // 5. Append value to serialization. + serialization += value; } - signal.addListener("abort", listener); - return ()=>signal.removeListener("abort", listener); + // 3. Return serialization. + return serialization; } -const $c031642e1317efac$var$hasToWellFormed = !!String.prototype.toWellFormed; /** - * @param {string} val - */ function $c031642e1317efac$var$toUSVString(val) { - if ($c031642e1317efac$var$hasToWellFormed) return `${val}`.toWellFormed(); - else if ($g40fK$util.toUSVString) return $g40fK$util.toUSVString(val); - return `${val}`; + * @see https://fetch.spec.whatwg.org/#http-whitespace + * @param {number} char + */ function $2313dca1bf40a27a$var$isHTTPWhiteSpace(char) { + // "\r\n\t " + return char === 0x00d || char === 0x00a || char === 0x009 || char === 0x020; } -// Parsed accordingly to RFC 9110 -// https://www.rfc-editor.org/rfc/rfc9110#field.content-range -function $c031642e1317efac$var$parseRangeHeader(range) { - if (range == null || range === "") return { - start: 0, - end: null, - size: null - }; - const m = range ? range.match(/^bytes (\d+)-(\d+)\/(\d+)?$/) : null; - return m ? { - start: parseInt(m[1]), - end: m[2] ? parseInt(m[2]) : null, - size: m[3] ? parseInt(m[3]) : null - } : null; +/** + * @see https://fetch.spec.whatwg.org/#http-whitespace + * @param {string} str + * @param {boolean} [leading=true] + * @param {boolean} [trailing=true] + */ function $2313dca1bf40a27a$var$removeHTTPWhitespace(str, leading = true, trailing = true) { + return $2313dca1bf40a27a$var$removeChars(str, leading, trailing, $2313dca1bf40a27a$var$isHTTPWhiteSpace); +} +/** + * @see https://infra.spec.whatwg.org/#ascii-whitespace + * @param {number} char + */ function $2313dca1bf40a27a$var$isASCIIWhitespace(char) { + // "\r\n\t\f " + return char === 0x00d || char === 0x00a || char === 0x009 || char === 0x00c || char === 0x020; +} +/** + * @see https://infra.spec.whatwg.org/#strip-leading-and-trailing-ascii-whitespace + * @param {string} str + * @param {boolean} [leading=true] + * @param {boolean} [trailing=true] + */ function $2313dca1bf40a27a$var$removeASCIIWhitespace(str, leading = true, trailing = true) { + return $2313dca1bf40a27a$var$removeChars(str, leading, trailing, $2313dca1bf40a27a$var$isASCIIWhitespace); +} +/** + * @param {string} str + * @param {boolean} leading + * @param {boolean} trailing + * @param {(charCode: number) => boolean} predicate + * @returns + */ function $2313dca1bf40a27a$var$removeChars(str, leading, trailing, predicate) { + let lead = 0; + let trail = str.length - 1; + if (leading) while(lead < str.length && predicate(str.charCodeAt(lead)))lead++; + if (trailing) while(trail > 0 && predicate(str.charCodeAt(trail)))trail--; + return lead === 0 && trail === str.length - 1 ? str : str.slice(lead, trail + 1); +} +/** + * @see https://infra.spec.whatwg.org/#isomorphic-decode + * @param {Uint8Array} input + * @returns {string} + */ function $2313dca1bf40a27a$var$isomorphicDecode(input) { + // 1. To isomorphic decode a byte sequence input, return a string whose code point + // length is equal to input’s length and whose code points have the same values + // as the values of input’s bytes, in the same order. + const length = input.length; + if (65535 > length) return String.fromCharCode.apply(null, input); + let result = ''; + let i = 0; + let addition = 65535; + while(i < length){ + if (i + addition > length) addition = length - i; + result += String.fromCharCode.apply(null, input.subarray(i, i += addition)); + } + return result; +} +/** + * @see https://mimesniff.spec.whatwg.org/#minimize-a-supported-mime-type + * @param {Exclude, 'failure'>} mimeType + */ function $2313dca1bf40a27a$var$minimizeSupportedMimeType(mimeType) { + switch(mimeType.essence){ + case 'application/ecmascript': + case 'application/javascript': + case 'application/x-ecmascript': + case 'application/x-javascript': + case 'text/ecmascript': + case 'text/javascript': + case 'text/javascript1.0': + case 'text/javascript1.1': + case 'text/javascript1.2': + case 'text/javascript1.3': + case 'text/javascript1.4': + case 'text/javascript1.5': + case 'text/jscript': + case 'text/livescript': + case 'text/x-ecmascript': + case 'text/x-javascript': + // 1. If mimeType is a JavaScript MIME type, then return "text/javascript". + return 'text/javascript'; + case 'application/json': + case 'text/json': + // 2. If mimeType is a JSON MIME type, then return "application/json". + return 'application/json'; + case 'image/svg+xml': + // 3. If mimeType’s essence is "image/svg+xml", then return "image/svg+xml". + return 'image/svg+xml'; + case 'text/xml': + case 'application/xml': + // 4. If mimeType is an XML MIME type, then return "application/xml". + return 'application/xml'; + } + // 2. If mimeType is a JSON MIME type, then return "application/json". + if (mimeType.subtype.endsWith('+json')) return 'application/json'; + // 4. If mimeType is an XML MIME type, then return "application/xml". + if (mimeType.subtype.endsWith('+xml')) return 'application/xml'; + // 5. If mimeType is supported by the user agent, then return mimeType’s essence. + // Technically, node doesn't support any mimetypes. + // 6. Return the empty string. + return ''; } -const $c031642e1317efac$var$kEnumerableProperty = Object.create(null); -$c031642e1317efac$var$kEnumerableProperty.enumerable = true; module.exports = { - kEnumerableProperty: $c031642e1317efac$var$kEnumerableProperty, - nop: $c031642e1317efac$var$nop, - isDisturbed: $c031642e1317efac$var$isDisturbed, - isErrored: $c031642e1317efac$var$isErrored, - isReadable: $c031642e1317efac$var$isReadable, - toUSVString: $c031642e1317efac$var$toUSVString, - isReadableAborted: $c031642e1317efac$var$isReadableAborted, - isBlobLike: $c031642e1317efac$var$isBlobLike, - parseOrigin: $c031642e1317efac$var$parseOrigin, - parseURL: $c031642e1317efac$var$parseURL, - getServerName: $c031642e1317efac$var$getServerName, - isStream: $c031642e1317efac$var$isStream, - isIterable: $c031642e1317efac$var$isIterable, - isAsyncIterable: $c031642e1317efac$var$isAsyncIterable, - isDestroyed: $c031642e1317efac$var$isDestroyed, - headerNameToString: $c031642e1317efac$var$headerNameToString, - parseRawHeaders: $c031642e1317efac$var$parseRawHeaders, - parseHeaders: $c031642e1317efac$var$parseHeaders, - parseKeepAliveTimeout: $c031642e1317efac$var$parseKeepAliveTimeout, - destroy: $c031642e1317efac$var$destroy, - bodyLength: $c031642e1317efac$var$bodyLength, - deepClone: $c031642e1317efac$var$deepClone, - ReadableStreamFrom: $c031642e1317efac$var$ReadableStreamFrom, - isBuffer: $c031642e1317efac$var$isBuffer, - validateHandler: $c031642e1317efac$var$validateHandler, - getSocketInfo: $c031642e1317efac$var$getSocketInfo, - isFormDataLike: $c031642e1317efac$var$isFormDataLike, - buildURL: $c031642e1317efac$var$buildURL, - throwIfAborted: $c031642e1317efac$var$throwIfAborted, - addAbortListener: $c031642e1317efac$var$addAbortListener, - parseRangeHeader: $c031642e1317efac$var$parseRangeHeader, - nodeMajor: $c031642e1317efac$var$nodeMajor, - nodeMinor: $c031642e1317efac$var$nodeMinor, - nodeHasAutoSelectFamily: $c031642e1317efac$var$nodeMajor > 18 || $c031642e1317efac$var$nodeMajor === 18 && $c031642e1317efac$var$nodeMinor >= 13, - safeHTTPMethods: [ - "GET", - "HEAD", - "OPTIONS", - "TRACE" - ] + dataURLProcessor: $2313dca1bf40a27a$var$dataURLProcessor, + URLSerializer: $2313dca1bf40a27a$var$URLSerializer, + collectASequenceOfCodePoints: $2313dca1bf40a27a$var$collectASequenceOfCodePoints, + collectASequenceOfCodePointsFast: $2313dca1bf40a27a$var$collectASequenceOfCodePointsFast, + stringPercentDecode: $2313dca1bf40a27a$var$stringPercentDecode, + parseMIMEType: $2313dca1bf40a27a$var$parseMIMEType, + collectAnHTTPQuotedString: $2313dca1bf40a27a$var$collectAnHTTPQuotedString, + serializeAMimeType: $2313dca1bf40a27a$var$serializeAMimeType, + removeChars: $2313dca1bf40a27a$var$removeChars, + removeHTTPWhitespace: $2313dca1bf40a27a$var$removeHTTPWhitespace, + minimizeSupportedMimeType: $2313dca1bf40a27a$var$minimizeSupportedMimeType, + HTTP_TOKEN_CODEPOINTS: $2313dca1bf40a27a$var$HTTP_TOKEN_CODEPOINTS, + isomorphicDecode: $2313dca1bf40a27a$var$isomorphicDecode }; }); -parcelRegister("hHZvh", function(module, exports) { -module.exports = { - kClose: Symbol("close"), - kDestroy: Symbol("destroy"), - kDispatch: Symbol("dispatch"), - kUrl: Symbol("url"), - kWriting: Symbol("writing"), - kResuming: Symbol("resuming"), - kQueue: Symbol("queue"), - kConnect: Symbol("connect"), - kConnecting: Symbol("connecting"), - kHeadersList: Symbol("headers list"), - kKeepAliveDefaultTimeout: Symbol("default keep alive timeout"), - kKeepAliveMaxTimeout: Symbol("max keep alive timeout"), - kKeepAliveTimeoutThreshold: Symbol("keep alive timeout threshold"), - kKeepAliveTimeoutValue: Symbol("keep alive timeout"), - kKeepAlive: Symbol("keep alive"), - kHeadersTimeout: Symbol("headers timeout"), - kBodyTimeout: Symbol("body timeout"), - kServerName: Symbol("server name"), - kLocalAddress: Symbol("local address"), - kHost: Symbol("host"), - kNoRef: Symbol("no ref"), - kBodyUsed: Symbol("used"), - kRunning: Symbol("running"), - kBlocking: Symbol("blocking"), - kPending: Symbol("pending"), - kSize: Symbol("size"), - kBusy: Symbol("busy"), - kQueued: Symbol("queued"), - kFree: Symbol("free"), - kConnected: Symbol("connected"), - kClosed: Symbol("closed"), - kNeedDrain: Symbol("need drain"), - kReset: Symbol("reset"), - kDestroyed: Symbol.for("nodejs.stream.destroyed"), - kMaxHeadersSize: Symbol("max headers size"), - kRunningIdx: Symbol("running index"), - kPendingIdx: Symbol("pending index"), - kError: Symbol("error"), - kClients: Symbol("clients"), - kClient: Symbol("client"), - kParser: Symbol("parser"), - kOnDestroyed: Symbol("destroy callbacks"), - kPipelining: Symbol("pipelining"), - kSocket: Symbol("socket"), - kHostHeader: Symbol("host header"), - kConnector: Symbol("connector"), - kStrictContentLength: Symbol("strict content length"), - kMaxRedirections: Symbol("maxRedirections"), - kMaxRequests: Symbol("maxRequestsPerClient"), - kProxy: Symbol("proxy agent options"), - kCounter: Symbol("socket request counter"), - kInterceptors: Symbol("dispatch interceptors"), - kMaxResponseSize: Symbol("max response size"), - kHTTP2Session: Symbol("http2Session"), - kHTTP2SessionState: Symbol("http2Session state"), - kHTTP2BuildRequest: Symbol("http2 build request"), - kHTTP1BuildRequest: Symbol("http1 build request"), - kHTTP2CopyHeaders: Symbol("http2 copy headers"), - kHTTPConnVersion: Symbol("http connection version"), - kRetryHandlerDefaultRetry: Symbol("retry agent default retry"), - kConstruct: Symbol("constructable") -}; -}); +parcelRegister("5HTG7", function(module, exports) { +'use strict'; -parcelRegister("cKdp7", function(module, exports) { -"use strict"; -class $94742db5c92302c4$var$UndiciError extends Error { - constructor(message){ - super(message); - this.name = "UndiciError"; - this.code = "UND_ERR"; - } -} -class $94742db5c92302c4$var$ConnectTimeoutError extends $94742db5c92302c4$var$UndiciError { - constructor(message){ - super(message); - Error.captureStackTrace(this, $94742db5c92302c4$var$ConnectTimeoutError); - this.name = "ConnectTimeoutError"; - this.message = message || "Connect Timeout Error"; - this.code = "UND_ERR_CONNECT_TIMEOUT"; - } -} -class $94742db5c92302c4$var$HeadersTimeoutError extends $94742db5c92302c4$var$UndiciError { - constructor(message){ - super(message); - Error.captureStackTrace(this, $94742db5c92302c4$var$HeadersTimeoutError); - this.name = "HeadersTimeoutError"; - this.message = message || "Headers Timeout Error"; - this.code = "UND_ERR_HEADERS_TIMEOUT"; - } -} -class $94742db5c92302c4$var$HeadersOverflowError extends $94742db5c92302c4$var$UndiciError { - constructor(message){ - super(message); - Error.captureStackTrace(this, $94742db5c92302c4$var$HeadersOverflowError); - this.name = "HeadersOverflowError"; - this.message = message || "Headers Overflow Error"; - this.code = "UND_ERR_HEADERS_OVERFLOW"; - } -} -class $94742db5c92302c4$var$BodyTimeoutError extends $94742db5c92302c4$var$UndiciError { - constructor(message){ - super(message); - Error.captureStackTrace(this, $94742db5c92302c4$var$BodyTimeoutError); - this.name = "BodyTimeoutError"; - this.message = message || "Body Timeout Error"; - this.code = "UND_ERR_BODY_TIMEOUT"; - } -} -class $94742db5c92302c4$var$ResponseStatusCodeError extends $94742db5c92302c4$var$UndiciError { - constructor(message, statusCode, headers, body){ - super(message); - Error.captureStackTrace(this, $94742db5c92302c4$var$ResponseStatusCodeError); - this.name = "ResponseStatusCodeError"; - this.message = message || "Response Status Code Error"; - this.code = "UND_ERR_RESPONSE_STATUS_CODE"; - this.body = body; - this.status = statusCode; - this.statusCode = statusCode; - this.headers = headers; - } -} -class $94742db5c92302c4$var$InvalidArgumentError extends $94742db5c92302c4$var$UndiciError { - constructor(message){ - super(message); - Error.captureStackTrace(this, $94742db5c92302c4$var$InvalidArgumentError); - this.name = "InvalidArgumentError"; - this.message = message || "Invalid Argument Error"; - this.code = "UND_ERR_INVALID_ARG"; - } -} -class $94742db5c92302c4$var$InvalidReturnValueError extends $94742db5c92302c4$var$UndiciError { - constructor(message){ - super(message); - Error.captureStackTrace(this, $94742db5c92302c4$var$InvalidReturnValueError); - this.name = "InvalidReturnValueError"; - this.message = message || "Invalid Return Value Error"; - this.code = "UND_ERR_INVALID_RETURN_VALUE"; - } -} -class $94742db5c92302c4$var$RequestAbortedError extends $94742db5c92302c4$var$UndiciError { - constructor(message){ - super(message); - Error.captureStackTrace(this, $94742db5c92302c4$var$RequestAbortedError); - this.name = "AbortError"; - this.message = message || "Request aborted"; - this.code = "UND_ERR_ABORTED"; - } -} -class $94742db5c92302c4$var$InformationalError extends $94742db5c92302c4$var$UndiciError { - constructor(message){ - super(message); - Error.captureStackTrace(this, $94742db5c92302c4$var$InformationalError); - this.name = "InformationalError"; - this.message = message || "Request information"; - this.code = "UND_ERR_INFO"; - } -} -class $94742db5c92302c4$var$RequestContentLengthMismatchError extends $94742db5c92302c4$var$UndiciError { - constructor(message){ - super(message); - Error.captureStackTrace(this, $94742db5c92302c4$var$RequestContentLengthMismatchError); - this.name = "RequestContentLengthMismatchError"; - this.message = message || "Request body length does not match content-length header"; - this.code = "UND_ERR_REQ_CONTENT_LENGTH_MISMATCH"; - } -} -class $94742db5c92302c4$var$ResponseContentLengthMismatchError extends $94742db5c92302c4$var$UndiciError { - constructor(message){ - super(message); - Error.captureStackTrace(this, $94742db5c92302c4$var$ResponseContentLengthMismatchError); - this.name = "ResponseContentLengthMismatchError"; - this.message = message || "Response body length does not match content-length header"; - this.code = "UND_ERR_RES_CONTENT_LENGTH_MISMATCH"; - } -} -class $94742db5c92302c4$var$ClientDestroyedError extends $94742db5c92302c4$var$UndiciError { - constructor(message){ - super(message); - Error.captureStackTrace(this, $94742db5c92302c4$var$ClientDestroyedError); - this.name = "ClientDestroyedError"; - this.message = message || "The client is destroyed"; - this.code = "UND_ERR_DESTROYED"; - } -} -class $94742db5c92302c4$var$ClientClosedError extends $94742db5c92302c4$var$UndiciError { - constructor(message){ - super(message); - Error.captureStackTrace(this, $94742db5c92302c4$var$ClientClosedError); - this.name = "ClientClosedError"; - this.message = message || "The client is closed"; - this.code = "UND_ERR_CLOSED"; - } -} -class $94742db5c92302c4$var$SocketError extends $94742db5c92302c4$var$UndiciError { - constructor(message, socket){ - super(message); - Error.captureStackTrace(this, $94742db5c92302c4$var$SocketError); - this.name = "SocketError"; - this.message = message || "Socket error"; - this.code = "UND_ERR_SOCKET"; - this.socket = socket; - } -} -class $94742db5c92302c4$var$NotSupportedError extends $94742db5c92302c4$var$UndiciError { - constructor(message){ - super(message); - Error.captureStackTrace(this, $94742db5c92302c4$var$NotSupportedError); - this.name = "NotSupportedError"; - this.message = message || "Not supported error"; - this.code = "UND_ERR_NOT_SUPPORTED"; - } -} -class $94742db5c92302c4$var$BalancedPoolMissingUpstreamError extends $94742db5c92302c4$var$UndiciError { - constructor(message){ - super(message); - Error.captureStackTrace(this, $94742db5c92302c4$var$NotSupportedError); - this.name = "MissingUpstreamError"; - this.message = message || "No upstream has been added to the BalancedPool"; - this.code = "UND_ERR_BPL_MISSING_UPSTREAM"; - } -} -class $94742db5c92302c4$var$HTTPParserError extends Error { - constructor(message, code, data){ - super(message); - Error.captureStackTrace(this, $94742db5c92302c4$var$HTTPParserError); - this.name = "HTTPParserError"; - this.code = code ? `HPE_${code}` : undefined; - this.data = data ? data.toString() : undefined; - } -} -class $94742db5c92302c4$var$ResponseExceededMaxSizeError extends $94742db5c92302c4$var$UndiciError { - constructor(message){ - super(message); - Error.captureStackTrace(this, $94742db5c92302c4$var$ResponseExceededMaxSizeError); - this.name = "ResponseExceededMaxSizeError"; - this.message = message || "Response content exceeded max size"; - this.code = "UND_ERR_RES_EXCEEDED_MAX_SIZE"; - } -} -class $94742db5c92302c4$var$RequestRetryError extends $94742db5c92302c4$var$UndiciError { - constructor(message, code, { headers: headers, data: data }){ - super(message); - Error.captureStackTrace(this, $94742db5c92302c4$var$RequestRetryError); - this.name = "RequestRetryError"; - this.message = message || "Request retry error"; - this.code = "UND_ERR_REQ_RETRY"; - this.statusCode = code; - this.data = data; - this.headers = headers; - } -} -module.exports = { - HTTPParserError: $94742db5c92302c4$var$HTTPParserError, - UndiciError: $94742db5c92302c4$var$UndiciError, - HeadersTimeoutError: $94742db5c92302c4$var$HeadersTimeoutError, - HeadersOverflowError: $94742db5c92302c4$var$HeadersOverflowError, - BodyTimeoutError: $94742db5c92302c4$var$BodyTimeoutError, - RequestContentLengthMismatchError: $94742db5c92302c4$var$RequestContentLengthMismatchError, - ConnectTimeoutError: $94742db5c92302c4$var$ConnectTimeoutError, - ResponseStatusCodeError: $94742db5c92302c4$var$ResponseStatusCodeError, - InvalidArgumentError: $94742db5c92302c4$var$InvalidArgumentError, - InvalidReturnValueError: $94742db5c92302c4$var$InvalidReturnValueError, - RequestAbortedError: $94742db5c92302c4$var$RequestAbortedError, - ClientDestroyedError: $94742db5c92302c4$var$ClientDestroyedError, - ClientClosedError: $94742db5c92302c4$var$ClientClosedError, - InformationalError: $94742db5c92302c4$var$InformationalError, - SocketError: $94742db5c92302c4$var$SocketError, - NotSupportedError: $94742db5c92302c4$var$NotSupportedError, - ResponseContentLengthMismatchError: $94742db5c92302c4$var$ResponseContentLengthMismatchError, - BalancedPoolMissingUpstreamError: $94742db5c92302c4$var$BalancedPoolMissingUpstreamError, - ResponseExceededMaxSizeError: $94742db5c92302c4$var$ResponseExceededMaxSizeError, - RequestRetryError: $94742db5c92302c4$var$RequestRetryError -}; +var $427c2873c054dd4e$require$types = $in2sP$nodeutil.types; +var $427c2873c054dd4e$require$inspect = $in2sP$nodeutil.inspect; -}); +var $427c2873c054dd4e$require$markAsUncloneable = $in2sP$nodeworker_threads.markAsUncloneable; -parcelRegister("dWYzz", function(module, exports) { -"use strict"; -/** @type {Record} */ const $a27fad99d194b289$var$headerNameLowerCasedRecord = {}; -// https://developer.mozilla.org/docs/Web/HTTP/Headers -const $a27fad99d194b289$var$wellknownHeaderNames = [ - "Accept", - "Accept-Encoding", - "Accept-Language", - "Accept-Ranges", - "Access-Control-Allow-Credentials", - "Access-Control-Allow-Headers", - "Access-Control-Allow-Methods", - "Access-Control-Allow-Origin", - "Access-Control-Expose-Headers", - "Access-Control-Max-Age", - "Access-Control-Request-Headers", - "Access-Control-Request-Method", - "Age", - "Allow", - "Alt-Svc", - "Alt-Used", - "Authorization", - "Cache-Control", - "Clear-Site-Data", - "Connection", - "Content-Disposition", - "Content-Encoding", - "Content-Language", - "Content-Length", - "Content-Location", - "Content-Range", - "Content-Security-Policy", - "Content-Security-Policy-Report-Only", - "Content-Type", - "Cookie", - "Cross-Origin-Embedder-Policy", - "Cross-Origin-Opener-Policy", - "Cross-Origin-Resource-Policy", - "Date", - "Device-Memory", - "Downlink", - "ECT", - "ETag", - "Expect", - "Expect-CT", - "Expires", - "Forwarded", - "From", - "Host", - "If-Match", - "If-Modified-Since", - "If-None-Match", - "If-Range", - "If-Unmodified-Since", - "Keep-Alive", - "Last-Modified", - "Link", - "Location", - "Max-Forwards", - "Origin", - "Permissions-Policy", - "Pragma", - "Proxy-Authenticate", - "Proxy-Authorization", - "RTT", - "Range", - "Referer", - "Referrer-Policy", - "Refresh", - "Retry-After", - "Sec-WebSocket-Accept", - "Sec-WebSocket-Extensions", - "Sec-WebSocket-Key", - "Sec-WebSocket-Protocol", - "Sec-WebSocket-Version", - "Server", - "Server-Timing", - "Service-Worker-Allowed", - "Service-Worker-Navigation-Preload", - "Set-Cookie", - "SourceMap", - "Strict-Transport-Security", - "Supports-Loading-Mode", - "TE", - "Timing-Allow-Origin", - "Trailer", - "Transfer-Encoding", - "Upgrade", - "Upgrade-Insecure-Requests", - "User-Agent", - "Vary", - "Via", - "WWW-Authenticate", - "X-Content-Type-Options", - "X-DNS-Prefetch-Control", - "X-Frame-Options", - "X-Permitted-Cross-Domain-Policies", - "X-Powered-By", - "X-Requested-With", - "X-XSS-Protection" -]; -for(let i = 0; i < $a27fad99d194b289$var$wellknownHeaderNames.length; ++i){ - const key = $a27fad99d194b289$var$wellknownHeaderNames[i]; - const lowerCasedKey = key.toLowerCase(); - $a27fad99d194b289$var$headerNameLowerCasedRecord[key] = $a27fad99d194b289$var$headerNameLowerCasedRecord[lowerCasedKey] = lowerCasedKey; -} -// Note: object prototypes should not be able to be referenced. e.g. `Object#hasOwnProperty`. -Object.setPrototypeOf($a27fad99d194b289$var$headerNameLowerCasedRecord, null); -module.exports = { - wellknownHeaderNames: $a27fad99d194b289$var$wellknownHeaderNames, - headerNameLowerCasedRecord: $a27fad99d194b289$var$headerNameLowerCasedRecord +var $bFRvW = parcelRequire("bFRvW"); +var $427c2873c054dd4e$require$toUSVString = $bFRvW.toUSVString; +/** @type {import('../../../types/webidl').Webidl} */ const $427c2873c054dd4e$var$webidl = {}; +$427c2873c054dd4e$var$webidl.converters = {}; +$427c2873c054dd4e$var$webidl.util = {}; +$427c2873c054dd4e$var$webidl.errors = {}; +$427c2873c054dd4e$var$webidl.errors.exception = function(message) { + return new TypeError(`${message.header}: ${message.message}`); }; - -}); - - -parcelRegister("7zkd9", function(module, exports) { -"use strict"; -let $582b7ac4f1ff6df1$var$fastNow = Date.now(); -let $582b7ac4f1ff6df1$var$fastNowTimeout; -const $582b7ac4f1ff6df1$var$fastTimers = []; -function $582b7ac4f1ff6df1$var$onTimeout() { - $582b7ac4f1ff6df1$var$fastNow = Date.now(); - let len = $582b7ac4f1ff6df1$var$fastTimers.length; - let idx = 0; - while(idx < len){ - const timer = $582b7ac4f1ff6df1$var$fastTimers[idx]; - if (timer.state === 0) timer.state = $582b7ac4f1ff6df1$var$fastNow + timer.delay; - else if (timer.state > 0 && $582b7ac4f1ff6df1$var$fastNow >= timer.state) { - timer.state = -1; - timer.callback(timer.opaque); - } - if (timer.state === -1) { - timer.state = -2; - if (idx !== len - 1) $582b7ac4f1ff6df1$var$fastTimers[idx] = $582b7ac4f1ff6df1$var$fastTimers.pop(); - else $582b7ac4f1ff6df1$var$fastTimers.pop(); - len -= 1; - } else idx += 1; - } - if ($582b7ac4f1ff6df1$var$fastTimers.length > 0) $582b7ac4f1ff6df1$var$refreshTimeout(); -} -function $582b7ac4f1ff6df1$var$refreshTimeout() { - if ($582b7ac4f1ff6df1$var$fastNowTimeout && $582b7ac4f1ff6df1$var$fastNowTimeout.refresh) $582b7ac4f1ff6df1$var$fastNowTimeout.refresh(); - else { - clearTimeout($582b7ac4f1ff6df1$var$fastNowTimeout); - $582b7ac4f1ff6df1$var$fastNowTimeout = setTimeout($582b7ac4f1ff6df1$var$onTimeout, 1e3); - if ($582b7ac4f1ff6df1$var$fastNowTimeout.unref) $582b7ac4f1ff6df1$var$fastNowTimeout.unref(); - } -} -class $582b7ac4f1ff6df1$var$Timeout { - constructor(callback, delay, opaque){ - this.callback = callback; - this.delay = delay; - this.opaque = opaque; - // -2 not in timer list - // -1 in timer list but inactive - // 0 in timer list waiting for time - // > 0 in timer list waiting for time to expire - this.state = -2; - this.refresh(); - } - refresh() { - if (this.state === -2) { - $582b7ac4f1ff6df1$var$fastTimers.push(this); - if (!$582b7ac4f1ff6df1$var$fastNowTimeout || $582b7ac4f1ff6df1$var$fastTimers.length === 1) $582b7ac4f1ff6df1$var$refreshTimeout(); +$427c2873c054dd4e$var$webidl.errors.conversionFailed = function(context) { + const plural = context.types.length === 1 ? '' : ' one of'; + const message = `${context.argument} could not be converted to` + `${plural}: ${context.types.join(', ')}.`; + return $427c2873c054dd4e$var$webidl.errors.exception({ + header: context.prefix, + message: message + }); +}; +$427c2873c054dd4e$var$webidl.errors.invalidArgument = function(context) { + return $427c2873c054dd4e$var$webidl.errors.exception({ + header: context.prefix, + message: `"${context.value}" is an invalid ${context.type}.` + }); +}; +// https://webidl.spec.whatwg.org/#implements +$427c2873c054dd4e$var$webidl.brandCheck = function(V, I, opts) { + if (opts?.strict !== false) { + if (!(V instanceof I)) { + const err = new TypeError('Illegal invocation'); + err.code = 'ERR_INVALID_THIS' // node compat. + ; + throw err; } - this.state = 0; - } - clear() { - this.state = -1; - } -} -module.exports = { - setTimeout (callback, delay, opaque) { - return delay < 1e3 ? setTimeout(callback, delay, opaque) : new $582b7ac4f1ff6df1$var$Timeout(callback, delay, opaque); - }, - clearTimeout (timeout) { - if (timeout instanceof $582b7ac4f1ff6df1$var$Timeout) timeout.clear(); - else clearTimeout(timeout); + } else if (V?.[Symbol.toStringTag] !== I.prototype[Symbol.toStringTag]) { + const err = new TypeError('Illegal invocation'); + err.code = 'ERR_INVALID_THIS' // node compat. + ; + throw err; } }; - -}); - -parcelRegister("fYRdr", function(module, exports) { -"use strict"; - -var $cKdp7 = parcelRequire("cKdp7"); -var $ba25bd253ef6a407$require$InvalidArgumentError = $cKdp7.InvalidArgumentError; -var $ba25bd253ef6a407$require$NotSupportedError = $cKdp7.NotSupportedError; - - -var $hHZvh = parcelRequire("hHZvh"); -var $ba25bd253ef6a407$require$kHTTP2BuildRequest = $hHZvh.kHTTP2BuildRequest; -var $ba25bd253ef6a407$require$kHTTP2CopyHeaders = $hHZvh.kHTTP2CopyHeaders; -var $ba25bd253ef6a407$require$kHTTP1BuildRequest = $hHZvh.kHTTP1BuildRequest; - -var $gv2nV = parcelRequire("gv2nV"); -// tokenRegExp and headerCharRegex have been lifted from -// https://github.com/nodejs/node/blob/main/lib/_http_common.js -/** - * Verifies that the given val is a valid HTTP token - * per the rules defined in RFC 7230 - * See https://tools.ietf.org/html/rfc7230#section-3.2.6 - */ const $ba25bd253ef6a407$var$tokenRegExp = /^[\^_`a-zA-Z\-0-9!#$%&'*+.|~]+$/; -/** - * Matches if val contains an invalid field-vchar - * field-value = *( field-content / obs-fold ) - * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ] - * field-vchar = VCHAR / obs-text - */ const $ba25bd253ef6a407$var$headerCharRegex = /[^\t\x20-\x7e\x80-\xff]/; -// Verifies that a given path is valid does not contain control chars \x00 to \x20 -const $ba25bd253ef6a407$var$invalidPathRegex = /[^\u0021-\u00ff]/; -const $ba25bd253ef6a407$var$kHandler = Symbol("handler"); -const $ba25bd253ef6a407$var$channels = {}; -let $ba25bd253ef6a407$var$extractBody; - -try { - const diagnosticsChannel = $ba25bd253ef6a407$import$30948f9e6176f57c; - $ba25bd253ef6a407$var$channels.create = diagnosticsChannel.channel("undici:request:create"); - $ba25bd253ef6a407$var$channels.bodySent = diagnosticsChannel.channel("undici:request:bodySent"); - $ba25bd253ef6a407$var$channels.headers = diagnosticsChannel.channel("undici:request:headers"); - $ba25bd253ef6a407$var$channels.trailers = diagnosticsChannel.channel("undici:request:trailers"); - $ba25bd253ef6a407$var$channels.error = diagnosticsChannel.channel("undici:request:error"); -} catch { - $ba25bd253ef6a407$var$channels.create = { - hasSubscribers: false - }; - $ba25bd253ef6a407$var$channels.bodySent = { - hasSubscribers: false - }; - $ba25bd253ef6a407$var$channels.headers = { - hasSubscribers: false - }; - $ba25bd253ef6a407$var$channels.trailers = { - hasSubscribers: false - }; - $ba25bd253ef6a407$var$channels.error = { - hasSubscribers: false - }; -} - -class $ba25bd253ef6a407$var$Request { - constructor(origin, { path: path, method: method, body: body, headers: headers, query: query, idempotent: idempotent, blocking: blocking, upgrade: upgrade, headersTimeout: headersTimeout, bodyTimeout: bodyTimeout, reset: reset, throwOnError: throwOnError, expectContinue: expectContinue }, handler){ - if (typeof path !== "string") throw new $ba25bd253ef6a407$require$InvalidArgumentError("path must be a string"); - else if (path[0] !== "/" && !(path.startsWith("http://") || path.startsWith("https://")) && method !== "CONNECT") throw new $ba25bd253ef6a407$require$InvalidArgumentError("path must be an absolute URL or start with a slash"); - else if ($ba25bd253ef6a407$var$invalidPathRegex.exec(path) !== null) throw new $ba25bd253ef6a407$require$InvalidArgumentError("invalid request path"); - if (typeof method !== "string") throw new $ba25bd253ef6a407$require$InvalidArgumentError("method must be a string"); - else if ($ba25bd253ef6a407$var$tokenRegExp.exec(method) === null) throw new $ba25bd253ef6a407$require$InvalidArgumentError("invalid request method"); - if (upgrade && typeof upgrade !== "string") throw new $ba25bd253ef6a407$require$InvalidArgumentError("upgrade must be a string"); - if (headersTimeout != null && (!Number.isFinite(headersTimeout) || headersTimeout < 0)) throw new $ba25bd253ef6a407$require$InvalidArgumentError("invalid headersTimeout"); - if (bodyTimeout != null && (!Number.isFinite(bodyTimeout) || bodyTimeout < 0)) throw new $ba25bd253ef6a407$require$InvalidArgumentError("invalid bodyTimeout"); - if (reset != null && typeof reset !== "boolean") throw new $ba25bd253ef6a407$require$InvalidArgumentError("invalid reset"); - if (expectContinue != null && typeof expectContinue !== "boolean") throw new $ba25bd253ef6a407$require$InvalidArgumentError("invalid expectContinue"); - this.headersTimeout = headersTimeout; - this.bodyTimeout = bodyTimeout; - this.throwOnError = throwOnError === true; - this.method = method; - this.abort = null; - if (body == null) this.body = null; - else if ($gv2nV.isStream(body)) { - this.body = body; - const rState = this.body._readableState; - if (!rState || !rState.autoDestroy) { - this.endHandler = function autoDestroy() { - $gv2nV.destroy(this); - }; - this.body.on("end", this.endHandler); - } - this.errorHandler = (err)=>{ - if (this.abort) this.abort(err); - else this.error = err; - }; - this.body.on("error", this.errorHandler); - } else if ($gv2nV.isBuffer(body)) this.body = body.byteLength ? body : null; - else if (ArrayBuffer.isView(body)) this.body = body.buffer.byteLength ? Buffer.from(body.buffer, body.byteOffset, body.byteLength) : null; - else if (body instanceof ArrayBuffer) this.body = body.byteLength ? Buffer.from(body) : null; - else if (typeof body === "string") this.body = body.length ? Buffer.from(body) : null; - else if ($gv2nV.isFormDataLike(body) || $gv2nV.isIterable(body) || $gv2nV.isBlobLike(body)) this.body = body; - else throw new $ba25bd253ef6a407$require$InvalidArgumentError("body must be a string, a Buffer, a Readable stream, an iterable, or an async iterable"); - this.completed = false; - this.aborted = false; - this.upgrade = upgrade || null; - this.path = query ? $gv2nV.buildURL(path, query) : path; - this.origin = origin; - this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent; - this.blocking = blocking == null ? false : blocking; - this.reset = reset == null ? null : reset; - this.host = null; - this.contentLength = null; - this.contentType = null; - this.headers = ""; - // Only for H2 - this.expectContinue = expectContinue != null ? expectContinue : false; - if (Array.isArray(headers)) { - if (headers.length % 2 !== 0) throw new $ba25bd253ef6a407$require$InvalidArgumentError("headers array must be even"); - for(let i = 0; i < headers.length; i += 2)$ba25bd253ef6a407$var$processHeader(this, headers[i], headers[i + 1]); - } else if (headers && typeof headers === "object") { - const keys = Object.keys(headers); - for(let i = 0; i < keys.length; i++){ - const key = keys[i]; - $ba25bd253ef6a407$var$processHeader(this, key, headers[key]); - } - } else if (headers != null) throw new $ba25bd253ef6a407$require$InvalidArgumentError("headers must be an object or an array"); - if ($gv2nV.isFormDataLike(this.body)) { - if ($gv2nV.nodeMajor < 16 || $gv2nV.nodeMajor === 16 && $gv2nV.nodeMinor < 8) throw new $ba25bd253ef6a407$require$InvalidArgumentError("Form-Data bodies are only supported in node v16.8 and newer."); - if (!$ba25bd253ef6a407$var$extractBody) $ba25bd253ef6a407$var$extractBody = (parcelRequire("4ub3w")).extractBody; - const [bodyStream, contentType] = $ba25bd253ef6a407$var$extractBody(body); - if (this.contentType == null) { - this.contentType = contentType; - this.headers += `content-type: ${contentType}\r\n`; - } - this.body = bodyStream.stream; - this.contentLength = bodyStream.length; - } else if ($gv2nV.isBlobLike(body) && this.contentType == null && body.type) { - this.contentType = body.type; - this.headers += `content-type: ${body.type}\r\n`; - } - $gv2nV.validateHandler(handler, method, upgrade); - this.servername = $gv2nV.getServerName(this.host); - this[$ba25bd253ef6a407$var$kHandler] = handler; - if ($ba25bd253ef6a407$var$channels.create.hasSubscribers) $ba25bd253ef6a407$var$channels.create.publish({ - request: this - }); +$427c2873c054dd4e$var$webidl.argumentLengthCheck = function({ length: length }, min, ctx) { + if (length < min) throw $427c2873c054dd4e$var$webidl.errors.exception({ + message: `${min} argument${min !== 1 ? 's' : ''} required, ` + `but${length ? ' only' : ''} ${length} found.`, + header: ctx + }); +}; +$427c2873c054dd4e$var$webidl.illegalConstructor = function() { + throw $427c2873c054dd4e$var$webidl.errors.exception({ + header: 'TypeError', + message: 'Illegal constructor' + }); +}; +// https://tc39.es/ecma262/#sec-ecmascript-data-types-and-values +$427c2873c054dd4e$var$webidl.util.Type = function(V) { + switch(typeof V){ + case 'undefined': + return 'Undefined'; + case 'boolean': + return 'Boolean'; + case 'string': + return 'String'; + case 'symbol': + return 'Symbol'; + case 'number': + return 'Number'; + case 'bigint': + return 'BigInt'; + case 'function': + case 'object': + if (V === null) return 'Null'; + return 'Object'; } - onBodySent(chunk) { - if (this[$ba25bd253ef6a407$var$kHandler].onBodySent) try { - return this[$ba25bd253ef6a407$var$kHandler].onBodySent(chunk); - } catch (err) { - this.abort(err); - } +}; +$427c2873c054dd4e$var$webidl.util.markAsUncloneable = $427c2873c054dd4e$require$markAsUncloneable || (()=>{}); +// https://webidl.spec.whatwg.org/#abstract-opdef-converttoint +$427c2873c054dd4e$var$webidl.util.ConvertToInt = function(V, bitLength, signedness, opts) { + let upperBound; + let lowerBound; + // 1. If bitLength is 64, then: + if (bitLength === 64) { + // 1. Let upperBound be 2^53 − 1. + upperBound = Math.pow(2, 53) - 1; + // 2. If signedness is "unsigned", then let lowerBound be 0. + if (signedness === 'unsigned') lowerBound = 0; + else // 3. Otherwise let lowerBound be −2^53 + 1. + lowerBound = Math.pow(-2, 53) + 1; + } else if (signedness === 'unsigned') { + // 2. Otherwise, if signedness is "unsigned", then: + // 1. Let lowerBound be 0. + lowerBound = 0; + // 2. Let upperBound be 2^bitLength − 1. + upperBound = Math.pow(2, bitLength) - 1; + } else { + // 3. Otherwise: + // 1. Let lowerBound be -2^bitLength − 1. + lowerBound = Math.pow(-2, bitLength) - 1; + // 2. Let upperBound be 2^bitLength − 1 − 1. + upperBound = Math.pow(2, bitLength - 1) - 1; } - onRequestSent() { - if ($ba25bd253ef6a407$var$channels.bodySent.hasSubscribers) $ba25bd253ef6a407$var$channels.bodySent.publish({ - request: this + // 4. Let x be ? ToNumber(V). + let x = Number(V); + // 5. If x is −0, then set x to +0. + if (x === 0) x = 0; + // 6. If the conversion is to an IDL type associated + // with the [EnforceRange] extended attribute, then: + if (opts?.enforceRange === true) { + // 1. If x is NaN, +∞, or −∞, then throw a TypeError. + if (Number.isNaN(x) || x === Number.POSITIVE_INFINITY || x === Number.NEGATIVE_INFINITY) throw $427c2873c054dd4e$var$webidl.errors.exception({ + header: 'Integer conversion', + message: `Could not convert ${$427c2873c054dd4e$var$webidl.util.Stringify(V)} to an integer.` }); - if (this[$ba25bd253ef6a407$var$kHandler].onRequestSent) try { - return this[$ba25bd253ef6a407$var$kHandler].onRequestSent(); - } catch (err) { - this.abort(err); - } - } - onConnect(abort) { - $g40fK$assert(!this.aborted); - $g40fK$assert(!this.completed); - if (this.error) abort(this.error); - else { - this.abort = abort; - return this[$ba25bd253ef6a407$var$kHandler].onConnect(abort); - } - } - onHeaders(statusCode, headers, resume, statusText) { - $g40fK$assert(!this.aborted); - $g40fK$assert(!this.completed); - if ($ba25bd253ef6a407$var$channels.headers.hasSubscribers) $ba25bd253ef6a407$var$channels.headers.publish({ - request: this, - response: { - statusCode: statusCode, - headers: headers, - statusText: statusText - } + // 2. Set x to IntegerPart(x). + x = $427c2873c054dd4e$var$webidl.util.IntegerPart(x); + // 3. If x < lowerBound or x > upperBound, then + // throw a TypeError. + if (x < lowerBound || x > upperBound) throw $427c2873c054dd4e$var$webidl.errors.exception({ + header: 'Integer conversion', + message: `Value must be between ${lowerBound}-${upperBound}, got ${x}.` }); - try { - return this[$ba25bd253ef6a407$var$kHandler].onHeaders(statusCode, headers, resume, statusText); - } catch (err) { - this.abort(err); - } + // 4. Return x. + return x; } - onData(chunk) { - $g40fK$assert(!this.aborted); - $g40fK$assert(!this.completed); - try { - return this[$ba25bd253ef6a407$var$kHandler].onData(chunk); - } catch (err) { - this.abort(err); - return false; - } + // 7. If x is not NaN and the conversion is to an IDL + // type associated with the [Clamp] extended + // attribute, then: + if (!Number.isNaN(x) && opts?.clamp === true) { + // 1. Set x to min(max(x, lowerBound), upperBound). + x = Math.min(Math.max(x, lowerBound), upperBound); + // 2. Round x to the nearest integer, choosing the + // even integer if it lies halfway between two, + // and choosing +0 rather than −0. + if (Math.floor(x) % 2 === 0) x = Math.floor(x); + else x = Math.ceil(x); + // 3. Return x. + return x; } - onUpgrade(statusCode, headers, socket) { - $g40fK$assert(!this.aborted); - $g40fK$assert(!this.completed); - return this[$ba25bd253ef6a407$var$kHandler].onUpgrade(statusCode, headers, socket); + // 8. If x is NaN, +0, +∞, or −∞, then return +0. + if (Number.isNaN(x) || x === 0 && Object.is(0, x) || x === Number.POSITIVE_INFINITY || x === Number.NEGATIVE_INFINITY) return 0; + // 9. Set x to IntegerPart(x). + x = $427c2873c054dd4e$var$webidl.util.IntegerPart(x); + // 10. Set x to x modulo 2^bitLength. + x = x % Math.pow(2, bitLength); + // 11. If signedness is "signed" and x ≥ 2^bitLength − 1, + // then return x − 2^bitLength. + if (signedness === 'signed' && x >= Math.pow(2, bitLength) - 1) return x - Math.pow(2, bitLength); + // 12. Otherwise, return x. + return x; +}; +// https://webidl.spec.whatwg.org/#abstract-opdef-integerpart +$427c2873c054dd4e$var$webidl.util.IntegerPart = function(n) { + // 1. Let r be floor(abs(n)). + const r = Math.floor(Math.abs(n)); + // 2. If n < 0, then return -1 × r. + if (n < 0) return -1 * r; + // 3. Otherwise, return r. + return r; +}; +$427c2873c054dd4e$var$webidl.util.Stringify = function(V) { + const type = $427c2873c054dd4e$var$webidl.util.Type(V); + switch(type){ + case 'Symbol': + return `Symbol(${V.description})`; + case 'Object': + return $427c2873c054dd4e$require$inspect(V); + case 'String': + return `"${V}"`; + default: + return `${V}`; } - onComplete(trailers) { - this.onFinally(); - $g40fK$assert(!this.aborted); - this.completed = true; - if ($ba25bd253ef6a407$var$channels.trailers.hasSubscribers) $ba25bd253ef6a407$var$channels.trailers.publish({ - request: this, - trailers: trailers +}; +// https://webidl.spec.whatwg.org/#es-sequence +$427c2873c054dd4e$var$webidl.sequenceConverter = function(converter) { + return (V, prefix, argument, Iterable)=>{ + // 1. If Type(V) is not Object, throw a TypeError. + if ($427c2873c054dd4e$var$webidl.util.Type(V) !== 'Object') throw $427c2873c054dd4e$var$webidl.errors.exception({ + header: prefix, + message: `${argument} (${$427c2873c054dd4e$var$webidl.util.Stringify(V)}) is not iterable.` }); - try { - return this[$ba25bd253ef6a407$var$kHandler].onComplete(trailers); - } catch (err) { - // TODO (fix): This might be a bad idea? - this.onError(err); + // 2. Let method be ? GetMethod(V, @@iterator). + /** @type {Generator} */ const method = typeof Iterable === 'function' ? Iterable() : V?.[Symbol.iterator]?.(); + const seq = []; + let index = 0; + // 3. If method is undefined, throw a TypeError. + if (method === undefined || typeof method.next !== 'function') throw $427c2873c054dd4e$var$webidl.errors.exception({ + header: prefix, + message: `${argument} is not iterable.` + }); + // https://webidl.spec.whatwg.org/#create-sequence-from-iterable + while(true){ + const { done: done, value: value } = method.next(); + if (done) break; + seq.push(converter(value, prefix, `${argument}[${index++}]`)); } - } - onError(error) { - this.onFinally(); - if ($ba25bd253ef6a407$var$channels.error.hasSubscribers) $ba25bd253ef6a407$var$channels.error.publish({ - request: this, - error: error + return seq; + }; +}; +// https://webidl.spec.whatwg.org/#es-to-record +$427c2873c054dd4e$var$webidl.recordConverter = function(keyConverter, valueConverter) { + return (O, prefix, argument)=>{ + // 1. If Type(O) is not Object, throw a TypeError. + if ($427c2873c054dd4e$var$webidl.util.Type(O) !== 'Object') throw $427c2873c054dd4e$var$webidl.errors.exception({ + header: prefix, + message: `${argument} ("${$427c2873c054dd4e$var$webidl.util.Type(O)}") is not an Object.` }); - if (this.aborted) return; - this.aborted = true; - return this[$ba25bd253ef6a407$var$kHandler].onError(error); - } - onFinally() { - if (this.errorHandler) { - this.body.off("error", this.errorHandler); - this.errorHandler = null; + // 2. Let result be a new empty instance of record. + const result = {}; + if (!$427c2873c054dd4e$require$types.isProxy(O)) { + // 1. Let desc be ? O.[[GetOwnProperty]](key). + const keys = [ + ...Object.getOwnPropertyNames(O), + ...Object.getOwnPropertySymbols(O) + ]; + for (const key of keys){ + // 1. Let typedKey be key converted to an IDL value of type K. + const typedKey = keyConverter(key, prefix, argument); + // 2. Let value be ? Get(O, key). + // 3. Let typedValue be value converted to an IDL value of type V. + const typedValue = valueConverter(O[key], prefix, argument); + // 4. Set result[typedKey] to typedValue. + result[typedKey] = typedValue; + } + // 5. Return result. + return result; } - if (this.endHandler) { - this.body.off("end", this.endHandler); - this.endHandler = null; + // 3. Let keys be ? O.[[OwnPropertyKeys]](). + const keys = Reflect.ownKeys(O); + // 4. For each key of keys. + for (const key of keys){ + // 1. Let desc be ? O.[[GetOwnProperty]](key). + const desc = Reflect.getOwnPropertyDescriptor(O, key); + // 2. If desc is not undefined and desc.[[Enumerable]] is true: + if (desc?.enumerable) { + // 1. Let typedKey be key converted to an IDL value of type K. + const typedKey = keyConverter(key, prefix, argument); + // 2. Let value be ? Get(O, key). + // 3. Let typedValue be value converted to an IDL value of type V. + const typedValue = valueConverter(O[key], prefix, argument); + // 4. Set result[typedKey] to typedValue. + result[typedKey] = typedValue; + } } - } - // TODO: adjust to support H2 - addHeader(key, value) { - $ba25bd253ef6a407$var$processHeader(this, key, value); - return this; - } - static [$ba25bd253ef6a407$require$kHTTP1BuildRequest](origin, opts, handler) { - // TODO: Migrate header parsing here, to make Requests - // HTTP agnostic - return new $ba25bd253ef6a407$var$Request(origin, opts, handler); - } - static [$ba25bd253ef6a407$require$kHTTP2BuildRequest](origin, opts, handler) { - const headers = opts.headers; - opts = { - ...opts, - headers: null - }; - const request = new $ba25bd253ef6a407$var$Request(origin, opts, handler); - request.headers = {}; - if (Array.isArray(headers)) { - if (headers.length % 2 !== 0) throw new $ba25bd253ef6a407$require$InvalidArgumentError("headers array must be even"); - for(let i = 0; i < headers.length; i += 2)$ba25bd253ef6a407$var$processHeader(request, headers[i], headers[i + 1], true); - } else if (headers && typeof headers === "object") { - const keys = Object.keys(headers); - for(let i = 0; i < keys.length; i++){ - const key = keys[i]; - $ba25bd253ef6a407$var$processHeader(request, key, headers[key], true); - } - } else if (headers != null) throw new $ba25bd253ef6a407$require$InvalidArgumentError("headers must be an object or an array"); - return request; - } - static [$ba25bd253ef6a407$require$kHTTP2CopyHeaders](raw) { - const rawHeaders = raw.split("\r\n"); - const headers = {}; - for (const header of rawHeaders){ - const [key, value] = header.split(": "); - if (value == null || value.length === 0) continue; - if (headers[key]) headers[key] += `,${value}`; - else headers[key] = value; + // 5. Return result. + return result; + }; +}; +$427c2873c054dd4e$var$webidl.interfaceConverter = function(i) { + return (V, prefix, argument, opts)=>{ + if (opts?.strict !== false && !(V instanceof i)) throw $427c2873c054dd4e$var$webidl.errors.exception({ + header: prefix, + message: `Expected ${argument} ("${$427c2873c054dd4e$var$webidl.util.Stringify(V)}") to be an instance of ${i.name}.` + }); + return V; + }; +}; +$427c2873c054dd4e$var$webidl.dictionaryConverter = function(converters) { + return (dictionary, prefix, argument)=>{ + const type = $427c2873c054dd4e$var$webidl.util.Type(dictionary); + const dict = {}; + if (type === 'Null' || type === 'Undefined') return dict; + else if (type !== 'Object') throw $427c2873c054dd4e$var$webidl.errors.exception({ + header: prefix, + message: `Expected ${dictionary} to be one of: Null, Undefined, Object.` + }); + for (const options of converters){ + const { key: key, defaultValue: defaultValue, required: required, converter: converter } = options; + if (required === true) { + if (!Object.hasOwn(dictionary, key)) throw $427c2873c054dd4e$var$webidl.errors.exception({ + header: prefix, + message: `Missing required key "${key}".` + }); + } + let value = dictionary[key]; + const hasDefault = Object.hasOwn(options, 'defaultValue'); + // Only use defaultValue if value is undefined and + // a defaultValue options was provided. + if (hasDefault && value !== null) value ??= defaultValue(); + // A key can be optional and have no default value. + // When this happens, do not perform a conversion, + // and do not assign the key a value. + if (required || hasDefault || value !== undefined) { + value = converter(value, prefix, `${argument}.${key}`); + if (options.allowedValues && !options.allowedValues.includes(value)) throw $427c2873c054dd4e$var$webidl.errors.exception({ + header: prefix, + message: `${value} is not an accepted type. Expected one of ${options.allowedValues.join(', ')}.` + }); + dict[key] = value; + } } - return headers; - } -} -function $ba25bd253ef6a407$var$processHeaderValue(key, val, skipAppend) { - if (val && typeof val === "object") throw new $ba25bd253ef6a407$require$InvalidArgumentError(`invalid ${key} header`); - val = val != null ? `${val}` : ""; - if ($ba25bd253ef6a407$var$headerCharRegex.exec(val) !== null) throw new $ba25bd253ef6a407$require$InvalidArgumentError(`invalid ${key} header`); - return skipAppend ? val : `${key}: ${val}\r\n`; -} -function $ba25bd253ef6a407$var$processHeader(request, key, val, skipAppend = false) { - if (val && typeof val === "object" && !Array.isArray(val)) throw new $ba25bd253ef6a407$require$InvalidArgumentError(`invalid ${key} header`); - else if (val === undefined) return; - if (request.host === null && key.length === 4 && key.toLowerCase() === "host") { - if ($ba25bd253ef6a407$var$headerCharRegex.exec(val) !== null) throw new $ba25bd253ef6a407$require$InvalidArgumentError(`invalid ${key} header`); - // Consumed by Client - request.host = val; - } else if (request.contentLength === null && key.length === 14 && key.toLowerCase() === "content-length") { - request.contentLength = parseInt(val, 10); - if (!Number.isFinite(request.contentLength)) throw new $ba25bd253ef6a407$require$InvalidArgumentError("invalid content-length header"); - } else if (request.contentType === null && key.length === 12 && key.toLowerCase() === "content-type") { - request.contentType = val; - if (skipAppend) request.headers[key] = $ba25bd253ef6a407$var$processHeaderValue(key, val, skipAppend); - else request.headers += $ba25bd253ef6a407$var$processHeaderValue(key, val); - } else if (key.length === 17 && key.toLowerCase() === "transfer-encoding") throw new $ba25bd253ef6a407$require$InvalidArgumentError("invalid transfer-encoding header"); - else if (key.length === 10 && key.toLowerCase() === "connection") { - const value = typeof val === "string" ? val.toLowerCase() : null; - if (value !== "close" && value !== "keep-alive") throw new $ba25bd253ef6a407$require$InvalidArgumentError("invalid connection header"); - else if (value === "close") request.reset = true; - } else if (key.length === 10 && key.toLowerCase() === "keep-alive") throw new $ba25bd253ef6a407$require$InvalidArgumentError("invalid keep-alive header"); - else if (key.length === 7 && key.toLowerCase() === "upgrade") throw new $ba25bd253ef6a407$require$InvalidArgumentError("invalid upgrade header"); - else if (key.length === 6 && key.toLowerCase() === "expect") throw new $ba25bd253ef6a407$require$NotSupportedError("expect header not supported"); - else if ($ba25bd253ef6a407$var$tokenRegExp.exec(key) === null) throw new $ba25bd253ef6a407$require$InvalidArgumentError("invalid header key"); - else { - if (Array.isArray(val)) { - for(let i = 0; i < val.length; i++)if (skipAppend) { - if (request.headers[key]) request.headers[key] += `,${$ba25bd253ef6a407$var$processHeaderValue(key, val[i], skipAppend)}`; - else request.headers[key] = $ba25bd253ef6a407$var$processHeaderValue(key, val[i], skipAppend); - } else request.headers += $ba25bd253ef6a407$var$processHeaderValue(key, val[i]); - } else if (skipAppend) request.headers[key] = $ba25bd253ef6a407$var$processHeaderValue(key, val, skipAppend); - else request.headers += $ba25bd253ef6a407$var$processHeaderValue(key, val); + return dict; + }; +}; +$427c2873c054dd4e$var$webidl.nullableConverter = function(converter) { + return (V, prefix, argument)=>{ + if (V === null) return V; + return converter(V, prefix, argument); + }; +}; +// https://webidl.spec.whatwg.org/#es-DOMString +$427c2873c054dd4e$var$webidl.converters.DOMString = function(V, prefix, argument, opts) { + // 1. If V is null and the conversion is to an IDL type + // associated with the [LegacyNullToEmptyString] + // extended attribute, then return the DOMString value + // that represents the empty string. + if (V === null && opts?.legacyNullToEmptyString) return ''; + // 2. Let x be ? ToString(V). + if (typeof V === 'symbol') throw $427c2873c054dd4e$var$webidl.errors.exception({ + header: prefix, + message: `${argument} is a symbol, which cannot be converted to a DOMString.` + }); + // 3. Return the IDL DOMString value that represents the + // same sequence of code units as the one the + // ECMAScript String value x represents. + return String(V); +}; +// https://webidl.spec.whatwg.org/#es-ByteString +$427c2873c054dd4e$var$webidl.converters.ByteString = function(V, prefix, argument) { + // 1. Let x be ? ToString(V). + // Note: DOMString converter perform ? ToString(V) + const x = $427c2873c054dd4e$var$webidl.converters.DOMString(V, prefix, argument); + // 2. If the value of any element of x is greater than + // 255, then throw a TypeError. + for(let index = 0; index < x.length; index++){ + if (x.charCodeAt(index) > 255) throw new TypeError('Cannot convert argument to a ByteString because the character at ' + `index ${index} has a value of ${x.charCodeAt(index)} which is greater than 255.`); } -} -module.exports = $ba25bd253ef6a407$var$Request; - -}); -parcelRegister("4ub3w", function(module, exports) { -"use strict"; - -var $6VInI = parcelRequire("6VInI"); - -var $gv2nV = parcelRequire("gv2nV"); - -var $4EkpM = parcelRequire("4EkpM"); -var $34428a370af74707$require$ReadableStreamFrom = $4EkpM.ReadableStreamFrom; -var $34428a370af74707$require$isBlobLike = $4EkpM.isBlobLike; -var $34428a370af74707$require$isReadableStreamLike = $4EkpM.isReadableStreamLike; -var $34428a370af74707$require$readableStreamClose = $4EkpM.readableStreamClose; -var $34428a370af74707$require$createDeferredPromise = $4EkpM.createDeferredPromise; -var $34428a370af74707$require$fullyReadBody = $4EkpM.fullyReadBody; - -var $40V0q = parcelRequire("40V0q"); -var $34428a370af74707$require$FormData = $40V0q.FormData; - -var $74L4J = parcelRequire("74L4J"); -var $34428a370af74707$require$kState = $74L4J.kState; - -var $jk0LQ = parcelRequire("jk0LQ"); -var $34428a370af74707$require$webidl = $jk0LQ.webidl; - -var $1ZCMb = parcelRequire("1ZCMb"); -var $34428a370af74707$require$DOMException = $1ZCMb.DOMException; -var $34428a370af74707$require$structuredClone = $1ZCMb.structuredClone; - -var $34428a370af74707$require$Blob = $g40fK$buffer.Blob; -var $34428a370af74707$require$NativeFile = $g40fK$buffer.File; - -var $hHZvh = parcelRequire("hHZvh"); -var $34428a370af74707$require$kBodyUsed = $hHZvh.kBodyUsed; - - -var $gv2nV = parcelRequire("gv2nV"); -var $34428a370af74707$require$isErrored = $gv2nV.isErrored; - -var $34428a370af74707$require$isUint8Array = $g40fK$utiltypes.isUint8Array; -var $34428a370af74707$require$isArrayBuffer = $g40fK$utiltypes.isArrayBuffer; - -var $ltaTH = parcelRequire("ltaTH"); -var $34428a370af74707$require$UndiciFile = $ltaTH.File; - -var $bNorT = parcelRequire("bNorT"); -var $34428a370af74707$require$parseMIMEType = $bNorT.parseMIMEType; -var $34428a370af74707$require$serializeAMimeType = $bNorT.serializeAMimeType; -let $34428a370af74707$var$ReadableStream = globalThis.ReadableStream; -/** @type {globalThis['File']} */ const $34428a370af74707$var$File = $34428a370af74707$require$NativeFile ?? $34428a370af74707$require$UndiciFile; -const $34428a370af74707$var$textEncoder = new TextEncoder(); -const $34428a370af74707$var$textDecoder = new TextDecoder(); - -// https://fetch.spec.whatwg.org/#concept-bodyinit-extract -function $34428a370af74707$var$extractBody(object, keepalive = false) { - if (!$34428a370af74707$var$ReadableStream) $34428a370af74707$var$ReadableStream = $g40fK$streamweb.ReadableStream; - // 1. Let stream be null. - let stream = null; - // 2. If object is a ReadableStream object, then set stream to object. - if (object instanceof $34428a370af74707$var$ReadableStream) stream = object; - else if ($34428a370af74707$require$isBlobLike(object)) // 3. Otherwise, if object is a Blob object, set stream to the - // result of running object’s get stream. - stream = object.stream(); - else // 4. Otherwise, set stream to a new ReadableStream object, and set - // up stream. - stream = new $34428a370af74707$var$ReadableStream({ - async pull (controller) { - controller.enqueue(typeof source === "string" ? $34428a370af74707$var$textEncoder.encode(source) : source); - queueMicrotask(()=>$34428a370af74707$require$readableStreamClose(controller)); - }, - start () {}, - type: undefined + // 3. Return an IDL ByteString value whose length is the + // length of x, and where the value of each element is + // the value of the corresponding element of x. + return x; +}; +// https://webidl.spec.whatwg.org/#es-USVString +// TODO: rewrite this so we can control the errors thrown +$427c2873c054dd4e$var$webidl.converters.USVString = $427c2873c054dd4e$require$toUSVString; +// https://webidl.spec.whatwg.org/#es-boolean +$427c2873c054dd4e$var$webidl.converters.boolean = function(V) { + // 1. Let x be the result of computing ToBoolean(V). + const x = Boolean(V); + // 2. Return the IDL boolean value that is the one that represents + // the same truth value as the ECMAScript Boolean value x. + return x; +}; +// https://webidl.spec.whatwg.org/#es-any +$427c2873c054dd4e$var$webidl.converters.any = function(V) { + return V; +}; +// https://webidl.spec.whatwg.org/#es-long-long +$427c2873c054dd4e$var$webidl.converters['long long'] = function(V, prefix, argument) { + // 1. Let x be ? ConvertToInt(V, 64, "signed"). + const x = $427c2873c054dd4e$var$webidl.util.ConvertToInt(V, 64, 'signed', undefined, prefix, argument); + // 2. Return the IDL long long value that represents + // the same numeric value as x. + return x; +}; +// https://webidl.spec.whatwg.org/#es-unsigned-long-long +$427c2873c054dd4e$var$webidl.converters['unsigned long long'] = function(V, prefix, argument) { + // 1. Let x be ? ConvertToInt(V, 64, "unsigned"). + const x = $427c2873c054dd4e$var$webidl.util.ConvertToInt(V, 64, 'unsigned', undefined, prefix, argument); + // 2. Return the IDL unsigned long long value that + // represents the same numeric value as x. + return x; +}; +// https://webidl.spec.whatwg.org/#es-unsigned-long +$427c2873c054dd4e$var$webidl.converters['unsigned long'] = function(V, prefix, argument) { + // 1. Let x be ? ConvertToInt(V, 32, "unsigned"). + const x = $427c2873c054dd4e$var$webidl.util.ConvertToInt(V, 32, 'unsigned', undefined, prefix, argument); + // 2. Return the IDL unsigned long value that + // represents the same numeric value as x. + return x; +}; +// https://webidl.spec.whatwg.org/#es-unsigned-short +$427c2873c054dd4e$var$webidl.converters['unsigned short'] = function(V, prefix, argument, opts) { + // 1. Let x be ? ConvertToInt(V, 16, "unsigned"). + const x = $427c2873c054dd4e$var$webidl.util.ConvertToInt(V, 16, 'unsigned', opts, prefix, argument); + // 2. Return the IDL unsigned short value that represents + // the same numeric value as x. + return x; +}; +// https://webidl.spec.whatwg.org/#idl-ArrayBuffer +$427c2873c054dd4e$var$webidl.converters.ArrayBuffer = function(V, prefix, argument, opts) { + // 1. If Type(V) is not Object, or V does not have an + // [[ArrayBufferData]] internal slot, then throw a + // TypeError. + // see: https://tc39.es/ecma262/#sec-properties-of-the-arraybuffer-instances + // see: https://tc39.es/ecma262/#sec-properties-of-the-sharedarraybuffer-instances + if ($427c2873c054dd4e$var$webidl.util.Type(V) !== 'Object' || !$427c2873c054dd4e$require$types.isAnyArrayBuffer(V)) throw $427c2873c054dd4e$var$webidl.errors.conversionFailed({ + prefix: prefix, + argument: `${argument} ("${$427c2873c054dd4e$var$webidl.util.Stringify(V)}")`, + types: [ + 'ArrayBuffer' + ] }); - // 5. Assert: stream is a ReadableStream object. - $g40fK$assert($34428a370af74707$require$isReadableStreamLike(stream)); - // 6. Let action be null. - let action = null; - // 7. Let source be null. - let source = null; - // 8. Let length be null. - let length = null; - // 9. Let type be null. - let type = null; - // 10. Switch on object: - if (typeof object === "string") { - // Set source to the UTF-8 encoding of object. - // Note: setting source to a Uint8Array here breaks some mocking assumptions. - source = object; - // Set type to `text/plain;charset=UTF-8`. - type = "text/plain;charset=UTF-8"; - } else if (object instanceof URLSearchParams) { - // URLSearchParams - // spec says to run application/x-www-form-urlencoded on body.list - // this is implemented in Node.js as apart of an URLSearchParams instance toString method - // See: https://github.com/nodejs/node/blob/e46c680bf2b211bbd52cf959ca17ee98c7f657f5/lib/internal/url.js#L490 - // and https://github.com/nodejs/node/blob/e46c680bf2b211bbd52cf959ca17ee98c7f657f5/lib/internal/url.js#L1100 - // Set source to the result of running the application/x-www-form-urlencoded serializer with object’s list. - source = object.toString(); - // Set type to `application/x-www-form-urlencoded;charset=UTF-8`. - type = "application/x-www-form-urlencoded;charset=UTF-8"; - } else if ($34428a370af74707$require$isArrayBuffer(object)) // BufferSource/ArrayBuffer - // Set source to a copy of the bytes held by object. - source = new Uint8Array(object.slice()); - else if (ArrayBuffer.isView(object)) // BufferSource/ArrayBufferView - // Set source to a copy of the bytes held by object. - source = new Uint8Array(object.buffer.slice(object.byteOffset, object.byteOffset + object.byteLength)); - else if ($gv2nV.isFormDataLike(object)) { - const boundary = `----formdata-undici-0${`${Math.floor(Math.random() * 1e11)}`.padStart(11, "0")}`; - const prefix = `--${boundary}\r\nContent-Disposition: form-data`; - /*! formdata-polyfill. MIT License. Jimmy Wärting */ 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"); - // Set action to this step: run the multipart/form-data - // encoding algorithm, with object’s entry list and UTF-8. - // - This ensures that the body is immutable and can't be changed afterwords - // - That the content-length is calculated in advance. - // - And that all parts are pre-encoded and ready to be sent. - const blobParts = []; - const rn = new Uint8Array([ - 13, - 10 - ]) // '\r\n' - ; - length = 0; - let hasUnknownSizeValue = false; - for (const [name, value] of object)if (typeof value === "string") { - const chunk = $34428a370af74707$var$textEncoder.encode(prefix + `; name="${escape(normalizeLinefeeds(name))}"` + `\r\n\r\n${normalizeLinefeeds(value)}\r\n`); - blobParts.push(chunk); - length += chunk.byteLength; - } else { - const chunk = $34428a370af74707$var$textEncoder.encode(`${prefix}; name="${escape(normalizeLinefeeds(name))}"` + (value.name ? `; filename="${escape(value.name)}"` : "") + "\r\n" + `Content-Type: ${value.type || "application/octet-stream"}\r\n\r\n`); - blobParts.push(chunk, value, rn); - if (typeof value.size === "number") length += chunk.byteLength + value.size + rn.byteLength; - else hasUnknownSizeValue = true; - } - const chunk = $34428a370af74707$var$textEncoder.encode(`--${boundary}--`); - blobParts.push(chunk); - length += chunk.byteLength; - if (hasUnknownSizeValue) length = null; - // Set source to object. - source = object; - action = async function*() { - for (const part of blobParts)if (part.stream) yield* part.stream(); - else yield part; - }; - // Set type to `multipart/form-data; boundary=`, - // followed by the multipart/form-data boundary string generated - // by the multipart/form-data encoding algorithm. - type = "multipart/form-data; boundary=" + boundary; - } else if ($34428a370af74707$require$isBlobLike(object)) { - // Blob - // Set source to object. - source = object; - // Set length to object’s size. - length = object.size; - // If object’s type attribute is not the empty byte sequence, set - // type to its value. - if (object.type) type = object.type; - } else if (typeof object[Symbol.asyncIterator] === "function") { - // If keepalive is true, then throw a TypeError. - if (keepalive) throw new TypeError("keepalive"); - // If object is disturbed or locked, then throw a TypeError. - if ($gv2nV.isDisturbed(object) || object.locked) throw new TypeError("Response body object should not be disturbed or locked"); - stream = object instanceof $34428a370af74707$var$ReadableStream ? object : $34428a370af74707$require$ReadableStreamFrom(object); + // 2. If the conversion is not to an IDL type associated + // with the [AllowShared] extended attribute, and + // IsSharedArrayBuffer(V) is true, then throw a + // TypeError. + if (opts?.allowShared === false && $427c2873c054dd4e$require$types.isSharedArrayBuffer(V)) throw $427c2873c054dd4e$var$webidl.errors.exception({ + header: 'ArrayBuffer', + message: 'SharedArrayBuffer is not allowed.' + }); + // 3. If the conversion is not to an IDL type associated + // with the [AllowResizable] extended attribute, and + // IsResizableArrayBuffer(V) is true, then throw a + // TypeError. + if (V.resizable || V.growable) throw $427c2873c054dd4e$var$webidl.errors.exception({ + header: 'ArrayBuffer', + message: 'Received a resizable ArrayBuffer.' + }); + // 4. Return the IDL ArrayBuffer value that is a + // reference to the same object as V. + return V; +}; +$427c2873c054dd4e$var$webidl.converters.TypedArray = function(V, T, prefix, name, opts) { + // 1. Let T be the IDL type V is being converted to. + // 2. If Type(V) is not Object, or V does not have a + // [[TypedArrayName]] internal slot with a value + // equal to T’s name, then throw a TypeError. + if ($427c2873c054dd4e$var$webidl.util.Type(V) !== 'Object' || !$427c2873c054dd4e$require$types.isTypedArray(V) || V.constructor.name !== T.name) throw $427c2873c054dd4e$var$webidl.errors.conversionFailed({ + prefix: prefix, + argument: `${name} ("${$427c2873c054dd4e$var$webidl.util.Stringify(V)}")`, + types: [ + T.name + ] + }); + // 3. If the conversion is not to an IDL type associated + // with the [AllowShared] extended attribute, and + // IsSharedArrayBuffer(V.[[ViewedArrayBuffer]]) is + // true, then throw a TypeError. + if (opts?.allowShared === false && $427c2873c054dd4e$require$types.isSharedArrayBuffer(V.buffer)) throw $427c2873c054dd4e$var$webidl.errors.exception({ + header: 'ArrayBuffer', + message: 'SharedArrayBuffer is not allowed.' + }); + // 4. If the conversion is not to an IDL type associated + // with the [AllowResizable] extended attribute, and + // IsResizableArrayBuffer(V.[[ViewedArrayBuffer]]) is + // true, then throw a TypeError. + if (V.buffer.resizable || V.buffer.growable) throw $427c2873c054dd4e$var$webidl.errors.exception({ + header: 'ArrayBuffer', + message: 'Received a resizable ArrayBuffer.' + }); + // 5. Return the IDL value of type T that is a reference + // to the same object as V. + return V; +}; +$427c2873c054dd4e$var$webidl.converters.DataView = function(V, prefix, name, opts) { + // 1. If Type(V) is not Object, or V does not have a + // [[DataView]] internal slot, then throw a TypeError. + if ($427c2873c054dd4e$var$webidl.util.Type(V) !== 'Object' || !$427c2873c054dd4e$require$types.isDataView(V)) throw $427c2873c054dd4e$var$webidl.errors.exception({ + header: prefix, + message: `${name} is not a DataView.` + }); + // 2. If the conversion is not to an IDL type associated + // with the [AllowShared] extended attribute, and + // IsSharedArrayBuffer(V.[[ViewedArrayBuffer]]) is true, + // then throw a TypeError. + if (opts?.allowShared === false && $427c2873c054dd4e$require$types.isSharedArrayBuffer(V.buffer)) throw $427c2873c054dd4e$var$webidl.errors.exception({ + header: 'ArrayBuffer', + message: 'SharedArrayBuffer is not allowed.' + }); + // 3. If the conversion is not to an IDL type associated + // with the [AllowResizable] extended attribute, and + // IsResizableArrayBuffer(V.[[ViewedArrayBuffer]]) is + // true, then throw a TypeError. + if (V.buffer.resizable || V.buffer.growable) throw $427c2873c054dd4e$var$webidl.errors.exception({ + header: 'ArrayBuffer', + message: 'Received a resizable ArrayBuffer.' + }); + // 4. Return the IDL DataView value that is a reference + // to the same object as V. + return V; +}; +// https://webidl.spec.whatwg.org/#BufferSource +$427c2873c054dd4e$var$webidl.converters.BufferSource = function(V, prefix, name, opts) { + if ($427c2873c054dd4e$require$types.isAnyArrayBuffer(V)) return $427c2873c054dd4e$var$webidl.converters.ArrayBuffer(V, prefix, name, { + ...opts, + allowShared: false + }); + if ($427c2873c054dd4e$require$types.isTypedArray(V)) return $427c2873c054dd4e$var$webidl.converters.TypedArray(V, V.constructor, prefix, name, { + ...opts, + allowShared: false + }); + if ($427c2873c054dd4e$require$types.isDataView(V)) return $427c2873c054dd4e$var$webidl.converters.DataView(V, prefix, name, { + ...opts, + allowShared: false + }); + throw $427c2873c054dd4e$var$webidl.errors.conversionFailed({ + prefix: prefix, + argument: `${name} ("${$427c2873c054dd4e$var$webidl.util.Stringify(V)}")`, + types: [ + 'BufferSource' + ] + }); +}; +$427c2873c054dd4e$var$webidl.converters['sequence'] = $427c2873c054dd4e$var$webidl.sequenceConverter($427c2873c054dd4e$var$webidl.converters.ByteString); +$427c2873c054dd4e$var$webidl.converters['sequence>'] = $427c2873c054dd4e$var$webidl.sequenceConverter($427c2873c054dd4e$var$webidl.converters['sequence']); +$427c2873c054dd4e$var$webidl.converters['record'] = $427c2873c054dd4e$var$webidl.recordConverter($427c2873c054dd4e$var$webidl.converters.ByteString, $427c2873c054dd4e$var$webidl.converters.ByteString); +module.exports = { + webidl: $427c2873c054dd4e$var$webidl +}; + +}); + + +parcelRegister("kFkJR", function(module, exports) { +'use strict'; + +var $7z0I9 = parcelRequire("7z0I9"); +var $f0b7b93d9d4dd4c6$require$isBlobLike = $7z0I9.isBlobLike; +var $f0b7b93d9d4dd4c6$require$iteratorMixin = $7z0I9.iteratorMixin; + +var $faXHi = parcelRequire("faXHi"); +var $f0b7b93d9d4dd4c6$require$kState = $faXHi.kState; + +var $bFRvW = parcelRequire("bFRvW"); +var $f0b7b93d9d4dd4c6$require$kEnumerableProperty = $bFRvW.kEnumerableProperty; + +var $6AjPF = parcelRequire("6AjPF"); +var $f0b7b93d9d4dd4c6$require$FileLike = $6AjPF.FileLike; +var $f0b7b93d9d4dd4c6$require$isFileLike = $6AjPF.isFileLike; + +var $5HTG7 = parcelRequire("5HTG7"); +var $f0b7b93d9d4dd4c6$require$webidl = $5HTG7.webidl; + +var $f0b7b93d9d4dd4c6$require$NativeFile = $in2sP$nodebuffer.File; + +/** @type {globalThis['File']} */ const $f0b7b93d9d4dd4c6$var$File = globalThis.File ?? $f0b7b93d9d4dd4c6$require$NativeFile; +// https://xhr.spec.whatwg.org/#formdata +class $f0b7b93d9d4dd4c6$var$FormData { + constructor(form){ + $f0b7b93d9d4dd4c6$require$webidl.util.markAsUncloneable(this); + if (form !== undefined) throw $f0b7b93d9d4dd4c6$require$webidl.errors.conversionFailed({ + prefix: 'FormData constructor', + argument: 'Argument 1', + types: [ + 'undefined' + ] + }); + this[$f0b7b93d9d4dd4c6$require$kState] = []; } - // 11. If source is a byte sequence, then set action to a - // step that returns source and length to source’s length. - if (typeof source === "string" || $gv2nV.isBuffer(source)) length = Buffer.byteLength(source); - // 12. If action is non-null, then run these steps in in parallel: - if (action != null) { - // Run action. - let iterator; - stream = new $34428a370af74707$var$ReadableStream({ - async start () { - iterator = action(object)[Symbol.asyncIterator](); - }, - async pull (controller) { - const { value: value, done: done } = await iterator.next(); - if (done) // When running action is done, close stream. - queueMicrotask(()=>{ - controller.close(); - }); - else // Whenever one or more bytes are available and stream is not errored, - // enqueue a Uint8Array wrapping an ArrayBuffer containing the available - // bytes into stream. - if (!$34428a370af74707$require$isErrored(stream)) controller.enqueue(new Uint8Array(value)); - return controller.desiredSize > 0; - }, - async cancel (reason) { - await iterator.return(); - }, - type: undefined + append(name, value, filename) { + $f0b7b93d9d4dd4c6$require$webidl.brandCheck(this, $f0b7b93d9d4dd4c6$var$FormData); + const prefix = 'FormData.append'; + $f0b7b93d9d4dd4c6$require$webidl.argumentLengthCheck(arguments, 2, prefix); + if (arguments.length === 3 && !$f0b7b93d9d4dd4c6$require$isBlobLike(value)) throw new TypeError("Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'"); + // 1. Let value be value if given; otherwise blobValue. + name = $f0b7b93d9d4dd4c6$require$webidl.converters.USVString(name, prefix, 'name'); + value = $f0b7b93d9d4dd4c6$require$isBlobLike(value) ? $f0b7b93d9d4dd4c6$require$webidl.converters.Blob(value, prefix, 'value', { + strict: false + }) : $f0b7b93d9d4dd4c6$require$webidl.converters.USVString(value, prefix, 'value'); + filename = arguments.length === 3 ? $f0b7b93d9d4dd4c6$require$webidl.converters.USVString(filename, prefix, 'filename') : undefined; + // 2. Let entry be the result of creating an entry with + // name, value, and filename if given. + const entry = $f0b7b93d9d4dd4c6$var$makeEntry(name, value, filename); + // 3. Append entry to this’s entry list. + this[$f0b7b93d9d4dd4c6$require$kState].push(entry); + } + delete(name) { + $f0b7b93d9d4dd4c6$require$webidl.brandCheck(this, $f0b7b93d9d4dd4c6$var$FormData); + const prefix = 'FormData.delete'; + $f0b7b93d9d4dd4c6$require$webidl.argumentLengthCheck(arguments, 1, prefix); + name = $f0b7b93d9d4dd4c6$require$webidl.converters.USVString(name, prefix, 'name'); + // The delete(name) method steps are to remove all entries whose name + // is name from this’s entry list. + this[$f0b7b93d9d4dd4c6$require$kState] = this[$f0b7b93d9d4dd4c6$require$kState].filter((entry)=>entry.name !== name); + } + get(name) { + $f0b7b93d9d4dd4c6$require$webidl.brandCheck(this, $f0b7b93d9d4dd4c6$var$FormData); + const prefix = 'FormData.get'; + $f0b7b93d9d4dd4c6$require$webidl.argumentLengthCheck(arguments, 1, prefix); + name = $f0b7b93d9d4dd4c6$require$webidl.converters.USVString(name, prefix, 'name'); + // 1. If there is no entry whose name is name in this’s entry list, + // then return null. + const idx = this[$f0b7b93d9d4dd4c6$require$kState].findIndex((entry)=>entry.name === name); + if (idx === -1) return null; + // 2. Return the value of the first entry whose name is name from + // this’s entry list. + return this[$f0b7b93d9d4dd4c6$require$kState][idx].value; + } + getAll(name) { + $f0b7b93d9d4dd4c6$require$webidl.brandCheck(this, $f0b7b93d9d4dd4c6$var$FormData); + const prefix = 'FormData.getAll'; + $f0b7b93d9d4dd4c6$require$webidl.argumentLengthCheck(arguments, 1, prefix); + name = $f0b7b93d9d4dd4c6$require$webidl.converters.USVString(name, prefix, 'name'); + // 1. If there is no entry whose name is name in this’s entry list, + // then return the empty list. + // 2. Return the values of all entries whose name is name, in order, + // from this’s entry list. + return this[$f0b7b93d9d4dd4c6$require$kState].filter((entry)=>entry.name === name).map((entry)=>entry.value); + } + has(name) { + $f0b7b93d9d4dd4c6$require$webidl.brandCheck(this, $f0b7b93d9d4dd4c6$var$FormData); + const prefix = 'FormData.has'; + $f0b7b93d9d4dd4c6$require$webidl.argumentLengthCheck(arguments, 1, prefix); + name = $f0b7b93d9d4dd4c6$require$webidl.converters.USVString(name, prefix, 'name'); + // The has(name) method steps are to return true if there is an entry + // whose name is name in this’s entry list; otherwise false. + return this[$f0b7b93d9d4dd4c6$require$kState].findIndex((entry)=>entry.name === name) !== -1; + } + set(name, value, filename) { + $f0b7b93d9d4dd4c6$require$webidl.brandCheck(this, $f0b7b93d9d4dd4c6$var$FormData); + const prefix = 'FormData.set'; + $f0b7b93d9d4dd4c6$require$webidl.argumentLengthCheck(arguments, 2, prefix); + if (arguments.length === 3 && !$f0b7b93d9d4dd4c6$require$isBlobLike(value)) throw new TypeError("Failed to execute 'set' on 'FormData': parameter 2 is not of type 'Blob'"); + // The set(name, value) and set(name, blobValue, filename) method steps + // are: + // 1. Let value be value if given; otherwise blobValue. + name = $f0b7b93d9d4dd4c6$require$webidl.converters.USVString(name, prefix, 'name'); + value = $f0b7b93d9d4dd4c6$require$isBlobLike(value) ? $f0b7b93d9d4dd4c6$require$webidl.converters.Blob(value, prefix, 'name', { + strict: false + }) : $f0b7b93d9d4dd4c6$require$webidl.converters.USVString(value, prefix, 'name'); + filename = arguments.length === 3 ? $f0b7b93d9d4dd4c6$require$webidl.converters.USVString(filename, prefix, 'name') : undefined; + // 2. Let entry be the result of creating an entry with name, value, and + // filename if given. + const entry = $f0b7b93d9d4dd4c6$var$makeEntry(name, value, filename); + // 3. If there are entries in this’s entry list whose name is name, then + // replace the first such entry with entry and remove the others. + const idx = this[$f0b7b93d9d4dd4c6$require$kState].findIndex((entry)=>entry.name === name); + if (idx !== -1) this[$f0b7b93d9d4dd4c6$require$kState] = [ + ...this[$f0b7b93d9d4dd4c6$require$kState].slice(0, idx), + entry, + ...this[$f0b7b93d9d4dd4c6$require$kState].slice(idx + 1).filter((entry)=>entry.name !== name) + ]; + else // 4. Otherwise, append entry to this’s entry list. + this[$f0b7b93d9d4dd4c6$require$kState].push(entry); + } + [$in2sP$nodeutil.inspect.custom](depth, options) { + const state = this[$f0b7b93d9d4dd4c6$require$kState].reduce((a, b)=>{ + if (a[b.name]) { + if (Array.isArray(a[b.name])) a[b.name].push(b.value); + else a[b.name] = [ + a[b.name], + b.value + ]; + } else a[b.name] = b.value; + return a; + }, { + __proto__: null }); + options.depth ??= depth; + options.colors ??= true; + const output = $in2sP$nodeutil.formatWithOptions(options, state); + // remove [Object null prototype] + return `FormData ${output.slice(output.indexOf(']') + 2)}`; + } +} +$f0b7b93d9d4dd4c6$require$iteratorMixin('FormData', $f0b7b93d9d4dd4c6$var$FormData, $f0b7b93d9d4dd4c6$require$kState, 'name', 'value'); +Object.defineProperties($f0b7b93d9d4dd4c6$var$FormData.prototype, { + append: $f0b7b93d9d4dd4c6$require$kEnumerableProperty, + delete: $f0b7b93d9d4dd4c6$require$kEnumerableProperty, + get: $f0b7b93d9d4dd4c6$require$kEnumerableProperty, + getAll: $f0b7b93d9d4dd4c6$require$kEnumerableProperty, + has: $f0b7b93d9d4dd4c6$require$kEnumerableProperty, + set: $f0b7b93d9d4dd4c6$require$kEnumerableProperty, + [Symbol.toStringTag]: { + value: 'FormData', + configurable: true } - // 13. Let body be a body whose stream is stream, source is source, - // and length is length. - const body = { - stream: stream, - source: source, - length: length +}); +/** + * @see https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#create-an-entry + * @param {string} name + * @param {string|Blob} value + * @param {?string} filename + * @returns + */ function $f0b7b93d9d4dd4c6$var$makeEntry(name, value, filename) { + // 1. Set name to the result of converting name into a scalar value string. + // Note: This operation was done by the webidl converter USVString. + // 2. If value is a string, then set value to the result of converting + // value into a scalar value string. + if (typeof value === 'string') ; + else { + // 3. Otherwise: + // 1. If value is not a File object, then set value to a new File object, + // representing the same bytes, whose name attribute value is "blob" + if (!$f0b7b93d9d4dd4c6$require$isFileLike(value)) value = value instanceof Blob ? new $f0b7b93d9d4dd4c6$var$File([ + value + ], 'blob', { + type: value.type + }) : new $f0b7b93d9d4dd4c6$require$FileLike(value, 'blob', { + type: value.type + }); + // 2. If filename is given, then set value to a new File object, + // representing the same bytes, whose name attribute is filename. + if (filename !== undefined) { + /** @type {FilePropertyBag} */ const options = { + type: value.type, + lastModified: value.lastModified + }; + value = value instanceof $f0b7b93d9d4dd4c6$require$NativeFile ? new $f0b7b93d9d4dd4c6$var$File([ + value + ], filename, options) : new $f0b7b93d9d4dd4c6$require$FileLike(value, filename, options); + } + } + // 4. Return an entry whose name is name and whose value is value. + return { + name: name, + value: value }; - // 14. Return (body, type). - return [ - body, - type - ]; } +module.exports = { + FormData: $f0b7b93d9d4dd4c6$var$FormData, + makeEntry: $f0b7b93d9d4dd4c6$var$makeEntry +}; -// https://fetch.spec.whatwg.org/#bodyinit-safely-extract -function $34428a370af74707$var$safelyExtractBody(object, keepalive = false) { - if (!$34428a370af74707$var$ReadableStream) // istanbul ignore next - $34428a370af74707$var$ReadableStream = $g40fK$streamweb.ReadableStream; - // To safely extract a body and a `Content-Type` value from - // a byte sequence or BodyInit object object, run these steps: - // 1. If object is a ReadableStream object, then: - if (object instanceof $34428a370af74707$var$ReadableStream) { - // Assert: object is neither disturbed nor locked. - // istanbul ignore next - $g40fK$assert(!$gv2nV.isDisturbed(object), "The body has already been consumed."); - // istanbul ignore next - $g40fK$assert(!object.locked, "The stream is locked."); +}); +parcelRegister("faXHi", function(module, exports) { +'use strict'; +module.exports = { + kUrl: Symbol('url'), + kHeaders: Symbol('headers'), + kSignal: Symbol('signal'), + kState: Symbol('state'), + kDispatcher: Symbol('dispatcher') +}; + +}); + +parcelRegister("6AjPF", function(module, exports) { +'use strict'; + +var $4cb57d2b4a58b85c$require$Blob = $in2sP$nodebuffer.Blob; +var $4cb57d2b4a58b85c$require$File = $in2sP$nodebuffer.File; + +var $faXHi = parcelRequire("faXHi"); +var $4cb57d2b4a58b85c$require$kState = $faXHi.kState; + +var $5HTG7 = parcelRequire("5HTG7"); +var $4cb57d2b4a58b85c$require$webidl = $5HTG7.webidl; +// TODO(@KhafraDev): remove +class $4cb57d2b4a58b85c$var$FileLike { + constructor(blobLike, fileName, options = {}){ + // TODO: argument idl type check + // The File constructor is invoked with two or three parameters, depending + // on whether the optional dictionary parameter is used. When the File() + // constructor is invoked, user agents must run the following steps: + // 1. Let bytes be the result of processing blob parts given fileBits and + // options. + // 2. Let n be the fileName argument to the constructor. + const n = fileName; + // 3. Process FilePropertyBag dictionary argument by running the following + // substeps: + // 1. If the type member is provided and is not the empty string, let t + // be set to the type dictionary member. If t contains any characters + // outside the range U+0020 to U+007E, then set t to the empty string + // and return from these substeps. + // TODO + const t = options.type; + // 2. Convert every character in t to ASCII lowercase. + // TODO + // 3. If the lastModified member is provided, let d be set to the + // lastModified dictionary member. If it is not provided, set d to the + // current date and time represented as the number of milliseconds since + // the Unix Epoch (which is the equivalent of Date.now() [ECMA-262]). + const d = options.lastModified ?? Date.now(); + // 4. Return a new File object F such that: + // F refers to the bytes byte sequence. + // F.size is set to the number of total bytes in bytes. + // F.name is set to n. + // F.type is set to t. + // F.lastModified is set to d. + this[$4cb57d2b4a58b85c$require$kState] = { + blobLike: blobLike, + name: n, + type: t, + lastModified: d + }; + } + stream(...args) { + $4cb57d2b4a58b85c$require$webidl.brandCheck(this, $4cb57d2b4a58b85c$var$FileLike); + return this[$4cb57d2b4a58b85c$require$kState].blobLike.stream(...args); + } + arrayBuffer(...args) { + $4cb57d2b4a58b85c$require$webidl.brandCheck(this, $4cb57d2b4a58b85c$var$FileLike); + return this[$4cb57d2b4a58b85c$require$kState].blobLike.arrayBuffer(...args); + } + slice(...args) { + $4cb57d2b4a58b85c$require$webidl.brandCheck(this, $4cb57d2b4a58b85c$var$FileLike); + return this[$4cb57d2b4a58b85c$require$kState].blobLike.slice(...args); + } + text(...args) { + $4cb57d2b4a58b85c$require$webidl.brandCheck(this, $4cb57d2b4a58b85c$var$FileLike); + return this[$4cb57d2b4a58b85c$require$kState].blobLike.text(...args); + } + get size() { + $4cb57d2b4a58b85c$require$webidl.brandCheck(this, $4cb57d2b4a58b85c$var$FileLike); + return this[$4cb57d2b4a58b85c$require$kState].blobLike.size; + } + get type() { + $4cb57d2b4a58b85c$require$webidl.brandCheck(this, $4cb57d2b4a58b85c$var$FileLike); + return this[$4cb57d2b4a58b85c$require$kState].blobLike.type; + } + get name() { + $4cb57d2b4a58b85c$require$webidl.brandCheck(this, $4cb57d2b4a58b85c$var$FileLike); + return this[$4cb57d2b4a58b85c$require$kState].name; + } + get lastModified() { + $4cb57d2b4a58b85c$require$webidl.brandCheck(this, $4cb57d2b4a58b85c$var$FileLike); + return this[$4cb57d2b4a58b85c$require$kState].lastModified; + } + get [Symbol.toStringTag]() { + return 'File'; } - // 2. Return the results of extracting object. - return $34428a370af74707$var$extractBody(object, keepalive); } -function $34428a370af74707$var$cloneBody(body) { - // To clone a body body, run these steps: - // https://fetch.spec.whatwg.org/#concept-body-clone - // 1. Let « out1, out2 » be the result of teeing body’s stream. - const [out1, out2] = body.stream.tee(); - const out2Clone = $34428a370af74707$require$structuredClone(out2, { - transfer: [ - out2 - ] - }); - // This, for whatever reasons, unrefs out2Clone which allows - // the process to exit by itself. - const [, finalClone] = out2Clone.tee(); - // 2. Set body’s stream to out1. - body.stream = out1; - // 3. Return a body whose stream is out2 and other members are copied from body. - return { - stream: finalClone, - length: body.length, - source: body.source - }; +$4cb57d2b4a58b85c$require$webidl.converters.Blob = $4cb57d2b4a58b85c$require$webidl.interfaceConverter($4cb57d2b4a58b85c$require$Blob); +// If this function is moved to ./util.js, some tools (such as +// rollup) will warn about circular dependencies. See: +// https://github.com/nodejs/undici/issues/1629 +function $4cb57d2b4a58b85c$var$isFileLike(object) { + return object instanceof $4cb57d2b4a58b85c$require$File || object && (typeof object.stream === 'function' || typeof object.arrayBuffer === 'function') && object[Symbol.toStringTag] === 'File'; } -async function* $34428a370af74707$var$consumeBody(body) { - if (body) { - if ($34428a370af74707$require$isUint8Array(body)) yield body; - else { - const stream = body.stream; - if ($gv2nV.isDisturbed(stream)) throw new TypeError("The body has already been consumed."); - if (stream.locked) throw new TypeError("The stream is locked."); - // Compat. - stream[$34428a370af74707$require$kBodyUsed] = true; - yield* stream; - } +module.exports = { + FileLike: $4cb57d2b4a58b85c$var$FileLike, + isFileLike: $4cb57d2b4a58b85c$var$isFileLike +}; + +}); + + +parcelRegister("lUSEQ", function(module, exports) { +'use strict'; + +var $bFRvW = parcelRequire("bFRvW"); +var $ff4939d5e0cb3cab$require$isUSVString = $bFRvW.isUSVString; +var $ff4939d5e0cb3cab$require$bufferToLowerCasedHeaderName = $bFRvW.bufferToLowerCasedHeaderName; + +var $7z0I9 = parcelRequire("7z0I9"); +var $ff4939d5e0cb3cab$require$utf8DecodeBytes = $7z0I9.utf8DecodeBytes; + +var $30IsM = parcelRequire("30IsM"); +var $ff4939d5e0cb3cab$require$HTTP_TOKEN_CODEPOINTS = $30IsM.HTTP_TOKEN_CODEPOINTS; +var $ff4939d5e0cb3cab$require$isomorphicDecode = $30IsM.isomorphicDecode; + +var $6AjPF = parcelRequire("6AjPF"); +var $ff4939d5e0cb3cab$require$isFileLike = $6AjPF.isFileLike; + +var $kFkJR = parcelRequire("kFkJR"); +var $ff4939d5e0cb3cab$require$makeEntry = $kFkJR.makeEntry; + + +var $ff4939d5e0cb3cab$require$NodeFile = $in2sP$nodebuffer.File; +const $ff4939d5e0cb3cab$var$File = globalThis.File ?? $ff4939d5e0cb3cab$require$NodeFile; +const $ff4939d5e0cb3cab$var$formDataNameBuffer = Buffer.from('form-data; name="'); +const $ff4939d5e0cb3cab$var$filenameBuffer = Buffer.from('; filename'); +const $ff4939d5e0cb3cab$var$dd = Buffer.from('--'); +const $ff4939d5e0cb3cab$var$ddcrlf = Buffer.from('--\r\n'); +/** + * @param {string} chars + */ function $ff4939d5e0cb3cab$var$isAsciiString(chars) { + for(let i = 0; i < chars.length; ++i){ + if ((chars.charCodeAt(i) & -128) !== 0) return false; } + return true; } -function $34428a370af74707$var$throwIfAborted(state) { - if (state.aborted) throw new $34428a370af74707$require$DOMException("The operation was aborted.", "AbortError"); +/** + * @see https://andreubotella.github.io/multipart-form-data/#multipart-form-data-boundary + * @param {string} boundary + */ function $ff4939d5e0cb3cab$var$validateBoundary(boundary) { + const length = boundary.length; + // - its length is greater or equal to 27 and lesser or equal to 70, and + if (length < 27 || length > 70) return false; + // - it is composed by bytes in the ranges 0x30 to 0x39, 0x41 to 0x5A, or + // 0x61 to 0x7A, inclusive (ASCII alphanumeric), or which are 0x27 ('), + // 0x2D (-) or 0x5F (_). + for(let i = 0; i < length; ++i){ + const cp = boundary.charCodeAt(i); + if (!(cp >= 0x30 && cp <= 0x39 || cp >= 0x41 && cp <= 0x5a || cp >= 0x61 && cp <= 0x7a || cp === 0x27 || cp === 0x2d || cp === 0x5f)) return false; + } + return true; } -function $34428a370af74707$var$bodyMixinMethods(instance) { - const methods = { - blob () { - // The blob() method steps are to return the result of - // running consume body with this and the following step - // given a byte sequence bytes: return a Blob whose - // contents are bytes and whose type attribute is this’s - // MIME type. - return $34428a370af74707$var$specConsumeBody(this, (bytes)=>{ - let mimeType = $34428a370af74707$var$bodyMimeType(this); - if (mimeType === "failure") mimeType = ""; - else if (mimeType) mimeType = $34428a370af74707$require$serializeAMimeType(mimeType); - // Return a Blob whose contents are bytes and type attribute - // is mimeType. - return new $34428a370af74707$require$Blob([ - bytes - ], { - type: mimeType - }); - }, instance); - }, - arrayBuffer () { - // The arrayBuffer() method steps are to return the result - // of running consume body with this and the following step - // given a byte sequence bytes: return a new ArrayBuffer - // whose contents are bytes. - return $34428a370af74707$var$specConsumeBody(this, (bytes)=>{ - return new Uint8Array(bytes).buffer; - }, instance); - }, - text () { - // The text() method steps are to return the result of running - // consume body with this and UTF-8 decode. - return $34428a370af74707$var$specConsumeBody(this, $34428a370af74707$var$utf8DecodeBytes, instance); - }, - json () { - // The json() method steps are to return the result of running - // consume body with this and parse JSON from bytes. - return $34428a370af74707$var$specConsumeBody(this, $34428a370af74707$var$parseJSONFromBytes, instance); - }, - async formData () { - $34428a370af74707$require$webidl.brandCheck(this, instance); - $34428a370af74707$var$throwIfAborted(this[$34428a370af74707$require$kState]); - const contentType = this.headers.get("Content-Type"); - // If mimeType’s essence is "multipart/form-data", then: - if (/multipart\/form-data/.test(contentType)) { - const headers = {}; - for (const [key, value] of this.headers)headers[key.toLowerCase()] = value; - const responseFormData = new $34428a370af74707$require$FormData(); - let busboy; - try { - busboy = new $6VInI({ - headers: headers, - preservePath: true - }); - } catch (err) { - throw new $34428a370af74707$require$DOMException(`${err}`, "AbortError"); - } - busboy.on("field", (name, value)=>{ - responseFormData.append(name, value); - }); - busboy.on("file", (name, value, filename, encoding, mimeType)=>{ - const chunks = []; - if (encoding === "base64" || encoding.toLowerCase() === "base64") { - let base64chunk = ""; - value.on("data", (chunk)=>{ - base64chunk += chunk.toString().replace(/[\r\n]/gm, ""); - const end = base64chunk.length - base64chunk.length % 4; - chunks.push(Buffer.from(base64chunk.slice(0, end), "base64")); - base64chunk = base64chunk.slice(end); - }); - value.on("end", ()=>{ - chunks.push(Buffer.from(base64chunk, "base64")); - responseFormData.append(name, new $34428a370af74707$var$File(chunks, filename, { - type: mimeType - })); - }); - } else { - value.on("data", (chunk)=>{ - chunks.push(chunk); - }); - value.on("end", ()=>{ - responseFormData.append(name, new $34428a370af74707$var$File(chunks, filename, { - type: mimeType - })); - }); - } - }); - const busboyResolve = new Promise((resolve, reject)=>{ - busboy.on("finish", resolve); - busboy.on("error", (err)=>reject(new TypeError(err))); - }); - if (this.body !== null) for await (const chunk of $34428a370af74707$var$consumeBody(this[$34428a370af74707$require$kState].body))busboy.write(chunk); - busboy.end(); - await busboyResolve; - return responseFormData; - } else if (/application\/x-www-form-urlencoded/.test(contentType)) { - // Otherwise, if mimeType’s essence is "application/x-www-form-urlencoded", then: - // 1. Let entries be the result of parsing bytes. - let entries; - try { - let text = ""; - // application/x-www-form-urlencoded parser will keep the BOM. - // https://url.spec.whatwg.org/#concept-urlencoded-parser - // Note that streaming decoder is stateful and cannot be reused - const streamingDecoder = new TextDecoder("utf-8", { - ignoreBOM: true - }); - for await (const chunk of $34428a370af74707$var$consumeBody(this[$34428a370af74707$require$kState].body)){ - if (!$34428a370af74707$require$isUint8Array(chunk)) throw new TypeError("Expected Uint8Array chunk"); - text += streamingDecoder.decode(chunk, { - stream: true - }); - } - text += streamingDecoder.decode(); - entries = new URLSearchParams(text); - } catch (err) { - // istanbul ignore next: Unclear when new URLSearchParams can fail on a string. - // 2. If entries is failure, then throw a TypeError. - throw Object.assign(new TypeError(), { - cause: err - }); - } - // 3. Return a new FormData object whose entries are entries. - const formData = new $34428a370af74707$require$FormData(); - for (const [name, value] of entries)formData.append(name, value); - return formData; - } else { - // Wait a tick before checking if the request has been aborted. - // Otherwise, a TypeError can be thrown when an AbortError should. - await Promise.resolve(); - $34428a370af74707$var$throwIfAborted(this[$34428a370af74707$require$kState]); - // Otherwise, throw a TypeError. - throw $34428a370af74707$require$webidl.errors.exception({ - header: `${instance.name}.formData`, - message: "Could not parse content as FormData." - }); - } - } +/** + * @see https://andreubotella.github.io/multipart-form-data/#multipart-form-data-parser + * @param {Buffer} input + * @param {ReturnType} mimeType + */ function $ff4939d5e0cb3cab$var$multipartFormDataParser(input, mimeType) { + // 1. Assert: mimeType’s essence is "multipart/form-data". + $in2sP$nodeassert(mimeType !== 'failure' && mimeType.essence === 'multipart/form-data'); + const boundaryString = mimeType.parameters.get('boundary'); + // 2. If mimeType’s parameters["boundary"] does not exist, return failure. + // Otherwise, let boundary be the result of UTF-8 decoding mimeType’s + // parameters["boundary"]. + if (boundaryString === undefined) return 'failure'; + const boundary = Buffer.from(`--${boundaryString}`, 'utf8'); + // 3. Let entry list be an empty entry list. + const entryList = []; + // 4. Let position be a pointer to a byte in input, initially pointing at + // the first byte. + const position = { + position: 0 }; - return methods; -} -function $34428a370af74707$var$mixinBody(prototype) { - Object.assign(prototype.prototype, $34428a370af74707$var$bodyMixinMethods(prototype)); + // Note: undici addition, allows leading and trailing CRLFs. + while(input[position.position] === 0x0d && input[position.position + 1] === 0x0a)position.position += 2; + let trailing = input.length; + while(input[trailing - 1] === 0x0a && input[trailing - 2] === 0x0d)trailing -= 2; + if (trailing !== input.length) input = input.subarray(0, trailing); + // 5. While true: + while(true){ + // 5.1. If position points to a sequence of bytes starting with 0x2D 0x2D + // (`--`) followed by boundary, advance position by 2 + the length of + // boundary. Otherwise, return failure. + // Note: boundary is padded with 2 dashes already, no need to add 2. + if (input.subarray(position.position, position.position + boundary.length).equals(boundary)) position.position += boundary.length; + else return 'failure'; + // 5.2. If position points to the sequence of bytes 0x2D 0x2D 0x0D 0x0A + // (`--` followed by CR LF) followed by the end of input, return entry list. + // Note: a body does NOT need to end with CRLF. It can end with --. + if (position.position === input.length - 2 && $ff4939d5e0cb3cab$var$bufferStartsWith(input, $ff4939d5e0cb3cab$var$dd, position) || position.position === input.length - 4 && $ff4939d5e0cb3cab$var$bufferStartsWith(input, $ff4939d5e0cb3cab$var$ddcrlf, position)) return entryList; + // 5.3. If position does not point to a sequence of bytes starting with 0x0D + // 0x0A (CR LF), return failure. + if (input[position.position] !== 0x0d || input[position.position + 1] !== 0x0a) return 'failure'; + // 5.4. Advance position by 2. (This skips past the newline.) + position.position += 2; + // 5.5. Let name, filename and contentType be the result of parsing + // multipart/form-data headers on input and position, if the result + // is not failure. Otherwise, return failure. + const result = $ff4939d5e0cb3cab$var$parseMultipartFormDataHeaders(input, position); + if (result === 'failure') return 'failure'; + let { name: name, filename: filename, contentType: contentType, encoding: encoding } = result; + // 5.6. Advance position by 2. (This skips past the empty line that marks + // the end of the headers.) + position.position += 2; + // 5.7. Let body be the empty byte sequence. + let body; + // 5.8. Body loop: While position is not past the end of input: + // TODO: the steps here are completely wrong + { + const boundaryIndex = input.indexOf(boundary.subarray(2), position.position); + if (boundaryIndex === -1) return 'failure'; + body = input.subarray(position.position, boundaryIndex - 4); + position.position += body.length; + // Note: position must be advanced by the body's length before being + // decoded, otherwise the parsing will fail. + if (encoding === 'base64') body = Buffer.from(body.toString(), 'base64'); + } + // 5.9. If position does not point to a sequence of bytes starting with + // 0x0D 0x0A (CR LF), return failure. Otherwise, advance position by 2. + if (input[position.position] !== 0x0d || input[position.position + 1] !== 0x0a) return 'failure'; + else position.position += 2; + // 5.10. If filename is not null: + let value; + if (filename !== null) { + // 5.10.1. If contentType is null, set contentType to "text/plain". + contentType ??= 'text/plain'; + // 5.10.2. If contentType is not an ASCII string, set contentType to the empty string. + // Note: `buffer.isAscii` can be used at zero-cost, but converting a string to a buffer is a high overhead. + // Content-Type is a relatively small string, so it is faster to use `String#charCodeAt`. + if (!$ff4939d5e0cb3cab$var$isAsciiString(contentType)) contentType = ''; + // 5.10.3. Let value be a new File object with name filename, type contentType, and body body. + value = new $ff4939d5e0cb3cab$var$File([ + body + ], filename, { + type: contentType + }); + } else // 5.11. Otherwise: + // 5.11.1. Let value be the UTF-8 decoding without BOM of body. + value = $ff4939d5e0cb3cab$require$utf8DecodeBytes(Buffer.from(body)); + // 5.12. Assert: name is a scalar value string and value is either a scalar value string or a File object. + $in2sP$nodeassert($ff4939d5e0cb3cab$require$isUSVString(name)); + $in2sP$nodeassert(typeof value === 'string' && $ff4939d5e0cb3cab$require$isUSVString(value) || $ff4939d5e0cb3cab$require$isFileLike(value)); + // 5.13. Create an entry with name and value, and append it to entry list. + entryList.push($ff4939d5e0cb3cab$require$makeEntry(name, value, filename)); + } } /** - * @see https://fetch.spec.whatwg.org/#concept-body-consume-body - * @param {Response|Request} object - * @param {(value: unknown) => unknown} convertBytesToJSValue - * @param {Response|Request} instance - */ async function $34428a370af74707$var$specConsumeBody(object, convertBytesToJSValue, instance) { - $34428a370af74707$require$webidl.brandCheck(object, instance); - $34428a370af74707$var$throwIfAborted(object[$34428a370af74707$require$kState]); - // 1. If object is unusable, then return a promise rejected - // with a TypeError. - if ($34428a370af74707$var$bodyUnusable(object[$34428a370af74707$require$kState].body)) throw new TypeError("Body is unusable"); - // 2. Let promise be a new promise. - const promise = $34428a370af74707$require$createDeferredPromise(); - // 3. Let errorSteps given error be to reject promise with error. - const errorSteps = (error)=>promise.reject(error); - // 4. Let successSteps given a byte sequence data be to resolve - // promise with the result of running convertBytesToJSValue - // with data. If that threw an exception, then run errorSteps - // with that exception. - const successSteps = (data)=>{ - try { - promise.resolve(convertBytesToJSValue(data)); - } catch (e) { - errorSteps(e); + * @see https://andreubotella.github.io/multipart-form-data/#parse-multipart-form-data-headers + * @param {Buffer} input + * @param {{ position: number }} position + */ function $ff4939d5e0cb3cab$var$parseMultipartFormDataHeaders(input, position) { + // 1. Let name, filename and contentType be null. + let name = null; + let filename = null; + let contentType = null; + let encoding = null; + // 2. While true: + while(true){ + // 2.1. If position points to a sequence of bytes starting with 0x0D 0x0A (CR LF): + if (input[position.position] === 0x0d && input[position.position + 1] === 0x0a) { + // 2.1.1. If name is null, return failure. + if (name === null) return 'failure'; + // 2.1.2. Return name, filename and contentType. + return { + name: name, + filename: filename, + contentType: contentType, + encoding: encoding + }; } - }; - // 5. If object’s body is null, then run successSteps with an - // empty byte sequence. - if (object[$34428a370af74707$require$kState].body == null) { - successSteps(new Uint8Array()); - return promise.promise; + // 2.2. Let header name be the result of collecting a sequence of bytes that are + // not 0x0A (LF), 0x0D (CR) or 0x3A (:), given position. + let headerName = $ff4939d5e0cb3cab$var$collectASequenceOfBytes((char)=>char !== 0x0a && char !== 0x0d && char !== 0x3a, input, position); + // 2.3. Remove any HTTP tab or space bytes from the start or end of header name. + headerName = $ff4939d5e0cb3cab$var$removeChars(headerName, true, true, (char)=>char === 0x9 || char === 0x20); + // 2.4. If header name does not match the field-name token production, return failure. + if (!$ff4939d5e0cb3cab$require$HTTP_TOKEN_CODEPOINTS.test(headerName.toString())) return 'failure'; + // 2.5. If the byte at position is not 0x3A (:), return failure. + if (input[position.position] !== 0x3a) return 'failure'; + // 2.6. Advance position by 1. + position.position++; + // 2.7. Collect a sequence of bytes that are HTTP tab or space bytes given position. + // (Do nothing with those bytes.) + $ff4939d5e0cb3cab$var$collectASequenceOfBytes((char)=>char === 0x20 || char === 0x09, input, position); + // 2.8. Byte-lowercase header name and switch on the result: + switch($ff4939d5e0cb3cab$require$bufferToLowerCasedHeaderName(headerName)){ + case 'content-disposition': + // 1. Set name and filename to null. + name = filename = null; + // 2. If position does not point to a sequence of bytes starting with + // `form-data; name="`, return failure. + if (!$ff4939d5e0cb3cab$var$bufferStartsWith(input, $ff4939d5e0cb3cab$var$formDataNameBuffer, position)) return 'failure'; + // 3. Advance position so it points at the byte after the next 0x22 (") + // byte (the one in the sequence of bytes matched above). + position.position += 17; + // 4. Set name to the result of parsing a multipart/form-data name given + // input and position, if the result is not failure. Otherwise, return + // failure. + name = $ff4939d5e0cb3cab$var$parseMultipartFormDataName(input, position); + if (name === null) return 'failure'; + // 5. If position points to a sequence of bytes starting with `; filename="`: + if ($ff4939d5e0cb3cab$var$bufferStartsWith(input, $ff4939d5e0cb3cab$var$filenameBuffer, position)) { + // Note: undici also handles filename* + let check = position.position + $ff4939d5e0cb3cab$var$filenameBuffer.length; + if (input[check] === 0x2a) { + position.position += 1; + check += 1; + } + if (input[check] !== 0x3d || input[check + 1] !== 0x22) return 'failure'; + // 1. Advance position so it points at the byte after the next 0x22 (") byte + // (the one in the sequence of bytes matched above). + position.position += 12; + // 2. Set filename to the result of parsing a multipart/form-data name given + // input and position, if the result is not failure. Otherwise, return failure. + filename = $ff4939d5e0cb3cab$var$parseMultipartFormDataName(input, position); + if (filename === null) return 'failure'; + } + break; + case 'content-type': + { + // 1. Let header value be the result of collecting a sequence of bytes that are + // not 0x0A (LF) or 0x0D (CR), given position. + let headerValue = $ff4939d5e0cb3cab$var$collectASequenceOfBytes((char)=>char !== 0x0a && char !== 0x0d, input, position); + // 2. Remove any HTTP tab or space bytes from the end of header value. + headerValue = $ff4939d5e0cb3cab$var$removeChars(headerValue, false, true, (char)=>char === 0x9 || char === 0x20); + // 3. Set contentType to the isomorphic decoding of header value. + contentType = $ff4939d5e0cb3cab$require$isomorphicDecode(headerValue); + break; + } + case 'content-transfer-encoding': + { + let headerValue = $ff4939d5e0cb3cab$var$collectASequenceOfBytes((char)=>char !== 0x0a && char !== 0x0d, input, position); + headerValue = $ff4939d5e0cb3cab$var$removeChars(headerValue, false, true, (char)=>char === 0x9 || char === 0x20); + encoding = $ff4939d5e0cb3cab$require$isomorphicDecode(headerValue); + break; + } + default: + // Collect a sequence of bytes that are not 0x0A (LF) or 0x0D (CR), given position. + // (Do nothing with those bytes.) + $ff4939d5e0cb3cab$var$collectASequenceOfBytes((char)=>char !== 0x0a && char !== 0x0d, input, position); + } + // 2.9. If position does not point to a sequence of bytes starting with 0x0D 0x0A + // (CR LF), return failure. Otherwise, advance position by 2 (past the newline). + if (input[position.position] !== 0x0d && input[position.position + 1] !== 0x0a) return 'failure'; + else position.position += 2; } - // 6. Otherwise, fully read object’s body given successSteps, - // errorSteps, and object’s relevant global object. - await $34428a370af74707$require$fullyReadBody(object[$34428a370af74707$require$kState].body, successSteps, errorSteps); - // 7. Return promise. - return promise.promise; } -// https://fetch.spec.whatwg.org/#body-unusable -function $34428a370af74707$var$bodyUnusable(body) { - // An object including the Body interface mixin is - // said to be unusable if its body is non-null and - // its body’s stream is disturbed or locked. - return body != null && (body.stream.locked || $gv2nV.isDisturbed(body.stream)); +/** + * @see https://andreubotella.github.io/multipart-form-data/#parse-a-multipart-form-data-name + * @param {Buffer} input + * @param {{ position: number }} position + */ function $ff4939d5e0cb3cab$var$parseMultipartFormDataName(input, position) { + // 1. Assert: The byte at (position - 1) is 0x22 ("). + $in2sP$nodeassert(input[position.position - 1] === 0x22); + // 2. Let name be the result of collecting a sequence of bytes that are not 0x0A (LF), 0x0D (CR) or 0x22 ("), given position. + /** @type {string | Buffer} */ let name = $ff4939d5e0cb3cab$var$collectASequenceOfBytes((char)=>char !== 0x0a && char !== 0x0d && char !== 0x22, input, position); + // 3. If the byte at position is not 0x22 ("), return failure. Otherwise, advance position by 1. + if (input[position.position] !== 0x22) return null // name could be 'failure' + ; + else position.position++; + // 4. Replace any occurrence of the following subsequences in name with the given byte: + // - `%0A`: 0x0A (LF) + // - `%0D`: 0x0D (CR) + // - `%22`: 0x22 (") + name = new TextDecoder().decode(name).replace(/%0A/ig, '\n').replace(/%0D/ig, '\r').replace(/%22/g, '"'); + // 5. Return the UTF-8 decoding without BOM of name. + return name; } /** - * @see https://encoding.spec.whatwg.org/#utf-8-decode - * @param {Buffer} buffer - */ function $34428a370af74707$var$utf8DecodeBytes(buffer) { - if (buffer.length === 0) return ""; - // 1. Let buffer be the result of peeking three bytes from - // ioQueue, converted to a byte sequence. - // 2. If buffer is 0xEF 0xBB 0xBF, then read three - // bytes from ioQueue. (Do nothing with those bytes.) - if (buffer[0] === 0xEF && buffer[1] === 0xBB && buffer[2] === 0xBF) buffer = buffer.subarray(3); - // 3. Process a queue with an instance of UTF-8’s - // decoder, ioQueue, output, and "replacement". - const output = $34428a370af74707$var$textDecoder.decode(buffer); - // 4. Return output. - return output; + * @param {(char: number) => boolean} condition + * @param {Buffer} input + * @param {{ position: number }} position + */ function $ff4939d5e0cb3cab$var$collectASequenceOfBytes(condition, input, position) { + let start = position.position; + while(start < input.length && condition(input[start]))++start; + return input.subarray(position.position, position.position = start); } /** - * @see https://infra.spec.whatwg.org/#parse-json-bytes-to-a-javascript-value - * @param {Uint8Array} bytes - */ function $34428a370af74707$var$parseJSONFromBytes(bytes) { - return JSON.parse($34428a370af74707$var$utf8DecodeBytes(bytes)); + * @param {Buffer} buf + * @param {boolean} leading + * @param {boolean} trailing + * @param {(charCode: number) => boolean} predicate + * @returns {Buffer} + */ function $ff4939d5e0cb3cab$var$removeChars(buf, leading, trailing, predicate) { + let lead = 0; + let trail = buf.length - 1; + if (leading) while(lead < buf.length && predicate(buf[lead]))lead++; + if (trailing) while(trail > 0 && predicate(buf[trail]))trail--; + return lead === 0 && trail === buf.length - 1 ? buf : buf.subarray(lead, trail + 1); } /** - * @see https://fetch.spec.whatwg.org/#concept-body-mime-type - * @param {import('./response').Response|import('./request').Request} object - */ function $34428a370af74707$var$bodyMimeType(object) { - const { headersList: headersList } = object[$34428a370af74707$require$kState]; - const contentType = headersList.get("content-type"); - if (contentType === null) return "failure"; - return $34428a370af74707$require$parseMIMEType(contentType); + * Checks if {@param buffer} starts with {@param start} + * @param {Buffer} buffer + * @param {Buffer} start + * @param {{ position: number }} position + */ function $ff4939d5e0cb3cab$var$bufferStartsWith(buffer, start, position) { + if (buffer.length < start.length) return false; + for(let i = 0; i < start.length; i++){ + if (start[i] !== buffer[position.position + i]) return false; + } + return true; } module.exports = { - extractBody: $34428a370af74707$var$extractBody, - safelyExtractBody: $34428a370af74707$var$safelyExtractBody, - cloneBody: $34428a370af74707$var$cloneBody, - mixinBody: $34428a370af74707$var$mixinBody + multipartFormDataParser: $ff4939d5e0cb3cab$var$multipartFormDataParser, + validateBoundary: $ff4939d5e0cb3cab$var$validateBoundary }; }); -parcelRegister("6VInI", function(module, exports) { -"use strict"; -var $50ba7e34ccf12724$require$WritableStream = $g40fK$nodestream.Writable; -var $50ba7e34ccf12724$require$inherits = $g40fK$nodeutil.inherits; +parcelRegister("lfqfn", function(module, exports) { +'use strict'; -var $2w5qD = parcelRequire("2w5qD"); -var $idVae = parcelRequire("idVae"); +var $fYiW2 = parcelRequire("fYiW2"); +var $f77f5bc7cbfa99fe$require$Readable = $fYiW2.Readable; -var $ihoIc = parcelRequire("ihoIc"); +var $gTXXK = parcelRequire("gTXXK"); +var $f77f5bc7cbfa99fe$require$InvalidArgumentError = $gTXXK.InvalidArgumentError; +var $f77f5bc7cbfa99fe$require$RequestAbortedError = $gTXXK.RequestAbortedError; -var $jchbH = parcelRequire("jchbH"); -function $50ba7e34ccf12724$var$Busboy(opts) { - if (!(this instanceof $50ba7e34ccf12724$var$Busboy)) return new $50ba7e34ccf12724$var$Busboy(opts); - if (typeof opts !== "object") throw new TypeError("Busboy expected an options-Object."); - if (typeof opts.headers !== "object") throw new TypeError("Busboy expected an options-Object with headers-attribute."); - if (typeof opts.headers["content-type"] !== "string") throw new TypeError("Missing Content-Type-header."); - const { headers: headers, ...streamOptions } = opts; - this.opts = { - autoDestroy: false, - ...streamOptions - }; - $50ba7e34ccf12724$require$WritableStream.call(this, this.opts); - this._done = false; - this._parser = this.getParserByHeaders(headers); - this._finished = false; -} -$50ba7e34ccf12724$require$inherits($50ba7e34ccf12724$var$Busboy, $50ba7e34ccf12724$require$WritableStream); -$50ba7e34ccf12724$var$Busboy.prototype.emit = function(ev) { - if (ev === "finish") { - if (!this._done) { - this._parser?.end(); - return; - } else if (this._finished) return; - this._finished = true; - } - $50ba7e34ccf12724$require$WritableStream.prototype.emit.apply(this, arguments); -}; -$50ba7e34ccf12724$var$Busboy.prototype.getParserByHeaders = function(headers) { - const parsed = $jchbH(headers["content-type"]); - const cfg = { - defCharset: this.opts.defCharset, - fileHwm: this.opts.fileHwm, - headers: headers, - highWaterMark: this.opts.highWaterMark, - isPartAFile: this.opts.isPartAFile, - limits: this.opts.limits, - parsedConType: parsed, - preservePath: this.opts.preservePath - }; - if ($idVae.detect.test(parsed[0])) return new $idVae(this, cfg); - if ($ihoIc.detect.test(parsed[0])) return new $ihoIc(this, cfg); - throw new Error("Unsupported Content-Type."); -}; -$50ba7e34ccf12724$var$Busboy.prototype._write = function(chunk, encoding, cb) { - this._parser.write(chunk, cb); -}; -module.exports = $50ba7e34ccf12724$var$Busboy; -module.exports.default = $50ba7e34ccf12724$var$Busboy; -module.exports.Busboy = $50ba7e34ccf12724$var$Busboy; -module.exports.Dicer = $2w5qD; +var $bFRvW = parcelRequire("bFRvW"); -}); -parcelRegister("2w5qD", function(module, exports) { -"use strict"; +var $6wK7x = parcelRequire("6wK7x"); +var $f77f5bc7cbfa99fe$require$getResolveErrorBodyCallback = $6wK7x.getResolveErrorBodyCallback; -var $1d52c7f29a3f7d54$require$WritableStream = $g40fK$nodestream.Writable; - -var $1d52c7f29a3f7d54$require$inherits = $g40fK$nodeutil.inherits; - -var $dfEGu = parcelRequire("dfEGu"); - -var $8luYO = parcelRequire("8luYO"); - -var $3kzoB = parcelRequire("3kzoB"); -const $1d52c7f29a3f7d54$var$DASH = 45; -const $1d52c7f29a3f7d54$var$B_ONEDASH = Buffer.from("-"); -const $1d52c7f29a3f7d54$var$B_CRLF = Buffer.from("\r\n"); -const $1d52c7f29a3f7d54$var$EMPTY_FN = function() {}; -function $1d52c7f29a3f7d54$var$Dicer(cfg) { - if (!(this instanceof $1d52c7f29a3f7d54$var$Dicer)) return new $1d52c7f29a3f7d54$var$Dicer(cfg); - $1d52c7f29a3f7d54$require$WritableStream.call(this, cfg); - if (!cfg || !cfg.headerFirst && typeof cfg.boundary !== "string") throw new TypeError("Boundary required"); - if (typeof cfg.boundary === "string") this.setBoundary(cfg.boundary); - else this._bparser = undefined; - this._headerFirst = cfg.headerFirst; - this._dashes = 0; - this._parts = 0; - this._finished = false; - this._realFinish = false; - this._isPreamble = true; - this._justMatched = false; - this._firstWrite = true; - this._inHeader = true; - this._part = undefined; - this._cb = undefined; - this._ignoreData = false; - this._partOpts = { - highWaterMark: cfg.partHwm - }; - this._pause = false; - const self = this; - this._hparser = new $3kzoB(cfg); - this._hparser.on("header", function(header) { - self._inHeader = false; - self._part.emit("header", header); - }); -} -$1d52c7f29a3f7d54$require$inherits($1d52c7f29a3f7d54$var$Dicer, $1d52c7f29a3f7d54$require$WritableStream); -$1d52c7f29a3f7d54$var$Dicer.prototype.emit = function(ev) { - if (ev === "finish" && !this._realFinish) { - if (!this._finished) { - const self = this; - process.nextTick(function() { - self.emit("error", new Error("Unexpected end of multipart data")); - if (self._part && !self._ignoreData) { - const type = self._isPreamble ? "Preamble" : "Part"; - self._part.emit("error", new Error(type + " terminated early due to unexpected end of multipart data")); - self._part.push(null); - process.nextTick(function() { - self._realFinish = true; - self.emit("finish"); - self._realFinish = false; - }); - return; +var $f77f5bc7cbfa99fe$require$AsyncResource = $in2sP$nodeasync_hooks.AsyncResource; +class $f77f5bc7cbfa99fe$var$RequestHandler extends $f77f5bc7cbfa99fe$require$AsyncResource { + constructor(opts, callback){ + if (!opts || typeof opts !== 'object') throw new $f77f5bc7cbfa99fe$require$InvalidArgumentError('invalid opts'); + const { signal: signal, method: method, opaque: opaque, body: body, onInfo: onInfo, responseHeaders: responseHeaders, throwOnError: throwOnError, highWaterMark: highWaterMark } = opts; + try { + if (typeof callback !== 'function') throw new $f77f5bc7cbfa99fe$require$InvalidArgumentError('invalid callback'); + if (highWaterMark && (typeof highWaterMark !== 'number' || highWaterMark < 0)) throw new $f77f5bc7cbfa99fe$require$InvalidArgumentError('invalid highWaterMark'); + if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') throw new $f77f5bc7cbfa99fe$require$InvalidArgumentError('signal must be an EventEmitter or EventTarget'); + if (method === 'CONNECT') throw new $f77f5bc7cbfa99fe$require$InvalidArgumentError('invalid method'); + if (onInfo && typeof onInfo !== 'function') throw new $f77f5bc7cbfa99fe$require$InvalidArgumentError('invalid onInfo callback'); + super('UNDICI_REQUEST'); + } catch (err) { + if ($bFRvW.isStream(body)) $bFRvW.destroy(body.on('error', $bFRvW.nop), err); + throw err; + } + this.method = method; + this.responseHeaders = responseHeaders || null; + this.opaque = opaque || null; + this.callback = callback; + this.res = null; + this.abort = null; + this.body = body; + this.trailers = {}; + this.context = null; + this.onInfo = onInfo || null; + this.throwOnError = throwOnError; + this.highWaterMark = highWaterMark; + this.signal = signal; + this.reason = null; + this.removeAbortListener = null; + if ($bFRvW.isStream(body)) body.on('error', (err)=>{ + this.onError(err); + }); + if (this.signal) { + if (this.signal.aborted) this.reason = this.signal.reason ?? new $f77f5bc7cbfa99fe$require$RequestAbortedError(); + else this.removeAbortListener = $bFRvW.addAbortListener(this.signal, ()=>{ + this.reason = this.signal.reason ?? new $f77f5bc7cbfa99fe$require$RequestAbortedError(); + if (this.res) $bFRvW.destroy(this.res.on('error', $bFRvW.nop), this.reason); + else if (this.abort) this.abort(this.reason); + if (this.removeAbortListener) { + this.res?.off('close', this.removeAbortListener); + this.removeAbortListener(); + this.removeAbortListener = null; } - self._realFinish = true; - self.emit("finish"); - self._realFinish = false; }); } - } else $1d52c7f29a3f7d54$require$WritableStream.prototype.emit.apply(this, arguments); -}; -$1d52c7f29a3f7d54$var$Dicer.prototype._write = function(data, encoding, cb) { - // ignore unexpected data (e.g. extra trailer data after finished) - if (!this._hparser && !this._bparser) return cb(); - if (this._headerFirst && this._isPreamble) { - if (!this._part) { - this._part = new $8luYO(this._partOpts); - if (this.listenerCount("preamble") !== 0) this.emit("preamble", this._part); - else this._ignore(); - } - const r = this._hparser.push(data); - if (!this._inHeader && r !== undefined && r < data.length) data = data.slice(r); - else return cb(); - } - // allows for "easier" testing - if (this._firstWrite) { - this._bparser.push($1d52c7f29a3f7d54$var$B_CRLF); - this._firstWrite = false; - } - this._bparser.push(data); - if (this._pause) this._cb = cb; - else cb(); -}; -$1d52c7f29a3f7d54$var$Dicer.prototype.reset = function() { - this._part = undefined; - this._bparser = undefined; - this._hparser = undefined; -}; -$1d52c7f29a3f7d54$var$Dicer.prototype.setBoundary = function(boundary) { - const self = this; - this._bparser = new $dfEGu("\r\n--" + boundary); - this._bparser.on("info", function(isMatch, data, start, end) { - self._oninfo(isMatch, data, start, end); + } + onConnect(abort, context) { + if (this.reason) { + abort(this.reason); + return; + } + $in2sP$nodeassert(this.callback); + this.abort = abort; + this.context = context; + } + onHeaders(statusCode, rawHeaders, resume, statusMessage) { + const { callback: callback, opaque: opaque, abort: abort, context: context, responseHeaders: responseHeaders, highWaterMark: highWaterMark } = this; + const headers = responseHeaders === 'raw' ? $bFRvW.parseRawHeaders(rawHeaders) : $bFRvW.parseHeaders(rawHeaders); + if (statusCode < 200) { + if (this.onInfo) this.onInfo({ + statusCode: statusCode, + headers: headers + }); + return; + } + const parsedHeaders = responseHeaders === 'raw' ? $bFRvW.parseHeaders(rawHeaders) : headers; + const contentType = parsedHeaders['content-type']; + const contentLength = parsedHeaders['content-length']; + const res = new $f77f5bc7cbfa99fe$require$Readable({ + resume: resume, + abort: abort, + contentType: contentType, + contentLength: this.method !== 'HEAD' && contentLength ? Number(contentLength) : null, + highWaterMark: highWaterMark + }); + if (this.removeAbortListener) res.on('close', this.removeAbortListener); + this.callback = null; + this.res = res; + if (callback !== null) { + if (this.throwOnError && statusCode >= 400) this.runInAsyncScope($f77f5bc7cbfa99fe$require$getResolveErrorBodyCallback, null, { + callback: callback, + body: res, + contentType: contentType, + statusCode: statusCode, + statusMessage: statusMessage, + headers: headers + }); + else this.runInAsyncScope(callback, null, null, { + statusCode: statusCode, + headers: headers, + trailers: this.trailers, + opaque: opaque, + body: res, + context: context + }); + } + } + onData(chunk) { + return this.res.push(chunk); + } + onComplete(trailers) { + $bFRvW.parseHeaders(trailers, this.trailers); + this.res.push(null); + } + onError(err) { + const { res: res, callback: callback, body: body, opaque: opaque } = this; + if (callback) { + // TODO: Does this need queueMicrotask? + this.callback = null; + queueMicrotask(()=>{ + this.runInAsyncScope(callback, null, err, { + opaque: opaque + }); + }); + } + if (res) { + this.res = null; + // Ensure all queued handlers are invoked before destroying res. + queueMicrotask(()=>{ + $bFRvW.destroy(res, err); + }); + } + if (body) { + this.body = null; + $bFRvW.destroy(body, err); + } + if (this.removeAbortListener) { + res?.off('close', this.removeAbortListener); + this.removeAbortListener(); + this.removeAbortListener = null; + } + } +} +function $f77f5bc7cbfa99fe$var$request(opts, callback) { + if (callback === undefined) return new Promise((resolve, reject)=>{ + $f77f5bc7cbfa99fe$var$request.call(this, opts, (err, data)=>{ + return err ? reject(err) : resolve(data); + }); }); -}; -$1d52c7f29a3f7d54$var$Dicer.prototype._ignore = function() { - if (this._part && !this._ignoreData) { - this._ignoreData = true; - this._part.on("error", $1d52c7f29a3f7d54$var$EMPTY_FN); - // we must perform some kind of read on the stream even though we are - // ignoring the data, otherwise node's Readable stream will not emit 'end' - // after pushing null to the stream - this._part.resume(); + try { + this.dispatch(opts, new $f77f5bc7cbfa99fe$var$RequestHandler(opts, callback)); + } catch (err) { + if (typeof callback !== 'function') throw err; + const opaque = opts?.opaque; + queueMicrotask(()=>callback(err, { + opaque: opaque + })); } -}; -$1d52c7f29a3f7d54$var$Dicer.prototype._oninfo = function(isMatch, data, start, end) { - let buf; - const self = this; - let i = 0; - let r; - let shouldWriteMore = true; - if (!this._part && this._justMatched && data) { - while(this._dashes < 2 && start + i < end)if (data[start + i] === $1d52c7f29a3f7d54$var$DASH) { - ++i; - ++this._dashes; - } else { - if (this._dashes) buf = $1d52c7f29a3f7d54$var$B_ONEDASH; - this._dashes = 0; - break; +} +module.exports = $f77f5bc7cbfa99fe$var$request; +module.exports.RequestHandler = $f77f5bc7cbfa99fe$var$RequestHandler; + +}); +parcelRegister("fYiW2", function(module, exports) { +// Ported from https://github.com/nodejs/undici/pull/907 +'use strict'; + + +var $ba0b25ba892d1b3d$require$Readable = $in2sP$nodestream.Readable; + +var $gTXXK = parcelRequire("gTXXK"); +var $ba0b25ba892d1b3d$require$RequestAbortedError = $gTXXK.RequestAbortedError; +var $ba0b25ba892d1b3d$require$NotSupportedError = $gTXXK.NotSupportedError; +var $ba0b25ba892d1b3d$require$InvalidArgumentError = $gTXXK.InvalidArgumentError; +var $ba0b25ba892d1b3d$require$AbortError = $gTXXK.AbortError; + +var $bFRvW = parcelRequire("bFRvW"); + +var $bFRvW = parcelRequire("bFRvW"); +var $ba0b25ba892d1b3d$require$ReadableStreamFrom = $bFRvW.ReadableStreamFrom; +const $ba0b25ba892d1b3d$var$kConsume = Symbol('kConsume'); +const $ba0b25ba892d1b3d$var$kReading = Symbol('kReading'); +const $ba0b25ba892d1b3d$var$kBody = Symbol('kBody'); +const $ba0b25ba892d1b3d$var$kAbort = Symbol('kAbort'); +const $ba0b25ba892d1b3d$var$kContentType = Symbol('kContentType'); +const $ba0b25ba892d1b3d$var$kContentLength = Symbol('kContentLength'); +const $ba0b25ba892d1b3d$var$noop = ()=>{}; +class $ba0b25ba892d1b3d$var$BodyReadable extends $ba0b25ba892d1b3d$require$Readable { + constructor({ resume: resume, abort: abort, contentType: contentType = '', contentLength: contentLength, highWaterMark: highWaterMark = 65536 // Same as nodejs fs streams. + }){ + super({ + autoDestroy: true, + read: resume, + highWaterMark: highWaterMark + }); + this._readableState.dataEmitted = false; + this[$ba0b25ba892d1b3d$var$kAbort] = abort; + this[$ba0b25ba892d1b3d$var$kConsume] = null; + this[$ba0b25ba892d1b3d$var$kBody] = null; + this[$ba0b25ba892d1b3d$var$kContentType] = contentType; + this[$ba0b25ba892d1b3d$var$kContentLength] = contentLength; + // Is stream being consumed through Readable API? + // This is an optimization so that we avoid checking + // for 'data' and 'readable' listeners in the hot path + // inside push(). + this[$ba0b25ba892d1b3d$var$kReading] = false; + } + destroy(err) { + if (!err && !this._readableState.endEmitted) err = new $ba0b25ba892d1b3d$require$RequestAbortedError(); + if (err) this[$ba0b25ba892d1b3d$var$kAbort](); + return super.destroy(err); + } + _destroy(err, callback) { + // Workaround for Node "bug". If the stream is destroyed in same + // tick as it is created, then a user who is waiting for a + // promise (i.e micro tick) for installing a 'error' listener will + // never get a chance and will always encounter an unhandled exception. + if (!this[$ba0b25ba892d1b3d$var$kReading]) setImmediate(()=>{ + callback(err); + }); + else callback(err); + } + on(ev, ...args) { + if (ev === 'data' || ev === 'readable') this[$ba0b25ba892d1b3d$var$kReading] = true; + return super.on(ev, ...args); + } + addListener(ev, ...args) { + return this.on(ev, ...args); + } + off(ev, ...args) { + const ret = super.off(ev, ...args); + if (ev === 'data' || ev === 'readable') this[$ba0b25ba892d1b3d$var$kReading] = this.listenerCount('data') > 0 || this.listenerCount('readable') > 0; + return ret; + } + removeListener(ev, ...args) { + return this.off(ev, ...args); + } + push(chunk) { + if (this[$ba0b25ba892d1b3d$var$kConsume] && chunk !== null) { + $ba0b25ba892d1b3d$var$consumePush(this[$ba0b25ba892d1b3d$var$kConsume], chunk); + return this[$ba0b25ba892d1b3d$var$kReading] ? super.push(chunk) : true; } - if (this._dashes === 2) { - if (start + i < end && this.listenerCount("trailer") !== 0) this.emit("trailer", data.slice(start + i, end)); - this.reset(); - this._finished = true; - // no more parts will be added - if (self._parts === 0) { - self._realFinish = true; - self.emit("finish"); - self._realFinish = false; + return super.push(chunk); + } + // https://fetch.spec.whatwg.org/#dom-body-text + async text() { + return $ba0b25ba892d1b3d$var$consume(this, 'text'); + } + // https://fetch.spec.whatwg.org/#dom-body-json + async json() { + return $ba0b25ba892d1b3d$var$consume(this, 'json'); + } + // https://fetch.spec.whatwg.org/#dom-body-blob + async blob() { + return $ba0b25ba892d1b3d$var$consume(this, 'blob'); + } + // https://fetch.spec.whatwg.org/#dom-body-bytes + async bytes() { + return $ba0b25ba892d1b3d$var$consume(this, 'bytes'); + } + // https://fetch.spec.whatwg.org/#dom-body-arraybuffer + async arrayBuffer() { + return $ba0b25ba892d1b3d$var$consume(this, 'arrayBuffer'); + } + // https://fetch.spec.whatwg.org/#dom-body-formdata + async formData() { + // TODO: Implement. + throw new $ba0b25ba892d1b3d$require$NotSupportedError(); + } + // https://fetch.spec.whatwg.org/#dom-body-bodyused + get bodyUsed() { + return $bFRvW.isDisturbed(this); + } + // https://fetch.spec.whatwg.org/#dom-body-body + get body() { + if (!this[$ba0b25ba892d1b3d$var$kBody]) { + this[$ba0b25ba892d1b3d$var$kBody] = $ba0b25ba892d1b3d$require$ReadableStreamFrom(this); + if (this[$ba0b25ba892d1b3d$var$kConsume]) { + // TODO: Is this the best way to force a lock? + this[$ba0b25ba892d1b3d$var$kBody].getReader() // Ensure stream is locked. + ; + $in2sP$nodeassert(this[$ba0b25ba892d1b3d$var$kBody].locked); } } - if (this._dashes) return; + return this[$ba0b25ba892d1b3d$var$kBody]; + } + async dump(opts) { + let limit = Number.isFinite(opts?.limit) ? opts.limit : 131072; + const signal = opts?.signal; + if (signal != null && (typeof signal !== 'object' || !('aborted' in signal))) throw new $ba0b25ba892d1b3d$require$InvalidArgumentError('signal must be an AbortSignal'); + signal?.throwIfAborted(); + if (this._readableState.closeEmitted) return null; + return await new Promise((resolve, reject)=>{ + if (this[$ba0b25ba892d1b3d$var$kContentLength] > limit) this.destroy(new $ba0b25ba892d1b3d$require$AbortError()); + const onAbort = ()=>{ + this.destroy(signal.reason ?? new $ba0b25ba892d1b3d$require$AbortError()); + }; + signal?.addEventListener('abort', onAbort); + this.on('close', function() { + signal?.removeEventListener('abort', onAbort); + if (signal?.aborted) reject(signal.reason ?? new $ba0b25ba892d1b3d$require$AbortError()); + else resolve(null); + }).on('error', $ba0b25ba892d1b3d$var$noop).on('data', function(chunk) { + limit -= chunk.length; + if (limit <= 0) this.destroy(); + }).resume(); + }); } - if (this._justMatched) this._justMatched = false; - if (!this._part) { - this._part = new $8luYO(this._partOpts); - this._part._read = function(n) { - self._unpause(); - }; - if (this._isPreamble && this.listenerCount("preamble") !== 0) this.emit("preamble", this._part); - else if (this._isPreamble !== true && this.listenerCount("part") !== 0) this.emit("part", this._part); - else this._ignore(); - if (!this._isPreamble) this._inHeader = true; - } - if (data && start < end && !this._ignoreData) { - if (this._isPreamble || !this._inHeader) { - if (buf) shouldWriteMore = this._part.push(buf); - shouldWriteMore = this._part.push(data.slice(start, end)); - if (!shouldWriteMore) this._pause = true; - } else if (!this._isPreamble && this._inHeader) { - if (buf) this._hparser.push(buf); - r = this._hparser.push(data.slice(start, end)); - if (!this._inHeader && r !== undefined && r < end) this._oninfo(false, data, start + r, end); - } - } - if (isMatch) { - this._hparser.reset(); - if (this._isPreamble) this._isPreamble = false; - else if (start !== end) { - ++this._parts; - this._part.on("end", function() { - if (--self._parts === 0) { - if (self._finished) { - self._realFinish = true; - self.emit("finish"); - self._realFinish = false; - } else self._unpause(); - } +} +// https://streams.spec.whatwg.org/#readablestream-locked +function $ba0b25ba892d1b3d$var$isLocked(self) { + // Consume is an implicit lock. + return self[$ba0b25ba892d1b3d$var$kBody] && self[$ba0b25ba892d1b3d$var$kBody].locked === true || self[$ba0b25ba892d1b3d$var$kConsume]; +} +// https://fetch.spec.whatwg.org/#body-unusable +function $ba0b25ba892d1b3d$var$isUnusable(self) { + return $bFRvW.isDisturbed(self) || $ba0b25ba892d1b3d$var$isLocked(self); +} +async function $ba0b25ba892d1b3d$var$consume(stream, type) { + $in2sP$nodeassert(!stream[$ba0b25ba892d1b3d$var$kConsume]); + return new Promise((resolve, reject)=>{ + if ($ba0b25ba892d1b3d$var$isUnusable(stream)) { + const rState = stream._readableState; + if (rState.destroyed && rState.closeEmitted === false) stream.on('error', (err)=>{ + reject(err); + }).on('close', ()=>{ + reject(new TypeError('unusable')); }); - } - this._part.push(null); - this._part = undefined; - this._ignoreData = false; - this._justMatched = true; - this._dashes = 0; + else reject(rState.errored ?? new TypeError('unusable')); + } else queueMicrotask(()=>{ + stream[$ba0b25ba892d1b3d$var$kConsume] = { + type: type, + stream: stream, + resolve: resolve, + reject: reject, + length: 0, + body: [] + }; + stream.on('error', function(err) { + $ba0b25ba892d1b3d$var$consumeFinish(this[$ba0b25ba892d1b3d$var$kConsume], err); + }).on('close', function() { + if (this[$ba0b25ba892d1b3d$var$kConsume].body !== null) $ba0b25ba892d1b3d$var$consumeFinish(this[$ba0b25ba892d1b3d$var$kConsume], new $ba0b25ba892d1b3d$require$RequestAbortedError()); + }); + $ba0b25ba892d1b3d$var$consumeStart(stream[$ba0b25ba892d1b3d$var$kConsume]); + }); + }); +} +function $ba0b25ba892d1b3d$var$consumeStart(consume) { + if (consume.body === null) return; + const { _readableState: state } = consume.stream; + if (state.bufferIndex) { + const start = state.bufferIndex; + const end = state.buffer.length; + for(let n = start; n < end; n++)$ba0b25ba892d1b3d$var$consumePush(consume, state.buffer[n]); + } else for (const chunk of state.buffer)$ba0b25ba892d1b3d$var$consumePush(consume, chunk); + if (state.endEmitted) $ba0b25ba892d1b3d$var$consumeEnd(this[$ba0b25ba892d1b3d$var$kConsume]); + else consume.stream.on('end', function() { + $ba0b25ba892d1b3d$var$consumeEnd(this[$ba0b25ba892d1b3d$var$kConsume]); + }); + consume.stream.resume(); + while(consume.stream.read() != null); +} +/** + * @param {Buffer[]} chunks + * @param {number} length + */ function $ba0b25ba892d1b3d$var$chunksDecode(chunks, length) { + if (chunks.length === 0 || length === 0) return ''; + const buffer = chunks.length === 1 ? chunks[0] : Buffer.concat(chunks, length); + const bufferLength = buffer.length; + // Skip BOM. + const start = bufferLength > 2 && buffer[0] === 0xef && buffer[1] === 0xbb && buffer[2] === 0xbf ? 3 : 0; + return buffer.utf8Slice(start, bufferLength); +} +/** + * @param {Buffer[]} chunks + * @param {number} length + * @returns {Uint8Array} + */ function $ba0b25ba892d1b3d$var$chunksConcat(chunks, length) { + if (chunks.length === 0 || length === 0) return new Uint8Array(0); + if (chunks.length === 1) // fast-path + return new Uint8Array(chunks[0]); + const buffer = new Uint8Array(Buffer.allocUnsafeSlow(length).buffer); + let offset = 0; + for(let i = 0; i < chunks.length; ++i){ + const chunk = chunks[i]; + buffer.set(chunk, offset); + offset += chunk.length; } -}; -$1d52c7f29a3f7d54$var$Dicer.prototype._unpause = function() { - if (!this._pause) return; - this._pause = false; - if (this._cb) { - const cb = this._cb; - this._cb = undefined; - cb(); + return buffer; +} +function $ba0b25ba892d1b3d$var$consumeEnd(consume) { + const { type: type, body: body, resolve: resolve, stream: stream, length: length } = consume; + try { + if (type === 'text') resolve($ba0b25ba892d1b3d$var$chunksDecode(body, length)); + else if (type === 'json') resolve(JSON.parse($ba0b25ba892d1b3d$var$chunksDecode(body, length))); + else if (type === 'arrayBuffer') resolve($ba0b25ba892d1b3d$var$chunksConcat(body, length).buffer); + else if (type === 'blob') resolve(new Blob(body, { + type: stream[$ba0b25ba892d1b3d$var$kContentType] + })); + else if (type === 'bytes') resolve($ba0b25ba892d1b3d$var$chunksConcat(body, length)); + $ba0b25ba892d1b3d$var$consumeFinish(consume); + } catch (err) { + stream.destroy(err); } +} +function $ba0b25ba892d1b3d$var$consumePush(consume, chunk) { + consume.length += chunk.length; + consume.body.push(chunk); +} +function $ba0b25ba892d1b3d$var$consumeFinish(consume, err) { + if (consume.body === null) return; + if (err) consume.reject(err); + else consume.resolve(); + consume.type = null; + consume.stream = null; + consume.resolve = null; + consume.reject = null; + consume.length = 0; + consume.body = null; +} +module.exports = { + Readable: $ba0b25ba892d1b3d$var$BodyReadable, + chunksDecode: $ba0b25ba892d1b3d$var$chunksDecode }; -module.exports = $1d52c7f29a3f7d54$var$Dicer; }); -parcelRegister("dfEGu", function(module, exports) { -"use strict"; -var $9a5c3c219e9d6fa5$require$EventEmitter = $g40fK$nodeevents.EventEmitter; - -var $9a5c3c219e9d6fa5$require$inherits = $g40fK$nodeutil.inherits; -function $9a5c3c219e9d6fa5$var$SBMH(needle) { - if (typeof needle === "string") needle = Buffer.from(needle); - if (!Buffer.isBuffer(needle)) throw new TypeError("The needle has to be a String or a Buffer."); - const needleLength = needle.length; - if (needleLength === 0) throw new Error("The needle cannot be an empty String/Buffer."); - if (needleLength > 256) throw new Error("The needle cannot have a length bigger than 256."); - this.maxMatches = Infinity; - this.matches = 0; - this._occ = new Array(256).fill(needleLength) // Initialize occurrence table. - ; - this._lookbehind_size = 0; - this._needle = needle; - this._bufpos = 0; - this._lookbehind = Buffer.alloc(needleLength); - // Populate occurrence table with analysis of the needle, - // ignoring last letter. - for(var i = 0; i < needleLength - 1; ++i)this._occ[needle[i]] = needleLength - 1 - i; -} -$9a5c3c219e9d6fa5$require$inherits($9a5c3c219e9d6fa5$var$SBMH, $9a5c3c219e9d6fa5$require$EventEmitter); -$9a5c3c219e9d6fa5$var$SBMH.prototype.reset = function() { - this._lookbehind_size = 0; - this.matches = 0; - this._bufpos = 0; -}; -$9a5c3c219e9d6fa5$var$SBMH.prototype.push = function(chunk, pos) { - if (!Buffer.isBuffer(chunk)) chunk = Buffer.from(chunk, "binary"); - const chlen = chunk.length; - this._bufpos = pos || 0; - let r; - while(r !== chlen && this.matches < this.maxMatches)r = this._sbmh_feed(chunk); - return r; -}; -$9a5c3c219e9d6fa5$var$SBMH.prototype._sbmh_feed = function(data) { - const len = data.length; - const needle = this._needle; - const needleLength = needle.length; - const lastNeedleChar = needle[needleLength - 1]; - // Positive: points to a position in `data` - // pos == 3 points to data[3] - // Negative: points to a position in the lookbehind buffer - // pos == -2 points to lookbehind[lookbehind_size - 2] - let pos = -this._lookbehind_size; - let ch; - if (pos < 0) { - // Lookbehind buffer is not empty. Perform Boyer-Moore-Horspool - // search with character lookup code that considers both the - // lookbehind buffer and the current round's haystack data. - // - // Loop until - // there is a match. - // or until - // we've moved past the position that requires the - // lookbehind buffer. In this case we switch to the - // optimized loop. - // or until - // the character to look at lies outside the haystack. - while(pos < 0 && pos <= len - needleLength){ - ch = this._sbmh_lookup_char(data, pos + needleLength - 1); - if (ch === lastNeedleChar && this._sbmh_memcmp(data, pos, needleLength - 1)) { - this._lookbehind_size = 0; - ++this.matches; - this.emit("info", true); - return this._bufpos = pos + needleLength; - } - pos += this._occ[ch]; - } - // No match. - if (pos < 0) // There's too few data for Boyer-Moore-Horspool to run, - // so let's use a different algorithm to skip as much as - // we can. - // Forward pos until - // the trailing part of lookbehind + data - // looks like the beginning of the needle - // or until - // pos == 0 - while(pos < 0 && !this._sbmh_memcmp(data, pos, len - pos))++pos; - if (pos >= 0) { - // Discard lookbehind buffer. - this.emit("info", false, this._lookbehind, 0, this._lookbehind_size); - this._lookbehind_size = 0; - } else { - // Cut off part of the lookbehind buffer that has - // been processed and append the entire haystack - // into it. - const bytesToCutOff = this._lookbehind_size + pos; - if (bytesToCutOff > 0) // The cut off data is guaranteed not to contain the needle. - this.emit("info", false, this._lookbehind, 0, bytesToCutOff); - this._lookbehind.copy(this._lookbehind, 0, bytesToCutOff, this._lookbehind_size - bytesToCutOff); - this._lookbehind_size -= bytesToCutOff; - data.copy(this._lookbehind, this._lookbehind_size); - this._lookbehind_size += len; - this._bufpos = len; - return len; - } - } - pos += (pos >= 0) * this._bufpos; - // Lookbehind buffer is now empty. We only need to check if the - // needle is in the haystack. - if (data.indexOf(needle, pos) !== -1) { - pos = data.indexOf(needle, pos); - ++this.matches; - if (pos > 0) this.emit("info", true, data, this._bufpos, pos); - else this.emit("info", true); - return this._bufpos = pos + needleLength; - } else pos = len - needleLength; - // There was no match. If there's trailing haystack data that we cannot - // match yet using the Boyer-Moore-Horspool algorithm (because the trailing - // data is less than the needle size) then match using a modified - // algorithm that starts matching from the beginning instead of the end. - // Whatever trailing data is left after running this algorithm is added to - // the lookbehind buffer. - while(pos < len && (data[pos] !== needle[0] || Buffer.compare(data.subarray(pos, pos + len - pos), needle.subarray(0, len - pos)) !== 0))++pos; - if (pos < len) { - data.copy(this._lookbehind, 0, pos, pos + (len - pos)); - this._lookbehind_size = len - pos; - } - // Everything until pos is guaranteed not to contain needle data. - if (pos > 0) this.emit("info", false, data, this._bufpos, pos < len ? pos : len); - this._bufpos = len; - return len; +parcelRegister("6wK7x", function(module, exports) { + + +var $gTXXK = parcelRequire("gTXXK"); +var $4c0981cf4d60fd02$require$ResponseStatusCodeError = $gTXXK.ResponseStatusCodeError; + +var $fYiW2 = parcelRequire("fYiW2"); +var $4c0981cf4d60fd02$require$chunksDecode = $fYiW2.chunksDecode; +const $4c0981cf4d60fd02$var$CHUNK_LIMIT = 131072; +async function $4c0981cf4d60fd02$var$getResolveErrorBodyCallback({ callback: callback, body: body, contentType: contentType, statusCode: statusCode, statusMessage: statusMessage, headers: headers }) { + $in2sP$nodeassert(body); + let chunks = []; + let length = 0; + try { + for await (const chunk of body){ + chunks.push(chunk); + length += chunk.length; + if (length > $4c0981cf4d60fd02$var$CHUNK_LIMIT) { + chunks = []; + length = 0; + break; + } + } + } catch { + chunks = []; + length = 0; + // Do nothing.... + } + const message = `Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ''}`; + if (statusCode === 204 || !contentType || !length) { + queueMicrotask(()=>callback(new $4c0981cf4d60fd02$require$ResponseStatusCodeError(message, statusCode, headers))); + return; + } + const stackTraceLimit = Error.stackTraceLimit; + Error.stackTraceLimit = 0; + let payload; + try { + if ($4c0981cf4d60fd02$var$isContentTypeApplicationJson(contentType)) payload = JSON.parse($4c0981cf4d60fd02$require$chunksDecode(chunks, length)); + else if ($4c0981cf4d60fd02$var$isContentTypeText(contentType)) payload = $4c0981cf4d60fd02$require$chunksDecode(chunks, length); + } catch { + // process in a callback to avoid throwing in the microtask queue + } finally{ + Error.stackTraceLimit = stackTraceLimit; + } + queueMicrotask(()=>callback(new $4c0981cf4d60fd02$require$ResponseStatusCodeError(message, statusCode, headers, payload))); +} +const $4c0981cf4d60fd02$var$isContentTypeApplicationJson = (contentType)=>{ + return contentType.length > 15 && contentType[11] === '/' && contentType[0] === 'a' && contentType[1] === 'p' && contentType[2] === 'p' && contentType[3] === 'l' && contentType[4] === 'i' && contentType[5] === 'c' && contentType[6] === 'a' && contentType[7] === 't' && contentType[8] === 'i' && contentType[9] === 'o' && contentType[10] === 'n' && contentType[12] === 'j' && contentType[13] === 's' && contentType[14] === 'o' && contentType[15] === 'n'; }; -$9a5c3c219e9d6fa5$var$SBMH.prototype._sbmh_lookup_char = function(data, pos) { - return pos < 0 ? this._lookbehind[this._lookbehind_size + pos] : data[pos]; +const $4c0981cf4d60fd02$var$isContentTypeText = (contentType)=>{ + return contentType.length > 4 && contentType[4] === '/' && contentType[0] === 't' && contentType[1] === 'e' && contentType[2] === 'x' && contentType[3] === 't'; }; -$9a5c3c219e9d6fa5$var$SBMH.prototype._sbmh_memcmp = function(data, pos, len) { - for(var i = 0; i < len; ++i){ - if (this._sbmh_lookup_char(data, pos + i) !== this._needle[i]) return false; - } - return true; +module.exports = { + getResolveErrorBodyCallback: $4c0981cf4d60fd02$var$getResolveErrorBodyCallback, + isContentTypeApplicationJson: $4c0981cf4d60fd02$var$isContentTypeApplicationJson, + isContentTypeText: $4c0981cf4d60fd02$var$isContentTypeText }; -module.exports = $9a5c3c219e9d6fa5$var$SBMH; }); -parcelRegister("8luYO", function(module, exports) { -"use strict"; -var $613850d9358ab6c2$require$inherits = $g40fK$nodeutil.inherits; +parcelRegister("4iCbk", function(module, exports) { +'use strict'; -var $613850d9358ab6c2$require$ReadableStream = $g40fK$nodestream.Readable; -function $613850d9358ab6c2$var$PartStream(opts) { - $613850d9358ab6c2$require$ReadableStream.call(this, opts); -} -$613850d9358ab6c2$require$inherits($613850d9358ab6c2$var$PartStream, $613850d9358ab6c2$require$ReadableStream); -$613850d9358ab6c2$var$PartStream.prototype._read = function(n) {}; -module.exports = $613850d9358ab6c2$var$PartStream; -}); +var $321675f2a64e8787$require$finished = $in2sP$nodestream.finished; +var $321675f2a64e8787$require$PassThrough = $in2sP$nodestream.PassThrough; -parcelRegister("3kzoB", function(module, exports) { -"use strict"; +var $gTXXK = parcelRequire("gTXXK"); +var $321675f2a64e8787$require$InvalidArgumentError = $gTXXK.InvalidArgumentError; +var $321675f2a64e8787$require$InvalidReturnValueError = $gTXXK.InvalidReturnValueError; -var $26ceb23cf29ba1bd$require$EventEmitter = $g40fK$nodeevents.EventEmitter; +var $bFRvW = parcelRequire("bFRvW"); -var $26ceb23cf29ba1bd$require$inherits = $g40fK$nodeutil.inherits; +var $6wK7x = parcelRequire("6wK7x"); +var $321675f2a64e8787$require$getResolveErrorBodyCallback = $6wK7x.getResolveErrorBodyCallback; -var $vFKfl = parcelRequire("vFKfl"); +var $321675f2a64e8787$require$AsyncResource = $in2sP$nodeasync_hooks.AsyncResource; -var $dfEGu = parcelRequire("dfEGu"); -const $26ceb23cf29ba1bd$var$B_DCRLF = Buffer.from("\r\n\r\n"); -const $26ceb23cf29ba1bd$var$RE_CRLF = /\r\n/g; -const $26ceb23cf29ba1bd$var$RE_HDR = /^([^:]+):[ \t]?([\x00-\xFF]+)?$/ // eslint-disable-line no-control-regex -; -function $26ceb23cf29ba1bd$var$HeaderParser(cfg) { - $26ceb23cf29ba1bd$require$EventEmitter.call(this); - cfg = cfg || {}; - const self = this; - this.nread = 0; - this.maxed = false; - this.npairs = 0; - this.maxHeaderPairs = $vFKfl(cfg, "maxHeaderPairs", 2000); - this.maxHeaderSize = $vFKfl(cfg, "maxHeaderSize", 81920); - this.buffer = ""; - this.header = {}; - this.finished = false; - this.ss = new $dfEGu($26ceb23cf29ba1bd$var$B_DCRLF); - this.ss.on("info", function(isMatch, data, start, end) { - if (data && !self.maxed) { - if (self.nread + end - start >= self.maxHeaderSize) { - end = self.maxHeaderSize - self.nread + start; - self.nread = self.maxHeaderSize; - self.maxed = true; - } else self.nread += end - start; - self.buffer += data.toString("binary", start, end); - } - if (isMatch) self._finish(); - }); -} -$26ceb23cf29ba1bd$require$inherits($26ceb23cf29ba1bd$var$HeaderParser, $26ceb23cf29ba1bd$require$EventEmitter); -$26ceb23cf29ba1bd$var$HeaderParser.prototype.push = function(data) { - const r = this.ss.push(data); - if (this.finished) return r; -}; -$26ceb23cf29ba1bd$var$HeaderParser.prototype.reset = function() { - this.finished = false; - this.buffer = ""; - this.header = {}; - this.ss.reset(); -}; -$26ceb23cf29ba1bd$var$HeaderParser.prototype._finish = function() { - if (this.buffer) this._parseHeader(); - this.ss.matches = this.ss.maxMatches; - const header = this.header; - this.header = {}; - this.buffer = ""; - this.finished = true; - this.nread = this.npairs = 0; - this.maxed = false; - this.emit("header", header); -}; -$26ceb23cf29ba1bd$var$HeaderParser.prototype._parseHeader = function() { - if (this.npairs === this.maxHeaderPairs) return; - const lines = this.buffer.split($26ceb23cf29ba1bd$var$RE_CRLF); - const len = lines.length; - let m, h; - for(var i = 0; i < len; ++i){ - if (lines[i].length === 0) continue; - if (lines[i][0] === " " || lines[i][0] === " ") // folded header content - // RFC2822 says to just remove the CRLF and not the whitespace following - // it, so we follow the RFC and include the leading whitespace ... - { - if (h) { - this.header[h][this.header[h].length - 1] += lines[i]; - continue; - } +var $1I97X = parcelRequire("1I97X"); +var $321675f2a64e8787$require$addSignal = $1I97X.addSignal; +var $321675f2a64e8787$require$removeSignal = $1I97X.removeSignal; +class $321675f2a64e8787$var$StreamHandler extends $321675f2a64e8787$require$AsyncResource { + constructor(opts, factory, callback){ + if (!opts || typeof opts !== 'object') throw new $321675f2a64e8787$require$InvalidArgumentError('invalid opts'); + const { signal: signal, method: method, opaque: opaque, body: body, onInfo: onInfo, responseHeaders: responseHeaders, throwOnError: throwOnError } = opts; + try { + if (typeof callback !== 'function') throw new $321675f2a64e8787$require$InvalidArgumentError('invalid callback'); + if (typeof factory !== 'function') throw new $321675f2a64e8787$require$InvalidArgumentError('invalid factory'); + if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') throw new $321675f2a64e8787$require$InvalidArgumentError('signal must be an EventEmitter or EventTarget'); + if (method === 'CONNECT') throw new $321675f2a64e8787$require$InvalidArgumentError('invalid method'); + if (onInfo && typeof onInfo !== 'function') throw new $321675f2a64e8787$require$InvalidArgumentError('invalid onInfo callback'); + super('UNDICI_STREAM'); + } catch (err) { + if ($bFRvW.isStream(body)) $bFRvW.destroy(body.on('error', $bFRvW.nop), err); + throw err; } - const posColon = lines[i].indexOf(":"); - if (posColon === -1 || posColon === 0) return; - m = $26ceb23cf29ba1bd$var$RE_HDR.exec(lines[i]); - h = m[1].toLowerCase(); - this.header[h] = this.header[h] || []; - this.header[h].push(m[2] || ""); - if (++this.npairs === this.maxHeaderPairs) break; + this.responseHeaders = responseHeaders || null; + this.opaque = opaque || null; + this.factory = factory; + this.callback = callback; + this.res = null; + this.abort = null; + this.context = null; + this.trailers = null; + this.body = body; + this.onInfo = onInfo || null; + this.throwOnError = throwOnError || false; + if ($bFRvW.isStream(body)) body.on('error', (err)=>{ + this.onError(err); + }); + $321675f2a64e8787$require$addSignal(this, signal); } -}; -module.exports = $26ceb23cf29ba1bd$var$HeaderParser; - -}); -parcelRegister("vFKfl", function(module, exports) { -"use strict"; -module.exports = function getLimit(limits, name, defaultLimit) { - if (!limits || limits[name] === undefined || limits[name] === null) return defaultLimit; - if (typeof limits[name] !== "number" || isNaN(limits[name])) throw new TypeError("Limit " + name + " is not a valid number"); - return limits[name]; -}; - -}); - - - -parcelRegister("idVae", function(module, exports) { -"use strict"; - -var $d445c8780bca6e33$require$Readable = $g40fK$nodestream.Readable; - -var $d445c8780bca6e33$require$inherits = $g40fK$nodeutil.inherits; - -var $2w5qD = parcelRequire("2w5qD"); - -var $jchbH = parcelRequire("jchbH"); - -var $km2xU = parcelRequire("km2xU"); - -var $2NPzL = parcelRequire("2NPzL"); - -var $vFKfl = parcelRequire("vFKfl"); -const $d445c8780bca6e33$var$RE_BOUNDARY = /^boundary$/i; -const $d445c8780bca6e33$var$RE_FIELD = /^form-data$/i; -const $d445c8780bca6e33$var$RE_CHARSET = /^charset$/i; -const $d445c8780bca6e33$var$RE_FILENAME = /^filename$/i; -const $d445c8780bca6e33$var$RE_NAME = /^name$/i; -$d445c8780bca6e33$var$Multipart.detect = /^multipart\/form-data/i; -function $d445c8780bca6e33$var$Multipart(boy, cfg) { - let i; - let len; - const self = this; - let boundary; - const limits = cfg.limits; - const isPartAFile = cfg.isPartAFile || ((fieldName, contentType, fileName)=>contentType === "application/octet-stream" || fileName !== undefined); - const parsedConType = cfg.parsedConType || []; - const defCharset = cfg.defCharset || "utf8"; - const preservePath = cfg.preservePath; - const fileOpts = { - highWaterMark: cfg.fileHwm - }; - for(i = 0, len = parsedConType.length; i < len; ++i)if (Array.isArray(parsedConType[i]) && $d445c8780bca6e33$var$RE_BOUNDARY.test(parsedConType[i][0])) { - boundary = parsedConType[i][1]; - break; - } - function checkFinished() { - if (nends === 0 && finished && !boy._done) { - finished = false; - self.end(); - } - } - if (typeof boundary !== "string") throw new Error("Multipart: Boundary not found"); - const fieldSizeLimit = $vFKfl(limits, "fieldSize", 1048576); - const fileSizeLimit = $vFKfl(limits, "fileSize", Infinity); - const filesLimit = $vFKfl(limits, "files", Infinity); - const fieldsLimit = $vFKfl(limits, "fields", Infinity); - const partsLimit = $vFKfl(limits, "parts", Infinity); - const headerPairsLimit = $vFKfl(limits, "headerPairs", 2000); - const headerSizeLimit = $vFKfl(limits, "headerSize", 81920); - let nfiles = 0; - let nfields = 0; - let nends = 0; - let curFile; - let curField; - let finished = false; - this._needDrain = false; - this._pause = false; - this._cb = undefined; - this._nparts = 0; - this._boy = boy; - const parserCfg = { - boundary: boundary, - maxHeaderPairs: headerPairsLimit, - maxHeaderSize: headerSizeLimit, - partHwm: fileOpts.highWaterMark, - highWaterMark: cfg.highWaterMark - }; - this.parser = new $2w5qD(parserCfg); - this.parser.on("drain", function() { - self._needDrain = false; - if (self._cb && !self._pause) { - const cb = self._cb; - self._cb = undefined; - cb(); + onConnect(abort, context) { + if (this.reason) { + abort(this.reason); + return; } - }).on("part", function onPart(part) { - if (++self._nparts > partsLimit) { - self.parser.removeListener("part", onPart); - self.parser.on("part", $d445c8780bca6e33$var$skipPart); - boy.hitPartsLimit = true; - boy.emit("partsLimit"); - return $d445c8780bca6e33$var$skipPart(part); - } - // hack because streams2 _always_ doesn't emit 'end' until nextTick, so let - // us emit 'end' early since we know the part has ended if we are already - // seeing the next part - if (curField) { - const field = curField; - field.emit("end"); - field.removeAllListeners("end"); - } - part.on("header", function(header) { - let contype; - let fieldname; - let parsed; - let charset; - let encoding; - let filename; - let nsize = 0; - if (header["content-type"]) { - parsed = $jchbH(header["content-type"][0]); - if (parsed[0]) { - contype = parsed[0].toLowerCase(); - for(i = 0, len = parsed.length; i < len; ++i)if ($d445c8780bca6e33$var$RE_CHARSET.test(parsed[i][0])) { - charset = parsed[i][1].toLowerCase(); - break; - } - } - } - if (contype === undefined) contype = "text/plain"; - if (charset === undefined) charset = defCharset; - if (header["content-disposition"]) { - parsed = $jchbH(header["content-disposition"][0]); - if (!$d445c8780bca6e33$var$RE_FIELD.test(parsed[0])) return $d445c8780bca6e33$var$skipPart(part); - for(i = 0, len = parsed.length; i < len; ++i){ - if ($d445c8780bca6e33$var$RE_NAME.test(parsed[i][0])) fieldname = parsed[i][1]; - else if ($d445c8780bca6e33$var$RE_FILENAME.test(parsed[i][0])) { - filename = parsed[i][1]; - if (!preservePath) filename = $2NPzL(filename); - } - } - } else return $d445c8780bca6e33$var$skipPart(part); - if (header["content-transfer-encoding"]) encoding = header["content-transfer-encoding"][0].toLowerCase(); - else encoding = "7bit"; - let onData, onEnd; - if (isPartAFile(fieldname, contype, filename)) { - // file/binary field - if (nfiles === filesLimit) { - if (!boy.hitFilesLimit) { - boy.hitFilesLimit = true; - boy.emit("filesLimit"); - } - return $d445c8780bca6e33$var$skipPart(part); - } - ++nfiles; - if (boy.listenerCount("file") === 0) { - self.parser._ignore(); - return; - } - ++nends; - const file = new $d445c8780bca6e33$var$FileStream(fileOpts); - curFile = file; - file.on("end", function() { - --nends; - self._pause = false; - checkFinished(); - if (self._cb && !self._needDrain) { - const cb = self._cb; - self._cb = undefined; - cb(); - } - }); - file._read = function(n) { - if (!self._pause) return; - self._pause = false; - if (self._cb && !self._needDrain) { - const cb = self._cb; - self._cb = undefined; - cb(); - } - }; - boy.emit("file", fieldname, file, filename, encoding, contype); - onData = function(data) { - if ((nsize += data.length) > fileSizeLimit) { - const extralen = fileSizeLimit - nsize + data.length; - if (extralen > 0) file.push(data.slice(0, extralen)); - file.truncated = true; - file.bytesRead = fileSizeLimit; - part.removeAllListeners("data"); - file.emit("limit"); - return; - } else if (!file.push(data)) self._pause = true; - file.bytesRead = nsize; - }; - onEnd = function() { - curFile = undefined; - file.push(null); - }; - } else { - // non-file field - if (nfields === fieldsLimit) { - if (!boy.hitFieldsLimit) { - boy.hitFieldsLimit = true; - boy.emit("fieldsLimit"); - } - return $d445c8780bca6e33$var$skipPart(part); - } - ++nfields; - ++nends; - let buffer = ""; - let truncated = false; - curField = part; - onData = function(data) { - if ((nsize += data.length) > fieldSizeLimit) { - const extralen = fieldSizeLimit - (nsize - data.length); - buffer += data.toString("binary", 0, extralen); - truncated = true; - part.removeAllListeners("data"); - } else buffer += data.toString("binary"); - }; - onEnd = function() { - curField = undefined; - if (buffer.length) buffer = $km2xU(buffer, "binary", charset); - boy.emit("field", fieldname, buffer, false, truncated, encoding, contype); - --nends; - checkFinished(); - }; - } - /* As of node@2efe4ab761666 (v0.10.29+/v0.11.14+), busboy had become - broken. Streams2/streams3 is a huge black box of confusion, but - somehow overriding the sync state seems to fix things again (and still - seems to work for previous node versions). - */ part._readableState.sync = false; - part.on("data", onData); - part.on("end", onEnd); - }).on("error", function(err) { - if (curFile) curFile.emit("error", err); - }); - }).on("error", function(err) { - boy.emit("error", err); - }).on("finish", function() { - finished = true; - checkFinished(); - }); -} -$d445c8780bca6e33$var$Multipart.prototype.write = function(chunk, cb) { - const r = this.parser.write(chunk); - if (r && !this._pause) cb(); - else { - this._needDrain = !r; - this._cb = cb; + $in2sP$nodeassert(this.callback); + this.abort = abort; + this.context = context; } -}; -$d445c8780bca6e33$var$Multipart.prototype.end = function() { - const self = this; - if (self.parser.writable) self.parser.end(); - else if (!self._boy._done) process.nextTick(function() { - self._boy._done = true; - self._boy.emit("finish"); - }); -}; -function $d445c8780bca6e33$var$skipPart(part) { - part.resume(); -} -function $d445c8780bca6e33$var$FileStream(opts) { - $d445c8780bca6e33$require$Readable.call(this, opts); - this.bytesRead = 0; - this.truncated = false; -} -$d445c8780bca6e33$require$inherits($d445c8780bca6e33$var$FileStream, $d445c8780bca6e33$require$Readable); -$d445c8780bca6e33$var$FileStream.prototype._read = function(n) {}; -module.exports = $d445c8780bca6e33$var$Multipart; - -}); -parcelRegister("jchbH", function(module, exports) { -/* eslint-disable object-property-newline */ "use strict"; - -var $km2xU = parcelRequire("km2xU"); -const $df9c786e51571bc9$var$RE_ENCODED = /%[a-fA-F0-9][a-fA-F0-9]/g; -const $df9c786e51571bc9$var$EncodedLookup = { - "%00": "\0", - "%01": "\x01", - "%02": "\x02", - "%03": "\x03", - "%04": "\x04", - "%05": "\x05", - "%06": "\x06", - "%07": "\x07", - "%08": "\b", - "%09": " ", - "%0a": "\n", - "%0A": "\n", - "%0b": "\v", - "%0B": "\v", - "%0c": "\f", - "%0C": "\f", - "%0d": "\r", - "%0D": "\r", - "%0e": "\x0e", - "%0E": "\x0e", - "%0f": "\x0f", - "%0F": "\x0f", - "%10": "\x10", - "%11": "\x11", - "%12": "\x12", - "%13": "\x13", - "%14": "\x14", - "%15": "\x15", - "%16": "\x16", - "%17": "\x17", - "%18": "\x18", - "%19": "\x19", - "%1a": "\x1a", - "%1A": "\x1a", - "%1b": "\x1b", - "%1B": "\x1b", - "%1c": "\x1c", - "%1C": "\x1c", - "%1d": "\x1d", - "%1D": "\x1d", - "%1e": "\x1e", - "%1E": "\x1e", - "%1f": "\x1f", - "%1F": "\x1f", - "%20": " ", - "%21": "!", - "%22": '"', - "%23": "#", - "%24": "$", - "%25": "%", - "%26": "&", - "%27": "'", - "%28": "(", - "%29": ")", - "%2a": "*", - "%2A": "*", - "%2b": "+", - "%2B": "+", - "%2c": ",", - "%2C": ",", - "%2d": "-", - "%2D": "-", - "%2e": ".", - "%2E": ".", - "%2f": "/", - "%2F": "/", - "%30": "0", - "%31": "1", - "%32": "2", - "%33": "3", - "%34": "4", - "%35": "5", - "%36": "6", - "%37": "7", - "%38": "8", - "%39": "9", - "%3a": ":", - "%3A": ":", - "%3b": ";", - "%3B": ";", - "%3c": "<", - "%3C": "<", - "%3d": "=", - "%3D": "=", - "%3e": ">", - "%3E": ">", - "%3f": "?", - "%3F": "?", - "%40": "@", - "%41": "A", - "%42": "B", - "%43": "C", - "%44": "D", - "%45": "E", - "%46": "F", - "%47": "G", - "%48": "H", - "%49": "I", - "%4a": "J", - "%4A": "J", - "%4b": "K", - "%4B": "K", - "%4c": "L", - "%4C": "L", - "%4d": "M", - "%4D": "M", - "%4e": "N", - "%4E": "N", - "%4f": "O", - "%4F": "O", - "%50": "P", - "%51": "Q", - "%52": "R", - "%53": "S", - "%54": "T", - "%55": "U", - "%56": "V", - "%57": "W", - "%58": "X", - "%59": "Y", - "%5a": "Z", - "%5A": "Z", - "%5b": "[", - "%5B": "[", - "%5c": "\\", - "%5C": "\\", - "%5d": "]", - "%5D": "]", - "%5e": "^", - "%5E": "^", - "%5f": "_", - "%5F": "_", - "%60": "`", - "%61": "a", - "%62": "b", - "%63": "c", - "%64": "d", - "%65": "e", - "%66": "f", - "%67": "g", - "%68": "h", - "%69": "i", - "%6a": "j", - "%6A": "j", - "%6b": "k", - "%6B": "k", - "%6c": "l", - "%6C": "l", - "%6d": "m", - "%6D": "m", - "%6e": "n", - "%6E": "n", - "%6f": "o", - "%6F": "o", - "%70": "p", - "%71": "q", - "%72": "r", - "%73": "s", - "%74": "t", - "%75": "u", - "%76": "v", - "%77": "w", - "%78": "x", - "%79": "y", - "%7a": "z", - "%7A": "z", - "%7b": "{", - "%7B": "{", - "%7c": "|", - "%7C": "|", - "%7d": "}", - "%7D": "}", - "%7e": "~", - "%7E": "~", - "%7f": "\x7f", - "%7F": "\x7f", - "%80": "\x80", - "%81": "\x81", - "%82": "\x82", - "%83": "\x83", - "%84": "\x84", - "%85": "\x85", - "%86": "\x86", - "%87": "\x87", - "%88": "\x88", - "%89": "\x89", - "%8a": "\x8a", - "%8A": "\x8a", - "%8b": "\x8b", - "%8B": "\x8b", - "%8c": "\x8c", - "%8C": "\x8c", - "%8d": "\x8d", - "%8D": "\x8d", - "%8e": "\x8e", - "%8E": "\x8e", - "%8f": "\x8f", - "%8F": "\x8f", - "%90": "\x90", - "%91": "\x91", - "%92": "\x92", - "%93": "\x93", - "%94": "\x94", - "%95": "\x95", - "%96": "\x96", - "%97": "\x97", - "%98": "\x98", - "%99": "\x99", - "%9a": "\x9a", - "%9A": "\x9a", - "%9b": "\x9b", - "%9B": "\x9b", - "%9c": "\x9c", - "%9C": "\x9c", - "%9d": "\x9d", - "%9D": "\x9d", - "%9e": "\x9e", - "%9E": "\x9e", - "%9f": "\x9f", - "%9F": "\x9f", - "%a0": "\xa0", - "%A0": "\xa0", - "%a1": "\xa1", - "%A1": "\xa1", - "%a2": "\xa2", - "%A2": "\xa2", - "%a3": "\xa3", - "%A3": "\xa3", - "%a4": "\xa4", - "%A4": "\xa4", - "%a5": "\xa5", - "%A5": "\xa5", - "%a6": "\xa6", - "%A6": "\xa6", - "%a7": "\xa7", - "%A7": "\xa7", - "%a8": "\xa8", - "%A8": "\xa8", - "%a9": "\xa9", - "%A9": "\xa9", - "%aa": "\xaa", - "%Aa": "\xaa", - "%aA": "\xaa", - "%AA": "\xaa", - "%ab": "\xab", - "%Ab": "\xab", - "%aB": "\xab", - "%AB": "\xab", - "%ac": "\xac", - "%Ac": "\xac", - "%aC": "\xac", - "%AC": "\xac", - "%ad": "\xad", - "%Ad": "\xad", - "%aD": "\xad", - "%AD": "\xad", - "%ae": "\xae", - "%Ae": "\xae", - "%aE": "\xae", - "%AE": "\xae", - "%af": "\xaf", - "%Af": "\xaf", - "%aF": "\xaf", - "%AF": "\xaf", - "%b0": "\xb0", - "%B0": "\xb0", - "%b1": "\xb1", - "%B1": "\xb1", - "%b2": "\xb2", - "%B2": "\xb2", - "%b3": "\xb3", - "%B3": "\xb3", - "%b4": "\xb4", - "%B4": "\xb4", - "%b5": "\xb5", - "%B5": "\xb5", - "%b6": "\xb6", - "%B6": "\xb6", - "%b7": "\xb7", - "%B7": "\xb7", - "%b8": "\xb8", - "%B8": "\xb8", - "%b9": "\xb9", - "%B9": "\xb9", - "%ba": "\xba", - "%Ba": "\xba", - "%bA": "\xba", - "%BA": "\xba", - "%bb": "\xbb", - "%Bb": "\xbb", - "%bB": "\xbb", - "%BB": "\xbb", - "%bc": "\xbc", - "%Bc": "\xbc", - "%bC": "\xbc", - "%BC": "\xbc", - "%bd": "\xbd", - "%Bd": "\xbd", - "%bD": "\xbd", - "%BD": "\xbd", - "%be": "\xbe", - "%Be": "\xbe", - "%bE": "\xbe", - "%BE": "\xbe", - "%bf": "\xbf", - "%Bf": "\xbf", - "%bF": "\xbf", - "%BF": "\xbf", - "%c0": "\xc0", - "%C0": "\xc0", - "%c1": "\xc1", - "%C1": "\xc1", - "%c2": "\xc2", - "%C2": "\xc2", - "%c3": "\xc3", - "%C3": "\xc3", - "%c4": "\xc4", - "%C4": "\xc4", - "%c5": "\xc5", - "%C5": "\xc5", - "%c6": "\xc6", - "%C6": "\xc6", - "%c7": "\xc7", - "%C7": "\xc7", - "%c8": "\xc8", - "%C8": "\xc8", - "%c9": "\xc9", - "%C9": "\xc9", - "%ca": "\xca", - "%Ca": "\xca", - "%cA": "\xca", - "%CA": "\xca", - "%cb": "\xcb", - "%Cb": "\xcb", - "%cB": "\xcb", - "%CB": "\xcb", - "%cc": "\xcc", - "%Cc": "\xcc", - "%cC": "\xcc", - "%CC": "\xcc", - "%cd": "\xcd", - "%Cd": "\xcd", - "%cD": "\xcd", - "%CD": "\xcd", - "%ce": "\xce", - "%Ce": "\xce", - "%cE": "\xce", - "%CE": "\xce", - "%cf": "\xcf", - "%Cf": "\xcf", - "%cF": "\xcf", - "%CF": "\xcf", - "%d0": "\xd0", - "%D0": "\xd0", - "%d1": "\xd1", - "%D1": "\xd1", - "%d2": "\xd2", - "%D2": "\xd2", - "%d3": "\xd3", - "%D3": "\xd3", - "%d4": "\xd4", - "%D4": "\xd4", - "%d5": "\xd5", - "%D5": "\xd5", - "%d6": "\xd6", - "%D6": "\xd6", - "%d7": "\xd7", - "%D7": "\xd7", - "%d8": "\xd8", - "%D8": "\xd8", - "%d9": "\xd9", - "%D9": "\xd9", - "%da": "\xda", - "%Da": "\xda", - "%dA": "\xda", - "%DA": "\xda", - "%db": "\xdb", - "%Db": "\xdb", - "%dB": "\xdb", - "%DB": "\xdb", - "%dc": "\xdc", - "%Dc": "\xdc", - "%dC": "\xdc", - "%DC": "\xdc", - "%dd": "\xdd", - "%Dd": "\xdd", - "%dD": "\xdd", - "%DD": "\xdd", - "%de": "\xde", - "%De": "\xde", - "%dE": "\xde", - "%DE": "\xde", - "%df": "\xdf", - "%Df": "\xdf", - "%dF": "\xdf", - "%DF": "\xdf", - "%e0": "\xe0", - "%E0": "\xe0", - "%e1": "\xe1", - "%E1": "\xe1", - "%e2": "\xe2", - "%E2": "\xe2", - "%e3": "\xe3", - "%E3": "\xe3", - "%e4": "\xe4", - "%E4": "\xe4", - "%e5": "\xe5", - "%E5": "\xe5", - "%e6": "\xe6", - "%E6": "\xe6", - "%e7": "\xe7", - "%E7": "\xe7", - "%e8": "\xe8", - "%E8": "\xe8", - "%e9": "\xe9", - "%E9": "\xe9", - "%ea": "\xea", - "%Ea": "\xea", - "%eA": "\xea", - "%EA": "\xea", - "%eb": "\xeb", - "%Eb": "\xeb", - "%eB": "\xeb", - "%EB": "\xeb", - "%ec": "\xec", - "%Ec": "\xec", - "%eC": "\xec", - "%EC": "\xec", - "%ed": "\xed", - "%Ed": "\xed", - "%eD": "\xed", - "%ED": "\xed", - "%ee": "\xee", - "%Ee": "\xee", - "%eE": "\xee", - "%EE": "\xee", - "%ef": "\xef", - "%Ef": "\xef", - "%eF": "\xef", - "%EF": "\xef", - "%f0": "\xf0", - "%F0": "\xf0", - "%f1": "\xf1", - "%F1": "\xf1", - "%f2": "\xf2", - "%F2": "\xf2", - "%f3": "\xf3", - "%F3": "\xf3", - "%f4": "\xf4", - "%F4": "\xf4", - "%f5": "\xf5", - "%F5": "\xf5", - "%f6": "\xf6", - "%F6": "\xf6", - "%f7": "\xf7", - "%F7": "\xf7", - "%f8": "\xf8", - "%F8": "\xf8", - "%f9": "\xf9", - "%F9": "\xf9", - "%fa": "\xfa", - "%Fa": "\xfa", - "%fA": "\xfa", - "%FA": "\xfa", - "%fb": "\xfb", - "%Fb": "\xfb", - "%fB": "\xfb", - "%FB": "\xfb", - "%fc": "\xfc", - "%Fc": "\xfc", - "%fC": "\xfc", - "%FC": "\xfc", - "%fd": "\xfd", - "%Fd": "\xfd", - "%fD": "\xfd", - "%FD": "\xfd", - "%fe": "\xfe", - "%Fe": "\xfe", - "%fE": "\xfe", - "%FE": "\xfe", - "%ff": "\xff", - "%Ff": "\xff", - "%fF": "\xff", - "%FF": "\xff" -}; -function $df9c786e51571bc9$var$encodedReplacer(match) { - return $df9c786e51571bc9$var$EncodedLookup[match]; -} -const $df9c786e51571bc9$var$STATE_KEY = 0; -const $df9c786e51571bc9$var$STATE_VALUE = 1; -const $df9c786e51571bc9$var$STATE_CHARSET = 2; -const $df9c786e51571bc9$var$STATE_LANG = 3; -function $df9c786e51571bc9$var$parseParams(str) { - const res = []; - let state = $df9c786e51571bc9$var$STATE_KEY; - let charset = ""; - let inquote = false; - let escaping = false; - let p = 0; - let tmp = ""; - const len = str.length; - for(var i = 0; i < len; ++i){ - const char = str[i]; - if (char === "\\" && inquote) { - if (escaping) escaping = false; - else { - escaping = true; - continue; - } - } else if (char === '"') { - if (!escaping) { - if (inquote) { - inquote = false; - state = $df9c786e51571bc9$var$STATE_KEY; - } else inquote = true; - continue; - } else escaping = false; + onHeaders(statusCode, rawHeaders, resume, statusMessage) { + const { factory: factory, opaque: opaque, context: context, callback: callback, responseHeaders: responseHeaders } = this; + const headers = responseHeaders === 'raw' ? $bFRvW.parseRawHeaders(rawHeaders) : $bFRvW.parseHeaders(rawHeaders); + if (statusCode < 200) { + if (this.onInfo) this.onInfo({ + statusCode: statusCode, + headers: headers + }); + return; + } + this.factory = null; + let res; + if (this.throwOnError && statusCode >= 400) { + const parsedHeaders = responseHeaders === 'raw' ? $bFRvW.parseHeaders(rawHeaders) : headers; + const contentType = parsedHeaders['content-type']; + res = new $321675f2a64e8787$require$PassThrough(); + this.callback = null; + this.runInAsyncScope($321675f2a64e8787$require$getResolveErrorBodyCallback, null, { + callback: callback, + body: res, + contentType: contentType, + statusCode: statusCode, + statusMessage: statusMessage, + headers: headers + }); } else { - if (escaping && inquote) tmp += "\\"; - escaping = false; - if ((state === $df9c786e51571bc9$var$STATE_CHARSET || state === $df9c786e51571bc9$var$STATE_LANG) && char === "'") { - if (state === $df9c786e51571bc9$var$STATE_CHARSET) { - state = $df9c786e51571bc9$var$STATE_LANG; - charset = tmp.substring(1); - } else state = $df9c786e51571bc9$var$STATE_VALUE; - tmp = ""; - continue; - } else if (state === $df9c786e51571bc9$var$STATE_KEY && (char === "*" || char === "=") && res.length) { - state = char === "*" ? $df9c786e51571bc9$var$STATE_CHARSET : $df9c786e51571bc9$var$STATE_VALUE; - res[p] = [ - tmp, - undefined - ]; - tmp = ""; - continue; - } else if (!inquote && char === ";") { - state = $df9c786e51571bc9$var$STATE_KEY; - if (charset) { - if (tmp.length) tmp = $km2xU(tmp.replace($df9c786e51571bc9$var$RE_ENCODED, $df9c786e51571bc9$var$encodedReplacer), "binary", charset); - charset = ""; - } else if (tmp.length) tmp = $km2xU(tmp, "binary", "utf8"); - if (res[p] === undefined) res[p] = tmp; - else res[p][1] = tmp; - tmp = ""; - ++p; - continue; - } else if (!inquote && (char === " " || char === " ")) continue; + if (factory === null) return; + res = this.runInAsyncScope(factory, null, { + statusCode: statusCode, + headers: headers, + opaque: opaque, + context: context + }); + if (!res || typeof res.write !== 'function' || typeof res.end !== 'function' || typeof res.on !== 'function') throw new $321675f2a64e8787$require$InvalidReturnValueError('expected Writable'); + // TODO: Avoid finished. It registers an unnecessary amount of listeners. + $321675f2a64e8787$require$finished(res, { + readable: false + }, (err)=>{ + const { callback: callback, res: res, opaque: opaque, trailers: trailers, abort: abort } = this; + this.res = null; + if (err || !res.readable) $bFRvW.destroy(res, err); + this.callback = null; + this.runInAsyncScope(callback, null, err || null, { + opaque: opaque, + trailers: trailers + }); + if (err) abort(); + }); } - tmp += char; + res.on('drain', resume); + this.res = res; + const needDrain = res.writableNeedDrain !== undefined ? res.writableNeedDrain : res._writableState?.needDrain; + return needDrain !== true; } - if (charset && tmp.length) tmp = $km2xU(tmp.replace($df9c786e51571bc9$var$RE_ENCODED, $df9c786e51571bc9$var$encodedReplacer), "binary", charset); - else if (tmp) tmp = $km2xU(tmp, "binary", "utf8"); - if (res[p] === undefined) { - if (tmp) res[p] = tmp; - } else res[p][1] = tmp; - return res; -} -module.exports = $df9c786e51571bc9$var$parseParams; - -}); -parcelRegister("km2xU", function(module, exports) { -"use strict"; -// Node has always utf-8 -const $ed17d64390d47f7c$var$utf8Decoder = new TextDecoder("utf-8"); -const $ed17d64390d47f7c$var$textDecoders = new Map([ - [ - "utf-8", - $ed17d64390d47f7c$var$utf8Decoder - ], - [ - "utf8", - $ed17d64390d47f7c$var$utf8Decoder - ] -]); -function $ed17d64390d47f7c$var$getDecoder(charset) { - let lc; - while(true)switch(charset){ - case "utf-8": - case "utf8": - return $ed17d64390d47f7c$var$decoders.utf8; - case "latin1": - case "ascii": - case "us-ascii": - case "iso-8859-1": - case "iso8859-1": - case "iso88591": - case "iso_8859-1": - case "windows-1252": - case "iso_8859-1:1987": - case "cp1252": - case "x-cp1252": - return $ed17d64390d47f7c$var$decoders.latin1; - case "utf16le": - case "utf-16le": - case "ucs2": - case "ucs-2": - return $ed17d64390d47f7c$var$decoders.utf16le; - case "base64": - return $ed17d64390d47f7c$var$decoders.base64; - default: - if (lc === undefined) { - lc = true; - charset = charset.toLowerCase(); - continue; - } - return $ed17d64390d47f7c$var$decoders.other.bind(charset); + onData(chunk) { + const { res: res } = this; + return res ? res.write(chunk) : true; } -} -const $ed17d64390d47f7c$var$decoders = { - utf8: (data, sourceEncoding)=>{ - if (data.length === 0) return ""; - if (typeof data === "string") data = Buffer.from(data, sourceEncoding); - return data.utf8Slice(0, data.length); - }, - latin1: (data, sourceEncoding)=>{ - if (data.length === 0) return ""; - if (typeof data === "string") return data; - return data.latin1Slice(0, data.length); - }, - utf16le: (data, sourceEncoding)=>{ - if (data.length === 0) return ""; - if (typeof data === "string") data = Buffer.from(data, sourceEncoding); - return data.ucs2Slice(0, data.length); - }, - base64: (data, sourceEncoding)=>{ - if (data.length === 0) return ""; - if (typeof data === "string") data = Buffer.from(data, sourceEncoding); - return data.base64Slice(0, data.length); - }, - other: (data, sourceEncoding)=>{ - if (data.length === 0) return ""; - if (typeof data === "string") data = Buffer.from(data, sourceEncoding); - if ($ed17d64390d47f7c$var$textDecoders.has(module.exports.toString())) try { - return $ed17d64390d47f7c$var$textDecoders.get(module.exports).decode(data); - } catch {} - return typeof data === "string" ? data : data.toString(); + onComplete(trailers) { + const { res: res } = this; + $321675f2a64e8787$require$removeSignal(this); + if (!res) return; + this.trailers = $bFRvW.parseHeaders(trailers); + res.end(); } -}; -function $ed17d64390d47f7c$var$decodeText(text, sourceEncoding, destEncoding) { - if (text) return $ed17d64390d47f7c$var$getDecoder(destEncoding)(text, sourceEncoding); - return text; -} -module.exports = $ed17d64390d47f7c$var$decodeText; - -}); - - -parcelRegister("2NPzL", function(module, exports) { -"use strict"; -module.exports = function basename(path) { - if (typeof path !== "string") return ""; - for(var i = path.length - 1; i >= 0; --i)switch(path.charCodeAt(i)){ - case 0x2F: - case 0x5C: - path = path.slice(i + 1); - return path === ".." || path === "." ? "" : path; - } - return path === ".." || path === "." ? "" : path; -}; - -}); - - -parcelRegister("ihoIc", function(module, exports) { -"use strict"; - -var $2a1iP = parcelRequire("2a1iP"); - -var $km2xU = parcelRequire("km2xU"); - -var $vFKfl = parcelRequire("vFKfl"); -const $d4ecfbd02a5bbf7f$var$RE_CHARSET = /^charset$/i; -$d4ecfbd02a5bbf7f$var$UrlEncoded.detect = /^application\/x-www-form-urlencoded/i; -function $d4ecfbd02a5bbf7f$var$UrlEncoded(boy, cfg) { - const limits = cfg.limits; - const parsedConType = cfg.parsedConType; - this.boy = boy; - this.fieldSizeLimit = $vFKfl(limits, "fieldSize", 1048576); - this.fieldNameSizeLimit = $vFKfl(limits, "fieldNameSize", 100); - this.fieldsLimit = $vFKfl(limits, "fields", Infinity); - let charset; - for(var i = 0, len = parsedConType.length; i < len; ++i)if (Array.isArray(parsedConType[i]) && $d4ecfbd02a5bbf7f$var$RE_CHARSET.test(parsedConType[i][0])) { - charset = parsedConType[i][1].toLowerCase(); - break; - } - if (charset === undefined) charset = cfg.defCharset || "utf8"; - this.decoder = new $2a1iP(); - this.charset = charset; - this._fields = 0; - this._state = "key"; - this._checkingBytes = true; - this._bytesKey = 0; - this._bytesVal = 0; - this._key = ""; - this._val = ""; - this._keyTrunc = false; - this._valTrunc = false; - this._hitLimit = false; -} -$d4ecfbd02a5bbf7f$var$UrlEncoded.prototype.write = function(data, cb) { - if (this._fields === this.fieldsLimit) { - if (!this.boy.hitFieldsLimit) { - this.boy.hitFieldsLimit = true; - this.boy.emit("fieldsLimit"); - } - return cb(); - } - let idxeq; - let idxamp; - let i; - let p = 0; - const len = data.length; - while(p < len)if (this._state === "key") { - idxeq = idxamp = undefined; - for(i = p; i < len; ++i){ - if (!this._checkingBytes) ++p; - if (data[i] === 0x3D /* = */ ) { - idxeq = i; - break; - } else if (data[i] === 0x26 /* & */ ) { - idxamp = i; - break; - } - if (this._checkingBytes && this._bytesKey === this.fieldNameSizeLimit) { - this._hitLimit = true; - break; - } else if (this._checkingBytes) ++this._bytesKey; - } - if (idxeq !== undefined) { - // key with assignment - if (idxeq > p) this._key += this.decoder.write(data.toString("binary", p, idxeq)); - this._state = "val"; - this._hitLimit = false; - this._checkingBytes = true; - this._val = ""; - this._bytesVal = 0; - this._valTrunc = false; - this.decoder.reset(); - p = idxeq + 1; - } else if (idxamp !== undefined) { - // key with no assignment - ++this._fields; - let key; - const keyTrunc = this._keyTrunc; - if (idxamp > p) key = this._key += this.decoder.write(data.toString("binary", p, idxamp)); - else key = this._key; - this._hitLimit = false; - this._checkingBytes = true; - this._key = ""; - this._bytesKey = 0; - this._keyTrunc = false; - this.decoder.reset(); - if (key.length) this.boy.emit("field", $km2xU(key, "binary", this.charset), "", keyTrunc, false); - p = idxamp + 1; - if (this._fields === this.fieldsLimit) return cb(); - } else if (this._hitLimit) { - // we may not have hit the actual limit if there are encoded bytes... - if (i > p) this._key += this.decoder.write(data.toString("binary", p, i)); - p = i; - if ((this._bytesKey = this._key.length) === this.fieldNameSizeLimit) { - // yep, we actually did hit the limit - this._checkingBytes = false; - this._keyTrunc = true; - } - } else { - if (p < len) this._key += this.decoder.write(data.toString("binary", p)); - p = len; + onError(err) { + const { res: res, callback: callback, opaque: opaque, body: body } = this; + $321675f2a64e8787$require$removeSignal(this); + this.factory = null; + if (res) { + this.res = null; + $bFRvW.destroy(res, err); + } else if (callback) { + this.callback = null; + queueMicrotask(()=>{ + this.runInAsyncScope(callback, null, err, { + opaque: opaque + }); + }); } - } else { - idxamp = undefined; - for(i = p; i < len; ++i){ - if (!this._checkingBytes) ++p; - if (data[i] === 0x26 /* & */ ) { - idxamp = i; - break; - } - if (this._checkingBytes && this._bytesVal === this.fieldSizeLimit) { - this._hitLimit = true; - break; - } else if (this._checkingBytes) ++this._bytesVal; - } - if (idxamp !== undefined) { - ++this._fields; - if (idxamp > p) this._val += this.decoder.write(data.toString("binary", p, idxamp)); - this.boy.emit("field", $km2xU(this._key, "binary", this.charset), $km2xU(this._val, "binary", this.charset), this._keyTrunc, this._valTrunc); - this._state = "key"; - this._hitLimit = false; - this._checkingBytes = true; - this._key = ""; - this._bytesKey = 0; - this._keyTrunc = false; - this.decoder.reset(); - p = idxamp + 1; - if (this._fields === this.fieldsLimit) return cb(); - } else if (this._hitLimit) { - // we may not have hit the actual limit if there are encoded bytes... - if (i > p) this._val += this.decoder.write(data.toString("binary", p, i)); - p = i; - if (this._val === "" && this.fieldSizeLimit === 0 || (this._bytesVal = this._val.length) === this.fieldSizeLimit) { - // yep, we actually did hit the limit - this._checkingBytes = false; - this._valTrunc = true; - } - } else { - if (p < len) this._val += this.decoder.write(data.toString("binary", p)); - p = len; + if (body) { + this.body = null; + $bFRvW.destroy(body, err); } } - cb(); -}; -$d4ecfbd02a5bbf7f$var$UrlEncoded.prototype.end = function() { - if (this.boy._done) return; - if (this._state === "key" && this._key.length > 0) this.boy.emit("field", $km2xU(this._key, "binary", this.charset), "", this._keyTrunc, false); - else if (this._state === "val") this.boy.emit("field", $km2xU(this._key, "binary", this.charset), $km2xU(this._val, "binary", this.charset), this._keyTrunc, this._valTrunc); - this.boy._done = true; - this.boy.emit("finish"); -}; -module.exports = $d4ecfbd02a5bbf7f$var$UrlEncoded; +} +function $321675f2a64e8787$var$stream(opts, factory, callback) { + if (callback === undefined) return new Promise((resolve, reject)=>{ + $321675f2a64e8787$var$stream.call(this, opts, factory, (err, data)=>{ + return err ? reject(err) : resolve(data); + }); + }); + try { + this.dispatch(opts, new $321675f2a64e8787$var$StreamHandler(opts, factory, callback)); + } catch (err) { + if (typeof callback !== 'function') throw err; + const opaque = opts?.opaque; + queueMicrotask(()=>callback(err, { + opaque: opaque + })); + } +} +module.exports = $321675f2a64e8787$var$stream; }); -parcelRegister("2a1iP", function(module, exports) { -"use strict"; -const $192d86a1ed935112$var$RE_PLUS = /\+/g; -const $192d86a1ed935112$var$HEX = [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 1, - 1, - 1, - 1, - 1, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 1, - 1, - 1, - 1, - 1, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 -]; -function $192d86a1ed935112$var$Decoder() { - this.buffer = undefined; -} -$192d86a1ed935112$var$Decoder.prototype.write = function(str) { - // Replace '+' with ' ' before decoding - str = str.replace($192d86a1ed935112$var$RE_PLUS, " "); - let res = ""; - let i = 0; - let p = 0; - const len = str.length; - for(; i < len; ++i){ - if (this.buffer !== undefined) { - if (!$192d86a1ed935112$var$HEX[str.charCodeAt(i)]) { - res += "%" + this.buffer; - this.buffer = undefined; - --i // retry character - ; - } else { - this.buffer += str[i]; - ++p; - if (this.buffer.length === 2) { - res += String.fromCharCode(parseInt(this.buffer, 16)); - this.buffer = undefined; - } - } - } else if (str[i] === "%") { - if (i > p) { - res += str.substring(p, i); - p = i; - } - this.buffer = ""; - ++p; - } +parcelRegister("1I97X", function(module, exports) { + +var $bFRvW = parcelRequire("bFRvW"); +var $13f0fb077484ea80$require$addAbortListener = $bFRvW.addAbortListener; + +var $gTXXK = parcelRequire("gTXXK"); +var $13f0fb077484ea80$require$RequestAbortedError = $gTXXK.RequestAbortedError; +const $13f0fb077484ea80$var$kListener = Symbol('kListener'); +const $13f0fb077484ea80$var$kSignal = Symbol('kSignal'); +function $13f0fb077484ea80$var$abort(self) { + if (self.abort) self.abort(self[$13f0fb077484ea80$var$kSignal]?.reason); + else self.reason = self[$13f0fb077484ea80$var$kSignal]?.reason ?? new $13f0fb077484ea80$require$RequestAbortedError(); + $13f0fb077484ea80$var$removeSignal(self); +} +function $13f0fb077484ea80$var$addSignal(self, signal) { + self.reason = null; + self[$13f0fb077484ea80$var$kSignal] = null; + self[$13f0fb077484ea80$var$kListener] = null; + if (!signal) return; + if (signal.aborted) { + $13f0fb077484ea80$var$abort(self); + return; } - if (p < len && this.buffer === undefined) res += str.substring(p); - return res; -}; -$192d86a1ed935112$var$Decoder.prototype.reset = function() { - this.buffer = undefined; + self[$13f0fb077484ea80$var$kSignal] = signal; + self[$13f0fb077484ea80$var$kListener] = ()=>{ + $13f0fb077484ea80$var$abort(self); + }; + $13f0fb077484ea80$require$addAbortListener(self[$13f0fb077484ea80$var$kSignal], self[$13f0fb077484ea80$var$kListener]); +} +function $13f0fb077484ea80$var$removeSignal(self) { + if (!self[$13f0fb077484ea80$var$kSignal]) return; + if ('removeEventListener' in self[$13f0fb077484ea80$var$kSignal]) self[$13f0fb077484ea80$var$kSignal].removeEventListener('abort', self[$13f0fb077484ea80$var$kListener]); + else self[$13f0fb077484ea80$var$kSignal].removeListener('abort', self[$13f0fb077484ea80$var$kListener]); + self[$13f0fb077484ea80$var$kSignal] = null; + self[$13f0fb077484ea80$var$kListener] = null; +} +module.exports = { + addSignal: $13f0fb077484ea80$var$addSignal, + removeSignal: $13f0fb077484ea80$var$removeSignal }; -module.exports = $192d86a1ed935112$var$Decoder; }); +parcelRegister("lrjUb", function(module, exports) { +'use strict'; -parcelRegister("4EkpM", function(module, exports) { -"use strict"; - -var $1ZCMb = parcelRequire("1ZCMb"); -var $362abbd5067a47fd$require$redirectStatusSet = $1ZCMb.redirectStatusSet; -var $362abbd5067a47fd$require$referrerPolicyTokens = $1ZCMb.referrerPolicySet; -var $362abbd5067a47fd$require$badPortsSet = $1ZCMb.badPortsSet; - -var $5pfdo = parcelRequire("5pfdo"); -var $362abbd5067a47fd$require$getGlobalOrigin = $5pfdo.getGlobalOrigin; +var $f9bb8f53628d2885$require$Readable = $in2sP$nodestream.Readable; +var $f9bb8f53628d2885$require$Duplex = $in2sP$nodestream.Duplex; +var $f9bb8f53628d2885$require$PassThrough = $in2sP$nodestream.PassThrough; -var $362abbd5067a47fd$require$performance = $g40fK$perf_hooks.performance; +var $gTXXK = parcelRequire("gTXXK"); +var $f9bb8f53628d2885$require$InvalidArgumentError = $gTXXK.InvalidArgumentError; +var $f9bb8f53628d2885$require$InvalidReturnValueError = $gTXXK.InvalidReturnValueError; +var $f9bb8f53628d2885$require$RequestAbortedError = $gTXXK.RequestAbortedError; -var $gv2nV = parcelRequire("gv2nV"); -var $362abbd5067a47fd$require$isBlobLike = $gv2nV.isBlobLike; -var $362abbd5067a47fd$require$toUSVString = $gv2nV.toUSVString; -var $362abbd5067a47fd$require$ReadableStreamFrom = $gv2nV.ReadableStreamFrom; +var $bFRvW = parcelRequire("bFRvW"); +var $f9bb8f53628d2885$require$AsyncResource = $in2sP$nodeasync_hooks.AsyncResource; -var $362abbd5067a47fd$require$isUint8Array = $g40fK$utiltypes.isUint8Array; -let $362abbd5067a47fd$var$supportedHashes = []; -// https://nodejs.org/api/crypto.html#determining-if-crypto-support-is-unavailable -/** @type {import('crypto')|undefined} */ let $362abbd5067a47fd$var$crypto; +var $1I97X = parcelRequire("1I97X"); +var $f9bb8f53628d2885$require$addSignal = $1I97X.addSignal; +var $f9bb8f53628d2885$require$removeSignal = $1I97X.removeSignal; -try { - $362abbd5067a47fd$var$crypto = $362abbd5067a47fd$import$c55b6e71aa693445; - const possibleRelevantHashes = [ - "sha256", - "sha384", - "sha512" - ]; - $362abbd5067a47fd$var$supportedHashes = $362abbd5067a47fd$var$crypto.getHashes().filter((hash)=>possibleRelevantHashes.includes(hash)); -/* c8 ignore next 3 */ } catch {} -function $362abbd5067a47fd$var$responseURL(response) { - // https://fetch.spec.whatwg.org/#responses - // A response has an associated URL. It is a pointer to the last URL - // in response’s URL list and null if response’s URL list is empty. - const urlList = response.urlList; - const length = urlList.length; - return length === 0 ? null : urlList[length - 1].toString(); -} -// https://fetch.spec.whatwg.org/#concept-response-location-url -function $362abbd5067a47fd$var$responseLocationURL(response, requestFragment) { - // 1. If response’s status is not a redirect status, then return null. - if (!$362abbd5067a47fd$require$redirectStatusSet.has(response.status)) return null; - // 2. Let location be the result of extracting header list values given - // `Location` and response’s header list. - let location = response.headersList.get("location"); - // 3. If location is a header value, then set location to the result of - // parsing location with response’s URL. - if (location !== null && $362abbd5067a47fd$var$isValidHeaderValue(location)) location = new URL(location, $362abbd5067a47fd$var$responseURL(response)); - // 4. If location is a URL whose fragment is null, then set location’s - // fragment to requestFragment. - if (location && !location.hash) location.hash = requestFragment; - // 5. Return location. - return location; -} -/** @returns {URL} */ function $362abbd5067a47fd$var$requestCurrentURL(request) { - return request.urlList[request.urlList.length - 1]; -} -function $362abbd5067a47fd$var$requestBadPort(request) { - // 1. Let url be request’s current URL. - const url = $362abbd5067a47fd$var$requestCurrentURL(request); - // 2. If url’s scheme is an HTTP(S) scheme and url’s port is a bad port, - // then return blocked. - if ($362abbd5067a47fd$var$urlIsHttpHttpsScheme(url) && $362abbd5067a47fd$require$badPortsSet.has(url.port)) return "blocked"; - // 3. Return allowed. - return "allowed"; -} -function $362abbd5067a47fd$var$isErrorLike(object) { - return object instanceof Error || object?.constructor?.name === "Error" || object?.constructor?.name === "DOMException"; -} -// Check whether |statusText| is a ByteString and -// matches the Reason-Phrase token production. -// RFC 2616: https://tools.ietf.org/html/rfc2616 -// RFC 7230: https://tools.ietf.org/html/rfc7230 -// "reason-phrase = *( HTAB / SP / VCHAR / obs-text )" -// https://github.com/chromium/chromium/blob/94.0.4604.1/third_party/blink/renderer/core/fetch/response.cc#L116 -function $362abbd5067a47fd$var$isValidReasonPhrase(statusText) { - for(let i = 0; i < statusText.length; ++i){ - const c = statusText.charCodeAt(i); - if (!(c === 0x09 || // HTAB - c >= 0x20 && c <= 0x7e || // SP / VCHAR - c >= 0x80 && c <= 0xff // obs-text - )) return false; +const $f9bb8f53628d2885$var$kResume = Symbol('resume'); +class $f9bb8f53628d2885$var$PipelineRequest extends $f9bb8f53628d2885$require$Readable { + constructor(){ + super({ + autoDestroy: true + }); + this[$f9bb8f53628d2885$var$kResume] = null; } - return true; -} -/** - * @see https://tools.ietf.org/html/rfc7230#section-3.2.6 - * @param {number} c - */ function $362abbd5067a47fd$var$isTokenCharCode(c) { - switch(c){ - case 0x22: - case 0x28: - case 0x29: - case 0x2c: - case 0x2f: - case 0x3a: - case 0x3b: - case 0x3c: - case 0x3d: - case 0x3e: - case 0x3f: - case 0x40: - case 0x5b: - case 0x5c: - case 0x5d: - case 0x7b: - case 0x7d: - // DQUOTE and "(),/:;<=>?@[\]{}" - return false; - default: - // VCHAR %x21-7E - return c >= 0x21 && c <= 0x7e; + _read() { + const { [$f9bb8f53628d2885$var$kResume]: resume } = this; + if (resume) { + this[$f9bb8f53628d2885$var$kResume] = null; + resume(); + } } -} -/** - * @param {string} characters - */ function $362abbd5067a47fd$var$isValidHTTPToken(characters) { - if (characters.length === 0) return false; - for(let i = 0; i < characters.length; ++i){ - if (!$362abbd5067a47fd$var$isTokenCharCode(characters.charCodeAt(i))) return false; + _destroy(err, callback) { + this._read(); + callback(err); } - return true; -} -/** - * @see https://fetch.spec.whatwg.org/#header-name - * @param {string} potentialValue - */ function $362abbd5067a47fd$var$isValidHeaderName(potentialValue) { - return $362abbd5067a47fd$var$isValidHTTPToken(potentialValue); } -/** - * @see https://fetch.spec.whatwg.org/#header-value - * @param {string} potentialValue - */ function $362abbd5067a47fd$var$isValidHeaderValue(potentialValue) { - // - Has no leading or trailing HTTP tab or space bytes. - // - Contains no 0x00 (NUL) or HTTP newline bytes. - if (potentialValue.startsWith(" ") || potentialValue.startsWith(" ") || potentialValue.endsWith(" ") || potentialValue.endsWith(" ")) return false; - if (potentialValue.includes("\0") || potentialValue.includes("\r") || potentialValue.includes("\n")) return false; - return true; +class $f9bb8f53628d2885$var$PipelineResponse extends $f9bb8f53628d2885$require$Readable { + constructor(resume){ + super({ + autoDestroy: true + }); + this[$f9bb8f53628d2885$var$kResume] = resume; + } + _read() { + this[$f9bb8f53628d2885$var$kResume](); + } + _destroy(err, callback) { + if (!err && !this._readableState.endEmitted) err = new $f9bb8f53628d2885$require$RequestAbortedError(); + callback(err); + } } -// https://w3c.github.io/webappsec-referrer-policy/#set-requests-referrer-policy-on-redirect -function $362abbd5067a47fd$var$setRequestReferrerPolicyOnRedirect(request, actualResponse) { - // Given a request request and a response actualResponse, this algorithm - // updates request’s referrer policy according to the Referrer-Policy - // header (if any) in actualResponse. - // 1. Let policy be the result of executing § 8.1 Parse a referrer policy - // from a Referrer-Policy header on actualResponse. - // 8.1 Parse a referrer policy from a Referrer-Policy header - // 1. Let policy-tokens be the result of extracting header list values given `Referrer-Policy` and response’s header list. - const { headersList: headersList } = actualResponse; - // 2. Let policy be the empty string. - // 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. - // 4. Return policy. - const policyHeader = (headersList.get("referrer-policy") ?? "").split(","); - // Note: As the referrer-policy can contain multiple policies - // separated by comma, we need to loop through all of them - // and pick the first valid one. - // Ref: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy#specify_a_fallback_policy - let policy = ""; - if (policyHeader.length > 0) // The right-most policy takes precedence. - // The left-most policy is the fallback. - for(let i = policyHeader.length; i !== 0; i--){ - const token = policyHeader[i - 1].trim(); - if ($362abbd5067a47fd$require$referrerPolicyTokens.has(token)) { - policy = token; - break; +class $f9bb8f53628d2885$var$PipelineHandler extends $f9bb8f53628d2885$require$AsyncResource { + constructor(opts, handler){ + if (!opts || typeof opts !== 'object') throw new $f9bb8f53628d2885$require$InvalidArgumentError('invalid opts'); + if (typeof handler !== 'function') throw new $f9bb8f53628d2885$require$InvalidArgumentError('invalid handler'); + const { signal: signal, method: method, opaque: opaque, onInfo: onInfo, responseHeaders: responseHeaders } = opts; + if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') throw new $f9bb8f53628d2885$require$InvalidArgumentError('signal must be an EventEmitter or EventTarget'); + if (method === 'CONNECT') throw new $f9bb8f53628d2885$require$InvalidArgumentError('invalid method'); + if (onInfo && typeof onInfo !== 'function') throw new $f9bb8f53628d2885$require$InvalidArgumentError('invalid onInfo callback'); + super('UNDICI_PIPELINE'); + this.opaque = opaque || null; + this.responseHeaders = responseHeaders || null; + this.handler = handler; + this.abort = null; + this.context = null; + this.onInfo = onInfo || null; + this.req = new $f9bb8f53628d2885$var$PipelineRequest().on('error', $bFRvW.nop); + this.ret = new $f9bb8f53628d2885$require$Duplex({ + readableObjectMode: opts.objectMode, + autoDestroy: true, + read: ()=>{ + const { body: body } = this; + if (body?.resume) body.resume(); + }, + write: (chunk, encoding, callback)=>{ + const { req: req } = this; + if (req.push(chunk, encoding) || req._readableState.destroyed) callback(); + else req[$f9bb8f53628d2885$var$kResume] = callback; + }, + destroy: (err, callback)=>{ + const { body: body, req: req, res: res, ret: ret, abort: abort } = this; + if (!err && !ret._readableState.endEmitted) err = new $f9bb8f53628d2885$require$RequestAbortedError(); + if (abort && err) abort(); + $bFRvW.destroy(body, err); + $bFRvW.destroy(req, err); + $bFRvW.destroy(res, err); + $f9bb8f53628d2885$require$removeSignal(this); + callback(err); + } + }).on('prefinish', ()=>{ + const { req: req } = this; + // Node < 15 does not call _final in same tick. + req.push(null); + }); + this.res = null; + $f9bb8f53628d2885$require$addSignal(this, signal); + } + onConnect(abort, context) { + const { ret: ret, res: res } = this; + if (this.reason) { + abort(this.reason); + return; } + $in2sP$nodeassert(!res, 'pipeline cannot be retried'); + $in2sP$nodeassert(!ret.destroyed); + this.abort = abort; + this.context = context; } - // 2. If policy is not the empty string, then set request’s referrer policy to policy. - if (policy !== "") request.referrerPolicy = policy; -} -// https://fetch.spec.whatwg.org/#cross-origin-resource-policy-check -function $362abbd5067a47fd$var$crossOriginResourcePolicyCheck() { - // TODO - return "allowed"; -} -// https://fetch.spec.whatwg.org/#concept-cors-check -function $362abbd5067a47fd$var$corsCheck() { - // TODO - return "success"; -} -// https://fetch.spec.whatwg.org/#concept-tao-check -function $362abbd5067a47fd$var$TAOCheck() { - // TODO - return "success"; -} -function $362abbd5067a47fd$var$appendFetchMetadata(httpRequest) { - // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-dest-header - // TODO - // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-mode-header - // 1. Assert: r’s url is a potentially trustworthy URL. - // TODO - // 2. Let header be a Structured Header whose value is a token. - let header = null; - // 3. Set header’s value to r’s mode. - header = httpRequest.mode; - // 4. Set a structured field value `Sec-Fetch-Mode`/header in r’s header list. - httpRequest.headersList.set("sec-fetch-mode", header); -// https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-site-header -// TODO -// https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-user-header -// TODO -} -// https://fetch.spec.whatwg.org/#append-a-request-origin-header -function $362abbd5067a47fd$var$appendRequestOriginHeader(request) { - // 1. Let serializedOrigin be the result of byte-serializing a request origin with request. - let serializedOrigin = request.origin; - // 2. If request’s response tainting is "cors" or request’s mode is "websocket", then append (`Origin`, serializedOrigin) to request’s header list. - if (request.responseTainting === "cors" || request.mode === "websocket") { - if (serializedOrigin) request.headersList.append("origin", serializedOrigin); - } else if (request.method !== "GET" && request.method !== "HEAD") { - // 1. Switch on request’s referrer policy: - switch(request.referrerPolicy){ - case "no-referrer": - // Set serializedOrigin to `null`. - serializedOrigin = null; - break; - case "no-referrer-when-downgrade": - case "strict-origin": - case "strict-origin-when-cross-origin": - // If request’s origin is a tuple origin, its scheme is "https", and request’s current URL’s scheme is not "https", then set serializedOrigin to `null`. - if (request.origin && $362abbd5067a47fd$var$urlHasHttpsScheme(request.origin) && !$362abbd5067a47fd$var$urlHasHttpsScheme($362abbd5067a47fd$var$requestCurrentURL(request))) serializedOrigin = null; - break; - case "same-origin": - // If request’s origin is not same origin with request’s current URL’s origin, then set serializedOrigin to `null`. - if (!$362abbd5067a47fd$var$sameOrigin(request, $362abbd5067a47fd$var$requestCurrentURL(request))) serializedOrigin = null; - break; - default: + onHeaders(statusCode, rawHeaders, resume) { + const { opaque: opaque, handler: handler, context: context } = this; + if (statusCode < 200) { + if (this.onInfo) { + const headers = this.responseHeaders === 'raw' ? $bFRvW.parseRawHeaders(rawHeaders) : $bFRvW.parseHeaders(rawHeaders); + this.onInfo({ + statusCode: statusCode, + headers: headers + }); + } + return; + } + this.res = new $f9bb8f53628d2885$var$PipelineResponse(resume); + let body; + try { + this.handler = null; + const headers = this.responseHeaders === 'raw' ? $bFRvW.parseRawHeaders(rawHeaders) : $bFRvW.parseHeaders(rawHeaders); + body = this.runInAsyncScope(handler, null, { + statusCode: statusCode, + headers: headers, + opaque: opaque, + body: this.res, + context: context + }); + } catch (err) { + this.res.on('error', $bFRvW.nop); + throw err; } - if (serializedOrigin) // 2. Append (`Origin`, serializedOrigin) to request’s header list. - request.headersList.append("origin", serializedOrigin); + if (!body || typeof body.on !== 'function') throw new $f9bb8f53628d2885$require$InvalidReturnValueError('expected Readable'); + body.on('data', (chunk)=>{ + const { ret: ret, body: body } = this; + if (!ret.push(chunk) && body.pause) body.pause(); + }).on('error', (err)=>{ + const { ret: ret } = this; + $bFRvW.destroy(ret, err); + }).on('end', ()=>{ + const { ret: ret } = this; + ret.push(null); + }).on('close', ()=>{ + const { ret: ret } = this; + if (!ret._readableState.ended) $bFRvW.destroy(ret, new $f9bb8f53628d2885$require$RequestAbortedError()); + }); + this.body = body; + } + onData(chunk) { + const { res: res } = this; + return res.push(chunk); + } + onComplete(trailers) { + const { res: res } = this; + res.push(null); + } + onError(err) { + const { ret: ret } = this; + this.handler = null; + $bFRvW.destroy(ret, err); } } -function $362abbd5067a47fd$var$coarsenedSharedCurrentTime(crossOriginIsolatedCapability) { - // TODO - return $362abbd5067a47fd$require$performance.now(); -} -// https://fetch.spec.whatwg.org/#create-an-opaque-timing-info -function $362abbd5067a47fd$var$createOpaqueTimingInfo(timingInfo) { - return { - startTime: timingInfo.startTime ?? 0, - redirectStartTime: 0, - redirectEndTime: 0, - postRedirectStartTime: timingInfo.startTime ?? 0, - finalServiceWorkerStartTime: 0, - finalNetworkResponseStartTime: 0, - finalNetworkRequestStartTime: 0, - endTime: 0, - encodedBodySize: 0, - decodedBodySize: 0, - finalConnectionTimingInfo: null - }; -} -// https://html.spec.whatwg.org/multipage/origin.html#policy-container -function $362abbd5067a47fd$var$makePolicyContainer() { - // Note: the fetch spec doesn't make use of embedder policy or CSP list - return { - referrerPolicy: "strict-origin-when-cross-origin" - }; -} -// https://html.spec.whatwg.org/multipage/origin.html#clone-a-policy-container -function $362abbd5067a47fd$var$clonePolicyContainer(policyContainer) { - return { - referrerPolicy: policyContainer.referrerPolicy - }; +function $f9bb8f53628d2885$var$pipeline(opts, handler) { + try { + const pipelineHandler = new $f9bb8f53628d2885$var$PipelineHandler(opts, handler); + this.dispatch({ + ...opts, + body: pipelineHandler.req + }, pipelineHandler); + return pipelineHandler.ret; + } catch (err) { + return new $f9bb8f53628d2885$require$PassThrough().destroy(err); + } } -// https://w3c.github.io/webappsec-referrer-policy/#determine-requests-referrer -function $362abbd5067a47fd$var$determineRequestsReferrer(request) { - // 1. Let policy be request's referrer policy. - const policy = request.referrerPolicy; - // Note: policy cannot (shouldn't) be null or an empty string. - $g40fK$assert(policy); - // 2. Let environment be request’s client. - let referrerSource = null; - // 3. Switch on request’s referrer: - if (request.referrer === "client") { - // Note: node isn't a browser and doesn't implement document/iframes, - // so we bypass this step and replace it with our own. - const globalOrigin = $362abbd5067a47fd$require$getGlobalOrigin(); - if (!globalOrigin || globalOrigin.origin === "null") return "no-referrer"; - // note: we need to clone it as it's mutated - referrerSource = new URL(globalOrigin); - } else if (request.referrer instanceof URL) // Let referrerSource be request’s referrer. - referrerSource = request.referrer; - // 4. Let request’s referrerURL be the result of stripping referrerSource for - // use as a referrer. - let referrerURL = $362abbd5067a47fd$var$stripURLForReferrer(referrerSource); - // 5. Let referrerOrigin be the result of stripping referrerSource for use as - // a referrer, with the origin-only flag set to true. - const referrerOrigin = $362abbd5067a47fd$var$stripURLForReferrer(referrerSource, true); - // 6. If the result of serializing referrerURL is a string whose length is - // greater than 4096, set referrerURL to referrerOrigin. - if (referrerURL.toString().length > 4096) referrerURL = referrerOrigin; - const areSameOrigin = $362abbd5067a47fd$var$sameOrigin(request, referrerURL); - const isNonPotentiallyTrustWorthy = $362abbd5067a47fd$var$isURLPotentiallyTrustworthy(referrerURL) && !$362abbd5067a47fd$var$isURLPotentiallyTrustworthy(request.url); - // 8. Execute the switch statements corresponding to the value of policy: - switch(policy){ - case "origin": - return referrerOrigin != null ? referrerOrigin : $362abbd5067a47fd$var$stripURLForReferrer(referrerSource, true); - case "unsafe-url": - return referrerURL; - case "same-origin": - return areSameOrigin ? referrerOrigin : "no-referrer"; - case "origin-when-cross-origin": - return areSameOrigin ? referrerURL : referrerOrigin; - case "strict-origin-when-cross-origin": - { - const currentURL = $362abbd5067a47fd$var$requestCurrentURL(request); - // 1. If the origin of referrerURL and the origin of request’s current - // URL are the same, then return referrerURL. - if ($362abbd5067a47fd$var$sameOrigin(referrerURL, currentURL)) return referrerURL; - // 2. If referrerURL is a potentially trustworthy URL and request’s - // current URL is not a potentially trustworthy URL, then return no - // referrer. - if ($362abbd5067a47fd$var$isURLPotentiallyTrustworthy(referrerURL) && !$362abbd5067a47fd$var$isURLPotentiallyTrustworthy(currentURL)) return "no-referrer"; - // 3. Return referrerOrigin. - return referrerOrigin; - } - case "strict-origin": - /** - * 1. If referrerURL is a potentially trustworthy URL and - * request’s current URL is not a potentially trustworthy URL, - * then return no referrer. - * 2. Return referrerOrigin - */ case "no-referrer-when-downgrade": - /** - * 1. If referrerURL is a potentially trustworthy URL and - * request’s current URL is not a potentially trustworthy URL, - * then return no referrer. - * 2. Return referrerOrigin - */ default: - return isNonPotentiallyTrustWorthy ? "no-referrer" : referrerOrigin; +module.exports = $f9bb8f53628d2885$var$pipeline; + +}); + +parcelRegister("ciYwn", function(module, exports) { +'use strict'; + +var $gTXXK = parcelRequire("gTXXK"); +var $8f561cb8f964f80f$require$InvalidArgumentError = $gTXXK.InvalidArgumentError; +var $8f561cb8f964f80f$require$SocketError = $gTXXK.SocketError; + +var $8f561cb8f964f80f$require$AsyncResource = $in2sP$nodeasync_hooks.AsyncResource; + +var $bFRvW = parcelRequire("bFRvW"); + +var $1I97X = parcelRequire("1I97X"); +var $8f561cb8f964f80f$require$addSignal = $1I97X.addSignal; +var $8f561cb8f964f80f$require$removeSignal = $1I97X.removeSignal; + +class $8f561cb8f964f80f$var$UpgradeHandler extends $8f561cb8f964f80f$require$AsyncResource { + constructor(opts, callback){ + if (!opts || typeof opts !== 'object') throw new $8f561cb8f964f80f$require$InvalidArgumentError('invalid opts'); + if (typeof callback !== 'function') throw new $8f561cb8f964f80f$require$InvalidArgumentError('invalid callback'); + const { signal: signal, opaque: opaque, responseHeaders: responseHeaders } = opts; + if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') throw new $8f561cb8f964f80f$require$InvalidArgumentError('signal must be an EventEmitter or EventTarget'); + super('UNDICI_UPGRADE'); + this.responseHeaders = responseHeaders || null; + this.opaque = opaque || null; + this.callback = callback; + this.abort = null; + this.context = null; + $8f561cb8f964f80f$require$addSignal(this, signal); } -} -/** - * @see https://w3c.github.io/webappsec-referrer-policy/#strip-url - * @param {URL} url - * @param {boolean|undefined} originOnly - */ function $362abbd5067a47fd$var$stripURLForReferrer(url, originOnly) { - // 1. Assert: url is a URL. - $g40fK$assert(url instanceof URL); - // 2. If url’s scheme is a local scheme, then return no referrer. - if (url.protocol === "file:" || url.protocol === "about:" || url.protocol === "blank:") return "no-referrer"; - // 3. Set url’s username to the empty string. - url.username = ""; - // 4. Set url’s password to the empty string. - url.password = ""; - // 5. Set url’s fragment to null. - url.hash = ""; - // 6. If the origin-only flag is true, then: - if (originOnly) { - // 1. Set url’s path to « the empty string ». - url.pathname = ""; - // 2. Set url’s query to null. - url.search = ""; + onConnect(abort, context) { + if (this.reason) { + abort(this.reason); + return; + } + $in2sP$nodeassert(this.callback); + this.abort = abort; + this.context = null; } - // 7. Return url. - return url; -} -function $362abbd5067a47fd$var$isURLPotentiallyTrustworthy(url) { - if (!(url instanceof URL)) return false; - // If child of about, return true - if (url.href === "about:blank" || url.href === "about:srcdoc") return true; - // If scheme is data, return true - if (url.protocol === "data:") return true; - // If file, return true - if (url.protocol === "file:") return true; - return isOriginPotentiallyTrustworthy(url.origin); - function isOriginPotentiallyTrustworthy(origin) { - // If origin is explicitly null, return false - if (origin == null || origin === "null") return false; - const originAsURL = new URL(origin); - // If secure, return true - if (originAsURL.protocol === "https:" || originAsURL.protocol === "wss:") return true; - // If localhost or variants, return true - if (/^127(?:\.[0-9]+){0,2}\.[0-9]+$|^\[(?:0*:)*?:?0*1\]$/.test(originAsURL.hostname) || originAsURL.hostname === "localhost" || originAsURL.hostname.includes("localhost.") || originAsURL.hostname.endsWith(".localhost")) return true; - // If any other, return false - return false; + onHeaders() { + throw new $8f561cb8f964f80f$require$SocketError('bad upgrade', null); } -} -/** - * @see https://w3c.github.io/webappsec-subresource-integrity/#does-response-match-metadatalist - * @param {Uint8Array} bytes - * @param {string} metadataList - */ function $362abbd5067a47fd$var$bytesMatch(bytes, metadataList) { - // If node is not built with OpenSSL support, we cannot check - // a request's integrity, so allow it by default (the spec will - // allow requests if an invalid hash is given, as precedence). - /* istanbul ignore if: only if node is built with --without-ssl */ if ($362abbd5067a47fd$var$crypto === undefined) return true; - // 1. Let parsedMetadata be the result of parsing metadataList. - const parsedMetadata = $362abbd5067a47fd$var$parseMetadata(metadataList); - // 2. If parsedMetadata is no metadata, return true. - if (parsedMetadata === "no metadata") return true; - // 3. If response is not eligible for integrity validation, return false. - // TODO - // 4. If parsedMetadata is the empty set, return true. - if (parsedMetadata.length === 0) return true; - // 5. Let metadata be the result of getting the strongest - // metadata from parsedMetadata. - const strongest = $362abbd5067a47fd$var$getStrongestMetadata(parsedMetadata); - const metadata = $362abbd5067a47fd$var$filterMetadataListByAlgorithm(parsedMetadata, strongest); - // 6. For each item in metadata: - for (const item of metadata){ - // 1. Let algorithm be the alg component of item. - const algorithm = item.algo; - // 2. Let expectedValue be the val component of item. - const expectedValue = item.hash; - // See https://github.com/web-platform-tests/wpt/commit/e4c5cc7a5e48093220528dfdd1c4012dc3837a0e - // "be liberal with padding". This is annoying, and it's not even in the spec. - // 3. Let actualValue be the result of applying algorithm to bytes. - let actualValue = $362abbd5067a47fd$var$crypto.createHash(algorithm).update(bytes).digest("base64"); - if (actualValue[actualValue.length - 1] === "=") { - if (actualValue[actualValue.length - 2] === "=") actualValue = actualValue.slice(0, -2); - else actualValue = actualValue.slice(0, -1); + onUpgrade(statusCode, rawHeaders, socket) { + $in2sP$nodeassert(statusCode === 101); + const { callback: callback, opaque: opaque, context: context } = this; + $8f561cb8f964f80f$require$removeSignal(this); + this.callback = null; + const headers = this.responseHeaders === 'raw' ? $bFRvW.parseRawHeaders(rawHeaders) : $bFRvW.parseHeaders(rawHeaders); + this.runInAsyncScope(callback, null, null, { + headers: headers, + socket: socket, + opaque: opaque, + context: context + }); + } + onError(err) { + const { callback: callback, opaque: opaque } = this; + $8f561cb8f964f80f$require$removeSignal(this); + if (callback) { + this.callback = null; + queueMicrotask(()=>{ + this.runInAsyncScope(callback, null, err, { + opaque: opaque + }); + }); } - // 4. If actualValue is a case-sensitive match for expectedValue, - // return true. - if ($362abbd5067a47fd$var$compareBase64Mixed(actualValue, expectedValue)) return true; } - // 7. Return false. - return false; } -// https://w3c.github.io/webappsec-subresource-integrity/#grammardef-hash-with-options -// https://www.w3.org/TR/CSP2/#source-list-syntax -// https://www.rfc-editor.org/rfc/rfc5234#appendix-B.1 -const $362abbd5067a47fd$var$parseHashWithOptions = /(?sha256|sha384|sha512)-((?[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i; -/** - * @see https://w3c.github.io/webappsec-subresource-integrity/#parse-metadata - * @param {string} metadata - */ function $362abbd5067a47fd$var$parseMetadata(metadata) { - // 1. Let result be the empty set. - /** @type {{ algo: string, hash: string }[]} */ const result = []; - // 2. Let empty be equal to true. - let empty = true; - // 3. For each token returned by splitting metadata on spaces: - for (const token of metadata.split(" ")){ - // 1. Set empty to false. - empty = false; - // 2. Parse token as a hash-with-options. - const parsedToken = $362abbd5067a47fd$var$parseHashWithOptions.exec(token); - // 3. If token does not parse, continue to the next token. - if (parsedToken === null || parsedToken.groups === undefined || parsedToken.groups.algo === undefined) continue; - // 4. Let algorithm be the hash-algo component of token. - const algorithm = parsedToken.groups.algo.toLowerCase(); - // 5. If algorithm is a hash function recognized by the user - // agent, add the parsed token to result. - if ($362abbd5067a47fd$var$supportedHashes.includes(algorithm)) result.push(parsedToken.groups); +function $8f561cb8f964f80f$var$upgrade(opts, callback) { + if (callback === undefined) return new Promise((resolve, reject)=>{ + $8f561cb8f964f80f$var$upgrade.call(this, opts, (err, data)=>{ + return err ? reject(err) : resolve(data); + }); + }); + try { + const upgradeHandler = new $8f561cb8f964f80f$var$UpgradeHandler(opts, callback); + this.dispatch({ + ...opts, + method: opts.method || 'GET', + upgrade: opts.protocol || 'Websocket' + }, upgradeHandler); + } catch (err) { + if (typeof callback !== 'function') throw err; + const opaque = opts?.opaque; + queueMicrotask(()=>callback(err, { + opaque: opaque + })); } - // 4. Return no metadata if empty is true, otherwise return result. - if (empty === true) return "no metadata"; - return result; } -/** - * @param {{ algo: 'sha256' | 'sha384' | 'sha512' }[]} metadataList - */ function $362abbd5067a47fd$var$getStrongestMetadata(metadataList) { - // Let algorithm be the algo component of the first item in metadataList. - // Can be sha256 - let algorithm = metadataList[0].algo; - // If the algorithm is sha512, then it is the strongest - // and we can return immediately - if (algorithm[3] === "5") return algorithm; - for(let i = 1; i < metadataList.length; ++i){ - const metadata = metadataList[i]; - // If the algorithm is sha512, then it is the strongest - // and we can break the loop immediately - if (metadata.algo[3] === "5") { - algorithm = "sha512"; - break; - // If the algorithm is sha384, then a potential sha256 or sha384 is ignored - } else if (algorithm[3] === "3") continue; - else if (metadata.algo[3] === "3") algorithm = "sha384"; +module.exports = $8f561cb8f964f80f$var$upgrade; + +}); + +parcelRegister("b2QcJ", function(module, exports) { +'use strict'; + + +var $80a860533b016003$require$AsyncResource = $in2sP$nodeasync_hooks.AsyncResource; + +var $gTXXK = parcelRequire("gTXXK"); +var $80a860533b016003$require$InvalidArgumentError = $gTXXK.InvalidArgumentError; +var $80a860533b016003$require$SocketError = $gTXXK.SocketError; + +var $bFRvW = parcelRequire("bFRvW"); + +var $1I97X = parcelRequire("1I97X"); +var $80a860533b016003$require$addSignal = $1I97X.addSignal; +var $80a860533b016003$require$removeSignal = $1I97X.removeSignal; +class $80a860533b016003$var$ConnectHandler extends $80a860533b016003$require$AsyncResource { + constructor(opts, callback){ + if (!opts || typeof opts !== 'object') throw new $80a860533b016003$require$InvalidArgumentError('invalid opts'); + if (typeof callback !== 'function') throw new $80a860533b016003$require$InvalidArgumentError('invalid callback'); + const { signal: signal, opaque: opaque, responseHeaders: responseHeaders } = opts; + if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') throw new $80a860533b016003$require$InvalidArgumentError('signal must be an EventEmitter or EventTarget'); + super('UNDICI_CONNECT'); + this.opaque = opaque || null; + this.responseHeaders = responseHeaders || null; + this.callback = callback; + this.abort = null; + $80a860533b016003$require$addSignal(this, signal); } - return algorithm; -} -function $362abbd5067a47fd$var$filterMetadataListByAlgorithm(metadataList, algorithm) { - if (metadataList.length === 1) return metadataList; - let pos = 0; - for(let i = 0; i < metadataList.length; ++i)if (metadataList[i].algo === algorithm) metadataList[pos++] = metadataList[i]; - metadataList.length = pos; - return metadataList; -} -/** - * Compares two base64 strings, allowing for base64url - * in the second string. - * -* @param {string} actualValue always base64 - * @param {string} expectedValue base64 or base64url - * @returns {boolean} - */ function $362abbd5067a47fd$var$compareBase64Mixed(actualValue, expectedValue) { - if (actualValue.length !== expectedValue.length) return false; - for(let i = 0; i < actualValue.length; ++i)if (actualValue[i] !== expectedValue[i]) { - if (actualValue[i] === "+" && expectedValue[i] === "-" || actualValue[i] === "/" && expectedValue[i] === "_") continue; - return false; + onConnect(abort, context) { + if (this.reason) { + abort(this.reason); + return; + } + $in2sP$nodeassert(this.callback); + this.abort = abort; + this.context = context; + } + onHeaders() { + throw new $80a860533b016003$require$SocketError('bad connect', null); + } + onUpgrade(statusCode, rawHeaders, socket) { + const { callback: callback, opaque: opaque, context: context } = this; + $80a860533b016003$require$removeSignal(this); + this.callback = null; + let headers = rawHeaders; + // Indicates is an HTTP2Session + if (headers != null) headers = this.responseHeaders === 'raw' ? $bFRvW.parseRawHeaders(rawHeaders) : $bFRvW.parseHeaders(rawHeaders); + this.runInAsyncScope(callback, null, null, { + statusCode: statusCode, + headers: headers, + socket: socket, + opaque: opaque, + context: context + }); + } + onError(err) { + const { callback: callback, opaque: opaque } = this; + $80a860533b016003$require$removeSignal(this); + if (callback) { + this.callback = null; + queueMicrotask(()=>{ + this.runInAsyncScope(callback, null, err, { + opaque: opaque + }); + }); + } } - return true; -} -// https://w3c.github.io/webappsec-upgrade-insecure-requests/#upgrade-request -function $362abbd5067a47fd$var$tryUpgradeRequestToAPotentiallyTrustworthyURL(request) { -// TODO } -/** - * @link {https://html.spec.whatwg.org/multipage/origin.html#same-origin} - * @param {URL} A - * @param {URL} B - */ function $362abbd5067a47fd$var$sameOrigin(A, B) { - // 1. If A and B are the same opaque origin, then return true. - if (A.origin === B.origin && A.origin === "null") return true; - // 2. If A and B are both tuple origins and their schemes, - // hosts, and port are identical, then return true. - if (A.protocol === B.protocol && A.hostname === B.hostname && A.port === B.port) return true; - // 3. Return false. - return false; -} -function $362abbd5067a47fd$var$createDeferredPromise() { - let res; - let rej; - const promise = new Promise((resolve, reject)=>{ - res = resolve; - rej = reject; +function $80a860533b016003$var$connect(opts, callback) { + if (callback === undefined) return new Promise((resolve, reject)=>{ + $80a860533b016003$var$connect.call(this, opts, (err, data)=>{ + return err ? reject(err) : resolve(data); + }); }); - return { - promise: promise, - resolve: res, - reject: rej - }; -} -function $362abbd5067a47fd$var$isAborted(fetchParams) { - return fetchParams.controller.state === "aborted"; -} -function $362abbd5067a47fd$var$isCancelled(fetchParams) { - return fetchParams.controller.state === "aborted" || fetchParams.controller.state === "terminated"; -} -const $362abbd5067a47fd$var$normalizeMethodRecord = { - delete: "DELETE", - DELETE: "DELETE", - get: "GET", - GET: "GET", - head: "HEAD", - HEAD: "HEAD", - options: "OPTIONS", - OPTIONS: "OPTIONS", - post: "POST", - POST: "POST", - put: "PUT", - PUT: "PUT" -}; -// Note: object prototypes should not be able to be referenced. e.g. `Object#hasOwnProperty`. -Object.setPrototypeOf($362abbd5067a47fd$var$normalizeMethodRecord, null); -/** - * @see https://fetch.spec.whatwg.org/#concept-method-normalize - * @param {string} method - */ function $362abbd5067a47fd$var$normalizeMethod(method) { - return $362abbd5067a47fd$var$normalizeMethodRecord[method.toLowerCase()] ?? method; -} -// https://infra.spec.whatwg.org/#serialize-a-javascript-value-to-a-json-string -function $362abbd5067a47fd$var$serializeJavascriptValueToJSONString(value) { - // 1. Let result be ? Call(%JSON.stringify%, undefined, « value »). - const result = JSON.stringify(value); - // 2. If result is undefined, then throw a TypeError. - if (result === undefined) throw new TypeError("Value is not JSON serializable"); - // 3. Assert: result is a string. - $g40fK$assert(typeof result === "string"); - // 4. Return result. - return result; -} -// https://tc39.es/ecma262/#sec-%25iteratorprototype%25-object -const $362abbd5067a47fd$var$esIteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())); -/** - * @see https://webidl.spec.whatwg.org/#dfn-iterator-prototype-object - * @param {() => unknown[]} iterator - * @param {string} name name of the instance - * @param {'key'|'value'|'key+value'} kind - */ function $362abbd5067a47fd$var$makeIterator(iterator, name, kind) { - const object = { - index: 0, - kind: kind, - target: iterator - }; - const i = { - next () { - // 1. Let interface be the interface for which the iterator prototype object exists. - // 2. Let thisValue be the this value. - // 3. Let object be ? ToObject(thisValue). - // 4. If object is a platform object, then perform a security - // check, passing: - // 5. If object is not a default iterator object for interface, - // then throw a TypeError. - if (Object.getPrototypeOf(this) !== i) throw new TypeError(`'next' called on an object that does not implement interface ${name} Iterator.`); - // 6. Let index be object’s index. - // 7. Let kind be object’s kind. - // 8. Let values be object’s target's value pairs to iterate over. - const { index: index, kind: kind, target: target } = object; - const values = target(); - // 9. Let len be the length of values. - const len = values.length; - // 10. If index is greater than or equal to len, then return - // CreateIterResultObject(undefined, true). - if (index >= len) return { - value: undefined, - done: true - }; - // 11. Let pair be the entry in values at index index. - const pair = values[index]; - // 12. Set object’s index to index + 1. - object.index = index + 1; - // 13. Return the iterator result for pair and kind. - return $362abbd5067a47fd$var$iteratorResult(pair, kind); - }, - // The class string of an iterator prototype object for a given interface is the - // result of concatenating the identifier of the interface and the string " Iterator". - [Symbol.toStringTag]: `${name} Iterator` - }; - // The [[Prototype]] internal slot of an iterator prototype object must be %IteratorPrototype%. - Object.setPrototypeOf(i, $362abbd5067a47fd$var$esIteratorPrototype); - // esIteratorPrototype needs to be the prototype of i - // which is the prototype of an empty object. Yes, it's confusing. - return Object.setPrototypeOf({}, i); -} -// https://webidl.spec.whatwg.org/#iterator-result -function $362abbd5067a47fd$var$iteratorResult(pair, kind) { - let result; - // 1. Let result be a value determined by the value of kind: - switch(kind){ - case "key": - // 1. Let idlKey be pair’s key. - // 2. Let key be the result of converting idlKey to an - // ECMAScript value. - // 3. result is key. - result = pair[0]; - break; - case "value": - // 1. Let idlValue be pair’s value. - // 2. Let value be the result of converting idlValue to - // an ECMAScript value. - // 3. result is value. - result = pair[1]; - break; - case "key+value": - // 1. Let idlKey be pair’s key. - // 2. Let idlValue be pair’s value. - // 3. Let key be the result of converting idlKey to an - // ECMAScript value. - // 4. Let value be the result of converting idlValue to - // an ECMAScript value. - // 5. Let array be ! ArrayCreate(2). - // 6. Call ! CreateDataProperty(array, "0", key). - // 7. Call ! CreateDataProperty(array, "1", value). - // 8. result is array. - result = pair; - break; - } - // 2. Return CreateIterResultObject(result, false). - return { - value: result, - done: false - }; -} -/** - * @see https://fetch.spec.whatwg.org/#body-fully-read - */ async function $362abbd5067a47fd$var$fullyReadBody(body, processBody, processBodyError) { - // 1. If taskDestination is null, then set taskDestination to - // the result of starting a new parallel queue. - // 2. Let successSteps given a byte sequence bytes be to queue a - // fetch task to run processBody given bytes, with taskDestination. - const successSteps = processBody; - // 3. Let errorSteps be to queue a fetch task to run processBodyError, - // with taskDestination. - const errorSteps = processBodyError; - // 4. Let reader be the result of getting a reader for body’s stream. - // If that threw an exception, then run errorSteps with that - // exception and return. - let reader; - try { - reader = body.stream.getReader(); - } catch (e) { - errorSteps(e); - return; - } - // 5. Read all bytes from reader, given successSteps and errorSteps. - try { - const result = await $362abbd5067a47fd$var$readAllBytes(reader); - successSteps(result); - } catch (e) { - errorSteps(e); - } -} -/** @type {ReadableStream} */ let $362abbd5067a47fd$var$ReadableStream = globalThis.ReadableStream; - -function $362abbd5067a47fd$var$isReadableStreamLike(stream) { - if (!$362abbd5067a47fd$var$ReadableStream) $362abbd5067a47fd$var$ReadableStream = $g40fK$streamweb.ReadableStream; - return stream instanceof $362abbd5067a47fd$var$ReadableStream || stream[Symbol.toStringTag] === "ReadableStream" && typeof stream.tee === "function"; -} -const $362abbd5067a47fd$var$MAXIMUM_ARGUMENT_LENGTH = 65535; -/** - * @see https://infra.spec.whatwg.org/#isomorphic-decode - * @param {number[]|Uint8Array} input - */ function $362abbd5067a47fd$var$isomorphicDecode(input) { - // 1. To isomorphic decode a byte sequence input, return a string whose code point - // length is equal to input’s length and whose code points have the same values - // as the values of input’s bytes, in the same order. - if (input.length < $362abbd5067a47fd$var$MAXIMUM_ARGUMENT_LENGTH) return String.fromCharCode(...input); - return input.reduce((previous, current)=>previous + String.fromCharCode(current), ""); -} -/** - * @param {ReadableStreamController} controller - */ function $362abbd5067a47fd$var$readableStreamClose(controller) { try { - controller.close(); + const connectHandler = new $80a860533b016003$var$ConnectHandler(opts, callback); + this.dispatch({ + ...opts, + method: 'CONNECT' + }, connectHandler); } catch (err) { - // TODO: add comment explaining why this error occurs. - if (!err.message.includes("Controller is already closed")) throw err; - } -} -/** - * @see https://infra.spec.whatwg.org/#isomorphic-encode - * @param {string} input - */ function $362abbd5067a47fd$var$isomorphicEncode(input) { - // 1. Assert: input contains no code points greater than U+00FF. - for(let i = 0; i < input.length; i++)$g40fK$assert(input.charCodeAt(i) <= 0xFF); - // 2. Return a byte sequence whose length is equal to input’s code - // point length and whose bytes have the same values as the - // values of input’s code points, in the same order - return input; -} -/** - * @see https://streams.spec.whatwg.org/#readablestreamdefaultreader-read-all-bytes - * @see https://streams.spec.whatwg.org/#read-loop - * @param {ReadableStreamDefaultReader} reader - */ async function $362abbd5067a47fd$var$readAllBytes(reader) { - const bytes = []; - let byteLength = 0; - while(true){ - const { done: done, value: chunk } = await reader.read(); - if (done) // 1. Call successSteps with bytes. - return Buffer.concat(bytes, byteLength); - // 1. If chunk is not a Uint8Array object, call failureSteps - // with a TypeError and abort these steps. - if (!$362abbd5067a47fd$require$isUint8Array(chunk)) throw new TypeError("Received non-Uint8Array chunk"); - // 2. Append the bytes represented by chunk to bytes. - bytes.push(chunk); - byteLength += chunk.length; - // 3. Read-loop given reader, bytes, successSteps, and failureSteps. + if (typeof callback !== 'function') throw err; + const opaque = opts?.opaque; + queueMicrotask(()=>callback(err, { + opaque: opaque + })); } } -/** - * @see https://fetch.spec.whatwg.org/#is-local - * @param {URL} url - */ function $362abbd5067a47fd$var$urlIsLocal(url) { - $g40fK$assert("protocol" in url) // ensure it's a url object - ; - const protocol = url.protocol; - return protocol === "about:" || protocol === "blob:" || protocol === "data:"; -} -/** - * @param {string|URL} url - */ function $362abbd5067a47fd$var$urlHasHttpsScheme(url) { - if (typeof url === "string") return url.startsWith("https:"); - return url.protocol === "https:"; -} -/** - * @see https://fetch.spec.whatwg.org/#http-scheme - * @param {URL} url - */ function $362abbd5067a47fd$var$urlIsHttpHttpsScheme(url) { - $g40fK$assert("protocol" in url) // ensure it's a url object - ; - const protocol = url.protocol; - return protocol === "http:" || protocol === "https:"; -} -/** - * Fetch supports node >= 16.8.0, but Object.hasOwn was added in v16.9.0. - */ const $362abbd5067a47fd$var$hasOwn = Object.hasOwn || ((dict, key)=>Object.prototype.hasOwnProperty.call(dict, key)); -module.exports = { - isAborted: $362abbd5067a47fd$var$isAborted, - isCancelled: $362abbd5067a47fd$var$isCancelled, - createDeferredPromise: $362abbd5067a47fd$var$createDeferredPromise, - ReadableStreamFrom: $362abbd5067a47fd$require$ReadableStreamFrom, - toUSVString: $362abbd5067a47fd$require$toUSVString, - tryUpgradeRequestToAPotentiallyTrustworthyURL: $362abbd5067a47fd$var$tryUpgradeRequestToAPotentiallyTrustworthyURL, - coarsenedSharedCurrentTime: $362abbd5067a47fd$var$coarsenedSharedCurrentTime, - determineRequestsReferrer: $362abbd5067a47fd$var$determineRequestsReferrer, - makePolicyContainer: $362abbd5067a47fd$var$makePolicyContainer, - clonePolicyContainer: $362abbd5067a47fd$var$clonePolicyContainer, - appendFetchMetadata: $362abbd5067a47fd$var$appendFetchMetadata, - appendRequestOriginHeader: $362abbd5067a47fd$var$appendRequestOriginHeader, - TAOCheck: $362abbd5067a47fd$var$TAOCheck, - corsCheck: $362abbd5067a47fd$var$corsCheck, - crossOriginResourcePolicyCheck: $362abbd5067a47fd$var$crossOriginResourcePolicyCheck, - createOpaqueTimingInfo: $362abbd5067a47fd$var$createOpaqueTimingInfo, - setRequestReferrerPolicyOnRedirect: $362abbd5067a47fd$var$setRequestReferrerPolicyOnRedirect, - isValidHTTPToken: $362abbd5067a47fd$var$isValidHTTPToken, - requestBadPort: $362abbd5067a47fd$var$requestBadPort, - requestCurrentURL: $362abbd5067a47fd$var$requestCurrentURL, - responseURL: $362abbd5067a47fd$var$responseURL, - responseLocationURL: $362abbd5067a47fd$var$responseLocationURL, - isBlobLike: $362abbd5067a47fd$require$isBlobLike, - isURLPotentiallyTrustworthy: $362abbd5067a47fd$var$isURLPotentiallyTrustworthy, - isValidReasonPhrase: $362abbd5067a47fd$var$isValidReasonPhrase, - sameOrigin: $362abbd5067a47fd$var$sameOrigin, - normalizeMethod: $362abbd5067a47fd$var$normalizeMethod, - serializeJavascriptValueToJSONString: $362abbd5067a47fd$var$serializeJavascriptValueToJSONString, - makeIterator: $362abbd5067a47fd$var$makeIterator, - isValidHeaderName: $362abbd5067a47fd$var$isValidHeaderName, - isValidHeaderValue: $362abbd5067a47fd$var$isValidHeaderValue, - hasOwn: $362abbd5067a47fd$var$hasOwn, - isErrorLike: $362abbd5067a47fd$var$isErrorLike, - fullyReadBody: $362abbd5067a47fd$var$fullyReadBody, - bytesMatch: $362abbd5067a47fd$var$bytesMatch, - isReadableStreamLike: $362abbd5067a47fd$var$isReadableStreamLike, - readableStreamClose: $362abbd5067a47fd$var$readableStreamClose, - isomorphicEncode: $362abbd5067a47fd$var$isomorphicEncode, - isomorphicDecode: $362abbd5067a47fd$var$isomorphicDecode, - urlIsLocal: $362abbd5067a47fd$var$urlIsLocal, - urlHasHttpsScheme: $362abbd5067a47fd$var$urlHasHttpsScheme, - urlIsHttpHttpsScheme: $362abbd5067a47fd$var$urlIsHttpHttpsScheme, - readAllBytes: $362abbd5067a47fd$var$readAllBytes, - normalizeMethodRecord: $362abbd5067a47fd$var$normalizeMethodRecord, - parseMetadata: $362abbd5067a47fd$var$parseMetadata -}; +module.exports = $80a860533b016003$var$connect; }); -parcelRegister("1ZCMb", function(module, exports) { -"use strict"; - -var $1739911586609fc0$require$MessageChannel = $g40fK$worker_threads.MessageChannel; -var $1739911586609fc0$require$receiveMessageOnPort = $g40fK$worker_threads.receiveMessageOnPort; -const $1739911586609fc0$var$corsSafeListedMethods = [ - "GET", - "HEAD", - "POST" -]; -const $1739911586609fc0$var$corsSafeListedMethodsSet = new Set($1739911586609fc0$var$corsSafeListedMethods); -const $1739911586609fc0$var$nullBodyStatus = [ - 101, - 204, - 205, - 304 -]; -const $1739911586609fc0$var$redirectStatus = [ - 301, - 302, - 303, - 307, - 308 -]; -const $1739911586609fc0$var$redirectStatusSet = new Set($1739911586609fc0$var$redirectStatus); -// https://fetch.spec.whatwg.org/#block-bad-port -const $1739911586609fc0$var$badPorts = [ - "1", - "7", - "9", - "11", - "13", - "15", - "17", - "19", - "20", - "21", - "22", - "23", - "25", - "37", - "42", - "43", - "53", - "69", - "77", - "79", - "87", - "95", - "101", - "102", - "103", - "104", - "109", - "110", - "111", - "113", - "115", - "117", - "119", - "123", - "135", - "137", - "139", - "143", - "161", - "179", - "389", - "427", - "465", - "512", - "513", - "514", - "515", - "526", - "530", - "531", - "532", - "540", - "548", - "554", - "556", - "563", - "587", - "601", - "636", - "989", - "990", - "993", - "995", - "1719", - "1720", - "1723", - "2049", - "3659", - "4045", - "5060", - "5061", - "6000", - "6566", - "6665", - "6666", - "6667", - "6668", - "6669", - "6697", - "10080" -]; -const $1739911586609fc0$var$badPortsSet = new Set($1739911586609fc0$var$badPorts); -// https://w3c.github.io/webappsec-referrer-policy/#referrer-policies -const $1739911586609fc0$var$referrerPolicy = [ - "", - "no-referrer", - "no-referrer-when-downgrade", - "same-origin", - "origin", - "strict-origin", - "origin-when-cross-origin", - "strict-origin-when-cross-origin", - "unsafe-url" -]; -const $1739911586609fc0$var$referrerPolicySet = new Set($1739911586609fc0$var$referrerPolicy); -const $1739911586609fc0$var$requestRedirect = [ - "follow", - "manual", - "error" -]; -const $1739911586609fc0$var$safeMethods = [ - "GET", - "HEAD", - "OPTIONS", - "TRACE" -]; -const $1739911586609fc0$var$safeMethodsSet = new Set($1739911586609fc0$var$safeMethods); -const $1739911586609fc0$var$requestMode = [ - "navigate", - "same-origin", - "no-cors", - "cors" -]; -const $1739911586609fc0$var$requestCredentials = [ - "omit", - "same-origin", - "include" -]; -const $1739911586609fc0$var$requestCache = [ - "default", - "no-store", - "reload", - "no-cache", - "force-cache", - "only-if-cached" -]; -// https://fetch.spec.whatwg.org/#request-body-header-name -const $1739911586609fc0$var$requestBodyHeader = [ - "content-encoding", - "content-language", - "content-location", - "content-type", - // See https://github.com/nodejs/undici/issues/2021 - // 'Content-Length' is a forbidden header name, which is typically - // removed in the Headers implementation. However, undici doesn't - // filter out headers, so we add it here. - "content-length" -]; -// https://fetch.spec.whatwg.org/#enumdef-requestduplex -const $1739911586609fc0$var$requestDuplex = [ - "half" -]; -// http://fetch.spec.whatwg.org/#forbidden-method -const $1739911586609fc0$var$forbiddenMethods = [ - "CONNECT", - "TRACE", - "TRACK" -]; -const $1739911586609fc0$var$forbiddenMethodsSet = new Set($1739911586609fc0$var$forbiddenMethods); -const $1739911586609fc0$var$subresource = [ - "audio", - "audioworklet", - "font", - "image", - "manifest", - "paintworklet", - "script", - "style", - "track", - "video", - "xslt", - "" -]; -const $1739911586609fc0$var$subresourceSet = new Set($1739911586609fc0$var$subresource); -/** @type {globalThis['DOMException']} */ const $1739911586609fc0$var$DOMException = globalThis.DOMException ?? (()=>{ - // DOMException was only made a global in Node v17.0.0, - // but fetch supports >= v16.8. - try { - atob("~"); - } catch (err) { - return Object.getPrototypeOf(err).constructor; - } -})(); -let $1739911586609fc0$var$channel; -/** @type {globalThis['structuredClone']} */ const $1739911586609fc0$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 structuredClone(value, options) { - if (arguments.length === 0) throw new TypeError("missing argument"); - if (!$1739911586609fc0$var$channel) $1739911586609fc0$var$channel = new $1739911586609fc0$require$MessageChannel(); - $1739911586609fc0$var$channel.port1.unref(); - $1739911586609fc0$var$channel.port2.unref(); - $1739911586609fc0$var$channel.port1.postMessage(value, options?.transfer); - return $1739911586609fc0$require$receiveMessageOnPort($1739911586609fc0$var$channel.port2).message; -}; -module.exports = { - DOMException: $1739911586609fc0$var$DOMException, - structuredClone: $1739911586609fc0$var$structuredClone, - subresource: $1739911586609fc0$var$subresource, - forbiddenMethods: $1739911586609fc0$var$forbiddenMethods, - requestBodyHeader: $1739911586609fc0$var$requestBodyHeader, - referrerPolicy: $1739911586609fc0$var$referrerPolicy, - requestRedirect: $1739911586609fc0$var$requestRedirect, - requestMode: $1739911586609fc0$var$requestMode, - requestCredentials: $1739911586609fc0$var$requestCredentials, - requestCache: $1739911586609fc0$var$requestCache, - redirectStatus: $1739911586609fc0$var$redirectStatus, - corsSafeListedMethods: $1739911586609fc0$var$corsSafeListedMethods, - nullBodyStatus: $1739911586609fc0$var$nullBodyStatus, - safeMethods: $1739911586609fc0$var$safeMethods, - badPorts: $1739911586609fc0$var$badPorts, - requestDuplex: $1739911586609fc0$var$requestDuplex, - subresourceSet: $1739911586609fc0$var$subresourceSet, - badPortsSet: $1739911586609fc0$var$badPortsSet, - redirectStatusSet: $1739911586609fc0$var$redirectStatusSet, - corsSafeListedMethodsSet: $1739911586609fc0$var$corsSafeListedMethodsSet, - safeMethodsSet: $1739911586609fc0$var$safeMethodsSet, - forbiddenMethodsSet: $1739911586609fc0$var$forbiddenMethodsSet, - referrerPolicySet: $1739911586609fc0$var$referrerPolicySet -}; -}); +parcelRegister("heVBK", function(module, exports) { +'use strict'; -parcelRegister("5pfdo", function(module, exports) { -"use strict"; -// In case of breaking changes, increase the version -// number to avoid conflicts. -const $3efb16ec1475ba0f$var$globalOrigin = Symbol.for("undici.globalOrigin.1"); -function $3efb16ec1475ba0f$var$getGlobalOrigin() { - return globalThis[$3efb16ec1475ba0f$var$globalOrigin]; -} -function $3efb16ec1475ba0f$var$setGlobalOrigin(newOrigin) { - if (newOrigin === undefined) { - Object.defineProperty(globalThis, $3efb16ec1475ba0f$var$globalOrigin, { - value: undefined, - writable: true, - enumerable: false, - configurable: false - }); - return; - } - const parsedURL = new URL(newOrigin); - if (parsedURL.protocol !== "http:" && parsedURL.protocol !== "https:") throw new TypeError(`Only http & https urls are allowed, received ${parsedURL.protocol}`); - Object.defineProperty(globalThis, $3efb16ec1475ba0f$var$globalOrigin, { - value: parsedURL, - writable: true, - enumerable: false, - configurable: false - }); -} -module.exports = { - getGlobalOrigin: $3efb16ec1475ba0f$var$getGlobalOrigin, - setGlobalOrigin: $3efb16ec1475ba0f$var$setGlobalOrigin +var $7URCa = parcelRequire("7URCa"); +module.exports = (opts)=>{ + const globalMaxRedirections = opts?.maxRedirections; + return (dispatch)=>{ + return function redirectInterceptor(opts, handler) { + const { maxRedirections: maxRedirections = globalMaxRedirections, ...baseOpts } = opts; + if (!maxRedirections) return dispatch(opts, handler); + const redirectHandler = new $7URCa(dispatch, maxRedirections, opts, handler); + return dispatch(baseOpts, redirectHandler); + }; + }; }; }); +parcelRegister("7URCa", function(module, exports) { +'use strict'; +var $bFRvW = parcelRequire("bFRvW"); -parcelRegister("40V0q", function(module, exports) { -"use strict"; - -var $4EkpM = parcelRequire("4EkpM"); -var $2ec361b326ba70b8$require$isBlobLike = $4EkpM.isBlobLike; -var $2ec361b326ba70b8$require$toUSVString = $4EkpM.toUSVString; -var $2ec361b326ba70b8$require$makeIterator = $4EkpM.makeIterator; +var $gNVEc = parcelRequire("gNVEc"); +var $5c375a158d74fd9a$require$kBodyUsed = $gNVEc.kBodyUsed; -var $74L4J = parcelRequire("74L4J"); -var $2ec361b326ba70b8$require$kState = $74L4J.kState; -var $ltaTH = parcelRequire("ltaTH"); -var $2ec361b326ba70b8$require$UndiciFile = $ltaTH.File; -var $2ec361b326ba70b8$require$FileLike = $ltaTH.FileLike; -var $2ec361b326ba70b8$require$isFileLike = $ltaTH.isFileLike; +var $gTXXK = parcelRequire("gTXXK"); +var $5c375a158d74fd9a$require$InvalidArgumentError = $gTXXK.InvalidArgumentError; -var $jk0LQ = parcelRequire("jk0LQ"); -var $2ec361b326ba70b8$require$webidl = $jk0LQ.webidl; - -var $2ec361b326ba70b8$require$Blob = $g40fK$buffer.Blob; -var $2ec361b326ba70b8$require$NativeFile = $g40fK$buffer.File; -/** @type {globalThis['File']} */ const $2ec361b326ba70b8$var$File = $2ec361b326ba70b8$require$NativeFile ?? $2ec361b326ba70b8$require$UndiciFile; -// https://xhr.spec.whatwg.org/#formdata -class $2ec361b326ba70b8$var$FormData { - constructor(form){ - if (form !== undefined) throw $2ec361b326ba70b8$require$webidl.errors.conversionFailed({ - prefix: "FormData constructor", - argument: "Argument 1", - types: [ - "undefined" - ] - }); - this[$2ec361b326ba70b8$require$kState] = []; - } - append(name, value, filename) { - $2ec361b326ba70b8$require$webidl.brandCheck(this, $2ec361b326ba70b8$var$FormData); - $2ec361b326ba70b8$require$webidl.argumentLengthCheck(arguments, 2, { - header: "FormData.append" - }); - if (arguments.length === 3 && !$2ec361b326ba70b8$require$isBlobLike(value)) throw new TypeError("Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'"); - // 1. Let value be value if given; otherwise blobValue. - name = $2ec361b326ba70b8$require$webidl.converters.USVString(name); - value = $2ec361b326ba70b8$require$isBlobLike(value) ? $2ec361b326ba70b8$require$webidl.converters.Blob(value, { - strict: false - }) : $2ec361b326ba70b8$require$webidl.converters.USVString(value); - filename = arguments.length === 3 ? $2ec361b326ba70b8$require$webidl.converters.USVString(filename) : undefined; - // 2. Let entry be the result of creating an entry with - // name, value, and filename if given. - const entry = $2ec361b326ba70b8$var$makeEntry(name, value, filename); - // 3. Append entry to this’s entry list. - this[$2ec361b326ba70b8$require$kState].push(entry); +const $5c375a158d74fd9a$var$redirectableStatusCodes = [ + 300, + 301, + 302, + 303, + 307, + 308 +]; +const $5c375a158d74fd9a$var$kBody = Symbol('body'); +class $5c375a158d74fd9a$var$BodyAsyncIterable { + constructor(body){ + this[$5c375a158d74fd9a$var$kBody] = body; + this[$5c375a158d74fd9a$require$kBodyUsed] = false; } - delete(name) { - $2ec361b326ba70b8$require$webidl.brandCheck(this, $2ec361b326ba70b8$var$FormData); - $2ec361b326ba70b8$require$webidl.argumentLengthCheck(arguments, 1, { - header: "FormData.delete" - }); - name = $2ec361b326ba70b8$require$webidl.converters.USVString(name); - // The delete(name) method steps are to remove all entries whose name - // is name from this’s entry list. - this[$2ec361b326ba70b8$require$kState] = this[$2ec361b326ba70b8$require$kState].filter((entry)=>entry.name !== name); + async *[Symbol.asyncIterator]() { + $in2sP$nodeassert(!this[$5c375a158d74fd9a$require$kBodyUsed], 'disturbed'); + this[$5c375a158d74fd9a$require$kBodyUsed] = true; + yield* this[$5c375a158d74fd9a$var$kBody]; } - get(name) { - $2ec361b326ba70b8$require$webidl.brandCheck(this, $2ec361b326ba70b8$var$FormData); - $2ec361b326ba70b8$require$webidl.argumentLengthCheck(arguments, 1, { - header: "FormData.get" - }); - name = $2ec361b326ba70b8$require$webidl.converters.USVString(name); - // 1. If there is no entry whose name is name in this’s entry list, - // then return null. - const idx = this[$2ec361b326ba70b8$require$kState].findIndex((entry)=>entry.name === name); - if (idx === -1) return null; - // 2. Return the value of the first entry whose name is name from - // this’s entry list. - return this[$2ec361b326ba70b8$require$kState][idx].value; +} +class $5c375a158d74fd9a$var$RedirectHandler { + constructor(dispatch, maxRedirections, opts, handler){ + if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) throw new $5c375a158d74fd9a$require$InvalidArgumentError('maxRedirections must be a positive number'); + $bFRvW.validateHandler(handler, opts.method, opts.upgrade); + this.dispatch = dispatch; + this.location = null; + this.abort = null; + this.opts = { + ...opts, + maxRedirections: 0 + } // opts must be a copy + ; + this.maxRedirections = maxRedirections; + this.handler = handler; + this.history = []; + this.redirectionLimitReached = false; + if ($bFRvW.isStream(this.opts.body)) { + // TODO (fix): Provide some way for the user to cache the file to e.g. /tmp + // so that it can be dispatched again? + // TODO (fix): Do we need 100-expect support to provide a way to do this properly? + if ($bFRvW.bodyLength(this.opts.body) === 0) this.opts.body.on('data', function() { + $in2sP$nodeassert(false); + }); + if (typeof this.opts.body.readableDidRead !== 'boolean') { + this.opts.body[$5c375a158d74fd9a$require$kBodyUsed] = false; + $in2sP$nodeevents.prototype.on.call(this.opts.body, 'data', function() { + this[$5c375a158d74fd9a$require$kBodyUsed] = true; + }); + } + } else if (this.opts.body && typeof this.opts.body.pipeTo === 'function') // TODO (fix): We can't access ReadableStream internal state + // to determine whether or not it has been disturbed. This is just + // a workaround. + this.opts.body = new $5c375a158d74fd9a$var$BodyAsyncIterable(this.opts.body); + else if (this.opts.body && typeof this.opts.body !== 'string' && !ArrayBuffer.isView(this.opts.body) && $bFRvW.isIterable(this.opts.body)) // TODO: Should we allow re-using iterable if !this.opts.idempotent + // or through some other flag? + this.opts.body = new $5c375a158d74fd9a$var$BodyAsyncIterable(this.opts.body); } - getAll(name) { - $2ec361b326ba70b8$require$webidl.brandCheck(this, $2ec361b326ba70b8$var$FormData); - $2ec361b326ba70b8$require$webidl.argumentLengthCheck(arguments, 1, { - header: "FormData.getAll" + onConnect(abort) { + this.abort = abort; + this.handler.onConnect(abort, { + history: this.history }); - name = $2ec361b326ba70b8$require$webidl.converters.USVString(name); - // 1. If there is no entry whose name is name in this’s entry list, - // then return the empty list. - // 2. Return the values of all entries whose name is name, in order, - // from this’s entry list. - return this[$2ec361b326ba70b8$require$kState].filter((entry)=>entry.name === name).map((entry)=>entry.value); } - has(name) { - $2ec361b326ba70b8$require$webidl.brandCheck(this, $2ec361b326ba70b8$var$FormData); - $2ec361b326ba70b8$require$webidl.argumentLengthCheck(arguments, 1, { - header: "FormData.has" - }); - name = $2ec361b326ba70b8$require$webidl.converters.USVString(name); - // The has(name) method steps are to return true if there is an entry - // whose name is name in this’s entry list; otherwise false. - return this[$2ec361b326ba70b8$require$kState].findIndex((entry)=>entry.name === name) !== -1; + onUpgrade(statusCode, headers, socket) { + this.handler.onUpgrade(statusCode, headers, socket); } - set(name, value, filename) { - $2ec361b326ba70b8$require$webidl.brandCheck(this, $2ec361b326ba70b8$var$FormData); - $2ec361b326ba70b8$require$webidl.argumentLengthCheck(arguments, 2, { - header: "FormData.set" - }); - if (arguments.length === 3 && !$2ec361b326ba70b8$require$isBlobLike(value)) throw new TypeError("Failed to execute 'set' on 'FormData': parameter 2 is not of type 'Blob'"); - // The set(name, value) and set(name, blobValue, filename) method steps - // are: - // 1. Let value be value if given; otherwise blobValue. - name = $2ec361b326ba70b8$require$webidl.converters.USVString(name); - value = $2ec361b326ba70b8$require$isBlobLike(value) ? $2ec361b326ba70b8$require$webidl.converters.Blob(value, { - strict: false - }) : $2ec361b326ba70b8$require$webidl.converters.USVString(value); - filename = arguments.length === 3 ? $2ec361b326ba70b8$require$toUSVString(filename) : undefined; - // 2. Let entry be the result of creating an entry with name, value, and - // filename if given. - const entry = $2ec361b326ba70b8$var$makeEntry(name, value, filename); - // 3. If there are entries in this’s entry list whose name is name, then - // replace the first such entry with entry and remove the others. - const idx = this[$2ec361b326ba70b8$require$kState].findIndex((entry)=>entry.name === name); - if (idx !== -1) this[$2ec361b326ba70b8$require$kState] = [ - ...this[$2ec361b326ba70b8$require$kState].slice(0, idx), - entry, - ...this[$2ec361b326ba70b8$require$kState].slice(idx + 1).filter((entry)=>entry.name !== name) - ]; - else // 4. Otherwise, append entry to this’s entry list. - this[$2ec361b326ba70b8$require$kState].push(entry); - } - entries() { - $2ec361b326ba70b8$require$webidl.brandCheck(this, $2ec361b326ba70b8$var$FormData); - return $2ec361b326ba70b8$require$makeIterator(()=>this[$2ec361b326ba70b8$require$kState].map((pair)=>[ - pair.name, - pair.value - ]), "FormData", "key+value"); - } - keys() { - $2ec361b326ba70b8$require$webidl.brandCheck(this, $2ec361b326ba70b8$var$FormData); - return $2ec361b326ba70b8$require$makeIterator(()=>this[$2ec361b326ba70b8$require$kState].map((pair)=>[ - pair.name, - pair.value - ]), "FormData", "key"); - } - values() { - $2ec361b326ba70b8$require$webidl.brandCheck(this, $2ec361b326ba70b8$var$FormData); - return $2ec361b326ba70b8$require$makeIterator(()=>this[$2ec361b326ba70b8$require$kState].map((pair)=>[ - pair.name, - pair.value - ]), "FormData", "value"); + onError(error) { + this.handler.onError(error); } - /** - * @param {(value: string, key: string, self: FormData) => void} callbackFn - * @param {unknown} thisArg - */ forEach(callbackFn, thisArg = globalThis) { - $2ec361b326ba70b8$require$webidl.brandCheck(this, $2ec361b326ba70b8$var$FormData); - $2ec361b326ba70b8$require$webidl.argumentLengthCheck(arguments, 1, { - header: "FormData.forEach" - }); - if (typeof callbackFn !== "function") throw new TypeError("Failed to execute 'forEach' on 'FormData': parameter 1 is not of type 'Function'."); - for (const [key, value] of this)callbackFn.apply(thisArg, [ - value, - key, - this - ]); + onHeaders(statusCode, headers, resume, statusText) { + this.location = this.history.length >= this.maxRedirections || $bFRvW.isDisturbed(this.opts.body) ? null : $5c375a158d74fd9a$var$parseLocation(statusCode, headers); + if (this.opts.throwOnMaxRedirect && this.history.length >= this.maxRedirections) { + if (this.request) this.request.abort(new Error('max redirects')); + this.redirectionLimitReached = true; + this.abort(new Error('max redirects')); + return; + } + if (this.opts.origin) this.history.push(new URL(this.opts.path, this.opts.origin)); + if (!this.location) return this.handler.onHeaders(statusCode, headers, resume, statusText); + const { origin: origin, pathname: pathname, search: search } = $bFRvW.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin))); + const path = search ? `${pathname}${search}` : pathname; + // Remove headers referring to the original URL. + // By default it is Host only, unless it's a 303 (see below), which removes also all Content-* headers. + // https://tools.ietf.org/html/rfc7231#section-6.4 + this.opts.headers = $5c375a158d74fd9a$var$cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin); + this.opts.path = path; + this.opts.origin = origin; + this.opts.maxRedirections = 0; + this.opts.query = null; + // https://tools.ietf.org/html/rfc7231#section-6.4.4 + // In case of HTTP 303, always replace method to be either HEAD or GET + if (statusCode === 303 && this.opts.method !== 'HEAD') { + this.opts.method = 'GET'; + this.opts.body = null; + } + } + onData(chunk) { + if (this.location) ; + else return this.handler.onData(chunk); + } + onComplete(trailers) { + if (this.location) { + /* + https://tools.ietf.org/html/rfc7231#section-6.4 + + TLDR: undici always ignores 3xx response trailers as they are not expected in case of redirections + and neither are useful if present. + + See comment on onData method above for more detailed information. + */ this.location = null; + this.abort = null; + this.dispatch(this.opts, this); + } else this.handler.onComplete(trailers); + } + onBodySent(chunk) { + if (this.handler.onBodySent) this.handler.onBodySent(chunk); } } -$2ec361b326ba70b8$var$FormData.prototype[Symbol.iterator] = $2ec361b326ba70b8$var$FormData.prototype.entries; -Object.defineProperties($2ec361b326ba70b8$var$FormData.prototype, { - [Symbol.toStringTag]: { - value: "FormData", - configurable: true +function $5c375a158d74fd9a$var$parseLocation(statusCode, headers) { + if ($5c375a158d74fd9a$var$redirectableStatusCodes.indexOf(statusCode) === -1) return null; + for(let i = 0; i < headers.length; i += 2){ + if (headers[i].length === 8 && $bFRvW.headerNameToString(headers[i]) === 'location') return headers[i + 1]; } -}); -/** - * @see https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#create-an-entry - * @param {string} name - * @param {string|Blob} value - * @param {?string} filename - * @returns - */ function $2ec361b326ba70b8$var$makeEntry(name, value, filename) { - // 1. Set name to the result of converting name into a scalar value string. - // "To convert a string into a scalar value string, replace any surrogates - // with U+FFFD." - // see: https://nodejs.org/dist/latest-v18.x/docs/api/buffer.html#buftostringencoding-start-end - name = Buffer.from(name).toString("utf8"); - // 2. If value is a string, then set value to the result of converting - // value into a scalar value string. - if (typeof value === "string") value = Buffer.from(value).toString("utf8"); - else { - // 3. Otherwise: - // 1. If value is not a File object, then set value to a new File object, - // representing the same bytes, whose name attribute value is "blob" - if (!$2ec361b326ba70b8$require$isFileLike(value)) value = value instanceof $2ec361b326ba70b8$require$Blob ? new $2ec361b326ba70b8$var$File([ - value - ], "blob", { - type: value.type - }) : new $2ec361b326ba70b8$require$FileLike(value, "blob", { - type: value.type - }); - // 2. If filename is given, then set value to a new File object, - // representing the same bytes, whose name attribute is filename. - if (filename !== undefined) { - /** @type {FilePropertyBag} */ const options = { - type: value.type, - lastModified: value.lastModified - }; - value = $2ec361b326ba70b8$require$NativeFile && value instanceof $2ec361b326ba70b8$require$NativeFile || value instanceof $2ec361b326ba70b8$require$UndiciFile ? new $2ec361b326ba70b8$var$File([ - value - ], filename, options) : new $2ec361b326ba70b8$require$FileLike(value, filename, options); - } +} +// https://tools.ietf.org/html/rfc7231#section-6.4.4 +function $5c375a158d74fd9a$var$shouldRemoveHeader(header, removeContent, unknownOrigin) { + if (header.length === 4) return $bFRvW.headerNameToString(header) === 'host'; + if (removeContent && $bFRvW.headerNameToString(header).startsWith('content-')) return true; + if (unknownOrigin && (header.length === 13 || header.length === 6 || header.length === 19)) { + const name = $bFRvW.headerNameToString(header); + return name === 'authorization' || name === 'cookie' || name === 'proxy-authorization'; } - // 4. Return an entry whose name is name and whose value is value. - return { - name: name, - value: value - }; + return false; } -module.exports = { - FormData: $2ec361b326ba70b8$var$FormData -}; - -}); -parcelRegister("74L4J", function(module, exports) { -"use strict"; -module.exports = { - kUrl: Symbol("url"), - kHeaders: Symbol("headers"), - kSignal: Symbol("signal"), - kState: Symbol("state"), - kGuard: Symbol("guard"), - kRealm: Symbol("realm") -}; +// https://tools.ietf.org/html/rfc7231#section-6.4 +function $5c375a158d74fd9a$var$cleanRequestHeaders(headers, removeContent, unknownOrigin) { + const ret = []; + if (Array.isArray(headers)) { + for(let i = 0; i < headers.length; i += 2)if (!$5c375a158d74fd9a$var$shouldRemoveHeader(headers[i], removeContent, unknownOrigin)) ret.push(headers[i], headers[i + 1]); + } else if (headers && typeof headers === 'object') { + for (const key of Object.keys(headers))if (!$5c375a158d74fd9a$var$shouldRemoveHeader(key, removeContent, unknownOrigin)) ret.push(key, headers[key]); + } else $in2sP$nodeassert(headers == null, 'headers must be an object or an array'); + return ret; +} +module.exports = $5c375a158d74fd9a$var$RedirectHandler; }); -parcelRegister("ltaTH", function(module, exports) { -"use strict"; -var $fa14c264fa984900$require$Blob = $g40fK$buffer.Blob; -var $fa14c264fa984900$require$NativeFile = $g40fK$buffer.File; +parcelRegister("2Xtjy", function(module, exports) { +'use strict'; -var $fa14c264fa984900$require$types = $g40fK$util.types; +var $igYNQ = parcelRequire("igYNQ"); +module.exports = (globalOpts)=>{ + return (dispatch)=>{ + return function retryInterceptor(opts, handler) { + return dispatch(opts, new $igYNQ({ + ...opts, + retryOptions: { + ...globalOpts, + ...opts.retryOptions + } + }, { + handler: handler, + dispatch: dispatch + })); + }; + }; +}; -var $74L4J = parcelRequire("74L4J"); -var $fa14c264fa984900$require$kState = $74L4J.kState; +}); +parcelRegister("igYNQ", function(module, exports) { +'use strict'; -var $4EkpM = parcelRequire("4EkpM"); -var $fa14c264fa984900$require$isBlobLike = $4EkpM.isBlobLike; -var $jk0LQ = parcelRequire("jk0LQ"); -var $fa14c264fa984900$require$webidl = $jk0LQ.webidl; +var $gNVEc = parcelRequire("gNVEc"); +var $d4d8e2d10836423f$require$kRetryHandlerDefaultRetry = $gNVEc.kRetryHandlerDefaultRetry; -var $bNorT = parcelRequire("bNorT"); -var $fa14c264fa984900$require$parseMIMEType = $bNorT.parseMIMEType; -var $fa14c264fa984900$require$serializeAMimeType = $bNorT.serializeAMimeType; +var $gTXXK = parcelRequire("gTXXK"); +var $d4d8e2d10836423f$require$RequestRetryError = $gTXXK.RequestRetryError; -var $gv2nV = parcelRequire("gv2nV"); -var $fa14c264fa984900$require$kEnumerableProperty = $gv2nV.kEnumerableProperty; -const $fa14c264fa984900$var$encoder = new TextEncoder(); -class $fa14c264fa984900$var$File extends $fa14c264fa984900$require$Blob { - constructor(fileBits, fileName, options = {}){ - // The File constructor is invoked with two or three parameters, depending - // on whether the optional dictionary parameter is used. When the File() - // constructor is invoked, user agents must run the following steps: - $fa14c264fa984900$require$webidl.argumentLengthCheck(arguments, 2, { - header: "File constructor" - }); - fileBits = $fa14c264fa984900$require$webidl.converters["sequence"](fileBits); - fileName = $fa14c264fa984900$require$webidl.converters.USVString(fileName); - options = $fa14c264fa984900$require$webidl.converters.FilePropertyBag(options); - // 1. Let bytes be the result of processing blob parts given fileBits and - // options. - // Note: Blob handles this for us - // 2. Let n be the fileName argument to the constructor. - const n = fileName; - // 3. Process FilePropertyBag dictionary argument by running the following - // substeps: - // 1. If the type member is provided and is not the empty string, let t - // be set to the type dictionary member. If t contains any characters - // outside the range U+0020 to U+007E, then set t to the empty string - // and return from these substeps. - // 2. Convert every character in t to ASCII lowercase. - let t = options.type; - let d; - // eslint-disable-next-line no-labels - substep: { - if (t) { - t = $fa14c264fa984900$require$parseMIMEType(t); - if (t === "failure") { - t = ""; - break substep; - } - t = $fa14c264fa984900$require$serializeAMimeType(t).toLowerCase(); - } - // 3. If the lastModified member is provided, let d be set to the - // lastModified dictionary member. If it is not provided, set d to the - // current date and time represented as the number of milliseconds since - // the Unix Epoch (which is the equivalent of Date.now() [ECMA-262]). - d = options.lastModified; +var $bFRvW = parcelRequire("bFRvW"); +var $d4d8e2d10836423f$require$isDisturbed = $bFRvW.isDisturbed; +var $d4d8e2d10836423f$require$parseHeaders = $bFRvW.parseHeaders; +var $d4d8e2d10836423f$require$parseRangeHeader = $bFRvW.parseRangeHeader; +var $d4d8e2d10836423f$require$wrapRequestBody = $bFRvW.wrapRequestBody; +function $d4d8e2d10836423f$var$calculateRetryAfterHeader(retryAfter) { + const current = Date.now(); + return new Date(retryAfter).getTime() - current; +} +function $d4d8e2d10836423f$var$validatePartialResponseContentLength(headers, range, statusCode, retryCount) { + const contentLength = headers['content-length']; + if (contentLength == null) return null; + if (!Number.isFinite(range.start) || !Number.isFinite(range.end)) return null; + const length = Number(contentLength); + const expectedLength = range.end - range.start + 1; + if (!Number.isFinite(length) || length !== expectedLength) return new $d4d8e2d10836423f$require$RequestRetryError('Content-Length mismatch', statusCode, { + headers: headers, + data: { + count: retryCount } - // 4. Return a new File object F such that: - // F refers to the bytes byte sequence. - // F.size is set to the number of total bytes in bytes. - // F.name is set to n. - // F.type is set to t. - // F.lastModified is set to d. - super($fa14c264fa984900$var$processBlobParts(fileBits, options), { - type: t - }); - this[$fa14c264fa984900$require$kState] = { - name: n, - lastModified: d, - type: t + }); + return null; +} +class $d4d8e2d10836423f$var$RetryHandler { + constructor(opts, handlers){ + const { retryOptions: retryOptions, ...dispatchOpts } = opts; + const { // Retry scoped + retry: retryFn, maxRetries: maxRetries, maxTimeout: maxTimeout, minTimeout: minTimeout, timeoutFactor: timeoutFactor, methods: // Response scoped + methods, errorCodes: errorCodes, retryAfter: retryAfter, statusCodes: statusCodes } = retryOptions ?? {}; + this.dispatch = handlers.dispatch; + this.handler = handlers.handler; + this.opts = { + ...dispatchOpts, + body: $d4d8e2d10836423f$require$wrapRequestBody(opts.body) + }; + this.abort = null; + this.aborted = false; + this.retryOpts = { + retry: retryFn ?? $d4d8e2d10836423f$var$RetryHandler[$d4d8e2d10836423f$require$kRetryHandlerDefaultRetry], + retryAfter: retryAfter ?? true, + maxTimeout: maxTimeout ?? 30000, + minTimeout: minTimeout ?? 500, + timeoutFactor: timeoutFactor ?? 2, + maxRetries: maxRetries ?? 5, + // What errors we should retry + methods: methods ?? [ + 'GET', + 'HEAD', + 'OPTIONS', + 'PUT', + 'DELETE', + 'TRACE' + ], + // Indicates which errors to retry + statusCodes: statusCodes ?? [ + 500, + 502, + 503, + 504, + 429 + ], + // List of errors to retry + errorCodes: errorCodes ?? [ + 'ECONNRESET', + 'ECONNREFUSED', + 'ENOTFOUND', + 'ENETDOWN', + 'ENETUNREACH', + 'EHOSTDOWN', + 'EHOSTUNREACH', + 'EPIPE', + 'UND_ERR_SOCKET' + ] }; + this.retryCount = 0; + this.retryCountCheckpoint = 0; + this.start = 0; + this.end = null; + this.etag = null; + this.resume = null; + // Handle possible onConnect duplication + this.handler.onConnect((reason)=>{ + this.aborted = true; + if (this.abort) this.abort(reason); + else this.reason = reason; + }); } - get name() { - $fa14c264fa984900$require$webidl.brandCheck(this, $fa14c264fa984900$var$File); - return this[$fa14c264fa984900$require$kState].name; + onRequestSent() { + if (this.handler.onRequestSent) this.handler.onRequestSent(); } - get lastModified() { - $fa14c264fa984900$require$webidl.brandCheck(this, $fa14c264fa984900$var$File); - return this[$fa14c264fa984900$require$kState].lastModified; + onUpgrade(statusCode, headers, socket) { + if (this.handler.onUpgrade) this.handler.onUpgrade(statusCode, headers, socket); } - get type() { - $fa14c264fa984900$require$webidl.brandCheck(this, $fa14c264fa984900$var$File); - return this[$fa14c264fa984900$require$kState].type; + onConnect(abort) { + if (this.aborted) abort(this.reason); + else this.abort = abort; } -} -class $fa14c264fa984900$var$FileLike { - constructor(blobLike, fileName, options = {}){ - // TODO: argument idl type check - // The File constructor is invoked with two or three parameters, depending - // on whether the optional dictionary parameter is used. When the File() - // constructor is invoked, user agents must run the following steps: - // 1. Let bytes be the result of processing blob parts given fileBits and - // options. - // 2. Let n be the fileName argument to the constructor. - const n = fileName; - // 3. Process FilePropertyBag dictionary argument by running the following - // substeps: - // 1. If the type member is provided and is not the empty string, let t - // be set to the type dictionary member. If t contains any characters - // outside the range U+0020 to U+007E, then set t to the empty string - // and return from these substeps. - // TODO - const t = options.type; - // 2. Convert every character in t to ASCII lowercase. - // TODO - // 3. If the lastModified member is provided, let d be set to the - // lastModified dictionary member. If it is not provided, set d to the - // current date and time represented as the number of milliseconds since - // the Unix Epoch (which is the equivalent of Date.now() [ECMA-262]). - const d = options.lastModified ?? Date.now(); - // 4. Return a new File object F such that: - // F refers to the bytes byte sequence. - // F.size is set to the number of total bytes in bytes. - // F.name is set to n. - // F.type is set to t. - // F.lastModified is set to d. - this[$fa14c264fa984900$require$kState] = { - blobLike: blobLike, - name: n, - type: t, - lastModified: d - }; + onBodySent(chunk) { + if (this.handler.onBodySent) return this.handler.onBodySent(chunk); } - stream(...args) { - $fa14c264fa984900$require$webidl.brandCheck(this, $fa14c264fa984900$var$FileLike); - return this[$fa14c264fa984900$require$kState].blobLike.stream(...args); + static [$d4d8e2d10836423f$require$kRetryHandlerDefaultRetry](err, { state: state, opts: opts }, cb) { + const { statusCode: statusCode, code: code, headers: headers } = err; + const { method: method, retryOptions: retryOptions } = opts; + const { maxRetries: maxRetries, minTimeout: minTimeout, maxTimeout: maxTimeout, timeoutFactor: timeoutFactor, statusCodes: statusCodes, errorCodes: errorCodes, methods: methods } = retryOptions; + const { counter: counter } = state; + // Any code that is not a Undici's originated and allowed to retry + if (code && code !== 'UND_ERR_REQ_RETRY' && !errorCodes.includes(code)) { + cb(err); + return; + } + // If a set of method are provided and the current method is not in the list + if (Array.isArray(methods) && !methods.includes(method)) { + cb(err); + return; + } + // If a set of status code are provided and the current status code is not in the list + if (statusCode != null && Array.isArray(statusCodes) && !statusCodes.includes(statusCode)) { + cb(err); + return; + } + // If we reached the max number of retries + if (counter > maxRetries) { + cb(err); + return; + } + let retryAfterHeader = headers?.['retry-after']; + if (retryAfterHeader) { + retryAfterHeader = Number(retryAfterHeader); + retryAfterHeader = Number.isNaN(retryAfterHeader) ? $d4d8e2d10836423f$var$calculateRetryAfterHeader(retryAfterHeader) : retryAfterHeader * 1e3 // Retry-After is in seconds + ; + } + const retryTimeout = retryAfterHeader > 0 ? Math.min(retryAfterHeader, maxTimeout) : Math.min(minTimeout * timeoutFactor ** (counter - 1), maxTimeout); + setTimeout(()=>cb(null), retryTimeout); } - arrayBuffer(...args) { - $fa14c264fa984900$require$webidl.brandCheck(this, $fa14c264fa984900$var$FileLike); - return this[$fa14c264fa984900$require$kState].blobLike.arrayBuffer(...args); + onHeaders(statusCode, rawHeaders, resume, statusMessage) { + const headers = $d4d8e2d10836423f$require$parseHeaders(rawHeaders); + this.retryCount += 1; + if (statusCode >= 300) { + if (this.retryOpts.statusCodes.includes(statusCode) === false) return this.handler.onHeaders(statusCode, rawHeaders, resume, statusMessage); + else { + this.abort(new $d4d8e2d10836423f$require$RequestRetryError('Request failed', statusCode, { + headers: headers, + data: { + count: this.retryCount + } + })); + return false; + } + } + // Checkpoint for resume from where we left it + if (this.resume != null) { + this.resume = null; + // Only Partial Content 206 supposed to provide Content-Range, + // any other status code that partially consumed the payload + // should not be retry because it would result in downstream + // wrongly concatanete multiple responses. + if (statusCode !== 206 && (this.start > 0 || statusCode !== 200)) { + this.abort(new $d4d8e2d10836423f$require$RequestRetryError('server does not support the range header and the payload was partially consumed', statusCode, { + headers: headers, + data: { + count: this.retryCount + } + })); + return false; + } + const contentRange = $d4d8e2d10836423f$require$parseRangeHeader(headers['content-range']); + // If no content range + if (!contentRange) { + this.abort(new $d4d8e2d10836423f$require$RequestRetryError('Content-Range mismatch', statusCode, { + headers: headers, + data: { + count: this.retryCount + } + })); + return false; + } + // Let's start with a weak etag check + if (this.etag != null && this.etag !== headers.etag) { + this.abort(new $d4d8e2d10836423f$require$RequestRetryError('ETag mismatch', statusCode, { + headers: headers, + data: { + count: this.retryCount + } + })); + return false; + } + const contentLengthError = $d4d8e2d10836423f$var$validatePartialResponseContentLength(headers, contentRange, statusCode, this.retryCount); + if (contentLengthError != null) { + this.abort(contentLengthError); + return false; + } + const { start: start, size: size, end: end = size - 1 } = contentRange; + $in2sP$nodeassert(this.start === start, 'content-range mismatch'); + $in2sP$nodeassert(this.end == null || this.end === end, 'content-range mismatch'); + this.resume = resume; + return true; + } + if (this.end == null) { + if (statusCode === 206) { + // First time we receive 206 + const range = $d4d8e2d10836423f$require$parseRangeHeader(headers['content-range']); + if (range == null) return this.handler.onHeaders(statusCode, rawHeaders, resume, statusMessage); + const contentLengthError = $d4d8e2d10836423f$var$validatePartialResponseContentLength(headers, range, statusCode, this.retryCount); + if (contentLengthError != null) { + this.abort(contentLengthError); + return false; + } + const { start: start, size: size, end: end = size - 1 } = range; + $in2sP$nodeassert(start != null && Number.isFinite(start), 'content-range mismatch'); + $in2sP$nodeassert(end != null && Number.isFinite(end), 'invalid content-length'); + this.start = start; + this.end = end; + } + // We make our best to checkpoint the body for further range headers + if (this.end == null) { + const contentLength = headers['content-length']; + this.end = contentLength != null ? Number(contentLength) - 1 : null; + } + $in2sP$nodeassert(Number.isFinite(this.start)); + $in2sP$nodeassert(this.end == null || Number.isFinite(this.end), 'invalid content-length'); + this.resume = resume; + this.etag = headers.etag != null ? headers.etag : null; + // Weak etags are not useful for comparison nor cache + // for instance not safe to assume if the response is byte-per-byte + // equal + if (this.etag != null && this.etag.startsWith('W/')) this.etag = null; + return this.handler.onHeaders(statusCode, rawHeaders, resume, statusMessage); + } + const err = new $d4d8e2d10836423f$require$RequestRetryError('Request failed', statusCode, { + headers: headers, + data: { + count: this.retryCount + } + }); + this.abort(err); + return false; } - slice(...args) { - $fa14c264fa984900$require$webidl.brandCheck(this, $fa14c264fa984900$var$FileLike); - return this[$fa14c264fa984900$require$kState].blobLike.slice(...args); + onData(chunk) { + this.start += chunk.length; + return this.handler.onData(chunk); } - text(...args) { - $fa14c264fa984900$require$webidl.brandCheck(this, $fa14c264fa984900$var$FileLike); - return this[$fa14c264fa984900$require$kState].blobLike.text(...args); + onComplete(rawTrailers) { + this.retryCount = 0; + return this.handler.onComplete(rawTrailers); } - get size() { - $fa14c264fa984900$require$webidl.brandCheck(this, $fa14c264fa984900$var$FileLike); - return this[$fa14c264fa984900$require$kState].blobLike.size; + onError(err) { + if (this.aborted || $d4d8e2d10836423f$require$isDisturbed(this.opts.body)) return this.handler.onError(err); + // We reconcile in case of a mix between network errors + // and server error response + if (this.retryCount - this.retryCountCheckpoint > 0) // We count the difference between the last checkpoint and the current retry count + this.retryCount = this.retryCountCheckpoint + (this.retryCount - this.retryCountCheckpoint); + else this.retryCount += 1; + this.retryOpts.retry(err, { + state: { + counter: this.retryCount + }, + opts: { + retryOptions: this.retryOpts, + ...this.opts + } + }, onRetry.bind(this)); + function onRetry(err) { + if (err != null || this.aborted || $d4d8e2d10836423f$require$isDisturbed(this.opts.body)) return this.handler.onError(err); + if (this.start !== 0) { + const headers = { + range: `bytes=${this.start}-${this.end ?? ''}` + }; + // Weak etag check - weak etags will make comparison algorithms never match + if (this.etag != null) headers['if-match'] = this.etag; + this.opts = { + ...this.opts, + headers: { + ...this.opts.headers, + ...headers + } + }; + } + try { + this.retryCountCheckpoint = this.retryCount; + this.dispatch(this.opts, this); + } catch (err) { + this.handler.onError(err); + } + } } - get type() { - $fa14c264fa984900$require$webidl.brandCheck(this, $fa14c264fa984900$var$FileLike); - return this[$fa14c264fa984900$require$kState].blobLike.type; +} +module.exports = $d4d8e2d10836423f$var$RetryHandler; + +}); + + +parcelRegister("ENkFU", function(module, exports) { +'use strict'; + +var $bFRvW = parcelRequire("bFRvW"); + +var $gTXXK = parcelRequire("gTXXK"); +var $07aa00f13567149f$require$InvalidArgumentError = $gTXXK.InvalidArgumentError; +var $07aa00f13567149f$require$RequestAbortedError = $gTXXK.RequestAbortedError; + +var $4suPr = parcelRequire("4suPr"); +class $07aa00f13567149f$var$DumpHandler extends $4suPr { + #maxSize = 1048576; + #abort = null; + #dumped = false; + #aborted = false; + #size = 0; + #reason = null; + #handler = null; + constructor({ maxSize: maxSize }, handler){ + super(handler); + if (maxSize != null && (!Number.isFinite(maxSize) || maxSize < 1)) throw new $07aa00f13567149f$require$InvalidArgumentError('maxSize must be a number greater than 0'); + this.#maxSize = maxSize ?? this.#maxSize; + this.#handler = handler; } - get name() { - $fa14c264fa984900$require$webidl.brandCheck(this, $fa14c264fa984900$var$FileLike); - return this[$fa14c264fa984900$require$kState].name; + onConnect(abort) { + this.#abort = abort; + this.#handler.onConnect(this.#customAbort.bind(this)); } - get lastModified() { - $fa14c264fa984900$require$webidl.brandCheck(this, $fa14c264fa984900$var$FileLike); - return this[$fa14c264fa984900$require$kState].lastModified; + #customAbort(reason) { + this.#aborted = true; + this.#reason = reason; } - get [Symbol.toStringTag]() { - return "File"; + // TODO: will require adjustment after new hooks are out + onHeaders(statusCode, rawHeaders, resume, statusMessage) { + const headers = $bFRvW.parseHeaders(rawHeaders); + const contentLength = headers['content-length']; + if (contentLength != null && contentLength > this.#maxSize) throw new $07aa00f13567149f$require$RequestAbortedError(`Response size (${contentLength}) larger than maxSize (${this.#maxSize})`); + if (this.#aborted) return true; + return this.#handler.onHeaders(statusCode, rawHeaders, resume, statusMessage); + } + onError(err) { + if (this.#dumped) return; + err = this.#reason ?? err; + this.#handler.onError(err); + } + onData(chunk) { + this.#size = this.#size + chunk.length; + if (this.#size >= this.#maxSize) { + this.#dumped = true; + if (this.#aborted) this.#handler.onError(this.#reason); + else this.#handler.onComplete([]); + } + return true; + } + onComplete(trailers) { + if (this.#dumped) return; + if (this.#aborted) { + this.#handler.onError(this.reason); + return; + } + this.#handler.onComplete(trailers); } } -Object.defineProperties($fa14c264fa984900$var$File.prototype, { - [Symbol.toStringTag]: { - value: "File", - configurable: true - }, - name: $fa14c264fa984900$require$kEnumerableProperty, - lastModified: $fa14c264fa984900$require$kEnumerableProperty +function $07aa00f13567149f$var$createDumpInterceptor({ maxSize: defaultMaxSize } = { + maxSize: 1048576 +}) { + return (dispatch)=>{ + return function Intercept(opts, handler) { + const { dumpMaxSize: dumpMaxSize = defaultMaxSize } = opts; + const dumpHandler = new $07aa00f13567149f$var$DumpHandler({ + maxSize: dumpMaxSize + }, handler); + return dispatch(opts, dumpHandler); + }; + }; +} +module.exports = $07aa00f13567149f$var$createDumpInterceptor; + }); -$fa14c264fa984900$require$webidl.converters.Blob = $fa14c264fa984900$require$webidl.interfaceConverter($fa14c264fa984900$require$Blob); -$fa14c264fa984900$require$webidl.converters.BlobPart = function(V, opts) { - if ($fa14c264fa984900$require$webidl.util.Type(V) === "Object") { - if ($fa14c264fa984900$require$isBlobLike(V)) return $fa14c264fa984900$require$webidl.converters.Blob(V, { - strict: false - }); - if (ArrayBuffer.isView(V) || $fa14c264fa984900$require$types.isAnyArrayBuffer(V)) return $fa14c264fa984900$require$webidl.converters.BufferSource(V, opts); +parcelRegister("4suPr", function(module, exports) { +'use strict'; +module.exports = class DecoratorHandler { + #handler; + constructor(handler){ + if (typeof handler !== 'object' || handler === null) throw new TypeError('handler must be an object'); + this.#handler = handler; + } + onConnect(...args) { + return this.#handler.onConnect?.(...args); + } + onError(...args) { + return this.#handler.onError?.(...args); + } + onUpgrade(...args) { + return this.#handler.onUpgrade?.(...args); + } + onResponseStarted(...args) { + return this.#handler.onResponseStarted?.(...args); + } + onHeaders(...args) { + return this.#handler.onHeaders?.(...args); + } + onData(...args) { + return this.#handler.onData?.(...args); + } + onComplete(...args) { + return this.#handler.onComplete?.(...args); + } + onBodySent(...args) { + return this.#handler.onBodySent?.(...args); } - return $fa14c264fa984900$require$webidl.converters.USVString(V, opts); }; -$fa14c264fa984900$require$webidl.converters["sequence"] = $fa14c264fa984900$require$webidl.sequenceConverter($fa14c264fa984900$require$webidl.converters.BlobPart); -// https://www.w3.org/TR/FileAPI/#dfn-FilePropertyBag -$fa14c264fa984900$require$webidl.converters.FilePropertyBag = $fa14c264fa984900$require$webidl.dictionaryConverter([ - { - key: "lastModified", - converter: $fa14c264fa984900$require$webidl.converters["long long"], - get defaultValue () { - return Date.now(); + +}); + + +parcelRegister("lXY2D", function(module, exports) { +'use strict'; + +var $ffddaea0c5f3853a$require$isIP = $in2sP$nodenet.isIP; + +var $ffddaea0c5f3853a$require$lookup = $in2sP$nodedns.lookup; + +var $4suPr = parcelRequire("4suPr"); + +var $gTXXK = parcelRequire("gTXXK"); +var $ffddaea0c5f3853a$require$InvalidArgumentError = $gTXXK.InvalidArgumentError; +var $ffddaea0c5f3853a$require$InformationalError = $gTXXK.InformationalError; +const $ffddaea0c5f3853a$var$maxInt = Math.pow(2, 31) - 1; +class $ffddaea0c5f3853a$var$DNSInstance { + #maxTTL = 0; + #maxItems = 0; + #records = new Map(); + dualStack = true; + affinity = null; + lookup = null; + pick = null; + constructor(opts){ + this.#maxTTL = opts.maxTTL; + this.#maxItems = opts.maxItems; + this.dualStack = opts.dualStack; + this.affinity = opts.affinity; + this.lookup = opts.lookup ?? this.#defaultLookup; + this.pick = opts.pick ?? this.#defaultPick; + } + get full() { + return this.#records.size === this.#maxItems; + } + runLookup(origin, opts, cb) { + const ips = this.#records.get(origin.hostname); + // If full, we just return the origin + if (ips == null && this.full) { + cb(null, origin.origin); + return; + } + const newOpts = { + affinity: this.affinity, + dualStack: this.dualStack, + lookup: this.lookup, + pick: this.pick, + ...opts.dns, + maxTTL: this.#maxTTL, + maxItems: this.#maxItems + }; + // If no IPs we lookup + if (ips == null) this.lookup(origin, newOpts, (err, addresses)=>{ + if (err || addresses == null || addresses.length === 0) { + cb(err ?? new $ffddaea0c5f3853a$require$InformationalError('No DNS entries found')); + return; + } + this.setRecords(origin, addresses); + const records = this.#records.get(origin.hostname); + const ip = this.pick(origin, records, newOpts.affinity); + let port; + if (typeof ip.port === 'number') port = `:${ip.port}`; + else if (origin.port !== '') port = `:${origin.port}`; + else port = ''; + cb(null, `${origin.protocol}//${ip.family === 6 ? `[${ip.address}]` : ip.address}${port}`); + }); + else { + // If there's IPs we pick + const ip = this.pick(origin, ips, newOpts.affinity); + // If no IPs we lookup - deleting old records + if (ip == null) { + this.#records.delete(origin.hostname); + this.runLookup(origin, opts, cb); + return; + } + let port; + if (typeof ip.port === 'number') port = `:${ip.port}`; + else if (origin.port !== '') port = `:${origin.port}`; + else port = ''; + cb(null, `${origin.protocol}//${ip.family === 6 ? `[${ip.address}]` : ip.address}${port}`); + } + } + #defaultLookup(origin, opts, cb) { + $ffddaea0c5f3853a$require$lookup(origin.hostname, { + all: true, + family: this.dualStack === false ? this.affinity : 0, + order: 'ipv4first' + }, (err, addresses)=>{ + if (err) return cb(err); + const results = new Map(); + for (const addr of addresses)// On linux we found duplicates, we attempt to remove them with + // the latest record + results.set(`${addr.address}:${addr.family}`, addr); + cb(null, results.values()); + }); + } + #defaultPick(origin, hostnameRecords, affinity) { + let ip = null; + const { records: records, offset: offset } = hostnameRecords; + let family; + if (this.dualStack) { + if (affinity == null) { + // Balance between ip families + if (offset == null || offset === $ffddaea0c5f3853a$var$maxInt) { + hostnameRecords.offset = 0; + affinity = 4; + } else { + hostnameRecords.offset++; + affinity = (hostnameRecords.offset & 1) === 1 ? 6 : 4; + } + } + if (records[affinity] != null && records[affinity].ips.length > 0) family = records[affinity]; + else family = records[affinity === 4 ? 6 : 4]; + } else family = records[affinity]; + // If no IPs we return null + if (family == null || family.ips.length === 0) return ip; + if (family.offset == null || family.offset === $ffddaea0c5f3853a$var$maxInt) family.offset = 0; + else family.offset++; + const position = family.offset % family.ips.length; + ip = family.ips[position] ?? null; + if (ip == null) return ip; + if (Date.now() - ip.timestamp > ip.ttl) { + // We delete expired records + // It is possible that they have different TTL, so we manage them individually + family.ips.splice(position, 1); + return this.pick(origin, hostnameRecords, affinity); + } + return ip; + } + setRecords(origin, addresses) { + const timestamp = Date.now(); + const records = { + records: { + 4: null, + 6: null + } + }; + for (const record of addresses){ + record.timestamp = timestamp; + if (typeof record.ttl === 'number') // The record TTL is expected to be in ms + record.ttl = Math.min(record.ttl, this.#maxTTL); + else record.ttl = this.#maxTTL; + const familyRecords = records.records[record.family] ?? { + ips: [] + }; + familyRecords.ips.push(record); + records.records[record.family] = familyRecords; + } + this.#records.set(origin.hostname, records); + } + getHandler(meta, opts) { + return new $ffddaea0c5f3853a$var$DNSDispatchHandler(this, meta, opts); + } +} +class $ffddaea0c5f3853a$var$DNSDispatchHandler extends $4suPr { + #state = null; + #opts = null; + #dispatch = null; + #handler = null; + #origin = null; + constructor(state, { origin: origin, handler: handler, dispatch: dispatch }, opts){ + super(handler); + this.#origin = origin; + this.#handler = handler; + this.#opts = { + ...opts + }; + this.#state = state; + this.#dispatch = dispatch; + } + onError(err) { + switch(err.code){ + case 'ETIMEDOUT': + case 'ECONNREFUSED': + if (this.#state.dualStack) { + // We delete the record and retry + this.#state.runLookup(this.#origin, this.#opts, (err, newOrigin)=>{ + if (err) return this.#handler.onError(err); + const dispatchOpts = { + ...this.#opts, + origin: newOrigin + }; + this.#dispatch(dispatchOpts, this); + }); + // if dual-stack disabled, we error out + return; + } + this.#handler.onError(err); + return; + case 'ENOTFOUND': + this.#state.deleteRecord(this.#origin); + // eslint-disable-next-line no-fallthrough + default: + this.#handler.onError(err); + break; } - }, - { - key: "type", - converter: $fa14c264fa984900$require$webidl.converters.DOMString, - defaultValue: "" - }, - { - key: "endings", - converter: (value)=>{ - value = $fa14c264fa984900$require$webidl.converters.DOMString(value); - value = value.toLowerCase(); - if (value !== "native") value = "transparent"; - return value; - }, - defaultValue: "transparent" } -]); -/** - * @see https://www.w3.org/TR/FileAPI/#process-blob-parts - * @param {(NodeJS.TypedArray|Blob|string)[]} parts - * @param {{ type: string, endings: string }} options - */ function $fa14c264fa984900$var$processBlobParts(parts, options) { - // 1. Let bytes be an empty sequence of bytes. - /** @type {NodeJS.TypedArray[]} */ const bytes = []; - // 2. For each element in parts: - for (const element of parts){ - // 1. If element is a USVString, run the following substeps: - if (typeof element === "string") { - // 1. Let s be element. - let s = element; - // 2. If the endings member of options is "native", set s - // to the result of converting line endings to native - // of element. - if (options.endings === "native") s = $fa14c264fa984900$var$convertLineEndingsNative(s); - // 3. Append the result of UTF-8 encoding s to bytes. - bytes.push($fa14c264fa984900$var$encoder.encode(s)); - } else if ($fa14c264fa984900$require$types.isAnyArrayBuffer(element) || $fa14c264fa984900$require$types.isTypedArray(element)) { - // 2. If element is a BufferSource, get a copy of the - // bytes held by the buffer source, and append those - // bytes to bytes. - if (!element.buffer) bytes.push(new Uint8Array(element)); - else bytes.push(new Uint8Array(element.buffer, element.byteOffset, element.byteLength)); - } else if ($fa14c264fa984900$require$isBlobLike(element)) // 3. If element is a Blob, append the bytes it represents - // to bytes. - bytes.push(element); - } - // 3. Return bytes. - return bytes; -} -/** - * @see https://www.w3.org/TR/FileAPI/#convert-line-endings-to-native - * @param {string} s - */ function $fa14c264fa984900$var$convertLineEndingsNative(s) { - // 1. Let native line ending be be the code point U+000A LF. - let nativeLineEnding = "\n"; - // 2. If the underlying platform’s conventions are to - // represent newlines as a carriage return and line feed - // sequence, set native line ending to the code point - // U+000D CR followed by the code point U+000A LF. - if (process.platform === "win32") nativeLineEnding = "\r\n"; - return s.replace(/\r?\n/g, nativeLineEnding); -} -// If this function is moved to ./util.js, some tools (such as -// rollup) will warn about circular dependencies. See: -// https://github.com/nodejs/undici/issues/1629 -function $fa14c264fa984900$var$isFileLike(object) { - return $fa14c264fa984900$require$NativeFile && object instanceof $fa14c264fa984900$require$NativeFile || object instanceof $fa14c264fa984900$var$File || object && (typeof object.stream === "function" || typeof object.arrayBuffer === "function") && object[Symbol.toStringTag] === "File"; } -module.exports = { - File: $fa14c264fa984900$var$File, - FileLike: $fa14c264fa984900$var$FileLike, - isFileLike: $fa14c264fa984900$var$isFileLike +module.exports = (interceptorOpts)=>{ + if (interceptorOpts?.maxTTL != null && (typeof interceptorOpts?.maxTTL !== 'number' || interceptorOpts?.maxTTL < 0)) throw new $ffddaea0c5f3853a$require$InvalidArgumentError('Invalid maxTTL. Must be a positive number'); + if (interceptorOpts?.maxItems != null && (typeof interceptorOpts?.maxItems !== 'number' || interceptorOpts?.maxItems < 1)) throw new $ffddaea0c5f3853a$require$InvalidArgumentError('Invalid maxItems. Must be a positive number and greater than zero'); + if (interceptorOpts?.affinity != null && interceptorOpts?.affinity !== 4 && interceptorOpts?.affinity !== 6) throw new $ffddaea0c5f3853a$require$InvalidArgumentError('Invalid affinity. Must be either 4 or 6'); + if (interceptorOpts?.dualStack != null && typeof interceptorOpts?.dualStack !== 'boolean') throw new $ffddaea0c5f3853a$require$InvalidArgumentError('Invalid dualStack. Must be a boolean'); + if (interceptorOpts?.lookup != null && typeof interceptorOpts?.lookup !== 'function') throw new $ffddaea0c5f3853a$require$InvalidArgumentError('Invalid lookup. Must be a function'); + if (interceptorOpts?.pick != null && typeof interceptorOpts?.pick !== 'function') throw new $ffddaea0c5f3853a$require$InvalidArgumentError('Invalid pick. Must be a function'); + const dualStack = interceptorOpts?.dualStack ?? true; + let affinity; + if (dualStack) affinity = interceptorOpts?.affinity ?? null; + else affinity = interceptorOpts?.affinity ?? 4; + const opts = { + maxTTL: interceptorOpts?.maxTTL ?? 10e3, + lookup: interceptorOpts?.lookup ?? null, + pick: interceptorOpts?.pick ?? null, + dualStack: dualStack, + affinity: affinity, + maxItems: interceptorOpts?.maxItems ?? Infinity + }; + const instance = new $ffddaea0c5f3853a$var$DNSInstance(opts); + return (dispatch)=>{ + return function dnsInterceptor(origDispatchOpts, handler) { + const origin = origDispatchOpts.origin.constructor === URL ? origDispatchOpts.origin : new URL(origDispatchOpts.origin); + if ($ffddaea0c5f3853a$require$isIP(origin.hostname) !== 0) return dispatch(origDispatchOpts, handler); + instance.runLookup(origin, origDispatchOpts, (err, newOrigin)=>{ + if (err) return handler.onError(err); + let dispatchOpts = null; + dispatchOpts = { + ...origDispatchOpts, + servername: origin.hostname, + origin: newOrigin, + headers: { + host: origin.hostname, + ...origDispatchOpts.headers + } + }; + dispatch(dispatchOpts, instance.getHandler({ + origin: origin, + dispatch: dispatch, + handler: handler + }, origDispatchOpts)); + }); + return true; + }; + }; }; }); -parcelRegister("jk0LQ", function(module, exports) { -"use strict"; -var $e1107ba1f6503d93$require$types = $g40fK$util.types; +parcelRegister("85Oaa", function(module, exports) { +'use strict'; -var $4EkpM = parcelRequire("4EkpM"); -var $e1107ba1f6503d93$require$hasOwn = $4EkpM.hasOwn; -var $e1107ba1f6503d93$require$toUSVString = $4EkpM.toUSVString; -/** @type {import('../../types/webidl').Webidl} */ const $e1107ba1f6503d93$var$webidl = {}; -$e1107ba1f6503d93$var$webidl.converters = {}; -$e1107ba1f6503d93$var$webidl.util = {}; -$e1107ba1f6503d93$var$webidl.errors = {}; -$e1107ba1f6503d93$var$webidl.errors.exception = function(message) { - return new TypeError(`${message.header}: ${message.message}`); -}; -$e1107ba1f6503d93$var$webidl.errors.conversionFailed = function(context) { - const plural = context.types.length === 1 ? "" : " one of"; - const message = `${context.argument} could not be converted to` + `${plural}: ${context.types.join(", ")}.`; - return $e1107ba1f6503d93$var$webidl.errors.exception({ - header: context.prefix, - message: message - }); -}; -$e1107ba1f6503d93$var$webidl.errors.invalidArgument = function(context) { - return $e1107ba1f6503d93$var$webidl.errors.exception({ - header: context.prefix, - message: `"${context.value}" is an invalid ${context.type}.` - }); -}; -// https://webidl.spec.whatwg.org/#implements -$e1107ba1f6503d93$var$webidl.brandCheck = function(V, I, opts) { - if (opts?.strict !== false && !(V instanceof I)) throw new TypeError("Illegal invocation"); - else return V?.[Symbol.toStringTag] === I.prototype[Symbol.toStringTag]; -}; -$e1107ba1f6503d93$var$webidl.argumentLengthCheck = function({ length: length }, min, ctx) { - if (length < min) throw $e1107ba1f6503d93$var$webidl.errors.exception({ - message: `${min} argument${min !== 1 ? "s" : ""} required, ` + `but${length ? " only" : ""} ${length} found.`, - ...ctx - }); -}; -$e1107ba1f6503d93$var$webidl.illegalConstructor = function() { - throw $e1107ba1f6503d93$var$webidl.errors.exception({ - header: "TypeError", - message: "Illegal constructor" - }); -}; -// https://tc39.es/ecma262/#sec-ecmascript-data-types-and-values -$e1107ba1f6503d93$var$webidl.util.Type = function(V) { - switch(typeof V){ - case "undefined": - return "Undefined"; - case "boolean": - return "Boolean"; - case "string": - return "String"; - case "symbol": - return "Symbol"; - case "number": - return "Number"; - case "bigint": - return "BigInt"; - case "function": - case "object": - if (V === null) return "Null"; - return "Object"; - } -}; -// https://webidl.spec.whatwg.org/#abstract-opdef-converttoint -$e1107ba1f6503d93$var$webidl.util.ConvertToInt = function(V, bitLength, signedness, opts = {}) { - let upperBound; - let lowerBound; - // 1. If bitLength is 64, then: - if (bitLength === 64) { - // 1. Let upperBound be 2^53 − 1. - upperBound = Math.pow(2, 53) - 1; - // 2. If signedness is "unsigned", then let lowerBound be 0. - if (signedness === "unsigned") lowerBound = 0; - else // 3. Otherwise let lowerBound be −2^53 + 1. - lowerBound = Math.pow(-2, 53) + 1; - } else if (signedness === "unsigned") { - // 2. Otherwise, if signedness is "unsigned", then: - // 1. Let lowerBound be 0. - lowerBound = 0; - // 2. Let upperBound be 2^bitLength − 1. - upperBound = Math.pow(2, bitLength) - 1; - } else { - // 3. Otherwise: - // 1. Let lowerBound be -2^bitLength − 1. - lowerBound = Math.pow(-2, bitLength) - 1; - // 2. Let upperBound be 2^bitLength − 1 − 1. - upperBound = Math.pow(2, bitLength - 1) - 1; +var $3dLRE = parcelRequire("3dLRE"); +var $5e45b3a8f036f1a5$require$Headers = $3dLRE.Headers; +var $5e45b3a8f036f1a5$require$HeadersList = $3dLRE.HeadersList; +var $5e45b3a8f036f1a5$require$fill = $3dLRE.fill; +var $5e45b3a8f036f1a5$require$getHeadersGuard = $3dLRE.getHeadersGuard; +var $5e45b3a8f036f1a5$require$setHeadersGuard = $3dLRE.setHeadersGuard; +var $5e45b3a8f036f1a5$require$setHeadersList = $3dLRE.setHeadersList; + +var $8masf = parcelRequire("8masf"); +var $5e45b3a8f036f1a5$require$extractBody = $8masf.extractBody; +var $5e45b3a8f036f1a5$require$cloneBody = $8masf.cloneBody; +var $5e45b3a8f036f1a5$require$mixinBody = $8masf.mixinBody; +var $5e45b3a8f036f1a5$require$hasFinalizationRegistry = $8masf.hasFinalizationRegistry; +var $5e45b3a8f036f1a5$require$streamRegistry = $8masf.streamRegistry; +var $5e45b3a8f036f1a5$require$bodyUnusable = $8masf.bodyUnusable; + +var $bFRvW = parcelRequire("bFRvW"); + +const { kEnumerableProperty: $5e45b3a8f036f1a5$var$kEnumerableProperty } = $bFRvW; + +var $7z0I9 = parcelRequire("7z0I9"); +var $5e45b3a8f036f1a5$require$isValidReasonPhrase = $7z0I9.isValidReasonPhrase; +var $5e45b3a8f036f1a5$require$isCancelled = $7z0I9.isCancelled; +var $5e45b3a8f036f1a5$require$isAborted = $7z0I9.isAborted; +var $5e45b3a8f036f1a5$require$isBlobLike = $7z0I9.isBlobLike; +var $5e45b3a8f036f1a5$require$serializeJavascriptValueToJSONString = $7z0I9.serializeJavascriptValueToJSONString; +var $5e45b3a8f036f1a5$require$isErrorLike = $7z0I9.isErrorLike; +var $5e45b3a8f036f1a5$require$isomorphicEncode = $7z0I9.isomorphicEncode; +var $5e45b3a8f036f1a5$require$relevantRealm = $7z0I9.environmentSettingsObject; + +var $4nb4n = parcelRequire("4nb4n"); +var $5e45b3a8f036f1a5$require$redirectStatusSet = $4nb4n.redirectStatusSet; +var $5e45b3a8f036f1a5$require$nullBodyStatus = $4nb4n.nullBodyStatus; + +var $faXHi = parcelRequire("faXHi"); +var $5e45b3a8f036f1a5$require$kState = $faXHi.kState; +var $5e45b3a8f036f1a5$require$kHeaders = $faXHi.kHeaders; + +var $5HTG7 = parcelRequire("5HTG7"); +var $5e45b3a8f036f1a5$require$webidl = $5HTG7.webidl; + +var $kFkJR = parcelRequire("kFkJR"); +var $5e45b3a8f036f1a5$require$FormData = $kFkJR.FormData; + +var $30IsM = parcelRequire("30IsM"); +var $5e45b3a8f036f1a5$require$URLSerializer = $30IsM.URLSerializer; + +var $gNVEc = parcelRequire("gNVEc"); +var $5e45b3a8f036f1a5$require$kConstruct = $gNVEc.kConstruct; + + +var $5e45b3a8f036f1a5$require$types = $in2sP$nodeutil.types; +const $5e45b3a8f036f1a5$var$textEncoder = new TextEncoder('utf-8'); +// https://fetch.spec.whatwg.org/#response-class +class $5e45b3a8f036f1a5$var$Response { + // Creates network error Response. + static error() { + // The static error() method steps are to return the result of creating a + // Response object, given a new network error, "immutable", and this’s + // relevant Realm. + const responseObject = $5e45b3a8f036f1a5$var$fromInnerResponse($5e45b3a8f036f1a5$var$makeNetworkError(), 'immutable'); + return responseObject; } - // 4. Let x be ? ToNumber(V). - let x = Number(V); - // 5. If x is −0, then set x to +0. - if (x === 0) x = 0; - // 6. If the conversion is to an IDL type associated - // with the [EnforceRange] extended attribute, then: - if (opts.enforceRange === true) { - // 1. If x is NaN, +∞, or −∞, then throw a TypeError. - if (Number.isNaN(x) || x === Number.POSITIVE_INFINITY || x === Number.NEGATIVE_INFINITY) throw $e1107ba1f6503d93$var$webidl.errors.exception({ - header: "Integer conversion", - message: `Could not convert ${V} to an integer.` - }); - // 2. Set x to IntegerPart(x). - x = $e1107ba1f6503d93$var$webidl.util.IntegerPart(x); - // 3. If x < lowerBound or x > upperBound, then - // throw a TypeError. - if (x < lowerBound || x > upperBound) throw $e1107ba1f6503d93$var$webidl.errors.exception({ - header: "Integer conversion", - message: `Value must be between ${lowerBound}-${upperBound}, got ${x}.` + // https://fetch.spec.whatwg.org/#dom-response-json + static json(data, init = {}) { + $5e45b3a8f036f1a5$require$webidl.argumentLengthCheck(arguments, 1, 'Response.json'); + if (init !== null) init = $5e45b3a8f036f1a5$require$webidl.converters.ResponseInit(init); + // 1. Let bytes the result of running serialize a JavaScript value to JSON bytes on data. + const bytes = $5e45b3a8f036f1a5$var$textEncoder.encode($5e45b3a8f036f1a5$require$serializeJavascriptValueToJSONString(data)); + // 2. Let body be the result of extracting bytes. + const body = $5e45b3a8f036f1a5$require$extractBody(bytes); + // 3. Let responseObject be the result of creating a Response object, given a new response, + // "response", and this’s relevant Realm. + const responseObject = $5e45b3a8f036f1a5$var$fromInnerResponse($5e45b3a8f036f1a5$var$makeResponse({}), 'response'); + // 4. Perform initialize a response given responseObject, init, and (body, "application/json"). + $5e45b3a8f036f1a5$var$initializeResponse(responseObject, init, { + body: body[0], + type: 'application/json' }); - // 4. Return x. - return x; - } - // 7. If x is not NaN and the conversion is to an IDL - // type associated with the [Clamp] extended - // attribute, then: - if (!Number.isNaN(x) && opts.clamp === true) { - // 1. Set x to min(max(x, lowerBound), upperBound). - x = Math.min(Math.max(x, lowerBound), upperBound); - // 2. Round x to the nearest integer, choosing the - // even integer if it lies halfway between two, - // and choosing +0 rather than −0. - if (Math.floor(x) % 2 === 0) x = Math.floor(x); - else x = Math.ceil(x); - // 3. Return x. - return x; + // 5. Return responseObject. + return responseObject; } - // 8. If x is NaN, +0, +∞, or −∞, then return +0. - if (Number.isNaN(x) || x === 0 && Object.is(0, x) || x === Number.POSITIVE_INFINITY || x === Number.NEGATIVE_INFINITY) return 0; - // 9. Set x to IntegerPart(x). - x = $e1107ba1f6503d93$var$webidl.util.IntegerPart(x); - // 10. Set x to x modulo 2^bitLength. - x = x % Math.pow(2, bitLength); - // 11. If signedness is "signed" and x ≥ 2^bitLength − 1, - // then return x − 2^bitLength. - if (signedness === "signed" && x >= Math.pow(2, bitLength) - 1) return x - Math.pow(2, bitLength); - // 12. Otherwise, return x. - return x; -}; -// https://webidl.spec.whatwg.org/#abstract-opdef-integerpart -$e1107ba1f6503d93$var$webidl.util.IntegerPart = function(n) { - // 1. Let r be floor(abs(n)). - const r = Math.floor(Math.abs(n)); - // 2. If n < 0, then return -1 × r. - if (n < 0) return -1 * r; - // 3. Otherwise, return r. - return r; -}; -// https://webidl.spec.whatwg.org/#es-sequence -$e1107ba1f6503d93$var$webidl.sequenceConverter = function(converter) { - return (V)=>{ - // 1. If Type(V) is not Object, throw a TypeError. - if ($e1107ba1f6503d93$var$webidl.util.Type(V) !== "Object") throw $e1107ba1f6503d93$var$webidl.errors.exception({ - header: "Sequence", - message: `Value of type ${$e1107ba1f6503d93$var$webidl.util.Type(V)} is not an Object.` - }); - // 2. Let method be ? GetMethod(V, @@iterator). - /** @type {Generator} */ const method = V?.[Symbol.iterator]?.(); - const seq = []; - // 3. If method is undefined, throw a TypeError. - if (method === undefined || typeof method.next !== "function") throw $e1107ba1f6503d93$var$webidl.errors.exception({ - header: "Sequence", - message: "Object is not an iterator." - }); - // https://webidl.spec.whatwg.org/#create-sequence-from-iterable - while(true){ - const { done: done, value: value } = method.next(); - if (done) break; - seq.push(converter(value)); - } - return seq; - }; -}; -// https://webidl.spec.whatwg.org/#es-to-record -$e1107ba1f6503d93$var$webidl.recordConverter = function(keyConverter, valueConverter) { - return (O)=>{ - // 1. If Type(O) is not Object, throw a TypeError. - if ($e1107ba1f6503d93$var$webidl.util.Type(O) !== "Object") throw $e1107ba1f6503d93$var$webidl.errors.exception({ - header: "Record", - message: `Value of type ${$e1107ba1f6503d93$var$webidl.util.Type(O)} is not an Object.` - }); - // 2. Let result be a new empty instance of record. - const result = {}; - if (!$e1107ba1f6503d93$require$types.isProxy(O)) { - // Object.keys only returns enumerable properties - const keys = Object.keys(O); - for (const key of keys){ - // 1. Let typedKey be key converted to an IDL value of type K. - const typedKey = keyConverter(key); - // 2. Let value be ? Get(O, key). - // 3. Let typedValue be value converted to an IDL value of type V. - const typedValue = valueConverter(O[key]); - // 4. Set result[typedKey] to typedValue. - result[typedKey] = typedValue; - } - // 5. Return result. - return result; - } - // 3. Let keys be ? O.[[OwnPropertyKeys]](). - const keys = Reflect.ownKeys(O); - // 4. For each key of keys. - for (const key of keys){ - // 1. Let desc be ? O.[[GetOwnProperty]](key). - const desc = Reflect.getOwnPropertyDescriptor(O, key); - // 2. If desc is not undefined and desc.[[Enumerable]] is true: - if (desc?.enumerable) { - // 1. Let typedKey be key converted to an IDL value of type K. - const typedKey = keyConverter(key); - // 2. Let value be ? Get(O, key). - // 3. Let typedValue be value converted to an IDL value of type V. - const typedValue = valueConverter(O[key]); - // 4. Set result[typedKey] to typedValue. - result[typedKey] = typedValue; - } + // Creates a redirect Response that redirects to url with status status. + static redirect(url, status = 302) { + $5e45b3a8f036f1a5$require$webidl.argumentLengthCheck(arguments, 1, 'Response.redirect'); + url = $5e45b3a8f036f1a5$require$webidl.converters.USVString(url); + status = $5e45b3a8f036f1a5$require$webidl.converters['unsigned short'](status); + // 1. Let parsedURL be the result of parsing url with current settings + // object’s API base URL. + // 2. If parsedURL is failure, then throw a TypeError. + // TODO: base-URL? + let parsedURL; + try { + parsedURL = new URL(url, $5e45b3a8f036f1a5$require$relevantRealm.settingsObject.baseUrl); + } catch (err) { + throw new TypeError(`Failed to parse URL from ${url}`, { + cause: err + }); } - // 5. Return result. - return result; - }; -}; -$e1107ba1f6503d93$var$webidl.interfaceConverter = function(i) { - return (V, opts = {})=>{ - if (opts.strict !== false && !(V instanceof i)) throw $e1107ba1f6503d93$var$webidl.errors.exception({ - header: i.name, - message: `Expected ${V} to be an instance of ${i.name}.` - }); - return V; - }; -}; -$e1107ba1f6503d93$var$webidl.dictionaryConverter = function(converters) { - return (dictionary)=>{ - const type = $e1107ba1f6503d93$var$webidl.util.Type(dictionary); - const dict = {}; - if (type === "Null" || type === "Undefined") return dict; - else if (type !== "Object") throw $e1107ba1f6503d93$var$webidl.errors.exception({ - header: "Dictionary", - message: `Expected ${dictionary} to be one of: Null, Undefined, Object.` - }); - for (const options of converters){ - const { key: key, defaultValue: defaultValue, required: required, converter: converter } = options; - if (required === true) { - if (!$e1107ba1f6503d93$require$hasOwn(dictionary, key)) throw $e1107ba1f6503d93$var$webidl.errors.exception({ - header: "Dictionary", - message: `Missing required key "${key}".` - }); - } - let value = dictionary[key]; - const hasDefault = $e1107ba1f6503d93$require$hasOwn(options, "defaultValue"); - // Only use defaultValue if value is undefined and - // a defaultValue options was provided. - if (hasDefault && value !== null) value = value ?? defaultValue; - // A key can be optional and have no default value. - // When this happens, do not perform a conversion, - // and do not assign the key a value. - if (required || hasDefault || value !== undefined) { - value = converter(value); - if (options.allowedValues && !options.allowedValues.includes(value)) throw $e1107ba1f6503d93$var$webidl.errors.exception({ - header: "Dictionary", - message: `${value} is not an accepted type. Expected one of ${options.allowedValues.join(", ")}.` - }); - dict[key] = value; - } + // 3. If status is not a redirect status, then throw a RangeError. + if (!$5e45b3a8f036f1a5$require$redirectStatusSet.has(status)) throw new RangeError(`Invalid status code ${status}`); + // 4. Let responseObject be the result of creating a Response object, + // given a new response, "immutable", and this’s relevant Realm. + const responseObject = $5e45b3a8f036f1a5$var$fromInnerResponse($5e45b3a8f036f1a5$var$makeResponse({}), 'immutable'); + // 5. Set responseObject’s response’s status to status. + responseObject[$5e45b3a8f036f1a5$require$kState].status = status; + // 6. Let value be parsedURL, serialized and isomorphic encoded. + const value = $5e45b3a8f036f1a5$require$isomorphicEncode($5e45b3a8f036f1a5$require$URLSerializer(parsedURL)); + // 7. Append `Location`/value to responseObject’s response’s header list. + responseObject[$5e45b3a8f036f1a5$require$kState].headersList.append('location', value, true); + // 8. Return responseObject. + return responseObject; + } + // https://fetch.spec.whatwg.org/#dom-response + constructor(body = null, init = {}){ + $5e45b3a8f036f1a5$require$webidl.util.markAsUncloneable(this); + if (body === $5e45b3a8f036f1a5$require$kConstruct) return; + if (body !== null) body = $5e45b3a8f036f1a5$require$webidl.converters.BodyInit(body); + init = $5e45b3a8f036f1a5$require$webidl.converters.ResponseInit(init); + // 1. Set this’s response to a new response. + this[$5e45b3a8f036f1a5$require$kState] = $5e45b3a8f036f1a5$var$makeResponse({}); + // 2. Set this’s headers to a new Headers object with this’s relevant + // Realm, whose header list is this’s response’s header list and guard + // is "response". + this[$5e45b3a8f036f1a5$require$kHeaders] = new $5e45b3a8f036f1a5$require$Headers($5e45b3a8f036f1a5$require$kConstruct); + $5e45b3a8f036f1a5$require$setHeadersGuard(this[$5e45b3a8f036f1a5$require$kHeaders], 'response'); + $5e45b3a8f036f1a5$require$setHeadersList(this[$5e45b3a8f036f1a5$require$kHeaders], this[$5e45b3a8f036f1a5$require$kState].headersList); + // 3. Let bodyWithType be null. + let bodyWithType = null; + // 4. If body is non-null, then set bodyWithType to the result of extracting body. + if (body != null) { + const [extractedBody, type] = $5e45b3a8f036f1a5$require$extractBody(body); + bodyWithType = { + body: extractedBody, + type: type + }; } - return dict; - }; -}; -$e1107ba1f6503d93$var$webidl.nullableConverter = function(converter) { - return (V)=>{ - if (V === null) return V; - return converter(V); - }; -}; -// https://webidl.spec.whatwg.org/#es-DOMString -$e1107ba1f6503d93$var$webidl.converters.DOMString = function(V, opts = {}) { - // 1. If V is null and the conversion is to an IDL type - // associated with the [LegacyNullToEmptyString] - // extended attribute, then return the DOMString value - // that represents the empty string. - if (V === null && opts.legacyNullToEmptyString) return ""; - // 2. Let x be ? ToString(V). - if (typeof V === "symbol") throw new TypeError("Could not convert argument of type symbol to string."); - // 3. Return the IDL DOMString value that represents the - // same sequence of code units as the one the - // ECMAScript String value x represents. - return String(V); -}; -// https://webidl.spec.whatwg.org/#es-ByteString -$e1107ba1f6503d93$var$webidl.converters.ByteString = function(V) { - // 1. Let x be ? ToString(V). - // Note: DOMString converter perform ? ToString(V) - const x = $e1107ba1f6503d93$var$webidl.converters.DOMString(V); - // 2. If the value of any element of x is greater than - // 255, then throw a TypeError. - for(let index = 0; index < x.length; index++){ - if (x.charCodeAt(index) > 255) throw new TypeError("Cannot convert argument to a ByteString because the character at " + `index ${index} has a value of ${x.charCodeAt(index)} which is greater than 255.`); + // 5. Perform initialize a response given this, init, and bodyWithType. + $5e45b3a8f036f1a5$var$initializeResponse(this, init, bodyWithType); } - // 3. Return an IDL ByteString value whose length is the - // length of x, and where the value of each element is - // the value of the corresponding element of x. - return x; -}; -// https://webidl.spec.whatwg.org/#es-USVString -$e1107ba1f6503d93$var$webidl.converters.USVString = $e1107ba1f6503d93$require$toUSVString; -// https://webidl.spec.whatwg.org/#es-boolean -$e1107ba1f6503d93$var$webidl.converters.boolean = function(V) { - // 1. Let x be the result of computing ToBoolean(V). - const x = Boolean(V); - // 2. Return the IDL boolean value that is the one that represents - // the same truth value as the ECMAScript Boolean value x. - return x; -}; -// https://webidl.spec.whatwg.org/#es-any -$e1107ba1f6503d93$var$webidl.converters.any = function(V) { - return V; -}; -// https://webidl.spec.whatwg.org/#es-long-long -$e1107ba1f6503d93$var$webidl.converters["long long"] = function(V) { - // 1. Let x be ? ConvertToInt(V, 64, "signed"). - const x = $e1107ba1f6503d93$var$webidl.util.ConvertToInt(V, 64, "signed"); - // 2. Return the IDL long long value that represents - // the same numeric value as x. - return x; -}; -// https://webidl.spec.whatwg.org/#es-unsigned-long-long -$e1107ba1f6503d93$var$webidl.converters["unsigned long long"] = function(V) { - // 1. Let x be ? ConvertToInt(V, 64, "unsigned"). - const x = $e1107ba1f6503d93$var$webidl.util.ConvertToInt(V, 64, "unsigned"); - // 2. Return the IDL unsigned long long value that - // represents the same numeric value as x. - return x; -}; -// https://webidl.spec.whatwg.org/#es-unsigned-long -$e1107ba1f6503d93$var$webidl.converters["unsigned long"] = function(V) { - // 1. Let x be ? ConvertToInt(V, 32, "unsigned"). - const x = $e1107ba1f6503d93$var$webidl.util.ConvertToInt(V, 32, "unsigned"); - // 2. Return the IDL unsigned long value that - // represents the same numeric value as x. - return x; -}; -// https://webidl.spec.whatwg.org/#es-unsigned-short -$e1107ba1f6503d93$var$webidl.converters["unsigned short"] = function(V, opts) { - // 1. Let x be ? ConvertToInt(V, 16, "unsigned"). - const x = $e1107ba1f6503d93$var$webidl.util.ConvertToInt(V, 16, "unsigned", opts); - // 2. Return the IDL unsigned short value that represents - // the same numeric value as x. - return x; -}; -// https://webidl.spec.whatwg.org/#idl-ArrayBuffer -$e1107ba1f6503d93$var$webidl.converters.ArrayBuffer = function(V, opts = {}) { - // 1. If Type(V) is not Object, or V does not have an - // [[ArrayBufferData]] internal slot, then throw a - // TypeError. - // see: https://tc39.es/ecma262/#sec-properties-of-the-arraybuffer-instances - // see: https://tc39.es/ecma262/#sec-properties-of-the-sharedarraybuffer-instances - if ($e1107ba1f6503d93$var$webidl.util.Type(V) !== "Object" || !$e1107ba1f6503d93$require$types.isAnyArrayBuffer(V)) throw $e1107ba1f6503d93$var$webidl.errors.conversionFailed({ - prefix: `${V}`, - argument: `${V}`, - types: [ - "ArrayBuffer" - ] + // Returns response’s type, e.g., "cors". + get type() { + $5e45b3a8f036f1a5$require$webidl.brandCheck(this, $5e45b3a8f036f1a5$var$Response); + // The type getter steps are to return this’s response’s type. + return this[$5e45b3a8f036f1a5$require$kState].type; + } + // Returns response’s URL, if it has one; otherwise the empty string. + get url() { + $5e45b3a8f036f1a5$require$webidl.brandCheck(this, $5e45b3a8f036f1a5$var$Response); + const urlList = this[$5e45b3a8f036f1a5$require$kState].urlList; + // The url getter steps are to return the empty string if this’s + // response’s URL is null; otherwise this’s response’s URL, + // serialized with exclude fragment set to true. + const url = urlList[urlList.length - 1] ?? null; + if (url === null) return ''; + return $5e45b3a8f036f1a5$require$URLSerializer(url, true); + } + // Returns whether response was obtained through a redirect. + get redirected() { + $5e45b3a8f036f1a5$require$webidl.brandCheck(this, $5e45b3a8f036f1a5$var$Response); + // The redirected getter steps are to return true if this’s response’s URL + // list has more than one item; otherwise false. + return this[$5e45b3a8f036f1a5$require$kState].urlList.length > 1; + } + // Returns response’s status. + get status() { + $5e45b3a8f036f1a5$require$webidl.brandCheck(this, $5e45b3a8f036f1a5$var$Response); + // The status getter steps are to return this’s response’s status. + return this[$5e45b3a8f036f1a5$require$kState].status; + } + // Returns whether response’s status is an ok status. + get ok() { + $5e45b3a8f036f1a5$require$webidl.brandCheck(this, $5e45b3a8f036f1a5$var$Response); + // The ok getter steps are to return true if this’s response’s status is an + // ok status; otherwise false. + return this[$5e45b3a8f036f1a5$require$kState].status >= 200 && this[$5e45b3a8f036f1a5$require$kState].status <= 299; + } + // Returns response’s status message. + get statusText() { + $5e45b3a8f036f1a5$require$webidl.brandCheck(this, $5e45b3a8f036f1a5$var$Response); + // The statusText getter steps are to return this’s response’s status + // message. + return this[$5e45b3a8f036f1a5$require$kState].statusText; + } + // Returns response’s headers as Headers. + get headers() { + $5e45b3a8f036f1a5$require$webidl.brandCheck(this, $5e45b3a8f036f1a5$var$Response); + // The headers getter steps are to return this’s headers. + return this[$5e45b3a8f036f1a5$require$kHeaders]; + } + get body() { + $5e45b3a8f036f1a5$require$webidl.brandCheck(this, $5e45b3a8f036f1a5$var$Response); + return this[$5e45b3a8f036f1a5$require$kState].body ? this[$5e45b3a8f036f1a5$require$kState].body.stream : null; + } + get bodyUsed() { + $5e45b3a8f036f1a5$require$webidl.brandCheck(this, $5e45b3a8f036f1a5$var$Response); + return !!this[$5e45b3a8f036f1a5$require$kState].body && $bFRvW.isDisturbed(this[$5e45b3a8f036f1a5$require$kState].body.stream); + } + // Returns a clone of response. + clone() { + $5e45b3a8f036f1a5$require$webidl.brandCheck(this, $5e45b3a8f036f1a5$var$Response); + // 1. If this is unusable, then throw a TypeError. + if ($5e45b3a8f036f1a5$require$bodyUnusable(this)) throw $5e45b3a8f036f1a5$require$webidl.errors.exception({ + header: 'Response.clone', + message: 'Body has already been consumed.' + }); + // 2. Let clonedResponse be the result of cloning this’s response. + const clonedResponse = $5e45b3a8f036f1a5$var$cloneResponse(this[$5e45b3a8f036f1a5$require$kState]); + // Note: To re-register because of a new stream. + if ($5e45b3a8f036f1a5$require$hasFinalizationRegistry && this[$5e45b3a8f036f1a5$require$kState].body?.stream) $5e45b3a8f036f1a5$require$streamRegistry.register(this, new WeakRef(this[$5e45b3a8f036f1a5$require$kState].body.stream)); + // 3. Return the result of creating a Response object, given + // clonedResponse, this’s headers’s guard, and this’s relevant Realm. + return $5e45b3a8f036f1a5$var$fromInnerResponse(clonedResponse, $5e45b3a8f036f1a5$require$getHeadersGuard(this[$5e45b3a8f036f1a5$require$kHeaders])); + } + [$in2sP$nodeutil.inspect.custom](depth, options) { + if (options.depth === null) options.depth = 2; + options.colors ??= true; + const properties = { + status: this.status, + statusText: this.statusText, + headers: this.headers, + body: this.body, + bodyUsed: this.bodyUsed, + ok: this.ok, + redirected: this.redirected, + type: this.type, + url: this.url + }; + return `Response ${$in2sP$nodeutil.formatWithOptions(options, properties)}`; + } +} +$5e45b3a8f036f1a5$require$mixinBody($5e45b3a8f036f1a5$var$Response); +Object.defineProperties($5e45b3a8f036f1a5$var$Response.prototype, { + type: $5e45b3a8f036f1a5$var$kEnumerableProperty, + url: $5e45b3a8f036f1a5$var$kEnumerableProperty, + status: $5e45b3a8f036f1a5$var$kEnumerableProperty, + ok: $5e45b3a8f036f1a5$var$kEnumerableProperty, + redirected: $5e45b3a8f036f1a5$var$kEnumerableProperty, + statusText: $5e45b3a8f036f1a5$var$kEnumerableProperty, + headers: $5e45b3a8f036f1a5$var$kEnumerableProperty, + clone: $5e45b3a8f036f1a5$var$kEnumerableProperty, + body: $5e45b3a8f036f1a5$var$kEnumerableProperty, + bodyUsed: $5e45b3a8f036f1a5$var$kEnumerableProperty, + [Symbol.toStringTag]: { + value: 'Response', + configurable: true + } +}); +Object.defineProperties($5e45b3a8f036f1a5$var$Response, { + json: $5e45b3a8f036f1a5$var$kEnumerableProperty, + redirect: $5e45b3a8f036f1a5$var$kEnumerableProperty, + error: $5e45b3a8f036f1a5$var$kEnumerableProperty +}); +// https://fetch.spec.whatwg.org/#concept-response-clone +function $5e45b3a8f036f1a5$var$cloneResponse(response) { + // To clone a response response, run these steps: + // 1. If response is a filtered response, then return a new identical + // filtered response whose internal response is a clone of response’s + // internal response. + if (response.internalResponse) return $5e45b3a8f036f1a5$var$filterResponse($5e45b3a8f036f1a5$var$cloneResponse(response.internalResponse), response.type); + // 2. Let newResponse be a copy of response, except for its body. + const newResponse = $5e45b3a8f036f1a5$var$makeResponse({ + ...response, + body: null }); - // 2. If the conversion is not to an IDL type associated - // with the [AllowShared] extended attribute, and - // IsSharedArrayBuffer(V) is true, then throw a - // TypeError. - if (opts.allowShared === false && $e1107ba1f6503d93$require$types.isSharedArrayBuffer(V)) throw $e1107ba1f6503d93$var$webidl.errors.exception({ - header: "ArrayBuffer", - message: "SharedArrayBuffer is not allowed." + // 3. If response’s body is non-null, then set newResponse’s body to the + // result of cloning response’s body. + if (response.body != null) newResponse.body = $5e45b3a8f036f1a5$require$cloneBody(newResponse, response.body); + // 4. Return newResponse. + return newResponse; +} +function $5e45b3a8f036f1a5$var$makeResponse(init) { + return { + aborted: false, + rangeRequested: false, + timingAllowPassed: false, + requestIncludesCredentials: false, + type: 'default', + status: 200, + timingInfo: null, + cacheState: '', + statusText: '', + ...init, + headersList: init?.headersList ? new $5e45b3a8f036f1a5$require$HeadersList(init?.headersList) : new $5e45b3a8f036f1a5$require$HeadersList(), + urlList: init?.urlList ? [ + ...init.urlList + ] : [] + }; +} +function $5e45b3a8f036f1a5$var$makeNetworkError(reason) { + const isError = $5e45b3a8f036f1a5$require$isErrorLike(reason); + return $5e45b3a8f036f1a5$var$makeResponse({ + type: 'error', + status: 0, + error: isError ? reason : new Error(reason ? String(reason) : reason), + aborted: reason && reason.name === 'AbortError' }); - // 3. If the conversion is not to an IDL type associated - // with the [AllowResizable] extended attribute, and - // IsResizableArrayBuffer(V) is true, then throw a - // TypeError. - // Note: resizable ArrayBuffers are currently a proposal. - // 4. Return the IDL ArrayBuffer value that is a - // reference to the same object as V. - return V; -}; -$e1107ba1f6503d93$var$webidl.converters.TypedArray = function(V, T, opts = {}) { - // 1. Let T be the IDL type V is being converted to. - // 2. If Type(V) is not Object, or V does not have a - // [[TypedArrayName]] internal slot with a value - // equal to T’s name, then throw a TypeError. - if ($e1107ba1f6503d93$var$webidl.util.Type(V) !== "Object" || !$e1107ba1f6503d93$require$types.isTypedArray(V) || V.constructor.name !== T.name) throw $e1107ba1f6503d93$var$webidl.errors.conversionFailed({ - prefix: `${T.name}`, - argument: `${V}`, - types: [ - T.name - ] +} +// @see https://fetch.spec.whatwg.org/#concept-network-error +function $5e45b3a8f036f1a5$var$isNetworkError(response) { + return(// A network error is a response whose type is "error", + response.type === 'error' && // status is 0 + response.status === 0); +} +function $5e45b3a8f036f1a5$var$makeFilteredResponse(response, state) { + state = { + internalResponse: response, + ...state + }; + return new Proxy(response, { + get (target, p) { + return p in state ? state[p] : target[p]; + }, + set (target, p, value) { + $in2sP$nodeassert(!(p in state)); + target[p] = value; + return true; + } }); - // 3. If the conversion is not to an IDL type associated - // with the [AllowShared] extended attribute, and - // IsSharedArrayBuffer(V.[[ViewedArrayBuffer]]) is - // true, then throw a TypeError. - if (opts.allowShared === false && $e1107ba1f6503d93$require$types.isSharedArrayBuffer(V.buffer)) throw $e1107ba1f6503d93$var$webidl.errors.exception({ - header: "ArrayBuffer", - message: "SharedArrayBuffer is not allowed." +} +// https://fetch.spec.whatwg.org/#concept-filtered-response +function $5e45b3a8f036f1a5$var$filterResponse(response, type) { + // Set response to the following filtered response with response as its + // internal response, depending on request’s response tainting: + if (type === 'basic') // A basic filtered response is a filtered response whose type is "basic" + // and header list excludes any headers in internal response’s header list + // whose name is a forbidden response-header name. + // Note: undici does not implement forbidden response-header names + return $5e45b3a8f036f1a5$var$makeFilteredResponse(response, { + type: 'basic', + headersList: response.headersList }); - // 4. If the conversion is not to an IDL type associated - // with the [AllowResizable] extended attribute, and - // IsResizableArrayBuffer(V.[[ViewedArrayBuffer]]) is - // true, then throw a TypeError. - // Note: resizable array buffers are currently a proposal - // 5. Return the IDL value of type T that is a reference - // to the same object as V. - return V; -}; -$e1107ba1f6503d93$var$webidl.converters.DataView = function(V, opts = {}) { - // 1. If Type(V) is not Object, or V does not have a - // [[DataView]] internal slot, then throw a TypeError. - if ($e1107ba1f6503d93$var$webidl.util.Type(V) !== "Object" || !$e1107ba1f6503d93$require$types.isDataView(V)) throw $e1107ba1f6503d93$var$webidl.errors.exception({ - header: "DataView", - message: "Object is not a DataView." + else if (type === 'cors') // A CORS filtered response is a filtered response whose type is "cors" + // and header list excludes any headers in internal response’s header + // list whose name is not a CORS-safelisted response-header name, given + // internal response’s CORS-exposed header-name list. + // Note: undici does not implement CORS-safelisted response-header names + return $5e45b3a8f036f1a5$var$makeFilteredResponse(response, { + type: 'cors', + headersList: response.headersList }); - // 2. If the conversion is not to an IDL type associated - // with the [AllowShared] extended attribute, and - // IsSharedArrayBuffer(V.[[ViewedArrayBuffer]]) is true, + else if (type === 'opaque') // An opaque filtered response is a filtered response whose type is + // "opaque", URL list is the empty list, status is 0, status message + // is the empty byte sequence, header list is empty, and body is null. + return $5e45b3a8f036f1a5$var$makeFilteredResponse(response, { + type: 'opaque', + urlList: Object.freeze([]), + status: 0, + statusText: '', + body: null + }); + else if (type === 'opaqueredirect') // An opaque-redirect filtered response is a filtered response whose type + // is "opaqueredirect", status is 0, status message is the empty byte + // sequence, header list is empty, and body is null. + return $5e45b3a8f036f1a5$var$makeFilteredResponse(response, { + type: 'opaqueredirect', + status: 0, + statusText: '', + headersList: [], + body: null + }); + else $in2sP$nodeassert(false); +} +// https://fetch.spec.whatwg.org/#appropriate-network-error +function $5e45b3a8f036f1a5$var$makeAppropriateNetworkError(fetchParams, err = null) { + // 1. Assert: fetchParams is canceled. + $in2sP$nodeassert($5e45b3a8f036f1a5$require$isCancelled(fetchParams)); + // 2. Return an aborted network error if fetchParams is aborted; + // otherwise return a network error. + return $5e45b3a8f036f1a5$require$isAborted(fetchParams) ? $5e45b3a8f036f1a5$var$makeNetworkError(Object.assign(new DOMException('The operation was aborted.', 'AbortError'), { + cause: err + })) : $5e45b3a8f036f1a5$var$makeNetworkError(Object.assign(new DOMException('Request was cancelled.'), { + cause: err + })); +} +// https://whatpr.org/fetch/1392.html#initialize-a-response +function $5e45b3a8f036f1a5$var$initializeResponse(response, init, body) { + // 1. If init["status"] is not in the range 200 to 599, inclusive, then + // throw a RangeError. + 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.'); + // 2. If init["statusText"] does not match the reason-phrase token production, // then throw a TypeError. - if (opts.allowShared === false && $e1107ba1f6503d93$require$types.isSharedArrayBuffer(V.buffer)) throw $e1107ba1f6503d93$var$webidl.errors.exception({ - header: "ArrayBuffer", - message: "SharedArrayBuffer is not allowed." + if ('statusText' in init && init.statusText != null) { + // See, https://datatracker.ietf.org/doc/html/rfc7230#section-3.1.2: + // reason-phrase = *( HTAB / SP / VCHAR / obs-text ) + if (!$5e45b3a8f036f1a5$require$isValidReasonPhrase(String(init.statusText))) throw new TypeError('Invalid statusText'); + } + // 3. Set response’s response’s status to init["status"]. + if ('status' in init && init.status != null) response[$5e45b3a8f036f1a5$require$kState].status = init.status; + // 4. Set response’s response’s status message to init["statusText"]. + if ('statusText' in init && init.statusText != null) response[$5e45b3a8f036f1a5$require$kState].statusText = init.statusText; + // 5. If init["headers"] exists, then fill response’s headers with init["headers"]. + if ('headers' in init && init.headers != null) $5e45b3a8f036f1a5$require$fill(response[$5e45b3a8f036f1a5$require$kHeaders], init.headers); + // 6. If body was given, then: + if (body) { + // 1. If response's status is a null body status, then throw a TypeError. + if ($5e45b3a8f036f1a5$require$nullBodyStatus.includes(response.status)) throw $5e45b3a8f036f1a5$require$webidl.errors.exception({ + header: 'Response constructor', + message: `Invalid response status code ${response.status}` + }); + // 2. Set response's body to body's body. + response[$5e45b3a8f036f1a5$require$kState].body = body.body; + // 3. If body's type is non-null and response's header list does not contain + // `Content-Type`, then append (`Content-Type`, body's type) to response's header list. + if (body.type != null && !response[$5e45b3a8f036f1a5$require$kState].headersList.contains('content-type', true)) response[$5e45b3a8f036f1a5$require$kState].headersList.append('content-type', body.type, true); + } +} +/** + * @see https://fetch.spec.whatwg.org/#response-create + * @param {any} innerResponse + * @param {'request' | 'immutable' | 'request-no-cors' | 'response' | 'none'} guard + * @returns {Response} + */ function $5e45b3a8f036f1a5$var$fromInnerResponse(innerResponse, guard) { + const response = new $5e45b3a8f036f1a5$var$Response($5e45b3a8f036f1a5$require$kConstruct); + response[$5e45b3a8f036f1a5$require$kState] = innerResponse; + response[$5e45b3a8f036f1a5$require$kHeaders] = new $5e45b3a8f036f1a5$require$Headers($5e45b3a8f036f1a5$require$kConstruct); + $5e45b3a8f036f1a5$require$setHeadersList(response[$5e45b3a8f036f1a5$require$kHeaders], innerResponse.headersList); + $5e45b3a8f036f1a5$require$setHeadersGuard(response[$5e45b3a8f036f1a5$require$kHeaders], guard); + if ($5e45b3a8f036f1a5$require$hasFinalizationRegistry && innerResponse.body?.stream) // If the target (response) is reclaimed, the cleanup callback may be called at some point with + // the held value provided for it (innerResponse.body.stream). The held value can be any value: + // a primitive or an object, even undefined. If the held value is an object, the registry keeps + // a strong reference to it (so it can pass it to the cleanup callback later). Reworded from + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry + $5e45b3a8f036f1a5$require$streamRegistry.register(response, new WeakRef(innerResponse.body.stream)); + return response; +} +$5e45b3a8f036f1a5$require$webidl.converters.ReadableStream = $5e45b3a8f036f1a5$require$webidl.interfaceConverter(ReadableStream); +$5e45b3a8f036f1a5$require$webidl.converters.FormData = $5e45b3a8f036f1a5$require$webidl.interfaceConverter($5e45b3a8f036f1a5$require$FormData); +$5e45b3a8f036f1a5$require$webidl.converters.URLSearchParams = $5e45b3a8f036f1a5$require$webidl.interfaceConverter(URLSearchParams); +// https://fetch.spec.whatwg.org/#typedefdef-xmlhttprequestbodyinit +$5e45b3a8f036f1a5$require$webidl.converters.XMLHttpRequestBodyInit = function(V, prefix, name) { + if (typeof V === 'string') return $5e45b3a8f036f1a5$require$webidl.converters.USVString(V, prefix, name); + if ($5e45b3a8f036f1a5$require$isBlobLike(V)) return $5e45b3a8f036f1a5$require$webidl.converters.Blob(V, prefix, name, { + strict: false }); - // 3. If the conversion is not to an IDL type associated - // with the [AllowResizable] extended attribute, and - // IsResizableArrayBuffer(V.[[ViewedArrayBuffer]]) is - // true, then throw a TypeError. - // Note: resizable ArrayBuffers are currently a proposal - // 4. Return the IDL DataView value that is a reference - // to the same object as V. - return V; + if (ArrayBuffer.isView(V) || $5e45b3a8f036f1a5$require$types.isArrayBuffer(V)) return $5e45b3a8f036f1a5$require$webidl.converters.BufferSource(V, prefix, name); + if ($bFRvW.isFormDataLike(V)) return $5e45b3a8f036f1a5$require$webidl.converters.FormData(V, prefix, name, { + strict: false + }); + if (V instanceof URLSearchParams) return $5e45b3a8f036f1a5$require$webidl.converters.URLSearchParams(V, prefix, name); + return $5e45b3a8f036f1a5$require$webidl.converters.DOMString(V, prefix, name); }; -// https://webidl.spec.whatwg.org/#BufferSource -$e1107ba1f6503d93$var$webidl.converters.BufferSource = function(V, opts = {}) { - if ($e1107ba1f6503d93$require$types.isAnyArrayBuffer(V)) return $e1107ba1f6503d93$var$webidl.converters.ArrayBuffer(V, opts); - if ($e1107ba1f6503d93$require$types.isTypedArray(V)) return $e1107ba1f6503d93$var$webidl.converters.TypedArray(V, V.constructor); - if ($e1107ba1f6503d93$require$types.isDataView(V)) return $e1107ba1f6503d93$var$webidl.converters.DataView(V, opts); - throw new TypeError(`Could not convert ${V} to a BufferSource.`); +// https://fetch.spec.whatwg.org/#bodyinit +$5e45b3a8f036f1a5$require$webidl.converters.BodyInit = function(V, prefix, argument) { + if (V instanceof ReadableStream) return $5e45b3a8f036f1a5$require$webidl.converters.ReadableStream(V, prefix, argument); + // Note: the spec doesn't include async iterables, + // this is an undici extension. + if (V?.[Symbol.asyncIterator]) return V; + return $5e45b3a8f036f1a5$require$webidl.converters.XMLHttpRequestBodyInit(V, prefix, argument); }; -$e1107ba1f6503d93$var$webidl.converters["sequence"] = $e1107ba1f6503d93$var$webidl.sequenceConverter($e1107ba1f6503d93$var$webidl.converters.ByteString); -$e1107ba1f6503d93$var$webidl.converters["sequence>"] = $e1107ba1f6503d93$var$webidl.sequenceConverter($e1107ba1f6503d93$var$webidl.converters["sequence"]); -$e1107ba1f6503d93$var$webidl.converters["record"] = $e1107ba1f6503d93$var$webidl.recordConverter($e1107ba1f6503d93$var$webidl.converters.ByteString, $e1107ba1f6503d93$var$webidl.converters.ByteString); +$5e45b3a8f036f1a5$require$webidl.converters.ResponseInit = $5e45b3a8f036f1a5$require$webidl.dictionaryConverter([ + { + key: 'status', + converter: $5e45b3a8f036f1a5$require$webidl.converters['unsigned short'], + defaultValue: ()=>200 + }, + { + key: 'statusText', + converter: $5e45b3a8f036f1a5$require$webidl.converters.ByteString, + defaultValue: ()=>'' + }, + { + key: 'headers', + converter: $5e45b3a8f036f1a5$require$webidl.converters.HeadersInit + } +]); module.exports = { - webidl: $e1107ba1f6503d93$var$webidl + isNetworkError: $5e45b3a8f036f1a5$var$isNetworkError, + makeNetworkError: $5e45b3a8f036f1a5$var$makeNetworkError, + makeResponse: $5e45b3a8f036f1a5$var$makeResponse, + makeAppropriateNetworkError: $5e45b3a8f036f1a5$var$makeAppropriateNetworkError, + filterResponse: $5e45b3a8f036f1a5$var$filterResponse, + Response: $5e45b3a8f036f1a5$var$Response, + cloneResponse: $5e45b3a8f036f1a5$var$cloneResponse, + fromInnerResponse: $5e45b3a8f036f1a5$var$fromInnerResponse }; }); +parcelRegister("3dLRE", function(module, exports) { +// https://github.com/Ethan-Arrowood/undici-fetch +'use strict'; + +var $gNVEc = parcelRequire("gNVEc"); +var $2587b6dc681c2132$require$kConstruct = $gNVEc.kConstruct; + +var $bFRvW = parcelRequire("bFRvW"); +var $2587b6dc681c2132$require$kEnumerableProperty = $bFRvW.kEnumerableProperty; -parcelRegister("bNorT", function(module, exports) { +var $7z0I9 = parcelRequire("7z0I9"); +var $2587b6dc681c2132$require$iteratorMixin = $7z0I9.iteratorMixin; +var $2587b6dc681c2132$require$isValidHeaderName = $7z0I9.isValidHeaderName; +var $2587b6dc681c2132$require$isValidHeaderValue = $7z0I9.isValidHeaderValue; +var $5HTG7 = parcelRequire("5HTG7"); +var $2587b6dc681c2132$require$webidl = $5HTG7.webidl; -var $89673c5fd6cf6b33$require$atob = $g40fK$buffer.atob; -var $4EkpM = parcelRequire("4EkpM"); -var $89673c5fd6cf6b33$require$isomorphicDecode = $4EkpM.isomorphicDecode; -const $89673c5fd6cf6b33$var$encoder = new TextEncoder(); +const $2587b6dc681c2132$var$kHeadersMap = Symbol('headers map'); +const $2587b6dc681c2132$var$kHeadersSortedMap = Symbol('headers map sorted'); /** - * @see https://mimesniff.spec.whatwg.org/#http-token-code-point - */ const $89673c5fd6cf6b33$var$HTTP_TOKEN_CODEPOINTS = /^[!#$%&'*+-.^_|~A-Za-z0-9]+$/; -const $89673c5fd6cf6b33$var$HTTP_WHITESPACE_REGEX = /(\u000A|\u000D|\u0009|\u0020)/ // eslint-disable-line -; + * @param {number} code + */ function $2587b6dc681c2132$var$isHTTPWhiteSpaceCharCode(code) { + return code === 0x00a || code === 0x00d || code === 0x009 || code === 0x020; +} /** - * @see https://mimesniff.spec.whatwg.org/#http-quoted-string-token-code-point - */ const $89673c5fd6cf6b33$var$HTTP_QUOTED_STRING_TOKENS = /[\u0009|\u0020-\u007E|\u0080-\u00FF]/ // eslint-disable-line -; -// https://fetch.spec.whatwg.org/#data-url-processor -/** @param {URL} dataURL */ function $89673c5fd6cf6b33$var$dataURLProcessor(dataURL) { - // 1. Assert: dataURL’s scheme is "data". - $g40fK$assert(dataURL.protocol === "data:"); - // 2. Let input be the result of running the URL - // serializer on dataURL with exclude fragment - // set to true. - let input = $89673c5fd6cf6b33$var$URLSerializer(dataURL, true); - // 3. Remove the leading "data:" string from input. - input = input.slice(5); - // 4. Let position point at the start of input. - const position = { - position: 0 - }; - // 5. Let mimeType be the result of collecting a - // sequence of code points that are not equal - // to U+002C (,), given position. - let mimeType = $89673c5fd6cf6b33$var$collectASequenceOfCodePointsFast(",", input, position); - // 6. Strip leading and trailing ASCII whitespace - // from mimeType. - // Undici implementation note: we need to store the - // length because if the mimetype has spaces removed, - // the wrong amount will be sliced from the input in - // step #9 - const mimeTypeLength = mimeType.length; - mimeType = $89673c5fd6cf6b33$var$removeASCIIWhitespace(mimeType, true, true); - // 7. If position is past the end of input, then - // return failure - if (position.position >= input.length) return "failure"; - // 8. Advance position by 1. - position.position++; - // 9. Let encodedBody be the remainder of input. - const encodedBody = input.slice(mimeTypeLength + 1); - // 10. Let body be the percent-decoding of encodedBody. - let body = $89673c5fd6cf6b33$var$stringPercentDecode(encodedBody); - // 11. If mimeType ends with U+003B (;), followed by - // zero or more U+0020 SPACE, followed by an ASCII - // case-insensitive match for "base64", then: - if (/;(\u0020){0,}base64$/i.test(mimeType)) { - // 1. Let stringBody be the isomorphic decode of body. - const stringBody = $89673c5fd6cf6b33$require$isomorphicDecode(body); - // 2. Set body to the forgiving-base64 decode of - // stringBody. - body = $89673c5fd6cf6b33$var$forgivingBase64(stringBody); - // 3. If body is failure, then return failure. - if (body === "failure") return "failure"; - // 4. Remove the last 6 code points from mimeType. - mimeType = mimeType.slice(0, -6); - // 5. Remove trailing U+0020 SPACE code points from mimeType, - // if any. - mimeType = mimeType.replace(/(\u0020)+$/, ""); - // 6. Remove the last U+003B (;) code point from mimeType. - mimeType = mimeType.slice(0, -1); - } - // 12. If mimeType starts with U+003B (;), then prepend - // "text/plain" to mimeType. - if (mimeType.startsWith(";")) mimeType = "text/plain" + mimeType; - // 13. Let mimeTypeRecord be the result of parsing - // mimeType. - let mimeTypeRecord = $89673c5fd6cf6b33$var$parseMIMEType(mimeType); - // 14. If mimeTypeRecord is failure, then set - // mimeTypeRecord to text/plain;charset=US-ASCII. - if (mimeTypeRecord === "failure") mimeTypeRecord = $89673c5fd6cf6b33$var$parseMIMEType("text/plain;charset=US-ASCII"); - // 15. Return a new data: URL struct whose MIME - // type is mimeTypeRecord and body is body. - // https://fetch.spec.whatwg.org/#data-url-struct - return { - mimeType: mimeTypeRecord, - body: body - }; -} -// https://url.spec.whatwg.org/#concept-url-serializer -/** - * @param {URL} url - * @param {boolean} excludeFragment - */ function $89673c5fd6cf6b33$var$URLSerializer(url, excludeFragment = false) { - if (!excludeFragment) return url.href; - const href = url.href; - const hashLength = url.hash.length; - return hashLength === 0 ? href : href.substring(0, href.length - hashLength); + * @see https://fetch.spec.whatwg.org/#concept-header-value-normalize + * @param {string} potentialValue + */ function $2587b6dc681c2132$var$headerValueNormalize(potentialValue) { + // To normalize a byte sequence potentialValue, remove + // any leading and trailing HTTP whitespace bytes from + // potentialValue. + let i = 0; + let j = potentialValue.length; + while(j > i && $2587b6dc681c2132$var$isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(j - 1)))--j; + while(j > i && $2587b6dc681c2132$var$isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(i)))++i; + return i === 0 && j === potentialValue.length ? potentialValue : potentialValue.substring(i, j); } -// https://infra.spec.whatwg.org/#collect-a-sequence-of-code-points -/** - * @param {(char: string) => boolean} condition - * @param {string} input - * @param {{ position: number }} position - */ function $89673c5fd6cf6b33$var$collectASequenceOfCodePoints(condition, input, position) { - // 1. Let result be the empty string. - let result = ""; - // 2. While position doesn’t point past the end of input and the - // code point at position within input meets the condition condition: - while(position.position < input.length && condition(input[position.position])){ - // 1. Append that code point to the end of result. - result += input[position.position]; - // 2. Advance position by 1. - position.position++; +function $2587b6dc681c2132$var$fill(headers, object) { + // To fill a Headers object headers with a given object object, run these steps: + // 1. If object is a sequence, then for each header in object: + // Note: webidl conversion to array has already been done. + if (Array.isArray(object)) for(let i = 0; i < object.length; ++i){ + const header = object[i]; + // 1. If header does not contain exactly two items, then throw a TypeError. + if (header.length !== 2) throw $2587b6dc681c2132$require$webidl.errors.exception({ + header: 'Headers constructor', + message: `expected name/value pair to be length 2, found ${header.length}.` + }); + // 2. Append (header’s first item, header’s second item) to headers. + $2587b6dc681c2132$var$appendHeader(headers, header[0], header[1]); } - // 3. Return result. - return result; + else if (typeof object === 'object' && object !== null) { + // Note: null should throw + // 2. Otherwise, object is a record, then for each key → value in object, + // append (key, value) to headers + const keys = Object.keys(object); + for(let i = 0; i < keys.length; ++i)$2587b6dc681c2132$var$appendHeader(headers, keys[i], object[keys[i]]); + } else throw $2587b6dc681c2132$require$webidl.errors.conversionFailed({ + prefix: 'Headers constructor', + argument: 'Argument 1', + types: [ + 'sequence>', + 'record' + ] + }); } /** - * A faster collectASequenceOfCodePoints that only works when comparing a single character. - * @param {string} char - * @param {string} input - * @param {{ position: number }} position - */ function $89673c5fd6cf6b33$var$collectASequenceOfCodePointsFast(char, input, position) { - const idx = input.indexOf(char, position.position); - const start = position.position; - if (idx === -1) { - position.position = input.length; - return input.slice(start); - } - position.position = idx; - return input.slice(start, position.position); -} -// https://url.spec.whatwg.org/#string-percent-decode -/** @param {string} input */ function $89673c5fd6cf6b33$var$stringPercentDecode(input) { - // 1. Let bytes be the UTF-8 encoding of input. - const bytes = $89673c5fd6cf6b33$var$encoder.encode(input); - // 2. Return the percent-decoding of bytes. - return $89673c5fd6cf6b33$var$percentDecode(bytes); + * @see https://fetch.spec.whatwg.org/#concept-headers-append + */ function $2587b6dc681c2132$var$appendHeader(headers, name, value) { + // 1. Normalize value. + value = $2587b6dc681c2132$var$headerValueNormalize(value); + // 2. If name is not a header name or value is not a + // header value, then throw a TypeError. + if (!$2587b6dc681c2132$require$isValidHeaderName(name)) throw $2587b6dc681c2132$require$webidl.errors.invalidArgument({ + prefix: 'Headers.append', + value: name, + type: 'header name' + }); + else if (!$2587b6dc681c2132$require$isValidHeaderValue(value)) throw $2587b6dc681c2132$require$webidl.errors.invalidArgument({ + prefix: 'Headers.append', + value: value, + type: 'header value' + }); + // 3. If headers’s guard is "immutable", then throw a TypeError. + // 4. Otherwise, if headers’s guard is "request" and name is a + // forbidden header name, return. + // 5. Otherwise, if headers’s guard is "request-no-cors": + // TODO + // Note: undici does not implement forbidden header names + if ($2587b6dc681c2132$var$getHeadersGuard(headers) === 'immutable') throw new TypeError('immutable'); + // 6. Otherwise, if headers’s guard is "response" and name is a + // forbidden response-header name, return. + // 7. Append (name, value) to headers’s header list. + return $2587b6dc681c2132$var$getHeadersList(headers).append(name, value, false); +// 8. If headers’s guard is "request-no-cors", then remove +// privileged no-CORS request headers from headers } -// https://url.spec.whatwg.org/#percent-decode -/** @param {Uint8Array} input */ function $89673c5fd6cf6b33$var$percentDecode(input) { - // 1. Let output be an empty byte sequence. - /** @type {number[]} */ const output = []; - // 2. For each byte byte in input: - for(let i = 0; i < input.length; i++){ - const byte = input[i]; - // 1. If byte is not 0x25 (%), then append byte to output. - if (byte !== 0x25) output.push(byte); - else if (byte === 0x25 && !/^[0-9A-Fa-f]{2}$/i.test(String.fromCharCode(input[i + 1], input[i + 2]))) output.push(0x25); - else { - // 1. Let bytePoint be the two bytes after byte in input, - // decoded, and then interpreted as hexadecimal number. - const nextTwoBytes = String.fromCharCode(input[i + 1], input[i + 2]); - const bytePoint = Number.parseInt(nextTwoBytes, 16); - // 2. Append a byte whose value is bytePoint to output. - output.push(bytePoint); - // 3. Skip the next two bytes in input. - i += 2; - } - } - // 3. Return output. - return Uint8Array.from(output); +function $2587b6dc681c2132$var$compareHeaderName(a, b) { + return a[0] < b[0] ? -1 : 1; } -// https://mimesniff.spec.whatwg.org/#parse-a-mime-type -/** @param {string} input */ function $89673c5fd6cf6b33$var$parseMIMEType(input) { - // 1. Remove any leading and trailing HTTP whitespace - // from input. - input = $89673c5fd6cf6b33$var$removeHTTPWhitespace(input, true, true); - // 2. Let position be a position variable for input, - // initially pointing at the start of input. - const position = { - position: 0 - }; - // 3. Let type be the result of collecting a sequence - // of code points that are not U+002F (/) from - // input, given position. - const type = $89673c5fd6cf6b33$var$collectASequenceOfCodePointsFast("/", input, position); - // 4. If type is the empty string or does not solely - // contain HTTP token code points, then return failure. - // https://mimesniff.spec.whatwg.org/#http-token-code-point - if (type.length === 0 || !$89673c5fd6cf6b33$var$HTTP_TOKEN_CODEPOINTS.test(type)) return "failure"; - // 5. If position is past the end of input, then return - // failure - if (position.position > input.length) return "failure"; - // 6. Advance position by 1. (This skips past U+002F (/).) - position.position++; - // 7. Let subtype be the result of collecting a sequence of - // code points that are not U+003B (;) from input, given - // position. - let subtype = $89673c5fd6cf6b33$var$collectASequenceOfCodePointsFast(";", input, position); - // 8. Remove any trailing HTTP whitespace from subtype. - subtype = $89673c5fd6cf6b33$var$removeHTTPWhitespace(subtype, false, true); - // 9. If subtype is the empty string or does not solely - // contain HTTP token code points, then return failure. - if (subtype.length === 0 || !$89673c5fd6cf6b33$var$HTTP_TOKEN_CODEPOINTS.test(subtype)) return "failure"; - const typeLowercase = type.toLowerCase(); - const subtypeLowercase = subtype.toLowerCase(); - // 10. Let mimeType be a new MIME type record whose type - // is type, in ASCII lowercase, and subtype is subtype, - // in ASCII lowercase. - // https://mimesniff.spec.whatwg.org/#mime-type - const mimeType = { - type: typeLowercase, - subtype: subtypeLowercase, - /** @type {Map} */ parameters: new Map(), - // https://mimesniff.spec.whatwg.org/#mime-type-essence - essence: `${typeLowercase}/${subtypeLowercase}` - }; - // 11. While position is not past the end of input: - while(position.position < input.length){ - // 1. Advance position by 1. (This skips past U+003B (;).) - position.position++; - // 2. Collect a sequence of code points that are HTTP - // whitespace from input given position. - $89673c5fd6cf6b33$var$collectASequenceOfCodePoints(// https://fetch.spec.whatwg.org/#http-whitespace - (char)=>$89673c5fd6cf6b33$var$HTTP_WHITESPACE_REGEX.test(char), input, position); - // 3. Let parameterName be the result of collecting a - // sequence of code points that are not U+003B (;) - // or U+003D (=) from input, given position. - let parameterName = $89673c5fd6cf6b33$var$collectASequenceOfCodePoints((char)=>char !== ";" && char !== "=", input, position); - // 4. Set parameterName to parameterName, in ASCII - // lowercase. - parameterName = parameterName.toLowerCase(); - // 5. If position is not past the end of input, then: - if (position.position < input.length) { - // 1. If the code point at position within input is - // U+003B (;), then continue. - if (input[position.position] === ";") continue; - // 2. Advance position by 1. (This skips past U+003D (=).) - position.position++; - } - // 6. If position is past the end of input, then break. - if (position.position > input.length) break; - // 7. Let parameterValue be null. - let parameterValue = null; - // 8. If the code point at position within input is - // U+0022 ("), then: - if (input[position.position] === '"') { - // 1. Set parameterValue to the result of collecting - // an HTTP quoted string from input, given position - // and the extract-value flag. - parameterValue = $89673c5fd6cf6b33$var$collectAnHTTPQuotedString(input, position, true); - // 2. Collect a sequence of code points that are not - // U+003B (;) from input, given position. - $89673c5fd6cf6b33$var$collectASequenceOfCodePointsFast(";", input, position); - // 9. Otherwise: +class $2587b6dc681c2132$var$HeadersList { + /** @type {[string, string][]|null} */ cookies = null; + constructor(init){ + if (init instanceof $2587b6dc681c2132$var$HeadersList) { + this[$2587b6dc681c2132$var$kHeadersMap] = new Map(init[$2587b6dc681c2132$var$kHeadersMap]); + this[$2587b6dc681c2132$var$kHeadersSortedMap] = init[$2587b6dc681c2132$var$kHeadersSortedMap]; + this.cookies = init.cookies === null ? null : [ + ...init.cookies + ]; } else { - // 1. Set parameterValue to the result of collecting - // a sequence of code points that are not U+003B (;) - // from input, given position. - parameterValue = $89673c5fd6cf6b33$var$collectASequenceOfCodePointsFast(";", input, position); - // 2. Remove any trailing HTTP whitespace from parameterValue. - parameterValue = $89673c5fd6cf6b33$var$removeHTTPWhitespace(parameterValue, false, true); - // 3. If parameterValue is the empty string, then continue. - if (parameterValue.length === 0) continue; + this[$2587b6dc681c2132$var$kHeadersMap] = new Map(init); + this[$2587b6dc681c2132$var$kHeadersSortedMap] = null; } - // 10. If all of the following are true - // - parameterName is not the empty string - // - parameterName solely contains HTTP token code points - // - parameterValue solely contains HTTP quoted-string token code points - // - mimeType’s parameters[parameterName] does not exist - // then set mimeType’s parameters[parameterName] to parameterValue. - if (parameterName.length !== 0 && $89673c5fd6cf6b33$var$HTTP_TOKEN_CODEPOINTS.test(parameterName) && (parameterValue.length === 0 || $89673c5fd6cf6b33$var$HTTP_QUOTED_STRING_TOKENS.test(parameterValue)) && !mimeType.parameters.has(parameterName)) mimeType.parameters.set(parameterName, parameterValue); } - // 12. Return mimeType. - return mimeType; -} -// https://infra.spec.whatwg.org/#forgiving-base64-decode -/** @param {string} data */ function $89673c5fd6cf6b33$var$forgivingBase64(data) { - // 1. Remove all ASCII whitespace from data. - data = data.replace(/[\u0009\u000A\u000C\u000D\u0020]/g, "") // eslint-disable-line - ; - // 2. If data’s code point length divides by 4 leaving - // no remainder, then: - if (data.length % 4 === 0) // 1. If data ends with one or two U+003D (=) code points, - // then remove them from data. - data = data.replace(/=?=$/, ""); - // 3. If data’s code point length divides by 4 leaving - // a remainder of 1, then return failure. - if (data.length % 4 === 1) return "failure"; - // 4. If data contains a code point that is not one of - // U+002B (+) - // U+002F (/) - // ASCII alphanumeric - // then return failure. - if (/[^+/0-9A-Za-z]/.test(data)) return "failure"; - const binary = $89673c5fd6cf6b33$require$atob(data); - const bytes = new Uint8Array(binary.length); - for(let byte = 0; byte < binary.length; byte++)bytes[byte] = binary.charCodeAt(byte); - return bytes; -} -// https://fetch.spec.whatwg.org/#collect-an-http-quoted-string -// tests: https://fetch.spec.whatwg.org/#example-http-quoted-string -/** - * @param {string} input - * @param {{ position: number }} position - * @param {boolean?} extractValue - */ function $89673c5fd6cf6b33$var$collectAnHTTPQuotedString(input, position, extractValue) { - // 1. Let positionStart be position. - const positionStart = position.position; - // 2. Let value be the empty string. - let value = ""; - // 3. Assert: the code point at position within input - // is U+0022 ("). - $g40fK$assert(input[position.position] === '"'); - // 4. Advance position by 1. - position.position++; - // 5. While true: - while(true){ - // 1. Append the result of collecting a sequence of code points - // that are not U+0022 (") or U+005C (\) from input, given - // position, to value. - value += $89673c5fd6cf6b33$var$collectASequenceOfCodePoints((char)=>char !== '"' && char !== "\\", input, position); - // 2. If position is past the end of input, then break. - if (position.position >= input.length) break; - // 3. Let quoteOrBackslash be the code point at position within - // input. - const quoteOrBackslash = input[position.position]; - // 4. Advance position by 1. - position.position++; - // 5. If quoteOrBackslash is U+005C (\), then: - if (quoteOrBackslash === "\\") { - // 1. If position is past the end of input, then append - // U+005C (\) to value and break. - if (position.position >= input.length) { - value += "\\"; - break; - } - // 2. Append the code point at position within input to value. - value += input[position.position]; - // 3. Advance position by 1. - position.position++; - // 6. Otherwise: - } else { - // 1. Assert: quoteOrBackslash is U+0022 ("). - $g40fK$assert(quoteOrBackslash === '"'); - break; - } - } - // 6. If the extract-value flag is set, then return value. - if (extractValue) return value; - // 7. Return the code points from positionStart to position, - // inclusive, within input. - return input.slice(positionStart, position.position); -} -/** - * @see https://mimesniff.spec.whatwg.org/#serialize-a-mime-type - */ function $89673c5fd6cf6b33$var$serializeAMimeType(mimeType) { - $g40fK$assert(mimeType !== "failure"); - const { parameters: parameters, essence: essence } = mimeType; - // 1. Let serialization be the concatenation of mimeType’s - // type, U+002F (/), and mimeType’s subtype. - let serialization = essence; - // 2. For each name → value of mimeType’s parameters: - for (let [name, value] of parameters.entries()){ - // 1. Append U+003B (;) to serialization. - serialization += ";"; - // 2. Append name to serialization. - serialization += name; - // 3. Append U+003D (=) to serialization. - serialization += "="; - // 4. If value does not solely contain HTTP token code - // points or value is the empty string, then: - if (!$89673c5fd6cf6b33$var$HTTP_TOKEN_CODEPOINTS.test(value)) { - // 1. Precede each occurence of U+0022 (") or - // U+005C (\) in value with U+005C (\). - value = value.replace(/(\\|")/g, "\\$1"); - // 2. Prepend U+0022 (") to value. - value = '"' + value; - // 3. Append U+0022 (") to value. - value += '"'; - } - // 5. Append value to serialization. - serialization += value; - } - // 3. Return serialization. - return serialization; -} -/** - * @see https://fetch.spec.whatwg.org/#http-whitespace - * @param {string} char - */ function $89673c5fd6cf6b33$var$isHTTPWhiteSpace(char) { - return char === "\r" || char === "\n" || char === " " || char === " "; -} -/** - * @see https://fetch.spec.whatwg.org/#http-whitespace - * @param {string} str - */ function $89673c5fd6cf6b33$var$removeHTTPWhitespace(str, leading = true, trailing = true) { - let lead = 0; - let trail = str.length - 1; - if (leading) { - for(; lead < str.length && $89673c5fd6cf6b33$var$isHTTPWhiteSpace(str[lead]); lead++); + /** + * @see https://fetch.spec.whatwg.org/#header-list-contains + * @param {string} name + * @param {boolean} isLowerCase + */ contains(name, isLowerCase) { + // A header list list contains a header name name if list + // contains a header whose name is a byte-case-insensitive + // match for name. + return this[$2587b6dc681c2132$var$kHeadersMap].has(isLowerCase ? name : name.toLowerCase()); } - if (trailing) { - for(; trail > 0 && $89673c5fd6cf6b33$var$isHTTPWhiteSpace(str[trail]); trail--); + clear() { + this[$2587b6dc681c2132$var$kHeadersMap].clear(); + this[$2587b6dc681c2132$var$kHeadersSortedMap] = null; + this.cookies = null; } - return str.slice(lead, trail + 1); -} -/** - * @see https://infra.spec.whatwg.org/#ascii-whitespace - * @param {string} char - */ function $89673c5fd6cf6b33$var$isASCIIWhitespace(char) { - return char === "\r" || char === "\n" || char === " " || char === "\f" || char === " "; -} -/** - * @see https://infra.spec.whatwg.org/#strip-leading-and-trailing-ascii-whitespace - */ function $89673c5fd6cf6b33$var$removeASCIIWhitespace(str, leading = true, trailing = true) { - let lead = 0; - let trail = str.length - 1; - if (leading) { - for(; lead < str.length && $89673c5fd6cf6b33$var$isASCIIWhitespace(str[lead]); lead++); + /** + * @see https://fetch.spec.whatwg.org/#concept-header-list-append + * @param {string} name + * @param {string} value + * @param {boolean} isLowerCase + */ append(name, value, isLowerCase) { + this[$2587b6dc681c2132$var$kHeadersSortedMap] = null; + // 1. If list contains name, then set name to the first such + // header’s name. + const lowercaseName = isLowerCase ? name : name.toLowerCase(); + const exists = this[$2587b6dc681c2132$var$kHeadersMap].get(lowercaseName); + // 2. Append (name, value) to list. + if (exists) { + const delimiter = lowercaseName === 'cookie' ? '; ' : ', '; + this[$2587b6dc681c2132$var$kHeadersMap].set(lowercaseName, { + name: exists.name, + value: `${exists.value}${delimiter}${value}` + }); + } else this[$2587b6dc681c2132$var$kHeadersMap].set(lowercaseName, { + name: name, + value: value + }); + if (lowercaseName === 'set-cookie') (this.cookies ??= []).push(value); } - if (trailing) { - for(; trail > 0 && $89673c5fd6cf6b33$var$isASCIIWhitespace(str[trail]); trail--); + /** + * @see https://fetch.spec.whatwg.org/#concept-header-list-set + * @param {string} name + * @param {string} value + * @param {boolean} isLowerCase + */ set(name, value, isLowerCase) { + this[$2587b6dc681c2132$var$kHeadersSortedMap] = null; + const lowercaseName = isLowerCase ? name : name.toLowerCase(); + if (lowercaseName === 'set-cookie') this.cookies = [ + value + ]; + // 1. If list contains name, then set the value of + // the first such header to value and remove the + // others. + // 2. Otherwise, append header (name, value) to list. + this[$2587b6dc681c2132$var$kHeadersMap].set(lowercaseName, { + name: name, + value: value + }); } - return str.slice(lead, trail + 1); -} -module.exports = { - dataURLProcessor: $89673c5fd6cf6b33$var$dataURLProcessor, - URLSerializer: $89673c5fd6cf6b33$var$URLSerializer, - collectASequenceOfCodePoints: $89673c5fd6cf6b33$var$collectASequenceOfCodePoints, - collectASequenceOfCodePointsFast: $89673c5fd6cf6b33$var$collectASequenceOfCodePointsFast, - stringPercentDecode: $89673c5fd6cf6b33$var$stringPercentDecode, - parseMIMEType: $89673c5fd6cf6b33$var$parseMIMEType, - collectAnHTTPQuotedString: $89673c5fd6cf6b33$var$collectAnHTTPQuotedString, - serializeAMimeType: $89673c5fd6cf6b33$var$serializeAMimeType -}; - -}); - - - - - -parcelRegister("8lFjX", function(module, exports) { -"use strict"; - -var $kRVHu = parcelRequire("kRVHu"); - -var $cKdp7 = parcelRequire("cKdp7"); -var $61405656c6939d5e$require$ClientDestroyedError = $cKdp7.ClientDestroyedError; -var $61405656c6939d5e$require$ClientClosedError = $cKdp7.ClientClosedError; -var $61405656c6939d5e$require$InvalidArgumentError = $cKdp7.InvalidArgumentError; - -var $hHZvh = parcelRequire("hHZvh"); -var $61405656c6939d5e$require$kDestroy = $hHZvh.kDestroy; -var $61405656c6939d5e$require$kClose = $hHZvh.kClose; -var $61405656c6939d5e$require$kDispatch = $hHZvh.kDispatch; -var $61405656c6939d5e$require$kInterceptors = $hHZvh.kInterceptors; -const $61405656c6939d5e$var$kDestroyed = Symbol("destroyed"); -const $61405656c6939d5e$var$kClosed = Symbol("closed"); -const $61405656c6939d5e$var$kOnDestroyed = Symbol("onDestroyed"); -const $61405656c6939d5e$var$kOnClosed = Symbol("onClosed"); -const $61405656c6939d5e$var$kInterceptedDispatch = Symbol("Intercepted Dispatch"); -class $61405656c6939d5e$var$DispatcherBase extends $kRVHu { - constructor(){ - super(); - this[$61405656c6939d5e$var$kDestroyed] = false; - this[$61405656c6939d5e$var$kOnDestroyed] = null; - this[$61405656c6939d5e$var$kClosed] = false; - this[$61405656c6939d5e$var$kOnClosed] = []; + /** + * @see https://fetch.spec.whatwg.org/#concept-header-list-delete + * @param {string} name + * @param {boolean} isLowerCase + */ delete(name, isLowerCase) { + this[$2587b6dc681c2132$var$kHeadersSortedMap] = null; + if (!isLowerCase) name = name.toLowerCase(); + if (name === 'set-cookie') this.cookies = null; + this[$2587b6dc681c2132$var$kHeadersMap].delete(name); } - get destroyed() { - return this[$61405656c6939d5e$var$kDestroyed]; + /** + * @see https://fetch.spec.whatwg.org/#concept-header-list-get + * @param {string} name + * @param {boolean} isLowerCase + * @returns {string | null} + */ get(name, isLowerCase) { + // 1. If list does not contain name, then return null. + // 2. Return the values of all headers in list whose name + // is a byte-case-insensitive match for name, + // separated from each other by 0x2C 0x20, in order. + return this[$2587b6dc681c2132$var$kHeadersMap].get(isLowerCase ? name : name.toLowerCase())?.value ?? null; } - get closed() { - return this[$61405656c6939d5e$var$kClosed]; + *[Symbol.iterator]() { + // use the lowercased name + for (const { 0: name, 1: { value: value } } of this[$2587b6dc681c2132$var$kHeadersMap])yield [ + name, + value + ]; } - get interceptors() { - return this[$61405656c6939d5e$require$kInterceptors]; + get entries() { + const headers = {}; + if (this[$2587b6dc681c2132$var$kHeadersMap].size !== 0) for (const { name: name, value: value } of this[$2587b6dc681c2132$var$kHeadersMap].values())headers[name] = value; + return headers; } - set interceptors(newInterceptors) { - if (newInterceptors) for(let i = newInterceptors.length - 1; i >= 0; i--){ - const interceptor = this[$61405656c6939d5e$require$kInterceptors][i]; - if (typeof interceptor !== "function") throw new $61405656c6939d5e$require$InvalidArgumentError("interceptor must be an function"); - } - this[$61405656c6939d5e$require$kInterceptors] = newInterceptors; + rawValues() { + return this[$2587b6dc681c2132$var$kHeadersMap].values(); } - close(callback) { - if (callback === undefined) return new Promise((resolve, reject)=>{ - this.close((err, data)=>{ - return err ? reject(err) : resolve(data); - }); - }); - if (typeof callback !== "function") throw new $61405656c6939d5e$require$InvalidArgumentError("invalid callback"); - if (this[$61405656c6939d5e$var$kDestroyed]) { - queueMicrotask(()=>callback(new $61405656c6939d5e$require$ClientDestroyedError(), null)); - return; - } - if (this[$61405656c6939d5e$var$kClosed]) { - if (this[$61405656c6939d5e$var$kOnClosed]) this[$61405656c6939d5e$var$kOnClosed].push(callback); - else queueMicrotask(()=>callback(null, null)); - return; + get entriesList() { + const headers = []; + if (this[$2587b6dc681c2132$var$kHeadersMap].size !== 0) for (const { 0: lowerName, 1: { name: name, value: value } } of this[$2587b6dc681c2132$var$kHeadersMap]){ + if (lowerName === 'set-cookie') for (const cookie of this.cookies)headers.push([ + name, + cookie + ]); + else headers.push([ + name, + value + ]); } - this[$61405656c6939d5e$var$kClosed] = true; - this[$61405656c6939d5e$var$kOnClosed].push(callback); - const onClosed = ()=>{ - const callbacks = this[$61405656c6939d5e$var$kOnClosed]; - this[$61405656c6939d5e$var$kOnClosed] = null; - for(let i = 0; i < callbacks.length; i++)callbacks[i](null, null); - }; - // Should not error. - this[$61405656c6939d5e$require$kClose]().then(()=>this.destroy()).then(()=>{ - queueMicrotask(onClosed); - }); + return headers; } - destroy(err, callback) { - if (typeof err === "function") { - callback = err; - err = null; - } - if (callback === undefined) return new Promise((resolve, reject)=>{ - this.destroy(err, (err, data)=>{ - return err ? /* istanbul ignore next: should never error */ reject(err) : resolve(data); - }); - }); - if (typeof callback !== "function") throw new $61405656c6939d5e$require$InvalidArgumentError("invalid callback"); - if (this[$61405656c6939d5e$var$kDestroyed]) { - if (this[$61405656c6939d5e$var$kOnDestroyed]) this[$61405656c6939d5e$var$kOnDestroyed].push(callback); - else queueMicrotask(()=>callback(null, null)); - return; + // https://fetch.spec.whatwg.org/#convert-header-names-to-a-sorted-lowercase-set + toSortedArray() { + const size = this[$2587b6dc681c2132$var$kHeadersMap].size; + const array = new Array(size); + // In most cases, you will use the fast-path. + // fast-path: Use binary insertion sort for small arrays. + if (size <= 32) { + if (size === 0) // If empty, it is an empty array. To avoid the first index assignment. + return array; + // Improve performance by unrolling loop and avoiding double-loop. + // Double-loop-less version of the binary insertion sort. + const iterator = this[$2587b6dc681c2132$var$kHeadersMap][Symbol.iterator](); + const firstValue = iterator.next().value; + // set [name, value] to first index. + array[0] = [ + firstValue[0], + firstValue[1].value + ]; + // https://fetch.spec.whatwg.org/#concept-header-list-sort-and-combine + // 3.2.2. Assert: value is non-null. + $in2sP$nodeassert(firstValue[1].value !== null); + for(let i = 1, j = 0, right = 0, left = 0, pivot = 0, x, value; i < size; ++i){ + // get next value + value = iterator.next().value; + // set [name, value] to current index. + x = array[i] = [ + value[0], + value[1].value + ]; + // https://fetch.spec.whatwg.org/#concept-header-list-sort-and-combine + // 3.2.2. Assert: value is non-null. + $in2sP$nodeassert(x[1] !== null); + left = 0; + right = i; + // binary search + while(left < right){ + // middle index + pivot = left + (right - left >> 1); + // compare header name + if (array[pivot][0] <= x[0]) left = pivot + 1; + else right = pivot; + } + if (i !== pivot) { + j = i; + while(j > left)array[j] = array[--j]; + array[left] = x; + } + } + /* c8 ignore next 4 */ if (!iterator.next().done) // This is for debugging and will never be called. + throw new TypeError('Unreachable'); + return array; + } else { + // This case would be a rare occurrence. + // slow-path: fallback + let i = 0; + for (const { 0: name, 1: { value: value } } of this[$2587b6dc681c2132$var$kHeadersMap]){ + array[i++] = [ + name, + value + ]; + // https://fetch.spec.whatwg.org/#concept-header-list-sort-and-combine + // 3.2.2. Assert: value is non-null. + $in2sP$nodeassert(value !== null); + } + return array.sort($2587b6dc681c2132$var$compareHeaderName); } - if (!err) err = new $61405656c6939d5e$require$ClientDestroyedError(); - this[$61405656c6939d5e$var$kDestroyed] = true; - this[$61405656c6939d5e$var$kOnDestroyed] = this[$61405656c6939d5e$var$kOnDestroyed] || []; - this[$61405656c6939d5e$var$kOnDestroyed].push(callback); - const onDestroyed = ()=>{ - const callbacks = this[$61405656c6939d5e$var$kOnDestroyed]; - this[$61405656c6939d5e$var$kOnDestroyed] = null; - for(let i = 0; i < callbacks.length; i++)callbacks[i](null, null); - }; - // Should not error. - this[$61405656c6939d5e$require$kDestroy](err).then(()=>{ - queueMicrotask(onDestroyed); - }); } - [$61405656c6939d5e$var$kInterceptedDispatch](opts, handler) { - if (!this[$61405656c6939d5e$require$kInterceptors] || this[$61405656c6939d5e$require$kInterceptors].length === 0) { - this[$61405656c6939d5e$var$kInterceptedDispatch] = this[$61405656c6939d5e$require$kDispatch]; - return this[$61405656c6939d5e$require$kDispatch](opts, handler); +} +// https://fetch.spec.whatwg.org/#headers-class +class $2587b6dc681c2132$var$Headers { + #guard; + #headersList; + constructor(init){ + $2587b6dc681c2132$require$webidl.util.markAsUncloneable(this); + if (init === $2587b6dc681c2132$require$kConstruct) return; + this.#headersList = new $2587b6dc681c2132$var$HeadersList(); + // The new Headers(init) constructor steps are: + // 1. Set this’s guard to "none". + this.#guard = 'none'; + // 2. If init is given, then fill this with init. + if (init !== undefined) { + init = $2587b6dc681c2132$require$webidl.converters.HeadersInit(init, 'Headers contructor', 'init'); + $2587b6dc681c2132$var$fill(this, init); } - let dispatch = this[$61405656c6939d5e$require$kDispatch].bind(this); - for(let i = this[$61405656c6939d5e$require$kInterceptors].length - 1; i >= 0; i--)dispatch = this[$61405656c6939d5e$require$kInterceptors][i](dispatch); - this[$61405656c6939d5e$var$kInterceptedDispatch] = dispatch; - return dispatch(opts, handler); } - dispatch(opts, handler) { - if (!handler || typeof handler !== "object") throw new $61405656c6939d5e$require$InvalidArgumentError("handler must be an object"); - try { - if (!opts || typeof opts !== "object") throw new $61405656c6939d5e$require$InvalidArgumentError("opts must be an object."); - if (this[$61405656c6939d5e$var$kDestroyed] || this[$61405656c6939d5e$var$kOnDestroyed]) throw new $61405656c6939d5e$require$ClientDestroyedError(); - if (this[$61405656c6939d5e$var$kClosed]) throw new $61405656c6939d5e$require$ClientClosedError(); - return this[$61405656c6939d5e$var$kInterceptedDispatch](opts, handler); - } catch (err) { - if (typeof handler.onError !== "function") throw new $61405656c6939d5e$require$InvalidArgumentError("invalid onError method"); - handler.onError(err); - return false; - } + // https://fetch.spec.whatwg.org/#dom-headers-append + append(name, value) { + $2587b6dc681c2132$require$webidl.brandCheck(this, $2587b6dc681c2132$var$Headers); + $2587b6dc681c2132$require$webidl.argumentLengthCheck(arguments, 2, 'Headers.append'); + const prefix = 'Headers.append'; + name = $2587b6dc681c2132$require$webidl.converters.ByteString(name, prefix, 'name'); + value = $2587b6dc681c2132$require$webidl.converters.ByteString(value, prefix, 'value'); + return $2587b6dc681c2132$var$appendHeader(this, name, value); } -} -module.exports = $61405656c6939d5e$var$DispatcherBase; - -}); -parcelRegister("kRVHu", function(module, exports) { -"use strict"; - -class $f31583fec0c4dfed$var$Dispatcher extends $g40fK$events { - dispatch() { - throw new Error("not implemented"); + // https://fetch.spec.whatwg.org/#dom-headers-delete + delete(name) { + $2587b6dc681c2132$require$webidl.brandCheck(this, $2587b6dc681c2132$var$Headers); + $2587b6dc681c2132$require$webidl.argumentLengthCheck(arguments, 1, 'Headers.delete'); + const prefix = 'Headers.delete'; + name = $2587b6dc681c2132$require$webidl.converters.ByteString(name, prefix, 'name'); + // 1. If name is not a header name, then throw a TypeError. + if (!$2587b6dc681c2132$require$isValidHeaderName(name)) throw $2587b6dc681c2132$require$webidl.errors.invalidArgument({ + prefix: 'Headers.delete', + value: name, + type: 'header name' + }); + // 2. If this’s guard is "immutable", then throw a TypeError. + // 3. Otherwise, if this’s guard is "request" and name is a + // forbidden header name, return. + // 4. Otherwise, if this’s guard is "request-no-cors", name + // is not a no-CORS-safelisted request-header name, and + // name is not a privileged no-CORS request-header name, + // return. + // 5. Otherwise, if this’s guard is "response" and name is + // a forbidden response-header name, return. + // Note: undici does not implement forbidden header names + if (this.#guard === 'immutable') throw new TypeError('immutable'); + // 6. If this’s header list does not contain name, then + // return. + if (!this.#headersList.contains(name, false)) return; + // 7. Delete name from this’s header list. + // 8. If this’s guard is "request-no-cors", then remove + // privileged no-CORS request headers from this. + this.#headersList.delete(name, false); } - close() { - throw new Error("not implemented"); + // https://fetch.spec.whatwg.org/#dom-headers-get + get(name) { + $2587b6dc681c2132$require$webidl.brandCheck(this, $2587b6dc681c2132$var$Headers); + $2587b6dc681c2132$require$webidl.argumentLengthCheck(arguments, 1, 'Headers.get'); + const prefix = 'Headers.get'; + name = $2587b6dc681c2132$require$webidl.converters.ByteString(name, prefix, 'name'); + // 1. If name is not a header name, then throw a TypeError. + if (!$2587b6dc681c2132$require$isValidHeaderName(name)) throw $2587b6dc681c2132$require$webidl.errors.invalidArgument({ + prefix: prefix, + value: name, + type: 'header name' + }); + // 2. Return the result of getting name from this’s header + // list. + return this.#headersList.get(name, false); } - destroy() { - throw new Error("not implemented"); + // https://fetch.spec.whatwg.org/#dom-headers-has + has(name) { + $2587b6dc681c2132$require$webidl.brandCheck(this, $2587b6dc681c2132$var$Headers); + $2587b6dc681c2132$require$webidl.argumentLengthCheck(arguments, 1, 'Headers.has'); + const prefix = 'Headers.has'; + name = $2587b6dc681c2132$require$webidl.converters.ByteString(name, prefix, 'name'); + // 1. If name is not a header name, then throw a TypeError. + if (!$2587b6dc681c2132$require$isValidHeaderName(name)) throw $2587b6dc681c2132$require$webidl.errors.invalidArgument({ + prefix: prefix, + value: name, + type: 'header name' + }); + // 2. Return true if this’s header list contains name; + // otherwise false. + return this.#headersList.contains(name, false); } -} -module.exports = $f31583fec0c4dfed$var$Dispatcher; - -}); - - -parcelRegister("h3cex", function(module, exports) { -"use strict"; - - - -var $gv2nV = parcelRequire("gv2nV"); - -var $cKdp7 = parcelRequire("cKdp7"); -var $c69c34cb0b18fbff$require$InvalidArgumentError = $cKdp7.InvalidArgumentError; -var $c69c34cb0b18fbff$require$ConnectTimeoutError = $cKdp7.ConnectTimeoutError; -let $c69c34cb0b18fbff$var$tls // include tls conditionally since it is not always available -; -// TODO: session re-use does not wait for the first -// connection to resolve the session and might therefore -// resolve the same servername multiple times even when -// re-use is enabled. -let $c69c34cb0b18fbff$var$SessionCache; -// FIXME: remove workaround when the Node bug is fixed -// https://github.com/nodejs/node/issues/49344#issuecomment-1741776308 -if ($parcel$global.FinalizationRegistry && !process.env.NODE_V8_COVERAGE) $c69c34cb0b18fbff$var$SessionCache = class WeakSessionCache { - constructor(maxCachedSessions){ - this._maxCachedSessions = maxCachedSessions; - this._sessionCache = new Map(); - this._sessionRegistry = new $parcel$global.FinalizationRegistry((key)=>{ - if (this._sessionCache.size < this._maxCachedSessions) return; - const ref = this._sessionCache.get(key); - if (ref !== undefined && ref.deref() === undefined) this._sessionCache.delete(key); + // https://fetch.spec.whatwg.org/#dom-headers-set + set(name, value) { + $2587b6dc681c2132$require$webidl.brandCheck(this, $2587b6dc681c2132$var$Headers); + $2587b6dc681c2132$require$webidl.argumentLengthCheck(arguments, 2, 'Headers.set'); + const prefix = 'Headers.set'; + name = $2587b6dc681c2132$require$webidl.converters.ByteString(name, prefix, 'name'); + value = $2587b6dc681c2132$require$webidl.converters.ByteString(value, prefix, 'value'); + // 1. Normalize value. + value = $2587b6dc681c2132$var$headerValueNormalize(value); + // 2. If name is not a header name or value is not a + // header value, then throw a TypeError. + if (!$2587b6dc681c2132$require$isValidHeaderName(name)) throw $2587b6dc681c2132$require$webidl.errors.invalidArgument({ + prefix: prefix, + value: name, + type: 'header name' }); + else if (!$2587b6dc681c2132$require$isValidHeaderValue(value)) throw $2587b6dc681c2132$require$webidl.errors.invalidArgument({ + prefix: prefix, + value: value, + type: 'header value' + }); + // 3. If this’s guard is "immutable", then throw a TypeError. + // 4. Otherwise, if this’s guard is "request" and name is a + // forbidden header name, return. + // 5. Otherwise, if this’s guard is "request-no-cors" and + // name/value is not a no-CORS-safelisted request-header, + // return. + // 6. Otherwise, if this’s guard is "response" and name is a + // forbidden response-header name, return. + // Note: undici does not implement forbidden header names + if (this.#guard === 'immutable') throw new TypeError('immutable'); + // 7. Set (name, value) in this’s header list. + // 8. If this’s guard is "request-no-cors", then remove + // privileged no-CORS request headers from this + this.#headersList.set(name, value, false); } - get(sessionKey) { - const ref = this._sessionCache.get(sessionKey); - return ref ? ref.deref() : null; - } - set(sessionKey, session) { - if (this._maxCachedSessions === 0) return; - this._sessionCache.set(sessionKey, new WeakRef(session)); - this._sessionRegistry.register(session, sessionKey); - } -}; -else $c69c34cb0b18fbff$var$SessionCache = class SimpleSessionCache { - constructor(maxCachedSessions){ - this._maxCachedSessions = maxCachedSessions; - this._sessionCache = new Map(); + // https://fetch.spec.whatwg.org/#dom-headers-getsetcookie + getSetCookie() { + $2587b6dc681c2132$require$webidl.brandCheck(this, $2587b6dc681c2132$var$Headers); + // 1. If this’s header list does not contain `Set-Cookie`, then return « ». + // 2. Return the values of all headers in this’s header list whose name is + // a byte-case-insensitive match for `Set-Cookie`, in order. + const list = this.#headersList.cookies; + if (list) return [ + ...list + ]; + return []; } - get(sessionKey) { - return this._sessionCache.get(sessionKey); + // https://fetch.spec.whatwg.org/#concept-header-list-sort-and-combine + get [$2587b6dc681c2132$var$kHeadersSortedMap]() { + if (this.#headersList[$2587b6dc681c2132$var$kHeadersSortedMap]) return this.#headersList[$2587b6dc681c2132$var$kHeadersSortedMap]; + // 1. Let headers be an empty list of headers with the key being the name + // and value the value. + const headers = []; + // 2. Let names be the result of convert header names to a sorted-lowercase + // set with all the names of the headers in list. + const names = this.#headersList.toSortedArray(); + const cookies = this.#headersList.cookies; + // fast-path + if (cookies === null || cookies.length === 1) // Note: The non-null assertion of value has already been done by `HeadersList#toSortedArray` + return this.#headersList[$2587b6dc681c2132$var$kHeadersSortedMap] = names; + // 3. For each name of names: + for(let i = 0; i < names.length; ++i){ + const { 0: name, 1: value } = names[i]; + // 1. If name is `set-cookie`, then: + if (name === 'set-cookie') // 1. Let values be a list of all values of headers in list whose name + // is a byte-case-insensitive match for name, in order. + // 2. For each value of values: + // 1. Append (name, value) to headers. + for(let j = 0; j < cookies.length; ++j)headers.push([ + name, + cookies[j] + ]); + else // 2. Otherwise: + // 1. Let value be the result of getting name from list. + // 2. Assert: value is non-null. + // Note: This operation was done by `HeadersList#toSortedArray`. + // 3. Append (name, value) to headers. + headers.push([ + name, + value + ]); + } + // 4. Return headers. + return this.#headersList[$2587b6dc681c2132$var$kHeadersSortedMap] = headers; + } + [$in2sP$nodeutil.inspect.custom](depth, options) { + options.depth ??= depth; + return `Headers ${$in2sP$nodeutil.formatWithOptions(options, this.#headersList.entries)}`; + } + static getHeadersGuard(o) { + return o.#guard; + } + static setHeadersGuard(o, guard) { + o.#guard = guard; + } + static getHeadersList(o) { + return o.#headersList; + } + static setHeadersList(o, list) { + o.#headersList = list; + } +} +const { getHeadersGuard: $2587b6dc681c2132$var$getHeadersGuard, setHeadersGuard: $2587b6dc681c2132$var$setHeadersGuard, getHeadersList: $2587b6dc681c2132$var$getHeadersList, setHeadersList: $2587b6dc681c2132$var$setHeadersList } = $2587b6dc681c2132$var$Headers; +Reflect.deleteProperty($2587b6dc681c2132$var$Headers, 'getHeadersGuard'); +Reflect.deleteProperty($2587b6dc681c2132$var$Headers, 'setHeadersGuard'); +Reflect.deleteProperty($2587b6dc681c2132$var$Headers, 'getHeadersList'); +Reflect.deleteProperty($2587b6dc681c2132$var$Headers, 'setHeadersList'); +$2587b6dc681c2132$require$iteratorMixin('Headers', $2587b6dc681c2132$var$Headers, $2587b6dc681c2132$var$kHeadersSortedMap, 0, 1); +Object.defineProperties($2587b6dc681c2132$var$Headers.prototype, { + append: $2587b6dc681c2132$require$kEnumerableProperty, + delete: $2587b6dc681c2132$require$kEnumerableProperty, + get: $2587b6dc681c2132$require$kEnumerableProperty, + has: $2587b6dc681c2132$require$kEnumerableProperty, + set: $2587b6dc681c2132$require$kEnumerableProperty, + getSetCookie: $2587b6dc681c2132$require$kEnumerableProperty, + [Symbol.toStringTag]: { + value: 'Headers', + configurable: true + }, + [$in2sP$nodeutil.inspect.custom]: { + enumerable: false } - set(sessionKey, session) { - if (this._maxCachedSessions === 0) return; - if (this._sessionCache.size >= this._maxCachedSessions) { - // remove the oldest session - const { value: oldestKey } = this._sessionCache.keys().next(); - this._sessionCache.delete(oldestKey); +}); +$2587b6dc681c2132$require$webidl.converters.HeadersInit = function(V, prefix, argument) { + if ($2587b6dc681c2132$require$webidl.util.Type(V) === 'Object') { + const iterator = Reflect.get(V, Symbol.iterator); + // A work-around to ensure we send the properly-cased Headers when V is a Headers object. + // Read https://github.com/nodejs/undici/pull/3159#issuecomment-2075537226 before touching, please. + if (!$in2sP$nodeutil.types.isProxy(V) && iterator === $2587b6dc681c2132$var$Headers.prototype.entries) try { + return $2587b6dc681c2132$var$getHeadersList(V).entriesList; + } catch { + // fall-through } - this._sessionCache.set(sessionKey, session); + if (typeof iterator === 'function') return $2587b6dc681c2132$require$webidl.converters['sequence>'](V, prefix, argument, iterator.bind(V)); + return $2587b6dc681c2132$require$webidl.converters['record'](V, prefix, argument); } + throw $2587b6dc681c2132$require$webidl.errors.conversionFailed({ + prefix: 'Headers constructor', + argument: 'Argument 1', + types: [ + 'sequence>', + 'record' + ] + }); +}; +module.exports = { + fill: $2587b6dc681c2132$var$fill, + compareHeaderName: // for test. + $2587b6dc681c2132$var$compareHeaderName, + Headers: $2587b6dc681c2132$var$Headers, + HeadersList: $2587b6dc681c2132$var$HeadersList, + getHeadersGuard: $2587b6dc681c2132$var$getHeadersGuard, + setHeadersGuard: $2587b6dc681c2132$var$setHeadersGuard, + setHeadersList: $2587b6dc681c2132$var$setHeadersList, + getHeadersList: $2587b6dc681c2132$var$getHeadersList }; -function $c69c34cb0b18fbff$var$buildConnector({ allowH2: allowH2, maxCachedSessions: maxCachedSessions, socketPath: socketPath, timeout: timeout, ...opts }) { - if (maxCachedSessions != null && (!Number.isInteger(maxCachedSessions) || maxCachedSessions < 0)) throw new $c69c34cb0b18fbff$require$InvalidArgumentError("maxCachedSessions must be a positive integer or zero"); - const options = { - path: socketPath, - ...opts - }; - const sessionCache = new $c69c34cb0b18fbff$var$SessionCache(maxCachedSessions == null ? 100 : maxCachedSessions); - timeout = timeout == null ? 10e3 : timeout; - allowH2 = allowH2 != null ? allowH2 : false; - return function connect({ hostname: hostname, host: host, protocol: protocol, port: port, servername: servername, localAddress: localAddress, httpSocket: httpSocket }, callback) { - let socket; - if (protocol === "https:") { - if (!$c69c34cb0b18fbff$var$tls) $c69c34cb0b18fbff$var$tls = $g40fK$tls; - servername = servername || options.servername || $gv2nV.getServerName(host) || null; - const sessionKey = servername || hostname; - const session = sessionCache.get(sessionKey) || null; - $g40fK$assert(sessionKey); - socket = $c69c34cb0b18fbff$var$tls.connect({ - highWaterMark: 16384, - ...options, - servername: servername, - session: session, - localAddress: localAddress, - // TODO(HTTP/2): Add support for h2c - ALPNProtocols: allowH2 ? [ - "http/1.1", - "h2" - ] : [ - "http/1.1" - ], - socket: httpSocket, - port: port || 443, - host: hostname - }); - socket.on("session", function(session) { - // TODO (fix): Can a session become invalid once established? Don't think so? - sessionCache.set(sessionKey, session); +}); + + +parcelRegister("9rjJZ", function(module, exports) { +/* globals AbortController */ 'use strict'; + +var $8masf = parcelRequire("8masf"); +var $6df5f2cbb77a354d$require$extractBody = $8masf.extractBody; +var $6df5f2cbb77a354d$require$mixinBody = $8masf.mixinBody; +var $6df5f2cbb77a354d$require$cloneBody = $8masf.cloneBody; +var $6df5f2cbb77a354d$require$bodyUnusable = $8masf.bodyUnusable; + +var $3dLRE = parcelRequire("3dLRE"); +var $6df5f2cbb77a354d$require$Headers = $3dLRE.Headers; +var $6df5f2cbb77a354d$require$fillHeaders = $3dLRE.fill; +var $6df5f2cbb77a354d$require$HeadersList = $3dLRE.HeadersList; +var $6df5f2cbb77a354d$require$setHeadersGuard = $3dLRE.setHeadersGuard; +var $6df5f2cbb77a354d$require$getHeadersGuard = $3dLRE.getHeadersGuard; +var $6df5f2cbb77a354d$require$setHeadersList = $3dLRE.setHeadersList; +var $6df5f2cbb77a354d$require$getHeadersList = $3dLRE.getHeadersList; + +const { FinalizationRegistry: $6df5f2cbb77a354d$var$FinalizationRegistry } = (parcelRequire("vhcFZ"))(); + +var $bFRvW = parcelRequire("bFRvW"); + + +var $7z0I9 = parcelRequire("7z0I9"); +var $6df5f2cbb77a354d$require$isValidHTTPToken = $7z0I9.isValidHTTPToken; +var $6df5f2cbb77a354d$require$sameOrigin = $7z0I9.sameOrigin; +var $6df5f2cbb77a354d$require$environmentSettingsObject = $7z0I9.environmentSettingsObject; + +var $4nb4n = parcelRequire("4nb4n"); +var $6df5f2cbb77a354d$require$forbiddenMethodsSet = $4nb4n.forbiddenMethodsSet; +var $6df5f2cbb77a354d$require$corsSafeListedMethodsSet = $4nb4n.corsSafeListedMethodsSet; +var $6df5f2cbb77a354d$require$referrerPolicy = $4nb4n.referrerPolicy; +var $6df5f2cbb77a354d$require$requestRedirect = $4nb4n.requestRedirect; +var $6df5f2cbb77a354d$require$requestMode = $4nb4n.requestMode; +var $6df5f2cbb77a354d$require$requestCredentials = $4nb4n.requestCredentials; +var $6df5f2cbb77a354d$require$requestCache = $4nb4n.requestCache; +var $6df5f2cbb77a354d$require$requestDuplex = $4nb4n.requestDuplex; +const { kEnumerableProperty: $6df5f2cbb77a354d$var$kEnumerableProperty, normalizedMethodRecordsBase: $6df5f2cbb77a354d$var$normalizedMethodRecordsBase, normalizedMethodRecords: $6df5f2cbb77a354d$var$normalizedMethodRecords } = $bFRvW; + +var $faXHi = parcelRequire("faXHi"); +var $6df5f2cbb77a354d$require$kHeaders = $faXHi.kHeaders; +var $6df5f2cbb77a354d$require$kSignal = $faXHi.kSignal; +var $6df5f2cbb77a354d$require$kState = $faXHi.kState; +var $6df5f2cbb77a354d$require$kDispatcher = $faXHi.kDispatcher; + +var $5HTG7 = parcelRequire("5HTG7"); +var $6df5f2cbb77a354d$require$webidl = $5HTG7.webidl; + +var $30IsM = parcelRequire("30IsM"); +var $6df5f2cbb77a354d$require$URLSerializer = $30IsM.URLSerializer; + +var $gNVEc = parcelRequire("gNVEc"); +var $6df5f2cbb77a354d$require$kConstruct = $gNVEc.kConstruct; + + +var $6df5f2cbb77a354d$require$getMaxListeners = $in2sP$nodeevents.getMaxListeners; +var $6df5f2cbb77a354d$require$setMaxListeners = $in2sP$nodeevents.setMaxListeners; +var $6df5f2cbb77a354d$require$getEventListeners = $in2sP$nodeevents.getEventListeners; +var $6df5f2cbb77a354d$require$defaultMaxListeners = $in2sP$nodeevents.defaultMaxListeners; +const $6df5f2cbb77a354d$var$kAbortController = Symbol('abortController'); +const $6df5f2cbb77a354d$var$requestFinalizer = new $6df5f2cbb77a354d$var$FinalizationRegistry(({ signal: signal, abort: abort })=>{ + signal.removeEventListener('abort', abort); +}); +const $6df5f2cbb77a354d$var$dependentControllerMap = new WeakMap(); +function $6df5f2cbb77a354d$var$buildAbort(acRef) { + return abort; + function abort() { + const ac = acRef.deref(); + if (ac !== undefined) { + // Currently, there is a problem with FinalizationRegistry. + // https://github.com/nodejs/node/issues/49344 + // https://github.com/nodejs/node/issues/47748 + // In the case of abort, the first step is to unregister from it. + // If the controller can refer to it, it is still registered. + // It will be removed in the future. + $6df5f2cbb77a354d$var$requestFinalizer.unregister(abort); + // Unsubscribe a listener. + // FinalizationRegistry will no longer be called, so this must be done. + this.removeEventListener('abort', abort); + ac.abort(this.reason); + const controllerList = $6df5f2cbb77a354d$var$dependentControllerMap.get(ac.signal); + if (controllerList !== undefined) { + if (controllerList.size !== 0) { + for (const ref of controllerList){ + const ctrl = ref.deref(); + if (ctrl !== undefined) ctrl.abort(this.reason); + } + controllerList.clear(); + } + $6df5f2cbb77a354d$var$dependentControllerMap.delete(ac.signal); + } + } + } +} +let $6df5f2cbb77a354d$var$patchMethodWarning = false; +// https://fetch.spec.whatwg.org/#request-class +class $6df5f2cbb77a354d$var$Request { + // https://fetch.spec.whatwg.org/#dom-request + constructor(input, init = {}){ + $6df5f2cbb77a354d$require$webidl.util.markAsUncloneable(this); + if (input === $6df5f2cbb77a354d$require$kConstruct) return; + const prefix = 'Request constructor'; + $6df5f2cbb77a354d$require$webidl.argumentLengthCheck(arguments, 1, prefix); + input = $6df5f2cbb77a354d$require$webidl.converters.RequestInfo(input, prefix, 'input'); + init = $6df5f2cbb77a354d$require$webidl.converters.RequestInit(init, prefix, 'init'); + // 1. Let request be null. + let request = null; + // 2. Let fallbackMode be null. + let fallbackMode = null; + // 3. Let baseURL be this’s relevant settings object’s API base URL. + const baseUrl = $6df5f2cbb77a354d$require$environmentSettingsObject.settingsObject.baseUrl; + // 4. Let signal be null. + let signal = null; + // 5. If input is a string, then: + if (typeof input === 'string') { + this[$6df5f2cbb77a354d$require$kDispatcher] = init.dispatcher; + // 1. Let parsedURL be the result of parsing input with baseURL. + // 2. If parsedURL is failure, then throw a TypeError. + let parsedURL; + try { + parsedURL = new URL(input, baseUrl); + } catch (err) { + throw new TypeError('Failed to parse URL from ' + input, { + cause: err + }); + } + // 3. If parsedURL includes credentials, then throw a TypeError. + if (parsedURL.username || parsedURL.password) throw new TypeError('Request cannot be constructed from a URL that includes credentials: ' + input); + // 4. Set request to a new request whose URL is parsedURL. + request = $6df5f2cbb77a354d$var$makeRequest({ + urlList: [ + parsedURL + ] }); + // 5. Set fallbackMode to "cors". + fallbackMode = 'cors'; } else { - $g40fK$assert(!httpSocket, "httpSocket can only be sent on TLS update"); - socket = $g40fK$net.connect({ - highWaterMark: 65536, - ...options, - localAddress: localAddress, - port: port || 80, - host: hostname - }); - } - // Set TCP keep alive options on the socket here instead of in connect() for the case of assigning the socket - if (options.keepAlive == null || options.keepAlive) { - const keepAliveInitialDelay = options.keepAliveInitialDelay === undefined ? 60e3 : options.keepAliveInitialDelay; - socket.setKeepAlive(true, keepAliveInitialDelay); + this[$6df5f2cbb77a354d$require$kDispatcher] = init.dispatcher || input[$6df5f2cbb77a354d$require$kDispatcher]; + // 6. Otherwise: + // 7. Assert: input is a Request object. + $in2sP$nodeassert(input instanceof $6df5f2cbb77a354d$var$Request); + // 8. Set request to input’s request. + request = input[$6df5f2cbb77a354d$require$kState]; + // 9. Set signal to input’s signal. + signal = input[$6df5f2cbb77a354d$require$kSignal]; } - const cancelTimeout = $c69c34cb0b18fbff$var$setupTimeout(()=>$c69c34cb0b18fbff$var$onConnectTimeout(socket), timeout); - socket.setNoDelay(true).once(protocol === "https:" ? "secureConnect" : "connect", function() { - cancelTimeout(); - if (callback) { - const cb = callback; - callback = null; - cb(null, this); - } - }).on("error", function(err) { - cancelTimeout(); - if (callback) { - const cb = callback; - callback = null; - cb(err); - } - }); - return socket; - }; -} -function $c69c34cb0b18fbff$var$setupTimeout(onConnectTimeout, timeout) { - if (!timeout) return ()=>{}; - let s1 = null; - let s2 = null; - const timeoutId = setTimeout(()=>{ - // setImmediate is added to make sure that we priotorise socket error events over timeouts - s1 = setImmediate(()=>{ - if (process.platform === "win32") // Windows needs an extra setImmediate probably due to implementation differences in the socket logic - s2 = setImmediate(()=>onConnectTimeout()); - else onConnectTimeout(); + // 7. Let origin be this’s relevant settings object’s origin. + const origin = $6df5f2cbb77a354d$require$environmentSettingsObject.settingsObject.origin; + // 8. Let window be "client". + let window = 'client'; + // 9. If request’s window is an environment settings object and its origin + // is same origin with origin, then set window to request’s window. + if (request.window?.constructor?.name === 'EnvironmentSettingsObject' && $6df5f2cbb77a354d$require$sameOrigin(request.window, origin)) window = request.window; + // 10. If init["window"] exists and is non-null, then throw a TypeError. + if (init.window != null) throw new TypeError(`'window' option '${window}' must be null`); + // 11. If init["window"] exists, then set window to "no-window". + if ('window' in init) window = 'no-window'; + // 12. Set request to a new request with the following properties: + request = $6df5f2cbb77a354d$var$makeRequest({ + // URL request’s URL. + // undici implementation note: this is set as the first item in request's urlList in makeRequest + // method request’s method. + method: request.method, + // header list A copy of request’s header list. + // undici implementation note: headersList is cloned in makeRequest + headersList: request.headersList, + // unsafe-request flag Set. + unsafeRequest: request.unsafeRequest, + // client This’s relevant settings object. + client: $6df5f2cbb77a354d$require$environmentSettingsObject.settingsObject, + window: // window window. + window, + // priority request’s priority. + priority: request.priority, + // origin request’s origin. The propagation of the origin is only significant for navigation requests + // being handled by a service worker. In this scenario a request can have an origin that is different + // from the current client. + origin: request.origin, + // referrer request’s referrer. + referrer: request.referrer, + // referrer policy request’s referrer policy. + referrerPolicy: request.referrerPolicy, + // mode request’s mode. + mode: request.mode, + // credentials mode request’s credentials mode. + credentials: request.credentials, + // cache mode request’s cache mode. + cache: request.cache, + // redirect mode request’s redirect mode. + redirect: request.redirect, + // integrity metadata request’s integrity metadata. + integrity: request.integrity, + // keepalive request’s keepalive. + keepalive: request.keepalive, + // reload-navigation flag request’s reload-navigation flag. + reloadNavigation: request.reloadNavigation, + // history-navigation flag request’s history-navigation flag. + historyNavigation: request.historyNavigation, + // URL list A clone of request’s URL list. + urlList: [ + ...request.urlList + ] }); - }, timeout); - return ()=>{ - clearTimeout(timeoutId); - clearImmediate(s1); - clearImmediate(s2); - }; -} -function $c69c34cb0b18fbff$var$onConnectTimeout(socket) { - $gv2nV.destroy(socket, new $c69c34cb0b18fbff$require$ConnectTimeoutError()); -} -module.exports = $c69c34cb0b18fbff$var$buildConnector; - -}); - -parcelRegister("fbG2v", function(module, exports) { -"use strict"; -Object.defineProperty(module.exports, "__esModule", { - value: true -}); -module.exports.SPECIAL_HEADERS = module.exports.HEADER_STATE = module.exports.MINOR = module.exports.MAJOR = module.exports.CONNECTION_TOKEN_CHARS = module.exports.HEADER_CHARS = module.exports.TOKEN = module.exports.STRICT_TOKEN = module.exports.HEX = module.exports.URL_CHAR = module.exports.STRICT_URL_CHAR = module.exports.USERINFO_CHARS = module.exports.MARK = module.exports.ALPHANUM = module.exports.NUM = module.exports.HEX_MAP = module.exports.NUM_MAP = module.exports.ALPHA = module.exports.FINISH = module.exports.H_METHOD_MAP = module.exports.METHOD_MAP = module.exports.METHODS_RTSP = module.exports.METHODS_ICE = module.exports.METHODS_HTTP = module.exports.METHODS = module.exports.LENIENT_FLAGS = module.exports.FLAGS = module.exports.TYPE = module.exports.ERROR = void 0; - -var $buWAz = parcelRequire("buWAz"); -// C headers -var $b0e87e3f7a45a404$var$ERROR; -(function(ERROR) { - ERROR[ERROR["OK"] = 0] = "OK"; - ERROR[ERROR["INTERNAL"] = 1] = "INTERNAL"; - ERROR[ERROR["STRICT"] = 2] = "STRICT"; - ERROR[ERROR["LF_EXPECTED"] = 3] = "LF_EXPECTED"; - ERROR[ERROR["UNEXPECTED_CONTENT_LENGTH"] = 4] = "UNEXPECTED_CONTENT_LENGTH"; - ERROR[ERROR["CLOSED_CONNECTION"] = 5] = "CLOSED_CONNECTION"; - ERROR[ERROR["INVALID_METHOD"] = 6] = "INVALID_METHOD"; - ERROR[ERROR["INVALID_URL"] = 7] = "INVALID_URL"; - ERROR[ERROR["INVALID_CONSTANT"] = 8] = "INVALID_CONSTANT"; - ERROR[ERROR["INVALID_VERSION"] = 9] = "INVALID_VERSION"; - ERROR[ERROR["INVALID_HEADER_TOKEN"] = 10] = "INVALID_HEADER_TOKEN"; - ERROR[ERROR["INVALID_CONTENT_LENGTH"] = 11] = "INVALID_CONTENT_LENGTH"; - ERROR[ERROR["INVALID_CHUNK_SIZE"] = 12] = "INVALID_CHUNK_SIZE"; - ERROR[ERROR["INVALID_STATUS"] = 13] = "INVALID_STATUS"; - ERROR[ERROR["INVALID_EOF_STATE"] = 14] = "INVALID_EOF_STATE"; - ERROR[ERROR["INVALID_TRANSFER_ENCODING"] = 15] = "INVALID_TRANSFER_ENCODING"; - ERROR[ERROR["CB_MESSAGE_BEGIN"] = 16] = "CB_MESSAGE_BEGIN"; - ERROR[ERROR["CB_HEADERS_COMPLETE"] = 17] = "CB_HEADERS_COMPLETE"; - ERROR[ERROR["CB_MESSAGE_COMPLETE"] = 18] = "CB_MESSAGE_COMPLETE"; - ERROR[ERROR["CB_CHUNK_HEADER"] = 19] = "CB_CHUNK_HEADER"; - ERROR[ERROR["CB_CHUNK_COMPLETE"] = 20] = "CB_CHUNK_COMPLETE"; - ERROR[ERROR["PAUSED"] = 21] = "PAUSED"; - ERROR[ERROR["PAUSED_UPGRADE"] = 22] = "PAUSED_UPGRADE"; - ERROR[ERROR["PAUSED_H2_UPGRADE"] = 23] = "PAUSED_H2_UPGRADE"; - ERROR[ERROR["USER"] = 24] = "USER"; -})($b0e87e3f7a45a404$var$ERROR = module.exports.ERROR || (module.exports.ERROR = {})); -var $b0e87e3f7a45a404$var$TYPE; -(function(TYPE) { - TYPE[TYPE["BOTH"] = 0] = "BOTH"; - TYPE[TYPE["REQUEST"] = 1] = "REQUEST"; - TYPE[TYPE["RESPONSE"] = 2] = "RESPONSE"; -})($b0e87e3f7a45a404$var$TYPE = module.exports.TYPE || (module.exports.TYPE = {})); -var $b0e87e3f7a45a404$var$FLAGS; -(function(FLAGS) { - FLAGS[FLAGS["CONNECTION_KEEP_ALIVE"] = 1] = "CONNECTION_KEEP_ALIVE"; - FLAGS[FLAGS["CONNECTION_CLOSE"] = 2] = "CONNECTION_CLOSE"; - FLAGS[FLAGS["CONNECTION_UPGRADE"] = 4] = "CONNECTION_UPGRADE"; - FLAGS[FLAGS["CHUNKED"] = 8] = "CHUNKED"; - FLAGS[FLAGS["UPGRADE"] = 16] = "UPGRADE"; - FLAGS[FLAGS["CONTENT_LENGTH"] = 32] = "CONTENT_LENGTH"; - FLAGS[FLAGS["SKIPBODY"] = 64] = "SKIPBODY"; - FLAGS[FLAGS["TRAILING"] = 128] = "TRAILING"; - // 1 << 8 is unused - FLAGS[FLAGS["TRANSFER_ENCODING"] = 512] = "TRANSFER_ENCODING"; -})($b0e87e3f7a45a404$var$FLAGS = module.exports.FLAGS || (module.exports.FLAGS = {})); -var $b0e87e3f7a45a404$var$LENIENT_FLAGS; -(function(LENIENT_FLAGS) { - LENIENT_FLAGS[LENIENT_FLAGS["HEADERS"] = 1] = "HEADERS"; - LENIENT_FLAGS[LENIENT_FLAGS["CHUNKED_LENGTH"] = 2] = "CHUNKED_LENGTH"; - LENIENT_FLAGS[LENIENT_FLAGS["KEEP_ALIVE"] = 4] = "KEEP_ALIVE"; -})($b0e87e3f7a45a404$var$LENIENT_FLAGS = module.exports.LENIENT_FLAGS || (module.exports.LENIENT_FLAGS = {})); -var $b0e87e3f7a45a404$var$METHODS; -(function(METHODS) { - METHODS[METHODS["DELETE"] = 0] = "DELETE"; - METHODS[METHODS["GET"] = 1] = "GET"; - METHODS[METHODS["HEAD"] = 2] = "HEAD"; - METHODS[METHODS["POST"] = 3] = "POST"; - METHODS[METHODS["PUT"] = 4] = "PUT"; - /* pathological */ METHODS[METHODS["CONNECT"] = 5] = "CONNECT"; - METHODS[METHODS["OPTIONS"] = 6] = "OPTIONS"; - METHODS[METHODS["TRACE"] = 7] = "TRACE"; - /* WebDAV */ METHODS[METHODS["COPY"] = 8] = "COPY"; - METHODS[METHODS["LOCK"] = 9] = "LOCK"; - METHODS[METHODS["MKCOL"] = 10] = "MKCOL"; - METHODS[METHODS["MOVE"] = 11] = "MOVE"; - METHODS[METHODS["PROPFIND"] = 12] = "PROPFIND"; - METHODS[METHODS["PROPPATCH"] = 13] = "PROPPATCH"; - METHODS[METHODS["SEARCH"] = 14] = "SEARCH"; - METHODS[METHODS["UNLOCK"] = 15] = "UNLOCK"; - METHODS[METHODS["BIND"] = 16] = "BIND"; - METHODS[METHODS["REBIND"] = 17] = "REBIND"; - METHODS[METHODS["UNBIND"] = 18] = "UNBIND"; - METHODS[METHODS["ACL"] = 19] = "ACL"; - /* subversion */ METHODS[METHODS["REPORT"] = 20] = "REPORT"; - METHODS[METHODS["MKACTIVITY"] = 21] = "MKACTIVITY"; - METHODS[METHODS["CHECKOUT"] = 22] = "CHECKOUT"; - METHODS[METHODS["MERGE"] = 23] = "MERGE"; - /* upnp */ METHODS[METHODS["M-SEARCH"] = 24] = "M-SEARCH"; - METHODS[METHODS["NOTIFY"] = 25] = "NOTIFY"; - METHODS[METHODS["SUBSCRIBE"] = 26] = "SUBSCRIBE"; - METHODS[METHODS["UNSUBSCRIBE"] = 27] = "UNSUBSCRIBE"; - /* RFC-5789 */ METHODS[METHODS["PATCH"] = 28] = "PATCH"; - METHODS[METHODS["PURGE"] = 29] = "PURGE"; - /* CalDAV */ METHODS[METHODS["MKCALENDAR"] = 30] = "MKCALENDAR"; - /* RFC-2068, section 19.6.1.2 */ METHODS[METHODS["LINK"] = 31] = "LINK"; - METHODS[METHODS["UNLINK"] = 32] = "UNLINK"; - /* icecast */ METHODS[METHODS["SOURCE"] = 33] = "SOURCE"; - /* RFC-7540, section 11.6 */ METHODS[METHODS["PRI"] = 34] = "PRI"; - /* RFC-2326 RTSP */ METHODS[METHODS["DESCRIBE"] = 35] = "DESCRIBE"; - METHODS[METHODS["ANNOUNCE"] = 36] = "ANNOUNCE"; - METHODS[METHODS["SETUP"] = 37] = "SETUP"; - METHODS[METHODS["PLAY"] = 38] = "PLAY"; - METHODS[METHODS["PAUSE"] = 39] = "PAUSE"; - METHODS[METHODS["TEARDOWN"] = 40] = "TEARDOWN"; - METHODS[METHODS["GET_PARAMETER"] = 41] = "GET_PARAMETER"; - METHODS[METHODS["SET_PARAMETER"] = 42] = "SET_PARAMETER"; - METHODS[METHODS["REDIRECT"] = 43] = "REDIRECT"; - METHODS[METHODS["RECORD"] = 44] = "RECORD"; - /* RAOP */ METHODS[METHODS["FLUSH"] = 45] = "FLUSH"; -})($b0e87e3f7a45a404$var$METHODS = module.exports.METHODS || (module.exports.METHODS = {})); -module.exports.METHODS_HTTP = [ - $b0e87e3f7a45a404$var$METHODS.DELETE, - $b0e87e3f7a45a404$var$METHODS.GET, - $b0e87e3f7a45a404$var$METHODS.HEAD, - $b0e87e3f7a45a404$var$METHODS.POST, - $b0e87e3f7a45a404$var$METHODS.PUT, - $b0e87e3f7a45a404$var$METHODS.CONNECT, - $b0e87e3f7a45a404$var$METHODS.OPTIONS, - $b0e87e3f7a45a404$var$METHODS.TRACE, - $b0e87e3f7a45a404$var$METHODS.COPY, - $b0e87e3f7a45a404$var$METHODS.LOCK, - $b0e87e3f7a45a404$var$METHODS.MKCOL, - $b0e87e3f7a45a404$var$METHODS.MOVE, - $b0e87e3f7a45a404$var$METHODS.PROPFIND, - $b0e87e3f7a45a404$var$METHODS.PROPPATCH, - $b0e87e3f7a45a404$var$METHODS.SEARCH, - $b0e87e3f7a45a404$var$METHODS.UNLOCK, - $b0e87e3f7a45a404$var$METHODS.BIND, - $b0e87e3f7a45a404$var$METHODS.REBIND, - $b0e87e3f7a45a404$var$METHODS.UNBIND, - $b0e87e3f7a45a404$var$METHODS.ACL, - $b0e87e3f7a45a404$var$METHODS.REPORT, - $b0e87e3f7a45a404$var$METHODS.MKACTIVITY, - $b0e87e3f7a45a404$var$METHODS.CHECKOUT, - $b0e87e3f7a45a404$var$METHODS.MERGE, - $b0e87e3f7a45a404$var$METHODS["M-SEARCH"], - $b0e87e3f7a45a404$var$METHODS.NOTIFY, - $b0e87e3f7a45a404$var$METHODS.SUBSCRIBE, - $b0e87e3f7a45a404$var$METHODS.UNSUBSCRIBE, - $b0e87e3f7a45a404$var$METHODS.PATCH, - $b0e87e3f7a45a404$var$METHODS.PURGE, - $b0e87e3f7a45a404$var$METHODS.MKCALENDAR, - $b0e87e3f7a45a404$var$METHODS.LINK, - $b0e87e3f7a45a404$var$METHODS.UNLINK, - $b0e87e3f7a45a404$var$METHODS.PRI, - // TODO(indutny): should we allow it with HTTP? - $b0e87e3f7a45a404$var$METHODS.SOURCE -]; -module.exports.METHODS_ICE = [ - $b0e87e3f7a45a404$var$METHODS.SOURCE -]; -module.exports.METHODS_RTSP = [ - $b0e87e3f7a45a404$var$METHODS.OPTIONS, - $b0e87e3f7a45a404$var$METHODS.DESCRIBE, - $b0e87e3f7a45a404$var$METHODS.ANNOUNCE, - $b0e87e3f7a45a404$var$METHODS.SETUP, - $b0e87e3f7a45a404$var$METHODS.PLAY, - $b0e87e3f7a45a404$var$METHODS.PAUSE, - $b0e87e3f7a45a404$var$METHODS.TEARDOWN, - $b0e87e3f7a45a404$var$METHODS.GET_PARAMETER, - $b0e87e3f7a45a404$var$METHODS.SET_PARAMETER, - $b0e87e3f7a45a404$var$METHODS.REDIRECT, - $b0e87e3f7a45a404$var$METHODS.RECORD, - $b0e87e3f7a45a404$var$METHODS.FLUSH, - // For AirPlay - $b0e87e3f7a45a404$var$METHODS.GET, - $b0e87e3f7a45a404$var$METHODS.POST -]; -module.exports.METHOD_MAP = $buWAz.enumToMap($b0e87e3f7a45a404$var$METHODS); -module.exports.H_METHOD_MAP = {}; -Object.keys(module.exports.METHOD_MAP).forEach((key)=>{ - if (/^H/.test(key)) module.exports.H_METHOD_MAP[key] = module.exports.METHOD_MAP[key]; -}); -var $b0e87e3f7a45a404$var$FINISH; -(function(FINISH) { - FINISH[FINISH["SAFE"] = 0] = "SAFE"; - FINISH[FINISH["SAFE_WITH_CB"] = 1] = "SAFE_WITH_CB"; - FINISH[FINISH["UNSAFE"] = 2] = "UNSAFE"; -})($b0e87e3f7a45a404$var$FINISH = module.exports.FINISH || (module.exports.FINISH = {})); -module.exports.ALPHA = []; -for(let i = "A".charCodeAt(0); i <= "Z".charCodeAt(0); i++){ - // Upper case - module.exports.ALPHA.push(String.fromCharCode(i)); - // Lower case - module.exports.ALPHA.push(String.fromCharCode(i + 0x20)); -} -module.exports.NUM_MAP = { - 0: 0, - 1: 1, - 2: 2, - 3: 3, - 4: 4, - 5: 5, - 6: 6, - 7: 7, - 8: 8, - 9: 9 -}; -module.exports.HEX_MAP = { - 0: 0, - 1: 1, - 2: 2, - 3: 3, - 4: 4, - 5: 5, - 6: 6, - 7: 7, - 8: 8, - 9: 9, - A: 0XA, - B: 0XB, - C: 0XC, - D: 0XD, - E: 0XE, - F: 0XF, - a: 0xa, - b: 0xb, - c: 0xc, - d: 0xd, - e: 0xe, - f: 0xf -}; -module.exports.NUM = [ - "0", - "1", - "2", - "3", - "4", - "5", - "6", - "7", - "8", - "9" -]; -module.exports.ALPHANUM = module.exports.ALPHA.concat(module.exports.NUM); -module.exports.MARK = [ - "-", - "_", - ".", - "!", - "~", - "*", - "'", - "(", - ")" -]; -module.exports.USERINFO_CHARS = module.exports.ALPHANUM.concat(module.exports.MARK).concat([ - "%", - ";", - ":", - "&", - "=", - "+", - "$", - "," -]); -// TODO(indutny): use RFC -module.exports.STRICT_URL_CHAR = [ - "!", - '"', - "$", - "%", - "&", - "'", - "(", - ")", - "*", - "+", - ",", - "-", - ".", - "/", - ":", - ";", - "<", - "=", - ">", - "@", - "[", - "\\", - "]", - "^", - "_", - "`", - "{", - "|", - "}", - "~" -].concat(module.exports.ALPHANUM); -module.exports.URL_CHAR = module.exports.STRICT_URL_CHAR.concat([ - " ", - "\f" -]); -// All characters with 0x80 bit set to 1 -for(let i = 0x80; i <= 0xff; i++)module.exports.URL_CHAR.push(i); -module.exports.HEX = module.exports.NUM.concat([ - "a", - "b", - "c", - "d", - "e", - "f", - "A", - "B", - "C", - "D", - "E", - "F" -]); -/* Tokens as defined by rfc 2616. Also lowercases them. - * token = 1* - * separators = "(" | ")" | "<" | ">" | "@" - * | "," | ";" | ":" | "\" | <"> - * | "/" | "[" | "]" | "?" | "=" - * | "{" | "}" | SP | HT - */ module.exports.STRICT_TOKEN = [ - "!", - "#", - "$", - "%", - "&", - "'", - "*", - "+", - "-", - ".", - "^", - "_", - "`", - "|", - "~" -].concat(module.exports.ALPHANUM); -module.exports.TOKEN = module.exports.STRICT_TOKEN.concat([ - " " -]); -/* - * Verify that a char is a valid visible (printable) US-ASCII - * character or %x80-FF - */ module.exports.HEADER_CHARS = [ - " " -]; -for(let i = 32; i <= 255; i++)if (i !== 127) module.exports.HEADER_CHARS.push(i); -// ',' = \x44 -module.exports.CONNECTION_TOKEN_CHARS = module.exports.HEADER_CHARS.filter((c)=>c !== 44); -module.exports.MAJOR = module.exports.NUM_MAP; -module.exports.MINOR = module.exports.MAJOR; -var $b0e87e3f7a45a404$var$HEADER_STATE; -(function(HEADER_STATE) { - HEADER_STATE[HEADER_STATE["GENERAL"] = 0] = "GENERAL"; - HEADER_STATE[HEADER_STATE["CONNECTION"] = 1] = "CONNECTION"; - HEADER_STATE[HEADER_STATE["CONTENT_LENGTH"] = 2] = "CONTENT_LENGTH"; - HEADER_STATE[HEADER_STATE["TRANSFER_ENCODING"] = 3] = "TRANSFER_ENCODING"; - HEADER_STATE[HEADER_STATE["UPGRADE"] = 4] = "UPGRADE"; - HEADER_STATE[HEADER_STATE["CONNECTION_KEEP_ALIVE"] = 5] = "CONNECTION_KEEP_ALIVE"; - HEADER_STATE[HEADER_STATE["CONNECTION_CLOSE"] = 6] = "CONNECTION_CLOSE"; - HEADER_STATE[HEADER_STATE["CONNECTION_UPGRADE"] = 7] = "CONNECTION_UPGRADE"; - HEADER_STATE[HEADER_STATE["TRANSFER_ENCODING_CHUNKED"] = 8] = "TRANSFER_ENCODING_CHUNKED"; -})($b0e87e3f7a45a404$var$HEADER_STATE = module.exports.HEADER_STATE || (module.exports.HEADER_STATE = {})); -module.exports.SPECIAL_HEADERS = { - "connection": $b0e87e3f7a45a404$var$HEADER_STATE.CONNECTION, - "content-length": $b0e87e3f7a45a404$var$HEADER_STATE.CONTENT_LENGTH, - "proxy-connection": $b0e87e3f7a45a404$var$HEADER_STATE.CONNECTION, - "transfer-encoding": $b0e87e3f7a45a404$var$HEADER_STATE.TRANSFER_ENCODING, - "upgrade": $b0e87e3f7a45a404$var$HEADER_STATE.UPGRADE -}; - -}); -parcelRegister("buWAz", function(module, exports) { -"use strict"; -Object.defineProperty(module.exports, "__esModule", { - value: true -}); -module.exports.enumToMap = void 0; -function $85eff18f64efb839$var$enumToMap(obj) { - const res = {}; - Object.keys(obj).forEach((key)=>{ - const value = obj[key]; - if (typeof value === "number") res[key] = value; - }); - return res; -} -module.exports.enumToMap = $85eff18f64efb839$var$enumToMap; - -}); - - -parcelRegister("cDfDy", function(module, exports) { -"use strict"; - -var $irTh6 = parcelRequire("irTh6"); -function $932541bc4f728666$var$createRedirectInterceptor({ maxRedirections: defaultMaxRedirections }) { - return (dispatch)=>{ - return function Intercept(opts, handler) { - const { maxRedirections: maxRedirections = defaultMaxRedirections } = opts; - if (!maxRedirections) return dispatch(opts, handler); - const redirectHandler = new $irTh6(dispatch, maxRedirections, opts, handler); - opts = { - ...opts, - maxRedirections: 0 - } // Stop sub dispatcher from also redirecting. - ; - return dispatch(opts, redirectHandler); - }; - }; -} -module.exports = $932541bc4f728666$var$createRedirectInterceptor; - -}); -parcelRegister("irTh6", function(module, exports) { -"use strict"; - -var $gv2nV = parcelRequire("gv2nV"); - -var $hHZvh = parcelRequire("hHZvh"); -var $d6e5a0107159a931$require$kBodyUsed = $hHZvh.kBodyUsed; - - -var $cKdp7 = parcelRequire("cKdp7"); -var $d6e5a0107159a931$require$InvalidArgumentError = $cKdp7.InvalidArgumentError; - -const $d6e5a0107159a931$var$redirectableStatusCodes = [ - 300, - 301, - 302, - 303, - 307, - 308 -]; -const $d6e5a0107159a931$var$kBody = Symbol("body"); -class $d6e5a0107159a931$var$BodyAsyncIterable { - constructor(body){ - this[$d6e5a0107159a931$var$kBody] = body; - this[$d6e5a0107159a931$require$kBodyUsed] = false; - } - async *[Symbol.asyncIterator]() { - $g40fK$assert(!this[$d6e5a0107159a931$require$kBodyUsed], "disturbed"); - this[$d6e5a0107159a931$require$kBodyUsed] = true; - yield* this[$d6e5a0107159a931$var$kBody]; - } -} -class $d6e5a0107159a931$var$RedirectHandler { - constructor(dispatch, maxRedirections, opts, handler){ - if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) throw new $d6e5a0107159a931$require$InvalidArgumentError("maxRedirections must be a positive number"); - $gv2nV.validateHandler(handler, opts.method, opts.upgrade); - this.dispatch = dispatch; - this.location = null; - this.abort = null; - this.opts = { - ...opts, - maxRedirections: 0 - } // opts must be a copy - ; - this.maxRedirections = maxRedirections; - this.handler = handler; - this.history = []; - if ($gv2nV.isStream(this.opts.body)) { - // TODO (fix): Provide some way for the user to cache the file to e.g. /tmp - // so that it can be dispatched again? - // TODO (fix): Do we need 100-expect support to provide a way to do this properly? - if ($gv2nV.bodyLength(this.opts.body) === 0) this.opts.body.on("data", function() { - $g40fK$assert(false); - }); - if (typeof this.opts.body.readableDidRead !== "boolean") { - this.opts.body[$d6e5a0107159a931$require$kBodyUsed] = false; - $g40fK$events.prototype.on.call(this.opts.body, "data", function() { - this[$d6e5a0107159a931$require$kBodyUsed] = true; - }); + const initHasKey = Object.keys(init).length !== 0; + // 13. If init is not empty, then: + if (initHasKey) { + // 1. If request’s mode is "navigate", then set it to "same-origin". + if (request.mode === 'navigate') request.mode = 'same-origin'; + // 2. Unset request’s reload-navigation flag. + request.reloadNavigation = false; + // 3. Unset request’s history-navigation flag. + request.historyNavigation = false; + // 4. Set request’s origin to "client". + request.origin = 'client'; + // 5. Set request’s referrer to "client" + request.referrer = 'client'; + // 6. Set request’s referrer policy to the empty string. + request.referrerPolicy = ''; + // 7. Set request’s URL to request’s current URL. + request.url = request.urlList[request.urlList.length - 1]; + // 8. Set request’s URL list to « request’s URL ». + request.urlList = [ + request.url + ]; + } + // 14. If init["referrer"] exists, then: + if (init.referrer !== undefined) { + // 1. Let referrer be init["referrer"]. + const referrer = init.referrer; + // 2. If referrer is the empty string, then set request’s referrer to "no-referrer". + if (referrer === '') request.referrer = 'no-referrer'; + else { + // 1. Let parsedReferrer be the result of parsing referrer with + // baseURL. + // 2. If parsedReferrer is failure, then throw a TypeError. + let parsedReferrer; + try { + parsedReferrer = new URL(referrer, baseUrl); + } catch (err) { + throw new TypeError(`Referrer "${referrer}" is not a valid URL.`, { + cause: err + }); + } + // 3. If one of the following is true + // - parsedReferrer’s scheme is "about" and path is the string "client" + // - parsedReferrer’s origin is not same origin with origin + // then set request’s referrer to "client". + if (parsedReferrer.protocol === 'about:' && parsedReferrer.hostname === 'client' || origin && !$6df5f2cbb77a354d$require$sameOrigin(parsedReferrer, $6df5f2cbb77a354d$require$environmentSettingsObject.settingsObject.baseUrl)) request.referrer = 'client'; + else // 4. Otherwise, set request’s referrer to parsedReferrer. + request.referrer = parsedReferrer; } - } else if (this.opts.body && typeof this.opts.body.pipeTo === "function") // TODO (fix): We can't access ReadableStream internal state - // to determine whether or not it has been disturbed. This is just - // a workaround. - this.opts.body = new $d6e5a0107159a931$var$BodyAsyncIterable(this.opts.body); - else if (this.opts.body && typeof this.opts.body !== "string" && !ArrayBuffer.isView(this.opts.body) && $gv2nV.isIterable(this.opts.body)) // TODO: Should we allow re-using iterable if !this.opts.idempotent - // or through some other flag? - this.opts.body = new $d6e5a0107159a931$var$BodyAsyncIterable(this.opts.body); - } - onConnect(abort) { - this.abort = abort; - this.handler.onConnect(abort, { - history: this.history - }); - } - onUpgrade(statusCode, headers, socket) { - this.handler.onUpgrade(statusCode, headers, socket); - } - onError(error) { - this.handler.onError(error); - } - onHeaders(statusCode, headers, resume, statusText) { - this.location = this.history.length >= this.maxRedirections || $gv2nV.isDisturbed(this.opts.body) ? null : $d6e5a0107159a931$var$parseLocation(statusCode, headers); - if (this.opts.origin) this.history.push(new URL(this.opts.path, this.opts.origin)); - if (!this.location) return this.handler.onHeaders(statusCode, headers, resume, statusText); - const { origin: origin, pathname: pathname, search: search } = $gv2nV.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin))); - const path = search ? `${pathname}${search}` : pathname; - // Remove headers referring to the original URL. - // By default it is Host only, unless it's a 303 (see below), which removes also all Content-* headers. - // https://tools.ietf.org/html/rfc7231#section-6.4 - this.opts.headers = $d6e5a0107159a931$var$cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin); - this.opts.path = path; - this.opts.origin = origin; - this.opts.maxRedirections = 0; - this.opts.query = null; - // https://tools.ietf.org/html/rfc7231#section-6.4.4 - // In case of HTTP 303, always replace method to be either HEAD or GET - if (statusCode === 303 && this.opts.method !== "HEAD") { - this.opts.method = "GET"; - this.opts.body = null; } - } - onData(chunk) { - if (this.location) ; - else return this.handler.onData(chunk); - } - onComplete(trailers) { - if (this.location) { - /* - https://tools.ietf.org/html/rfc7231#section-6.4 - - TLDR: undici always ignores 3xx response trailers as they are not expected in case of redirections - and neither are useful if present. - - See comment on onData method above for more detailed informations. - */ this.location = null; - this.abort = null; - this.dispatch(this.opts, this); - } else this.handler.onComplete(trailers); - } - onBodySent(chunk) { - if (this.handler.onBodySent) this.handler.onBodySent(chunk); - } -} -function $d6e5a0107159a931$var$parseLocation(statusCode, headers) { - if ($d6e5a0107159a931$var$redirectableStatusCodes.indexOf(statusCode) === -1) return null; - for(let i = 0; i < headers.length; i += 2){ - if (headers[i].toString().toLowerCase() === "location") return headers[i + 1]; - } -} -// https://tools.ietf.org/html/rfc7231#section-6.4.4 -function $d6e5a0107159a931$var$shouldRemoveHeader(header, removeContent, unknownOrigin) { - if (header.length === 4) return $gv2nV.headerNameToString(header) === "host"; - if (removeContent && $gv2nV.headerNameToString(header).startsWith("content-")) return true; - if (unknownOrigin && (header.length === 13 || header.length === 6 || header.length === 19)) { - const name = $gv2nV.headerNameToString(header); - return name === "authorization" || name === "cookie" || name === "proxy-authorization"; - } - return false; -} -// https://tools.ietf.org/html/rfc7231#section-6.4 -function $d6e5a0107159a931$var$cleanRequestHeaders(headers, removeContent, unknownOrigin) { - const ret = []; - if (Array.isArray(headers)) { - for(let i = 0; i < headers.length; i += 2)if (!$d6e5a0107159a931$var$shouldRemoveHeader(headers[i], removeContent, unknownOrigin)) ret.push(headers[i], headers[i + 1]); - } else if (headers && typeof headers === "object") { - for (const key of Object.keys(headers))if (!$d6e5a0107159a931$var$shouldRemoveHeader(key, removeContent, unknownOrigin)) ret.push(key, headers[key]); - } else $g40fK$assert(headers == null, "headers must be an object or an array"); - return ret; -} -module.exports = $d6e5a0107159a931$var$RedirectHandler; - -}); - - -parcelRegister("2SOyL", function(module, exports) { -module.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AAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCAQDscBAAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBka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RAM2AMLQgAhESAQIQEgEC0AAEFQag435wHmAQECAwQFBgcIAAAAAAAAAAkKCwwNDgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADxAREhMUAAtBHiEQDL0DC0ICIREM5QELQgMhEQzkAQtCBCERDOMBC0IFIREM4gELQgYhEQzhAQtCByERDOABC0IIIREM3wELQgkhEQzeAQtCCiERDN0BC0ILIREM3AELQgwhEQzbAQtCDSERDNoBC0IOIREM2QELQg8hEQzYAQtCCiERDNcBC0ILIREM1gELQgwhEQzVAQtCDSERDNQBC0IOIREM0wELQg8hEQzSAQtCACERAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCAQLQAAQVBqDjflAeQBAAECAwQFBgfmAeYB5gHmAeYB5gHmAQgJCgsMDeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gEODxAREhPmAQtCAiERDOQBC0IDIREM4wELQgQhEQziAQtCBSERDOEBC0IGIREM4AELQgchEQzfAQtCCCERDN4BC0IJIREM3QELQgohEQzcAQtCCyERDNsBC0IMIREM2gELQg0hEQzZAQtCDiERDNgBC0IPIREM1wELQgohEQzWAQtCCyERDNUBC0IMIREM1AELQg0hEQzTAQtCDiERDNIBC0IPIREM0QELIABCACAAKQMgIhEgAiABIhBrrSISfSITIBMgEVYbNwMgIBEgElYiFEUN0gFBHyEQDMADCwJAIAEiASACRg0AIABBiYCAgAA2AgggACABNgIEIAEhAUEkIRAMpwMLQSAhEAy/AwsgACABIhAgAhC+gICAAEF/ag4FtgEAxQIB0QHSAQtBESEQDKQDCyAAQQE6AC8gECEBDLsDCyABIgEgAkcN0gFBJCEQDLsDCyABIg0gAkcNHkHGACEQDLoDCyAAIAEiASACELKAgIAAIhAN1AEgASEBDLUBCyABIhAgAkcNJkHQACEQDLgDCwJAIAEiASACRw0AQSghEAy4AwsgAEEANgIEIABBjICAgAA2AgggACABIAEQsYCAgAAiEA3T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EG5jYCAADYCECAAQRo2AgxBACEQDLQBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxUCyAAQeUANgIcIAAgATYCFCAAIBA2AgxBACEQDLMBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxNCyAAQdIANgIcIAAgATYCFCAAIBA2AgxBACEQDLIBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxNCyAAQdMANgIcIAAgATYCFCAAIBA2AgxBACEQDLEBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxRCyAAQeUANgIcIAAgATYCFCAAIBA2AgxBACEQDLABCyAAQQA2AhwgACABNgIUIABBxoqAgAA2AhAgAEEHNgIMQQAhEAyvAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMSQsgAEHSADYCHCAAIAE2AhQgACAQNgIMQQAhEAyuAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMSQsgAEHTADYCHCAAIAE2AhQgACAQNgIMQQAhEAytAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMTQsgAEHlADYCHCAAIAE2AhQgACAQNgIMQQAhEAysAQsgAEEANgIcIAAgATYCFCAAQdyIgIAANgIQIABBBzYCDEEAIRAMqwELIBBBP0cNASABQQFqIQELQQUhEAyQAQtBACEQIABBADYCHCAAIAE2AhQgAEH9koCAADYCECAAQQc2AgwMqAELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDEILIABB0gA2AhwgACABNgIUIAAgEDYCDEEAIRAMpwELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDEILIABB0wA2AhwgACABNgIUIAAgEDYCDEEAIRAMpgELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDEYLIABB5QA2AhwgACABNgIUIAAgED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2AggPC0EfIQICQCAAQf///wdLDQAgAEEIdiICIAJBgP4/akEQdkEIcSICdCIEIARBgOAfakEQdkEEcSIEdCIGIAZBgIAPakEQdkECcSIGdEEPdiACIARyIAZyayICQQF0IAAgAkEVanZBAXFyQRxqIQILIAEgAjYCHCABQgA3AhAgAkECdEG40oCAAGohBAJAAkBBACgCjNCAgAAiBkEBIAJ0IgNxDQAgBCABNgIAQQAgBiADcjYCjNCAgAAgASAENgIYIAEgATYCCCABIAE2AgwMAQsgAEEAQRkgAkEBdmsgAkEfRht0IQIgBCgCACEGAkADQCAGIgQoAgRBeHEgAEYNASACQR12IQYgAkEBdCECIAQgBkEEcWpBEGoiAygCACIGDQALIAMgATYCACABIAQ2AhggASABNgIMIAEgATYCCAwBCyAEKAIIIgAgATYCDCAEIAE2AgggAUEANgIYIAEgBDYCDCABIAA2AggLQQBBACgCqNCAgABBf2oiAUF/IAEbNgKo0ICAAAsLBAAAAAtOAAJAIAANAD8AQRB0DwsCQCAAQf//A3ENACAAQX9MDQACQCAAQRB2QAAiAEF/Rw0AQQBBMDYC+NOAgABBfw8LIABBEHQPCxDKgICAAAAL8gICA38BfgJAIAJFDQAgACABOgAAIAIgAGoiA0F/aiABOgAAIAJBA0kNACAAIAE6AAIgACABOgABIANBfWogAToAACADQX5qIAE6AAAgAkEHSQ0AIAAgAToAAyADQXxqIAE6AAAgAkEJSQ0AIABBACAAa0EDcSIEaiIDIAFB/wFxQYGChAhsIgE2AgAgAyACIARrQXxxIgRqIgJBfGogATYCACAEQQlJDQAgAyABNgIIIAMgATYCBCACQXhqIAE2AgAgAkF0aiABNgIAIARBGUkNACADIAE2AhggAyABNgIUIAMgATYCECADIAE2AgwgAkFwaiABNgIAIAJBbGogATYCACACQWhqIAE2AgAgAkFkaiABNgIAIAQgA0EEcUEYciIFayICQSBJDQAgAa1CgYCAgBB+IQYgAyAFaiEBA0AgASAGNwMYIAEgBjcDECABIAY3AwggASAGNwMAIAFBIGohASACQWBqIgJBH0sNAA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k3MS8tJyspCrLgAkUCAAsIABCIgICAAAsZACAAEMKAgIAAGiAAIAI2AjggACABOgAoCxwAIAAgAC8BMiAALQAuIAAQwYCAgAAQgICAgAALKgEBf0HAABDGgICAACIBEMKAgIAAGiABQYCIgIAANgI4IAEgADoAKCABCwoAIAAQyICAgAALBwAgAC0AKAsHACAALQAqCwcAIAAtACsLBwAgAC0AKQsHACAALwEyCwcAIAAtAC4LRQEEfyAAKAIYIQEgAC0ALSECIAAtACghAyAAKAI4IQQgABDCgICAABogACAENgI4IAAgAzoAKCAAIAI6AC0gACABNgIYCxEAIAAgASABIAJqEMOAgIAACxAAIABBAEHcABDMgICAABoLZwEBf0EAIQECQCAAKAIMDQACQAJAAkACQCAALQAvDgMBAAMCCyAAKAI4IgFFDQAgASgCLCIBRQ0AIAAgARGAgICAAAAiAQ0DC0EADwsQyoCAgAAACyAAQcOWgIAANgIQQQ4hAQsgAQseAAJAIAAoAgwNACAAQdGbgIAANgIQIABBFTYCDAsLFgACQCAAKAIMQRVHDQAgAEEANgIMCwsWAAJAIAAoAgxBFkcNACAAQQA2AgwLCwcAIAAoAgwLBwAgACgCEAsJACAAIAE2AhALBwAgACgCFAsiAAJAIABBJEkNABDKgICAAAALIABBAnRBoLOAgABqKAIACyIAAkAgAEEuSQ0AEMqAgIAAAAsgAEECdEGwtICAAGooAgAL7gsBAX9B66iAgAAhAQJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIABBnH9qDvQDY2IAAWFhYWFhYQIDBAVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYW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QQBHIQMLIABBADsBMCAAQQA6AC8gAwuZAQECfwJAAkACQCAALQAqRQ0AIAAtACtFDQBBACEBIAAvATAiAkECcUUNAQwCC0EAIQEgAC8BMCICQQFxRQ0BC0EBIQEgAC0AKEEBRg0AIAAvATJB//8DcSIAQZx/akHkAEkNACAAQcwBRg0AIABBsAJGDQAgAkHAAHENAEEAIQEgAkGIBHFBgARGDQAgAkEocUEARyEBCyABC0kBAXsgAEEQav0MAAAAAAAAAAAAAAAAAAAAACIB/QsDACAAIAH9CwMAIABBMGogAf0LAwAgAEEgaiAB/QsDACAAQd0BNgIcQQALewEBfwJAIAAoAgwiAw0AAkAgACgCBEUNACAAIAE2AgQLAkAgACABIAIQxICAgAAiAw0AIAAoAgwPCyAAIAM2AhxBACEDIAAoAgQiAUUNACAAIAEgAiAAKAIIEYGAgIAAACIBRQ0AIAAgAjYCFCAAIAE2AgwgASEDCyADC+TzAQMOfwN+BH8jgICAgABBEGsiAySAgICAACABIQQgASEFIAEhBiABIQcgASEIIAEhCSABIQogASELIAEhDCABIQ0gASEOIAEhDwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJA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3dAUHDASEQDP4DCyABIgEgAkcNkAFB9wAhEAz9AwsgASIBIAJHDYYBQe8AIRAM/AMLIAEiASACRw1/QeoAIRAM+wMLIAEiASACRw17QegAIRAM+gMLIAEiASACRw14QeYAIRAM+QMLIAEiASACRw0aQRghEAz4AwsgASIBIAJHDRRBEiEQDPcDCyABIgEgAkcNWUHFACEQDPYDCyABIgEgAkcNSkE/IRAM9QMLIAEiASACRw1IQTwhEAz0AwsgASIBIAJHDUFBMSEQDPMDCyAALQAuQQFGDesDDIcCCyAAIAEiASACEMCAgIAAQQFHDeYBIABCADcDIAznAQsgACABIgEgAhC0gICAACIQDecBIAEhAQz1AgsCQCABIgEgAkcNAEEGIRAM8AMLIAAgAUEBaiIBIAIQu4CAgAAiEA3oASABIQEMMQsgAEIANwMgQRIhEAzVAwsgASIQIAJHDStBHSEQDO0DCwJAIAEiASACRg0AIAFBAWohAUEQIRAM1AMLQQchEAzsAwsgAEIAIAApAyAiESACIAEiEGutIhJ9IhMgEyARVhs3AyAgESASViIURQ3lAUEIIRAM6wMLAkAgASIBIAJGDQAgAEGJgICAADYCCCAAIAE2AgQgASEBQRQhEAzSAwtBCSEQDOoDCyABIQEgACkDIFAN5AEgASEBDPICCwJAIAEiASACRw0AQQshEAzpAwsgACABQQFqIgEgAhC2gICAACIQDeUBIAEhAQzyAgsgACABIgEgAhC4gICAACIQDeUBIAEhAQzyAgsgACABIgEgAhC4gICAACIQDeYBIAEhAQwNCyAAIAEiASACELqAgIAAIhAN5wEgASEBDPACCwJAIAEiASACRw0AQQ8hEAzlAwsgAS0AACIQQTtGDQggEEENRw3oASABQQFqIQEM7wILIAAgASIBIAIQuoCAgAAiEA3oASABIQEM8gILA0ACQCABLQAAQfC1gIAAai0AACIQQQFGDQAgEEECRw3rASAAKAIEIRAgAEEANgIEIAAgECABQQFqIgEQuYCAgAAiEA3qASABIQEM9AILIAFBAWoiASACRw0AC0ESIRAM4gMLIAAgASIBIAIQuoCAgAAiEA3pASABIQEMCgsg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AAgATYCFCAAIAQ2AgxBACEQDLsBCwJAIAEtAABBUGoiEEH/AXFBCk8NACAAIBA6ACogAUEBaiEBQc8AIRAMogELIAAoAgQhBCAAQQA2AgQCQCAAIAQgARCtgICAACIEDQAgASEBDKcBCyAAQd4ANgIcIAAgATYCFCAAIAQ2AgxBACEQDLoBCyAAQQA2AgAgF0EBaiEBAkAgAC0AKUEjTw0AIAEhAQxZCyAAQQA2AhwgACABNgIUIABB04mAgAA2AhAgAEEINgIMQQAhEAy5AQsgAEEANgIAC0EAIRAgAEEANgIcIAAgATYCFCAAQZCzgIAANgIQIABBCDYCDAy3AQsgAEEANgIAIBdBAWohAQJAIAAtAClBIUcNACABIQEMVgsgAEEANgIcIAAgATYCFCAAQZuKgIAANgIQIABBCDYCDEEAIRAMtgELIABBADYCACAXQQFqIQECQCAALQApIhBBXWpBC08NACABIQEMVQsCQCAQQQZLDQBBASAQdEHKAHFFDQAgASEBDFULQQAhECAAQQA2AhwgACABNgIUIABB94mAgAA2AhAgAEEINgIMDLUBCyAQQRVGDXEgAEEANgIcIAAgATYCFCAAQbmNgIAANgIQIABBGjYCDEEAIRAMtAELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDFQLIABB5QA2AhwgACABNgIUIAAgEDYCDEEAIRAMswELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDE0LIABB0gA2AhwgACABNgIUIAAgEDYCDEEAIRAMsgELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDE0LIABB0wA2AhwgACABNgIUIAAgEDYCDEEAIRAMsQELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDFELIABB5QA2AhwgACABNgIUIAAgEDYCDEEAIRAMsAELIABBADYCHCAAIAE2AhQgAEHGioCAADYCECAAQQc2AgxBACEQDK8BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxJCyAAQdIANgIcIA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1RFVEVDUklCRUxVU0hFVEVBRFNFQVJDSFJHRUNUSVZJVFlMRU5EQVJWRU9USUZZUFRJT05TQ0hTRUFZU1RBVENIR0VPUkRJUkVDVE9SVFJDSFBBUkFNRVRFUlVSQ0VCU0NSSUJFQVJET1dOQUNFSU5ETktDS1VCU0NSSUJFSFRUUC9BRFRQLw=="; - -}); - - -parcelRegister("jIWP2", function(module, exports) { -"use strict"; - -var $11uIv = parcelRequire("11uIv"); -var $e5bfc140cfe6bb53$require$PoolBase = $11uIv.PoolBase; -var $e5bfc140cfe6bb53$require$kClients = $11uIv.kClients; -var $e5bfc140cfe6bb53$require$kNeedDrain = $11uIv.kNeedDrain; -var $e5bfc140cfe6bb53$require$kAddClient = $11uIv.kAddClient; -var $e5bfc140cfe6bb53$require$kGetDispatcher = $11uIv.kGetDispatcher; - -var $dQprK = parcelRequire("dQprK"); - -var $cKdp7 = parcelRequire("cKdp7"); -var $e5bfc140cfe6bb53$require$InvalidArgumentError = $cKdp7.InvalidArgumentError; - -var $gv2nV = parcelRequire("gv2nV"); - -var $hHZvh = parcelRequire("hHZvh"); -var $e5bfc140cfe6bb53$require$kUrl = $hHZvh.kUrl; -var $e5bfc140cfe6bb53$require$kInterceptors = $hHZvh.kInterceptors; - -var $h3cex = parcelRequire("h3cex"); -const $e5bfc140cfe6bb53$var$kOptions = Symbol("options"); -const $e5bfc140cfe6bb53$var$kConnections = Symbol("connections"); -const $e5bfc140cfe6bb53$var$kFactory = Symbol("factory"); -function $e5bfc140cfe6bb53$var$defaultFactory(origin, opts) { - return new $dQprK(origin, opts); -} -class $e5bfc140cfe6bb53$var$Pool extends $e5bfc140cfe6bb53$require$PoolBase { - constructor(origin, { connections: connections, factory: factory = $e5bfc140cfe6bb53$var$defaultFactory, connect: connect, connectTimeout: connectTimeout, tls: tls, maxCachedSessions: maxCachedSessions, socketPath: socketPath, autoSelectFamily: autoSelectFamily, autoSelectFamilyAttemptTimeout: autoSelectFamilyAttemptTimeout, allowH2: allowH2, ...options } = {}){ - super(); - if (connections != null && (!Number.isFinite(connections) || connections < 0)) throw new $e5bfc140cfe6bb53$require$InvalidArgumentError("invalid connections"); - if (typeof factory !== "function") throw new $e5bfc140cfe6bb53$require$InvalidArgumentError("factory must be a function."); - if (connect != null && typeof connect !== "function" && typeof connect !== "object") throw new $e5bfc140cfe6bb53$require$InvalidArgumentError("connect must be a function or an object"); - if (typeof connect !== "function") connect = $h3cex({ - ...tls, - maxCachedSessions: maxCachedSessions, - allowH2: allowH2, - socketPath: socketPath, - timeout: connectTimeout, - ...$gv2nV.nodeHasAutoSelectFamily && autoSelectFamily ? { - autoSelectFamily: autoSelectFamily, - autoSelectFamilyAttemptTimeout: autoSelectFamilyAttemptTimeout - } : undefined, - ...connect + // 15. If init["referrerPolicy"] exists, then set request’s referrer policy + // to it. + if (init.referrerPolicy !== undefined) request.referrerPolicy = init.referrerPolicy; + // 16. Let mode be init["mode"] if it exists, and fallbackMode otherwise. + let mode; + if (init.mode !== undefined) mode = init.mode; + else mode = fallbackMode; + // 17. If mode is "navigate", then throw a TypeError. + if (mode === 'navigate') throw $6df5f2cbb77a354d$require$webidl.errors.exception({ + header: 'Request constructor', + message: 'invalid request mode navigate.' }); - this[$e5bfc140cfe6bb53$require$kInterceptors] = options.interceptors && options.interceptors.Pool && Array.isArray(options.interceptors.Pool) ? options.interceptors.Pool : []; - this[$e5bfc140cfe6bb53$var$kConnections] = connections || null; - this[$e5bfc140cfe6bb53$require$kUrl] = $gv2nV.parseOrigin(origin); - this[$e5bfc140cfe6bb53$var$kOptions] = { - ...$gv2nV.deepClone(options), - connect: connect, - allowH2: allowH2 - }; - this[$e5bfc140cfe6bb53$var$kOptions].interceptors = options.interceptors ? { - ...options.interceptors - } : undefined; - this[$e5bfc140cfe6bb53$var$kFactory] = factory; - } - [$e5bfc140cfe6bb53$require$kGetDispatcher]() { - let dispatcher = this[$e5bfc140cfe6bb53$require$kClients].find((dispatcher)=>!dispatcher[$e5bfc140cfe6bb53$require$kNeedDrain]); - if (dispatcher) return dispatcher; - if (!this[$e5bfc140cfe6bb53$var$kConnections] || this[$e5bfc140cfe6bb53$require$kClients].length < this[$e5bfc140cfe6bb53$var$kConnections]) { - dispatcher = this[$e5bfc140cfe6bb53$var$kFactory](this[$e5bfc140cfe6bb53$require$kUrl], this[$e5bfc140cfe6bb53$var$kOptions]); - this[$e5bfc140cfe6bb53$require$kAddClient](dispatcher); - } - return dispatcher; - } -} -module.exports = $e5bfc140cfe6bb53$var$Pool; - -}); -parcelRegister("11uIv", function(module, exports) { -"use strict"; - -var $8lFjX = parcelRequire("8lFjX"); - -var $lLdat = parcelRequire("lLdat"); - -var $hHZvh = parcelRequire("hHZvh"); -var $0bedb628579b4525$require$kConnected = $hHZvh.kConnected; -var $0bedb628579b4525$require$kSize = $hHZvh.kSize; -var $0bedb628579b4525$require$kRunning = $hHZvh.kRunning; -var $0bedb628579b4525$require$kPending = $hHZvh.kPending; -var $0bedb628579b4525$require$kQueued = $hHZvh.kQueued; -var $0bedb628579b4525$require$kBusy = $hHZvh.kBusy; -var $0bedb628579b4525$require$kFree = $hHZvh.kFree; -var $0bedb628579b4525$require$kUrl = $hHZvh.kUrl; -var $0bedb628579b4525$require$kClose = $hHZvh.kClose; -var $0bedb628579b4525$require$kDestroy = $hHZvh.kDestroy; -var $0bedb628579b4525$require$kDispatch = $hHZvh.kDispatch; - -var $ahgqc = parcelRequire("ahgqc"); -const $0bedb628579b4525$var$kClients = Symbol("clients"); -const $0bedb628579b4525$var$kNeedDrain = Symbol("needDrain"); -const $0bedb628579b4525$var$kQueue = Symbol("queue"); -const $0bedb628579b4525$var$kClosedResolve = Symbol("closed resolve"); -const $0bedb628579b4525$var$kOnDrain = Symbol("onDrain"); -const $0bedb628579b4525$var$kOnConnect = Symbol("onConnect"); -const $0bedb628579b4525$var$kOnDisconnect = Symbol("onDisconnect"); -const $0bedb628579b4525$var$kOnConnectionError = Symbol("onConnectionError"); -const $0bedb628579b4525$var$kGetDispatcher = Symbol("get dispatcher"); -const $0bedb628579b4525$var$kAddClient = Symbol("add client"); -const $0bedb628579b4525$var$kRemoveClient = Symbol("remove client"); -const $0bedb628579b4525$var$kStats = Symbol("stats"); -class $0bedb628579b4525$var$PoolBase extends $8lFjX { - constructor(){ - super(); - this[$0bedb628579b4525$var$kQueue] = new $lLdat(); - this[$0bedb628579b4525$var$kClients] = []; - this[$0bedb628579b4525$require$kQueued] = 0; - const pool = this; - this[$0bedb628579b4525$var$kOnDrain] = function onDrain(origin, targets) { - const queue = pool[$0bedb628579b4525$var$kQueue]; - let needDrain = false; - while(!needDrain){ - const item = queue.shift(); - if (!item) break; - pool[$0bedb628579b4525$require$kQueued]--; - needDrain = !this.dispatch(item.opts, item.handler); + // 18. If mode is non-null, set request’s mode to mode. + if (mode != null) request.mode = mode; + // 19. If init["credentials"] exists, then set request’s credentials mode + // to it. + if (init.credentials !== undefined) request.credentials = init.credentials; + // 18. If init["cache"] exists, then set request’s cache mode to it. + if (init.cache !== undefined) request.cache = init.cache; + // 21. If request’s cache mode is "only-if-cached" and request’s mode is + // not "same-origin", then throw a TypeError. + if (request.cache === 'only-if-cached' && request.mode !== 'same-origin') throw new TypeError("'only-if-cached' can be set only with 'same-origin' mode"); + // 22. If init["redirect"] exists, then set request’s redirect mode to it. + if (init.redirect !== undefined) request.redirect = init.redirect; + // 23. If init["integrity"] exists, then set request’s integrity metadata to it. + if (init.integrity != null) request.integrity = String(init.integrity); + // 24. If init["keepalive"] exists, then set request’s keepalive to it. + if (init.keepalive !== undefined) request.keepalive = Boolean(init.keepalive); + // 25. If init["method"] exists, then: + if (init.method !== undefined) { + // 1. Let method be init["method"]. + let method = init.method; + const mayBeNormalized = $6df5f2cbb77a354d$var$normalizedMethodRecords[method]; + if (mayBeNormalized !== undefined) // Note: Bypass validation DELETE, GET, HEAD, OPTIONS, POST, PUT, PATCH and these lowercase ones + request.method = mayBeNormalized; + else { + // 2. If method is not a method or method is a forbidden method, then + // throw a TypeError. + if (!$6df5f2cbb77a354d$require$isValidHTTPToken(method)) throw new TypeError(`'${method}' is not a valid HTTP method.`); + const upperCase = method.toUpperCase(); + if ($6df5f2cbb77a354d$require$forbiddenMethodsSet.has(upperCase)) throw new TypeError(`'${method}' HTTP method is unsupported.`); + // 3. Normalize method. + // https://fetch.spec.whatwg.org/#concept-method-normalize + // Note: must be in uppercase + method = $6df5f2cbb77a354d$var$normalizedMethodRecordsBase[upperCase] ?? method; + // 4. Set request’s method to method. + request.method = method; } - this[$0bedb628579b4525$var$kNeedDrain] = needDrain; - if (!this[$0bedb628579b4525$var$kNeedDrain] && pool[$0bedb628579b4525$var$kNeedDrain]) { - pool[$0bedb628579b4525$var$kNeedDrain] = false; - pool.emit("drain", origin, [ - pool, - ...targets - ]); + if (!$6df5f2cbb77a354d$var$patchMethodWarning && request.method === 'patch') { + process.emitWarning('Using `patch` is highly likely to result in a `405 Method Not Allowed`. `PATCH` is much more likely to succeed.', { + code: 'UNDICI-FETCH-patch' + }); + $6df5f2cbb77a354d$var$patchMethodWarning = true; } - if (pool[$0bedb628579b4525$var$kClosedResolve] && queue.isEmpty()) Promise.all(pool[$0bedb628579b4525$var$kClients].map((c)=>c.close())).then(pool[$0bedb628579b4525$var$kClosedResolve]); - }; - this[$0bedb628579b4525$var$kOnConnect] = (origin, targets)=>{ - pool.emit("connect", origin, [ - pool, - ...targets - ]); - }; - this[$0bedb628579b4525$var$kOnDisconnect] = (origin, targets, err)=>{ - pool.emit("disconnect", origin, [ - pool, - ...targets - ], err); - }; - this[$0bedb628579b4525$var$kOnConnectionError] = (origin, targets, err)=>{ - pool.emit("connectionError", origin, [ - pool, - ...targets - ], err); - }; - this[$0bedb628579b4525$var$kStats] = new $ahgqc(this); - } - get [$0bedb628579b4525$require$kBusy]() { - return this[$0bedb628579b4525$var$kNeedDrain]; - } - get [$0bedb628579b4525$require$kConnected]() { - return this[$0bedb628579b4525$var$kClients].filter((client)=>client[$0bedb628579b4525$require$kConnected]).length; - } - get [$0bedb628579b4525$require$kFree]() { - return this[$0bedb628579b4525$var$kClients].filter((client)=>client[$0bedb628579b4525$require$kConnected] && !client[$0bedb628579b4525$var$kNeedDrain]).length; - } - get [$0bedb628579b4525$require$kPending]() { - let ret = this[$0bedb628579b4525$require$kQueued]; - for (const { [$0bedb628579b4525$require$kPending]: pending } of this[$0bedb628579b4525$var$kClients])ret += pending; - return ret; - } - get [$0bedb628579b4525$require$kRunning]() { - let ret = 0; - for (const { [$0bedb628579b4525$require$kRunning]: running } of this[$0bedb628579b4525$var$kClients])ret += running; - return ret; - } - get [$0bedb628579b4525$require$kSize]() { - let ret = this[$0bedb628579b4525$require$kQueued]; - for (const { [$0bedb628579b4525$require$kSize]: size } of this[$0bedb628579b4525$var$kClients])ret += size; - return ret; - } - get stats() { - return this[$0bedb628579b4525$var$kStats]; - } - async [$0bedb628579b4525$require$kClose]() { - if (this[$0bedb628579b4525$var$kQueue].isEmpty()) return Promise.all(this[$0bedb628579b4525$var$kClients].map((c)=>c.close())); - else return new Promise((resolve)=>{ - this[$0bedb628579b4525$var$kClosedResolve] = resolve; - }); - } - async [$0bedb628579b4525$require$kDestroy](err) { - while(true){ - const item = this[$0bedb628579b4525$var$kQueue].shift(); - if (!item) break; - item.handler.onError(err); } - return Promise.all(this[$0bedb628579b4525$var$kClients].map((c)=>c.destroy(err))); - } - [$0bedb628579b4525$require$kDispatch](opts, handler) { - const dispatcher = this[$0bedb628579b4525$var$kGetDispatcher](); - if (!dispatcher) { - this[$0bedb628579b4525$var$kNeedDrain] = true; - this[$0bedb628579b4525$var$kQueue].push({ - opts: opts, - handler: handler - }); - this[$0bedb628579b4525$require$kQueued]++; - } else if (!dispatcher.dispatch(opts, handler)) { - dispatcher[$0bedb628579b4525$var$kNeedDrain] = true; - this[$0bedb628579b4525$var$kNeedDrain] = !this[$0bedb628579b4525$var$kGetDispatcher](); + // 26. If init["signal"] exists, then set signal to it. + if (init.signal !== undefined) signal = init.signal; + // 27. Set this’s request to request. + this[$6df5f2cbb77a354d$require$kState] = request; + // 28. Set this’s signal to a new AbortSignal object with this’s relevant + // Realm. + // TODO: could this be simplified with AbortSignal.any + // (https://dom.spec.whatwg.org/#dom-abortsignal-any) + const ac = new AbortController(); + this[$6df5f2cbb77a354d$require$kSignal] = ac.signal; + // 29. If signal is not null, then make this’s signal follow signal. + if (signal != null) { + if (!signal || typeof signal.aborted !== 'boolean' || typeof signal.addEventListener !== 'function') throw new TypeError("Failed to construct 'Request': member signal is not of type AbortSignal."); + if (signal.aborted) ac.abort(signal.reason); + else { + // Keep a strong ref to ac while request object + // is alive. This is needed to prevent AbortController + // from being prematurely garbage collected. + // See, https://github.com/nodejs/undici/issues/1926. + this[$6df5f2cbb77a354d$var$kAbortController] = ac; + const acRef = new WeakRef(ac); + const abort = $6df5f2cbb77a354d$var$buildAbort(acRef); + // Third-party AbortControllers may not work with these. + // See, https://github.com/nodejs/undici/pull/1910#issuecomment-1464495619. + try { + // If the max amount of listeners is equal to the default, increase it + // This is only available in node >= v19.9.0 + if (typeof $6df5f2cbb77a354d$require$getMaxListeners === 'function' && $6df5f2cbb77a354d$require$getMaxListeners(signal) === $6df5f2cbb77a354d$require$defaultMaxListeners) $6df5f2cbb77a354d$require$setMaxListeners(1500, signal); + else if ($6df5f2cbb77a354d$require$getEventListeners(signal, 'abort').length >= $6df5f2cbb77a354d$require$defaultMaxListeners) $6df5f2cbb77a354d$require$setMaxListeners(1500, signal); + } catch {} + $bFRvW.addAbortListener(signal, abort); + // The third argument must be a registry key to be unregistered. + // Without it, you cannot unregister. + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry + // abort is used as the unregister key. (because it is unique) + $6df5f2cbb77a354d$var$requestFinalizer.register(ac, { + signal: signal, + abort: abort + }, abort); + } + } + // 30. Set this’s headers to a new Headers object with this’s relevant + // Realm, whose header list is request’s header list and guard is + // "request". + this[$6df5f2cbb77a354d$require$kHeaders] = new $6df5f2cbb77a354d$require$Headers($6df5f2cbb77a354d$require$kConstruct); + $6df5f2cbb77a354d$require$setHeadersList(this[$6df5f2cbb77a354d$require$kHeaders], request.headersList); + $6df5f2cbb77a354d$require$setHeadersGuard(this[$6df5f2cbb77a354d$require$kHeaders], 'request'); + // 31. If this’s request’s mode is "no-cors", then: + if (mode === 'no-cors') { + // 1. If this’s request’s method is not a CORS-safelisted method, + // then throw a TypeError. + if (!$6df5f2cbb77a354d$require$corsSafeListedMethodsSet.has(request.method)) throw new TypeError(`'${request.method} is unsupported in no-cors mode.`); + // 2. Set this’s headers’s guard to "request-no-cors". + $6df5f2cbb77a354d$require$setHeadersGuard(this[$6df5f2cbb77a354d$require$kHeaders], 'request-no-cors'); + } + // 32. If init is not empty, then: + if (initHasKey) { + /** @type {HeadersList} */ const headersList = $6df5f2cbb77a354d$require$getHeadersList(this[$6df5f2cbb77a354d$require$kHeaders]); + // 1. Let headers be a copy of this’s headers and its associated header + // list. + // 2. If init["headers"] exists, then set headers to init["headers"]. + const headers = init.headers !== undefined ? init.headers : new $6df5f2cbb77a354d$require$HeadersList(headersList); + // 3. Empty this’s headers’s header list. + headersList.clear(); + // 4. If headers is a Headers object, then for each header in its header + // list, append header’s name/header’s value to this’s headers. + if (headers instanceof $6df5f2cbb77a354d$require$HeadersList) { + for (const { name: name, value: value } of headers.rawValues())headersList.append(name, value, false); + // Note: Copy the `set-cookie` meta-data. + headersList.cookies = headers.cookies; + } else // 5. Otherwise, fill this’s headers with headers. + $6df5f2cbb77a354d$require$fillHeaders(this[$6df5f2cbb77a354d$require$kHeaders], headers); + } + // 33. Let inputBody be input’s request’s body if input is a Request + // object; otherwise null. + const inputBody = input instanceof $6df5f2cbb77a354d$var$Request ? input[$6df5f2cbb77a354d$require$kState].body : null; + // 34. If either init["body"] exists and is non-null or inputBody is + // non-null, and request’s method is `GET` or `HEAD`, then throw a + // TypeError. + if ((init.body != null || inputBody != null) && (request.method === 'GET' || request.method === 'HEAD')) throw new TypeError('Request with GET/HEAD method cannot have body.'); + // 35. Let initBody be null. + let initBody = null; + // 36. If init["body"] exists and is non-null, then: + if (init.body != null) { + // 1. Let Content-Type be null. + // 2. Set initBody and Content-Type to the result of extracting + // init["body"], with keepalive set to request’s keepalive. + const [extractedBody, contentType] = $6df5f2cbb77a354d$require$extractBody(init.body, request.keepalive); + initBody = extractedBody; + // 3, If Content-Type is non-null and this’s headers’s header list does + // not contain `Content-Type`, then append `Content-Type`/Content-Type to + // this’s headers. + if (contentType && !$6df5f2cbb77a354d$require$getHeadersList(this[$6df5f2cbb77a354d$require$kHeaders]).contains('content-type', true)) this[$6df5f2cbb77a354d$require$kHeaders].append('content-type', contentType); + } + // 37. Let inputOrInitBody be initBody if it is non-null; otherwise + // inputBody. + const inputOrInitBody = initBody ?? inputBody; + // 38. If inputOrInitBody is non-null and inputOrInitBody’s source is + // null, then: + if (inputOrInitBody != null && inputOrInitBody.source == null) { + // 1. If initBody is non-null and init["duplex"] does not exist, + // then throw a TypeError. + if (initBody != null && init.duplex == null) throw new TypeError('RequestInit: duplex option is required when sending a body.'); + // 2. If this’s request’s mode is neither "same-origin" nor "cors", + // then throw a TypeError. + if (request.mode !== 'same-origin' && request.mode !== 'cors') throw new TypeError('If request is made from ReadableStream, mode should be "same-origin" or "cors"'); + // 3. Set this’s request’s use-CORS-preflight flag. + request.useCORSPreflightFlag = true; + } + // 39. Let finalBody be inputOrInitBody. + let finalBody = inputOrInitBody; + // 40. If initBody is null and inputBody is non-null, then: + if (initBody == null && inputBody != null) { + // 1. If input is unusable, then throw a TypeError. + if ($6df5f2cbb77a354d$require$bodyUnusable(input)) throw new TypeError('Cannot construct a Request with a Request object that has already been used.'); + // 2. Set finalBody to the result of creating a proxy for inputBody. + // https://streams.spec.whatwg.org/#readablestream-create-a-proxy + const identityTransform = new TransformStream(); + inputBody.stream.pipeThrough(identityTransform); + finalBody = { + source: inputBody.source, + length: inputBody.length, + stream: identityTransform.readable + }; } - return !this[$0bedb628579b4525$var$kNeedDrain]; + // 41. Set this’s request’s body to finalBody. + this[$6df5f2cbb77a354d$require$kState].body = finalBody; } - [$0bedb628579b4525$var$kAddClient](client) { - client.on("drain", this[$0bedb628579b4525$var$kOnDrain]).on("connect", this[$0bedb628579b4525$var$kOnConnect]).on("disconnect", this[$0bedb628579b4525$var$kOnDisconnect]).on("connectionError", this[$0bedb628579b4525$var$kOnConnectionError]); - this[$0bedb628579b4525$var$kClients].push(client); - if (this[$0bedb628579b4525$var$kNeedDrain]) process.nextTick(()=>{ - if (this[$0bedb628579b4525$var$kNeedDrain]) this[$0bedb628579b4525$var$kOnDrain](client[$0bedb628579b4525$require$kUrl], [ - this, - client - ]); - }); - return this; + // Returns request’s HTTP method, which is "GET" by default. + get method() { + $6df5f2cbb77a354d$require$webidl.brandCheck(this, $6df5f2cbb77a354d$var$Request); + // The method getter steps are to return this’s request’s method. + return this[$6df5f2cbb77a354d$require$kState].method; } - [$0bedb628579b4525$var$kRemoveClient](client) { - client.close(()=>{ - const idx = this[$0bedb628579b4525$var$kClients].indexOf(client); - if (idx !== -1) this[$0bedb628579b4525$var$kClients].splice(idx, 1); - }); - this[$0bedb628579b4525$var$kNeedDrain] = this[$0bedb628579b4525$var$kClients].some((dispatcher)=>!dispatcher[$0bedb628579b4525$var$kNeedDrain] && dispatcher.closed !== true && dispatcher.destroyed !== true); + // Returns the URL of request as a string. + get url() { + $6df5f2cbb77a354d$require$webidl.brandCheck(this, $6df5f2cbb77a354d$var$Request); + // The url getter steps are to return this’s request’s URL, serialized. + return $6df5f2cbb77a354d$require$URLSerializer(this[$6df5f2cbb77a354d$require$kState].url); } -} -module.exports = { - PoolBase: $0bedb628579b4525$var$PoolBase, - kClients: $0bedb628579b4525$var$kClients, - kNeedDrain: $0bedb628579b4525$var$kNeedDrain, - kAddClient: $0bedb628579b4525$var$kAddClient, - kRemoveClient: $0bedb628579b4525$var$kRemoveClient, - kGetDispatcher: $0bedb628579b4525$var$kGetDispatcher -}; - -}); -parcelRegister("lLdat", function(module, exports) { -/* eslint-disable */ "use strict"; -// Extracted from node/lib/internal/fixed_queue.js -// Currently optimal queue size, tested on V8 6.0 - 6.6. Must be power of two. -const $fd78339f707084be$var$kSize = 2048; -const $fd78339f707084be$var$kMask = $fd78339f707084be$var$kSize - 1; -// The FixedQueue is implemented as a singly-linked list of fixed-size -// circular buffers. It looks something like this: -// -// head tail -// | | -// v v -// +-----------+ <-----\ +-----------+ <------\ +-----------+ -// | [null] | \----- | next | \------- | next | -// +-----------+ +-----------+ +-----------+ -// | item | <-- bottom | item | <-- bottom | [empty] | -// | item | | item | | [empty] | -// | item | | item | | [empty] | -// | item | | item | | [empty] | -// | item | | item | bottom --> | item | -// | item | | item | | item | -// | ... | | ... | | ... | -// | item | | item | | item | -// | item | | item | | item | -// | [empty] | <-- top | item | | item | -// | [empty] | | item | | item | -// | [empty] | | [empty] | <-- top top --> | [empty] | -// +-----------+ +-----------+ +-----------+ -// -// Or, if there is only one circular buffer, it looks something -// like either of these: -// -// head tail head tail -// | | | | -// v v v v -// +-----------+ +-----------+ -// | [null] | | [null] | -// +-----------+ +-----------+ -// | [empty] | | item | -// | [empty] | | item | -// | item | <-- bottom top --> | [empty] | -// | item | | [empty] | -// | [empty] | <-- top bottom --> | item | -// | [empty] | | item | -// +-----------+ +-----------+ -// -// Adding a value means moving `top` forward by one, removing means -// moving `bottom` forward by one. After reaching the end, the queue -// wraps around. -// -// When `top === bottom` the current queue is empty and when -// `top + 1 === bottom` it's full. This wastes a single space of storage -// but allows much quicker checks. -class $fd78339f707084be$var$FixedCircularBuffer { - constructor(){ - this.bottom = 0; - this.top = 0; - this.list = new Array($fd78339f707084be$var$kSize); - this.next = null; + // Returns a Headers object consisting of the headers associated with request. + // Note that headers added in the network layer by the user agent will not + // be accounted for in this object, e.g., the "Host" header. + get headers() { + $6df5f2cbb77a354d$require$webidl.brandCheck(this, $6df5f2cbb77a354d$var$Request); + // The headers getter steps are to return this’s headers. + return this[$6df5f2cbb77a354d$require$kHeaders]; } - isEmpty() { - return this.top === this.bottom; + // Returns the kind of resource requested by request, e.g., "document" + // or "script". + get destination() { + $6df5f2cbb77a354d$require$webidl.brandCheck(this, $6df5f2cbb77a354d$var$Request); + // The destination getter are to return this’s request’s destination. + return this[$6df5f2cbb77a354d$require$kState].destination; } - isFull() { - return (this.top + 1 & $fd78339f707084be$var$kMask) === this.bottom; + // Returns the referrer of request. Its value can be a same-origin URL if + // explicitly set in init, the empty string to indicate no referrer, and + // "about:client" when defaulting to the global’s default. This is used + // during fetching to determine the value of the `Referer` header of the + // request being made. + get referrer() { + $6df5f2cbb77a354d$require$webidl.brandCheck(this, $6df5f2cbb77a354d$var$Request); + // 1. If this’s request’s referrer is "no-referrer", then return the + // empty string. + if (this[$6df5f2cbb77a354d$require$kState].referrer === 'no-referrer') return ''; + // 2. If this’s request’s referrer is "client", then return + // "about:client". + if (this[$6df5f2cbb77a354d$require$kState].referrer === 'client') return 'about:client'; + // Return this’s request’s referrer, serialized. + return this[$6df5f2cbb77a354d$require$kState].referrer.toString(); } - push(data) { - this.list[this.top] = data; - this.top = this.top + 1 & $fd78339f707084be$var$kMask; + // Returns the referrer policy associated with request. + // This is used during fetching to compute the value of the request’s + // referrer. + get referrerPolicy() { + $6df5f2cbb77a354d$require$webidl.brandCheck(this, $6df5f2cbb77a354d$var$Request); + // The referrerPolicy getter steps are to return this’s request’s referrer policy. + return this[$6df5f2cbb77a354d$require$kState].referrerPolicy; } - shift() { - const nextItem = this.list[this.bottom]; - if (nextItem === undefined) return null; - this.list[this.bottom] = undefined; - this.bottom = this.bottom + 1 & $fd78339f707084be$var$kMask; - return nextItem; + // Returns the mode associated with request, which is a string indicating + // whether the request will use CORS, or will be restricted to same-origin + // URLs. + get mode() { + $6df5f2cbb77a354d$require$webidl.brandCheck(this, $6df5f2cbb77a354d$var$Request); + // The mode getter steps are to return this’s request’s mode. + return this[$6df5f2cbb77a354d$require$kState].mode; } -} -module.exports = class FixedQueue { - constructor(){ - this.head = this.tail = new $fd78339f707084be$var$FixedCircularBuffer(); + // Returns the credentials mode associated with request, + // which is a string indicating whether credentials will be sent with the + // request always, never, or only when sent to a same-origin URL. + get credentials() { + // The credentials getter steps are to return this’s request’s credentials mode. + return this[$6df5f2cbb77a354d$require$kState].credentials; + } + // Returns the cache mode associated with request, + // which is a string indicating how the request will + // interact with the browser’s cache when fetching. + get cache() { + $6df5f2cbb77a354d$require$webidl.brandCheck(this, $6df5f2cbb77a354d$var$Request); + // The cache getter steps are to return this’s request’s cache mode. + return this[$6df5f2cbb77a354d$require$kState].cache; } - isEmpty() { - return this.head.isEmpty(); + // Returns the redirect mode associated with request, + // which is a string indicating how redirects for the + // request will be handled during fetching. A request + // will follow redirects by default. + get redirect() { + $6df5f2cbb77a354d$require$webidl.brandCheck(this, $6df5f2cbb77a354d$var$Request); + // The redirect getter steps are to return this’s request’s redirect mode. + return this[$6df5f2cbb77a354d$require$kState].redirect; } - push(data) { - if (this.head.isFull()) // Head is full: Creates a new queue, sets the old queue's `.next` to it, - // and sets it as the new main queue. - this.head = this.head.next = new $fd78339f707084be$var$FixedCircularBuffer(); - this.head.push(data); + // Returns request’s subresource integrity metadata, which is a + // cryptographic hash of the resource being fetched. Its value + // consists of multiple hashes separated by whitespace. [SRI] + get integrity() { + $6df5f2cbb77a354d$require$webidl.brandCheck(this, $6df5f2cbb77a354d$var$Request); + // The integrity getter steps are to return this’s request’s integrity + // metadata. + return this[$6df5f2cbb77a354d$require$kState].integrity; } - shift() { - const tail = this.tail; - const next = tail.shift(); - if (tail.isEmpty() && tail.next !== null) // If there is another queue, it forms the new tail. - this.tail = tail.next; - return next; + // Returns a boolean indicating whether or not request can outlive the + // global in which it was created. + get keepalive() { + $6df5f2cbb77a354d$require$webidl.brandCheck(this, $6df5f2cbb77a354d$var$Request); + // The keepalive getter steps are to return this’s request’s keepalive. + return this[$6df5f2cbb77a354d$require$kState].keepalive; } -}; - -}); - -parcelRegister("ahgqc", function(module, exports) { - -var $hHZvh = parcelRequire("hHZvh"); -var $77b83adefc6b9c9d$require$kFree = $hHZvh.kFree; -var $77b83adefc6b9c9d$require$kConnected = $hHZvh.kConnected; -var $77b83adefc6b9c9d$require$kPending = $hHZvh.kPending; -var $77b83adefc6b9c9d$require$kQueued = $hHZvh.kQueued; -var $77b83adefc6b9c9d$require$kRunning = $hHZvh.kRunning; -var $77b83adefc6b9c9d$require$kSize = $hHZvh.kSize; -const $77b83adefc6b9c9d$var$kPool = Symbol("pool"); -class $77b83adefc6b9c9d$var$PoolStats { - constructor(pool){ - this[$77b83adefc6b9c9d$var$kPool] = pool; + // Returns a boolean indicating whether or not request is for a reload + // navigation. + get isReloadNavigation() { + $6df5f2cbb77a354d$require$webidl.brandCheck(this, $6df5f2cbb77a354d$var$Request); + // The isReloadNavigation getter steps are to return true if this’s + // request’s reload-navigation flag is set; otherwise false. + return this[$6df5f2cbb77a354d$require$kState].reloadNavigation; } - get connected() { - return this[$77b83adefc6b9c9d$var$kPool][$77b83adefc6b9c9d$require$kConnected]; + // Returns a boolean indicating whether or not request is for a history + // navigation (a.k.a. back-forward navigation). + get isHistoryNavigation() { + $6df5f2cbb77a354d$require$webidl.brandCheck(this, $6df5f2cbb77a354d$var$Request); + // The isHistoryNavigation getter steps are to return true if this’s request’s + // history-navigation flag is set; otherwise false. + return this[$6df5f2cbb77a354d$require$kState].historyNavigation; } - get free() { - return this[$77b83adefc6b9c9d$var$kPool][$77b83adefc6b9c9d$require$kFree]; + // Returns the signal associated with request, which is an AbortSignal + // object indicating whether or not request has been aborted, and its + // abort event handler. + get signal() { + $6df5f2cbb77a354d$require$webidl.brandCheck(this, $6df5f2cbb77a354d$var$Request); + // The signal getter steps are to return this’s signal. + return this[$6df5f2cbb77a354d$require$kSignal]; } - get pending() { - return this[$77b83adefc6b9c9d$var$kPool][$77b83adefc6b9c9d$require$kPending]; + get body() { + $6df5f2cbb77a354d$require$webidl.brandCheck(this, $6df5f2cbb77a354d$var$Request); + return this[$6df5f2cbb77a354d$require$kState].body ? this[$6df5f2cbb77a354d$require$kState].body.stream : null; } - get queued() { - return this[$77b83adefc6b9c9d$var$kPool][$77b83adefc6b9c9d$require$kQueued]; + get bodyUsed() { + $6df5f2cbb77a354d$require$webidl.brandCheck(this, $6df5f2cbb77a354d$var$Request); + return !!this[$6df5f2cbb77a354d$require$kState].body && $bFRvW.isDisturbed(this[$6df5f2cbb77a354d$require$kState].body.stream); } - get running() { - return this[$77b83adefc6b9c9d$var$kPool][$77b83adefc6b9c9d$require$kRunning]; + get duplex() { + $6df5f2cbb77a354d$require$webidl.brandCheck(this, $6df5f2cbb77a354d$var$Request); + return 'half'; } - get size() { - return this[$77b83adefc6b9c9d$var$kPool][$77b83adefc6b9c9d$require$kSize]; + // Returns a clone of request. + clone() { + $6df5f2cbb77a354d$require$webidl.brandCheck(this, $6df5f2cbb77a354d$var$Request); + // 1. If this is unusable, then throw a TypeError. + if ($6df5f2cbb77a354d$require$bodyUnusable(this)) throw new TypeError('unusable'); + // 2. Let clonedRequest be the result of cloning this’s request. + const clonedRequest = $6df5f2cbb77a354d$var$cloneRequest(this[$6df5f2cbb77a354d$require$kState]); + // 3. Let clonedRequestObject be the result of creating a Request object, + // given clonedRequest, this’s headers’s guard, and this’s relevant Realm. + // 4. Make clonedRequestObject’s signal follow this’s signal. + const ac = new AbortController(); + if (this.signal.aborted) ac.abort(this.signal.reason); + else { + let list = $6df5f2cbb77a354d$var$dependentControllerMap.get(this.signal); + if (list === undefined) { + list = new Set(); + $6df5f2cbb77a354d$var$dependentControllerMap.set(this.signal, list); + } + const acRef = new WeakRef(ac); + list.add(acRef); + $bFRvW.addAbortListener(ac.signal, $6df5f2cbb77a354d$var$buildAbort(acRef)); + } + // 4. Return clonedRequestObject. + return $6df5f2cbb77a354d$var$fromInnerRequest(clonedRequest, ac.signal, $6df5f2cbb77a354d$require$getHeadersGuard(this[$6df5f2cbb77a354d$require$kHeaders])); + } + [$in2sP$nodeutil.inspect.custom](depth, options) { + if (options.depth === null) options.depth = 2; + options.colors ??= true; + const properties = { + method: this.method, + url: this.url, + headers: this.headers, + destination: this.destination, + referrer: this.referrer, + referrerPolicy: this.referrerPolicy, + mode: this.mode, + credentials: this.credentials, + cache: this.cache, + redirect: this.redirect, + integrity: this.integrity, + keepalive: this.keepalive, + isReloadNavigation: this.isReloadNavigation, + isHistoryNavigation: this.isHistoryNavigation, + signal: this.signal + }; + return `Request ${$in2sP$nodeutil.formatWithOptions(options, properties)}`; } } -module.exports = $77b83adefc6b9c9d$var$PoolStats; - +$6df5f2cbb77a354d$require$mixinBody($6df5f2cbb77a354d$var$Request); +// https://fetch.spec.whatwg.org/#requests +function $6df5f2cbb77a354d$var$makeRequest(init) { + return { + method: init.method ?? 'GET', + localURLsOnly: init.localURLsOnly ?? false, + unsafeRequest: init.unsafeRequest ?? false, + body: init.body ?? null, + client: init.client ?? null, + reservedClient: init.reservedClient ?? null, + replacesClientId: init.replacesClientId ?? '', + window: init.window ?? 'client', + keepalive: init.keepalive ?? false, + serviceWorkers: init.serviceWorkers ?? 'all', + initiator: init.initiator ?? '', + destination: init.destination ?? '', + priority: init.priority ?? null, + origin: init.origin ?? 'client', + policyContainer: init.policyContainer ?? 'client', + referrer: init.referrer ?? 'client', + referrerPolicy: init.referrerPolicy ?? '', + mode: init.mode ?? 'no-cors', + useCORSPreflightFlag: init.useCORSPreflightFlag ?? false, + credentials: init.credentials ?? 'same-origin', + useCredentials: init.useCredentials ?? false, + cache: init.cache ?? 'default', + redirect: init.redirect ?? 'follow', + integrity: init.integrity ?? '', + cryptoGraphicsNonceMetadata: init.cryptoGraphicsNonceMetadata ?? '', + parserMetadata: init.parserMetadata ?? '', + reloadNavigation: init.reloadNavigation ?? false, + historyNavigation: init.historyNavigation ?? false, + userActivation: init.userActivation ?? false, + taintedOrigin: init.taintedOrigin ?? false, + redirectCount: init.redirectCount ?? 0, + responseTainting: init.responseTainting ?? 'basic', + preventNoCacheCacheControlHeaderModification: init.preventNoCacheCacheControlHeaderModification ?? false, + done: init.done ?? false, + timingAllowFailed: init.timingAllowFailed ?? false, + urlList: init.urlList, + url: init.urlList[0], + headersList: init.headersList ? new $6df5f2cbb77a354d$require$HeadersList(init.headersList) : new $6df5f2cbb77a354d$require$HeadersList() + }; +} +// https://fetch.spec.whatwg.org/#concept-request-clone +function $6df5f2cbb77a354d$var$cloneRequest(request) { + // To clone a request request, run these steps: + // 1. Let newRequest be a copy of request, except for its body. + const newRequest = $6df5f2cbb77a354d$var$makeRequest({ + ...request, + body: null + }); + // 2. If request’s body is non-null, set newRequest’s body to the + // result of cloning request’s body. + if (request.body != null) newRequest.body = $6df5f2cbb77a354d$require$cloneBody(newRequest, request.body); + // 3. Return newRequest. + return newRequest; +} +/** + * @see https://fetch.spec.whatwg.org/#request-create + * @param {any} innerRequest + * @param {AbortSignal} signal + * @param {'request' | 'immutable' | 'request-no-cors' | 'response' | 'none'} guard + * @returns {Request} + */ function $6df5f2cbb77a354d$var$fromInnerRequest(innerRequest, signal, guard) { + const request = new $6df5f2cbb77a354d$var$Request($6df5f2cbb77a354d$require$kConstruct); + request[$6df5f2cbb77a354d$require$kState] = innerRequest; + request[$6df5f2cbb77a354d$require$kSignal] = signal; + request[$6df5f2cbb77a354d$require$kHeaders] = new $6df5f2cbb77a354d$require$Headers($6df5f2cbb77a354d$require$kConstruct); + $6df5f2cbb77a354d$require$setHeadersList(request[$6df5f2cbb77a354d$require$kHeaders], innerRequest.headersList); + $6df5f2cbb77a354d$require$setHeadersGuard(request[$6df5f2cbb77a354d$require$kHeaders], guard); + return request; +} +Object.defineProperties($6df5f2cbb77a354d$var$Request.prototype, { + method: $6df5f2cbb77a354d$var$kEnumerableProperty, + url: $6df5f2cbb77a354d$var$kEnumerableProperty, + headers: $6df5f2cbb77a354d$var$kEnumerableProperty, + redirect: $6df5f2cbb77a354d$var$kEnumerableProperty, + clone: $6df5f2cbb77a354d$var$kEnumerableProperty, + signal: $6df5f2cbb77a354d$var$kEnumerableProperty, + duplex: $6df5f2cbb77a354d$var$kEnumerableProperty, + destination: $6df5f2cbb77a354d$var$kEnumerableProperty, + body: $6df5f2cbb77a354d$var$kEnumerableProperty, + bodyUsed: $6df5f2cbb77a354d$var$kEnumerableProperty, + isHistoryNavigation: $6df5f2cbb77a354d$var$kEnumerableProperty, + isReloadNavigation: $6df5f2cbb77a354d$var$kEnumerableProperty, + keepalive: $6df5f2cbb77a354d$var$kEnumerableProperty, + integrity: $6df5f2cbb77a354d$var$kEnumerableProperty, + cache: $6df5f2cbb77a354d$var$kEnumerableProperty, + credentials: $6df5f2cbb77a354d$var$kEnumerableProperty, + attribute: $6df5f2cbb77a354d$var$kEnumerableProperty, + referrerPolicy: $6df5f2cbb77a354d$var$kEnumerableProperty, + referrer: $6df5f2cbb77a354d$var$kEnumerableProperty, + mode: $6df5f2cbb77a354d$var$kEnumerableProperty, + [Symbol.toStringTag]: { + value: 'Request', + configurable: true + } }); +$6df5f2cbb77a354d$require$webidl.converters.Request = $6df5f2cbb77a354d$require$webidl.interfaceConverter($6df5f2cbb77a354d$var$Request); +// https://fetch.spec.whatwg.org/#requestinfo +$6df5f2cbb77a354d$require$webidl.converters.RequestInfo = function(V, prefix, argument) { + if (typeof V === 'string') return $6df5f2cbb77a354d$require$webidl.converters.USVString(V, prefix, argument); + if (V instanceof $6df5f2cbb77a354d$var$Request) return $6df5f2cbb77a354d$require$webidl.converters.Request(V, prefix, argument); + return $6df5f2cbb77a354d$require$webidl.converters.USVString(V, prefix, argument); +}; +$6df5f2cbb77a354d$require$webidl.converters.AbortSignal = $6df5f2cbb77a354d$require$webidl.interfaceConverter(AbortSignal); +// https://fetch.spec.whatwg.org/#requestinit +$6df5f2cbb77a354d$require$webidl.converters.RequestInit = $6df5f2cbb77a354d$require$webidl.dictionaryConverter([ + { + key: 'method', + converter: $6df5f2cbb77a354d$require$webidl.converters.ByteString + }, + { + key: 'headers', + converter: $6df5f2cbb77a354d$require$webidl.converters.HeadersInit + }, + { + key: 'body', + converter: $6df5f2cbb77a354d$require$webidl.nullableConverter($6df5f2cbb77a354d$require$webidl.converters.BodyInit) + }, + { + key: 'referrer', + converter: $6df5f2cbb77a354d$require$webidl.converters.USVString + }, + { + key: 'referrerPolicy', + converter: $6df5f2cbb77a354d$require$webidl.converters.DOMString, + // https://w3c.github.io/webappsec-referrer-policy/#referrer-policy + allowedValues: $6df5f2cbb77a354d$require$referrerPolicy + }, + { + key: 'mode', + converter: $6df5f2cbb77a354d$require$webidl.converters.DOMString, + // https://fetch.spec.whatwg.org/#concept-request-mode + allowedValues: $6df5f2cbb77a354d$require$requestMode + }, + { + key: 'credentials', + converter: $6df5f2cbb77a354d$require$webidl.converters.DOMString, + // https://fetch.spec.whatwg.org/#requestcredentials + allowedValues: $6df5f2cbb77a354d$require$requestCredentials + }, + { + key: 'cache', + converter: $6df5f2cbb77a354d$require$webidl.converters.DOMString, + // https://fetch.spec.whatwg.org/#requestcache + allowedValues: $6df5f2cbb77a354d$require$requestCache + }, + { + key: 'redirect', + converter: $6df5f2cbb77a354d$require$webidl.converters.DOMString, + // https://fetch.spec.whatwg.org/#requestredirect + allowedValues: $6df5f2cbb77a354d$require$requestRedirect + }, + { + key: 'integrity', + converter: $6df5f2cbb77a354d$require$webidl.converters.DOMString + }, + { + key: 'keepalive', + converter: $6df5f2cbb77a354d$require$webidl.converters.boolean + }, + { + key: 'signal', + converter: $6df5f2cbb77a354d$require$webidl.nullableConverter((signal)=>$6df5f2cbb77a354d$require$webidl.converters.AbortSignal(signal, 'RequestInit', 'signal', { + strict: false + })) + }, + { + key: 'window', + converter: $6df5f2cbb77a354d$require$webidl.converters.any + }, + { + key: 'duplex', + converter: $6df5f2cbb77a354d$require$webidl.converters.DOMString, + allowedValues: $6df5f2cbb77a354d$require$requestDuplex + }, + { + key: 'dispatcher', + converter: $6df5f2cbb77a354d$require$webidl.converters.any + } +]); +module.exports = { + Request: $6df5f2cbb77a354d$var$Request, + makeRequest: $6df5f2cbb77a354d$var$makeRequest, + fromInnerRequest: $6df5f2cbb77a354d$var$fromInnerRequest, + cloneRequest: $6df5f2cbb77a354d$var$cloneRequest +}; +}); +parcelRegister("vhcFZ", function(module, exports) { +'use strict'; - -parcelRegister("lSq1i", function(module, exports) { -"use strict"; - -var $cKdp7 = parcelRequire("cKdp7"); -var $fed2d32788a9c125$require$BalancedPoolMissingUpstreamError = $cKdp7.BalancedPoolMissingUpstreamError; -var $fed2d32788a9c125$require$InvalidArgumentError = $cKdp7.InvalidArgumentError; - -var $11uIv = parcelRequire("11uIv"); -var $fed2d32788a9c125$require$PoolBase = $11uIv.PoolBase; -var $fed2d32788a9c125$require$kClients = $11uIv.kClients; -var $fed2d32788a9c125$require$kNeedDrain = $11uIv.kNeedDrain; -var $fed2d32788a9c125$require$kAddClient = $11uIv.kAddClient; -var $fed2d32788a9c125$require$kRemoveClient = $11uIv.kRemoveClient; -var $fed2d32788a9c125$require$kGetDispatcher = $11uIv.kGetDispatcher; - -var $jIWP2 = parcelRequire("jIWP2"); - -var $hHZvh = parcelRequire("hHZvh"); -var $fed2d32788a9c125$require$kUrl = $hHZvh.kUrl; -var $fed2d32788a9c125$require$kInterceptors = $hHZvh.kInterceptors; - -var $gv2nV = parcelRequire("gv2nV"); -var $fed2d32788a9c125$require$parseOrigin = $gv2nV.parseOrigin; -const $fed2d32788a9c125$var$kFactory = Symbol("factory"); -const $fed2d32788a9c125$var$kOptions = Symbol("options"); -const $fed2d32788a9c125$var$kGreatestCommonDivisor = Symbol("kGreatestCommonDivisor"); -const $fed2d32788a9c125$var$kCurrentWeight = Symbol("kCurrentWeight"); -const $fed2d32788a9c125$var$kIndex = Symbol("kIndex"); -const $fed2d32788a9c125$var$kWeight = Symbol("kWeight"); -const $fed2d32788a9c125$var$kMaxWeightPerServer = Symbol("kMaxWeightPerServer"); -const $fed2d32788a9c125$var$kErrorPenalty = Symbol("kErrorPenalty"); -function $fed2d32788a9c125$var$getGreatestCommonDivisor(a, b) { - if (b === 0) return a; - return $fed2d32788a9c125$var$getGreatestCommonDivisor(b, a % b); -} -function $fed2d32788a9c125$var$defaultFactory(origin, opts) { - return new $jIWP2(origin, opts); -} -class $fed2d32788a9c125$var$BalancedPool extends $fed2d32788a9c125$require$PoolBase { - constructor(upstreams = [], { factory: factory = $fed2d32788a9c125$var$defaultFactory, ...opts } = {}){ - super(); - this[$fed2d32788a9c125$var$kOptions] = opts; - this[$fed2d32788a9c125$var$kIndex] = -1; - this[$fed2d32788a9c125$var$kCurrentWeight] = 0; - this[$fed2d32788a9c125$var$kMaxWeightPerServer] = this[$fed2d32788a9c125$var$kOptions].maxWeightPerServer || 100; - this[$fed2d32788a9c125$var$kErrorPenalty] = this[$fed2d32788a9c125$var$kOptions].errorPenalty || 15; - if (!Array.isArray(upstreams)) upstreams = [ - upstreams - ]; - if (typeof factory !== "function") throw new $fed2d32788a9c125$require$InvalidArgumentError("factory must be a function."); - this[$fed2d32788a9c125$require$kInterceptors] = opts.interceptors && opts.interceptors.BalancedPool && Array.isArray(opts.interceptors.BalancedPool) ? opts.interceptors.BalancedPool : []; - this[$fed2d32788a9c125$var$kFactory] = factory; - for (const upstream of upstreams)this.addUpstream(upstream); - this._updateBalancedPoolStats(); - } - addUpstream(upstream) { - const upstreamOrigin = $fed2d32788a9c125$require$parseOrigin(upstream).origin; - if (this[$fed2d32788a9c125$require$kClients].find((pool)=>pool[$fed2d32788a9c125$require$kUrl].origin === upstreamOrigin && pool.closed !== true && pool.destroyed !== true)) return this; - const pool = this[$fed2d32788a9c125$var$kFactory](upstreamOrigin, Object.assign({}, this[$fed2d32788a9c125$var$kOptions])); - this[$fed2d32788a9c125$require$kAddClient](pool); - pool.on("connect", ()=>{ - pool[$fed2d32788a9c125$var$kWeight] = Math.min(this[$fed2d32788a9c125$var$kMaxWeightPerServer], pool[$fed2d32788a9c125$var$kWeight] + this[$fed2d32788a9c125$var$kErrorPenalty]); - }); - pool.on("connectionError", ()=>{ - pool[$fed2d32788a9c125$var$kWeight] = Math.max(1, pool[$fed2d32788a9c125$var$kWeight] - this[$fed2d32788a9c125$var$kErrorPenalty]); - this._updateBalancedPoolStats(); - }); - pool.on("disconnect", (...args)=>{ - const err = args[2]; - if (err && err.code === "UND_ERR_SOCKET") { - // decrease the weight of the pool. - pool[$fed2d32788a9c125$var$kWeight] = Math.max(1, pool[$fed2d32788a9c125$var$kWeight] - this[$fed2d32788a9c125$var$kErrorPenalty]); - this._updateBalancedPoolStats(); - } - }); - for (const client of this[$fed2d32788a9c125$require$kClients])client[$fed2d32788a9c125$var$kWeight] = this[$fed2d32788a9c125$var$kMaxWeightPerServer]; - this._updateBalancedPoolStats(); - return this; - } - _updateBalancedPoolStats() { - this[$fed2d32788a9c125$var$kGreatestCommonDivisor] = this[$fed2d32788a9c125$require$kClients].map((p)=>p[$fed2d32788a9c125$var$kWeight]).reduce($fed2d32788a9c125$var$getGreatestCommonDivisor, 0); +var $gNVEc = parcelRequire("gNVEc"); +var $05e03d9cf2102541$require$kConnected = $gNVEc.kConnected; +var $05e03d9cf2102541$require$kSize = $gNVEc.kSize; +class $05e03d9cf2102541$var$CompatWeakRef { + constructor(value){ + this.value = value; } - removeUpstream(upstream) { - const upstreamOrigin = $fed2d32788a9c125$require$parseOrigin(upstream).origin; - const pool = this[$fed2d32788a9c125$require$kClients].find((pool)=>pool[$fed2d32788a9c125$require$kUrl].origin === upstreamOrigin && pool.closed !== true && pool.destroyed !== true); - if (pool) this[$fed2d32788a9c125$require$kRemoveClient](pool); - return this; + deref() { + return this.value[$05e03d9cf2102541$require$kConnected] === 0 && this.value[$05e03d9cf2102541$require$kSize] === 0 ? undefined : this.value; } - get upstreams() { - return this[$fed2d32788a9c125$require$kClients].filter((dispatcher)=>dispatcher.closed !== true && dispatcher.destroyed !== true).map((p)=>p[$fed2d32788a9c125$require$kUrl].origin); +} +class $05e03d9cf2102541$var$CompatFinalizer { + constructor(finalizer){ + this.finalizer = finalizer; } - [$fed2d32788a9c125$require$kGetDispatcher]() { - // We validate that pools is greater than 0, - // otherwise we would have to wait until an upstream - // is added, which might never happen. - if (this[$fed2d32788a9c125$require$kClients].length === 0) throw new $fed2d32788a9c125$require$BalancedPoolMissingUpstreamError(); - const dispatcher = this[$fed2d32788a9c125$require$kClients].find((dispatcher)=>!dispatcher[$fed2d32788a9c125$require$kNeedDrain] && dispatcher.closed !== true && dispatcher.destroyed !== true); - if (!dispatcher) return; - const allClientsBusy = this[$fed2d32788a9c125$require$kClients].map((pool)=>pool[$fed2d32788a9c125$require$kNeedDrain]).reduce((a, b)=>a && b, true); - if (allClientsBusy) return; - let counter = 0; - let maxWeightIndex = this[$fed2d32788a9c125$require$kClients].findIndex((pool)=>!pool[$fed2d32788a9c125$require$kNeedDrain]); - while(counter++ < this[$fed2d32788a9c125$require$kClients].length){ - this[$fed2d32788a9c125$var$kIndex] = (this[$fed2d32788a9c125$var$kIndex] + 1) % this[$fed2d32788a9c125$require$kClients].length; - const pool = this[$fed2d32788a9c125$require$kClients][this[$fed2d32788a9c125$var$kIndex]]; - // find pool index with the largest weight - if (pool[$fed2d32788a9c125$var$kWeight] > this[$fed2d32788a9c125$require$kClients][maxWeightIndex][$fed2d32788a9c125$var$kWeight] && !pool[$fed2d32788a9c125$require$kNeedDrain]) maxWeightIndex = this[$fed2d32788a9c125$var$kIndex]; - // decrease the current weight every `this[kClients].length`. - if (this[$fed2d32788a9c125$var$kIndex] === 0) { - // Set the current weight to the next lower weight. - this[$fed2d32788a9c125$var$kCurrentWeight] = this[$fed2d32788a9c125$var$kCurrentWeight] - this[$fed2d32788a9c125$var$kGreatestCommonDivisor]; - if (this[$fed2d32788a9c125$var$kCurrentWeight] <= 0) this[$fed2d32788a9c125$var$kCurrentWeight] = this[$fed2d32788a9c125$var$kMaxWeightPerServer]; - } - if (pool[$fed2d32788a9c125$var$kWeight] >= this[$fed2d32788a9c125$var$kCurrentWeight] && !pool[$fed2d32788a9c125$require$kNeedDrain]) return pool; - } - this[$fed2d32788a9c125$var$kCurrentWeight] = this[$fed2d32788a9c125$require$kClients][maxWeightIndex][$fed2d32788a9c125$var$kWeight]; - this[$fed2d32788a9c125$var$kIndex] = maxWeightIndex; - return this[$fed2d32788a9c125$require$kClients][maxWeightIndex]; + register(dispatcher, key) { + if (dispatcher.on) dispatcher.on('disconnect', ()=>{ + if (dispatcher[$05e03d9cf2102541$require$kConnected] === 0 && dispatcher[$05e03d9cf2102541$require$kSize] === 0) this.finalizer(key); + }); } + unregister(key) {} } -module.exports = $fed2d32788a9c125$var$BalancedPool; +module.exports = function() { + // FIXME: remove workaround when the Node bug is backported to v18 + // https://github.com/nodejs/node/issues/49344#issuecomment-1741776308 + if (process.env.NODE_V8_COVERAGE && process.version.startsWith('v18')) { + process._rawDebug('Using compatibility WeakRef and FinalizationRegistry'); + return { + WeakRef: $05e03d9cf2102541$var$CompatWeakRef, + FinalizationRegistry: $05e03d9cf2102541$var$CompatFinalizer + }; + } + return { + WeakRef: WeakRef, + FinalizationRegistry: FinalizationRegistry + }; +}; }); -parcelRegister("3zvEP", function(module, exports) { -"use strict"; - -var $cKdp7 = parcelRequire("cKdp7"); -var $299d327bf4cce9b6$require$InvalidArgumentError = $cKdp7.InvalidArgumentError; - -var $hHZvh = parcelRequire("hHZvh"); -var $299d327bf4cce9b6$require$kClients = $hHZvh.kClients; -var $299d327bf4cce9b6$require$kRunning = $hHZvh.kRunning; -var $299d327bf4cce9b6$require$kClose = $hHZvh.kClose; -var $299d327bf4cce9b6$require$kDestroy = $hHZvh.kDestroy; -var $299d327bf4cce9b6$require$kDispatch = $hHZvh.kDispatch; -var $299d327bf4cce9b6$require$kInterceptors = $hHZvh.kInterceptors; -var $8lFjX = parcelRequire("8lFjX"); +parcelRegister("goMEM", function(module, exports) { +'use strict'; -var $jIWP2 = parcelRequire("jIWP2"); +var $fJkL4 = parcelRequire("fJkL4"); +var $bf04a1793c87a8d1$require$staticPropertyDescriptors = $fJkL4.staticPropertyDescriptors; +var $bf04a1793c87a8d1$require$readOperation = $fJkL4.readOperation; +var $bf04a1793c87a8d1$require$fireAProgressEvent = $fJkL4.fireAProgressEvent; -var $dQprK = parcelRequire("dQprK"); +var $7PQnc = parcelRequire("7PQnc"); +var $bf04a1793c87a8d1$require$kState = $7PQnc.kState; +var $bf04a1793c87a8d1$require$kError = $7PQnc.kError; +var $bf04a1793c87a8d1$require$kResult = $7PQnc.kResult; +var $bf04a1793c87a8d1$require$kEvents = $7PQnc.kEvents; +var $bf04a1793c87a8d1$require$kAborted = $7PQnc.kAborted; -var $gv2nV = parcelRequire("gv2nV"); +var $5HTG7 = parcelRequire("5HTG7"); +var $bf04a1793c87a8d1$require$webidl = $5HTG7.webidl; -var $cDfDy = parcelRequire("cDfDy"); - -const { WeakRef: $299d327bf4cce9b6$var$WeakRef, FinalizationRegistry: $299d327bf4cce9b6$var$FinalizationRegistry } = (parcelRequire("kz6S0"))(); -const $299d327bf4cce9b6$var$kOnConnect = Symbol("onConnect"); -const $299d327bf4cce9b6$var$kOnDisconnect = Symbol("onDisconnect"); -const $299d327bf4cce9b6$var$kOnConnectionError = Symbol("onConnectionError"); -const $299d327bf4cce9b6$var$kMaxRedirections = Symbol("maxRedirections"); -const $299d327bf4cce9b6$var$kOnDrain = Symbol("onDrain"); -const $299d327bf4cce9b6$var$kFactory = Symbol("factory"); -const $299d327bf4cce9b6$var$kFinalizer = Symbol("finalizer"); -const $299d327bf4cce9b6$var$kOptions = Symbol("options"); -function $299d327bf4cce9b6$var$defaultFactory(origin, opts) { - return opts && opts.connections === 1 ? new $dQprK(origin, opts) : new $jIWP2(origin, opts); -} -class $299d327bf4cce9b6$var$Agent extends $8lFjX { - constructor({ factory: factory = $299d327bf4cce9b6$var$defaultFactory, maxRedirections: maxRedirections = 0, connect: connect, ...options } = {}){ +var $bFRvW = parcelRequire("bFRvW"); +var $bf04a1793c87a8d1$require$kEnumerableProperty = $bFRvW.kEnumerableProperty; +class $bf04a1793c87a8d1$var$FileReader extends EventTarget { + constructor(){ super(); - if (typeof factory !== "function") throw new $299d327bf4cce9b6$require$InvalidArgumentError("factory must be a function."); - if (connect != null && typeof connect !== "function" && typeof connect !== "object") throw new $299d327bf4cce9b6$require$InvalidArgumentError("connect must be a function or an object"); - if (!Number.isInteger(maxRedirections) || maxRedirections < 0) throw new $299d327bf4cce9b6$require$InvalidArgumentError("maxRedirections must be a positive number"); - if (connect && typeof connect !== "function") connect = { - ...connect - }; - this[$299d327bf4cce9b6$require$kInterceptors] = options.interceptors && options.interceptors.Agent && Array.isArray(options.interceptors.Agent) ? options.interceptors.Agent : [ - $cDfDy({ - maxRedirections: maxRedirections - }) - ]; - this[$299d327bf4cce9b6$var$kOptions] = { - ...$gv2nV.deepClone(options), - connect: connect + this[$bf04a1793c87a8d1$require$kState] = 'empty'; + this[$bf04a1793c87a8d1$require$kResult] = null; + this[$bf04a1793c87a8d1$require$kError] = null; + this[$bf04a1793c87a8d1$require$kEvents] = { + loadend: null, + error: null, + abort: null, + load: null, + progress: null, + loadstart: null }; - this[$299d327bf4cce9b6$var$kOptions].interceptors = options.interceptors ? { - ...options.interceptors - } : undefined; - this[$299d327bf4cce9b6$var$kMaxRedirections] = maxRedirections; - this[$299d327bf4cce9b6$var$kFactory] = factory; - this[$299d327bf4cce9b6$require$kClients] = new Map(); - this[$299d327bf4cce9b6$var$kFinalizer] = new $299d327bf4cce9b6$var$FinalizationRegistry(/* istanbul ignore next: gc is undeterministic */ (key)=>{ - const ref = this[$299d327bf4cce9b6$require$kClients].get(key); - if (ref !== undefined && ref.deref() === undefined) this[$299d327bf4cce9b6$require$kClients].delete(key); + } + /** + * @see https://w3c.github.io/FileAPI/#dfn-readAsArrayBuffer + * @param {import('buffer').Blob} blob + */ readAsArrayBuffer(blob) { + $bf04a1793c87a8d1$require$webidl.brandCheck(this, $bf04a1793c87a8d1$var$FileReader); + $bf04a1793c87a8d1$require$webidl.argumentLengthCheck(arguments, 1, 'FileReader.readAsArrayBuffer'); + blob = $bf04a1793c87a8d1$require$webidl.converters.Blob(blob, { + strict: false }); - const agent = this; - this[$299d327bf4cce9b6$var$kOnDrain] = (origin, targets)=>{ - agent.emit("drain", origin, [ - agent, - ...targets - ]); - }; - this[$299d327bf4cce9b6$var$kOnConnect] = (origin, targets)=>{ - agent.emit("connect", origin, [ - agent, - ...targets - ]); - }; - this[$299d327bf4cce9b6$var$kOnDisconnect] = (origin, targets, err)=>{ - agent.emit("disconnect", origin, [ - agent, - ...targets - ], err); - }; - this[$299d327bf4cce9b6$var$kOnConnectionError] = (origin, targets, err)=>{ - agent.emit("connectionError", origin, [ - agent, - ...targets - ], err); - }; + // The readAsArrayBuffer(blob) method, when invoked, + // must initiate a read operation for blob with ArrayBuffer. + $bf04a1793c87a8d1$require$readOperation(this, blob, 'ArrayBuffer'); + } + /** + * @see https://w3c.github.io/FileAPI/#readAsBinaryString + * @param {import('buffer').Blob} blob + */ readAsBinaryString(blob) { + $bf04a1793c87a8d1$require$webidl.brandCheck(this, $bf04a1793c87a8d1$var$FileReader); + $bf04a1793c87a8d1$require$webidl.argumentLengthCheck(arguments, 1, 'FileReader.readAsBinaryString'); + blob = $bf04a1793c87a8d1$require$webidl.converters.Blob(blob, { + strict: false + }); + // The readAsBinaryString(blob) method, when invoked, + // must initiate a read operation for blob with BinaryString. + $bf04a1793c87a8d1$require$readOperation(this, blob, 'BinaryString'); + } + /** + * @see https://w3c.github.io/FileAPI/#readAsDataText + * @param {import('buffer').Blob} blob + * @param {string?} encoding + */ readAsText(blob, encoding) { + $bf04a1793c87a8d1$require$webidl.brandCheck(this, $bf04a1793c87a8d1$var$FileReader); + $bf04a1793c87a8d1$require$webidl.argumentLengthCheck(arguments, 1, 'FileReader.readAsText'); + blob = $bf04a1793c87a8d1$require$webidl.converters.Blob(blob, { + strict: false + }); + if (encoding !== undefined) encoding = $bf04a1793c87a8d1$require$webidl.converters.DOMString(encoding, 'FileReader.readAsText', 'encoding'); + // The readAsText(blob, encoding) method, when invoked, + // must initiate a read operation for blob with Text and encoding. + $bf04a1793c87a8d1$require$readOperation(this, blob, 'Text', encoding); + } + /** + * @see https://w3c.github.io/FileAPI/#dfn-readAsDataURL + * @param {import('buffer').Blob} blob + */ readAsDataURL(blob) { + $bf04a1793c87a8d1$require$webidl.brandCheck(this, $bf04a1793c87a8d1$var$FileReader); + $bf04a1793c87a8d1$require$webidl.argumentLengthCheck(arguments, 1, 'FileReader.readAsDataURL'); + blob = $bf04a1793c87a8d1$require$webidl.converters.Blob(blob, { + strict: false + }); + // The readAsDataURL(blob) method, when invoked, must + // initiate a read operation for blob with DataURL. + $bf04a1793c87a8d1$require$readOperation(this, blob, 'DataURL'); } - get [$299d327bf4cce9b6$require$kRunning]() { - let ret = 0; - for (const ref of this[$299d327bf4cce9b6$require$kClients].values()){ - const client = ref.deref(); - /* istanbul ignore next: gc is undeterministic */ if (client) ret += client[$299d327bf4cce9b6$require$kRunning]; + /** + * @see https://w3c.github.io/FileAPI/#dfn-abort + */ abort() { + // 1. If this's state is "empty" or if this's state is + // "done" set this's result to null and terminate + // this algorithm. + if (this[$bf04a1793c87a8d1$require$kState] === 'empty' || this[$bf04a1793c87a8d1$require$kState] === 'done') { + this[$bf04a1793c87a8d1$require$kResult] = null; + return; } - return ret; - } - [$299d327bf4cce9b6$require$kDispatch](opts, handler) { - let key; - if (opts.origin && (typeof opts.origin === "string" || opts.origin instanceof URL)) key = String(opts.origin); - else throw new $299d327bf4cce9b6$require$InvalidArgumentError("opts.origin must be a non-empty string or URL."); - const ref = this[$299d327bf4cce9b6$require$kClients].get(key); - let dispatcher = ref ? ref.deref() : null; - if (!dispatcher) { - dispatcher = this[$299d327bf4cce9b6$var$kFactory](opts.origin, this[$299d327bf4cce9b6$var$kOptions]).on("drain", this[$299d327bf4cce9b6$var$kOnDrain]).on("connect", this[$299d327bf4cce9b6$var$kOnConnect]).on("disconnect", this[$299d327bf4cce9b6$var$kOnDisconnect]).on("connectionError", this[$299d327bf4cce9b6$var$kOnConnectionError]); - this[$299d327bf4cce9b6$require$kClients].set(key, new $299d327bf4cce9b6$var$WeakRef(dispatcher)); - this[$299d327bf4cce9b6$var$kFinalizer].register(dispatcher, key); + // 2. If this's state is "loading" set this's state to + // "done" and set this's result to null. + if (this[$bf04a1793c87a8d1$require$kState] === 'loading') { + this[$bf04a1793c87a8d1$require$kState] = 'done'; + this[$bf04a1793c87a8d1$require$kResult] = null; } - return dispatcher.dispatch(opts, handler); + // 3. If there are any tasks from this on the file reading + // task source in an affiliated task queue, then remove + // those tasks from that task queue. + this[$bf04a1793c87a8d1$require$kAborted] = true; + // 4. Terminate the algorithm for the read method being processed. + // TODO + // 5. Fire a progress event called abort at this. + $bf04a1793c87a8d1$require$fireAProgressEvent('abort', this); + // 6. If this's state is not "loading", fire a progress + // event called loadend at this. + if (this[$bf04a1793c87a8d1$require$kState] !== 'loading') $bf04a1793c87a8d1$require$fireAProgressEvent('loadend', this); } - async [$299d327bf4cce9b6$require$kClose]() { - const closePromises = []; - for (const ref of this[$299d327bf4cce9b6$require$kClients].values()){ - const client = ref.deref(); - /* istanbul ignore else: gc is undeterministic */ if (client) closePromises.push(client.close()); + /** + * @see https://w3c.github.io/FileAPI/#dom-filereader-readystate + */ get readyState() { + $bf04a1793c87a8d1$require$webidl.brandCheck(this, $bf04a1793c87a8d1$var$FileReader); + switch(this[$bf04a1793c87a8d1$require$kState]){ + case 'empty': + return this.EMPTY; + case 'loading': + return this.LOADING; + case 'done': + return this.DONE; } - await Promise.all(closePromises); } - async [$299d327bf4cce9b6$require$kDestroy](err) { - const destroyPromises = []; - for (const ref of this[$299d327bf4cce9b6$require$kClients].values()){ - const client = ref.deref(); - /* istanbul ignore else: gc is undeterministic */ if (client) destroyPromises.push(client.destroy(err)); - } - await Promise.all(destroyPromises); + /** + * @see https://w3c.github.io/FileAPI/#dom-filereader-result + */ get result() { + $bf04a1793c87a8d1$require$webidl.brandCheck(this, $bf04a1793c87a8d1$var$FileReader); + // The result attribute’s getter, when invoked, must return + // this's result. + return this[$bf04a1793c87a8d1$require$kResult]; } -} -module.exports = $299d327bf4cce9b6$var$Agent; - -}); -parcelRegister("kz6S0", function(module, exports) { -"use strict"; - -var $hHZvh = parcelRequire("hHZvh"); -var $ef8c67ca104f674d$require$kConnected = $hHZvh.kConnected; -var $ef8c67ca104f674d$require$kSize = $hHZvh.kSize; -class $ef8c67ca104f674d$var$CompatWeakRef { - constructor(value){ - this.value = value; + /** + * @see https://w3c.github.io/FileAPI/#dom-filereader-error + */ get error() { + $bf04a1793c87a8d1$require$webidl.brandCheck(this, $bf04a1793c87a8d1$var$FileReader); + // The error attribute’s getter, when invoked, must return + // this's error. + return this[$bf04a1793c87a8d1$require$kError]; } - deref() { - return this.value[$ef8c67ca104f674d$require$kConnected] === 0 && this.value[$ef8c67ca104f674d$require$kSize] === 0 ? undefined : this.value; + get onloadend() { + $bf04a1793c87a8d1$require$webidl.brandCheck(this, $bf04a1793c87a8d1$var$FileReader); + return this[$bf04a1793c87a8d1$require$kEvents].loadend; } -} -class $ef8c67ca104f674d$var$CompatFinalizer { - constructor(finalizer){ - this.finalizer = finalizer; + set onloadend(fn) { + $bf04a1793c87a8d1$require$webidl.brandCheck(this, $bf04a1793c87a8d1$var$FileReader); + if (this[$bf04a1793c87a8d1$require$kEvents].loadend) this.removeEventListener('loadend', this[$bf04a1793c87a8d1$require$kEvents].loadend); + if (typeof fn === 'function') { + this[$bf04a1793c87a8d1$require$kEvents].loadend = fn; + this.addEventListener('loadend', fn); + } else this[$bf04a1793c87a8d1$require$kEvents].loadend = null; } - register(dispatcher, key) { - if (dispatcher.on) dispatcher.on("disconnect", ()=>{ - if (dispatcher[$ef8c67ca104f674d$require$kConnected] === 0 && dispatcher[$ef8c67ca104f674d$require$kSize] === 0) this.finalizer(key); - }); + get onerror() { + $bf04a1793c87a8d1$require$webidl.brandCheck(this, $bf04a1793c87a8d1$var$FileReader); + return this[$bf04a1793c87a8d1$require$kEvents].error; + } + set onerror(fn) { + $bf04a1793c87a8d1$require$webidl.brandCheck(this, $bf04a1793c87a8d1$var$FileReader); + if (this[$bf04a1793c87a8d1$require$kEvents].error) this.removeEventListener('error', this[$bf04a1793c87a8d1$require$kEvents].error); + if (typeof fn === 'function') { + this[$bf04a1793c87a8d1$require$kEvents].error = fn; + this.addEventListener('error', fn); + } else this[$bf04a1793c87a8d1$require$kEvents].error = null; + } + get onloadstart() { + $bf04a1793c87a8d1$require$webidl.brandCheck(this, $bf04a1793c87a8d1$var$FileReader); + return this[$bf04a1793c87a8d1$require$kEvents].loadstart; + } + set onloadstart(fn) { + $bf04a1793c87a8d1$require$webidl.brandCheck(this, $bf04a1793c87a8d1$var$FileReader); + if (this[$bf04a1793c87a8d1$require$kEvents].loadstart) this.removeEventListener('loadstart', this[$bf04a1793c87a8d1$require$kEvents].loadstart); + if (typeof fn === 'function') { + this[$bf04a1793c87a8d1$require$kEvents].loadstart = fn; + this.addEventListener('loadstart', fn); + } else this[$bf04a1793c87a8d1$require$kEvents].loadstart = null; + } + get onprogress() { + $bf04a1793c87a8d1$require$webidl.brandCheck(this, $bf04a1793c87a8d1$var$FileReader); + return this[$bf04a1793c87a8d1$require$kEvents].progress; + } + set onprogress(fn) { + $bf04a1793c87a8d1$require$webidl.brandCheck(this, $bf04a1793c87a8d1$var$FileReader); + if (this[$bf04a1793c87a8d1$require$kEvents].progress) this.removeEventListener('progress', this[$bf04a1793c87a8d1$require$kEvents].progress); + if (typeof fn === 'function') { + this[$bf04a1793c87a8d1$require$kEvents].progress = fn; + this.addEventListener('progress', fn); + } else this[$bf04a1793c87a8d1$require$kEvents].progress = null; + } + get onload() { + $bf04a1793c87a8d1$require$webidl.brandCheck(this, $bf04a1793c87a8d1$var$FileReader); + return this[$bf04a1793c87a8d1$require$kEvents].load; + } + set onload(fn) { + $bf04a1793c87a8d1$require$webidl.brandCheck(this, $bf04a1793c87a8d1$var$FileReader); + if (this[$bf04a1793c87a8d1$require$kEvents].load) this.removeEventListener('load', this[$bf04a1793c87a8d1$require$kEvents].load); + if (typeof fn === 'function') { + this[$bf04a1793c87a8d1$require$kEvents].load = fn; + this.addEventListener('load', fn); + } else this[$bf04a1793c87a8d1$require$kEvents].load = null; + } + get onabort() { + $bf04a1793c87a8d1$require$webidl.brandCheck(this, $bf04a1793c87a8d1$var$FileReader); + return this[$bf04a1793c87a8d1$require$kEvents].abort; + } + set onabort(fn) { + $bf04a1793c87a8d1$require$webidl.brandCheck(this, $bf04a1793c87a8d1$var$FileReader); + if (this[$bf04a1793c87a8d1$require$kEvents].abort) this.removeEventListener('abort', this[$bf04a1793c87a8d1$require$kEvents].abort); + if (typeof fn === 'function') { + this[$bf04a1793c87a8d1$require$kEvents].abort = fn; + this.addEventListener('abort', fn); + } else this[$bf04a1793c87a8d1$require$kEvents].abort = null; } } -module.exports = function() { - // FIXME: remove workaround when the Node bug is fixed - // https://github.com/nodejs/node/issues/49344#issuecomment-1741776308 - if (process.env.NODE_V8_COVERAGE) return { - WeakRef: $ef8c67ca104f674d$var$CompatWeakRef, - FinalizationRegistry: $ef8c67ca104f674d$var$CompatFinalizer - }; - return { - WeakRef: $parcel$global.WeakRef || $ef8c67ca104f674d$var$CompatWeakRef, - FinalizationRegistry: $parcel$global.FinalizationRegistry || $ef8c67ca104f674d$var$CompatFinalizer - }; +// https://w3c.github.io/FileAPI/#dom-filereader-empty +$bf04a1793c87a8d1$var$FileReader.EMPTY = $bf04a1793c87a8d1$var$FileReader.prototype.EMPTY = 0; +// https://w3c.github.io/FileAPI/#dom-filereader-loading +$bf04a1793c87a8d1$var$FileReader.LOADING = $bf04a1793c87a8d1$var$FileReader.prototype.LOADING = 1; +// https://w3c.github.io/FileAPI/#dom-filereader-done +$bf04a1793c87a8d1$var$FileReader.DONE = $bf04a1793c87a8d1$var$FileReader.prototype.DONE = 2; +Object.defineProperties($bf04a1793c87a8d1$var$FileReader.prototype, { + EMPTY: $bf04a1793c87a8d1$require$staticPropertyDescriptors, + LOADING: $bf04a1793c87a8d1$require$staticPropertyDescriptors, + DONE: $bf04a1793c87a8d1$require$staticPropertyDescriptors, + readAsArrayBuffer: $bf04a1793c87a8d1$require$kEnumerableProperty, + readAsBinaryString: $bf04a1793c87a8d1$require$kEnumerableProperty, + readAsText: $bf04a1793c87a8d1$require$kEnumerableProperty, + readAsDataURL: $bf04a1793c87a8d1$require$kEnumerableProperty, + abort: $bf04a1793c87a8d1$require$kEnumerableProperty, + readyState: $bf04a1793c87a8d1$require$kEnumerableProperty, + result: $bf04a1793c87a8d1$require$kEnumerableProperty, + error: $bf04a1793c87a8d1$require$kEnumerableProperty, + onloadstart: $bf04a1793c87a8d1$require$kEnumerableProperty, + onprogress: $bf04a1793c87a8d1$require$kEnumerableProperty, + onload: $bf04a1793c87a8d1$require$kEnumerableProperty, + onabort: $bf04a1793c87a8d1$require$kEnumerableProperty, + onerror: $bf04a1793c87a8d1$require$kEnumerableProperty, + onloadend: $bf04a1793c87a8d1$require$kEnumerableProperty, + [Symbol.toStringTag]: { + value: 'FileReader', + writable: false, + enumerable: false, + configurable: true + } +}); +Object.defineProperties($bf04a1793c87a8d1$var$FileReader, { + EMPTY: $bf04a1793c87a8d1$require$staticPropertyDescriptors, + LOADING: $bf04a1793c87a8d1$require$staticPropertyDescriptors, + DONE: $bf04a1793c87a8d1$require$staticPropertyDescriptors +}); +module.exports = { + FileReader: $bf04a1793c87a8d1$var$FileReader }; }); +parcelRegister("fJkL4", function(module, exports) { +'use strict'; +var $7PQnc = parcelRequire("7PQnc"); +var $b73b2925e7b627d7$require$kState = $7PQnc.kState; +var $b73b2925e7b627d7$require$kError = $7PQnc.kError; +var $b73b2925e7b627d7$require$kResult = $7PQnc.kResult; +var $b73b2925e7b627d7$require$kAborted = $7PQnc.kAborted; +var $b73b2925e7b627d7$require$kLastProgressEventFired = $7PQnc.kLastProgressEventFired; -parcelRegister("iZi4O", function(module, exports) { - -$parcel$export(module.exports, "request", () => $dd2bf228ccef52d1$export$b5fe3f66a567bec0, (v) => $dd2bf228ccef52d1$export$b5fe3f66a567bec0 = v); -$parcel$export(module.exports, "stream", () => $dd2bf228ccef52d1$export$4938110305e6185f, (v) => $dd2bf228ccef52d1$export$4938110305e6185f = v); -$parcel$export(module.exports, "pipeline", () => $dd2bf228ccef52d1$export$43f28b24e1eb8181, (v) => $dd2bf228ccef52d1$export$43f28b24e1eb8181 = v); -$parcel$export(module.exports, "upgrade", () => $dd2bf228ccef52d1$export$ba387509dbaf942e, (v) => $dd2bf228ccef52d1$export$ba387509dbaf942e = v); -$parcel$export(module.exports, "connect", () => $dd2bf228ccef52d1$export$64605811ab45167f, (v) => $dd2bf228ccef52d1$export$64605811ab45167f = v); -var $dd2bf228ccef52d1$export$b5fe3f66a567bec0; -var $dd2bf228ccef52d1$export$4938110305e6185f; -var $dd2bf228ccef52d1$export$43f28b24e1eb8181; -var $dd2bf228ccef52d1$export$ba387509dbaf942e; -var $dd2bf228ccef52d1$export$64605811ab45167f; -"use strict"; - -$dd2bf228ccef52d1$export$b5fe3f66a567bec0 = (parcelRequire("lHXol")); - -$dd2bf228ccef52d1$export$4938110305e6185f = (parcelRequire("4AACW")); - -$dd2bf228ccef52d1$export$43f28b24e1eb8181 = (parcelRequire("70G9w")); - -$dd2bf228ccef52d1$export$ba387509dbaf942e = (parcelRequire("3FKwS")); - -$dd2bf228ccef52d1$export$64605811ab45167f = (parcelRequire("hWLgo")); +var $9c0Bd = parcelRequire("9c0Bd"); +var $b73b2925e7b627d7$require$ProgressEvent = $9c0Bd.ProgressEvent; -}); -parcelRegister("lHXol", function(module, exports) { -"use strict"; - -var $8KdTE = parcelRequire("8KdTE"); - -var $cKdp7 = parcelRequire("cKdp7"); -var $fcdbaf1556ec8e58$require$InvalidArgumentError = $cKdp7.InvalidArgumentError; -var $fcdbaf1556ec8e58$require$RequestAbortedError = $cKdp7.RequestAbortedError; +var $e1Ouk = parcelRequire("e1Ouk"); +var $b73b2925e7b627d7$require$getEncoding = $e1Ouk.getEncoding; -var $gv2nV = parcelRequire("gv2nV"); +var $30IsM = parcelRequire("30IsM"); +var $b73b2925e7b627d7$require$serializeAMimeType = $30IsM.serializeAMimeType; +var $b73b2925e7b627d7$require$parseMIMEType = $30IsM.parseMIMEType; -var $8G2SE = parcelRequire("8G2SE"); -var $fcdbaf1556ec8e58$require$getResolveErrorBodyCallback = $8G2SE.getResolveErrorBodyCallback; +var $b73b2925e7b627d7$require$types = $in2sP$nodeutil.types; -var $fcdbaf1556ec8e58$require$AsyncResource = $g40fK$async_hooks.AsyncResource; +var $b73b2925e7b627d7$require$StringDecoder = $in2sP$string_decoder.StringDecoder; -var $ghZCH = parcelRequire("ghZCH"); -var $fcdbaf1556ec8e58$require$addSignal = $ghZCH.addSignal; -var $fcdbaf1556ec8e58$require$removeSignal = $ghZCH.removeSignal; -class $fcdbaf1556ec8e58$var$RequestHandler extends $fcdbaf1556ec8e58$require$AsyncResource { - constructor(opts, callback){ - if (!opts || typeof opts !== "object") throw new $fcdbaf1556ec8e58$require$InvalidArgumentError("invalid opts"); - const { signal: signal, method: method, opaque: opaque, body: body, onInfo: onInfo, responseHeaders: responseHeaders, throwOnError: throwOnError, highWaterMark: highWaterMark } = opts; +var $b73b2925e7b627d7$require$btoa = $in2sP$nodebuffer.btoa; +/** @type {PropertyDescriptor} */ const $b73b2925e7b627d7$var$staticPropertyDescriptors = { + enumerable: true, + writable: false, + configurable: false +}; +/** + * @see https://w3c.github.io/FileAPI/#readOperation + * @param {import('./filereader').FileReader} fr + * @param {import('buffer').Blob} blob + * @param {string} type + * @param {string?} encodingName + */ function $b73b2925e7b627d7$var$readOperation(fr, blob, type, encodingName) { + // 1. If fr’s state is "loading", throw an InvalidStateError + // DOMException. + if (fr[$b73b2925e7b627d7$require$kState] === 'loading') throw new DOMException('Invalid state', 'InvalidStateError'); + // 2. Set fr’s state to "loading". + fr[$b73b2925e7b627d7$require$kState] = 'loading'; + // 3. Set fr’s result to null. + fr[$b73b2925e7b627d7$require$kResult] = null; + // 4. Set fr’s error to null. + fr[$b73b2925e7b627d7$require$kError] = null; + // 5. Let stream be the result of calling get stream on blob. + /** @type {import('stream/web').ReadableStream} */ const stream = blob.stream(); + // 6. Let reader be the result of getting a reader from stream. + const reader = stream.getReader(); + // 7. Let bytes be an empty byte sequence. + /** @type {Uint8Array[]} */ const bytes = []; + // 8. Let chunkPromise be the result of reading a chunk from + // stream with reader. + let chunkPromise = reader.read(); + // 9. Let isFirstChunk be true. + let isFirstChunk = true; + (async ()=>{ + while(!fr[$b73b2925e7b627d7$require$kAborted])// 1. Wait for chunkPromise to be fulfilled or rejected. try { - if (typeof callback !== "function") throw new $fcdbaf1556ec8e58$require$InvalidArgumentError("invalid callback"); - if (highWaterMark && (typeof highWaterMark !== "number" || highWaterMark < 0)) throw new $fcdbaf1556ec8e58$require$InvalidArgumentError("invalid highWaterMark"); - if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") throw new $fcdbaf1556ec8e58$require$InvalidArgumentError("signal must be an EventEmitter or EventTarget"); - if (method === "CONNECT") throw new $fcdbaf1556ec8e58$require$InvalidArgumentError("invalid method"); - if (onInfo && typeof onInfo !== "function") throw new $fcdbaf1556ec8e58$require$InvalidArgumentError("invalid onInfo callback"); - super("UNDICI_REQUEST"); - } catch (err) { - if ($gv2nV.isStream(body)) $gv2nV.destroy(body.on("error", $gv2nV.nop), err); - throw err; - } - this.responseHeaders = responseHeaders || null; - this.opaque = opaque || null; - this.callback = callback; - this.res = null; - this.abort = null; - this.body = body; - this.trailers = {}; - this.context = null; - this.onInfo = onInfo || null; - this.throwOnError = throwOnError; - this.highWaterMark = highWaterMark; - if ($gv2nV.isStream(body)) body.on("error", (err)=>{ - this.onError(err); - }); - $fcdbaf1556ec8e58$require$addSignal(this, signal); - } - onConnect(abort, context) { - if (!this.callback) throw new $fcdbaf1556ec8e58$require$RequestAbortedError(); - this.abort = abort; - this.context = context; - } - onHeaders(statusCode, rawHeaders, resume, statusMessage) { - const { callback: callback, opaque: opaque, abort: abort, context: context, responseHeaders: responseHeaders, highWaterMark: highWaterMark } = this; - const headers = responseHeaders === "raw" ? $gv2nV.parseRawHeaders(rawHeaders) : $gv2nV.parseHeaders(rawHeaders); - if (statusCode < 200) { - if (this.onInfo) this.onInfo({ - statusCode: statusCode, - headers: headers - }); - return; - } - const parsedHeaders = responseHeaders === "raw" ? $gv2nV.parseHeaders(rawHeaders) : headers; - const contentType = parsedHeaders["content-type"]; - const body = new $8KdTE({ - resume: resume, - abort: abort, - contentType: contentType, - highWaterMark: highWaterMark - }); - this.callback = null; - this.res = body; - if (callback !== null) { - if (this.throwOnError && statusCode >= 400) this.runInAsyncScope($fcdbaf1556ec8e58$require$getResolveErrorBodyCallback, null, { - callback: callback, - body: body, - contentType: contentType, - statusCode: statusCode, - statusMessage: statusMessage, - headers: headers - }); - else this.runInAsyncScope(callback, null, null, { - statusCode: statusCode, - headers: headers, - trailers: this.trailers, - opaque: opaque, - body: body, - context: context + const { done: done, value: value } = await chunkPromise; + // 2. If chunkPromise is fulfilled, and isFirstChunk is + // true, queue a task to fire a progress event called + // loadstart at fr. + if (isFirstChunk && !fr[$b73b2925e7b627d7$require$kAborted]) queueMicrotask(()=>{ + $b73b2925e7b627d7$var$fireAProgressEvent('loadstart', fr); }); - } - } - onData(chunk) { - const { res: res } = this; - return res.push(chunk); - } - onComplete(trailers) { - const { res: res } = this; - $fcdbaf1556ec8e58$require$removeSignal(this); - $gv2nV.parseHeaders(trailers, this.trailers); - res.push(null); - } - onError(err) { - const { res: res, callback: callback, body: body, opaque: opaque } = this; - $fcdbaf1556ec8e58$require$removeSignal(this); - if (callback) { - // TODO: Does this need queueMicrotask? - this.callback = null; - queueMicrotask(()=>{ - this.runInAsyncScope(callback, null, err, { - opaque: opaque + // 3. Set isFirstChunk to false. + isFirstChunk = false; + // 4. If chunkPromise is fulfilled with an object whose + // done property is false and whose value property is + // a Uint8Array object, run these steps: + if (!done && $b73b2925e7b627d7$require$types.isUint8Array(value)) { + // 1. Let bs be the byte sequence represented by the + // Uint8Array object. + // 2. Append bs to bytes. + bytes.push(value); + // 3. If roughly 50ms have passed since these steps + // were last invoked, queue a task to fire a + // progress event called progress at fr. + if ((fr[$b73b2925e7b627d7$require$kLastProgressEventFired] === undefined || Date.now() - fr[$b73b2925e7b627d7$require$kLastProgressEventFired] >= 50) && !fr[$b73b2925e7b627d7$require$kAborted]) { + fr[$b73b2925e7b627d7$require$kLastProgressEventFired] = Date.now(); + queueMicrotask(()=>{ + $b73b2925e7b627d7$var$fireAProgressEvent('progress', fr); + }); + } + // 4. Set chunkPromise to the result of reading a + // chunk from stream with reader. + chunkPromise = reader.read(); + } else if (done) { + // 5. Otherwise, if chunkPromise is fulfilled with an + // object whose done property is true, queue a task + // to run the following steps and abort this algorithm: + queueMicrotask(()=>{ + // 1. Set fr’s state to "done". + fr[$b73b2925e7b627d7$require$kState] = 'done'; + // 2. Let result be the result of package data given + // bytes, type, blob’s type, and encodingName. + try { + const result = $b73b2925e7b627d7$var$packageData(bytes, type, blob.type, encodingName); + // 4. Else: + if (fr[$b73b2925e7b627d7$require$kAborted]) return; + // 1. Set fr’s result to result. + fr[$b73b2925e7b627d7$require$kResult] = result; + // 2. Fire a progress event called load at the fr. + $b73b2925e7b627d7$var$fireAProgressEvent('load', fr); + } catch (error) { + // 3. If package data threw an exception error: + // 1. Set fr’s error to error. + fr[$b73b2925e7b627d7$require$kError] = error; + // 2. Fire a progress event called error at fr. + $b73b2925e7b627d7$var$fireAProgressEvent('error', fr); + } + // 5. If fr’s state is not "loading", fire a progress + // event called loadend at the fr. + if (fr[$b73b2925e7b627d7$require$kState] !== 'loading') $b73b2925e7b627d7$var$fireAProgressEvent('loadend', fr); }); - }); - } - if (res) { - this.res = null; - // Ensure all queued handlers are invoked before destroying res. + break; + } + } catch (error) { + if (fr[$b73b2925e7b627d7$require$kAborted]) return; + // 6. Otherwise, if chunkPromise is rejected with an + // error error, queue a task to run the following + // steps and abort this algorithm: queueMicrotask(()=>{ - $gv2nV.destroy(res, err); + // 1. Set fr’s state to "done". + fr[$b73b2925e7b627d7$require$kState] = 'done'; + // 2. Set fr’s error to error. + fr[$b73b2925e7b627d7$require$kError] = error; + // 3. Fire a progress event called error at fr. + $b73b2925e7b627d7$var$fireAProgressEvent('error', fr); + // 4. If fr’s state is not "loading", fire a progress + // event called loadend at fr. + if (fr[$b73b2925e7b627d7$require$kState] !== 'loading') $b73b2925e7b627d7$var$fireAProgressEvent('loadend', fr); }); + break; } - if (body) { - this.body = null; - $gv2nV.destroy(body, err); - } - } + })(); } -function $fcdbaf1556ec8e58$var$request(opts, callback) { - if (callback === undefined) return new Promise((resolve, reject)=>{ - $fcdbaf1556ec8e58$var$request.call(this, opts, (err, data)=>{ - return err ? reject(err) : resolve(data); - }); +/** + * @see https://w3c.github.io/FileAPI/#fire-a-progress-event + * @see https://dom.spec.whatwg.org/#concept-event-fire + * @param {string} e The name of the event + * @param {import('./filereader').FileReader} reader + */ function $b73b2925e7b627d7$var$fireAProgressEvent(e, reader) { + // The progress event e does not bubble. e.bubbles must be false + // The progress event e is NOT cancelable. e.cancelable must be false + const event = new $b73b2925e7b627d7$require$ProgressEvent(e, { + bubbles: false, + cancelable: false }); - try { - this.dispatch(opts, new $fcdbaf1556ec8e58$var$RequestHandler(opts, callback)); - } catch (err) { - if (typeof callback !== "function") throw err; - const opaque = opts && opts.opaque; - queueMicrotask(()=>callback(err, { - opaque: opaque - })); - } + reader.dispatchEvent(event); } -module.exports = $fcdbaf1556ec8e58$var$request; -module.exports.RequestHandler = $fcdbaf1556ec8e58$var$RequestHandler; - -}); -parcelRegister("8KdTE", function(module, exports) { -// Ported from https://github.com/nodejs/undici/pull/907 -"use strict"; - - -var $65dd6632eaa18c19$require$Readable = $g40fK$stream.Readable; - -var $cKdp7 = parcelRequire("cKdp7"); -var $65dd6632eaa18c19$require$RequestAbortedError = $cKdp7.RequestAbortedError; -var $65dd6632eaa18c19$require$NotSupportedError = $cKdp7.NotSupportedError; -var $65dd6632eaa18c19$require$InvalidArgumentError = $cKdp7.InvalidArgumentError; - -var $gv2nV = parcelRequire("gv2nV"); - -var $gv2nV = parcelRequire("gv2nV"); -var $65dd6632eaa18c19$require$ReadableStreamFrom = $gv2nV.ReadableStreamFrom; -var $65dd6632eaa18c19$require$toUSVString = $gv2nV.toUSVString; -let $65dd6632eaa18c19$var$Blob; -const $65dd6632eaa18c19$var$kConsume = Symbol("kConsume"); -const $65dd6632eaa18c19$var$kReading = Symbol("kReading"); -const $65dd6632eaa18c19$var$kBody = Symbol("kBody"); -const $65dd6632eaa18c19$var$kAbort = Symbol("abort"); -const $65dd6632eaa18c19$var$kContentType = Symbol("kContentType"); -const $65dd6632eaa18c19$var$noop = ()=>{}; -module.exports = class BodyReadable extends $65dd6632eaa18c19$require$Readable { - constructor({ resume: resume, abort: abort, contentType: contentType = "", highWaterMark: highWaterMark = 65536 // Same as nodejs fs streams. - }){ - super({ - autoDestroy: true, - read: resume, - highWaterMark: highWaterMark - }); - this._readableState.dataEmitted = false; - this[$65dd6632eaa18c19$var$kAbort] = abort; - this[$65dd6632eaa18c19$var$kConsume] = null; - this[$65dd6632eaa18c19$var$kBody] = null; - this[$65dd6632eaa18c19$var$kContentType] = contentType; - // Is stream being consumed through Readable API? - // This is an optimization so that we avoid checking - // for 'data' and 'readable' listeners in the hot path - // inside push(). - this[$65dd6632eaa18c19$var$kReading] = false; - } - destroy(err) { - if (this.destroyed) // Node < 16 - return this; - if (!err && !this._readableState.endEmitted) err = new $65dd6632eaa18c19$require$RequestAbortedError(); - if (err) this[$65dd6632eaa18c19$var$kAbort](); - return super.destroy(err); - } - emit(ev, ...args) { - if (ev === "data") // Node < 16.7 - this._readableState.dataEmitted = true; - else if (ev === "error") // Node < 16 - this._readableState.errorEmitted = true; - return super.emit(ev, ...args); - } - on(ev, ...args) { - if (ev === "data" || ev === "readable") this[$65dd6632eaa18c19$var$kReading] = true; - return super.on(ev, ...args); - } - addListener(ev, ...args) { - return this.on(ev, ...args); - } - off(ev, ...args) { - const ret = super.off(ev, ...args); - if (ev === "data" || ev === "readable") this[$65dd6632eaa18c19$var$kReading] = this.listenerCount("data") > 0 || this.listenerCount("readable") > 0; - return ret; - } - removeListener(ev, ...args) { - return this.off(ev, ...args); - } - push(chunk) { - if (this[$65dd6632eaa18c19$var$kConsume] && chunk !== null && this.readableLength === 0) { - $65dd6632eaa18c19$var$consumePush(this[$65dd6632eaa18c19$var$kConsume], chunk); - return this[$65dd6632eaa18c19$var$kReading] ? super.push(chunk) : true; - } - return super.push(chunk); - } - // https://fetch.spec.whatwg.org/#dom-body-text - async text() { - return $65dd6632eaa18c19$var$consume(this, "text"); - } - // https://fetch.spec.whatwg.org/#dom-body-json - async json() { - return $65dd6632eaa18c19$var$consume(this, "json"); - } - // https://fetch.spec.whatwg.org/#dom-body-blob - async blob() { - return $65dd6632eaa18c19$var$consume(this, "blob"); - } - // https://fetch.spec.whatwg.org/#dom-body-arraybuffer - async arrayBuffer() { - return $65dd6632eaa18c19$var$consume(this, "arrayBuffer"); - } - // https://fetch.spec.whatwg.org/#dom-body-formdata - async formData() { - // TODO: Implement. - throw new $65dd6632eaa18c19$require$NotSupportedError(); - } - // https://fetch.spec.whatwg.org/#dom-body-bodyused - get bodyUsed() { - return $gv2nV.isDisturbed(this); - } - // https://fetch.spec.whatwg.org/#dom-body-body - get body() { - if (!this[$65dd6632eaa18c19$var$kBody]) { - this[$65dd6632eaa18c19$var$kBody] = $65dd6632eaa18c19$require$ReadableStreamFrom(this); - if (this[$65dd6632eaa18c19$var$kConsume]) { - // TODO: Is this the best way to force a lock? - this[$65dd6632eaa18c19$var$kBody].getReader() // Ensure stream is locked. - ; - $g40fK$assert(this[$65dd6632eaa18c19$var$kBody].locked); +/** + * @see https://w3c.github.io/FileAPI/#blob-package-data + * @param {Uint8Array[]} bytes + * @param {string} type + * @param {string?} mimeType + * @param {string?} encodingName + */ function $b73b2925e7b627d7$var$packageData(bytes, type, mimeType, encodingName) { + // 1. A Blob has an associated package data algorithm, given + // bytes, a type, a optional mimeType, and a optional + // encodingName, which switches on type and runs the + // associated steps: + switch(type){ + case 'DataURL': + { + // 1. Return bytes as a DataURL [RFC2397] subject to + // the considerations below: + // * Use mimeType as part of the Data URL if it is + // available in keeping with the Data URL + // specification [RFC2397]. + // * If mimeType is not available return a Data URL + // without a media-type. [RFC2397]. + // https://datatracker.ietf.org/doc/html/rfc2397#section-3 + // dataurl := "data:" [ mediatype ] [ ";base64" ] "," data + // mediatype := [ type "/" subtype ] *( ";" parameter ) + // data := *urlchar + // parameter := attribute "=" value + let dataURL = 'data:'; + const parsed = $b73b2925e7b627d7$require$parseMIMEType(mimeType || 'application/octet-stream'); + if (parsed !== 'failure') dataURL += $b73b2925e7b627d7$require$serializeAMimeType(parsed); + dataURL += ';base64,'; + const decoder = new $b73b2925e7b627d7$require$StringDecoder('latin1'); + for (const chunk of bytes)dataURL += $b73b2925e7b627d7$require$btoa(decoder.write(chunk)); + dataURL += $b73b2925e7b627d7$require$btoa(decoder.end()); + return dataURL; + } + case 'Text': + { + // 1. Let encoding be failure + let encoding = 'failure'; + // 2. If the encodingName is present, set encoding to the + // result of getting an encoding from encodingName. + if (encodingName) encoding = $b73b2925e7b627d7$require$getEncoding(encodingName); + // 3. If encoding is failure, and mimeType is present: + if (encoding === 'failure' && mimeType) { + // 1. Let type be the result of parse a MIME type + // given mimeType. + const type = $b73b2925e7b627d7$require$parseMIMEType(mimeType); + // 2. If type is not failure, set encoding to the result + // of getting an encoding from type’s parameters["charset"]. + if (type !== 'failure') encoding = $b73b2925e7b627d7$require$getEncoding(type.parameters.get('charset')); + } + // 4. If encoding is failure, then set encoding to UTF-8. + if (encoding === 'failure') encoding = 'UTF-8'; + // 5. Decode bytes using fallback encoding encoding, and + // return the result. + return $b73b2925e7b627d7$var$decode(bytes, encoding); + } + case 'ArrayBuffer': + { + // Return a new ArrayBuffer whose contents are bytes. + const sequence = $b73b2925e7b627d7$var$combineByteSequences(bytes); + return sequence.buffer; + } + case 'BinaryString': + { + // Return bytes as a binary string, in which every byte + // is represented by a code unit of equal value [0..255]. + let binaryString = ''; + const decoder = new $b73b2925e7b627d7$require$StringDecoder('latin1'); + for (const chunk of bytes)binaryString += decoder.write(chunk); + binaryString += decoder.end(); + return binaryString; } - } - return this[$65dd6632eaa18c19$var$kBody]; - } - dump(opts) { - let limit = opts && Number.isFinite(opts.limit) ? opts.limit : 262144; - const signal = opts && opts.signal; - if (signal) try { - if (typeof signal !== "object" || !("aborted" in signal)) throw new $65dd6632eaa18c19$require$InvalidArgumentError("signal must be an AbortSignal"); - $gv2nV.throwIfAborted(signal); - } catch (err) { - return Promise.reject(err); - } - if (this.closed) return Promise.resolve(null); - return new Promise((resolve, reject)=>{ - const signalListenerCleanup = signal ? $gv2nV.addAbortListener(signal, ()=>{ - this.destroy(); - }) : $65dd6632eaa18c19$var$noop; - this.on("close", function() { - signalListenerCleanup(); - if (signal && signal.aborted) reject(signal.reason || Object.assign(new Error("The operation was aborted"), { - name: "AbortError" - })); - else resolve(null); - }).on("error", $65dd6632eaa18c19$var$noop).on("data", function(chunk) { - limit -= chunk.length; - if (limit <= 0) this.destroy(); - }).resume(); - }); } -}; -// https://streams.spec.whatwg.org/#readablestream-locked -function $65dd6632eaa18c19$var$isLocked(self) { - // Consume is an implicit lock. - return self[$65dd6632eaa18c19$var$kBody] && self[$65dd6632eaa18c19$var$kBody].locked === true || self[$65dd6632eaa18c19$var$kConsume]; -} -// https://fetch.spec.whatwg.org/#body-unusable -function $65dd6632eaa18c19$var$isUnusable(self) { - return $gv2nV.isDisturbed(self) || $65dd6632eaa18c19$var$isLocked(self); } -async function $65dd6632eaa18c19$var$consume(stream, type) { - if ($65dd6632eaa18c19$var$isUnusable(stream)) throw new TypeError("unusable"); - $g40fK$assert(!stream[$65dd6632eaa18c19$var$kConsume]); - return new Promise((resolve, reject)=>{ - stream[$65dd6632eaa18c19$var$kConsume] = { - type: type, - stream: stream, - resolve: resolve, - reject: reject, - length: 0, - body: [] - }; - stream.on("error", function(err) { - $65dd6632eaa18c19$var$consumeFinish(this[$65dd6632eaa18c19$var$kConsume], err); - }).on("close", function() { - if (this[$65dd6632eaa18c19$var$kConsume].body !== null) $65dd6632eaa18c19$var$consumeFinish(this[$65dd6632eaa18c19$var$kConsume], new $65dd6632eaa18c19$require$RequestAbortedError()); - }); - process.nextTick($65dd6632eaa18c19$var$consumeStart, stream[$65dd6632eaa18c19$var$kConsume]); - }); -} -function $65dd6632eaa18c19$var$consumeStart(consume) { - if (consume.body === null) return; - const { _readableState: state } = consume.stream; - for (const chunk of state.buffer)$65dd6632eaa18c19$var$consumePush(consume, chunk); - if (state.endEmitted) $65dd6632eaa18c19$var$consumeEnd(this[$65dd6632eaa18c19$var$kConsume]); - else consume.stream.on("end", function() { - $65dd6632eaa18c19$var$consumeEnd(this[$65dd6632eaa18c19$var$kConsume]); - }); - consume.stream.resume(); - while(consume.stream.read() != null); -} - -function $65dd6632eaa18c19$var$consumeEnd(consume) { - const { type: type, body: body, resolve: resolve, stream: stream, length: length } = consume; - try { - if (type === "text") resolve($65dd6632eaa18c19$require$toUSVString(Buffer.concat(body))); - else if (type === "json") resolve(JSON.parse(Buffer.concat(body))); - else if (type === "arrayBuffer") { - const dst = new Uint8Array(length); - let pos = 0; - for (const buf of body){ - dst.set(buf, pos); - pos += buf.byteLength; - } - resolve(dst.buffer); - } else if (type === "blob") { - if (!$65dd6632eaa18c19$var$Blob) $65dd6632eaa18c19$var$Blob = $65dd6632eaa18c19$import$a968f85fc6710240$3b660928c86ff55c; - resolve(new $65dd6632eaa18c19$var$Blob(body, { - type: stream[$65dd6632eaa18c19$var$kContentType] - })); - } - $65dd6632eaa18c19$var$consumeFinish(consume); - } catch (err) { - stream.destroy(err); +/** + * @see https://encoding.spec.whatwg.org/#decode + * @param {Uint8Array[]} ioQueue + * @param {string} encoding + */ function $b73b2925e7b627d7$var$decode(ioQueue, encoding) { + const bytes = $b73b2925e7b627d7$var$combineByteSequences(ioQueue); + // 1. Let BOMEncoding be the result of BOM sniffing ioQueue. + const BOMEncoding = $b73b2925e7b627d7$var$BOMSniffing(bytes); + let slice = 0; + // 2. If BOMEncoding is non-null: + if (BOMEncoding !== null) { + // 1. Set encoding to BOMEncoding. + encoding = BOMEncoding; + // 2. Read three bytes from ioQueue, if BOMEncoding is + // UTF-8; otherwise read two bytes. + // (Do nothing with those bytes.) + slice = BOMEncoding === 'UTF-8' ? 3 : 2; } + // 3. Process a queue with an instance of encoding’s + // decoder, ioQueue, output, and "replacement". + // 4. Return output. + const sliced = bytes.slice(slice); + return new TextDecoder(encoding).decode(sliced); } -function $65dd6632eaa18c19$var$consumePush(consume, chunk) { - consume.length += chunk.length; - consume.body.push(chunk); +/** + * @see https://encoding.spec.whatwg.org/#bom-sniff + * @param {Uint8Array} ioQueue + */ function $b73b2925e7b627d7$var$BOMSniffing(ioQueue) { + // 1. Let BOM be the result of peeking 3 bytes from ioQueue, + // converted to a byte sequence. + const [a, b, c] = ioQueue; + // 2. For each of the rows in the table below, starting with + // the first one and going down, if BOM starts with the + // bytes given in the first column, then return the + // encoding given in the cell in the second column of that + // row. Otherwise, return null. + if (a === 0xEF && b === 0xBB && c === 0xBF) return 'UTF-8'; + else if (a === 0xFE && b === 0xFF) return 'UTF-16BE'; + else if (a === 0xFF && b === 0xFE) return 'UTF-16LE'; + return null; } -function $65dd6632eaa18c19$var$consumeFinish(consume, err) { - if (consume.body === null) return; - if (err) consume.reject(err); - else consume.resolve(); - consume.type = null; - consume.stream = null; - consume.resolve = null; - consume.reject = null; - consume.length = 0; - consume.body = null; +/** + * @param {Uint8Array[]} sequences + */ function $b73b2925e7b627d7$var$combineByteSequences(sequences) { + const size = sequences.reduce((a, b)=>{ + return a + b.byteLength; + }, 0); + let offset = 0; + return sequences.reduce((a, b)=>{ + a.set(b, offset); + offset += b.byteLength; + return a; + }, new Uint8Array(size)); } +module.exports = { + staticPropertyDescriptors: $b73b2925e7b627d7$var$staticPropertyDescriptors, + readOperation: $b73b2925e7b627d7$var$readOperation, + fireAProgressEvent: $b73b2925e7b627d7$var$fireAProgressEvent +}; }); +parcelRegister("7PQnc", function(module, exports) { +'use strict'; +module.exports = { + kState: Symbol('FileReader state'), + kResult: Symbol('FileReader result'), + kError: Symbol('FileReader error'), + kLastProgressEventFired: Symbol('FileReader last progress event fired timestamp'), + kEvents: Symbol('FileReader events'), + kAborted: Symbol('FileReader aborted') +}; -parcelRegister("8G2SE", function(module, exports) { - +}); -var $cKdp7 = parcelRequire("cKdp7"); -var $65147af9b321752d$require$ResponseStatusCodeError = $cKdp7.ResponseStatusCodeError; +parcelRegister("9c0Bd", function(module, exports) { +'use strict'; -var $gv2nV = parcelRequire("gv2nV"); -var $65147af9b321752d$require$toUSVString = $gv2nV.toUSVString; -async function $65147af9b321752d$var$getResolveErrorBodyCallback({ callback: callback, body: body, contentType: contentType, statusCode: statusCode, statusMessage: statusMessage, headers: headers }) { - $g40fK$assert(body); - let chunks = []; - let limit = 0; - for await (const chunk of body){ - chunks.push(chunk); - limit += chunk.length; - if (limit > 131072) { - chunks = null; - break; - } - } - if (statusCode === 204 || !contentType || !chunks) { - process.nextTick(callback, new $65147af9b321752d$require$ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ""}`, statusCode, headers)); - return; +var $5HTG7 = parcelRequire("5HTG7"); +var $01ba280c95875533$require$webidl = $5HTG7.webidl; +const $01ba280c95875533$var$kState = Symbol('ProgressEvent state'); +/** + * @see https://xhr.spec.whatwg.org/#progressevent + */ class $01ba280c95875533$var$ProgressEvent extends Event { + constructor(type, eventInitDict = {}){ + type = $01ba280c95875533$require$webidl.converters.DOMString(type, 'ProgressEvent constructor', 'type'); + eventInitDict = $01ba280c95875533$require$webidl.converters.ProgressEventInit(eventInitDict ?? {}); + super(type, eventInitDict); + this[$01ba280c95875533$var$kState] = { + lengthComputable: eventInitDict.lengthComputable, + loaded: eventInitDict.loaded, + total: eventInitDict.total + }; } - try { - if (contentType.startsWith("application/json")) { - const payload = JSON.parse($65147af9b321752d$require$toUSVString(Buffer.concat(chunks))); - process.nextTick(callback, new $65147af9b321752d$require$ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ""}`, statusCode, headers, payload)); - return; - } - if (contentType.startsWith("text/")) { - const payload = $65147af9b321752d$require$toUSVString(Buffer.concat(chunks)); - process.nextTick(callback, new $65147af9b321752d$require$ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ""}`, statusCode, headers, payload)); - return; - } - } catch (err) { - // Process in a fallback if error + get lengthComputable() { + $01ba280c95875533$require$webidl.brandCheck(this, $01ba280c95875533$var$ProgressEvent); + return this[$01ba280c95875533$var$kState].lengthComputable; + } + get loaded() { + $01ba280c95875533$require$webidl.brandCheck(this, $01ba280c95875533$var$ProgressEvent); + return this[$01ba280c95875533$var$kState].loaded; + } + get total() { + $01ba280c95875533$require$webidl.brandCheck(this, $01ba280c95875533$var$ProgressEvent); + return this[$01ba280c95875533$var$kState].total; } - process.nextTick(callback, new $65147af9b321752d$require$ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ""}`, statusCode, headers)); } +$01ba280c95875533$require$webidl.converters.ProgressEventInit = $01ba280c95875533$require$webidl.dictionaryConverter([ + { + key: 'lengthComputable', + converter: $01ba280c95875533$require$webidl.converters.boolean, + defaultValue: ()=>false + }, + { + key: 'loaded', + converter: $01ba280c95875533$require$webidl.converters['unsigned long long'], + defaultValue: ()=>0 + }, + { + key: 'total', + converter: $01ba280c95875533$require$webidl.converters['unsigned long long'], + defaultValue: ()=>0 + }, + { + key: 'bubbles', + converter: $01ba280c95875533$require$webidl.converters.boolean, + defaultValue: ()=>false + }, + { + key: 'cancelable', + converter: $01ba280c95875533$require$webidl.converters.boolean, + defaultValue: ()=>false + }, + { + key: 'composed', + converter: $01ba280c95875533$require$webidl.converters.boolean, + defaultValue: ()=>false + } +]); module.exports = { - getResolveErrorBodyCallback: $65147af9b321752d$var$getResolveErrorBodyCallback + ProgressEvent: $01ba280c95875533$var$ProgressEvent }; }); -parcelRegister("ghZCH", function(module, exports) { - -var $gv2nV = parcelRequire("gv2nV"); -var $bdbe08f9735db95a$require$addAbortListener = $gv2nV.addAbortListener; - -var $cKdp7 = parcelRequire("cKdp7"); -var $bdbe08f9735db95a$require$RequestAbortedError = $cKdp7.RequestAbortedError; -const $bdbe08f9735db95a$var$kListener = Symbol("kListener"); -const $bdbe08f9735db95a$var$kSignal = Symbol("kSignal"); -function $bdbe08f9735db95a$var$abort(self) { - if (self.abort) self.abort(); - else self.onError(new $bdbe08f9735db95a$require$RequestAbortedError()); -} -function $bdbe08f9735db95a$var$addSignal(self, signal) { - self[$bdbe08f9735db95a$var$kSignal] = null; - self[$bdbe08f9735db95a$var$kListener] = null; - if (!signal) return; - if (signal.aborted) { - $bdbe08f9735db95a$var$abort(self); - return; +parcelRegister("e1Ouk", function(module, exports) { +'use strict'; +/** + * @see https://encoding.spec.whatwg.org/#concept-encoding-get + * @param {string|undefined} label + */ function $a3685296ed8fcf28$var$getEncoding(label) { + if (!label) return 'failure'; + // 1. Remove any leading and trailing ASCII whitespace from label. + // 2. If label is an ASCII case-insensitive match for any of the + // labels listed in the table below, then return the + // corresponding encoding; otherwise return failure. + switch(label.trim().toLowerCase()){ + case 'unicode-1-1-utf-8': + case 'unicode11utf8': + case 'unicode20utf8': + case 'utf-8': + case 'utf8': + case 'x-unicode20utf8': + return 'UTF-8'; + case '866': + case 'cp866': + case 'csibm866': + case 'ibm866': + return 'IBM866'; + case 'csisolatin2': + case 'iso-8859-2': + case 'iso-ir-101': + case 'iso8859-2': + case 'iso88592': + case 'iso_8859-2': + case 'iso_8859-2:1987': + case 'l2': + case 'latin2': + return 'ISO-8859-2'; + case 'csisolatin3': + case 'iso-8859-3': + case 'iso-ir-109': + case 'iso8859-3': + case 'iso88593': + case 'iso_8859-3': + case 'iso_8859-3:1988': + case 'l3': + case 'latin3': + return 'ISO-8859-3'; + case 'csisolatin4': + case 'iso-8859-4': + case 'iso-ir-110': + case 'iso8859-4': + case 'iso88594': + case 'iso_8859-4': + case 'iso_8859-4:1988': + case 'l4': + case 'latin4': + return 'ISO-8859-4'; + case 'csisolatincyrillic': + case 'cyrillic': + case 'iso-8859-5': + case 'iso-ir-144': + case 'iso8859-5': + case 'iso88595': + case 'iso_8859-5': + case 'iso_8859-5:1988': + return 'ISO-8859-5'; + case 'arabic': + case 'asmo-708': + case 'csiso88596e': + case 'csiso88596i': + case 'csisolatinarabic': + case 'ecma-114': + case 'iso-8859-6': + case 'iso-8859-6-e': + case 'iso-8859-6-i': + case 'iso-ir-127': + case 'iso8859-6': + case 'iso88596': + case 'iso_8859-6': + case 'iso_8859-6:1987': + return 'ISO-8859-6'; + case 'csisolatingreek': + case 'ecma-118': + case 'elot_928': + case 'greek': + case 'greek8': + case 'iso-8859-7': + case 'iso-ir-126': + case 'iso8859-7': + case 'iso88597': + case 'iso_8859-7': + case 'iso_8859-7:1987': + case 'sun_eu_greek': + return 'ISO-8859-7'; + case 'csiso88598e': + case 'csisolatinhebrew': + case 'hebrew': + case 'iso-8859-8': + case 'iso-8859-8-e': + case 'iso-ir-138': + case 'iso8859-8': + case 'iso88598': + case 'iso_8859-8': + case 'iso_8859-8:1988': + case 'visual': + return 'ISO-8859-8'; + case 'csiso88598i': + case 'iso-8859-8-i': + case 'logical': + return 'ISO-8859-8-I'; + case 'csisolatin6': + case 'iso-8859-10': + case 'iso-ir-157': + case 'iso8859-10': + case 'iso885910': + case 'l6': + case 'latin6': + return 'ISO-8859-10'; + case 'iso-8859-13': + case 'iso8859-13': + case 'iso885913': + return 'ISO-8859-13'; + case 'iso-8859-14': + case 'iso8859-14': + case 'iso885914': + return 'ISO-8859-14'; + case 'csisolatin9': + case 'iso-8859-15': + case 'iso8859-15': + case 'iso885915': + case 'iso_8859-15': + case 'l9': + return 'ISO-8859-15'; + case 'iso-8859-16': + return 'ISO-8859-16'; + case 'cskoi8r': + case 'koi': + case 'koi8': + case 'koi8-r': + case 'koi8_r': + return 'KOI8-R'; + case 'koi8-ru': + case 'koi8-u': + return 'KOI8-U'; + case 'csmacintosh': + case 'mac': + case 'macintosh': + case 'x-mac-roman': + return 'macintosh'; + case 'iso-8859-11': + case 'iso8859-11': + case 'iso885911': + case 'tis-620': + case 'windows-874': + return 'windows-874'; + case 'cp1250': + case 'windows-1250': + case 'x-cp1250': + return 'windows-1250'; + case 'cp1251': + case 'windows-1251': + case 'x-cp1251': + return 'windows-1251'; + case 'ansi_x3.4-1968': + case 'ascii': + case 'cp1252': + case 'cp819': + case 'csisolatin1': + case 'ibm819': + case 'iso-8859-1': + case 'iso-ir-100': + case 'iso8859-1': + case 'iso88591': + case 'iso_8859-1': + case 'iso_8859-1:1987': + case 'l1': + case 'latin1': + case 'us-ascii': + case 'windows-1252': + case 'x-cp1252': + return 'windows-1252'; + case 'cp1253': + case 'windows-1253': + case 'x-cp1253': + return 'windows-1253'; + case 'cp1254': + case 'csisolatin5': + case 'iso-8859-9': + case 'iso-ir-148': + case 'iso8859-9': + case 'iso88599': + case 'iso_8859-9': + case 'iso_8859-9:1989': + case 'l5': + case 'latin5': + case 'windows-1254': + case 'x-cp1254': + return 'windows-1254'; + case 'cp1255': + case 'windows-1255': + case 'x-cp1255': + return 'windows-1255'; + case 'cp1256': + case 'windows-1256': + case 'x-cp1256': + return 'windows-1256'; + case 'cp1257': + case 'windows-1257': + case 'x-cp1257': + return 'windows-1257'; + case 'cp1258': + case 'windows-1258': + case 'x-cp1258': + return 'windows-1258'; + case 'x-mac-cyrillic': + case 'x-mac-ukrainian': + return 'x-mac-cyrillic'; + case 'chinese': + case 'csgb2312': + case 'csiso58gb231280': + case 'gb2312': + case 'gb_2312': + case 'gb_2312-80': + case 'gbk': + case 'iso-ir-58': + case 'x-gbk': + return 'GBK'; + case 'gb18030': + return 'gb18030'; + case 'big5': + case 'big5-hkscs': + case 'cn-big5': + case 'csbig5': + case 'x-x-big5': + return 'Big5'; + case 'cseucpkdfmtjapanese': + case 'euc-jp': + case 'x-euc-jp': + return 'EUC-JP'; + case 'csiso2022jp': + case 'iso-2022-jp': + return 'ISO-2022-JP'; + case 'csshiftjis': + case 'ms932': + case 'ms_kanji': + case 'shift-jis': + case 'shift_jis': + case 'sjis': + case 'windows-31j': + case 'x-sjis': + return 'Shift_JIS'; + case 'cseuckr': + case 'csksc56011987': + case 'euc-kr': + case 'iso-ir-149': + case 'korean': + case 'ks_c_5601-1987': + case 'ks_c_5601-1989': + case 'ksc5601': + case 'ksc_5601': + case 'windows-949': + return 'EUC-KR'; + case 'csiso2022kr': + case 'hz-gb-2312': + case 'iso-2022-cn': + case 'iso-2022-cn-ext': + case 'iso-2022-kr': + case 'replacement': + return 'replacement'; + case 'unicodefffe': + case 'utf-16be': + return 'UTF-16BE'; + case 'csunicode': + case 'iso-10646-ucs-2': + case 'ucs-2': + case 'unicode': + case 'unicodefeff': + case 'utf-16': + case 'utf-16le': + return 'UTF-16LE'; + case 'x-user-defined': + return 'x-user-defined'; + default: + return 'failure'; } - self[$bdbe08f9735db95a$var$kSignal] = signal; - self[$bdbe08f9735db95a$var$kListener] = ()=>{ - $bdbe08f9735db95a$var$abort(self); - }; - $bdbe08f9735db95a$require$addAbortListener(self[$bdbe08f9735db95a$var$kSignal], self[$bdbe08f9735db95a$var$kListener]); -} -function $bdbe08f9735db95a$var$removeSignal(self) { - if (!self[$bdbe08f9735db95a$var$kSignal]) return; - if ("removeEventListener" in self[$bdbe08f9735db95a$var$kSignal]) self[$bdbe08f9735db95a$var$kSignal].removeEventListener("abort", self[$bdbe08f9735db95a$var$kListener]); - else self[$bdbe08f9735db95a$var$kSignal].removeListener("abort", self[$bdbe08f9735db95a$var$kListener]); - self[$bdbe08f9735db95a$var$kSignal] = null; - self[$bdbe08f9735db95a$var$kListener] = null; } module.exports = { - addSignal: $bdbe08f9735db95a$var$addSignal, - removeSignal: $bdbe08f9735db95a$var$removeSignal + getEncoding: $a3685296ed8fcf28$var$getEncoding }; }); -parcelRegister("4AACW", function(module, exports) { -"use strict"; -var $3576ef9bc9c395e4$require$finished = $g40fK$stream.finished; -var $3576ef9bc9c395e4$require$PassThrough = $g40fK$stream.PassThrough; +parcelRegister("5Itbe", function(module, exports) { +'use strict'; -var $cKdp7 = parcelRequire("cKdp7"); -var $3576ef9bc9c395e4$require$InvalidArgumentError = $cKdp7.InvalidArgumentError; -var $3576ef9bc9c395e4$require$InvalidReturnValueError = $cKdp7.InvalidReturnValueError; -var $3576ef9bc9c395e4$require$RequestAbortedError = $cKdp7.RequestAbortedError; +var $5HTG7 = parcelRequire("5HTG7"); +var $4297b2642441f6dd$require$webidl = $5HTG7.webidl; -var $gv2nV = parcelRequire("gv2nV"); +var $30IsM = parcelRequire("30IsM"); +var $4297b2642441f6dd$require$URLSerializer = $30IsM.URLSerializer; -var $8G2SE = parcelRequire("8G2SE"); -var $3576ef9bc9c395e4$require$getResolveErrorBodyCallback = $8G2SE.getResolveErrorBodyCallback; +var $7z0I9 = parcelRequire("7z0I9"); +var $4297b2642441f6dd$require$environmentSettingsObject = $7z0I9.environmentSettingsObject; -var $3576ef9bc9c395e4$require$AsyncResource = $g40fK$async_hooks.AsyncResource; +var $lD59k = parcelRequire("lD59k"); +var $4297b2642441f6dd$require$staticPropertyDescriptors = $lD59k.staticPropertyDescriptors; +var $4297b2642441f6dd$require$states = $lD59k.states; +var $4297b2642441f6dd$require$sentCloseFrameState = $lD59k.sentCloseFrameState; +var $4297b2642441f6dd$require$sendHints = $lD59k.sendHints; -var $ghZCH = parcelRequire("ghZCH"); -var $3576ef9bc9c395e4$require$addSignal = $ghZCH.addSignal; -var $3576ef9bc9c395e4$require$removeSignal = $ghZCH.removeSignal; -class $3576ef9bc9c395e4$var$StreamHandler extends $3576ef9bc9c395e4$require$AsyncResource { - constructor(opts, factory, callback){ - if (!opts || typeof opts !== "object") throw new $3576ef9bc9c395e4$require$InvalidArgumentError("invalid opts"); - const { signal: signal, method: method, opaque: opaque, body: body, onInfo: onInfo, responseHeaders: responseHeaders, throwOnError: throwOnError } = opts; - try { - if (typeof callback !== "function") throw new $3576ef9bc9c395e4$require$InvalidArgumentError("invalid callback"); - if (typeof factory !== "function") throw new $3576ef9bc9c395e4$require$InvalidArgumentError("invalid factory"); - if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") throw new $3576ef9bc9c395e4$require$InvalidArgumentError("signal must be an EventEmitter or EventTarget"); - if (method === "CONNECT") throw new $3576ef9bc9c395e4$require$InvalidArgumentError("invalid method"); - if (onInfo && typeof onInfo !== "function") throw new $3576ef9bc9c395e4$require$InvalidArgumentError("invalid onInfo callback"); - super("UNDICI_STREAM"); - } catch (err) { - if ($gv2nV.isStream(body)) $gv2nV.destroy(body.on("error", $gv2nV.nop), err); - throw err; - } - this.responseHeaders = responseHeaders || null; - this.opaque = opaque || null; - this.factory = factory; - this.callback = callback; - this.res = null; - this.abort = null; - this.context = null; - this.trailers = null; - this.body = body; - this.onInfo = onInfo || null; - this.throwOnError = throwOnError || false; - if ($gv2nV.isStream(body)) body.on("error", (err)=>{ - this.onError(err); - }); - $3576ef9bc9c395e4$require$addSignal(this, signal); - } - onConnect(abort, context) { - if (!this.callback) throw new $3576ef9bc9c395e4$require$RequestAbortedError(); - this.abort = abort; - this.context = context; - } - onHeaders(statusCode, rawHeaders, resume, statusMessage) { - const { factory: factory, opaque: opaque, context: context, callback: callback, responseHeaders: responseHeaders } = this; - const headers = responseHeaders === "raw" ? $gv2nV.parseRawHeaders(rawHeaders) : $gv2nV.parseHeaders(rawHeaders); - if (statusCode < 200) { - if (this.onInfo) this.onInfo({ - statusCode: statusCode, - headers: headers - }); - return; - } - this.factory = null; - let res; - if (this.throwOnError && statusCode >= 400) { - const parsedHeaders = responseHeaders === "raw" ? $gv2nV.parseHeaders(rawHeaders) : headers; - const contentType = parsedHeaders["content-type"]; - res = new $3576ef9bc9c395e4$require$PassThrough(); - this.callback = null; - this.runInAsyncScope($3576ef9bc9c395e4$require$getResolveErrorBodyCallback, null, { - callback: callback, - body: res, - contentType: contentType, - statusCode: statusCode, - statusMessage: statusMessage, - headers: headers - }); - } else { - if (factory === null) return; - res = this.runInAsyncScope(factory, null, { - statusCode: statusCode, - headers: headers, - opaque: opaque, - context: context - }); - if (!res || typeof res.write !== "function" || typeof res.end !== "function" || typeof res.on !== "function") throw new $3576ef9bc9c395e4$require$InvalidReturnValueError("expected Writable"); - // TODO: Avoid finished. It registers an unnecessary amount of listeners. - $3576ef9bc9c395e4$require$finished(res, { - readable: false - }, (err)=>{ - const { callback: callback, res: res, opaque: opaque, trailers: trailers, abort: abort } = this; - this.res = null; - if (err || !res.readable) $gv2nV.destroy(res, err); - this.callback = null; - this.runInAsyncScope(callback, null, err || null, { - opaque: opaque, - trailers: trailers - }); - if (err) abort(); - }); - } - res.on("drain", resume); - this.res = res; - const needDrain = res.writableNeedDrain !== undefined ? res.writableNeedDrain : res._writableState && res._writableState.needDrain; - return needDrain !== true; - } - onData(chunk) { - const { res: res } = this; - return res ? res.write(chunk) : true; - } - onComplete(trailers) { - const { res: res } = this; - $3576ef9bc9c395e4$require$removeSignal(this); - if (!res) return; - this.trailers = $gv2nV.parseHeaders(trailers); - res.end(); - } - onError(err) { - const { res: res, callback: callback, opaque: opaque, body: body } = this; - $3576ef9bc9c395e4$require$removeSignal(this); - this.factory = null; - if (res) { - this.res = null; - $gv2nV.destroy(res, err); - } else if (callback) { - this.callback = null; - queueMicrotask(()=>{ - this.runInAsyncScope(callback, null, err, { - opaque: opaque - }); - }); - } - if (body) { - this.body = null; - $gv2nV.destroy(body, err); - } - } -} -function $3576ef9bc9c395e4$var$stream(opts, factory, callback) { - if (callback === undefined) return new Promise((resolve, reject)=>{ - $3576ef9bc9c395e4$var$stream.call(this, opts, factory, (err, data)=>{ - return err ? reject(err) : resolve(data); - }); - }); - try { - this.dispatch(opts, new $3576ef9bc9c395e4$var$StreamHandler(opts, factory, callback)); - } catch (err) { - if (typeof callback !== "function") throw err; - const opaque = opts && opts.opaque; - queueMicrotask(()=>callback(err, { - opaque: opaque - })); - } -} -module.exports = $3576ef9bc9c395e4$var$stream; +var $fjGba = parcelRequire("fjGba"); +var $4297b2642441f6dd$require$kWebSocketURL = $fjGba.kWebSocketURL; +var $4297b2642441f6dd$require$kReadyState = $fjGba.kReadyState; +var $4297b2642441f6dd$require$kController = $fjGba.kController; +var $4297b2642441f6dd$require$kBinaryType = $fjGba.kBinaryType; +var $4297b2642441f6dd$require$kResponse = $fjGba.kResponse; +var $4297b2642441f6dd$require$kSentClose = $fjGba.kSentClose; +var $4297b2642441f6dd$require$kByteParser = $fjGba.kByteParser; -}); +var $coFSg = parcelRequire("coFSg"); +var $4297b2642441f6dd$require$isConnecting = $coFSg.isConnecting; +var $4297b2642441f6dd$require$isEstablished = $coFSg.isEstablished; +var $4297b2642441f6dd$require$isClosing = $coFSg.isClosing; +var $4297b2642441f6dd$require$isValidSubprotocol = $coFSg.isValidSubprotocol; +var $4297b2642441f6dd$require$fireEvent = $coFSg.fireEvent; -parcelRegister("70G9w", function(module, exports) { -"use strict"; +var $dIZUQ = parcelRequire("dIZUQ"); +var $4297b2642441f6dd$require$establishWebSocketConnection = $dIZUQ.establishWebSocketConnection; +var $4297b2642441f6dd$require$closeWebSocketConnection = $dIZUQ.closeWebSocketConnection; -var $51a93b171c6bbfe8$require$Readable = $g40fK$stream.Readable; -var $51a93b171c6bbfe8$require$Duplex = $g40fK$stream.Duplex; -var $51a93b171c6bbfe8$require$PassThrough = $g40fK$stream.PassThrough; +var $jppK0 = parcelRequire("jppK0"); +var $4297b2642441f6dd$require$ByteParser = $jppK0.ByteParser; -var $cKdp7 = parcelRequire("cKdp7"); -var $51a93b171c6bbfe8$require$InvalidArgumentError = $cKdp7.InvalidArgumentError; -var $51a93b171c6bbfe8$require$InvalidReturnValueError = $cKdp7.InvalidReturnValueError; -var $51a93b171c6bbfe8$require$RequestAbortedError = $cKdp7.RequestAbortedError; +var $bFRvW = parcelRequire("bFRvW"); +var $4297b2642441f6dd$require$kEnumerableProperty = $bFRvW.kEnumerableProperty; +var $4297b2642441f6dd$require$isBlobLike = $bFRvW.isBlobLike; -var $gv2nV = parcelRequire("gv2nV"); +var $A4fmv = parcelRequire("A4fmv"); +var $4297b2642441f6dd$require$getGlobalDispatcher = $A4fmv.getGlobalDispatcher; -var $51a93b171c6bbfe8$require$AsyncResource = $g40fK$async_hooks.AsyncResource; +var $4297b2642441f6dd$require$types = $in2sP$nodeutil.types; -var $ghZCH = parcelRequire("ghZCH"); -var $51a93b171c6bbfe8$require$addSignal = $ghZCH.addSignal; -var $51a93b171c6bbfe8$require$removeSignal = $ghZCH.removeSignal; +var $O7XfC = parcelRequire("O7XfC"); +var $4297b2642441f6dd$require$ErrorEvent = $O7XfC.ErrorEvent; +var $4297b2642441f6dd$require$CloseEvent = $O7XfC.CloseEvent; -const $51a93b171c6bbfe8$var$kResume = Symbol("resume"); -class $51a93b171c6bbfe8$var$PipelineRequest extends $51a93b171c6bbfe8$require$Readable { - constructor(){ - super({ - autoDestroy: true +var $iWDVb = parcelRequire("iWDVb"); +var $4297b2642441f6dd$require$SendQueue = $iWDVb.SendQueue; +// https://websockets.spec.whatwg.org/#interface-definition +class $4297b2642441f6dd$var$WebSocket extends EventTarget { + #events = { + open: null, + error: null, + close: null, + message: null + }; + #bufferedAmount = 0; + #protocol = ''; + #extensions = ''; + /** @type {SendQueue} */ #sendQueue; + /** + * @param {string} url + * @param {string|string[]} protocols + */ constructor(url, protocols = []){ + super(); + $4297b2642441f6dd$require$webidl.util.markAsUncloneable(this); + const prefix = 'WebSocket constructor'; + $4297b2642441f6dd$require$webidl.argumentLengthCheck(arguments, 1, prefix); + const options = $4297b2642441f6dd$require$webidl.converters['DOMString or sequence or WebSocketInit'](protocols, prefix, 'options'); + url = $4297b2642441f6dd$require$webidl.converters.USVString(url, prefix, 'url'); + protocols = options.protocols; + // 1. Let baseURL be this's relevant settings object's API base URL. + const baseURL = $4297b2642441f6dd$require$environmentSettingsObject.settingsObject.baseUrl; + // 1. Let urlRecord be the result of applying the URL parser to url with baseURL. + let urlRecord; + try { + urlRecord = new URL(url, baseURL); + } catch (e) { + // 3. If urlRecord is failure, then throw a "SyntaxError" DOMException. + throw new DOMException(e, 'SyntaxError'); + } + // 4. If urlRecord’s scheme is "http", then set urlRecord’s scheme to "ws". + if (urlRecord.protocol === 'http:') urlRecord.protocol = 'ws:'; + else if (urlRecord.protocol === 'https:') // 5. Otherwise, if urlRecord’s scheme is "https", set urlRecord’s scheme to "wss". + urlRecord.protocol = 'wss:'; + // 6. If urlRecord’s scheme is not "ws" or "wss", then throw a "SyntaxError" DOMException. + if (urlRecord.protocol !== 'ws:' && urlRecord.protocol !== 'wss:') throw new DOMException(`Expected a ws: or wss: protocol, got ${urlRecord.protocol}`, 'SyntaxError'); + // 7. If urlRecord’s fragment is non-null, then throw a "SyntaxError" + // DOMException. + if (urlRecord.hash || urlRecord.href.endsWith('#')) throw new DOMException('Got fragment', 'SyntaxError'); + // 8. If protocols is a string, set protocols to a sequence consisting + // of just that string. + if (typeof protocols === 'string') protocols = [ + protocols + ]; + // 9. If any of the values in protocols occur more than once or otherwise + // fail to match the requirements for elements that comprise the value + // of `Sec-WebSocket-Protocol` fields as defined by The WebSocket + // protocol, then throw a "SyntaxError" DOMException. + if (protocols.length !== new Set(protocols.map((p)=>p.toLowerCase())).size) throw new DOMException('Invalid Sec-WebSocket-Protocol value', 'SyntaxError'); + if (protocols.length > 0 && !protocols.every((p)=>$4297b2642441f6dd$require$isValidSubprotocol(p))) throw new DOMException('Invalid Sec-WebSocket-Protocol value', 'SyntaxError'); + // 10. Set this's url to urlRecord. + this[$4297b2642441f6dd$require$kWebSocketURL] = new URL(urlRecord.href); + // 11. Let client be this's relevant settings object. + const client = $4297b2642441f6dd$require$environmentSettingsObject.settingsObject; + // 12. Run this step in parallel: + // 1. Establish a WebSocket connection given urlRecord, protocols, + // and client. + this[$4297b2642441f6dd$require$kController] = $4297b2642441f6dd$require$establishWebSocketConnection(urlRecord, protocols, client, this, (response, extensions)=>this.#onConnectionEstablished(response, extensions), options); + // Each WebSocket object has an associated ready state, which is a + // number representing the state of the connection. Initially it must + // be CONNECTING (0). + this[$4297b2642441f6dd$require$kReadyState] = $4297b2642441f6dd$var$WebSocket.CONNECTING; + this[$4297b2642441f6dd$require$kSentClose] = $4297b2642441f6dd$require$sentCloseFrameState.NOT_SENT; + // The extensions attribute must initially return the empty string. + // The protocol attribute must initially return the empty string. + // Each WebSocket object has an associated binary type, which is a + // BinaryType. Initially it must be "blob". + this[$4297b2642441f6dd$require$kBinaryType] = 'blob'; + } + /** + * @see https://websockets.spec.whatwg.org/#dom-websocket-close + * @param {number|undefined} code + * @param {string|undefined} reason + */ close(code, reason) { + $4297b2642441f6dd$require$webidl.brandCheck(this, $4297b2642441f6dd$var$WebSocket); + const prefix = 'WebSocket.close'; + if (code !== undefined) code = $4297b2642441f6dd$require$webidl.converters['unsigned short'](code, prefix, 'code', { + clamp: true }); - this[$51a93b171c6bbfe8$var$kResume] = null; + if (reason !== undefined) reason = $4297b2642441f6dd$require$webidl.converters.USVString(reason, prefix, 'reason'); + // 1. If code is present, but is neither an integer equal to 1000 nor an + // integer in the range 3000 to 4999, inclusive, throw an + // "InvalidAccessError" DOMException. + if (code !== undefined) { + if (code !== 1000 && (code < 3000 || code > 4999)) throw new DOMException('invalid code', 'InvalidAccessError'); + } + let reasonByteLength = 0; + // 2. If reason is present, then run these substeps: + if (reason !== undefined) { + // 1. Let reasonBytes be the result of encoding reason. + // 2. If reasonBytes is longer than 123 bytes, then throw a + // "SyntaxError" DOMException. + reasonByteLength = Buffer.byteLength(reason); + if (reasonByteLength > 123) throw new DOMException(`Reason must be less than 123 bytes; received ${reasonByteLength}`, 'SyntaxError'); + } + // 3. Run the first matching steps from the following list: + $4297b2642441f6dd$require$closeWebSocketConnection(this, code, reason, reasonByteLength); } - _read() { - const { [$51a93b171c6bbfe8$var$kResume]: resume } = this; - if (resume) { - this[$51a93b171c6bbfe8$var$kResume] = null; - resume(); + /** + * @see https://websockets.spec.whatwg.org/#dom-websocket-send + * @param {NodeJS.TypedArray|ArrayBuffer|Blob|string} data + */ send(data) { + $4297b2642441f6dd$require$webidl.brandCheck(this, $4297b2642441f6dd$var$WebSocket); + const prefix = 'WebSocket.send'; + $4297b2642441f6dd$require$webidl.argumentLengthCheck(arguments, 1, prefix); + data = $4297b2642441f6dd$require$webidl.converters.WebSocketSendData(data, prefix, 'data'); + // 1. If this's ready state is CONNECTING, then throw an + // "InvalidStateError" DOMException. + if ($4297b2642441f6dd$require$isConnecting(this)) throw new DOMException('Sent before connected.', 'InvalidStateError'); + // 2. Run the appropriate set of steps from the following list: + // https://datatracker.ietf.org/doc/html/rfc6455#section-6.1 + // https://datatracker.ietf.org/doc/html/rfc6455#section-5.2 + if (!$4297b2642441f6dd$require$isEstablished(this) || $4297b2642441f6dd$require$isClosing(this)) return; + // If data is a string + if (typeof data === 'string') { + // If the WebSocket connection is established and the WebSocket + // closing handshake has not yet started, then the user agent + // must send a WebSocket Message comprised of the data argument + // using a text frame opcode; if the data cannot be sent, e.g. + // because it would need to be buffered but the buffer is full, + // the user agent must flag the WebSocket as full and then close + // the WebSocket connection. Any invocation of this method with a + // string argument that does not throw an exception must increase + // the bufferedAmount attribute by the number of bytes needed to + // express the argument as UTF-8. + const length = Buffer.byteLength(data); + this.#bufferedAmount += length; + this.#sendQueue.add(data, ()=>{ + this.#bufferedAmount -= length; + }, $4297b2642441f6dd$require$sendHints.string); + } else if ($4297b2642441f6dd$require$types.isArrayBuffer(data)) { + // If the WebSocket connection is established, and the WebSocket + // closing handshake has not yet started, then the user agent must + // send a WebSocket Message comprised of data using a binary frame + // opcode; if the data cannot be sent, e.g. because it would need + // to be buffered but the buffer is full, the user agent must flag + // the WebSocket as full and then close the WebSocket connection. + // The data to be sent is the data stored in the buffer described + // by the ArrayBuffer object. Any invocation of this method with an + // ArrayBuffer argument that does not throw an exception must + // increase the bufferedAmount attribute by the length of the + // ArrayBuffer in bytes. + this.#bufferedAmount += data.byteLength; + this.#sendQueue.add(data, ()=>{ + this.#bufferedAmount -= data.byteLength; + }, $4297b2642441f6dd$require$sendHints.arrayBuffer); + } else if (ArrayBuffer.isView(data)) { + // If the WebSocket connection is established, and the WebSocket + // closing handshake has not yet started, then the user agent must + // send a WebSocket Message comprised of data using a binary frame + // opcode; if the data cannot be sent, e.g. because it would need to + // be buffered but the buffer is full, the user agent must flag the + // WebSocket as full and then close the WebSocket connection. The + // data to be sent is the data stored in the section of the buffer + // described by the ArrayBuffer object that data references. Any + // invocation of this method with this kind of argument that does + // not throw an exception must increase the bufferedAmount attribute + // by the length of data’s buffer in bytes. + this.#bufferedAmount += data.byteLength; + this.#sendQueue.add(data, ()=>{ + this.#bufferedAmount -= data.byteLength; + }, $4297b2642441f6dd$require$sendHints.typedArray); + } else if ($4297b2642441f6dd$require$isBlobLike(data)) { + // If the WebSocket connection is established, and the WebSocket + // closing handshake has not yet started, then the user agent must + // send a WebSocket Message comprised of data using a binary frame + // opcode; if the data cannot be sent, e.g. because it would need to + // be buffered but the buffer is full, the user agent must flag the + // WebSocket as full and then close the WebSocket connection. The data + // to be sent is the raw data represented by the Blob object. Any + // invocation of this method with a Blob argument that does not throw + // an exception must increase the bufferedAmount attribute by the size + // of the Blob object’s raw data, in bytes. + this.#bufferedAmount += data.size; + this.#sendQueue.add(data, ()=>{ + this.#bufferedAmount -= data.size; + }, $4297b2642441f6dd$require$sendHints.blob); } } - _destroy(err, callback) { - this._read(); - callback(err); - } -} -class $51a93b171c6bbfe8$var$PipelineResponse extends $51a93b171c6bbfe8$require$Readable { - constructor(resume){ - super({ - autoDestroy: true - }); - this[$51a93b171c6bbfe8$var$kResume] = resume; + get readyState() { + $4297b2642441f6dd$require$webidl.brandCheck(this, $4297b2642441f6dd$var$WebSocket); + // The readyState getter steps are to return this's ready state. + return this[$4297b2642441f6dd$require$kReadyState]; } - _read() { - this[$51a93b171c6bbfe8$var$kResume](); + get bufferedAmount() { + $4297b2642441f6dd$require$webidl.brandCheck(this, $4297b2642441f6dd$var$WebSocket); + return this.#bufferedAmount; } - _destroy(err, callback) { - if (!err && !this._readableState.endEmitted) err = new $51a93b171c6bbfe8$require$RequestAbortedError(); - callback(err); + get url() { + $4297b2642441f6dd$require$webidl.brandCheck(this, $4297b2642441f6dd$var$WebSocket); + // The url getter steps are to return this's url, serialized. + return $4297b2642441f6dd$require$URLSerializer(this[$4297b2642441f6dd$require$kWebSocketURL]); } -} -class $51a93b171c6bbfe8$var$PipelineHandler extends $51a93b171c6bbfe8$require$AsyncResource { - constructor(opts, handler){ - if (!opts || typeof opts !== "object") throw new $51a93b171c6bbfe8$require$InvalidArgumentError("invalid opts"); - if (typeof handler !== "function") throw new $51a93b171c6bbfe8$require$InvalidArgumentError("invalid handler"); - const { signal: signal, method: method, opaque: opaque, onInfo: onInfo, responseHeaders: responseHeaders } = opts; - if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") throw new $51a93b171c6bbfe8$require$InvalidArgumentError("signal must be an EventEmitter or EventTarget"); - if (method === "CONNECT") throw new $51a93b171c6bbfe8$require$InvalidArgumentError("invalid method"); - if (onInfo && typeof onInfo !== "function") throw new $51a93b171c6bbfe8$require$InvalidArgumentError("invalid onInfo callback"); - super("UNDICI_PIPELINE"); - this.opaque = opaque || null; - this.responseHeaders = responseHeaders || null; - this.handler = handler; - this.abort = null; - this.context = null; - this.onInfo = onInfo || null; - this.req = new $51a93b171c6bbfe8$var$PipelineRequest().on("error", $gv2nV.nop); - this.ret = new $51a93b171c6bbfe8$require$Duplex({ - readableObjectMode: opts.objectMode, - autoDestroy: true, - read: ()=>{ - const { body: body } = this; - if (body && body.resume) body.resume(); - }, - write: (chunk, encoding, callback)=>{ - const { req: req } = this; - if (req.push(chunk, encoding) || req._readableState.destroyed) callback(); - else req[$51a93b171c6bbfe8$var$kResume] = callback; - }, - destroy: (err, callback)=>{ - const { body: body, req: req, res: res, ret: ret, abort: abort } = this; - if (!err && !ret._readableState.endEmitted) err = new $51a93b171c6bbfe8$require$RequestAbortedError(); - if (abort && err) abort(); - $gv2nV.destroy(body, err); - $gv2nV.destroy(req, err); - $gv2nV.destroy(res, err); - $51a93b171c6bbfe8$require$removeSignal(this); - callback(err); - } - }).on("prefinish", ()=>{ - const { req: req } = this; - // Node < 15 does not call _final in same tick. - req.push(null); - }); - this.res = null; - $51a93b171c6bbfe8$require$addSignal(this, signal); + get extensions() { + $4297b2642441f6dd$require$webidl.brandCheck(this, $4297b2642441f6dd$var$WebSocket); + return this.#extensions; } - onConnect(abort, context) { - const { ret: ret, res: res } = this; - $g40fK$assert(!res, "pipeline cannot be retried"); - if (ret.destroyed) throw new $51a93b171c6bbfe8$require$RequestAbortedError(); - this.abort = abort; - this.context = context; + get protocol() { + $4297b2642441f6dd$require$webidl.brandCheck(this, $4297b2642441f6dd$var$WebSocket); + return this.#protocol; } - onHeaders(statusCode, rawHeaders, resume) { - const { opaque: opaque, handler: handler, context: context } = this; - if (statusCode < 200) { - if (this.onInfo) { - const headers = this.responseHeaders === "raw" ? $gv2nV.parseRawHeaders(rawHeaders) : $gv2nV.parseHeaders(rawHeaders); - this.onInfo({ - statusCode: statusCode, - headers: headers - }); - } - return; - } - this.res = new $51a93b171c6bbfe8$var$PipelineResponse(resume); - let body; - try { - this.handler = null; - const headers = this.responseHeaders === "raw" ? $gv2nV.parseRawHeaders(rawHeaders) : $gv2nV.parseHeaders(rawHeaders); - body = this.runInAsyncScope(handler, null, { - statusCode: statusCode, - headers: headers, - opaque: opaque, - body: this.res, - context: context - }); - } catch (err) { - this.res.on("error", $gv2nV.nop); - throw err; - } - if (!body || typeof body.on !== "function") throw new $51a93b171c6bbfe8$require$InvalidReturnValueError("expected Readable"); - body.on("data", (chunk)=>{ - const { ret: ret, body: body } = this; - if (!ret.push(chunk) && body.pause) body.pause(); - }).on("error", (err)=>{ - const { ret: ret } = this; - $gv2nV.destroy(ret, err); - }).on("end", ()=>{ - const { ret: ret } = this; - ret.push(null); - }).on("close", ()=>{ - const { ret: ret } = this; - if (!ret._readableState.ended) $gv2nV.destroy(ret, new $51a93b171c6bbfe8$require$RequestAbortedError()); - }); - this.body = body; + get onopen() { + $4297b2642441f6dd$require$webidl.brandCheck(this, $4297b2642441f6dd$var$WebSocket); + return this.#events.open; } - onData(chunk) { - const { res: res } = this; - return res.push(chunk); + set onopen(fn) { + $4297b2642441f6dd$require$webidl.brandCheck(this, $4297b2642441f6dd$var$WebSocket); + if (this.#events.open) this.removeEventListener('open', this.#events.open); + if (typeof fn === 'function') { + this.#events.open = fn; + this.addEventListener('open', fn); + } else this.#events.open = null; } - onComplete(trailers) { - const { res: res } = this; - res.push(null); + get onerror() { + $4297b2642441f6dd$require$webidl.brandCheck(this, $4297b2642441f6dd$var$WebSocket); + return this.#events.error; } - onError(err) { - const { ret: ret } = this; - this.handler = null; - $gv2nV.destroy(ret, err); + set onerror(fn) { + $4297b2642441f6dd$require$webidl.brandCheck(this, $4297b2642441f6dd$var$WebSocket); + if (this.#events.error) this.removeEventListener('error', this.#events.error); + if (typeof fn === 'function') { + this.#events.error = fn; + this.addEventListener('error', fn); + } else this.#events.error = null; } -} -function $51a93b171c6bbfe8$var$pipeline(opts, handler) { - try { - const pipelineHandler = new $51a93b171c6bbfe8$var$PipelineHandler(opts, handler); - this.dispatch({ - ...opts, - body: pipelineHandler.req - }, pipelineHandler); - return pipelineHandler.ret; - } catch (err) { - return new $51a93b171c6bbfe8$require$PassThrough().destroy(err); + get onclose() { + $4297b2642441f6dd$require$webidl.brandCheck(this, $4297b2642441f6dd$var$WebSocket); + return this.#events.close; } -} -module.exports = $51a93b171c6bbfe8$var$pipeline; - -}); - -parcelRegister("3FKwS", function(module, exports) { -"use strict"; - -var $cKdp7 = parcelRequire("cKdp7"); -var $2ac94b2ef4c9cfda$require$InvalidArgumentError = $cKdp7.InvalidArgumentError; -var $2ac94b2ef4c9cfda$require$RequestAbortedError = $cKdp7.RequestAbortedError; -var $2ac94b2ef4c9cfda$require$SocketError = $cKdp7.SocketError; - -var $2ac94b2ef4c9cfda$require$AsyncResource = $g40fK$async_hooks.AsyncResource; - -var $gv2nV = parcelRequire("gv2nV"); - -var $ghZCH = parcelRequire("ghZCH"); -var $2ac94b2ef4c9cfda$require$addSignal = $ghZCH.addSignal; -var $2ac94b2ef4c9cfda$require$removeSignal = $ghZCH.removeSignal; - -class $2ac94b2ef4c9cfda$var$UpgradeHandler extends $2ac94b2ef4c9cfda$require$AsyncResource { - constructor(opts, callback){ - if (!opts || typeof opts !== "object") throw new $2ac94b2ef4c9cfda$require$InvalidArgumentError("invalid opts"); - if (typeof callback !== "function") throw new $2ac94b2ef4c9cfda$require$InvalidArgumentError("invalid callback"); - const { signal: signal, opaque: opaque, responseHeaders: responseHeaders } = opts; - if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") throw new $2ac94b2ef4c9cfda$require$InvalidArgumentError("signal must be an EventEmitter or EventTarget"); - super("UNDICI_UPGRADE"); - this.responseHeaders = responseHeaders || null; - this.opaque = opaque || null; - this.callback = callback; - this.abort = null; - this.context = null; - $2ac94b2ef4c9cfda$require$addSignal(this, signal); + set onclose(fn) { + $4297b2642441f6dd$require$webidl.brandCheck(this, $4297b2642441f6dd$var$WebSocket); + if (this.#events.close) this.removeEventListener('close', this.#events.close); + if (typeof fn === 'function') { + this.#events.close = fn; + this.addEventListener('close', fn); + } else this.#events.close = null; } - onConnect(abort, context) { - if (!this.callback) throw new $2ac94b2ef4c9cfda$require$RequestAbortedError(); - this.abort = abort; - this.context = null; + get onmessage() { + $4297b2642441f6dd$require$webidl.brandCheck(this, $4297b2642441f6dd$var$WebSocket); + return this.#events.message; } - onHeaders() { - throw new $2ac94b2ef4c9cfda$require$SocketError("bad upgrade", null); + set onmessage(fn) { + $4297b2642441f6dd$require$webidl.brandCheck(this, $4297b2642441f6dd$var$WebSocket); + if (this.#events.message) this.removeEventListener('message', this.#events.message); + if (typeof fn === 'function') { + this.#events.message = fn; + this.addEventListener('message', fn); + } else this.#events.message = null; } - onUpgrade(statusCode, rawHeaders, socket) { - const { callback: callback, opaque: opaque, context: context } = this; - $g40fK$assert.strictEqual(statusCode, 101); - $2ac94b2ef4c9cfda$require$removeSignal(this); - this.callback = null; - const headers = this.responseHeaders === "raw" ? $gv2nV.parseRawHeaders(rawHeaders) : $gv2nV.parseHeaders(rawHeaders); - this.runInAsyncScope(callback, null, null, { - headers: headers, - socket: socket, - opaque: opaque, - context: context - }); + get binaryType() { + $4297b2642441f6dd$require$webidl.brandCheck(this, $4297b2642441f6dd$var$WebSocket); + return this[$4297b2642441f6dd$require$kBinaryType]; } - onError(err) { - const { callback: callback, opaque: opaque } = this; - $2ac94b2ef4c9cfda$require$removeSignal(this); - if (callback) { - this.callback = null; - queueMicrotask(()=>{ - this.runInAsyncScope(callback, null, err, { - opaque: opaque - }); - }); - } + set binaryType(type) { + $4297b2642441f6dd$require$webidl.brandCheck(this, $4297b2642441f6dd$var$WebSocket); + if (type !== 'blob' && type !== 'arraybuffer') this[$4297b2642441f6dd$require$kBinaryType] = 'blob'; + else this[$4297b2642441f6dd$require$kBinaryType] = type; } -} -function $2ac94b2ef4c9cfda$var$upgrade(opts, callback) { - if (callback === undefined) return new Promise((resolve, reject)=>{ - $2ac94b2ef4c9cfda$var$upgrade.call(this, opts, (err, data)=>{ - return err ? reject(err) : resolve(data); + /** + * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol + */ #onConnectionEstablished(response, parsedExtensions) { + // processResponse is called when the "response's header list has been received and initialized." + // once this happens, the connection is open + this[$4297b2642441f6dd$require$kResponse] = response; + const webSocketOptions = this[$4297b2642441f6dd$require$kController]?.dispatcher?.webSocketOptions; + const maxFragments = webSocketOptions?.maxFragments; + const maxPayloadSize = webSocketOptions?.maxPayloadSize; + const parser = new $4297b2642441f6dd$require$ByteParser(this, parsedExtensions, { + maxFragments: maxFragments, + maxPayloadSize: maxPayloadSize }); - }); - try { - const upgradeHandler = new $2ac94b2ef4c9cfda$var$UpgradeHandler(opts, callback); - this.dispatch({ - ...opts, - method: opts.method || "GET", - upgrade: opts.protocol || "Websocket" - }, upgradeHandler); - } catch (err) { - if (typeof callback !== "function") throw err; - const opaque = opts && opts.opaque; - queueMicrotask(()=>callback(err, { - opaque: opaque - })); + parser.on('drain', $4297b2642441f6dd$var$onParserDrain); + parser.on('error', $4297b2642441f6dd$var$onParserError.bind(this)); + response.socket.ws = this; + this[$4297b2642441f6dd$require$kByteParser] = parser; + this.#sendQueue = new $4297b2642441f6dd$require$SendQueue(response.socket); + // 1. Change the ready state to OPEN (1). + this[$4297b2642441f6dd$require$kReadyState] = $4297b2642441f6dd$require$states.OPEN; + // 2. Change the extensions attribute’s value to the extensions in use, if + // it is not the null value. + // https://datatracker.ietf.org/doc/html/rfc6455#section-9.1 + const extensions = response.headersList.get('sec-websocket-extensions'); + if (extensions !== null) this.#extensions = extensions; + // 3. Change the protocol attribute’s value to the subprotocol in use, if + // it is not the null value. + // https://datatracker.ietf.org/doc/html/rfc6455#section-1.9 + const protocol = response.headersList.get('sec-websocket-protocol'); + if (protocol !== null) this.#protocol = protocol; + // 4. Fire an event named open at the WebSocket object. + $4297b2642441f6dd$require$fireEvent('open', this); } } -module.exports = $2ac94b2ef4c9cfda$var$upgrade; - -}); - -parcelRegister("hWLgo", function(module, exports) { -"use strict"; - -var $d10c83f887c4c692$require$AsyncResource = $g40fK$async_hooks.AsyncResource; - -var $cKdp7 = parcelRequire("cKdp7"); -var $d10c83f887c4c692$require$InvalidArgumentError = $cKdp7.InvalidArgumentError; -var $d10c83f887c4c692$require$RequestAbortedError = $cKdp7.RequestAbortedError; -var $d10c83f887c4c692$require$SocketError = $cKdp7.SocketError; - -var $gv2nV = parcelRequire("gv2nV"); - -var $ghZCH = parcelRequire("ghZCH"); -var $d10c83f887c4c692$require$addSignal = $ghZCH.addSignal; -var $d10c83f887c4c692$require$removeSignal = $ghZCH.removeSignal; -class $d10c83f887c4c692$var$ConnectHandler extends $d10c83f887c4c692$require$AsyncResource { - constructor(opts, callback){ - if (!opts || typeof opts !== "object") throw new $d10c83f887c4c692$require$InvalidArgumentError("invalid opts"); - if (typeof callback !== "function") throw new $d10c83f887c4c692$require$InvalidArgumentError("invalid callback"); - const { signal: signal, opaque: opaque, responseHeaders: responseHeaders } = opts; - if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") throw new $d10c83f887c4c692$require$InvalidArgumentError("signal must be an EventEmitter or EventTarget"); - super("UNDICI_CONNECT"); - this.opaque = opaque || null; - this.responseHeaders = responseHeaders || null; - this.callback = callback; - this.abort = null; - $d10c83f887c4c692$require$addSignal(this, signal); - } - onConnect(abort, context) { - if (!this.callback) throw new $d10c83f887c4c692$require$RequestAbortedError(); - this.abort = abort; - this.context = context; - } - onHeaders() { - throw new $d10c83f887c4c692$require$SocketError("bad connect", null); - } - onUpgrade(statusCode, rawHeaders, socket) { - const { callback: callback, opaque: opaque, context: context } = this; - $d10c83f887c4c692$require$removeSignal(this); - this.callback = null; - let headers = rawHeaders; - // Indicates is an HTTP2Session - if (headers != null) headers = this.responseHeaders === "raw" ? $gv2nV.parseRawHeaders(rawHeaders) : $gv2nV.parseHeaders(rawHeaders); - this.runInAsyncScope(callback, null, null, { - statusCode: statusCode, - headers: headers, - socket: socket, - opaque: opaque, - context: context - }); +// https://websockets.spec.whatwg.org/#dom-websocket-connecting +$4297b2642441f6dd$var$WebSocket.CONNECTING = $4297b2642441f6dd$var$WebSocket.prototype.CONNECTING = $4297b2642441f6dd$require$states.CONNECTING; +// https://websockets.spec.whatwg.org/#dom-websocket-open +$4297b2642441f6dd$var$WebSocket.OPEN = $4297b2642441f6dd$var$WebSocket.prototype.OPEN = $4297b2642441f6dd$require$states.OPEN; +// https://websockets.spec.whatwg.org/#dom-websocket-closing +$4297b2642441f6dd$var$WebSocket.CLOSING = $4297b2642441f6dd$var$WebSocket.prototype.CLOSING = $4297b2642441f6dd$require$states.CLOSING; +// https://websockets.spec.whatwg.org/#dom-websocket-closed +$4297b2642441f6dd$var$WebSocket.CLOSED = $4297b2642441f6dd$var$WebSocket.prototype.CLOSED = $4297b2642441f6dd$require$states.CLOSED; +Object.defineProperties($4297b2642441f6dd$var$WebSocket.prototype, { + CONNECTING: $4297b2642441f6dd$require$staticPropertyDescriptors, + OPEN: $4297b2642441f6dd$require$staticPropertyDescriptors, + CLOSING: $4297b2642441f6dd$require$staticPropertyDescriptors, + CLOSED: $4297b2642441f6dd$require$staticPropertyDescriptors, + url: $4297b2642441f6dd$require$kEnumerableProperty, + readyState: $4297b2642441f6dd$require$kEnumerableProperty, + bufferedAmount: $4297b2642441f6dd$require$kEnumerableProperty, + onopen: $4297b2642441f6dd$require$kEnumerableProperty, + onerror: $4297b2642441f6dd$require$kEnumerableProperty, + onclose: $4297b2642441f6dd$require$kEnumerableProperty, + close: $4297b2642441f6dd$require$kEnumerableProperty, + onmessage: $4297b2642441f6dd$require$kEnumerableProperty, + binaryType: $4297b2642441f6dd$require$kEnumerableProperty, + send: $4297b2642441f6dd$require$kEnumerableProperty, + extensions: $4297b2642441f6dd$require$kEnumerableProperty, + protocol: $4297b2642441f6dd$require$kEnumerableProperty, + [Symbol.toStringTag]: { + value: 'WebSocket', + writable: false, + enumerable: false, + configurable: true } - onError(err) { - const { callback: callback, opaque: opaque } = this; - $d10c83f887c4c692$require$removeSignal(this); - if (callback) { - this.callback = null; - queueMicrotask(()=>{ - this.runInAsyncScope(callback, null, err, { - opaque: opaque - }); - }); - } +}); +Object.defineProperties($4297b2642441f6dd$var$WebSocket, { + CONNECTING: $4297b2642441f6dd$require$staticPropertyDescriptors, + OPEN: $4297b2642441f6dd$require$staticPropertyDescriptors, + CLOSING: $4297b2642441f6dd$require$staticPropertyDescriptors, + CLOSED: $4297b2642441f6dd$require$staticPropertyDescriptors +}); +$4297b2642441f6dd$require$webidl.converters['sequence'] = $4297b2642441f6dd$require$webidl.sequenceConverter($4297b2642441f6dd$require$webidl.converters.DOMString); +$4297b2642441f6dd$require$webidl.converters['DOMString or sequence'] = function(V, prefix, argument) { + if ($4297b2642441f6dd$require$webidl.util.Type(V) === 'Object' && Symbol.iterator in V) return $4297b2642441f6dd$require$webidl.converters['sequence'](V); + return $4297b2642441f6dd$require$webidl.converters.DOMString(V, prefix, argument); +}; +// This implements the proposal made in https://github.com/whatwg/websockets/issues/42 +$4297b2642441f6dd$require$webidl.converters.WebSocketInit = $4297b2642441f6dd$require$webidl.dictionaryConverter([ + { + key: 'protocols', + converter: $4297b2642441f6dd$require$webidl.converters['DOMString or sequence'], + defaultValue: ()=>new Array(0) + }, + { + key: 'dispatcher', + converter: $4297b2642441f6dd$require$webidl.converters.any, + defaultValue: ()=>$4297b2642441f6dd$require$getGlobalDispatcher() + }, + { + key: 'headers', + converter: $4297b2642441f6dd$require$webidl.nullableConverter($4297b2642441f6dd$require$webidl.converters.HeadersInit) } -} -function $d10c83f887c4c692$var$connect(opts, callback) { - if (callback === undefined) return new Promise((resolve, reject)=>{ - $d10c83f887c4c692$var$connect.call(this, opts, (err, data)=>{ - return err ? reject(err) : resolve(data); +]); +$4297b2642441f6dd$require$webidl.converters['DOMString or sequence or WebSocketInit'] = function(V) { + if ($4297b2642441f6dd$require$webidl.util.Type(V) === 'Object' && !(Symbol.iterator in V)) return $4297b2642441f6dd$require$webidl.converters.WebSocketInit(V); + return { + protocols: $4297b2642441f6dd$require$webidl.converters['DOMString or sequence'](V) + }; +}; +$4297b2642441f6dd$require$webidl.converters.WebSocketSendData = function(V) { + if ($4297b2642441f6dd$require$webidl.util.Type(V) === 'Object') { + if ($4297b2642441f6dd$require$isBlobLike(V)) return $4297b2642441f6dd$require$webidl.converters.Blob(V, { + strict: false }); - }); - try { - const connectHandler = new $d10c83f887c4c692$var$ConnectHandler(opts, callback); - this.dispatch({ - ...opts, - method: "CONNECT" - }, connectHandler); - } catch (err) { - if (typeof callback !== "function") throw err; - const opaque = opts && opts.opaque; - queueMicrotask(()=>callback(err, { - opaque: opaque - })); + if (ArrayBuffer.isView(V) || $4297b2642441f6dd$require$types.isArrayBuffer(V)) return $4297b2642441f6dd$require$webidl.converters.BufferSource(V); } + return $4297b2642441f6dd$require$webidl.converters.USVString(V); +}; +function $4297b2642441f6dd$var$onParserDrain() { + this.ws[$4297b2642441f6dd$require$kResponse].socket.resume(); +} +function $4297b2642441f6dd$var$onParserError(err) { + let message; + let code; + if (err instanceof $4297b2642441f6dd$require$CloseEvent) { + message = err.reason; + code = err.code; + } else message = err.message; + $4297b2642441f6dd$require$fireEvent('error', this, ()=>new $4297b2642441f6dd$require$ErrorEvent('error', { + error: err, + message: message + })); + $4297b2642441f6dd$require$closeWebSocketConnection(this, code); } -module.exports = $d10c83f887c4c692$var$connect; +module.exports = { + WebSocket: $4297b2642441f6dd$var$WebSocket +}; }); +parcelRegister("lD59k", function(module, exports) { +'use strict'; +// This is a Globally Unique Identifier unique used +// to validate that the endpoint accepts websocket +// connections. +// See https://www.rfc-editor.org/rfc/rfc6455.html#section-1.3 +const $fbf13c1485e59640$var$uid = '258EAFA5-E914-47DA-95CA-C5AB0DC85B11'; +/** @type {PropertyDescriptor} */ const $fbf13c1485e59640$var$staticPropertyDescriptors = { + enumerable: true, + writable: false, + configurable: false +}; +const $fbf13c1485e59640$var$states = { + CONNECTING: 0, + OPEN: 1, + CLOSING: 2, + CLOSED: 3 +}; +const $fbf13c1485e59640$var$sentCloseFrameState = { + NOT_SENT: 0, + PROCESSING: 1, + SENT: 2 +}; +const $fbf13c1485e59640$var$opcodes = { + CONTINUATION: 0x0, + TEXT: 0x1, + BINARY: 0x2, + CLOSE: 0x8, + PING: 0x9, + PONG: 0xA +}; +const $fbf13c1485e59640$var$maxUnsigned16Bit = 2 ** 16 - 1 // 65535 +; +const $fbf13c1485e59640$var$parserStates = { + INFO: 0, + PAYLOADLENGTH_16: 2, + PAYLOADLENGTH_64: 3, + READ_DATA: 4 +}; +const $fbf13c1485e59640$var$emptyBuffer = Buffer.allocUnsafe(0); +const $fbf13c1485e59640$var$sendHints = { + string: 1, + typedArray: 2, + arrayBuffer: 3, + blob: 4 +}; +module.exports = { + uid: $fbf13c1485e59640$var$uid, + sentCloseFrameState: $fbf13c1485e59640$var$sentCloseFrameState, + staticPropertyDescriptors: $fbf13c1485e59640$var$staticPropertyDescriptors, + states: $fbf13c1485e59640$var$states, + opcodes: $fbf13c1485e59640$var$opcodes, + maxUnsigned16Bit: $fbf13c1485e59640$var$maxUnsigned16Bit, + parserStates: $fbf13c1485e59640$var$parserStates, + emptyBuffer: $fbf13c1485e59640$var$emptyBuffer, + sendHints: $fbf13c1485e59640$var$sendHints +}; +}); -parcelRegister("7FGTp", function(module, exports) { -"use strict"; - -var $595da259c07d38eb$require$promisify = $g40fK$util.promisify; - -var $dQprK = parcelRequire("dQprK"); - -var $7IqWk = parcelRequire("7IqWk"); -var $595da259c07d38eb$require$buildMockDispatch = $7IqWk.buildMockDispatch; - -var $bIy7u = parcelRequire("bIy7u"); -var $595da259c07d38eb$require$kDispatches = $bIy7u.kDispatches; -var $595da259c07d38eb$require$kMockAgent = $bIy7u.kMockAgent; -var $595da259c07d38eb$require$kClose = $bIy7u.kClose; -var $595da259c07d38eb$require$kOriginalClose = $bIy7u.kOriginalClose; -var $595da259c07d38eb$require$kOrigin = $bIy7u.kOrigin; -var $595da259c07d38eb$require$kOriginalDispatch = $bIy7u.kOriginalDispatch; -var $595da259c07d38eb$require$kConnected = $bIy7u.kConnected; - -var $g0f7S = parcelRequire("g0f7S"); -var $595da259c07d38eb$require$MockInterceptor = $g0f7S.MockInterceptor; - -var $hHZvh = parcelRequire("hHZvh"); - -var $cKdp7 = parcelRequire("cKdp7"); -var $595da259c07d38eb$require$InvalidArgumentError = $cKdp7.InvalidArgumentError; -/** - * MockClient provides an API that extends the Client to influence the mockDispatches. - */ class $595da259c07d38eb$var$MockClient extends $dQprK { - constructor(origin, opts){ - super(origin, opts); - if (!opts || !opts.agent || typeof opts.agent.dispatch !== "function") throw new $595da259c07d38eb$require$InvalidArgumentError("Argument opts.agent must implement Agent"); - this[$595da259c07d38eb$require$kMockAgent] = opts.agent; - this[$595da259c07d38eb$require$kOrigin] = origin; - this[$595da259c07d38eb$require$kDispatches] = []; - this[$595da259c07d38eb$require$kConnected] = 1; - this[$595da259c07d38eb$require$kOriginalDispatch] = this.dispatch; - this[$595da259c07d38eb$require$kOriginalClose] = this.close.bind(this); - this.dispatch = $595da259c07d38eb$require$buildMockDispatch.call(this); - this.close = this[$595da259c07d38eb$require$kClose]; - } - get [$hHZvh.kConnected]() { - return this[$595da259c07d38eb$require$kConnected]; - } - /** - * Sets up the base interceptor for mocking replies from undici. - */ intercept(opts) { - return new $595da259c07d38eb$require$MockInterceptor(opts, this[$595da259c07d38eb$require$kDispatches]); - } - async [$595da259c07d38eb$require$kClose]() { - await $595da259c07d38eb$require$promisify(this[$595da259c07d38eb$require$kOriginalClose])(); - this[$595da259c07d38eb$require$kConnected] = 0; - this[$595da259c07d38eb$require$kMockAgent][$hHZvh.kClients].delete(this[$595da259c07d38eb$require$kOrigin]); - } -} -module.exports = $595da259c07d38eb$var$MockClient; +parcelRegister("fjGba", function(module, exports) { +'use strict'; +module.exports = { + kWebSocketURL: Symbol('url'), + kReadyState: Symbol('ready state'), + kController: Symbol('controller'), + kResponse: Symbol('response'), + kBinaryType: Symbol('binary type'), + kSentClose: Symbol('sent close'), + kReceivedClose: Symbol('received close'), + kByteParser: Symbol('byte parser') +}; }); -parcelRegister("7IqWk", function(module, exports) { -"use strict"; -var $6iUQ3 = parcelRequire("6iUQ3"); -var $59e18a2b12ec3a34$require$MockNotMatchedError = $6iUQ3.MockNotMatchedError; +parcelRegister("coFSg", function(module, exports) { +'use strict'; -var $bIy7u = parcelRequire("bIy7u"); -var $59e18a2b12ec3a34$require$kDispatches = $bIy7u.kDispatches; -var $59e18a2b12ec3a34$require$kMockAgent = $bIy7u.kMockAgent; -var $59e18a2b12ec3a34$require$kOriginalDispatch = $bIy7u.kOriginalDispatch; -var $59e18a2b12ec3a34$require$kOrigin = $bIy7u.kOrigin; -var $59e18a2b12ec3a34$require$kGetNetConnect = $bIy7u.kGetNetConnect; +var $fjGba = parcelRequire("fjGba"); +var $9068354b68aa46da$require$kReadyState = $fjGba.kReadyState; +var $9068354b68aa46da$require$kController = $fjGba.kController; +var $9068354b68aa46da$require$kResponse = $fjGba.kResponse; +var $9068354b68aa46da$require$kBinaryType = $fjGba.kBinaryType; +var $9068354b68aa46da$require$kWebSocketURL = $fjGba.kWebSocketURL; -var $gv2nV = parcelRequire("gv2nV"); -var $59e18a2b12ec3a34$require$buildURL = $gv2nV.buildURL; -var $59e18a2b12ec3a34$require$nop = $gv2nV.nop; +var $lD59k = parcelRequire("lD59k"); +var $9068354b68aa46da$require$states = $lD59k.states; +var $9068354b68aa46da$require$opcodes = $lD59k.opcodes; -var $59e18a2b12ec3a34$require$STATUS_CODES = $g40fK$http.STATUS_CODES; +var $O7XfC = parcelRequire("O7XfC"); +var $9068354b68aa46da$require$ErrorEvent = $O7XfC.ErrorEvent; +var $9068354b68aa46da$require$createFastMessageEvent = $O7XfC.createFastMessageEvent; -const { types: { isPromise: $59e18a2b12ec3a34$var$isPromise } } = $g40fK$util; -function $59e18a2b12ec3a34$var$matchValue(match, value) { - if (typeof match === "string") return match === value; - if (match instanceof RegExp) return match.test(value); - if (typeof match === "function") return match(value) === true; - return false; -} -function $59e18a2b12ec3a34$var$lowerCaseEntries(headers) { - return Object.fromEntries(Object.entries(headers).map(([headerName, headerValue])=>{ - return [ - headerName.toLocaleLowerCase(), - headerValue - ]; - })); +var $9068354b68aa46da$require$isUtf8 = $in2sP$nodebuffer.isUtf8; + +var $30IsM = parcelRequire("30IsM"); +var $9068354b68aa46da$require$collectASequenceOfCodePointsFast = $30IsM.collectASequenceOfCodePointsFast; +var $9068354b68aa46da$require$removeHTTPWhitespace = $30IsM.removeHTTPWhitespace; +/* globals Blob */ /** + * @param {import('./websocket').WebSocket} ws + * @returns {boolean} + */ function $9068354b68aa46da$var$isConnecting(ws) { + // If the WebSocket connection is not yet established, and the connection + // is not yet closed, then the WebSocket connection is in the CONNECTING state. + return ws[$9068354b68aa46da$require$kReadyState] === $9068354b68aa46da$require$states.CONNECTING; } /** - * @param {import('../../index').Headers|string[]|Record} headers - * @param {string} key - */ function $59e18a2b12ec3a34$var$getHeaderByName(headers, key) { - if (Array.isArray(headers)) { - for(let i = 0; i < headers.length; i += 2){ - if (headers[i].toLocaleLowerCase() === key.toLocaleLowerCase()) return headers[i + 1]; - } - return undefined; - } else if (typeof headers.get === "function") return headers.get(key); - else return $59e18a2b12ec3a34$var$lowerCaseEntries(headers)[key.toLocaleLowerCase()]; -} -/** @param {string[]} headers */ function $59e18a2b12ec3a34$var$buildHeadersFromArray(headers) { - const clone = headers.slice(); - const entries = []; - for(let index = 0; index < clone.length; index += 2)entries.push([ - clone[index], - clone[index + 1] - ]); - return Object.fromEntries(entries); -} -function $59e18a2b12ec3a34$var$matchHeaders(mockDispatch, headers) { - if (typeof mockDispatch.headers === "function") { - if (Array.isArray(headers)) headers = $59e18a2b12ec3a34$var$buildHeadersFromArray(headers); - return mockDispatch.headers(headers ? $59e18a2b12ec3a34$var$lowerCaseEntries(headers) : {}); - } - if (typeof mockDispatch.headers === "undefined") return true; - if (typeof headers !== "object" || typeof mockDispatch.headers !== "object") return false; - for (const [matchHeaderName, matchHeaderValue] of Object.entries(mockDispatch.headers)){ - const headerValue = $59e18a2b12ec3a34$var$getHeaderByName(headers, matchHeaderName); - if (!$59e18a2b12ec3a34$var$matchValue(matchHeaderValue, headerValue)) return false; - } - return true; -} -function $59e18a2b12ec3a34$var$safeUrl(path) { - if (typeof path !== "string") return path; - const pathSegments = path.split("?"); - if (pathSegments.length !== 2) return path; - const qp = new URLSearchParams(pathSegments.pop()); - qp.sort(); - return [ - ...pathSegments, - qp.toString() - ].join("?"); -} -function $59e18a2b12ec3a34$var$matchKey(mockDispatch, { path: path, method: method, body: body, headers: headers }) { - const pathMatch = $59e18a2b12ec3a34$var$matchValue(mockDispatch.path, path); - const methodMatch = $59e18a2b12ec3a34$var$matchValue(mockDispatch.method, method); - const bodyMatch = typeof mockDispatch.body !== "undefined" ? $59e18a2b12ec3a34$var$matchValue(mockDispatch.body, body) : true; - const headersMatch = $59e18a2b12ec3a34$var$matchHeaders(mockDispatch, headers); - return pathMatch && methodMatch && bodyMatch && headersMatch; -} -function $59e18a2b12ec3a34$var$getResponseData(data) { - if (Buffer.isBuffer(data)) return data; - else if (typeof data === "object") return JSON.stringify(data); - else return data.toString(); -} -function $59e18a2b12ec3a34$var$getMockDispatch(mockDispatches, key) { - const basePath = key.query ? $59e18a2b12ec3a34$require$buildURL(key.path, key.query) : key.path; - const resolvedPath = typeof basePath === "string" ? $59e18a2b12ec3a34$var$safeUrl(basePath) : basePath; - // Match path - let matchedMockDispatches = mockDispatches.filter(({ consumed: consumed })=>!consumed).filter(({ path: path })=>$59e18a2b12ec3a34$var$matchValue($59e18a2b12ec3a34$var$safeUrl(path), resolvedPath)); - if (matchedMockDispatches.length === 0) throw new $59e18a2b12ec3a34$require$MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`); - // Match method - matchedMockDispatches = matchedMockDispatches.filter(({ method: method })=>$59e18a2b12ec3a34$var$matchValue(method, key.method)); - if (matchedMockDispatches.length === 0) throw new $59e18a2b12ec3a34$require$MockNotMatchedError(`Mock dispatch not matched for method '${key.method}'`); - // Match body - matchedMockDispatches = matchedMockDispatches.filter(({ body: body })=>typeof body !== "undefined" ? $59e18a2b12ec3a34$var$matchValue(body, key.body) : true); - if (matchedMockDispatches.length === 0) throw new $59e18a2b12ec3a34$require$MockNotMatchedError(`Mock dispatch not matched for body '${key.body}'`); - // Match headers - matchedMockDispatches = matchedMockDispatches.filter((mockDispatch)=>$59e18a2b12ec3a34$var$matchHeaders(mockDispatch, key.headers)); - if (matchedMockDispatches.length === 0) throw new $59e18a2b12ec3a34$require$MockNotMatchedError(`Mock dispatch not matched for headers '${typeof key.headers === "object" ? JSON.stringify(key.headers) : key.headers}'`); - return matchedMockDispatches[0]; -} -function $59e18a2b12ec3a34$var$addMockDispatch(mockDispatches, key, data) { - const baseData = { - timesInvoked: 0, - times: 1, - persist: false, - consumed: false - }; - const replyData = typeof data === "function" ? { - callback: data - } : { - ...data - }; - const newMockDispatch = { - ...baseData, - ...key, - pending: true, - data: { - error: null, - ...replyData - } - }; - mockDispatches.push(newMockDispatch); - return newMockDispatch; -} -function $59e18a2b12ec3a34$var$deleteMockDispatch(mockDispatches, key) { - const index = mockDispatches.findIndex((dispatch)=>{ - if (!dispatch.consumed) return false; - return $59e18a2b12ec3a34$var$matchKey(dispatch, key); - }); - if (index !== -1) mockDispatches.splice(index, 1); -} -function $59e18a2b12ec3a34$var$buildKey(opts) { - const { path: path, method: method, body: body, headers: headers, query: query } = opts; - return { - path: path, - method: method, - body: body, - headers: headers, - query: query - }; + * @param {import('./websocket').WebSocket} ws + * @returns {boolean} + */ function $9068354b68aa46da$var$isEstablished(ws) { + // If the server's response is validated as provided for above, it is + // said that _The WebSocket Connection is Established_ and that the + // WebSocket Connection is in the OPEN state. + return ws[$9068354b68aa46da$require$kReadyState] === $9068354b68aa46da$require$states.OPEN; } -function $59e18a2b12ec3a34$var$generateKeyValues(data) { - return Object.entries(data).reduce((keyValuePairs, [key, value])=>[ - ...keyValuePairs, - Buffer.from(`${key}`), - Array.isArray(value) ? value.map((x)=>Buffer.from(`${x}`)) : Buffer.from(`${value}`) - ], []); +/** + * @param {import('./websocket').WebSocket} ws + * @returns {boolean} + */ function $9068354b68aa46da$var$isClosing(ws) { + // Upon either sending or receiving a Close control frame, it is said + // that _The WebSocket Closing Handshake is Started_ and that the + // WebSocket connection is in the CLOSING state. + return ws[$9068354b68aa46da$require$kReadyState] === $9068354b68aa46da$require$states.CLOSING; } /** - * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status - * @param {number} statusCode - */ function $59e18a2b12ec3a34$var$getStatusText(statusCode) { - return $59e18a2b12ec3a34$require$STATUS_CODES[statusCode] || "unknown"; + * @param {import('./websocket').WebSocket} ws + * @returns {boolean} + */ function $9068354b68aa46da$var$isClosed(ws) { + return ws[$9068354b68aa46da$require$kReadyState] === $9068354b68aa46da$require$states.CLOSED; } -async function $59e18a2b12ec3a34$var$getResponse(body) { - const buffers = []; - for await (const data of body)buffers.push(data); - return Buffer.concat(buffers).toString("utf8"); +/** + * @see https://dom.spec.whatwg.org/#concept-event-fire + * @param {string} e + * @param {EventTarget} target + * @param {(...args: ConstructorParameters) => Event} eventFactory + * @param {EventInit | undefined} eventInitDict + */ function $9068354b68aa46da$var$fireEvent(e, target, eventFactory = (type, init)=>new Event(type, init), eventInitDict = {}) { + // 1. If eventConstructor is not given, then let eventConstructor be Event. + // 2. Let event be the result of creating an event given eventConstructor, + // in the relevant realm of target. + // 3. Initialize event’s type attribute to e. + const event = eventFactory(e, eventInitDict); + // 4. Initialize any other IDL attributes of event as described in the + // invocation of this algorithm. + // 5. Return the result of dispatching event at target, with legacy target + // override flag set if set. + target.dispatchEvent(event); } /** - * Mock dispatch function used to simulate undici dispatches - */ function $59e18a2b12ec3a34$var$mockDispatch(opts, handler) { - // Get mock dispatch from built key - const key = $59e18a2b12ec3a34$var$buildKey(opts); - const mockDispatch = $59e18a2b12ec3a34$var$getMockDispatch(this[$59e18a2b12ec3a34$require$kDispatches], key); - mockDispatch.timesInvoked++; - // Here's where we resolve a callback if a callback is present for the dispatch data. - if (mockDispatch.data.callback) mockDispatch.data = { - ...mockDispatch.data, - ...mockDispatch.data.callback(opts) - }; - // Parse mockDispatch data - const { data: { statusCode: statusCode, data: data, headers: headers, trailers: trailers, error: error }, delay: delay, persist: persist } = mockDispatch; - const { timesInvoked: timesInvoked, times: times } = mockDispatch; - // If it's used up and not persistent, mark as consumed - mockDispatch.consumed = !persist && timesInvoked >= times; - mockDispatch.pending = timesInvoked < times; - // If specified, trigger dispatch error - if (error !== null) { - $59e18a2b12ec3a34$var$deleteMockDispatch(this[$59e18a2b12ec3a34$require$kDispatches], key); - handler.onError(error); - return true; + * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol + * @param {import('./websocket').WebSocket} ws + * @param {number} type Opcode + * @param {Buffer} data application data + */ function $9068354b68aa46da$var$websocketMessageReceived(ws, type, data) { + // 1. If ready state is not OPEN (1), then return. + if (ws[$9068354b68aa46da$require$kReadyState] !== $9068354b68aa46da$require$states.OPEN) return; + // 2. Let dataForEvent be determined by switching on type and binary type: + let dataForEvent; + if (type === $9068354b68aa46da$require$opcodes.TEXT) // -> type indicates that the data is Text + // a new DOMString containing data + try { + dataForEvent = $9068354b68aa46da$var$utf8Decode(data); + } catch { + $9068354b68aa46da$var$failWebsocketConnection(ws, 'Received invalid UTF-8 in text frame.'); + return; } - // Handle the request with a delay if necessary - if (typeof delay === "number" && delay > 0) setTimeout(()=>{ - handleReply(this[$59e18a2b12ec3a34$require$kDispatches]); - }, delay); - else handleReply(this[$59e18a2b12ec3a34$require$kDispatches]); - function handleReply(mockDispatches, _data = data) { - // fetch's HeadersList is a 1D string array - const optsHeaders = Array.isArray(opts.headers) ? $59e18a2b12ec3a34$var$buildHeadersFromArray(opts.headers) : opts.headers; - const body = typeof _data === "function" ? _data({ - ...opts, - headers: optsHeaders - }) : _data; - // util.types.isPromise is likely needed for jest. - if ($59e18a2b12ec3a34$var$isPromise(body)) { - // If handleReply is asynchronous, throwing an error - // in the callback will reject the promise, rather than - // synchronously throw the error, which breaks some tests. - // Rather, we wait for the callback to resolve if it is a - // promise, and then re-run handleReply with the new body. - body.then((newData)=>handleReply(mockDispatches, newData)); - return; - } - const responseData = $59e18a2b12ec3a34$var$getResponseData(body); - const responseHeaders = $59e18a2b12ec3a34$var$generateKeyValues(headers); - const responseTrailers = $59e18a2b12ec3a34$var$generateKeyValues(trailers); - handler.abort = $59e18a2b12ec3a34$require$nop; - handler.onHeaders(statusCode, responseHeaders, resume, $59e18a2b12ec3a34$var$getStatusText(statusCode)); - handler.onData(Buffer.from(responseData)); - handler.onComplete(responseTrailers); - $59e18a2b12ec3a34$var$deleteMockDispatch(mockDispatches, key); + else if (type === $9068354b68aa46da$require$opcodes.BINARY) { + if (ws[$9068354b68aa46da$require$kBinaryType] === 'blob') // -> type indicates that the data is Binary and binary type is "blob" + // a new Blob object, created in the relevant Realm of the WebSocket + // object, that represents data as its raw data + dataForEvent = new Blob([ + data + ]); + else // -> type indicates that the data is Binary and binary type is "arraybuffer" + // a new ArrayBuffer object, created in the relevant Realm of the + // WebSocket object, whose contents are data + dataForEvent = $9068354b68aa46da$var$toArrayBuffer(data); + } + // 3. Fire an event named message at the WebSocket object, using MessageEvent, + // with the origin attribute initialized to the serialization of the WebSocket + // object’s url's origin, and the data attribute initialized to dataForEvent. + $9068354b68aa46da$var$fireEvent('message', ws, $9068354b68aa46da$require$createFastMessageEvent, { + origin: ws[$9068354b68aa46da$require$kWebSocketURL].origin, + data: dataForEvent + }); +} +function $9068354b68aa46da$var$toArrayBuffer(buffer) { + if (buffer.byteLength === buffer.buffer.byteLength) return buffer.buffer; + return buffer.buffer.slice(buffer.byteOffset, buffer.byteOffset + buffer.byteLength); +} +/** + * @see https://datatracker.ietf.org/doc/html/rfc6455 + * @see https://datatracker.ietf.org/doc/html/rfc2616 + * @see https://bugs.chromium.org/p/chromium/issues/detail?id=398407 + * @param {string} protocol + */ function $9068354b68aa46da$var$isValidSubprotocol(protocol) { + // If present, this value indicates one + // or more comma-separated subprotocol the client wishes to speak, + // ordered by preference. The elements that comprise this value + // MUST be non-empty strings with characters in the range U+0021 to + // U+007E not including separator characters as defined in + // [RFC2616] and MUST all be unique strings. + if (protocol.length === 0) return false; + for(let i = 0; i < protocol.length; ++i){ + const code = protocol.charCodeAt(i); + if (code < 0x21 || // CTL, contains SP (0x20) and HT (0x09) + code > 0x7E || code === 0x22 || // " + code === 0x28 || // ( + code === 0x29 || // ) + code === 0x2C || // , + code === 0x2F || // / + code === 0x3A || // : + code === 0x3B || // ; + code === 0x3C || // < + code === 0x3D || // = + code === 0x3E || // > + code === 0x3F || // ? + code === 0x40 || // @ + code === 0x5B || // [ + code === 0x5C || // \ + code === 0x5D || // ] + code === 0x7B || // { + code === 0x7D // } + ) return false; } - function resume() {} return true; } -function $59e18a2b12ec3a34$var$buildMockDispatch() { - const agent = this[$59e18a2b12ec3a34$require$kMockAgent]; - const origin = this[$59e18a2b12ec3a34$require$kOrigin]; - const originalDispatch = this[$59e18a2b12ec3a34$require$kOriginalDispatch]; - return function dispatch(opts, handler) { - if (agent.isMockActive) try { - $59e18a2b12ec3a34$var$mockDispatch.call(this, opts, handler); - } catch (error) { - if (error instanceof $59e18a2b12ec3a34$require$MockNotMatchedError) { - const netConnect = agent[$59e18a2b12ec3a34$require$kGetNetConnect](); - if (netConnect === false) throw new $59e18a2b12ec3a34$require$MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect disabled)`); - if ($59e18a2b12ec3a34$var$checkNetConnect(netConnect, origin)) originalDispatch.call(this, opts, handler); - else throw new $59e18a2b12ec3a34$require$MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect is not enabled for this origin)`); - } else throw error; - } - else originalDispatch.call(this, opts, handler); - }; +/** + * @see https://datatracker.ietf.org/doc/html/rfc6455#section-7-4 + * @param {number} code + */ function $9068354b68aa46da$var$isValidStatusCode(code) { + if (code >= 1000 && code < 1015) return code !== 1004 && // reserved + code !== 1005 && // "MUST NOT be set as a status code" + code !== 1006 // "MUST NOT be set as a status code" + ; + return code >= 3000 && code <= 4999; } -function $59e18a2b12ec3a34$var$checkNetConnect(netConnect, origin) { - const url = new URL(origin); - if (netConnect === true) return true; - else if (Array.isArray(netConnect) && netConnect.some((matcher)=>$59e18a2b12ec3a34$var$matchValue(matcher, url.host))) return true; - return false; +/** + * @param {import('./websocket').WebSocket} ws + * @param {string|undefined} reason + */ function $9068354b68aa46da$var$failWebsocketConnection(ws, reason) { + const { [$9068354b68aa46da$require$kController]: controller, [$9068354b68aa46da$require$kResponse]: response } = ws; + controller.abort(); + if (response?.socket && !response.socket.destroyed) response.socket.destroy(); + if (reason) // TODO: process.nextTick + $9068354b68aa46da$var$fireEvent('error', ws, (type, init)=>new $9068354b68aa46da$require$ErrorEvent(type, init), { + error: new Error(reason), + message: reason + }); } -function $59e18a2b12ec3a34$var$buildMockOptions(opts) { - if (opts) { - const { agent: agent, ...mockOptions } = opts; - return mockOptions; - } +/** + * @see https://datatracker.ietf.org/doc/html/rfc6455#section-5.5 + * @param {number} opcode + */ function $9068354b68aa46da$var$isControlFrame(opcode) { + return opcode === $9068354b68aa46da$require$opcodes.CLOSE || opcode === $9068354b68aa46da$require$opcodes.PING || opcode === $9068354b68aa46da$require$opcodes.PONG; } -module.exports = { - getResponseData: $59e18a2b12ec3a34$var$getResponseData, - getMockDispatch: $59e18a2b12ec3a34$var$getMockDispatch, - addMockDispatch: $59e18a2b12ec3a34$var$addMockDispatch, - deleteMockDispatch: $59e18a2b12ec3a34$var$deleteMockDispatch, - buildKey: $59e18a2b12ec3a34$var$buildKey, - generateKeyValues: $59e18a2b12ec3a34$var$generateKeyValues, - matchValue: $59e18a2b12ec3a34$var$matchValue, - getResponse: $59e18a2b12ec3a34$var$getResponse, - getStatusText: $59e18a2b12ec3a34$var$getStatusText, - mockDispatch: $59e18a2b12ec3a34$var$mockDispatch, - buildMockDispatch: $59e18a2b12ec3a34$var$buildMockDispatch, - checkNetConnect: $59e18a2b12ec3a34$var$checkNetConnect, - buildMockOptions: $59e18a2b12ec3a34$var$buildMockOptions, - getHeaderByName: $59e18a2b12ec3a34$var$getHeaderByName -}; - -}); -parcelRegister("6iUQ3", function(module, exports) { -"use strict"; - -var $cKdp7 = parcelRequire("cKdp7"); -var $4970837d86247ee8$require$UndiciError = $cKdp7.UndiciError; -class $4970837d86247ee8$var$MockNotMatchedError extends $4970837d86247ee8$require$UndiciError { - constructor(message){ - super(message); - Error.captureStackTrace(this, $4970837d86247ee8$var$MockNotMatchedError); - this.name = "MockNotMatchedError"; - this.message = message || "The request does not match any registered mock dispatches"; - this.code = "UND_MOCK_ERR_MOCK_NOT_MATCHED"; +function $9068354b68aa46da$var$isContinuationFrame(opcode) { + return opcode === $9068354b68aa46da$require$opcodes.CONTINUATION; +} +function $9068354b68aa46da$var$isTextBinaryFrame(opcode) { + return opcode === $9068354b68aa46da$require$opcodes.TEXT || opcode === $9068354b68aa46da$require$opcodes.BINARY; +} +function $9068354b68aa46da$var$isValidOpcode(opcode) { + return $9068354b68aa46da$var$isTextBinaryFrame(opcode) || $9068354b68aa46da$var$isContinuationFrame(opcode) || $9068354b68aa46da$var$isControlFrame(opcode); +} +/** + * Parses a Sec-WebSocket-Extensions header value. + * @param {string} extensions + * @returns {Map} + */ // TODO(@Uzlopak, @KhafraDev): make compliant https://datatracker.ietf.org/doc/html/rfc6455#section-9.1 +function $9068354b68aa46da$var$parseExtensions(extensions) { + const position = { + position: 0 + }; + const extensionList = new Map(); + while(position.position < extensions.length){ + const pair = $9068354b68aa46da$require$collectASequenceOfCodePointsFast(';', extensions, position); + const [name, value = ''] = pair.split('='); + extensionList.set($9068354b68aa46da$require$removeHTTPWhitespace(name, true, false), $9068354b68aa46da$require$removeHTTPWhitespace(value, false, true)); + position.position++; } + return extensionList; } -module.exports = { - MockNotMatchedError: $4970837d86247ee8$var$MockNotMatchedError +/** + * @see https://www.rfc-editor.org/rfc/rfc7692#section-7.1.2.2 + * @description "client-max-window-bits = 1*DIGIT" + * @param {string} value + */ function $9068354b68aa46da$var$isValidClientWindowBits(value) { + // Must have at least one character + if (value.length === 0) return false; + // Check all characters are ASCII digits + for(let i = 0; i < value.length; i++){ + const byte = value.charCodeAt(i); + if (byte < 0x30 || byte > 0x39) return false; + } + // Check numeric range: zlib requires windowBits in range 8-15 + const num = Number.parseInt(value, 10); + return num >= 8 && num <= 15; +} +// https://nodejs.org/api/intl.html#detecting-internationalization-support +const $9068354b68aa46da$var$hasIntl = typeof process.versions.icu === 'string'; +const $9068354b68aa46da$var$fatalDecoder = $9068354b68aa46da$var$hasIntl ? new TextDecoder('utf-8', { + fatal: true +}) : undefined; +/** + * Converts a Buffer to utf-8, even on platforms without icu. + * @param {Buffer} buffer + */ const $9068354b68aa46da$var$utf8Decode = $9068354b68aa46da$var$hasIntl ? $9068354b68aa46da$var$fatalDecoder.decode.bind($9068354b68aa46da$var$fatalDecoder) : function(buffer) { + if ($9068354b68aa46da$require$isUtf8(buffer)) return buffer.toString('utf-8'); + throw new TypeError('Invalid utf-8 received.'); }; - -}); - -parcelRegister("bIy7u", function(module, exports) { -"use strict"; module.exports = { - kAgent: Symbol("agent"), - kOptions: Symbol("options"), - kFactory: Symbol("factory"), - kDispatches: Symbol("dispatches"), - kDispatchKey: Symbol("dispatch key"), - kDefaultHeaders: Symbol("default headers"), - kDefaultTrailers: Symbol("default trailers"), - kContentLength: Symbol("content length"), - kMockAgent: Symbol("mock agent"), - kMockAgentSet: Symbol("mock agent set"), - kMockAgentGet: Symbol("mock agent get"), - kMockDispatch: Symbol("mock dispatch"), - kClose: Symbol("close"), - kOriginalClose: Symbol("original agent close"), - kOrigin: Symbol("origin"), - kIsMockActive: Symbol("is mock active"), - kNetConnect: Symbol("net connect"), - kGetNetConnect: Symbol("get net connect"), - kConnected: Symbol("connected") + isConnecting: $9068354b68aa46da$var$isConnecting, + isEstablished: $9068354b68aa46da$var$isEstablished, + isClosing: $9068354b68aa46da$var$isClosing, + isClosed: $9068354b68aa46da$var$isClosed, + fireEvent: $9068354b68aa46da$var$fireEvent, + isValidSubprotocol: $9068354b68aa46da$var$isValidSubprotocol, + isValidStatusCode: $9068354b68aa46da$var$isValidStatusCode, + failWebsocketConnection: $9068354b68aa46da$var$failWebsocketConnection, + websocketMessageReceived: $9068354b68aa46da$var$websocketMessageReceived, + utf8Decode: $9068354b68aa46da$var$utf8Decode, + isControlFrame: $9068354b68aa46da$var$isControlFrame, + isContinuationFrame: $9068354b68aa46da$var$isContinuationFrame, + isTextBinaryFrame: $9068354b68aa46da$var$isTextBinaryFrame, + isValidOpcode: $9068354b68aa46da$var$isValidOpcode, + parseExtensions: $9068354b68aa46da$var$parseExtensions, + isValidClientWindowBits: $9068354b68aa46da$var$isValidClientWindowBits }; }); +parcelRegister("O7XfC", function(module, exports) { +'use strict'; +var $5HTG7 = parcelRequire("5HTG7"); +var $096ad74198cd9a7b$require$webidl = $5HTG7.webidl; -parcelRegister("g0f7S", function(module, exports) { - -$parcel$export(module.exports, "MockInterceptor", () => $ba6861269ac0471b$export$fb1b189d8a131a8b, (v) => $ba6861269ac0471b$export$fb1b189d8a131a8b = v); -var $ba6861269ac0471b$export$fb1b189d8a131a8b; -var $ba6861269ac0471b$export$61f2724da7650995; -"use strict"; - -var $7IqWk = parcelRequire("7IqWk"); -var $ba6861269ac0471b$require$getResponseData = $7IqWk.getResponseData; -var $ba6861269ac0471b$require$buildKey = $7IqWk.buildKey; -var $ba6861269ac0471b$require$addMockDispatch = $7IqWk.addMockDispatch; - -var $bIy7u = parcelRequire("bIy7u"); -var $ba6861269ac0471b$require$kDispatches = $bIy7u.kDispatches; -var $ba6861269ac0471b$require$kDispatchKey = $bIy7u.kDispatchKey; -var $ba6861269ac0471b$require$kDefaultHeaders = $bIy7u.kDefaultHeaders; -var $ba6861269ac0471b$require$kDefaultTrailers = $bIy7u.kDefaultTrailers; -var $ba6861269ac0471b$require$kContentLength = $bIy7u.kContentLength; -var $ba6861269ac0471b$require$kMockDispatch = $bIy7u.kMockDispatch; +var $bFRvW = parcelRequire("bFRvW"); +var $096ad74198cd9a7b$require$kEnumerableProperty = $bFRvW.kEnumerableProperty; -var $cKdp7 = parcelRequire("cKdp7"); -var $ba6861269ac0471b$require$InvalidArgumentError = $cKdp7.InvalidArgumentError; +var $gNVEc = parcelRequire("gNVEc"); +var $096ad74198cd9a7b$require$kConstruct = $gNVEc.kConstruct; -var $gv2nV = parcelRequire("gv2nV"); -var $ba6861269ac0471b$require$buildURL = $gv2nV.buildURL; +var $096ad74198cd9a7b$require$MessagePort = $in2sP$nodeworker_threads.MessagePort; /** - * Defines the scope API for an interceptor reply - */ class $ba6861269ac0471b$var$MockScope { - constructor(mockDispatch){ - this[$ba6861269ac0471b$require$kMockDispatch] = mockDispatch; + * @see https://html.spec.whatwg.org/multipage/comms.html#messageevent + */ class $096ad74198cd9a7b$var$MessageEvent extends Event { + #eventInit; + constructor(type, eventInitDict = {}){ + if (type === $096ad74198cd9a7b$require$kConstruct) { + super(arguments[1], arguments[2]); + $096ad74198cd9a7b$require$webidl.util.markAsUncloneable(this); + return; + } + const prefix = 'MessageEvent constructor'; + $096ad74198cd9a7b$require$webidl.argumentLengthCheck(arguments, 1, prefix); + type = $096ad74198cd9a7b$require$webidl.converters.DOMString(type, prefix, 'type'); + eventInitDict = $096ad74198cd9a7b$require$webidl.converters.MessageEventInit(eventInitDict, prefix, 'eventInitDict'); + super(type, eventInitDict); + this.#eventInit = eventInitDict; + $096ad74198cd9a7b$require$webidl.util.markAsUncloneable(this); } - /** - * Delay a reply by a set amount in ms. - */ delay(waitInMs) { - if (typeof waitInMs !== "number" || !Number.isInteger(waitInMs) || waitInMs <= 0) throw new $ba6861269ac0471b$require$InvalidArgumentError("waitInMs must be a valid integer > 0"); - this[$ba6861269ac0471b$require$kMockDispatch].delay = waitInMs; - return this; + get data() { + $096ad74198cd9a7b$require$webidl.brandCheck(this, $096ad74198cd9a7b$var$MessageEvent); + return this.#eventInit.data; } - /** - * For a defined reply, never mark as consumed. - */ persist() { - this[$ba6861269ac0471b$require$kMockDispatch].persist = true; - return this; + get origin() { + $096ad74198cd9a7b$require$webidl.brandCheck(this, $096ad74198cd9a7b$var$MessageEvent); + return this.#eventInit.origin; } - /** - * Allow one to define a reply for a set amount of matching requests. - */ times(repeatTimes) { - if (typeof repeatTimes !== "number" || !Number.isInteger(repeatTimes) || repeatTimes <= 0) throw new $ba6861269ac0471b$require$InvalidArgumentError("repeatTimes must be a valid integer > 0"); - this[$ba6861269ac0471b$require$kMockDispatch].times = repeatTimes; - return this; + get lastEventId() { + $096ad74198cd9a7b$require$webidl.brandCheck(this, $096ad74198cd9a7b$var$MessageEvent); + return this.#eventInit.lastEventId; + } + get source() { + $096ad74198cd9a7b$require$webidl.brandCheck(this, $096ad74198cd9a7b$var$MessageEvent); + return this.#eventInit.source; + } + get ports() { + $096ad74198cd9a7b$require$webidl.brandCheck(this, $096ad74198cd9a7b$var$MessageEvent); + if (!Object.isFrozen(this.#eventInit.ports)) Object.freeze(this.#eventInit.ports); + return this.#eventInit.ports; + } + initMessageEvent(type, bubbles = false, cancelable = false, data = null, origin = '', lastEventId = '', source = null, ports = []) { + $096ad74198cd9a7b$require$webidl.brandCheck(this, $096ad74198cd9a7b$var$MessageEvent); + $096ad74198cd9a7b$require$webidl.argumentLengthCheck(arguments, 1, 'MessageEvent.initMessageEvent'); + return new $096ad74198cd9a7b$var$MessageEvent(type, { + bubbles: bubbles, + cancelable: cancelable, + data: data, + origin: origin, + lastEventId: lastEventId, + source: source, + ports: ports + }); + } + static createFastMessageEvent(type, init) { + const messageEvent = new $096ad74198cd9a7b$var$MessageEvent($096ad74198cd9a7b$require$kConstruct, type, init); + messageEvent.#eventInit = init; + messageEvent.#eventInit.data ??= null; + messageEvent.#eventInit.origin ??= ''; + messageEvent.#eventInit.lastEventId ??= ''; + messageEvent.#eventInit.source ??= null; + messageEvent.#eventInit.ports ??= []; + return messageEvent; } } +const { createFastMessageEvent: $096ad74198cd9a7b$var$createFastMessageEvent } = $096ad74198cd9a7b$var$MessageEvent; +delete $096ad74198cd9a7b$var$MessageEvent.createFastMessageEvent; /** - * Defines an interceptor for a Mock - */ class $ba6861269ac0471b$var$MockInterceptor { - constructor(opts, mockDispatches){ - if (typeof opts !== "object") throw new $ba6861269ac0471b$require$InvalidArgumentError("opts must be an object"); - if (typeof opts.path === "undefined") throw new $ba6861269ac0471b$require$InvalidArgumentError("opts.path must be defined"); - if (typeof opts.method === "undefined") opts.method = "GET"; - // See https://github.com/nodejs/undici/issues/1245 - // As per RFC 3986, clients are not supposed to send URI - // fragments to servers when they retrieve a document, - if (typeof opts.path === "string") { - if (opts.query) opts.path = $ba6861269ac0471b$require$buildURL(opts.path, opts.query); - else { - // Matches https://github.com/nodejs/undici/blob/main/lib/fetch/index.js#L1811 - const parsedURL = new URL(opts.path, "data://"); - opts.path = parsedURL.pathname + parsedURL.search; - } - } - if (typeof opts.method === "string") opts.method = opts.method.toUpperCase(); - this[$ba6861269ac0471b$require$kDispatchKey] = $ba6861269ac0471b$require$buildKey(opts); - this[$ba6861269ac0471b$require$kDispatches] = mockDispatches; - this[$ba6861269ac0471b$require$kDefaultHeaders] = {}; - this[$ba6861269ac0471b$require$kDefaultTrailers] = {}; - this[$ba6861269ac0471b$require$kContentLength] = false; + * @see https://websockets.spec.whatwg.org/#the-closeevent-interface + */ class $096ad74198cd9a7b$var$CloseEvent extends Event { + #eventInit; + constructor(type, eventInitDict = {}){ + const prefix = 'CloseEvent constructor'; + $096ad74198cd9a7b$require$webidl.argumentLengthCheck(arguments, 1, prefix); + type = $096ad74198cd9a7b$require$webidl.converters.DOMString(type, prefix, 'type'); + eventInitDict = $096ad74198cd9a7b$require$webidl.converters.CloseEventInit(eventInitDict); + super(type, eventInitDict); + this.#eventInit = eventInitDict; + $096ad74198cd9a7b$require$webidl.util.markAsUncloneable(this); } - createMockScopeDispatchData(statusCode, data, responseOptions = {}) { - const responseData = $ba6861269ac0471b$require$getResponseData(data); - const contentLength = this[$ba6861269ac0471b$require$kContentLength] ? { - "content-length": responseData.length - } : {}; - const headers = { - ...this[$ba6861269ac0471b$require$kDefaultHeaders], - ...contentLength, - ...responseOptions.headers - }; - const trailers = { - ...this[$ba6861269ac0471b$require$kDefaultTrailers], - ...responseOptions.trailers - }; - return { - statusCode: statusCode, - data: data, - headers: headers, - trailers: trailers - }; + get wasClean() { + $096ad74198cd9a7b$require$webidl.brandCheck(this, $096ad74198cd9a7b$var$CloseEvent); + return this.#eventInit.wasClean; } - validateReplyParameters(statusCode, data, responseOptions) { - if (typeof statusCode === "undefined") throw new $ba6861269ac0471b$require$InvalidArgumentError("statusCode must be defined"); - if (typeof data === "undefined") throw new $ba6861269ac0471b$require$InvalidArgumentError("data must be defined"); - if (typeof responseOptions !== "object") throw new $ba6861269ac0471b$require$InvalidArgumentError("responseOptions must be an object"); + get code() { + $096ad74198cd9a7b$require$webidl.brandCheck(this, $096ad74198cd9a7b$var$CloseEvent); + return this.#eventInit.code; } - /** - * Mock an undici request with a defined reply. - */ reply(replyData) { - // Values of reply aren't available right now as they - // can only be available when the reply callback is invoked. - if (typeof replyData === "function") { - // We'll first wrap the provided callback in another function, - // this function will properly resolve the data from the callback - // when invoked. - const wrappedDefaultsCallback = (opts)=>{ - // Our reply options callback contains the parameter for statusCode, data and options. - const resolvedData = replyData(opts); - // Check if it is in the right format - if (typeof resolvedData !== "object") throw new $ba6861269ac0471b$require$InvalidArgumentError("reply options callback must return an object"); - const { statusCode: statusCode, data: data = "", responseOptions: responseOptions = {} } = resolvedData; - this.validateReplyParameters(statusCode, data, responseOptions); - // Since the values can be obtained immediately we return them - // from this higher order function that will be resolved later. - return { - ...this.createMockScopeDispatchData(statusCode, data, responseOptions) - }; - }; - // Add usual dispatch data, but this time set the data parameter to function that will eventually provide data. - const newMockDispatch = $ba6861269ac0471b$require$addMockDispatch(this[$ba6861269ac0471b$require$kDispatches], this[$ba6861269ac0471b$require$kDispatchKey], wrappedDefaultsCallback); - return new $ba6861269ac0471b$var$MockScope(newMockDispatch); - } - // We can have either one or three parameters, if we get here, - // we should have 1-3 parameters. So we spread the arguments of - // this function to obtain the parameters, since replyData will always - // just be the statusCode. - const [statusCode, data = "", responseOptions = {}] = [ - ...arguments - ]; - this.validateReplyParameters(statusCode, data, responseOptions); - // Send in-already provided data like usual - const dispatchData = this.createMockScopeDispatchData(statusCode, data, responseOptions); - const newMockDispatch = $ba6861269ac0471b$require$addMockDispatch(this[$ba6861269ac0471b$require$kDispatches], this[$ba6861269ac0471b$require$kDispatchKey], dispatchData); - return new $ba6861269ac0471b$var$MockScope(newMockDispatch); + get reason() { + $096ad74198cd9a7b$require$webidl.brandCheck(this, $096ad74198cd9a7b$var$CloseEvent); + return this.#eventInit.reason; } - /** - * Mock an undici request with a defined error. - */ replyWithError(error) { - if (typeof error === "undefined") throw new $ba6861269ac0471b$require$InvalidArgumentError("error must be defined"); - const newMockDispatch = $ba6861269ac0471b$require$addMockDispatch(this[$ba6861269ac0471b$require$kDispatches], this[$ba6861269ac0471b$require$kDispatchKey], { - error: error - }); - return new $ba6861269ac0471b$var$MockScope(newMockDispatch); +} +// https://html.spec.whatwg.org/multipage/webappapis.html#the-errorevent-interface +class $096ad74198cd9a7b$var$ErrorEvent extends Event { + #eventInit; + constructor(type, eventInitDict){ + const prefix = 'ErrorEvent constructor'; + $096ad74198cd9a7b$require$webidl.argumentLengthCheck(arguments, 1, prefix); + super(type, eventInitDict); + $096ad74198cd9a7b$require$webidl.util.markAsUncloneable(this); + type = $096ad74198cd9a7b$require$webidl.converters.DOMString(type, prefix, 'type'); + eventInitDict = $096ad74198cd9a7b$require$webidl.converters.ErrorEventInit(eventInitDict ?? {}); + this.#eventInit = eventInitDict; } - /** - * Set default reply headers on the interceptor for subsequent replies - */ defaultReplyHeaders(headers) { - if (typeof headers === "undefined") throw new $ba6861269ac0471b$require$InvalidArgumentError("headers must be defined"); - this[$ba6861269ac0471b$require$kDefaultHeaders] = headers; - return this; + get message() { + $096ad74198cd9a7b$require$webidl.brandCheck(this, $096ad74198cd9a7b$var$ErrorEvent); + return this.#eventInit.message; } - /** - * Set default reply trailers on the interceptor for subsequent replies - */ defaultReplyTrailers(trailers) { - if (typeof trailers === "undefined") throw new $ba6861269ac0471b$require$InvalidArgumentError("trailers must be defined"); - this[$ba6861269ac0471b$require$kDefaultTrailers] = trailers; - return this; + get filename() { + $096ad74198cd9a7b$require$webidl.brandCheck(this, $096ad74198cd9a7b$var$ErrorEvent); + return this.#eventInit.filename; } - /** - * Set reply content length header for replies on the interceptor - */ replyContentLength() { - this[$ba6861269ac0471b$require$kContentLength] = true; - return this; + get lineno() { + $096ad74198cd9a7b$require$webidl.brandCheck(this, $096ad74198cd9a7b$var$ErrorEvent); + return this.#eventInit.lineno; + } + get colno() { + $096ad74198cd9a7b$require$webidl.brandCheck(this, $096ad74198cd9a7b$var$ErrorEvent); + return this.#eventInit.colno; + } + get error() { + $096ad74198cd9a7b$require$webidl.brandCheck(this, $096ad74198cd9a7b$var$ErrorEvent); + return this.#eventInit.error; + } +} +Object.defineProperties($096ad74198cd9a7b$var$MessageEvent.prototype, { + [Symbol.toStringTag]: { + value: 'MessageEvent', + configurable: true + }, + data: $096ad74198cd9a7b$require$kEnumerableProperty, + origin: $096ad74198cd9a7b$require$kEnumerableProperty, + lastEventId: $096ad74198cd9a7b$require$kEnumerableProperty, + source: $096ad74198cd9a7b$require$kEnumerableProperty, + ports: $096ad74198cd9a7b$require$kEnumerableProperty, + initMessageEvent: $096ad74198cd9a7b$require$kEnumerableProperty +}); +Object.defineProperties($096ad74198cd9a7b$var$CloseEvent.prototype, { + [Symbol.toStringTag]: { + value: 'CloseEvent', + configurable: true + }, + reason: $096ad74198cd9a7b$require$kEnumerableProperty, + code: $096ad74198cd9a7b$require$kEnumerableProperty, + wasClean: $096ad74198cd9a7b$require$kEnumerableProperty +}); +Object.defineProperties($096ad74198cd9a7b$var$ErrorEvent.prototype, { + [Symbol.toStringTag]: { + value: 'ErrorEvent', + configurable: true + }, + message: $096ad74198cd9a7b$require$kEnumerableProperty, + filename: $096ad74198cd9a7b$require$kEnumerableProperty, + lineno: $096ad74198cd9a7b$require$kEnumerableProperty, + colno: $096ad74198cd9a7b$require$kEnumerableProperty, + error: $096ad74198cd9a7b$require$kEnumerableProperty +}); +$096ad74198cd9a7b$require$webidl.converters.MessagePort = $096ad74198cd9a7b$require$webidl.interfaceConverter($096ad74198cd9a7b$require$MessagePort); +$096ad74198cd9a7b$require$webidl.converters['sequence'] = $096ad74198cd9a7b$require$webidl.sequenceConverter($096ad74198cd9a7b$require$webidl.converters.MessagePort); +const $096ad74198cd9a7b$var$eventInit = [ + { + key: 'bubbles', + converter: $096ad74198cd9a7b$require$webidl.converters.boolean, + defaultValue: ()=>false + }, + { + key: 'cancelable', + converter: $096ad74198cd9a7b$require$webidl.converters.boolean, + defaultValue: ()=>false + }, + { + key: 'composed', + converter: $096ad74198cd9a7b$require$webidl.converters.boolean, + defaultValue: ()=>false + } +]; +$096ad74198cd9a7b$require$webidl.converters.MessageEventInit = $096ad74198cd9a7b$require$webidl.dictionaryConverter([ + ...$096ad74198cd9a7b$var$eventInit, + { + key: 'data', + converter: $096ad74198cd9a7b$require$webidl.converters.any, + defaultValue: ()=>null + }, + { + key: 'origin', + converter: $096ad74198cd9a7b$require$webidl.converters.USVString, + defaultValue: ()=>'' + }, + { + key: 'lastEventId', + converter: $096ad74198cd9a7b$require$webidl.converters.DOMString, + defaultValue: ()=>'' + }, + { + key: 'source', + // Node doesn't implement WindowProxy or ServiceWorker, so the only + // valid value for source is a MessagePort. + converter: $096ad74198cd9a7b$require$webidl.nullableConverter($096ad74198cd9a7b$require$webidl.converters.MessagePort), + defaultValue: ()=>null + }, + { + key: 'ports', + converter: $096ad74198cd9a7b$require$webidl.converters['sequence'], + defaultValue: ()=>new Array(0) + } +]); +$096ad74198cd9a7b$require$webidl.converters.CloseEventInit = $096ad74198cd9a7b$require$webidl.dictionaryConverter([ + ...$096ad74198cd9a7b$var$eventInit, + { + key: 'wasClean', + converter: $096ad74198cd9a7b$require$webidl.converters.boolean, + defaultValue: ()=>false + }, + { + key: 'code', + converter: $096ad74198cd9a7b$require$webidl.converters['unsigned short'], + defaultValue: ()=>0 + }, + { + key: 'reason', + converter: $096ad74198cd9a7b$require$webidl.converters.USVString, + defaultValue: ()=>'' + } +]); +$096ad74198cd9a7b$require$webidl.converters.ErrorEventInit = $096ad74198cd9a7b$require$webidl.dictionaryConverter([ + ...$096ad74198cd9a7b$var$eventInit, + { + key: 'message', + converter: $096ad74198cd9a7b$require$webidl.converters.DOMString, + defaultValue: ()=>'' + }, + { + key: 'filename', + converter: $096ad74198cd9a7b$require$webidl.converters.USVString, + defaultValue: ()=>'' + }, + { + key: 'lineno', + converter: $096ad74198cd9a7b$require$webidl.converters['unsigned long'], + defaultValue: ()=>0 + }, + { + key: 'colno', + converter: $096ad74198cd9a7b$require$webidl.converters['unsigned long'], + defaultValue: ()=>0 + }, + { + key: 'error', + converter: $096ad74198cd9a7b$require$webidl.converters.any } -} -$ba6861269ac0471b$export$fb1b189d8a131a8b = $ba6861269ac0471b$var$MockInterceptor; -$ba6861269ac0471b$export$61f2724da7650995 = $ba6861269ac0471b$var$MockScope; +]); +module.exports = { + MessageEvent: $096ad74198cd9a7b$var$MessageEvent, + CloseEvent: $096ad74198cd9a7b$var$CloseEvent, + ErrorEvent: $096ad74198cd9a7b$var$ErrorEvent, + createFastMessageEvent: $096ad74198cd9a7b$var$createFastMessageEvent +}; }); -parcelRegister("g8veH", function(module, exports) { -"use strict"; +parcelRegister("dIZUQ", function(module, exports) { +'use strict'; -var $hHZvh = parcelRequire("hHZvh"); -var $bbf59f83ed713e5f$require$kClients = $hHZvh.kClients; +var $lD59k = parcelRequire("lD59k"); +var $9fdf699a27069a43$require$uid = $lD59k.uid; +var $9fdf699a27069a43$require$states = $lD59k.states; +var $9fdf699a27069a43$require$sentCloseFrameState = $lD59k.sentCloseFrameState; +var $9fdf699a27069a43$require$emptyBuffer = $lD59k.emptyBuffer; +var $9fdf699a27069a43$require$opcodes = $lD59k.opcodes; -var $3zvEP = parcelRequire("3zvEP"); +var $fjGba = parcelRequire("fjGba"); +var $9fdf699a27069a43$require$kReadyState = $fjGba.kReadyState; +var $9fdf699a27069a43$require$kSentClose = $fjGba.kSentClose; +var $9fdf699a27069a43$require$kByteParser = $fjGba.kByteParser; +var $9fdf699a27069a43$require$kReceivedClose = $fjGba.kReceivedClose; +var $9fdf699a27069a43$require$kResponse = $fjGba.kResponse; -var $bIy7u = parcelRequire("bIy7u"); -var $bbf59f83ed713e5f$require$kAgent = $bIy7u.kAgent; -var $bbf59f83ed713e5f$require$kMockAgentSet = $bIy7u.kMockAgentSet; -var $bbf59f83ed713e5f$require$kMockAgentGet = $bIy7u.kMockAgentGet; -var $bbf59f83ed713e5f$require$kDispatches = $bIy7u.kDispatches; -var $bbf59f83ed713e5f$require$kIsMockActive = $bIy7u.kIsMockActive; -var $bbf59f83ed713e5f$require$kNetConnect = $bIy7u.kNetConnect; -var $bbf59f83ed713e5f$require$kGetNetConnect = $bIy7u.kGetNetConnect; -var $bbf59f83ed713e5f$require$kOptions = $bIy7u.kOptions; -var $bbf59f83ed713e5f$require$kFactory = $bIy7u.kFactory; +var $coFSg = parcelRequire("coFSg"); +var $9fdf699a27069a43$require$fireEvent = $coFSg.fireEvent; +var $9fdf699a27069a43$require$failWebsocketConnection = $coFSg.failWebsocketConnection; +var $9fdf699a27069a43$require$isClosing = $coFSg.isClosing; +var $9fdf699a27069a43$require$isClosed = $coFSg.isClosed; +var $9fdf699a27069a43$require$isEstablished = $coFSg.isEstablished; +var $9fdf699a27069a43$require$parseExtensions = $coFSg.parseExtensions; -var $7FGTp = parcelRequire("7FGTp"); +var $l6jyj = parcelRequire("l6jyj"); +var $9fdf699a27069a43$require$channels = $l6jyj.channels; -var $1OZd4 = parcelRequire("1OZd4"); +var $O7XfC = parcelRequire("O7XfC"); +var $9fdf699a27069a43$require$CloseEvent = $O7XfC.CloseEvent; -var $7IqWk = parcelRequire("7IqWk"); -var $bbf59f83ed713e5f$require$matchValue = $7IqWk.matchValue; -var $bbf59f83ed713e5f$require$buildMockOptions = $7IqWk.buildMockOptions; +var $9rjJZ = parcelRequire("9rjJZ"); +var $9fdf699a27069a43$require$makeRequest = $9rjJZ.makeRequest; -var $cKdp7 = parcelRequire("cKdp7"); -var $bbf59f83ed713e5f$require$InvalidArgumentError = $cKdp7.InvalidArgumentError; -var $bbf59f83ed713e5f$require$UndiciError = $cKdp7.UndiciError; +var $awCP7 = parcelRequire("awCP7"); +var $9fdf699a27069a43$require$fetching = $awCP7.fetching; -var $kRVHu = parcelRequire("kRVHu"); +var $3dLRE = parcelRequire("3dLRE"); +var $9fdf699a27069a43$require$Headers = $3dLRE.Headers; +var $9fdf699a27069a43$require$getHeadersList = $3dLRE.getHeadersList; -var $8Wt9k = parcelRequire("8Wt9k"); +var $7z0I9 = parcelRequire("7z0I9"); +var $9fdf699a27069a43$require$getDecodeSplit = $7z0I9.getDecodeSplit; -var $boLEs = parcelRequire("boLEs"); -class $bbf59f83ed713e5f$var$FakeWeakRef { - constructor(value){ - this.value = value; - } - deref() { - return this.value; - } -} -class $bbf59f83ed713e5f$var$MockAgent extends $kRVHu { - constructor(opts){ - super(opts); - this[$bbf59f83ed713e5f$require$kNetConnect] = true; - this[$bbf59f83ed713e5f$require$kIsMockActive] = true; - // Instantiate Agent and encapsulate - if (opts && opts.agent && typeof opts.agent.dispatch !== "function") throw new $bbf59f83ed713e5f$require$InvalidArgumentError("Argument opts.agent must implement Agent"); - const agent = opts && opts.agent ? opts.agent : new $3zvEP(opts); - this[$bbf59f83ed713e5f$require$kAgent] = agent; - this[$bbf59f83ed713e5f$require$kClients] = agent[$bbf59f83ed713e5f$require$kClients]; - this[$bbf59f83ed713e5f$require$kOptions] = $bbf59f83ed713e5f$require$buildMockOptions(opts); - } - get(origin) { - let dispatcher = this[$bbf59f83ed713e5f$require$kMockAgentGet](origin); - if (!dispatcher) { - dispatcher = this[$bbf59f83ed713e5f$require$kFactory](origin); - this[$bbf59f83ed713e5f$require$kMockAgentSet](origin, dispatcher); - } - return dispatcher; - } - dispatch(opts, handler) { - // Call MockAgent.get to perform additional setup before dispatching as normal - this.get(opts.origin); - return this[$bbf59f83ed713e5f$require$kAgent].dispatch(opts, handler); - } - async close() { - await this[$bbf59f83ed713e5f$require$kAgent].close(); - this[$bbf59f83ed713e5f$require$kClients].clear(); - } - deactivate() { - this[$bbf59f83ed713e5f$require$kIsMockActive] = false; - } - activate() { - this[$bbf59f83ed713e5f$require$kIsMockActive] = true; - } - enableNetConnect(matcher) { - if (typeof matcher === "string" || typeof matcher === "function" || matcher instanceof RegExp) { - if (Array.isArray(this[$bbf59f83ed713e5f$require$kNetConnect])) this[$bbf59f83ed713e5f$require$kNetConnect].push(matcher); - else this[$bbf59f83ed713e5f$require$kNetConnect] = [ - matcher - ]; - } else if (typeof matcher === "undefined") this[$bbf59f83ed713e5f$require$kNetConnect] = true; - else throw new $bbf59f83ed713e5f$require$InvalidArgumentError("Unsupported matcher. Must be one of String|Function|RegExp."); - } - disableNetConnect() { - this[$bbf59f83ed713e5f$require$kNetConnect] = false; - } - // This is required to bypass issues caused by using global symbols - see: - // https://github.com/nodejs/undici/issues/1447 - get isMockActive() { - return this[$bbf59f83ed713e5f$require$kIsMockActive]; - } - [$bbf59f83ed713e5f$require$kMockAgentSet](origin, dispatcher) { - this[$bbf59f83ed713e5f$require$kClients].set(origin, new $bbf59f83ed713e5f$var$FakeWeakRef(dispatcher)); - } - [$bbf59f83ed713e5f$require$kFactory](origin) { - const mockOptions = Object.assign({ - agent: this - }, this[$bbf59f83ed713e5f$require$kOptions]); - return this[$bbf59f83ed713e5f$require$kOptions] && this[$bbf59f83ed713e5f$require$kOptions].connections === 1 ? new $7FGTp(origin, mockOptions) : new $1OZd4(origin, mockOptions); +var $eMXiC = parcelRequire("eMXiC"); +var $9fdf699a27069a43$require$WebsocketFrameSend = $eMXiC.WebsocketFrameSend; +/** @type {import('crypto')} */ let $9fdf699a27069a43$var$crypto; + +try { + $9fdf699a27069a43$var$crypto = $9fdf699a27069a43$import$f993fb99d62ff7ac; +/* c8 ignore next 3 */ } catch {} +/** + * @see https://websockets.spec.whatwg.org/#concept-websocket-establish + * @param {URL} url + * @param {string|string[]} protocols + * @param {import('./websocket').WebSocket} ws + * @param {(response: any, extensions: string[] | undefined) => void} onEstablish + * @param {Partial} options + */ function $9fdf699a27069a43$var$establishWebSocketConnection(url, protocols, client, ws, onEstablish, options) { + // 1. Let requestURL be a copy of url, with its scheme set to "http", if url’s + // scheme is "ws", and to "https" otherwise. + const requestURL = url; + requestURL.protocol = url.protocol === 'ws:' ? 'http:' : 'https:'; + // 2. Let request be a new request, whose URL is requestURL, client is client, + // service-workers mode is "none", referrer is "no-referrer", mode is + // "websocket", credentials mode is "include", cache mode is "no-store" , + // and redirect mode is "error". + const request = $9fdf699a27069a43$require$makeRequest({ + urlList: [ + requestURL + ], + client: client, + serviceWorkers: 'none', + referrer: 'no-referrer', + mode: 'websocket', + credentials: 'include', + cache: 'no-store', + redirect: 'error' + }); + // Note: undici extension, allow setting custom headers. + if (options.headers) { + const headersList = $9fdf699a27069a43$require$getHeadersList(new $9fdf699a27069a43$require$Headers(options.headers)); + request.headersList = headersList; } - [$bbf59f83ed713e5f$require$kMockAgentGet](origin) { - // First check if we can immediately find it - const ref = this[$bbf59f83ed713e5f$require$kClients].get(origin); - if (ref) return ref.deref(); - // If the origin is not a string create a dummy parent pool and return to user - if (typeof origin !== "string") { - const dispatcher = this[$bbf59f83ed713e5f$require$kFactory]("http://localhost:9999"); - this[$bbf59f83ed713e5f$require$kMockAgentSet](origin, dispatcher); - return dispatcher; - } - // If we match, create a pool and assign the same dispatches - for (const [keyMatcher, nonExplicitRef] of Array.from(this[$bbf59f83ed713e5f$require$kClients])){ - const nonExplicitDispatcher = nonExplicitRef.deref(); - if (nonExplicitDispatcher && typeof keyMatcher !== "string" && $bbf59f83ed713e5f$require$matchValue(keyMatcher, origin)) { - const dispatcher = this[$bbf59f83ed713e5f$require$kFactory](origin); - this[$bbf59f83ed713e5f$require$kMockAgentSet](origin, dispatcher); - dispatcher[$bbf59f83ed713e5f$require$kDispatches] = nonExplicitDispatcher[$bbf59f83ed713e5f$require$kDispatches]; - return dispatcher; + // 3. Append (`Upgrade`, `websocket`) to request’s header list. + // 4. Append (`Connection`, `Upgrade`) to request’s header list. + // Note: both of these are handled by undici currently. + // https://github.com/nodejs/undici/blob/68c269c4144c446f3f1220951338daef4a6b5ec4/lib/client.js#L1397 + // 5. Let keyValue be a nonce consisting of a randomly selected + // 16-byte value that has been forgiving-base64-encoded and + // isomorphic encoded. + const keyValue = $9fdf699a27069a43$var$crypto.randomBytes(16).toString('base64'); + // 6. Append (`Sec-WebSocket-Key`, keyValue) to request’s + // header list. + request.headersList.append('sec-websocket-key', keyValue); + // 7. Append (`Sec-WebSocket-Version`, `13`) to request’s + // header list. + request.headersList.append('sec-websocket-version', '13'); + // 8. For each protocol in protocols, combine + // (`Sec-WebSocket-Protocol`, protocol) in request’s header + // list. + for (const protocol of protocols)request.headersList.append('sec-websocket-protocol', protocol); + // 9. Let permessageDeflate be a user-agent defined + // "permessage-deflate" extension header value. + // https://github.com/mozilla/gecko-dev/blob/ce78234f5e653a5d3916813ff990f053510227bc/netwerk/protocol/websocket/WebSocketChannel.cpp#L2673 + const permessageDeflate = 'permessage-deflate; client_max_window_bits'; + // 10. Append (`Sec-WebSocket-Extensions`, permessageDeflate) to + // request’s header list. + request.headersList.append('sec-websocket-extensions', permessageDeflate); + // 11. Fetch request with useParallelQueue set to true, and + // processResponse given response being these steps: + const controller = $9fdf699a27069a43$require$fetching({ + request: request, + useParallelQueue: true, + dispatcher: options.dispatcher, + processResponse (response) { + // 1. If response is a network error or its status is not 101, + // fail the WebSocket connection. + if (response.type === 'error' || response.status !== 101) { + $9fdf699a27069a43$require$failWebsocketConnection(ws, 'Received network error or non-101 status code.'); + return; + } + // 2. If protocols is not the empty list and extracting header + // list values given `Sec-WebSocket-Protocol` and response’s + // header list results in null, failure, or the empty byte + // sequence, then fail the WebSocket connection. + if (protocols.length !== 0 && !response.headersList.get('Sec-WebSocket-Protocol')) { + $9fdf699a27069a43$require$failWebsocketConnection(ws, 'Server did not respond with sent protocols.'); + return; + } + // 3. Follow the requirements stated step 2 to step 6, inclusive, + // of the last set of steps in section 4.1 of The WebSocket + // Protocol to validate response. This either results in fail + // the WebSocket connection or the WebSocket connection is + // established. + // 2. If the response lacks an |Upgrade| header field or the |Upgrade| + // header field contains a value that is not an ASCII case- + // insensitive match for the value "websocket", the client MUST + // _Fail the WebSocket Connection_. + if (response.headersList.get('Upgrade')?.toLowerCase() !== 'websocket') { + $9fdf699a27069a43$require$failWebsocketConnection(ws, 'Server did not set Upgrade header to "websocket".'); + return; + } + // 3. If the response lacks a |Connection| header field or the + // |Connection| header field doesn't contain a token that is an + // ASCII case-insensitive match for the value "Upgrade", the client + // MUST _Fail the WebSocket Connection_. + if (response.headersList.get('Connection')?.toLowerCase() !== 'upgrade') { + $9fdf699a27069a43$require$failWebsocketConnection(ws, 'Server did not set Connection header to "upgrade".'); + return; + } + // 4. If the response lacks a |Sec-WebSocket-Accept| header field or + // the |Sec-WebSocket-Accept| contains a value other than the + // base64-encoded SHA-1 of the concatenation of the |Sec-WebSocket- + // Key| (as a string, not base64-decoded) with the string "258EAFA5- + // E914-47DA-95CA-C5AB0DC85B11" but ignoring any leading and + // trailing whitespace, the client MUST _Fail the WebSocket + // Connection_. + const secWSAccept = response.headersList.get('Sec-WebSocket-Accept'); + const digest = $9fdf699a27069a43$var$crypto.createHash('sha1').update(keyValue + $9fdf699a27069a43$require$uid).digest('base64'); + if (secWSAccept !== digest) { + $9fdf699a27069a43$require$failWebsocketConnection(ws, 'Incorrect hash received in Sec-WebSocket-Accept header.'); + return; + } + // 5. If the response includes a |Sec-WebSocket-Extensions| header + // field and this header field indicates the use of an extension + // that was not present in the client's handshake (the server has + // indicated an extension not requested by the client), the client + // MUST _Fail the WebSocket Connection_. (The parsing of this + // header field to determine which extensions are requested is + // discussed in Section 9.1.) + const secExtension = response.headersList.get('Sec-WebSocket-Extensions'); + let extensions; + if (secExtension !== null) { + extensions = $9fdf699a27069a43$require$parseExtensions(secExtension); + if (!extensions.has('permessage-deflate')) { + $9fdf699a27069a43$require$failWebsocketConnection(ws, 'Sec-WebSocket-Extensions header does not match.'); + return; + } + } + // 6. If the response includes a |Sec-WebSocket-Protocol| header field + // and this header field indicates the use of a subprotocol that was + // not present in the client's handshake (the server has indicated a + // subprotocol not requested by the client), the client MUST _Fail + // the WebSocket Connection_. + const secProtocol = response.headersList.get('Sec-WebSocket-Protocol'); + if (secProtocol !== null) { + const requestProtocols = $9fdf699a27069a43$require$getDecodeSplit('sec-websocket-protocol', request.headersList); + // The client can request that the server use a specific subprotocol by + // including the |Sec-WebSocket-Protocol| field in its handshake. If it + // is specified, the server needs to include the same field and one of + // the selected subprotocol values in its response for the connection to + // be established. + if (!requestProtocols.includes(secProtocol)) { + $9fdf699a27069a43$require$failWebsocketConnection(ws, 'Protocol was not set in the opening handshake.'); + return; + } } + response.socket.on('data', $9fdf699a27069a43$var$onSocketData); + response.socket.on('close', $9fdf699a27069a43$var$onSocketClose); + response.socket.on('error', $9fdf699a27069a43$var$onSocketError); + if ($9fdf699a27069a43$require$channels.open.hasSubscribers) $9fdf699a27069a43$require$channels.open.publish({ + address: response.socket.address(), + protocol: secProtocol, + extensions: secExtension + }); + onEstablish(response, extensions); } - } - [$bbf59f83ed713e5f$require$kGetNetConnect]() { - return this[$bbf59f83ed713e5f$require$kNetConnect]; - } - pendingInterceptors() { - const mockAgentClients = this[$bbf59f83ed713e5f$require$kClients]; - return Array.from(mockAgentClients.entries()).flatMap(([origin, scope])=>scope.deref()[$bbf59f83ed713e5f$require$kDispatches].map((dispatch)=>({ - ...dispatch, - origin: origin - }))).filter(({ pending: pending })=>pending); - } - assertNoPendingInterceptors({ pendingInterceptorsFormatter: pendingInterceptorsFormatter = new $boLEs() } = {}) { - const pending = this.pendingInterceptors(); - if (pending.length === 0) return; - const pluralizer = new $8Wt9k("interceptor", "interceptors").pluralize(pending.length); - throw new $bbf59f83ed713e5f$require$UndiciError(` -${pluralizer.count} ${pluralizer.noun} ${pluralizer.is} pending: - -${pendingInterceptorsFormatter.format(pending)} -`.trim()); - } + }); + return controller; +} +function $9fdf699a27069a43$var$closeWebSocketConnection(ws, code, reason, reasonByteLength) { + if ($9fdf699a27069a43$require$isClosing(ws) || $9fdf699a27069a43$require$isClosed(ws)) ; + else if (!$9fdf699a27069a43$require$isEstablished(ws)) { + // If the WebSocket connection is not yet established + // Fail the WebSocket connection and set this's ready state + // to CLOSING (2). + $9fdf699a27069a43$require$failWebsocketConnection(ws, 'Connection was closed before it was established.'); + ws[$9fdf699a27069a43$require$kReadyState] = $9fdf699a27069a43$require$states.CLOSING; + } else if (ws[$9fdf699a27069a43$require$kSentClose] === $9fdf699a27069a43$require$sentCloseFrameState.NOT_SENT) { + // If the WebSocket closing handshake has not yet been started + // Start the WebSocket closing handshake and set this's ready + // state to CLOSING (2). + // - If neither code nor reason is present, the WebSocket Close + // message must not have a body. + // - If code is present, then the status code to use in the + // WebSocket Close message must be the integer given by code. + // - If reason is also present, then reasonBytes must be + // provided in the Close message after the status code. + ws[$9fdf699a27069a43$require$kSentClose] = $9fdf699a27069a43$require$sentCloseFrameState.PROCESSING; + const frame = new $9fdf699a27069a43$require$WebsocketFrameSend(); + // If neither code nor reason is present, the WebSocket Close + // message must not have a body. + // If code is present, then the status code to use in the + // WebSocket Close message must be the integer given by code. + if (code !== undefined && reason === undefined) { + frame.frameData = Buffer.allocUnsafe(2); + frame.frameData.writeUInt16BE(code, 0); + } else if (code !== undefined && reason !== undefined) { + // If reason is also present, then reasonBytes must be + // provided in the Close message after the status code. + frame.frameData = Buffer.allocUnsafe(2 + reasonByteLength); + frame.frameData.writeUInt16BE(code, 0); + // the body MAY contain UTF-8-encoded data with value /reason/ + frame.frameData.write(reason, 2, 'utf-8'); + } else frame.frameData = $9fdf699a27069a43$require$emptyBuffer; + /** @type {import('stream').Duplex} */ const socket = ws[$9fdf699a27069a43$require$kResponse].socket; + socket.write(frame.createFrame($9fdf699a27069a43$require$opcodes.CLOSE)); + ws[$9fdf699a27069a43$require$kSentClose] = $9fdf699a27069a43$require$sentCloseFrameState.SENT; + // Upon either sending or receiving a Close control frame, it is said + // that _The WebSocket Closing Handshake is Started_ and that the + // WebSocket connection is in the CLOSING state. + ws[$9fdf699a27069a43$require$kReadyState] = $9fdf699a27069a43$require$states.CLOSING; + } else // Otherwise + // Set this's ready state to CLOSING (2). + ws[$9fdf699a27069a43$require$kReadyState] = $9fdf699a27069a43$require$states.CLOSING; } -module.exports = $bbf59f83ed713e5f$var$MockAgent; - -}); -parcelRegister("1OZd4", function(module, exports) { -"use strict"; - -var $1539f0f936526da8$require$promisify = $g40fK$util.promisify; - -var $jIWP2 = parcelRequire("jIWP2"); - -var $7IqWk = parcelRequire("7IqWk"); -var $1539f0f936526da8$require$buildMockDispatch = $7IqWk.buildMockDispatch; - -var $bIy7u = parcelRequire("bIy7u"); -var $1539f0f936526da8$require$kDispatches = $bIy7u.kDispatches; -var $1539f0f936526da8$require$kMockAgent = $bIy7u.kMockAgent; -var $1539f0f936526da8$require$kClose = $bIy7u.kClose; -var $1539f0f936526da8$require$kOriginalClose = $bIy7u.kOriginalClose; -var $1539f0f936526da8$require$kOrigin = $bIy7u.kOrigin; -var $1539f0f936526da8$require$kOriginalDispatch = $bIy7u.kOriginalDispatch; -var $1539f0f936526da8$require$kConnected = $bIy7u.kConnected; - -var $g0f7S = parcelRequire("g0f7S"); -var $1539f0f936526da8$require$MockInterceptor = $g0f7S.MockInterceptor; - -var $hHZvh = parcelRequire("hHZvh"); - -var $cKdp7 = parcelRequire("cKdp7"); -var $1539f0f936526da8$require$InvalidArgumentError = $cKdp7.InvalidArgumentError; /** - * MockPool provides an API that extends the Pool to influence the mockDispatches. - */ class $1539f0f936526da8$var$MockPool extends $jIWP2 { - constructor(origin, opts){ - super(origin, opts); - if (!opts || !opts.agent || typeof opts.agent.dispatch !== "function") throw new $1539f0f936526da8$require$InvalidArgumentError("Argument opts.agent must implement Agent"); - this[$1539f0f936526da8$require$kMockAgent] = opts.agent; - this[$1539f0f936526da8$require$kOrigin] = origin; - this[$1539f0f936526da8$require$kDispatches] = []; - this[$1539f0f936526da8$require$kConnected] = 1; - this[$1539f0f936526da8$require$kOriginalDispatch] = this.dispatch; - this[$1539f0f936526da8$require$kOriginalClose] = this.close.bind(this); - this.dispatch = $1539f0f936526da8$require$buildMockDispatch.call(this); - this.close = this[$1539f0f936526da8$require$kClose]; - } - get [$hHZvh.kConnected]() { - return this[$1539f0f936526da8$require$kConnected]; - } - /** - * Sets up the base interceptor for mocking replies from undici. - */ intercept(opts) { - return new $1539f0f936526da8$require$MockInterceptor(opts, this[$1539f0f936526da8$require$kDispatches]); - } - async [$1539f0f936526da8$require$kClose]() { - await $1539f0f936526da8$require$promisify(this[$1539f0f936526da8$require$kOriginalClose])(); - this[$1539f0f936526da8$require$kConnected] = 0; - this[$1539f0f936526da8$require$kMockAgent][$hHZvh.kClients].delete(this[$1539f0f936526da8$require$kOrigin]); - } + * @param {Buffer} chunk + */ function $9fdf699a27069a43$var$onSocketData(chunk) { + if (!this.ws[$9fdf699a27069a43$require$kByteParser].write(chunk)) this.pause(); } -module.exports = $1539f0f936526da8$var$MockPool; - -}); - -parcelRegister("8Wt9k", function(module, exports) { -"use strict"; -const $682a5a0069c7e6e9$var$singulars = { - pronoun: "it", - is: "is", - was: "was", - this: "this" -}; -const $682a5a0069c7e6e9$var$plurals = { - pronoun: "they", - is: "are", - was: "were", - this: "these" -}; -module.exports = class Pluralizer { - constructor(singular, plural){ - this.singular = singular; - this.plural = plural; - } - pluralize(count) { - const one = count === 1; - const keys = one ? $682a5a0069c7e6e9$var$singulars : $682a5a0069c7e6e9$var$plurals; - const noun = one ? this.singular : this.plural; - return { - ...keys, - count: count, - noun: noun - }; - } +/** + * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol + * @see https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.4 + */ function $9fdf699a27069a43$var$onSocketClose() { + const { ws: ws } = this; + const { [$9fdf699a27069a43$require$kResponse]: response } = ws; + response.socket.off('data', $9fdf699a27069a43$var$onSocketData); + response.socket.off('close', $9fdf699a27069a43$var$onSocketClose); + response.socket.off('error', $9fdf699a27069a43$var$onSocketError); + // If the TCP connection was closed after the + // WebSocket closing handshake was completed, the WebSocket connection + // is said to have been closed _cleanly_. + const wasClean = ws[$9fdf699a27069a43$require$kSentClose] === $9fdf699a27069a43$require$sentCloseFrameState.SENT && ws[$9fdf699a27069a43$require$kReceivedClose]; + let code = 1005; + let reason = ''; + const result = ws[$9fdf699a27069a43$require$kByteParser].closingInfo; + if (result && !result.error) { + code = result.code ?? 1005; + reason = result.reason; + } else if (!ws[$9fdf699a27069a43$require$kReceivedClose]) // If _The WebSocket + // Connection is Closed_ and no Close control frame was received by the + // endpoint (such as could occur if the underlying transport connection + // is lost), _The WebSocket Connection Close Code_ is considered to be + // 1006. + code = 1006; + // 1. Change the ready state to CLOSED (3). + ws[$9fdf699a27069a43$require$kReadyState] = $9fdf699a27069a43$require$states.CLOSED; + // 2. If the user agent was required to fail the WebSocket + // connection, or if the WebSocket connection was closed + // after being flagged as full, fire an event named error + // at the WebSocket object. + // TODO + // 3. Fire an event named close at the WebSocket object, + // using CloseEvent, with the wasClean attribute + // initialized to true if the connection closed cleanly + // and false otherwise, the code attribute initialized to + // the WebSocket connection close code, and the reason + // attribute initialized to the result of applying UTF-8 + // decode without BOM to the WebSocket connection close + // reason. + // TODO: process.nextTick + $9fdf699a27069a43$require$fireEvent('close', ws, (type, init)=>new $9fdf699a27069a43$require$CloseEvent(type, init), { + wasClean: wasClean, + code: code, + reason: reason + }); + if ($9fdf699a27069a43$require$channels.close.hasSubscribers) $9fdf699a27069a43$require$channels.close.publish({ + websocket: ws, + code: code, + reason: reason + }); +} +function $9fdf699a27069a43$var$onSocketError(error) { + const { ws: ws } = this; + ws[$9fdf699a27069a43$require$kReadyState] = $9fdf699a27069a43$require$states.CLOSING; + if ($9fdf699a27069a43$require$channels.socketError.hasSubscribers) $9fdf699a27069a43$require$channels.socketError.publish(error); + this.destroy(); +} +module.exports = { + establishWebSocketConnection: $9fdf699a27069a43$var$establishWebSocketConnection, + closeWebSocketConnection: $9fdf699a27069a43$var$closeWebSocketConnection }; }); - -parcelRegister("boLEs", function(module, exports) { -"use strict"; - -var $84c6e633f96ce3b7$require$Transform = $g40fK$stream.Transform; - -var $84c6e633f96ce3b7$require$Console = $g40fK$console.Console; -/** - * Gets the output of `console.table(…)` as a string. - */ module.exports = class PendingInterceptorsFormatter { - constructor({ disableColors: disableColors } = {}){ - this.transform = new $84c6e633f96ce3b7$require$Transform({ - transform (chunk, _enc, cb) { - cb(null, chunk); - } +parcelRegister("l6jyj", function(module, exports) { +'use strict'; + + +const $f5c953394c01117e$var$undiciDebugLog = $in2sP$nodeutil.debuglog('undici'); +const $f5c953394c01117e$var$fetchDebuglog = $in2sP$nodeutil.debuglog('fetch'); +const $f5c953394c01117e$var$websocketDebuglog = $in2sP$nodeutil.debuglog('websocket'); +let $f5c953394c01117e$var$isClientSet = false; +const $f5c953394c01117e$var$channels = { + // Client + beforeConnect: $in2sP$nodediagnostics_channel.channel('undici:client:beforeConnect'), + connected: $in2sP$nodediagnostics_channel.channel('undici:client:connected'), + connectError: $in2sP$nodediagnostics_channel.channel('undici:client:connectError'), + sendHeaders: $in2sP$nodediagnostics_channel.channel('undici:client:sendHeaders'), + // Request + create: $in2sP$nodediagnostics_channel.channel('undici:request:create'), + bodySent: $in2sP$nodediagnostics_channel.channel('undici:request:bodySent'), + headers: $in2sP$nodediagnostics_channel.channel('undici:request:headers'), + trailers: $in2sP$nodediagnostics_channel.channel('undici:request:trailers'), + error: $in2sP$nodediagnostics_channel.channel('undici:request:error'), + // WebSocket + open: $in2sP$nodediagnostics_channel.channel('undici:websocket:open'), + close: $in2sP$nodediagnostics_channel.channel('undici:websocket:close'), + socketError: $in2sP$nodediagnostics_channel.channel('undici:websocket:socket_error'), + ping: $in2sP$nodediagnostics_channel.channel('undici:websocket:ping'), + pong: $in2sP$nodediagnostics_channel.channel('undici:websocket:pong') +}; +if ($f5c953394c01117e$var$undiciDebugLog.enabled || $f5c953394c01117e$var$fetchDebuglog.enabled) { + const debuglog = $f5c953394c01117e$var$fetchDebuglog.enabled ? $f5c953394c01117e$var$fetchDebuglog : $f5c953394c01117e$var$undiciDebugLog; + // Track all Client events + $in2sP$nodediagnostics_channel.channel('undici:client:beforeConnect').subscribe((evt)=>{ + const { connectParams: { version: version, protocol: protocol, port: port, host: host } } = evt; + debuglog('connecting to %s using %s%s', `${host}${port ? `:${port}` : ''}`, protocol, version); + }); + $in2sP$nodediagnostics_channel.channel('undici:client:connected').subscribe((evt)=>{ + const { connectParams: { version: version, protocol: protocol, port: port, host: host } } = evt; + debuglog('connected to %s using %s%s', `${host}${port ? `:${port}` : ''}`, protocol, version); + }); + $in2sP$nodediagnostics_channel.channel('undici:client:connectError').subscribe((evt)=>{ + const { connectParams: { version: version, protocol: protocol, port: port, host: host }, error: error } = evt; + debuglog('connection to %s using %s%s errored - %s', `${host}${port ? `:${port}` : ''}`, protocol, version, error.message); + }); + $in2sP$nodediagnostics_channel.channel('undici:client:sendHeaders').subscribe((evt)=>{ + const { request: { method: method, path: path, origin: origin } } = evt; + debuglog('sending request to %s %s/%s', method, origin, path); + }); + // Track Request events + $in2sP$nodediagnostics_channel.channel('undici:request:headers').subscribe((evt)=>{ + const { request: { method: method, path: path, origin: origin }, response: { statusCode: statusCode } } = evt; + debuglog('received response to %s %s/%s - HTTP %d', method, origin, path, statusCode); + }); + $in2sP$nodediagnostics_channel.channel('undici:request:trailers').subscribe((evt)=>{ + const { request: { method: method, path: path, origin: origin } } = evt; + debuglog('trailers received from %s %s/%s', method, origin, path); + }); + $in2sP$nodediagnostics_channel.channel('undici:request:error').subscribe((evt)=>{ + const { request: { method: method, path: path, origin: origin }, error: error } = evt; + debuglog('request to %s %s/%s errored - %s', method, origin, path, error.message); + }); + $f5c953394c01117e$var$isClientSet = true; +} +if ($f5c953394c01117e$var$websocketDebuglog.enabled) { + if (!$f5c953394c01117e$var$isClientSet) { + const debuglog = $f5c953394c01117e$var$undiciDebugLog.enabled ? $f5c953394c01117e$var$undiciDebugLog : $f5c953394c01117e$var$websocketDebuglog; + $in2sP$nodediagnostics_channel.channel('undici:client:beforeConnect').subscribe((evt)=>{ + const { connectParams: { version: version, protocol: protocol, port: port, host: host } } = evt; + debuglog('connecting to %s%s using %s%s', host, port ? `:${port}` : '', protocol, version); }); - this.logger = new $84c6e633f96ce3b7$require$Console({ - stdout: this.transform, - inspectOptions: { - colors: !disableColors && !process.env.CI - } + $in2sP$nodediagnostics_channel.channel('undici:client:connected').subscribe((evt)=>{ + const { connectParams: { version: version, protocol: protocol, port: port, host: host } } = evt; + debuglog('connected to %s%s using %s%s', host, port ? `:${port}` : '', protocol, version); + }); + $in2sP$nodediagnostics_channel.channel('undici:client:connectError').subscribe((evt)=>{ + const { connectParams: { version: version, protocol: protocol, port: port, host: host }, error: error } = evt; + debuglog('connection to %s%s using %s%s errored - %s', host, port ? `:${port}` : '', protocol, version, error.message); + }); + $in2sP$nodediagnostics_channel.channel('undici:client:sendHeaders').subscribe((evt)=>{ + const { request: { method: method, path: path, origin: origin } } = evt; + debuglog('sending request to %s %s/%s', method, origin, path); }); } - format(pendingInterceptors) { - const withPrettyHeaders = pendingInterceptors.map(({ method: method, path: path, data: { statusCode: statusCode }, persist: persist, times: times, timesInvoked: timesInvoked, origin: origin })=>({ - Method: method, - Origin: origin, - Path: path, - "Status code": statusCode, - Persistent: persist ? "\u2705" : "\u274C", - Invocations: timesInvoked, - Remaining: persist ? Infinity : times - timesInvoked - })); - this.logger.table(withPrettyHeaders); - return this.transform.read().toString(); - } + // Track all WebSocket events + $in2sP$nodediagnostics_channel.channel('undici:websocket:open').subscribe((evt)=>{ + const { address: { address: address, port: port } } = evt; + $f5c953394c01117e$var$websocketDebuglog('connection opened %s%s', address, port ? `:${port}` : ''); + }); + $in2sP$nodediagnostics_channel.channel('undici:websocket:close').subscribe((evt)=>{ + const { websocket: websocket, code: code, reason: reason } = evt; + $f5c953394c01117e$var$websocketDebuglog('closed connection to %s - %s %s', websocket.url, code, reason); + }); + $in2sP$nodediagnostics_channel.channel('undici:websocket:socket_error').subscribe((err)=>{ + $f5c953394c01117e$var$websocketDebuglog('connection errored - %s', err.message); + }); + $in2sP$nodediagnostics_channel.channel('undici:websocket:ping').subscribe((evt)=>{ + $f5c953394c01117e$var$websocketDebuglog('ping received'); + }); + $in2sP$nodediagnostics_channel.channel('undici:websocket:pong').subscribe((evt)=>{ + $f5c953394c01117e$var$websocketDebuglog('pong received'); + }); +} +module.exports = { + channels: $f5c953394c01117e$var$channels }; }); - -parcelRegister("2hsMF", function(module, exports) { -"use strict"; - -var $hHZvh = parcelRequire("hHZvh"); -var $1a937f31faea024b$require$kProxy = $hHZvh.kProxy; -var $1a937f31faea024b$require$kClose = $hHZvh.kClose; -var $1a937f31faea024b$require$kDestroy = $hHZvh.kDestroy; -var $1a937f31faea024b$require$kInterceptors = $hHZvh.kInterceptors; - -var $1a937f31faea024b$require$URL = $g40fK$url.URL; - -var $3zvEP = parcelRequire("3zvEP"); - -var $jIWP2 = parcelRequire("jIWP2"); - -var $8lFjX = parcelRequire("8lFjX"); - -var $cKdp7 = parcelRequire("cKdp7"); -var $1a937f31faea024b$require$InvalidArgumentError = $cKdp7.InvalidArgumentError; -var $1a937f31faea024b$require$RequestAbortedError = $cKdp7.RequestAbortedError; - -var $h3cex = parcelRequire("h3cex"); -const $1a937f31faea024b$var$kAgent = Symbol("proxy agent"); -const $1a937f31faea024b$var$kClient = Symbol("proxy client"); -const $1a937f31faea024b$var$kProxyHeaders = Symbol("proxy headers"); -const $1a937f31faea024b$var$kRequestTls = Symbol("request tls settings"); -const $1a937f31faea024b$var$kProxyTls = Symbol("proxy tls settings"); -const $1a937f31faea024b$var$kConnectEndpoint = Symbol("connect endpoint function"); -function $1a937f31faea024b$var$defaultProtocolPort(protocol) { - return protocol === "https:" ? 443 : 80; -} -function $1a937f31faea024b$var$buildProxyOptions(opts) { - if (typeof opts === "string") opts = { - uri: opts - }; - if (!opts || !opts.uri) throw new $1a937f31faea024b$require$InvalidArgumentError("Proxy opts.uri is mandatory"); - return { - uri: opts.uri, - protocol: opts.protocol || "https" - }; -} -function $1a937f31faea024b$var$defaultFactory(origin, opts) { - return new $jIWP2(origin, opts); -} -class $1a937f31faea024b$var$ProxyAgent extends $8lFjX { - constructor(opts){ - super(opts); - this[$1a937f31faea024b$require$kProxy] = $1a937f31faea024b$var$buildProxyOptions(opts); - this[$1a937f31faea024b$var$kAgent] = new $3zvEP(opts); - this[$1a937f31faea024b$require$kInterceptors] = opts.interceptors && opts.interceptors.ProxyAgent && Array.isArray(opts.interceptors.ProxyAgent) ? opts.interceptors.ProxyAgent : []; - if (typeof opts === "string") opts = { - uri: opts - }; - if (!opts || !opts.uri) throw new $1a937f31faea024b$require$InvalidArgumentError("Proxy opts.uri is mandatory"); - const { clientFactory: clientFactory = $1a937f31faea024b$var$defaultFactory } = opts; - if (typeof clientFactory !== "function") throw new $1a937f31faea024b$require$InvalidArgumentError("Proxy opts.clientFactory must be a function."); - this[$1a937f31faea024b$var$kRequestTls] = opts.requestTls; - this[$1a937f31faea024b$var$kProxyTls] = opts.proxyTls; - this[$1a937f31faea024b$var$kProxyHeaders] = opts.headers || {}; - const resolvedUrl = new $1a937f31faea024b$require$URL(opts.uri); - const { origin: origin, port: port, host: host, username: username, password: password } = resolvedUrl; - if (opts.auth && opts.token) throw new $1a937f31faea024b$require$InvalidArgumentError("opts.auth cannot be used in combination with opts.token"); - else if (opts.auth) /* @deprecated in favour of opts.token */ this[$1a937f31faea024b$var$kProxyHeaders]["proxy-authorization"] = `Basic ${opts.auth}`; - else if (opts.token) this[$1a937f31faea024b$var$kProxyHeaders]["proxy-authorization"] = opts.token; - else if (username && password) this[$1a937f31faea024b$var$kProxyHeaders]["proxy-authorization"] = `Basic ${Buffer.from(`${decodeURIComponent(username)}:${decodeURIComponent(password)}`).toString("base64")}`; - const connect = $h3cex({ - ...opts.proxyTls - }); - this[$1a937f31faea024b$var$kConnectEndpoint] = $h3cex({ - ...opts.requestTls - }); - this[$1a937f31faea024b$var$kClient] = clientFactory(resolvedUrl, { - connect: connect - }); - this[$1a937f31faea024b$var$kAgent] = new $3zvEP({ - ...opts, - connect: async (opts, callback)=>{ - let requestedHost = opts.host; - if (!opts.port) requestedHost += `:${$1a937f31faea024b$var$defaultProtocolPort(opts.protocol)}`; - try { - const { socket: socket, statusCode: statusCode } = await this[$1a937f31faea024b$var$kClient].connect({ - origin: origin, - port: port, - path: requestedHost, - signal: opts.signal, - headers: { - ...this[$1a937f31faea024b$var$kProxyHeaders], - host: host - } - }); - if (statusCode !== 200) { - socket.on("error", ()=>{}).destroy(); - callback(new $1a937f31faea024b$require$RequestAbortedError(`Proxy response (${statusCode}) !== 200 when HTTP Tunneling`)); - } - if (opts.protocol !== "https:") { - callback(null, socket); - return; - } - let servername; - if (this[$1a937f31faea024b$var$kRequestTls]) servername = this[$1a937f31faea024b$var$kRequestTls].servername; - else servername = opts.servername; - this[$1a937f31faea024b$var$kConnectEndpoint]({ - ...opts, - servername: servername, - httpSocket: socket - }, callback); - } catch (err) { - callback(err); - } - } - }); - } - dispatch(opts, handler) { - const { host: host } = new $1a937f31faea024b$require$URL(opts.origin); - const headers = $1a937f31faea024b$var$buildHeaders(opts.headers); - $1a937f31faea024b$var$throwIfProxyAuthIsSent(headers); - return this[$1a937f31faea024b$var$kAgent].dispatch({ - ...opts, - headers: { - ...headers, - host: host - } - }, handler); - } - async [$1a937f31faea024b$require$kClose]() { - await this[$1a937f31faea024b$var$kAgent].close(); - await this[$1a937f31faea024b$var$kClient].close(); +parcelRegister("awCP7", function(module, exports) { +// https://github.com/Ethan-Arrowood/undici-fetch +'use strict'; + +var $85Oaa = parcelRequire("85Oaa"); +var $7a9b02141dd10726$require$makeNetworkError = $85Oaa.makeNetworkError; +var $7a9b02141dd10726$require$makeAppropriateNetworkError = $85Oaa.makeAppropriateNetworkError; +var $7a9b02141dd10726$require$filterResponse = $85Oaa.filterResponse; +var $7a9b02141dd10726$require$makeResponse = $85Oaa.makeResponse; +var $7a9b02141dd10726$require$fromInnerResponse = $85Oaa.fromInnerResponse; + +var $3dLRE = parcelRequire("3dLRE"); +var $7a9b02141dd10726$require$HeadersList = $3dLRE.HeadersList; + +var $9rjJZ = parcelRequire("9rjJZ"); +var $7a9b02141dd10726$require$Request = $9rjJZ.Request; +var $7a9b02141dd10726$require$cloneRequest = $9rjJZ.cloneRequest; + + +var $7z0I9 = parcelRequire("7z0I9"); +var $7a9b02141dd10726$require$bytesMatch = $7z0I9.bytesMatch; +var $7a9b02141dd10726$require$makePolicyContainer = $7z0I9.makePolicyContainer; +var $7a9b02141dd10726$require$clonePolicyContainer = $7z0I9.clonePolicyContainer; +var $7a9b02141dd10726$require$requestBadPort = $7z0I9.requestBadPort; +var $7a9b02141dd10726$require$TAOCheck = $7z0I9.TAOCheck; +var $7a9b02141dd10726$require$appendRequestOriginHeader = $7z0I9.appendRequestOriginHeader; +var $7a9b02141dd10726$require$responseLocationURL = $7z0I9.responseLocationURL; +var $7a9b02141dd10726$require$requestCurrentURL = $7z0I9.requestCurrentURL; +var $7a9b02141dd10726$require$setRequestReferrerPolicyOnRedirect = $7z0I9.setRequestReferrerPolicyOnRedirect; +var $7a9b02141dd10726$require$tryUpgradeRequestToAPotentiallyTrustworthyURL = $7z0I9.tryUpgradeRequestToAPotentiallyTrustworthyURL; +var $7a9b02141dd10726$require$createOpaqueTimingInfo = $7z0I9.createOpaqueTimingInfo; +var $7a9b02141dd10726$require$appendFetchMetadata = $7z0I9.appendFetchMetadata; +var $7a9b02141dd10726$require$corsCheck = $7z0I9.corsCheck; +var $7a9b02141dd10726$require$crossOriginResourcePolicyCheck = $7z0I9.crossOriginResourcePolicyCheck; +var $7a9b02141dd10726$require$determineRequestsReferrer = $7z0I9.determineRequestsReferrer; +var $7a9b02141dd10726$require$coarsenedSharedCurrentTime = $7z0I9.coarsenedSharedCurrentTime; +var $7a9b02141dd10726$require$createDeferredPromise = $7z0I9.createDeferredPromise; +var $7a9b02141dd10726$require$isBlobLike = $7z0I9.isBlobLike; +var $7a9b02141dd10726$require$sameOrigin = $7z0I9.sameOrigin; +var $7a9b02141dd10726$require$isCancelled = $7z0I9.isCancelled; +var $7a9b02141dd10726$require$isAborted = $7z0I9.isAborted; +var $7a9b02141dd10726$require$isErrorLike = $7z0I9.isErrorLike; +var $7a9b02141dd10726$require$fullyReadBody = $7z0I9.fullyReadBody; +var $7a9b02141dd10726$require$readableStreamClose = $7z0I9.readableStreamClose; +var $7a9b02141dd10726$require$isomorphicEncode = $7z0I9.isomorphicEncode; +var $7a9b02141dd10726$require$urlIsLocal = $7z0I9.urlIsLocal; +var $7a9b02141dd10726$require$urlIsHttpHttpsScheme = $7z0I9.urlIsHttpHttpsScheme; +var $7a9b02141dd10726$require$urlHasHttpsScheme = $7z0I9.urlHasHttpsScheme; +var $7a9b02141dd10726$require$clampAndCoarsenConnectionTimingInfo = $7z0I9.clampAndCoarsenConnectionTimingInfo; +var $7a9b02141dd10726$require$simpleRangeHeaderValue = $7z0I9.simpleRangeHeaderValue; +var $7a9b02141dd10726$require$buildContentRange = $7z0I9.buildContentRange; +var $7a9b02141dd10726$require$createInflate = $7z0I9.createInflate; +var $7a9b02141dd10726$require$extractMimeType = $7z0I9.extractMimeType; + +var $faXHi = parcelRequire("faXHi"); +var $7a9b02141dd10726$require$kState = $faXHi.kState; +var $7a9b02141dd10726$require$kDispatcher = $faXHi.kDispatcher; + + +var $8masf = parcelRequire("8masf"); +var $7a9b02141dd10726$require$safelyExtractBody = $8masf.safelyExtractBody; +var $7a9b02141dd10726$require$extractBody = $8masf.extractBody; + +var $4nb4n = parcelRequire("4nb4n"); +var $7a9b02141dd10726$require$redirectStatusSet = $4nb4n.redirectStatusSet; +var $7a9b02141dd10726$require$nullBodyStatus = $4nb4n.nullBodyStatus; +var $7a9b02141dd10726$require$safeMethodsSet = $4nb4n.safeMethodsSet; +var $7a9b02141dd10726$require$requestBodyHeader = $4nb4n.requestBodyHeader; +var $7a9b02141dd10726$require$subresourceSet = $4nb4n.subresourceSet; + + +var $7a9b02141dd10726$require$Readable = $in2sP$nodestream.Readable; +var $7a9b02141dd10726$require$pipeline = $in2sP$nodestream.pipeline; +var $7a9b02141dd10726$require$finished = $in2sP$nodestream.finished; + +var $bFRvW = parcelRequire("bFRvW"); +var $7a9b02141dd10726$require$addAbortListener = $bFRvW.addAbortListener; +var $7a9b02141dd10726$require$isErrored = $bFRvW.isErrored; +var $7a9b02141dd10726$require$isReadable = $bFRvW.isReadable; +var $7a9b02141dd10726$require$bufferToLowerCasedHeaderName = $bFRvW.bufferToLowerCasedHeaderName; + +var $30IsM = parcelRequire("30IsM"); +var $7a9b02141dd10726$require$dataURLProcessor = $30IsM.dataURLProcessor; +var $7a9b02141dd10726$require$serializeAMimeType = $30IsM.serializeAMimeType; +var $7a9b02141dd10726$require$minimizeSupportedMimeType = $30IsM.minimizeSupportedMimeType; + +var $A4fmv = parcelRequire("A4fmv"); +var $7a9b02141dd10726$require$getGlobalDispatcher = $A4fmv.getGlobalDispatcher; + +var $5HTG7 = parcelRequire("5HTG7"); +var $7a9b02141dd10726$require$webidl = $5HTG7.webidl; + +var $7a9b02141dd10726$require$STATUS_CODES = $in2sP$nodehttp.STATUS_CODES; +const $7a9b02141dd10726$var$GET_OR_HEAD = [ + 'GET', + 'HEAD' +]; +const $7a9b02141dd10726$var$defaultUserAgent = typeof __UNDICI_IS_NODE__ !== 'undefined' || typeof esbuildDetection !== 'undefined' ? 'node' : 'undici'; +/** @type {import('buffer').resolveObjectURL} */ let $7a9b02141dd10726$var$resolveObjectURL; +class $7a9b02141dd10726$var$Fetch extends $in2sP$nodeevents { + constructor(dispatcher){ + super(); + this.dispatcher = dispatcher; + this.connection = null; + this.dump = false; + this.state = 'ongoing'; } - async [$1a937f31faea024b$require$kDestroy]() { - await this[$1a937f31faea024b$var$kAgent].destroy(); - await this[$1a937f31faea024b$var$kClient].destroy(); + terminate(reason) { + if (this.state !== 'ongoing') return; + this.state = 'terminated'; + this.connection?.destroy(reason); + this.emit('terminated', reason); } -} -/** - * @param {string[] | Record} headers - * @returns {Record} - */ function $1a937f31faea024b$var$buildHeaders(headers) { - // When using undici.fetch, the headers list is stored - // as an array. - if (Array.isArray(headers)) { - /** @type {Record} */ const headersPair = {}; - for(let i = 0; i < headers.length; i += 2)headersPair[headers[i]] = headers[i + 1]; - return headersPair; + // https://fetch.spec.whatwg.org/#fetch-controller-abort + abort(error) { + if (this.state !== 'ongoing') return; + // 1. Set controller’s state to "aborted". + this.state = 'aborted'; + // 2. Let fallbackError be an "AbortError" DOMException. + // 3. Set error to fallbackError if it is not given. + if (!error) error = new DOMException('The operation was aborted.', 'AbortError'); + // 4. Let serializedError be StructuredSerialize(error). + // If that threw an exception, catch it, and let + // serializedError be StructuredSerialize(fallbackError). + // 5. Set controller’s serialized abort reason to serializedError. + this.serializedAbortReason = error; + this.connection?.destroy(error); + this.emit('terminated', error); } - return headers; } -/** - * @param {Record} headers - * - * Previous versions of ProxyAgent suggests the Proxy-Authorization in request headers - * Nevertheless, it was changed and to avoid a security vulnerability by end users - * this check was created. - * It should be removed in the next major version for performance reasons - */ function $1a937f31faea024b$var$throwIfProxyAuthIsSent(headers) { - const existProxyAuth = headers && Object.keys(headers).find((key)=>key.toLowerCase() === "proxy-authorization"); - if (existProxyAuth) throw new $1a937f31faea024b$require$InvalidArgumentError("Proxy-Authorization should be sent in ProxyAgent constructor"); +function $7a9b02141dd10726$var$handleFetchDone(response) { + $7a9b02141dd10726$var$finalizeAndReportTiming(response, 'fetch'); } -module.exports = $1a937f31faea024b$var$ProxyAgent; - -}); - -parcelRegister("hQ6kK", function(module, exports) { - - -var $hHZvh = parcelRequire("hHZvh"); -var $cfcc34ba1f534d0b$require$kRetryHandlerDefaultRetry = $hHZvh.kRetryHandlerDefaultRetry; - -var $cKdp7 = parcelRequire("cKdp7"); -var $cfcc34ba1f534d0b$require$RequestRetryError = $cKdp7.RequestRetryError; - -var $gv2nV = parcelRequire("gv2nV"); -var $cfcc34ba1f534d0b$require$isDisturbed = $gv2nV.isDisturbed; -var $cfcc34ba1f534d0b$require$parseHeaders = $gv2nV.parseHeaders; -var $cfcc34ba1f534d0b$require$parseRangeHeader = $gv2nV.parseRangeHeader; -function $cfcc34ba1f534d0b$var$calculateRetryAfterHeader(retryAfter) { - const current = Date.now(); - const diff = new Date(retryAfter).getTime() - current; - return diff; +// https://fetch.spec.whatwg.org/#fetch-method +function $7a9b02141dd10726$var$fetch(input, init) { + $7a9b02141dd10726$require$webidl.argumentLengthCheck(arguments, 1, 'globalThis.fetch'); + // 1. Let p be a new promise. + let p = $7a9b02141dd10726$require$createDeferredPromise(); + // 2. Let requestObject be the result of invoking the initial value of + // Request as constructor with input and init as arguments. If this throws + // an exception, reject p with it and return p. + let requestObject; + try { + requestObject = new $7a9b02141dd10726$require$Request(input, init); + } catch (e) { + p.reject(e); + return p.promise; + } + // 3. Let request be requestObject’s request. + const request = requestObject[$7a9b02141dd10726$require$kState]; + // 4. If requestObject’s signal’s aborted flag is set, then: + if (requestObject.signal.aborted) { + // 1. Abort the fetch() call with p, request, null, and + // requestObject’s signal’s abort reason. + $7a9b02141dd10726$var$abortFetch(p, request, null, requestObject.signal.reason); + // 2. Return p. + return p.promise; + } + // 5. Let globalObject be request’s client’s global object. + const globalObject = request.client.globalObject; + // 6. If globalObject is a ServiceWorkerGlobalScope object, then set + // request’s service-workers mode to "none". + if (globalObject?.constructor?.name === 'ServiceWorkerGlobalScope') request.serviceWorkers = 'none'; + // 7. Let responseObject be null. + let responseObject = null; + // 8. Let relevantRealm be this’s relevant Realm. + // 9. Let locallyAborted be false. + let locallyAborted = false; + // 10. Let controller be null. + let controller = null; + // 11. Add the following abort steps to requestObject’s signal: + $7a9b02141dd10726$require$addAbortListener(requestObject.signal, ()=>{ + // 1. Set locallyAborted to true. + locallyAborted = true; + // 2. Assert: controller is non-null. + $in2sP$nodeassert(controller != null); + // 3. Abort controller with requestObject’s signal’s abort reason. + controller.abort(requestObject.signal.reason); + const realResponse = responseObject?.deref(); + // 4. Abort the fetch() call with p, request, responseObject, + // and requestObject’s signal’s abort reason. + $7a9b02141dd10726$var$abortFetch(p, request, realResponse, requestObject.signal.reason); + }); + // 12. Let handleFetchDone given response response be to finalize and + // report timing with response, globalObject, and "fetch". + // see function handleFetchDone + // 13. Set controller to the result of calling fetch given request, + // with processResponseEndOfBody set to handleFetchDone, and processResponse + // given response being these substeps: + const processResponse = (response)=>{ + // 1. If locallyAborted is true, terminate these substeps. + if (locallyAborted) return; + // 2. If response’s aborted flag is set, then: + if (response.aborted) { + // 1. Let deserializedError be the result of deserialize a serialized + // abort reason given controller’s serialized abort reason and + // relevantRealm. + // 2. Abort the fetch() call with p, request, responseObject, and + // deserializedError. + $7a9b02141dd10726$var$abortFetch(p, request, responseObject, controller.serializedAbortReason); + return; + } + // 3. If response is a network error, then reject p with a TypeError + // and terminate these substeps. + if (response.type === 'error') { + p.reject(new TypeError('fetch failed', { + cause: response.error + })); + return; + } + // 4. Set responseObject to the result of creating a Response object, + // given response, "immutable", and relevantRealm. + responseObject = new WeakRef($7a9b02141dd10726$require$fromInnerResponse(response, 'immutable')); + // 5. Resolve p with responseObject. + p.resolve(responseObject.deref()); + p = null; + }; + controller = $7a9b02141dd10726$var$fetching({ + request: request, + processResponseEndOfBody: $7a9b02141dd10726$var$handleFetchDone, + processResponse: processResponse, + dispatcher: requestObject[$7a9b02141dd10726$require$kDispatcher] // undici + }); + // 14. Return p. + return p.promise; } -class $cfcc34ba1f534d0b$var$RetryHandler { - constructor(opts, handlers){ - const { retryOptions: retryOptions, ...dispatchOpts } = opts; - const { // Retry scoped - retry: retryFn, maxRetries: maxRetries, maxTimeout: maxTimeout, minTimeout: minTimeout, timeoutFactor: timeoutFactor, methods: // Response scoped - methods, errorCodes: errorCodes, retryAfter: retryAfter, statusCodes: statusCodes } = retryOptions ?? {}; - this.dispatch = handlers.dispatch; - this.handler = handlers.handler; - this.opts = dispatchOpts; - this.abort = null; - this.aborted = false; - this.retryOpts = { - retry: retryFn ?? $cfcc34ba1f534d0b$var$RetryHandler[$cfcc34ba1f534d0b$require$kRetryHandlerDefaultRetry], - retryAfter: retryAfter ?? true, - maxTimeout: maxTimeout ?? 30000, - timeout: minTimeout ?? 500, - timeoutFactor: timeoutFactor ?? 2, - maxRetries: maxRetries ?? 5, - // What errors we should retry - methods: methods ?? [ - "GET", - "HEAD", - "OPTIONS", - "PUT", - "DELETE", - "TRACE" - ], - // Indicates which errors to retry - statusCodes: statusCodes ?? [ - 500, - 502, - 503, - 504, - 429 - ], - // List of errors to retry - errorCodes: errorCodes ?? [ - "ECONNRESET", - "ECONNREFUSED", - "ENOTFOUND", - "ENETDOWN", - "ENETUNREACH", - "EHOSTDOWN", - "EHOSTUNREACH", - "EPIPE" - ] - }; - this.retryCount = 0; - this.start = 0; - this.end = null; - this.etag = null; - this.resume = null; - // Handle possible onConnect duplication - this.handler.onConnect((reason)=>{ - this.aborted = true; - if (this.abort) this.abort(reason); - else this.reason = reason; +// https://fetch.spec.whatwg.org/#finalize-and-report-timing +function $7a9b02141dd10726$var$finalizeAndReportTiming(response, initiatorType = 'other') { + // 1. If response is an aborted network error, then return. + if (response.type === 'error' && response.aborted) return; + // 2. If response’s URL list is null or empty, then return. + if (!response.urlList?.length) return; + // 3. Let originalURL be response’s URL list[0]. + const originalURL = response.urlList[0]; + // 4. Let timingInfo be response’s timing info. + let timingInfo = response.timingInfo; + // 5. Let cacheState be response’s cache state. + let cacheState = response.cacheState; + // 6. If originalURL’s scheme is not an HTTP(S) scheme, then return. + if (!$7a9b02141dd10726$require$urlIsHttpHttpsScheme(originalURL)) return; + // 7. If timingInfo is null, then return. + if (timingInfo === null) return; + // 8. If response’s timing allow passed flag is not set, then: + if (!response.timingAllowPassed) { + // 1. Set timingInfo to a the result of creating an opaque timing info for timingInfo. + timingInfo = $7a9b02141dd10726$require$createOpaqueTimingInfo({ + startTime: timingInfo.startTime }); + // 2. Set cacheState to the empty string. + cacheState = ''; } - onRequestSent() { - if (this.handler.onRequestSent) this.handler.onRequestSent(); - } - onUpgrade(statusCode, headers, socket) { - if (this.handler.onUpgrade) this.handler.onUpgrade(statusCode, headers, socket); + // 9. Set timingInfo’s end time to the coarsened shared current time + // given global’s relevant settings object’s cross-origin isolated + // capability. + // TODO: given global’s relevant settings object’s cross-origin isolated + // capability? + timingInfo.endTime = $7a9b02141dd10726$require$coarsenedSharedCurrentTime(); + // 10. Set response’s timing info to timingInfo. + response.timingInfo = timingInfo; + // 11. Mark resource timing for timingInfo, originalURL, initiatorType, + // global, and cacheState. + $7a9b02141dd10726$var$markResourceTiming(timingInfo, originalURL.href, initiatorType, globalThis, cacheState); +} +// https://w3c.github.io/resource-timing/#dfn-mark-resource-timing +const $7a9b02141dd10726$var$markResourceTiming = performance.markResourceTiming; +// https://fetch.spec.whatwg.org/#abort-fetch +function $7a9b02141dd10726$var$abortFetch(p, request, responseObject, error) { + // 1. Reject promise with error. + if (p) // We might have already resolved the promise at this stage + p.reject(error); + // 2. If request’s body is not null and is readable, then cancel request’s + // body with error. + if (request.body != null && $7a9b02141dd10726$require$isReadable(request.body?.stream)) request.body.stream.cancel(error).catch((err)=>{ + if (err.code === 'ERR_INVALID_STATE') // Node bug? + return; + throw err; + }); + // 3. If responseObject is null, then return. + if (responseObject == null) return; + // 4. Let response be responseObject’s response. + const response = responseObject[$7a9b02141dd10726$require$kState]; + // 5. If response’s body is not null and is readable, then error response’s + // body with error. + if (response.body != null && $7a9b02141dd10726$require$isReadable(response.body?.stream)) response.body.stream.cancel(error).catch((err)=>{ + if (err.code === 'ERR_INVALID_STATE') // Node bug? + return; + throw err; + }); +} +// https://fetch.spec.whatwg.org/#fetching +function $7a9b02141dd10726$var$fetching({ request: request, processRequestBodyChunkLength: processRequestBodyChunkLength, processRequestEndOfBody: processRequestEndOfBody, processResponse: processResponse, processResponseEndOfBody: processResponseEndOfBody, processResponseConsumeBody: processResponseConsumeBody, useParallelQueue: useParallelQueue = false, dispatcher: dispatcher = $7a9b02141dd10726$require$getGlobalDispatcher() // undici + }) { + // Ensure that the dispatcher is set accordingly + $in2sP$nodeassert(dispatcher); + // 1. Let taskDestination be null. + let taskDestination = null; + // 2. Let crossOriginIsolatedCapability be false. + let crossOriginIsolatedCapability = false; + // 3. If request’s client is non-null, then: + if (request.client != null) { + // 1. Set taskDestination to request’s client’s global object. + taskDestination = request.client.globalObject; + // 2. Set crossOriginIsolatedCapability to request’s client’s cross-origin + // isolated capability. + crossOriginIsolatedCapability = request.client.crossOriginIsolatedCapability; } - onConnect(abort) { - if (this.aborted) abort(this.reason); - else this.abort = abort; + // 4. If useParallelQueue is true, then set taskDestination to the result of + // starting a new parallel queue. + // TODO + // 5. Let timingInfo be a new fetch timing info whose start time and + // post-redirect start time are the coarsened shared current time given + // crossOriginIsolatedCapability. + const currentTime = $7a9b02141dd10726$require$coarsenedSharedCurrentTime(crossOriginIsolatedCapability); + const timingInfo = $7a9b02141dd10726$require$createOpaqueTimingInfo({ + startTime: currentTime + }); + // 6. Let fetchParams be a new fetch params whose + // request is request, + // timing info is timingInfo, + // process request body chunk length is processRequestBodyChunkLength, + // process request end-of-body is processRequestEndOfBody, + // process response is processResponse, + // process response consume body is processResponseConsumeBody, + // process response end-of-body is processResponseEndOfBody, + // task destination is taskDestination, + // and cross-origin isolated capability is crossOriginIsolatedCapability. + const fetchParams = { + controller: new $7a9b02141dd10726$var$Fetch(dispatcher), + request: request, + timingInfo: timingInfo, + processRequestBodyChunkLength: processRequestBodyChunkLength, + processRequestEndOfBody: processRequestEndOfBody, + processResponse: processResponse, + processResponseConsumeBody: processResponseConsumeBody, + processResponseEndOfBody: processResponseEndOfBody, + taskDestination: taskDestination, + crossOriginIsolatedCapability: crossOriginIsolatedCapability + }; + // 7. If request’s body is a byte sequence, then set request’s body to + // request’s body as a body. + // NOTE: Since fetching is only called from fetch, body should already be + // extracted. + $in2sP$nodeassert(!request.body || request.body.stream); + // 8. If request’s window is "client", then set request’s window to request’s + // client, if request’s client’s global object is a Window object; otherwise + // "no-window". + if (request.window === 'client') // TODO: What if request.client is null? + request.window = request.client?.globalObject?.constructor?.name === 'Window' ? request.client : 'no-window'; + // 9. If request’s origin is "client", then set request’s origin to request’s + // client’s origin. + if (request.origin === 'client') request.origin = request.client.origin; + // 10. If all of the following conditions are true: + // TODO + // 11. If request’s policy container is "client", then: + if (request.policyContainer === 'client') { + // 1. If request’s client is non-null, then set request’s policy + // container to a clone of request’s client’s policy container. [HTML] + if (request.client != null) request.policyContainer = $7a9b02141dd10726$require$clonePolicyContainer(request.client.policyContainer); + else // 2. Otherwise, set request’s policy container to a new policy + // container. + request.policyContainer = $7a9b02141dd10726$require$makePolicyContainer(); } - onBodySent(chunk) { - if (this.handler.onBodySent) return this.handler.onBodySent(chunk); + // 12. If request’s header list does not contain `Accept`, then: + if (!request.headersList.contains('accept', true)) { + // 1. Let value be `*/*`. + const value = '*/*'; + // 2. A user agent should set value to the first matching statement, if + // any, switching on request’s destination: + // "document" + // "frame" + // "iframe" + // `text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8` + // "image" + // `image/png,image/svg+xml,image/*;q=0.8,*/*;q=0.5` + // "style" + // `text/css,*/*;q=0.1` + // TODO + // 3. Append `Accept`/value to request’s header list. + request.headersList.append('accept', value, true); } - static [$cfcc34ba1f534d0b$require$kRetryHandlerDefaultRetry](err, { state: state, opts: opts }, cb) { - const { statusCode: statusCode, code: code, headers: headers } = err; - const { method: method, retryOptions: retryOptions } = opts; - const { maxRetries: maxRetries, timeout: timeout, maxTimeout: maxTimeout, timeoutFactor: timeoutFactor, statusCodes: statusCodes, errorCodes: errorCodes, methods: methods } = retryOptions; - let { counter: counter, currentTimeout: currentTimeout } = state; - currentTimeout = currentTimeout != null && currentTimeout > 0 ? currentTimeout : timeout; - // Any code that is not a Undici's originated and allowed to retry - if (code && code !== "UND_ERR_REQ_RETRY" && code !== "UND_ERR_SOCKET" && !errorCodes.includes(code)) { - cb(err); - return; - } - // If a set of method are provided and the current method is not in the list - if (Array.isArray(methods) && !methods.includes(method)) { - cb(err); - return; - } - // If a set of status code are provided and the current status code is not in the list - if (statusCode != null && Array.isArray(statusCodes) && !statusCodes.includes(statusCode)) { - cb(err); - return; - } - // If we reached the max number of retries - if (counter > maxRetries) { - cb(err); - return; + // 13. If request’s header list does not contain `Accept-Language`, then + // user agents should append `Accept-Language`/an appropriate value to + // request’s header list. + if (!request.headersList.contains('accept-language', true)) request.headersList.append('accept-language', '*', true); + // 14. If request’s priority is null, then use request’s initiator and + // destination appropriately in setting request’s priority to a + // user-agent-defined object. + request.priority; + // 15. If request is a subresource request, then: + $7a9b02141dd10726$require$subresourceSet.has(request.destination); + // 16. Run main fetch given fetchParams. + $7a9b02141dd10726$var$mainFetch(fetchParams).catch((err)=>{ + fetchParams.controller.terminate(err); + }); + // 17. Return fetchParam's controller + return fetchParams.controller; +} +// https://fetch.spec.whatwg.org/#concept-main-fetch +async function $7a9b02141dd10726$var$mainFetch(fetchParams, recursive = false) { + // 1. Let request be fetchParams’s request. + const request = fetchParams.request; + // 2. Let response be null. + let response = null; + // 3. If request’s local-URLs-only flag is set and request’s current URL is + // not local, then set response to a network error. + if (request.localURLsOnly && !$7a9b02141dd10726$require$urlIsLocal($7a9b02141dd10726$require$requestCurrentURL(request))) response = $7a9b02141dd10726$require$makeNetworkError('local URLs only'); + // 4. Run report Content Security Policy violations for request. + // TODO + // 5. Upgrade request to a potentially trustworthy URL, if appropriate. + $7a9b02141dd10726$require$tryUpgradeRequestToAPotentiallyTrustworthyURL(request); + // 6. If should request be blocked due to a bad port, should fetching request + // be blocked as mixed content, or should request be blocked by Content + // Security Policy returns blocked, then set response to a network error. + if ($7a9b02141dd10726$require$requestBadPort(request) === 'blocked') response = $7a9b02141dd10726$require$makeNetworkError('bad port'); + // TODO: should fetching request be blocked as mixed content? + // TODO: should request be blocked by Content Security Policy? + // 7. If request’s referrer policy is the empty string, then set request’s + // referrer policy to request’s policy container’s referrer policy. + if (request.referrerPolicy === '') request.referrerPolicy = request.policyContainer.referrerPolicy; + // 8. If request’s referrer is not "no-referrer", then set request’s + // referrer to the result of invoking determine request’s referrer. + if (request.referrer !== 'no-referrer') request.referrer = $7a9b02141dd10726$require$determineRequestsReferrer(request); + // 9. Set request’s current URL’s scheme to "https" if all of the following + // conditions are true: + // - request’s current URL’s scheme is "http" + // - request’s current URL’s host is a domain + // - Matching request’s current URL’s host per Known HSTS Host Domain Name + // Matching results in either a superdomain match with an asserted + // includeSubDomains directive or a congruent match (with or without an + // asserted includeSubDomains directive). [HSTS] + // TODO + // 10. If recursive is false, then run the remaining steps in parallel. + // TODO + // 11. If response is null, then set response to the result of running + // the steps corresponding to the first matching statement: + if (response === null) response = await (async ()=>{ + const currentURL = $7a9b02141dd10726$require$requestCurrentURL(request); + if (// - request’s current URL’s origin is same origin with request’s origin, + // and request’s response tainting is "basic" + $7a9b02141dd10726$require$sameOrigin(currentURL, request.url) && request.responseTainting === 'basic' || // request’s current URL’s scheme is "data" + currentURL.protocol === 'data:' || // - request’s mode is "navigate" or "websocket" + request.mode === 'navigate' || request.mode === 'websocket') { + // 1. Set request’s response tainting to "basic". + request.responseTainting = 'basic'; + // 2. Return the result of running scheme fetch given fetchParams. + return await $7a9b02141dd10726$var$schemeFetch(fetchParams); } - let retryAfterHeader = headers != null && headers["retry-after"]; - if (retryAfterHeader) { - retryAfterHeader = Number(retryAfterHeader); - retryAfterHeader = isNaN(retryAfterHeader) ? $cfcc34ba1f534d0b$var$calculateRetryAfterHeader(retryAfterHeader) : retryAfterHeader * 1e3 // Retry-After is in seconds - ; + // request’s mode is "same-origin" + if (request.mode === 'same-origin') // 1. Return a network error. + return $7a9b02141dd10726$require$makeNetworkError('request mode cannot be "same-origin"'); + // request’s mode is "no-cors" + if (request.mode === 'no-cors') { + // 1. If request’s redirect mode is not "follow", then return a network + // error. + if (request.redirect !== 'follow') return $7a9b02141dd10726$require$makeNetworkError('redirect mode cannot be "follow" for "no-cors" request'); + // 2. Set request’s response tainting to "opaque". + request.responseTainting = 'opaque'; + // 3. Return the result of running scheme fetch given fetchParams. + return await $7a9b02141dd10726$var$schemeFetch(fetchParams); } - const retryTimeout = retryAfterHeader > 0 ? Math.min(retryAfterHeader, maxTimeout) : Math.min(currentTimeout * timeoutFactor ** counter, maxTimeout); - state.currentTimeout = retryTimeout; - setTimeout(()=>cb(null), retryTimeout); + // request’s current URL’s scheme is not an HTTP(S) scheme + if (!$7a9b02141dd10726$require$urlIsHttpHttpsScheme($7a9b02141dd10726$require$requestCurrentURL(request))) // Return a network error. + return $7a9b02141dd10726$require$makeNetworkError('URL scheme must be a HTTP(S) scheme'); + // - request’s use-CORS-preflight flag is set + // - request’s unsafe-request flag is set and either request’s method is + // not a CORS-safelisted method or CORS-unsafe request-header names with + // request’s header list is not empty + // 1. Set request’s response tainting to "cors". + // 2. Let corsWithPreflightResponse be the result of running HTTP fetch + // given fetchParams and true. + // 3. If corsWithPreflightResponse is a network error, then clear cache + // entries using request. + // 4. Return corsWithPreflightResponse. + // TODO + // Otherwise + // 1. Set request’s response tainting to "cors". + request.responseTainting = 'cors'; + // 2. Return the result of running HTTP fetch given fetchParams. + return await $7a9b02141dd10726$var$httpFetch(fetchParams); + })(); + // 12. If recursive is true, then return response. + if (recursive) return response; + // 13. If response is not a network error and response is not a filtered + // response, then: + if (response.status !== 0 && !response.internalResponse) { + // If request’s response tainting is "cors", then: + request.responseTainting; + // Set response to the following filtered response with response as its + // internal response, depending on request’s response tainting: + if (request.responseTainting === 'basic') response = $7a9b02141dd10726$require$filterResponse(response, 'basic'); + else if (request.responseTainting === 'cors') response = $7a9b02141dd10726$require$filterResponse(response, 'cors'); + else if (request.responseTainting === 'opaque') response = $7a9b02141dd10726$require$filterResponse(response, 'opaque'); + else $in2sP$nodeassert(false); + } + // 14. Let internalResponse be response, if response is a network error, + // and response’s internal response otherwise. + let internalResponse = response.status === 0 ? response : response.internalResponse; + // 15. If internalResponse’s URL list is empty, then set it to a clone of + // request’s URL list. + if (internalResponse.urlList.length === 0) internalResponse.urlList.push(...request.urlList); + // 16. If request’s timing allow failed flag is unset, then set + // internalResponse’s timing allow passed flag. + if (!request.timingAllowFailed) response.timingAllowPassed = true; + // 17. If response is not a network error and any of the following returns + // blocked + // - should internalResponse to request be blocked as mixed content + // - should internalResponse to request be blocked by Content Security Policy + // - should internalResponse to request be blocked due to its MIME type + // - should internalResponse to request be blocked due to nosniff + // TODO + // 18. If response’s type is "opaque", internalResponse’s status is 206, + // internalResponse’s range-requested flag is set, and request’s header + // list does not contain `Range`, then set response and internalResponse + // to a network error. + if (response.type === 'opaque' && internalResponse.status === 206 && internalResponse.rangeRequested && !request.headers.contains('range', true)) response = internalResponse = $7a9b02141dd10726$require$makeNetworkError(); + // 19. If response is not a network error and either request’s method is + // `HEAD` or `CONNECT`, or internalResponse’s status is a null body status, + // set internalResponse’s body to null and disregard any enqueuing toward + // it (if any). + if (response.status !== 0 && (request.method === 'HEAD' || request.method === 'CONNECT' || $7a9b02141dd10726$require$nullBodyStatus.includes(internalResponse.status))) { + internalResponse.body = null; + fetchParams.controller.dump = true; } - onHeaders(statusCode, rawHeaders, resume, statusMessage) { - const headers = $cfcc34ba1f534d0b$require$parseHeaders(rawHeaders); - this.retryCount += 1; - if (statusCode >= 300) { - this.abort(new $cfcc34ba1f534d0b$require$RequestRetryError("Request failed", statusCode, { - headers: headers, - count: this.retryCount - })); - return false; + // 20. If request’s integrity metadata is not the empty string, then: + if (request.integrity) { + // 1. Let processBodyError be this step: run fetch finale given fetchParams + // and a network error. + const processBodyError = (reason)=>$7a9b02141dd10726$var$fetchFinale(fetchParams, $7a9b02141dd10726$require$makeNetworkError(reason)); + // 2. If request’s response tainting is "opaque", or response’s body is null, + // then run processBodyError and abort these steps. + if (request.responseTainting === 'opaque' || response.body == null) { + processBodyError(response.error); + return; } - // Checkpoint for resume from where we left it - if (this.resume != null) { - this.resume = null; - if (statusCode !== 206) return true; - const contentRange = $cfcc34ba1f534d0b$require$parseRangeHeader(headers["content-range"]); - // If no content range - if (!contentRange) { - this.abort(new $cfcc34ba1f534d0b$require$RequestRetryError("Content-Range mismatch", statusCode, { - headers: headers, - count: this.retryCount - })); - return false; - } - // Let's start with a weak etag check - if (this.etag != null && this.etag !== headers.etag) { - this.abort(new $cfcc34ba1f534d0b$require$RequestRetryError("ETag mismatch", statusCode, { - headers: headers, - count: this.retryCount - })); - return false; + // 3. Let processBody given bytes be these steps: + const processBody = (bytes)=>{ + // 1. If bytes do not match request’s integrity metadata, + // then run processBodyError and abort these steps. [SRI] + if (!$7a9b02141dd10726$require$bytesMatch(bytes, request.integrity)) { + processBodyError('integrity mismatch'); + return; } - const { start: start, size: size, end: end = size } = contentRange; - $g40fK$assert(this.start === start, "content-range mismatch"); - $g40fK$assert(this.end == null || this.end === end, "content-range mismatch"); - this.resume = resume; - return true; - } - if (this.end == null) { - if (statusCode === 206) { - // First time we receive 206 - const range = $cfcc34ba1f534d0b$require$parseRangeHeader(headers["content-range"]); - if (range == null) return this.handler.onHeaders(statusCode, rawHeaders, resume, statusMessage); - const { start: start, size: size, end: end = size } = range; - $g40fK$assert(start != null && Number.isFinite(start) && this.start !== start, "content-range mismatch"); - $g40fK$assert(Number.isFinite(start)); - $g40fK$assert(end != null && Number.isFinite(end) && this.end !== end, "invalid content-length"); - this.start = start; - this.end = end; + // 2. Set response’s body to bytes as a body. + response.body = $7a9b02141dd10726$require$safelyExtractBody(bytes)[0]; + // 3. Run fetch finale given fetchParams and response. + $7a9b02141dd10726$var$fetchFinale(fetchParams, response); + }; + // 4. Fully read response’s body given processBody and processBodyError. + await $7a9b02141dd10726$require$fullyReadBody(response.body, processBody, processBodyError); + } else // 21. Otherwise, run fetch finale given fetchParams and response. + $7a9b02141dd10726$var$fetchFinale(fetchParams, response); +} + +// https://fetch.spec.whatwg.org/#concept-scheme-fetch +// given a fetch params fetchParams +function $7a9b02141dd10726$var$schemeFetch(fetchParams) { + // Note: since the connection is destroyed on redirect, which sets fetchParams to a + // cancelled state, we do not want this condition to trigger *unless* there have been + // no redirects. See https://github.com/nodejs/undici/issues/1776 + // 1. If fetchParams is canceled, then return the appropriate network error for fetchParams. + if ($7a9b02141dd10726$require$isCancelled(fetchParams) && fetchParams.request.redirectCount === 0) return Promise.resolve($7a9b02141dd10726$require$makeAppropriateNetworkError(fetchParams)); + // 2. Let request be fetchParams’s request. + const { request: request } = fetchParams; + const { protocol: scheme } = $7a9b02141dd10726$require$requestCurrentURL(request); + // 3. Switch on request’s current URL’s scheme and run the associated steps: + switch(scheme){ + case 'about:': + // If request’s current URL’s path is the string "blank", then return a new response + // whose status message is `OK`, header list is « (`Content-Type`, `text/html;charset=utf-8`) », + // and body is the empty byte sequence as a body. + // Otherwise, return a network error. + return Promise.resolve($7a9b02141dd10726$require$makeNetworkError('about scheme is not supported')); + case 'blob:': + { + if (!$7a9b02141dd10726$var$resolveObjectURL) $7a9b02141dd10726$var$resolveObjectURL = $in2sP$nodebuffer.resolveObjectURL; + // 1. Let blobURLEntry be request’s current URL’s blob URL entry. + const blobURLEntry = $7a9b02141dd10726$require$requestCurrentURL(request); + // https://github.com/web-platform-tests/wpt/blob/7b0ebaccc62b566a1965396e5be7bb2bc06f841f/FileAPI/url/resources/fetch-tests.js#L52-L56 + // Buffer.resolveObjectURL does not ignore URL queries. + if (blobURLEntry.search.length !== 0) return Promise.resolve($7a9b02141dd10726$require$makeNetworkError('NetworkError when attempting to fetch resource.')); + const blob = $7a9b02141dd10726$var$resolveObjectURL(blobURLEntry.toString()); + // 2. If request’s method is not `GET`, blobURLEntry is null, or blobURLEntry’s + // object is not a Blob object, then return a network error. + if (request.method !== 'GET' || !$7a9b02141dd10726$require$isBlobLike(blob)) return Promise.resolve($7a9b02141dd10726$require$makeNetworkError('invalid method')); + // 3. Let blob be blobURLEntry’s object. + // Note: done above + // 4. Let response be a new response. + const response = $7a9b02141dd10726$require$makeResponse(); + // 5. Let fullLength be blob’s size. + const fullLength = blob.size; + // 6. Let serializedFullLength be fullLength, serialized and isomorphic encoded. + const serializedFullLength = $7a9b02141dd10726$require$isomorphicEncode(`${fullLength}`); + // 7. Let type be blob’s type. + const type = blob.type; + // 8. If request’s header list does not contain `Range`: + // 9. Otherwise: + if (!request.headersList.contains('range', true)) { + // 1. Let bodyWithType be the result of safely extracting blob. + // Note: in the FileAPI a blob "object" is a Blob *or* a MediaSource. + // In node, this can only ever be a Blob. Therefore we can safely + // use extractBody directly. + const bodyWithType = $7a9b02141dd10726$require$extractBody(blob); + // 2. Set response’s status message to `OK`. + response.statusText = 'OK'; + // 3. Set response’s body to bodyWithType’s body. + response.body = bodyWithType[0]; + // 4. Set response’s header list to « (`Content-Length`, serializedFullLength), (`Content-Type`, type) ». + response.headersList.set('content-length', serializedFullLength, true); + response.headersList.set('content-type', type, true); + } else { + // 1. Set response’s range-requested flag. + response.rangeRequested = true; + // 2. Let rangeHeader be the result of getting `Range` from request’s header list. + const rangeHeader = request.headersList.get('range', true); + // 3. Let rangeValue be the result of parsing a single range header value given rangeHeader and true. + const rangeValue = $7a9b02141dd10726$require$simpleRangeHeaderValue(rangeHeader, true); + // 4. If rangeValue is failure, then return a network error. + if (rangeValue === 'failure') return Promise.resolve($7a9b02141dd10726$require$makeNetworkError('failed to fetch the data URL')); + // 5. Let (rangeStart, rangeEnd) be rangeValue. + let { rangeStartValue: rangeStart, rangeEndValue: rangeEnd } = rangeValue; + // 6. If rangeStart is null: + // 7. Otherwise: + if (rangeStart === null) { + // 1. Set rangeStart to fullLength − rangeEnd. + rangeStart = fullLength - rangeEnd; + // 2. Set rangeEnd to rangeStart + rangeEnd − 1. + rangeEnd = rangeStart + rangeEnd - 1; + } else { + // 1. If rangeStart is greater than or equal to fullLength, then return a network error. + if (rangeStart >= fullLength) return Promise.resolve($7a9b02141dd10726$require$makeNetworkError('Range start is greater than the blob\'s size.')); + // 2. If rangeEnd is null or rangeEnd is greater than or equal to fullLength, then set + // rangeEnd to fullLength − 1. + if (rangeEnd === null || rangeEnd >= fullLength) rangeEnd = fullLength - 1; + } + // 8. Let slicedBlob be the result of invoking slice blob given blob, rangeStart, + // rangeEnd + 1, and type. + const slicedBlob = blob.slice(rangeStart, rangeEnd, type); + // 9. Let slicedBodyWithType be the result of safely extracting slicedBlob. + // Note: same reason as mentioned above as to why we use extractBody + const slicedBodyWithType = $7a9b02141dd10726$require$extractBody(slicedBlob); + // 10. Set response’s body to slicedBodyWithType’s body. + response.body = slicedBodyWithType[0]; + // 11. Let serializedSlicedLength be slicedBlob’s size, serialized and isomorphic encoded. + const serializedSlicedLength = $7a9b02141dd10726$require$isomorphicEncode(`${slicedBlob.size}`); + // 12. Let contentRange be the result of invoking build a content range given rangeStart, + // rangeEnd, and fullLength. + const contentRange = $7a9b02141dd10726$require$buildContentRange(rangeStart, rangeEnd, fullLength); + // 13. Set response’s status to 206. + response.status = 206; + // 14. Set response’s status message to `Partial Content`. + response.statusText = 'Partial Content'; + // 15. Set response’s header list to « (`Content-Length`, serializedSlicedLength), + // (`Content-Type`, type), (`Content-Range`, contentRange) ». + response.headersList.set('content-length', serializedSlicedLength, true); + response.headersList.set('content-type', type, true); + response.headersList.set('content-range', contentRange, true); + } + // 10. Return response. + return Promise.resolve(response); } - // We make our best to checkpoint the body for further range headers - if (this.end == null) { - const contentLength = headers["content-length"]; - this.end = contentLength != null ? Number(contentLength) : null; + case 'data:': + { + // 1. Let dataURLStruct be the result of running the + // data: URL processor on request’s current URL. + const currentURL = $7a9b02141dd10726$require$requestCurrentURL(request); + const dataURLStruct = $7a9b02141dd10726$require$dataURLProcessor(currentURL); + // 2. If dataURLStruct is failure, then return a + // network error. + if (dataURLStruct === 'failure') return Promise.resolve($7a9b02141dd10726$require$makeNetworkError('failed to fetch the data URL')); + // 3. Let mimeType be dataURLStruct’s MIME type, serialized. + const mimeType = $7a9b02141dd10726$require$serializeAMimeType(dataURLStruct.mimeType); + // 4. Return a response whose status message is `OK`, + // header list is « (`Content-Type`, mimeType) », + // and body is dataURLStruct’s body as a body. + return Promise.resolve($7a9b02141dd10726$require$makeResponse({ + statusText: 'OK', + headersList: [ + [ + 'content-type', + { + name: 'Content-Type', + value: mimeType + } + ] + ], + body: $7a9b02141dd10726$require$safelyExtractBody(dataURLStruct.body)[0] + })); } - $g40fK$assert(Number.isFinite(this.start)); - $g40fK$assert(this.end == null || Number.isFinite(this.end), "invalid content-length"); - this.resume = resume; - this.etag = headers.etag != null ? headers.etag : null; - return this.handler.onHeaders(statusCode, rawHeaders, resume, statusMessage); - } - const err = new $cfcc34ba1f534d0b$require$RequestRetryError("Request failed", statusCode, { - headers: headers, - count: this.retryCount - }); - this.abort(err); - return false; - } - onData(chunk) { - this.start += chunk.length; - return this.handler.onData(chunk); - } - onComplete(rawTrailers) { - this.retryCount = 0; - return this.handler.onComplete(rawTrailers); + case 'file:': + // For now, unfortunate as it is, file URLs are left as an exercise for the reader. + // When in doubt, return a network error. + return Promise.resolve($7a9b02141dd10726$require$makeNetworkError('not implemented... yet...')); + case 'http:': + case 'https:': + // Return the result of running HTTP fetch given fetchParams. + return $7a9b02141dd10726$var$httpFetch(fetchParams).catch((err)=>$7a9b02141dd10726$require$makeNetworkError(err)); + default: + return Promise.resolve($7a9b02141dd10726$require$makeNetworkError('unknown scheme')); } - onError(err) { - if (this.aborted || $cfcc34ba1f534d0b$require$isDisturbed(this.opts.body)) return this.handler.onError(err); - this.retryOpts.retry(err, { - state: { - counter: this.retryCount++, - currentTimeout: this.retryAfter - }, - opts: { - retryOptions: this.retryOpts, - ...this.opts +} +// https://fetch.spec.whatwg.org/#finalize-response +function $7a9b02141dd10726$var$finalizeResponse(fetchParams, response) { + // 1. Set fetchParams’s request’s done flag. + fetchParams.request.done = true; + // 2, If fetchParams’s process response done is not null, then queue a fetch + // task to run fetchParams’s process response done given response, with + // fetchParams’s task destination. + if (fetchParams.processResponseDone != null) queueMicrotask(()=>fetchParams.processResponseDone(response)); +} +// https://fetch.spec.whatwg.org/#fetch-finale +function $7a9b02141dd10726$var$fetchFinale(fetchParams, response) { + // 1. Let timingInfo be fetchParams’s timing info. + let timingInfo = fetchParams.timingInfo; + // 2. If response is not a network error and fetchParams’s request’s client is a secure context, + // then set timingInfo’s server-timing headers to the result of getting, decoding, and splitting + // `Server-Timing` from response’s internal response’s header list. + // TODO + // 3. Let processResponseEndOfBody be the following steps: + const processResponseEndOfBody = ()=>{ + // 1. Let unsafeEndTime be the unsafe shared current time. + const unsafeEndTime = Date.now() // ? + ; + // 2. If fetchParams’s request’s destination is "document", then set fetchParams’s controller’s + // full timing info to fetchParams’s timing info. + if (fetchParams.request.destination === 'document') fetchParams.controller.fullTimingInfo = timingInfo; + // 3. Set fetchParams’s controller’s report timing steps to the following steps given a global object global: + fetchParams.controller.reportTimingSteps = ()=>{ + // 1. If fetchParams’s request’s URL’s scheme is not an HTTP(S) scheme, then return. + if (fetchParams.request.url.protocol !== 'https:') return; + // 2. Set timingInfo’s end time to the relative high resolution time given unsafeEndTime and global. + timingInfo.endTime = unsafeEndTime; + // 3. Let cacheState be response’s cache state. + let cacheState = response.cacheState; + // 4. Let bodyInfo be response’s body info. + const bodyInfo = response.bodyInfo; + // 5. If response’s timing allow passed flag is not set, then set timingInfo to the result of creating an + // opaque timing info for timingInfo and set cacheState to the empty string. + if (!response.timingAllowPassed) { + timingInfo = $7a9b02141dd10726$require$createOpaqueTimingInfo(timingInfo); + cacheState = ''; } - }, onRetry.bind(this)); - function onRetry(err) { - if (err != null || this.aborted || $cfcc34ba1f534d0b$require$isDisturbed(this.opts.body)) return this.handler.onError(err); - if (this.start !== 0) this.opts = { - ...this.opts, - headers: { - ...this.opts.headers, - range: `bytes=${this.start}-${this.end ?? ""}` - } - }; - try { - this.dispatch(this.opts, this); - } catch (err) { - this.handler.onError(err); + // 6. Let responseStatus be 0. + let responseStatus = 0; + // 7. If fetchParams’s request’s mode is not "navigate" or response’s has-cross-origin-redirects is false: + if (fetchParams.request.mode !== 'navigator' || !response.hasCrossOriginRedirects) { + // 1. Set responseStatus to response’s status. + responseStatus = response.status; + // 2. Let mimeType be the result of extracting a MIME type from response’s header list. + const mimeType = $7a9b02141dd10726$require$extractMimeType(response.headersList); + // 3. If mimeType is not failure, then set bodyInfo’s content type to the result of minimizing a supported MIME type given mimeType. + if (mimeType !== 'failure') bodyInfo.contentType = $7a9b02141dd10726$require$minimizeSupportedMimeType(mimeType); } - } - } -} -module.exports = $cfcc34ba1f534d0b$var$RetryHandler; - -}); - -parcelRegister("gvOkt", function(module, exports) { -"use strict"; -// We include a version number for the Dispatcher API. In case of breaking changes, -// this version number must be increased to avoid conflicts. -const $c05694eae7f48760$var$globalDispatcher = Symbol.for("undici.globalDispatcher.1"); - -var $cKdp7 = parcelRequire("cKdp7"); -var $c05694eae7f48760$require$InvalidArgumentError = $cKdp7.InvalidArgumentError; - -var $3zvEP = parcelRequire("3zvEP"); -if ($c05694eae7f48760$var$getGlobalDispatcher() === undefined) $c05694eae7f48760$var$setGlobalDispatcher(new $3zvEP()); -function $c05694eae7f48760$var$setGlobalDispatcher(agent) { - if (!agent || typeof agent.dispatch !== "function") throw new $c05694eae7f48760$require$InvalidArgumentError("Argument agent must implement Agent"); - Object.defineProperty(globalThis, $c05694eae7f48760$var$globalDispatcher, { - value: agent, - writable: true, - enumerable: false, - configurable: false + // 8. If fetchParams’s request’s initiator type is non-null, then mark resource timing given timingInfo, + // fetchParams’s request’s URL, fetchParams’s request’s initiator type, global, cacheState, bodyInfo, + // and responseStatus. + if (fetchParams.request.initiatorType != null) // TODO: update markresourcetiming + $7a9b02141dd10726$var$markResourceTiming(timingInfo, fetchParams.request.url.href, fetchParams.request.initiatorType, globalThis, cacheState, bodyInfo, responseStatus); + }; + // 4. Let processResponseEndOfBodyTask be the following steps: + const processResponseEndOfBodyTask = ()=>{ + // 1. Set fetchParams’s request’s done flag. + fetchParams.request.done = true; + // 2. If fetchParams’s process response end-of-body is non-null, then run fetchParams’s process + // response end-of-body given response. + if (fetchParams.processResponseEndOfBody != null) queueMicrotask(()=>fetchParams.processResponseEndOfBody(response)); + // 3. If fetchParams’s request’s initiator type is non-null and fetchParams’s request’s client’s + // global object is fetchParams’s task destination, then run fetchParams’s controller’s report + // timing steps given fetchParams’s request’s client’s global object. + if (fetchParams.request.initiatorType != null) fetchParams.controller.reportTimingSteps(); + }; + // 5. Queue a fetch task to run processResponseEndOfBodyTask with fetchParams’s task destination + queueMicrotask(()=>processResponseEndOfBodyTask()); + }; + // 4. If fetchParams’s process response is non-null, then queue a fetch task to run fetchParams’s + // process response given response, with fetchParams’s task destination. + if (fetchParams.processResponse != null) queueMicrotask(()=>{ + fetchParams.processResponse(response); + fetchParams.processResponse = null; + }); + // 5. Let internalResponse be response, if response is a network error; otherwise response’s internal response. + const internalResponse = response.type === 'error' ? response : response.internalResponse ?? response; + // 6. If internalResponse’s body is null, then run processResponseEndOfBody. + // 7. Otherwise: + if (internalResponse.body == null) processResponseEndOfBody(); + else // mcollina: all the following steps of the specs are skipped. + // The internal transform stream is not needed. + // See https://github.com/nodejs/undici/pull/3093#issuecomment-2050198541 + // 1. Let transformStream be a new TransformStream. + // 2. Let identityTransformAlgorithm be an algorithm which, given chunk, enqueues chunk in transformStream. + // 3. Set up transformStream with transformAlgorithm set to identityTransformAlgorithm and flushAlgorithm + // set to processResponseEndOfBody. + // 4. Set internalResponse’s body’s stream to the result of internalResponse’s body’s stream piped through transformStream. + $7a9b02141dd10726$require$finished(internalResponse.body.stream, ()=>{ + processResponseEndOfBody(); }); } -function $c05694eae7f48760$var$getGlobalDispatcher() { - return globalThis[$c05694eae7f48760$var$globalDispatcher]; -} -module.exports = { - setGlobalDispatcher: $c05694eae7f48760$var$setGlobalDispatcher, - getGlobalDispatcher: $c05694eae7f48760$var$getGlobalDispatcher -}; - -}); - -parcelRegister("7SGLv", function(module, exports) { -"use strict"; -module.exports = class DecoratorHandler { - constructor(handler){ - this.handler = handler; - } - onConnect(...args) { - return this.handler.onConnect(...args); - } - onError(...args) { - return this.handler.onError(...args); - } - onUpgrade(...args) { - return this.handler.onUpgrade(...args); - } - onHeaders(...args) { - return this.handler.onHeaders(...args); - } - onData(...args) { - return this.handler.onData(...args); - } - onComplete(...args) { - return this.handler.onComplete(...args); - } - onBodySent(...args) { - return this.handler.onBodySent(...args); - } -}; - -}); - -parcelRegister("lJQOR", function(module, exports) { -// https://github.com/Ethan-Arrowood/undici-fetch -"use strict"; - -var $lHKGY = parcelRequire("lHKGY"); -var $fd36c5c8024bd3ac$require$Response = $lHKGY.Response; -var $fd36c5c8024bd3ac$require$makeNetworkError = $lHKGY.makeNetworkError; -var $fd36c5c8024bd3ac$require$makeAppropriateNetworkError = $lHKGY.makeAppropriateNetworkError; -var $fd36c5c8024bd3ac$require$filterResponse = $lHKGY.filterResponse; -var $fd36c5c8024bd3ac$require$makeResponse = $lHKGY.makeResponse; - -var $gXdj5 = parcelRequire("gXdj5"); -var $fd36c5c8024bd3ac$require$Headers = $gXdj5.Headers; - -var $gY7cH = parcelRequire("gY7cH"); -var $fd36c5c8024bd3ac$require$Request = $gY7cH.Request; -var $fd36c5c8024bd3ac$require$makeRequest = $gY7cH.makeRequest; - - -var $4EkpM = parcelRequire("4EkpM"); -var $fd36c5c8024bd3ac$require$bytesMatch = $4EkpM.bytesMatch; -var $fd36c5c8024bd3ac$require$makePolicyContainer = $4EkpM.makePolicyContainer; -var $fd36c5c8024bd3ac$require$clonePolicyContainer = $4EkpM.clonePolicyContainer; -var $fd36c5c8024bd3ac$require$requestBadPort = $4EkpM.requestBadPort; -var $fd36c5c8024bd3ac$require$TAOCheck = $4EkpM.TAOCheck; -var $fd36c5c8024bd3ac$require$appendRequestOriginHeader = $4EkpM.appendRequestOriginHeader; -var $fd36c5c8024bd3ac$require$responseLocationURL = $4EkpM.responseLocationURL; -var $fd36c5c8024bd3ac$require$requestCurrentURL = $4EkpM.requestCurrentURL; -var $fd36c5c8024bd3ac$require$setRequestReferrerPolicyOnRedirect = $4EkpM.setRequestReferrerPolicyOnRedirect; -var $fd36c5c8024bd3ac$require$tryUpgradeRequestToAPotentiallyTrustworthyURL = $4EkpM.tryUpgradeRequestToAPotentiallyTrustworthyURL; -var $fd36c5c8024bd3ac$require$createOpaqueTimingInfo = $4EkpM.createOpaqueTimingInfo; -var $fd36c5c8024bd3ac$require$appendFetchMetadata = $4EkpM.appendFetchMetadata; -var $fd36c5c8024bd3ac$require$corsCheck = $4EkpM.corsCheck; -var $fd36c5c8024bd3ac$require$crossOriginResourcePolicyCheck = $4EkpM.crossOriginResourcePolicyCheck; -var $fd36c5c8024bd3ac$require$determineRequestsReferrer = $4EkpM.determineRequestsReferrer; -var $fd36c5c8024bd3ac$require$coarsenedSharedCurrentTime = $4EkpM.coarsenedSharedCurrentTime; -var $fd36c5c8024bd3ac$require$createDeferredPromise = $4EkpM.createDeferredPromise; -var $fd36c5c8024bd3ac$require$isBlobLike = $4EkpM.isBlobLike; -var $fd36c5c8024bd3ac$require$sameOrigin = $4EkpM.sameOrigin; -var $fd36c5c8024bd3ac$require$isCancelled = $4EkpM.isCancelled; -var $fd36c5c8024bd3ac$require$isAborted = $4EkpM.isAborted; -var $fd36c5c8024bd3ac$require$isErrorLike = $4EkpM.isErrorLike; -var $fd36c5c8024bd3ac$require$fullyReadBody = $4EkpM.fullyReadBody; -var $fd36c5c8024bd3ac$require$readableStreamClose = $4EkpM.readableStreamClose; -var $fd36c5c8024bd3ac$require$isomorphicEncode = $4EkpM.isomorphicEncode; -var $fd36c5c8024bd3ac$require$urlIsLocal = $4EkpM.urlIsLocal; -var $fd36c5c8024bd3ac$require$urlIsHttpHttpsScheme = $4EkpM.urlIsHttpHttpsScheme; -var $fd36c5c8024bd3ac$require$urlHasHttpsScheme = $4EkpM.urlHasHttpsScheme; - -var $74L4J = parcelRequire("74L4J"); -var $fd36c5c8024bd3ac$require$kState = $74L4J.kState; -var $fd36c5c8024bd3ac$require$kHeaders = $74L4J.kHeaders; -var $fd36c5c8024bd3ac$require$kGuard = $74L4J.kGuard; -var $fd36c5c8024bd3ac$require$kRealm = $74L4J.kRealm; - - -var $4ub3w = parcelRequire("4ub3w"); -var $fd36c5c8024bd3ac$require$safelyExtractBody = $4ub3w.safelyExtractBody; - -var $1ZCMb = parcelRequire("1ZCMb"); -var $fd36c5c8024bd3ac$require$redirectStatusSet = $1ZCMb.redirectStatusSet; -var $fd36c5c8024bd3ac$require$nullBodyStatus = $1ZCMb.nullBodyStatus; -var $fd36c5c8024bd3ac$require$safeMethodsSet = $1ZCMb.safeMethodsSet; -var $fd36c5c8024bd3ac$require$requestBodyHeader = $1ZCMb.requestBodyHeader; -var $fd36c5c8024bd3ac$require$subresourceSet = $1ZCMb.subresourceSet; -var $fd36c5c8024bd3ac$require$DOMException = $1ZCMb.DOMException; - -var $hHZvh = parcelRequire("hHZvh"); -var $fd36c5c8024bd3ac$require$kHeadersList = $hHZvh.kHeadersList; - - -var $fd36c5c8024bd3ac$require$Readable = $g40fK$stream.Readable; -var $fd36c5c8024bd3ac$require$pipeline = $g40fK$stream.pipeline; - -var $gv2nV = parcelRequire("gv2nV"); -var $fd36c5c8024bd3ac$require$addAbortListener = $gv2nV.addAbortListener; -var $fd36c5c8024bd3ac$require$isErrored = $gv2nV.isErrored; -var $fd36c5c8024bd3ac$require$isReadable = $gv2nV.isReadable; -var $fd36c5c8024bd3ac$require$nodeMajor = $gv2nV.nodeMajor; -var $fd36c5c8024bd3ac$require$nodeMinor = $gv2nV.nodeMinor; - -var $bNorT = parcelRequire("bNorT"); -var $fd36c5c8024bd3ac$require$dataURLProcessor = $bNorT.dataURLProcessor; -var $fd36c5c8024bd3ac$require$serializeAMimeType = $bNorT.serializeAMimeType; - -var $fd36c5c8024bd3ac$require$TransformStream = $g40fK$streamweb.TransformStream; - -var $gvOkt = parcelRequire("gvOkt"); -var $fd36c5c8024bd3ac$require$getGlobalDispatcher = $gvOkt.getGlobalDispatcher; - -var $jk0LQ = parcelRequire("jk0LQ"); -var $fd36c5c8024bd3ac$require$webidl = $jk0LQ.webidl; - -var $fd36c5c8024bd3ac$require$STATUS_CODES = $g40fK$http.STATUS_CODES; -const $fd36c5c8024bd3ac$var$GET_OR_HEAD = [ - "GET", - "HEAD" -]; -/** @type {import('buffer').resolveObjectURL} */ let $fd36c5c8024bd3ac$var$resolveObjectURL; -let $fd36c5c8024bd3ac$var$ReadableStream = globalThis.ReadableStream; -class $fd36c5c8024bd3ac$var$Fetch extends $g40fK$events { - constructor(dispatcher){ - super(); - this.dispatcher = dispatcher; - this.connection = null; - this.dump = false; - this.state = "ongoing"; - // 2 terminated listeners get added per request, - // but only 1 gets removed. If there are 20 redirects, - // 21 listeners will be added. - // See https://github.com/nodejs/undici/issues/1711 - // TODO (fix): Find and fix root cause for leaked listener. - this.setMaxListeners(21); - } - terminate(reason) { - if (this.state !== "ongoing") return; - this.state = "terminated"; - this.connection?.destroy(reason); - this.emit("terminated", reason); +// https://fetch.spec.whatwg.org/#http-fetch +async function $7a9b02141dd10726$var$httpFetch(fetchParams) { + // 1. Let request be fetchParams’s request. + const request = fetchParams.request; + // 2. Let response be null. + let response = null; + // 3. Let actualResponse be null. + let actualResponse = null; + // 4. Let timingInfo be fetchParams’s timing info. + const timingInfo = fetchParams.timingInfo; + // 5. If request’s service-workers mode is "all", then: + request.serviceWorkers; + // 6. If response is null, then: + if (response === null) { + // 1. If makeCORSPreflight is true and one of these conditions is true: + // TODO + // 2. If request’s redirect mode is "follow", then set request’s + // service-workers mode to "none". + if (request.redirect === 'follow') request.serviceWorkers = 'none'; + // 3. Set response and actualResponse to the result of running + // HTTP-network-or-cache fetch given fetchParams. + actualResponse = response = await $7a9b02141dd10726$var$httpNetworkOrCacheFetch(fetchParams); + // 4. If request’s response tainting is "cors" and a CORS check + // for request and response returns failure, then return a network error. + if (request.responseTainting === 'cors' && $7a9b02141dd10726$require$corsCheck(request, response) === 'failure') return $7a9b02141dd10726$require$makeNetworkError('cors failure'); + // 5. If the TAO check for request and response returns failure, then set + // request’s timing allow failed flag. + if ($7a9b02141dd10726$require$TAOCheck(request, response) === 'failure') request.timingAllowFailed = true; } - // https://fetch.spec.whatwg.org/#fetch-controller-abort - abort(error) { - if (this.state !== "ongoing") return; - // 1. Set controller’s state to "aborted". - this.state = "aborted"; - // 2. Let fallbackError be an "AbortError" DOMException. - // 3. Set error to fallbackError if it is not given. - if (!error) error = new $fd36c5c8024bd3ac$require$DOMException("The operation was aborted.", "AbortError"); - // 4. Let serializedError be StructuredSerialize(error). - // If that threw an exception, catch it, and let - // serializedError be StructuredSerialize(fallbackError). - // 5. Set controller’s serialized abort reason to serializedError. - this.serializedAbortReason = error; - this.connection?.destroy(error); - this.emit("terminated", error); + // 7. If either request’s response tainting or response’s type + // is "opaque", and the cross-origin resource policy check with + // request’s origin, request’s client, request’s destination, + // and actualResponse returns blocked, then return a network error. + if ((request.responseTainting === 'opaque' || response.type === 'opaque') && $7a9b02141dd10726$require$crossOriginResourcePolicyCheck(request.origin, request.client, request.destination, actualResponse) === 'blocked') return $7a9b02141dd10726$require$makeNetworkError('blocked'); + // 8. If actualResponse’s status is a redirect status, then: + if ($7a9b02141dd10726$require$redirectStatusSet.has(actualResponse.status)) { + // 1. If actualResponse’s status is not 303, request’s body is not null, + // and the connection uses HTTP/2, then user agents may, and are even + // encouraged to, transmit an RST_STREAM frame. + // See, https://github.com/whatwg/fetch/issues/1288 + if (request.redirect !== 'manual') fetchParams.controller.connection.destroy(undefined, false); + // 2. Switch on request’s redirect mode: + if (request.redirect === 'error') // Set response to a network error. + response = $7a9b02141dd10726$require$makeNetworkError('unexpected redirect'); + else if (request.redirect === 'manual') // Set response to an opaque-redirect filtered response whose internal + // response is actualResponse. + // NOTE(spec): On the web this would return an `opaqueredirect` response, + // but that doesn't make sense server side. + // See https://github.com/nodejs/undici/issues/1193. + response = actualResponse; + else if (request.redirect === 'follow') // Set response to the result of running HTTP-redirect fetch given + // fetchParams and response. + response = await $7a9b02141dd10726$var$httpRedirectFetch(fetchParams, response); + else $in2sP$nodeassert(false); } + // 9. Set response’s timing info to timingInfo. + response.timingInfo = timingInfo; + // 10. Return response. + return response; } -// https://fetch.spec.whatwg.org/#fetch-method -function $fd36c5c8024bd3ac$var$fetch(input, init = {}) { - $fd36c5c8024bd3ac$require$webidl.argumentLengthCheck(arguments, 1, { - header: "globalThis.fetch" - }); - // 1. Let p be a new promise. - const p = $fd36c5c8024bd3ac$require$createDeferredPromise(); - // 2. Let requestObject be the result of invoking the initial value of - // Request as constructor with input and init as arguments. If this throws - // an exception, reject p with it and return p. - let requestObject; +// https://fetch.spec.whatwg.org/#http-redirect-fetch +function $7a9b02141dd10726$var$httpRedirectFetch(fetchParams, response) { + // 1. Let request be fetchParams’s request. + const request = fetchParams.request; + // 2. Let actualResponse be response, if response is not a filtered response, + // and response’s internal response otherwise. + const actualResponse = response.internalResponse ? response.internalResponse : response; + // 3. Let locationURL be actualResponse’s location URL given request’s current + // URL’s fragment. + let locationURL; try { - requestObject = new $fd36c5c8024bd3ac$require$Request(input, init); - } catch (e) { - p.reject(e); - return p.promise; + locationURL = $7a9b02141dd10726$require$responseLocationURL(actualResponse, $7a9b02141dd10726$require$requestCurrentURL(request).hash); + // 4. If locationURL is null, then return response. + if (locationURL == null) return response; + } catch (err) { + // 5. If locationURL is failure, then return a network error. + return Promise.resolve($7a9b02141dd10726$require$makeNetworkError(err)); } - // 3. Let request be requestObject’s request. - const request = requestObject[$fd36c5c8024bd3ac$require$kState]; - // 4. If requestObject’s signal’s aborted flag is set, then: - if (requestObject.signal.aborted) { - // 1. Abort the fetch() call with p, request, null, and - // requestObject’s signal’s abort reason. - $fd36c5c8024bd3ac$var$abortFetch(p, request, null, requestObject.signal.reason); - // 2. Return p. - return p.promise; + // 6. If locationURL’s scheme is not an HTTP(S) scheme, then return a network + // error. + if (!$7a9b02141dd10726$require$urlIsHttpHttpsScheme(locationURL)) return Promise.resolve($7a9b02141dd10726$require$makeNetworkError('URL scheme must be a HTTP(S) scheme')); + // 7. If request’s redirect count is 20, then return a network error. + if (request.redirectCount === 20) return Promise.resolve($7a9b02141dd10726$require$makeNetworkError('redirect count exceeded')); + // 8. Increase request’s redirect count by 1. + request.redirectCount += 1; + // 9. If request’s mode is "cors", locationURL includes credentials, and + // request’s origin is not same origin with locationURL’s origin, then return + // a network error. + if (request.mode === 'cors' && (locationURL.username || locationURL.password) && !$7a9b02141dd10726$require$sameOrigin(request, locationURL)) return Promise.resolve($7a9b02141dd10726$require$makeNetworkError('cross origin not allowed for request mode "cors"')); + // 10. If request’s response tainting is "cors" and locationURL includes + // credentials, then return a network error. + if (request.responseTainting === 'cors' && (locationURL.username || locationURL.password)) return Promise.resolve($7a9b02141dd10726$require$makeNetworkError('URL cannot contain credentials for request mode "cors"')); + // 11. If actualResponse’s status is not 303, request’s body is non-null, + // and request’s body’s source is null, then return a network error. + if (actualResponse.status !== 303 && request.body != null && request.body.source == null) return Promise.resolve($7a9b02141dd10726$require$makeNetworkError()); + // 12. If one of the following is true + // - actualResponse’s status is 301 or 302 and request’s method is `POST` + // - actualResponse’s status is 303 and request’s method is not `GET` or `HEAD` + if ([ + 301, + 302 + ].includes(actualResponse.status) && request.method === 'POST' || actualResponse.status === 303 && !$7a9b02141dd10726$var$GET_OR_HEAD.includes(request.method)) { + // then: + // 1. Set request’s method to `GET` and request’s body to null. + request.method = 'GET'; + request.body = null; + // 2. For each headerName of request-body-header name, delete headerName from + // request’s header list. + for (const headerName of $7a9b02141dd10726$require$requestBodyHeader)request.headersList.delete(headerName); } - // 5. Let globalObject be request’s client’s global object. - const globalObject = request.client.globalObject; - // 6. If globalObject is a ServiceWorkerGlobalScope object, then set - // request’s service-workers mode to "none". - if (globalObject?.constructor?.name === "ServiceWorkerGlobalScope") request.serviceWorkers = "none"; - // 7. Let responseObject be null. - let responseObject = null; - // 8. Let relevantRealm be this’s relevant Realm. - const relevantRealm = null; - // 9. Let locallyAborted be false. - let locallyAborted = false; - // 10. Let controller be null. - let controller = null; - // 11. Add the following abort steps to requestObject’s signal: - $fd36c5c8024bd3ac$require$addAbortListener(requestObject.signal, ()=>{ - // 1. Set locallyAborted to true. - locallyAborted = true; - // 2. Assert: controller is non-null. - $g40fK$assert(controller != null); - // 3. Abort controller with requestObject’s signal’s abort reason. - controller.abort(requestObject.signal.reason); - // 4. Abort the fetch() call with p, request, responseObject, - // and requestObject’s signal’s abort reason. - $fd36c5c8024bd3ac$var$abortFetch(p, request, responseObject, requestObject.signal.reason); - }); - // 12. Let handleFetchDone given response response be to finalize and - // report timing with response, globalObject, and "fetch". - const handleFetchDone = (response)=>$fd36c5c8024bd3ac$var$finalizeAndReportTiming(response, "fetch"); - // 13. Set controller to the result of calling fetch given request, - // with processResponseEndOfBody set to handleFetchDone, and processResponse - // given response being these substeps: - const processResponse = (response)=>{ - // 1. If locallyAborted is true, terminate these substeps. - if (locallyAborted) return Promise.resolve(); - // 2. If response’s aborted flag is set, then: - if (response.aborted) { - // 1. Let deserializedError be the result of deserialize a serialized - // abort reason given controller’s serialized abort reason and - // relevantRealm. - // 2. Abort the fetch() call with p, request, responseObject, and - // deserializedError. - $fd36c5c8024bd3ac$var$abortFetch(p, request, responseObject, controller.serializedAbortReason); - return Promise.resolve(); - } - // 3. If response is a network error, then reject p with a TypeError - // and terminate these substeps. - if (response.type === "error") { - p.reject(Object.assign(new TypeError("fetch failed"), { - cause: response.error - })); - return Promise.resolve(); - } - // 4. Set responseObject to the result of creating a Response object, - // given response, "immutable", and relevantRealm. - responseObject = new $fd36c5c8024bd3ac$require$Response(); - responseObject[$fd36c5c8024bd3ac$require$kState] = response; - responseObject[$fd36c5c8024bd3ac$require$kRealm] = relevantRealm; - responseObject[$fd36c5c8024bd3ac$require$kHeaders][$fd36c5c8024bd3ac$require$kHeadersList] = response.headersList; - responseObject[$fd36c5c8024bd3ac$require$kHeaders][$fd36c5c8024bd3ac$require$kGuard] = "immutable"; - responseObject[$fd36c5c8024bd3ac$require$kHeaders][$fd36c5c8024bd3ac$require$kRealm] = relevantRealm; - // 5. Resolve p with responseObject. - p.resolve(responseObject); - }; - controller = $fd36c5c8024bd3ac$var$fetching({ - request: request, - processResponseEndOfBody: handleFetchDone, - processResponse: processResponse, - dispatcher: init.dispatcher ?? $fd36c5c8024bd3ac$require$getGlobalDispatcher() // undici - }); - // 14. Return p. - return p.promise; -} -// https://fetch.spec.whatwg.org/#finalize-and-report-timing -function $fd36c5c8024bd3ac$var$finalizeAndReportTiming(response, initiatorType = "other") { - // 1. If response is an aborted network error, then return. - if (response.type === "error" && response.aborted) return; - // 2. If response’s URL list is null or empty, then return. - if (!response.urlList?.length) return; - // 3. Let originalURL be response’s URL list[0]. - const originalURL = response.urlList[0]; - // 4. Let timingInfo be response’s timing info. - let timingInfo = response.timingInfo; - // 5. Let cacheState be response’s cache state. - let cacheState = response.cacheState; - // 6. If originalURL’s scheme is not an HTTP(S) scheme, then return. - if (!$fd36c5c8024bd3ac$require$urlIsHttpHttpsScheme(originalURL)) return; - // 7. If timingInfo is null, then return. - if (timingInfo === null) return; - // 8. If response’s timing allow passed flag is not set, then: - if (!response.timingAllowPassed) { - // 1. Set timingInfo to a the result of creating an opaque timing info for timingInfo. - timingInfo = $fd36c5c8024bd3ac$require$createOpaqueTimingInfo({ - startTime: timingInfo.startTime - }); - // 2. Set cacheState to the empty string. - cacheState = ""; + // 13. If request’s current URL’s origin is not same origin with locationURL’s + // origin, then for each headerName of CORS non-wildcard request-header name, + // delete headerName from request’s header list. + if (!$7a9b02141dd10726$require$sameOrigin($7a9b02141dd10726$require$requestCurrentURL(request), locationURL)) { + // https://fetch.spec.whatwg.org/#cors-non-wildcard-request-header-name + request.headersList.delete('authorization', true); + // https://fetch.spec.whatwg.org/#authentication-entries + request.headersList.delete('proxy-authorization', true); + // "Cookie" and "Host" are forbidden request-headers, which undici doesn't implement. + request.headersList.delete('cookie', true); + request.headersList.delete('host', true); } - // 9. Set timingInfo’s end time to the coarsened shared current time - // given global’s relevant settings object’s cross-origin isolated + // 14. If request’s body is non-null, then set request’s body to the first return + // value of safely extracting request’s body’s source. + if (request.body != null) { + $in2sP$nodeassert(request.body.source != null); + request.body = $7a9b02141dd10726$require$safelyExtractBody(request.body.source)[0]; + } + // 15. Let timingInfo be fetchParams’s timing info. + const timingInfo = fetchParams.timingInfo; + // 16. Set timingInfo’s redirect end time and post-redirect start time to the + // coarsened shared current time given fetchParams’s cross-origin isolated // capability. - // TODO: given global’s relevant settings object’s cross-origin isolated - // capability? - timingInfo.endTime = $fd36c5c8024bd3ac$require$coarsenedSharedCurrentTime(); - // 10. Set response’s timing info to timingInfo. - response.timingInfo = timingInfo; - // 11. Mark resource timing for timingInfo, originalURL, initiatorType, - // global, and cacheState. - $fd36c5c8024bd3ac$var$markResourceTiming(timingInfo, originalURL, initiatorType, globalThis, cacheState); -} -// https://w3c.github.io/resource-timing/#dfn-mark-resource-timing -function $fd36c5c8024bd3ac$var$markResourceTiming(timingInfo, originalURL, initiatorType, globalThis1, cacheState) { - if ($fd36c5c8024bd3ac$require$nodeMajor > 18 || $fd36c5c8024bd3ac$require$nodeMajor === 18 && $fd36c5c8024bd3ac$require$nodeMinor >= 2) performance.markResourceTiming(timingInfo, originalURL.href, initiatorType, globalThis1, cacheState); -} -// https://fetch.spec.whatwg.org/#abort-fetch -function $fd36c5c8024bd3ac$var$abortFetch(p, request, responseObject, error) { - // Note: AbortSignal.reason was added in node v17.2.0 - // which would give us an undefined error to reject with. - // Remove this once node v16 is no longer supported. - if (!error) error = new $fd36c5c8024bd3ac$require$DOMException("The operation was aborted.", "AbortError"); - // 1. Reject promise with error. - p.reject(error); - // 2. If request’s body is not null and is readable, then cancel request’s - // body with error. - if (request.body != null && $fd36c5c8024bd3ac$require$isReadable(request.body?.stream)) request.body.stream.cancel(error).catch((err)=>{ - if (err.code === "ERR_INVALID_STATE") // Node bug? - return; - throw err; - }); - // 3. If responseObject is null, then return. - if (responseObject == null) return; - // 4. Let response be responseObject’s response. - const response = responseObject[$fd36c5c8024bd3ac$require$kState]; - // 5. If response’s body is not null and is readable, then error response’s - // body with error. - if (response.body != null && $fd36c5c8024bd3ac$require$isReadable(response.body?.stream)) response.body.stream.cancel(error).catch((err)=>{ - if (err.code === "ERR_INVALID_STATE") // Node bug? - return; - throw err; - }); + timingInfo.redirectEndTime = timingInfo.postRedirectStartTime = $7a9b02141dd10726$require$coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability); + // 17. If timingInfo’s redirect start time is 0, then set timingInfo’s + // redirect start time to timingInfo’s start time. + if (timingInfo.redirectStartTime === 0) timingInfo.redirectStartTime = timingInfo.startTime; + // 18. Append locationURL to request’s URL list. + request.urlList.push(locationURL); + // 19. Invoke set request’s referrer policy on redirect on request and + // actualResponse. + $7a9b02141dd10726$require$setRequestReferrerPolicyOnRedirect(request, actualResponse); + // 20. Return the result of running main fetch given fetchParams and true. + return $7a9b02141dd10726$var$mainFetch(fetchParams, true); } -// https://fetch.spec.whatwg.org/#fetching -function $fd36c5c8024bd3ac$var$fetching({ request: request, processRequestBodyChunkLength: processRequestBodyChunkLength, processRequestEndOfBody: processRequestEndOfBody, processResponse: processResponse, processResponseEndOfBody: processResponseEndOfBody, processResponseConsumeBody: processResponseConsumeBody, useParallelQueue: useParallelQueue = false, dispatcher: dispatcher // undici - }) { - // 1. Let taskDestination be null. - let taskDestination = null; - // 2. Let crossOriginIsolatedCapability be false. - let crossOriginIsolatedCapability = false; - // 3. If request’s client is non-null, then: - if (request.client != null) { - // 1. Set taskDestination to request’s client’s global object. - taskDestination = request.client.globalObject; - // 2. Set crossOriginIsolatedCapability to request’s client’s cross-origin - // isolated capability. - crossOriginIsolatedCapability = request.client.crossOriginIsolatedCapability; +// https://fetch.spec.whatwg.org/#http-network-or-cache-fetch +async function $7a9b02141dd10726$var$httpNetworkOrCacheFetch(fetchParams, isAuthenticationFetch = false, isNewConnectionFetch = false) { + // 1. Let request be fetchParams’s request. + const request = fetchParams.request; + // 2. Let httpFetchParams be null. + let httpFetchParams = null; + // 3. Let httpRequest be null. + let httpRequest = null; + // 4. Let response be null. + let response = null; + // 5. Let storedResponse be null. + // TODO: cache + // 6. Let httpCache be null. + const httpCache = null; + // 7. Let the revalidatingFlag be unset. + const revalidatingFlag = false; + // 8. Run these steps, but abort when the ongoing fetch is terminated: + // 1. If request’s window is "no-window" and request’s redirect mode is + // "error", then set httpFetchParams to fetchParams and httpRequest to + // request. + if (request.window === 'no-window' && request.redirect === 'error') { + httpFetchParams = fetchParams; + httpRequest = request; + } else { + // Otherwise: + // 1. Set httpRequest to a clone of request. + httpRequest = $7a9b02141dd10726$require$cloneRequest(request); + // 2. Set httpFetchParams to a copy of fetchParams. + httpFetchParams = { + ...fetchParams + }; + // 3. Set httpFetchParams’s request to httpRequest. + httpFetchParams.request = httpRequest; + } + // 3. Let includeCredentials be true if one of + const includeCredentials = request.credentials === 'include' || request.credentials === 'same-origin' && request.responseTainting === 'basic'; + // 4. Let contentLength be httpRequest’s body’s length, if httpRequest’s + // body is non-null; otherwise null. + const contentLength = httpRequest.body ? httpRequest.body.length : null; + // 5. Let contentLengthHeaderValue be null. + let contentLengthHeaderValue = null; + // 6. If httpRequest’s body is null and httpRequest’s method is `POST` or + // `PUT`, then set contentLengthHeaderValue to `0`. + if (httpRequest.body == null && [ + 'POST', + 'PUT' + ].includes(httpRequest.method)) contentLengthHeaderValue = '0'; + // 7. If contentLength is non-null, then set contentLengthHeaderValue to + // contentLength, serialized and isomorphic encoded. + if (contentLength != null) contentLengthHeaderValue = $7a9b02141dd10726$require$isomorphicEncode(`${contentLength}`); + // 8. If contentLengthHeaderValue is non-null, then append + // `Content-Length`/contentLengthHeaderValue to httpRequest’s header + // list. + if (contentLengthHeaderValue != null) httpRequest.headersList.append('content-length', contentLengthHeaderValue, true); + // 9. If contentLengthHeaderValue is non-null, then append (`Content-Length`, + // contentLengthHeaderValue) to httpRequest’s header list. + // 10. If contentLength is non-null and httpRequest’s keepalive is true, + // then: + contentLength != null && httpRequest.keepalive; + // 11. If httpRequest’s referrer is a URL, then append + // `Referer`/httpRequest’s referrer, serialized and isomorphic encoded, + // to httpRequest’s header list. + if (httpRequest.referrer instanceof URL) httpRequest.headersList.append('referer', $7a9b02141dd10726$require$isomorphicEncode(httpRequest.referrer.href), true); + // 12. Append a request `Origin` header for httpRequest. + $7a9b02141dd10726$require$appendRequestOriginHeader(httpRequest); + // 13. Append the Fetch metadata headers for httpRequest. [FETCH-METADATA] + $7a9b02141dd10726$require$appendFetchMetadata(httpRequest); + // 14. If httpRequest’s header list does not contain `User-Agent`, then + // user agents should append `User-Agent`/default `User-Agent` value to + // httpRequest’s header list. + if (!httpRequest.headersList.contains('user-agent', true)) httpRequest.headersList.append('user-agent', $7a9b02141dd10726$var$defaultUserAgent); + // 15. If httpRequest’s cache mode is "default" and httpRequest’s header + // list contains `If-Modified-Since`, `If-None-Match`, + // `If-Unmodified-Since`, `If-Match`, or `If-Range`, then set + // httpRequest’s cache mode to "no-store". + if (httpRequest.cache === 'default' && (httpRequest.headersList.contains('if-modified-since', true) || httpRequest.headersList.contains('if-none-match', true) || httpRequest.headersList.contains('if-unmodified-since', true) || httpRequest.headersList.contains('if-match', true) || httpRequest.headersList.contains('if-range', true))) httpRequest.cache = 'no-store'; + // 16. If httpRequest’s cache mode is "no-cache", httpRequest’s prevent + // no-cache cache-control header modification flag is unset, and + // httpRequest’s header list does not contain `Cache-Control`, then append + // `Cache-Control`/`max-age=0` to httpRequest’s header list. + if (httpRequest.cache === 'no-cache' && !httpRequest.preventNoCacheCacheControlHeaderModification && !httpRequest.headersList.contains('cache-control', true)) httpRequest.headersList.append('cache-control', 'max-age=0', true); + // 17. If httpRequest’s cache mode is "no-store" or "reload", then: + if (httpRequest.cache === 'no-store' || httpRequest.cache === 'reload') { + // 1. If httpRequest’s header list does not contain `Pragma`, then append + // `Pragma`/`no-cache` to httpRequest’s header list. + if (!httpRequest.headersList.contains('pragma', true)) httpRequest.headersList.append('pragma', 'no-cache', true); + // 2. If httpRequest’s header list does not contain `Cache-Control`, + // then append `Cache-Control`/`no-cache` to httpRequest’s header list. + if (!httpRequest.headersList.contains('cache-control', true)) httpRequest.headersList.append('cache-control', 'no-cache', true); } - // 4. If useParallelQueue is true, then set taskDestination to the result of - // starting a new parallel queue. + // 18. If httpRequest’s header list contains `Range`, then append + // `Accept-Encoding`/`identity` to httpRequest’s header list. + if (httpRequest.headersList.contains('range', true)) httpRequest.headersList.append('accept-encoding', 'identity', true); + // 19. Modify httpRequest’s header list per HTTP. Do not append a given + // header if httpRequest’s header list contains that header’s name. + // TODO: https://github.com/whatwg/fetch/issues/1285#issuecomment-896560129 + if (!httpRequest.headersList.contains('accept-encoding', true)) { + if ($7a9b02141dd10726$require$urlHasHttpsScheme($7a9b02141dd10726$require$requestCurrentURL(httpRequest))) httpRequest.headersList.append('accept-encoding', 'br, gzip, deflate', true); + else httpRequest.headersList.append('accept-encoding', 'gzip, deflate', true); + } + httpRequest.headersList.delete('host', true); + // 20. If includeCredentials is true, then: + includeCredentials; + // 21. If there’s a proxy-authentication entry, use it as appropriate. + // TODO: proxy-authentication + // 22. Set httpCache to the result of determining the HTTP cache + // partition, given httpRequest. + // TODO: cache + // 23. If httpCache is null, then set httpRequest’s cache mode to + // "no-store". + if (httpCache == null) httpRequest.cache = 'no-store'; + // 24. If httpRequest’s cache mode is neither "no-store" nor "reload", + // then: + httpRequest.cache !== 'no-store' && httpRequest.cache; + // 9. If aborted, then return the appropriate network error for fetchParams. // TODO - // 5. Let timingInfo be a new fetch timing info whose start time and - // post-redirect start time are the coarsened shared current time given - // crossOriginIsolatedCapability. - const currenTime = $fd36c5c8024bd3ac$require$coarsenedSharedCurrentTime(crossOriginIsolatedCapability); - const timingInfo = $fd36c5c8024bd3ac$require$createOpaqueTimingInfo({ - startTime: currenTime - }); - // 6. Let fetchParams be a new fetch params whose - // request is request, - // timing info is timingInfo, - // process request body chunk length is processRequestBodyChunkLength, - // process request end-of-body is processRequestEndOfBody, - // process response is processResponse, - // process response consume body is processResponseConsumeBody, - // process response end-of-body is processResponseEndOfBody, - // task destination is taskDestination, - // and cross-origin isolated capability is crossOriginIsolatedCapability. - const fetchParams = { - controller: new $fd36c5c8024bd3ac$var$Fetch(dispatcher), - request: request, - timingInfo: timingInfo, - processRequestBodyChunkLength: processRequestBodyChunkLength, - processRequestEndOfBody: processRequestEndOfBody, - processResponse: processResponse, - processResponseConsumeBody: processResponseConsumeBody, - processResponseEndOfBody: processResponseEndOfBody, - taskDestination: taskDestination, - crossOriginIsolatedCapability: crossOriginIsolatedCapability + // 10. If response is null, then: + if (response == null) { + // 1. If httpRequest’s cache mode is "only-if-cached", then return a + // network error. + if (httpRequest.cache === 'only-if-cached') return $7a9b02141dd10726$require$makeNetworkError('only if cached'); + // 2. Let forwardResponse be the result of running HTTP-network fetch + // given httpFetchParams, includeCredentials, and isNewConnectionFetch. + const forwardResponse = await $7a9b02141dd10726$var$httpNetworkFetch(httpFetchParams, includeCredentials, isNewConnectionFetch); + // 3. If httpRequest’s method is unsafe and forwardResponse’s status is + // in the range 200 to 399, inclusive, invalidate appropriate stored + // responses in httpCache, as per the "Invalidation" chapter of HTTP + // Caching, and set storedResponse to null. [HTTP-CACHING] + !$7a9b02141dd10726$require$safeMethodsSet.has(httpRequest.method) && forwardResponse.status >= 200 && forwardResponse.status; + // 4. If the revalidatingFlag is set and forwardResponse’s status is 304, + // then: + revalidatingFlag && forwardResponse.status; + // 5. If response is null, then: + if (response == null) // 1. Set response to forwardResponse. + response = forwardResponse; + } + // 11. Set response’s URL list to a clone of httpRequest’s URL list. + response.urlList = [ + ...httpRequest.urlList + ]; + // 12. If httpRequest’s header list contains `Range`, then set response’s + // range-requested flag. + if (httpRequest.headersList.contains('range', true)) response.rangeRequested = true; + // 13. Set response’s request-includes-credentials to includeCredentials. + response.requestIncludesCredentials = includeCredentials; + // 14. If response’s status is 401, httpRequest’s response tainting is not + // "cors", includeCredentials is true, and request’s window is an environment + // settings object, then: + // TODO + // 15. If response’s status is 407, then: + if (response.status === 407) { + // 1. If request’s window is "no-window", then return a network error. + if (request.window === 'no-window') return $7a9b02141dd10726$require$makeNetworkError(); + // 2. ??? + // 3. If fetchParams is canceled, then return the appropriate network error for fetchParams. + if ($7a9b02141dd10726$require$isCancelled(fetchParams)) return $7a9b02141dd10726$require$makeAppropriateNetworkError(fetchParams); + // 4. Prompt the end user as appropriate in request’s window and store + // the result as a proxy-authentication entry. [HTTP-AUTH] + // TODO: Invoke some kind of callback? + // 5. Set response to the result of running HTTP-network-or-cache fetch given + // fetchParams. + // TODO + return $7a9b02141dd10726$require$makeNetworkError('proxy authentication required'); + } + // 16. If all of the following are true + if (// response’s status is 421 + response.status === 421 && // isNewConnectionFetch is false + !isNewConnectionFetch && // request’s body is null, or request’s body is non-null and request’s body’s source is non-null + (request.body == null || request.body.source != null)) { + // then: + // 1. If fetchParams is canceled, then return the appropriate network error for fetchParams. + if ($7a9b02141dd10726$require$isCancelled(fetchParams)) return $7a9b02141dd10726$require$makeAppropriateNetworkError(fetchParams); + // 2. Set response to the result of running HTTP-network-or-cache + // fetch given fetchParams, isAuthenticationFetch, and true. + // TODO (spec): The spec doesn't specify this but we need to cancel + // the active response before we can start a new one. + // https://github.com/whatwg/fetch/issues/1293 + fetchParams.controller.connection.destroy(); + response = await $7a9b02141dd10726$var$httpNetworkOrCacheFetch(fetchParams, isAuthenticationFetch, true); + } + // 17. If isAuthenticationFetch is true, then create an authentication entry + isAuthenticationFetch; + // 18. Return response. + return response; +} +// https://fetch.spec.whatwg.org/#http-network-fetch +async function $7a9b02141dd10726$var$httpNetworkFetch(fetchParams, includeCredentials = false, forceNewConnection = false) { + $in2sP$nodeassert(!fetchParams.controller.connection || fetchParams.controller.connection.destroyed); + fetchParams.controller.connection = { + abort: null, + destroyed: false, + destroy (err, abort = true) { + if (!this.destroyed) { + this.destroyed = true; + if (abort) this.abort?.(err ?? new DOMException('The operation was aborted.', 'AbortError')); + } + } }; - // 7. If request’s body is a byte sequence, then set request’s body to - // request’s body as a body. - // NOTE: Since fetching is only called from fetch, body should already be - // extracted. - $g40fK$assert(!request.body || request.body.stream); - // 8. If request’s window is "client", then set request’s window to request’s - // client, if request’s client’s global object is a Window object; otherwise - // "no-window". - if (request.window === "client") // TODO: What if request.client is null? - request.window = request.client?.globalObject?.constructor?.name === "Window" ? request.client : "no-window"; - // 9. If request’s origin is "client", then set request’s origin to request’s - // client’s origin. - if (request.origin === "client") // TODO: What if request.client is null? - request.origin = request.client?.origin; - // 10. If all of the following conditions are true: + // 1. Let request be fetchParams’s request. + const request = fetchParams.request; + // 2. Let response be null. + let response = null; + // 3. Let timingInfo be fetchParams’s timing info. + const timingInfo = fetchParams.timingInfo; + // 4. Let httpCache be the result of determining the HTTP cache partition, + // given request. + // TODO: cache + const httpCache = null; + // 5. If httpCache is null, then set request’s cache mode to "no-store". + if (httpCache == null) request.cache = 'no-store'; + // 6. Let networkPartitionKey be the result of determining the network + // partition key given request. // TODO - // 11. If request’s policy container is "client", then: - if (request.policyContainer === "client") { - // 1. If request’s client is non-null, then set request’s policy - // container to a clone of request’s client’s policy container. [HTML] - if (request.client != null) request.policyContainer = $fd36c5c8024bd3ac$require$clonePolicyContainer(request.client.policyContainer); - else // 2. Otherwise, set request’s policy container to a new policy - // container. - request.policyContainer = $fd36c5c8024bd3ac$require$makePolicyContainer(); + // 7. Let newConnection be "yes" if forceNewConnection is true; otherwise + // "no". + const newConnection = forceNewConnection ? 'yes' : 'no' // eslint-disable-line no-unused-vars + ; + // 8. Switch on request’s mode: + request.mode; + // 9. Run these steps, but abort when the ongoing fetch is terminated: + // 1. If connection is failure, then return a network error. + // 2. Set timingInfo’s final connection timing info to the result of + // calling clamp and coarsen connection timing info with connection’s + // timing info, timingInfo’s post-redirect start time, and fetchParams’s + // cross-origin isolated capability. + // 3. If connection is not an HTTP/2 connection, request’s body is non-null, + // and request’s body’s source is null, then append (`Transfer-Encoding`, + // `chunked`) to request’s header list. + // 4. Set timingInfo’s final network-request start time to the coarsened + // shared current time given fetchParams’s cross-origin isolated + // capability. + // 5. Set response to the result of making an HTTP request over connection + // using request with the following caveats: + // - Follow the relevant requirements from HTTP. [HTTP] [HTTP-SEMANTICS] + // [HTTP-COND] [HTTP-CACHING] [HTTP-AUTH] + // - If request’s body is non-null, and request’s body’s source is null, + // then the user agent may have a buffer of up to 64 kibibytes and store + // a part of request’s body in that buffer. If the user agent reads from + // request’s body beyond that buffer’s size and the user agent needs to + // resend request, then instead return a network error. + // - Set timingInfo’s final network-response start time to the coarsened + // shared current time given fetchParams’s cross-origin isolated capability, + // immediately after the user agent’s HTTP parser receives the first byte + // of the response (e.g., frame header bytes for HTTP/2 or response status + // line for HTTP/1.x). + // - Wait until all the headers are transmitted. + // - Any responses whose status is in the range 100 to 199, inclusive, + // and is not 101, are to be ignored, except for the purposes of setting + // timingInfo’s final network-response start time above. + // - If request’s header list contains `Transfer-Encoding`/`chunked` and + // response is transferred via HTTP/1.0 or older, then return a network + // error. + // - If the HTTP request results in a TLS client certificate dialog, then: + // 1. If request’s window is an environment settings object, make the + // dialog available in request’s window. + // 2. Otherwise, return a network error. + // To transmit request’s body body, run these steps: + let requestBody = null; + // 1. If body is null and fetchParams’s process request end-of-body is + // non-null, then queue a fetch task given fetchParams’s process request + // end-of-body and fetchParams’s task destination. + if (request.body == null && fetchParams.processRequestEndOfBody) queueMicrotask(()=>fetchParams.processRequestEndOfBody()); + else if (request.body != null) { + // 2. Otherwise, if body is non-null: + // 1. Let processBodyChunk given bytes be these steps: + const processBodyChunk = async function*(bytes) { + // 1. If the ongoing fetch is terminated, then abort these steps. + if ($7a9b02141dd10726$require$isCancelled(fetchParams)) return; + // 2. Run this step in parallel: transmit bytes. + yield bytes; + // 3. If fetchParams’s process request body is non-null, then run + // fetchParams’s process request body given bytes’s length. + fetchParams.processRequestBodyChunkLength?.(bytes.byteLength); + }; + // 2. Let processEndOfBody be these steps: + const processEndOfBody = ()=>{ + // 1. If fetchParams is canceled, then abort these steps. + if ($7a9b02141dd10726$require$isCancelled(fetchParams)) return; + // 2. If fetchParams’s process request end-of-body is non-null, + // then run fetchParams’s process request end-of-body. + if (fetchParams.processRequestEndOfBody) fetchParams.processRequestEndOfBody(); + }; + // 3. Let processBodyError given e be these steps: + const processBodyError = (e)=>{ + // 1. If fetchParams is canceled, then abort these steps. + if ($7a9b02141dd10726$require$isCancelled(fetchParams)) return; + // 2. If e is an "AbortError" DOMException, then abort fetchParams’s controller. + if (e.name === 'AbortError') fetchParams.controller.abort(); + else fetchParams.controller.terminate(e); + }; + // 4. Incrementally read request’s body given processBodyChunk, processEndOfBody, + // processBodyError, and fetchParams’s task destination. + requestBody = async function*() { + try { + for await (const bytes of request.body.stream)yield* processBodyChunk(bytes); + processEndOfBody(); + } catch (err) { + processBodyError(err); + } + }(); } - // 12. If request’s header list does not contain `Accept`, then: - if (!request.headersList.contains("accept")) { - // 1. Let value be `*/*`. - const value = "*/*"; - // 2. A user agent should set value to the first matching statement, if - // any, switching on request’s destination: - // "document" - // "frame" - // "iframe" - // `text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8` - // "image" - // `image/png,image/svg+xml,image/*;q=0.8,*/*;q=0.5` - // "style" - // `text/css,*/*;q=0.1` - // TODO - // 3. Append `Accept`/value to request’s header list. - request.headersList.append("accept", value); + try { + // socket is only provided for websockets + const { body: body, status: status, statusText: statusText, headersList: headersList, socket: socket } = await dispatch({ + body: requestBody + }); + if (socket) response = $7a9b02141dd10726$require$makeResponse({ + status: status, + statusText: statusText, + headersList: headersList, + socket: socket + }); + else { + const iterator = body[Symbol.asyncIterator](); + fetchParams.controller.next = ()=>iterator.next(); + response = $7a9b02141dd10726$require$makeResponse({ + status: status, + statusText: statusText, + headersList: headersList + }); + } + } catch (err) { + // 10. If aborted, then: + if (err.name === 'AbortError') { + // 1. If connection uses HTTP/2, then transmit an RST_STREAM frame. + fetchParams.controller.connection.destroy(); + // 2. Return the appropriate network error for fetchParams. + return $7a9b02141dd10726$require$makeAppropriateNetworkError(fetchParams, err); + } + return $7a9b02141dd10726$require$makeNetworkError(err); } - // 13. If request’s header list does not contain `Accept-Language`, then - // user agents should append `Accept-Language`/an appropriate value to - // request’s header list. - if (!request.headersList.contains("accept-language")) request.headersList.append("accept-language", "*"); - // 14. If request’s priority is null, then use request’s initiator and - // destination appropriately in setting request’s priority to a - // user-agent-defined object. - request.priority; - // 15. If request is a subresource request, then: - $fd36c5c8024bd3ac$require$subresourceSet.has(request.destination); - // 16. Run main fetch given fetchParams. - $fd36c5c8024bd3ac$var$mainFetch(fetchParams).catch((err)=>{ - fetchParams.controller.terminate(err); - }); - // 17. Return fetchParam's controller - return fetchParams.controller; -} -// https://fetch.spec.whatwg.org/#concept-main-fetch -async function $fd36c5c8024bd3ac$var$mainFetch(fetchParams, recursive = false) { - // 1. Let request be fetchParams’s request. - const request = fetchParams.request; - // 2. Let response be null. - let response = null; - // 3. If request’s local-URLs-only flag is set and request’s current URL is - // not local, then set response to a network error. - if (request.localURLsOnly && !$fd36c5c8024bd3ac$require$urlIsLocal($fd36c5c8024bd3ac$require$requestCurrentURL(request))) response = $fd36c5c8024bd3ac$require$makeNetworkError("local URLs only"); - // 4. Run report Content Security Policy violations for request. + // 11. Let pullAlgorithm be an action that resumes the ongoing fetch + // if it is suspended. + const pullAlgorithm = async ()=>{ + await fetchParams.controller.resume(); + }; + // 12. Let cancelAlgorithm be an algorithm that aborts fetchParams’s + // controller with reason, given reason. + const cancelAlgorithm = (reason)=>{ + // If the aborted fetch was already terminated, then we do not + // need to do anything. + if (!$7a9b02141dd10726$require$isCancelled(fetchParams)) fetchParams.controller.abort(reason); + }; + // 13. Let highWaterMark be a non-negative, non-NaN number, chosen by + // the user agent. // TODO - // 5. Upgrade request to a potentially trustworthy URL, if appropriate. - $fd36c5c8024bd3ac$require$tryUpgradeRequestToAPotentiallyTrustworthyURL(request); - // 6. If should request be blocked due to a bad port, should fetching request - // be blocked as mixed content, or should request be blocked by Content - // Security Policy returns blocked, then set response to a network error. - if ($fd36c5c8024bd3ac$require$requestBadPort(request) === "blocked") response = $fd36c5c8024bd3ac$require$makeNetworkError("bad port"); - // TODO: should fetching request be blocked as mixed content? - // TODO: should request be blocked by Content Security Policy? - // 7. If request’s referrer policy is the empty string, then set request’s - // referrer policy to request’s policy container’s referrer policy. - if (request.referrerPolicy === "") request.referrerPolicy = request.policyContainer.referrerPolicy; - // 8. If request’s referrer is not "no-referrer", then set request’s - // referrer to the result of invoking determine request’s referrer. - if (request.referrer !== "no-referrer") request.referrer = $fd36c5c8024bd3ac$require$determineRequestsReferrer(request); - // 9. Set request’s current URL’s scheme to "https" if all of the following - // conditions are true: - // - request’s current URL’s scheme is "http" - // - request’s current URL’s host is a domain - // - Matching request’s current URL’s host per Known HSTS Host Domain Name - // Matching results in either a superdomain match with an asserted - // includeSubDomains directive or a congruent match (with or without an - // asserted includeSubDomains directive). [HSTS] + // 14. Let sizeAlgorithm be an algorithm that accepts a chunk object + // and returns a non-negative, non-NaN, non-infinite number, chosen by the user agent. // TODO - // 10. If recursive is false, then run the remaining steps in parallel. + // 15. Let stream be a new ReadableStream. + // 16. Set up stream with byte reading support with pullAlgorithm set to pullAlgorithm, + // cancelAlgorithm set to cancelAlgorithm. + const stream = new ReadableStream({ + async start (controller) { + fetchParams.controller.controller = controller; + }, + async pull (controller) { + await pullAlgorithm(controller); + }, + async cancel (reason) { + await cancelAlgorithm(reason); + }, + type: 'bytes' + }); + // 17. Run these steps, but abort when the ongoing fetch is terminated: + // 1. Set response’s body to a new body whose stream is stream. + response.body = { + stream: stream, + source: null, + length: null + }; + // 2. If response is not a network error and request’s cache mode is + // not "no-store", then update response in httpCache for request. + // TODO + // 3. If includeCredentials is true and the user agent is not configured + // to block cookies for request (see section 7 of [COOKIES]), then run the + // "set-cookie-string" parsing algorithm (see section 5.2 of [COOKIES]) on + // the value of each header whose name is a byte-case-insensitive match for + // `Set-Cookie` in response’s header list, if any, and request’s current URL. + // TODO + // 18. If aborted, then: // TODO - // 11. If response is null, then set response to the result of running - // the steps corresponding to the first matching statement: - if (response === null) response = await (async ()=>{ - const currentURL = $fd36c5c8024bd3ac$require$requestCurrentURL(request); - if (// - request’s current URL’s origin is same origin with request’s origin, - // and request’s response tainting is "basic" - $fd36c5c8024bd3ac$require$sameOrigin(currentURL, request.url) && request.responseTainting === "basic" || // request’s current URL’s scheme is "data" - currentURL.protocol === "data:" || // - request’s mode is "navigate" or "websocket" - request.mode === "navigate" || request.mode === "websocket") { - // 1. Set request’s response tainting to "basic". - request.responseTainting = "basic"; - // 2. Return the result of running scheme fetch given fetchParams. - return await $fd36c5c8024bd3ac$var$schemeFetch(fetchParams); - } - // request’s mode is "same-origin" - if (request.mode === "same-origin") // 1. Return a network error. - return $fd36c5c8024bd3ac$require$makeNetworkError('request mode cannot be "same-origin"'); - // request’s mode is "no-cors" - if (request.mode === "no-cors") { - // 1. If request’s redirect mode is not "follow", then return a network - // error. - if (request.redirect !== "follow") return $fd36c5c8024bd3ac$require$makeNetworkError('redirect mode cannot be "follow" for "no-cors" request'); - // 2. Set request’s response tainting to "opaque". - request.responseTainting = "opaque"; - // 3. Return the result of running scheme fetch given fetchParams. - return await $fd36c5c8024bd3ac$var$schemeFetch(fetchParams); + // 19. Run these steps in parallel: + // 1. Run these steps, but abort when fetchParams is canceled: + fetchParams.controller.onAborted = onAborted; + fetchParams.controller.on('terminated', onAborted); + fetchParams.controller.resume = async ()=>{ + // 1. While true + while(true){ + // 1-3. See onData... + // 4. Set bytes to the result of handling content codings given + // codings and bytes. + let bytes; + let isFailure; + try { + const { done: done, value: value } = await fetchParams.controller.next(); + if ($7a9b02141dd10726$require$isAborted(fetchParams)) break; + bytes = done ? undefined : value; + } catch (err) { + if (fetchParams.controller.ended && !timingInfo.encodedBodySize) // zlib doesn't like empty streams. + bytes = undefined; + else { + bytes = err; + // err may be propagated from the result of calling readablestream.cancel, + // which might not be an error. https://github.com/nodejs/undici/issues/2009 + isFailure = true; + } + } + if (bytes === undefined) { + // 2. Otherwise, if the bytes transmission for response’s message + // body is done normally and stream is readable, then close + // stream, finalize response for fetchParams and response, and + // abort these in-parallel steps. + $7a9b02141dd10726$require$readableStreamClose(fetchParams.controller.controller); + $7a9b02141dd10726$var$finalizeResponse(fetchParams, response); + return; + } + // 5. Increase timingInfo’s decoded body size by bytes’s length. + timingInfo.decodedBodySize += bytes?.byteLength ?? 0; + // 6. If bytes is failure, then terminate fetchParams’s controller. + if (isFailure) { + fetchParams.controller.terminate(bytes); + return; + } + // 7. Enqueue a Uint8Array wrapping an ArrayBuffer containing bytes + // into stream. + const buffer = new Uint8Array(bytes); + if (buffer.byteLength) fetchParams.controller.controller.enqueue(buffer); + // 8. If stream is errored, then terminate the ongoing fetch. + if ($7a9b02141dd10726$require$isErrored(stream)) { + fetchParams.controller.terminate(); + return; + } + // 9. If stream doesn’t need more data ask the user agent to suspend + // the ongoing fetch. + if (fetchParams.controller.controller.desiredSize <= 0) return; } - // request’s current URL’s scheme is not an HTTP(S) scheme - if (!$fd36c5c8024bd3ac$require$urlIsHttpHttpsScheme($fd36c5c8024bd3ac$require$requestCurrentURL(request))) // Return a network error. - return $fd36c5c8024bd3ac$require$makeNetworkError("URL scheme must be a HTTP(S) scheme"); - // - request’s use-CORS-preflight flag is set - // - request’s unsafe-request flag is set and either request’s method is - // not a CORS-safelisted method or CORS-unsafe request-header names with - // request’s header list is not empty - // 1. Set request’s response tainting to "cors". - // 2. Let corsWithPreflightResponse be the result of running HTTP fetch - // given fetchParams and true. - // 3. If corsWithPreflightResponse is a network error, then clear cache - // entries using request. - // 4. Return corsWithPreflightResponse. - // TODO - // Otherwise - // 1. Set request’s response tainting to "cors". - request.responseTainting = "cors"; - // 2. Return the result of running HTTP fetch given fetchParams. - return await $fd36c5c8024bd3ac$var$httpFetch(fetchParams); - })(); - // 12. If recursive is true, then return response. - if (recursive) return response; - // 13. If response is not a network error and response is not a filtered - // response, then: - if (response.status !== 0 && !response.internalResponse) { - // If request’s response tainting is "cors", then: - request.responseTainting; - // Set response to the following filtered response with response as its - // internal response, depending on request’s response tainting: - if (request.responseTainting === "basic") response = $fd36c5c8024bd3ac$require$filterResponse(response, "basic"); - else if (request.responseTainting === "cors") response = $fd36c5c8024bd3ac$require$filterResponse(response, "cors"); - else if (request.responseTainting === "opaque") response = $fd36c5c8024bd3ac$require$filterResponse(response, "opaque"); - else $g40fK$assert(false); + }; + // 2. If aborted, then: + function onAborted(reason) { + // 2. If fetchParams is aborted, then: + if ($7a9b02141dd10726$require$isAborted(fetchParams)) { + // 1. Set response’s aborted flag. + response.aborted = true; + // 2. If stream is readable, then error stream with the result of + // deserialize a serialized abort reason given fetchParams’s + // controller’s serialized abort reason and an + // implementation-defined realm. + if ($7a9b02141dd10726$require$isReadable(stream)) fetchParams.controller.controller.error(fetchParams.controller.serializedAbortReason); + } else // 3. Otherwise, if stream is readable, error stream with a TypeError. + if ($7a9b02141dd10726$require$isReadable(stream)) fetchParams.controller.controller.error(new TypeError('terminated', { + cause: $7a9b02141dd10726$require$isErrorLike(reason) ? reason : undefined + })); + // 4. If connection uses HTTP/2, then transmit an RST_STREAM frame. + // 5. Otherwise, the user agent should close connection unless it would be bad for performance to do so. + fetchParams.controller.connection.destroy(); } - // 14. Let internalResponse be response, if response is a network error, - // and response’s internal response otherwise. - let internalResponse = response.status === 0 ? response : response.internalResponse; - // 15. If internalResponse’s URL list is empty, then set it to a clone of - // request’s URL list. - if (internalResponse.urlList.length === 0) internalResponse.urlList.push(...request.urlList); - // 16. If request’s timing allow failed flag is unset, then set - // internalResponse’s timing allow passed flag. - if (!request.timingAllowFailed) response.timingAllowPassed = true; - // 17. If response is not a network error and any of the following returns - // blocked - // - should internalResponse to request be blocked as mixed content - // - should internalResponse to request be blocked by Content Security Policy - // - should internalResponse to request be blocked due to its MIME type - // - should internalResponse to request be blocked due to nosniff - // TODO - // 18. If response’s type is "opaque", internalResponse’s status is 206, - // internalResponse’s range-requested flag is set, and request’s header - // list does not contain `Range`, then set response and internalResponse - // to a network error. - if (response.type === "opaque" && internalResponse.status === 206 && internalResponse.rangeRequested && !request.headers.contains("range")) response = internalResponse = $fd36c5c8024bd3ac$require$makeNetworkError(); - // 19. If response is not a network error and either request’s method is - // `HEAD` or `CONNECT`, or internalResponse’s status is a null body status, - // set internalResponse’s body to null and disregard any enqueuing toward - // it (if any). - if (response.status !== 0 && (request.method === "HEAD" || request.method === "CONNECT" || $fd36c5c8024bd3ac$require$nullBodyStatus.includes(internalResponse.status))) { - internalResponse.body = null; - fetchParams.controller.dump = true; + // 20. Return response. + return response; + function dispatch({ body: body }) { + const url = $7a9b02141dd10726$require$requestCurrentURL(request); + /** @type {import('../..').Agent} */ const agent = fetchParams.controller.dispatcher; + return new Promise((resolve, reject)=>agent.dispatch({ + path: url.pathname + url.search, + origin: url.origin, + method: request.method, + body: agent.isMockActive ? request.body && (request.body.source || request.body.stream) : body, + headers: request.headersList.entries, + maxRedirections: 0, + upgrade: request.mode === 'websocket' ? 'websocket' : undefined + }, { + body: null, + abort: null, + onConnect (abort) { + // TODO (fix): Do we need connection here? + const { connection: connection } = fetchParams.controller; + // Set timingInfo’s final connection timing info to the result of calling clamp and coarsen + // connection timing info with connection’s timing info, timingInfo’s post-redirect start + // time, and fetchParams’s cross-origin isolated capability. + // TODO: implement connection timing + timingInfo.finalConnectionTimingInfo = $7a9b02141dd10726$require$clampAndCoarsenConnectionTimingInfo(undefined, timingInfo.postRedirectStartTime, fetchParams.crossOriginIsolatedCapability); + if (connection.destroyed) abort(new DOMException('The operation was aborted.', 'AbortError')); + else { + fetchParams.controller.on('terminated', abort); + this.abort = connection.abort = abort; + } + // Set timingInfo’s final network-request start time to the coarsened shared current time given + // fetchParams’s cross-origin isolated capability. + timingInfo.finalNetworkRequestStartTime = $7a9b02141dd10726$require$coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability); + }, + onResponseStarted () { + // Set timingInfo’s final network-response start time to the coarsened shared current + // time given fetchParams’s cross-origin isolated capability, immediately after the + // user agent’s HTTP parser receives the first byte of the response (e.g., frame header + // bytes for HTTP/2 or response status line for HTTP/1.x). + timingInfo.finalNetworkResponseStartTime = $7a9b02141dd10726$require$coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability); + }, + onHeaders (status, rawHeaders, resume, statusText) { + if (status < 200) return; + let location = ''; + const headersList = new $7a9b02141dd10726$require$HeadersList(); + for(let i = 0; i < rawHeaders.length; i += 2)headersList.append($7a9b02141dd10726$require$bufferToLowerCasedHeaderName(rawHeaders[i]), rawHeaders[i + 1].toString('latin1'), true); + location = headersList.get('location', true); + this.body = new $7a9b02141dd10726$require$Readable({ + read: resume + }); + const decoders = []; + const willFollow = location && request.redirect === 'follow' && $7a9b02141dd10726$require$redirectStatusSet.has(status); + // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Encoding + if (request.method !== 'HEAD' && request.method !== 'CONNECT' && !$7a9b02141dd10726$require$nullBodyStatus.includes(status) && !willFollow) { + // https://www.rfc-editor.org/rfc/rfc7231#section-3.1.2.1 + const contentEncoding = headersList.get('content-encoding', true); + // "All content-coding values are case-insensitive..." + /** @type {string[]} */ const codings = contentEncoding ? contentEncoding.toLowerCase().split(',') : []; + // Limit the number of content-encodings to prevent resource exhaustion. + // CVE fix similar to urllib3 (GHSA-gm62-xv2j-4w53) and curl (CVE-2022-32206). + const maxContentEncodings = 5; + if (codings.length > maxContentEncodings) { + reject(new Error(`too many content-encodings in response: ${codings.length}, maximum allowed is ${maxContentEncodings}`)); + return true; + } + for(let i = codings.length - 1; i >= 0; --i){ + const coding = codings[i].trim(); + // https://www.rfc-editor.org/rfc/rfc9112.html#section-7.2 + if (coding === 'x-gzip' || coding === 'gzip') decoders.push($in2sP$nodezlib.createGunzip({ + // Be less strict when decoding compressed responses, since sometimes + // servers send slightly invalid responses that are still accepted + // by common browsers. + // Always using Z_SYNC_FLUSH is what cURL does. + flush: $in2sP$nodezlib.constants.Z_SYNC_FLUSH, + finishFlush: $in2sP$nodezlib.constants.Z_SYNC_FLUSH + })); + else if (coding === 'deflate') decoders.push($7a9b02141dd10726$require$createInflate({ + flush: $in2sP$nodezlib.constants.Z_SYNC_FLUSH, + finishFlush: $in2sP$nodezlib.constants.Z_SYNC_FLUSH + })); + else if (coding === 'br') decoders.push($in2sP$nodezlib.createBrotliDecompress({ + flush: $in2sP$nodezlib.constants.BROTLI_OPERATION_FLUSH, + finishFlush: $in2sP$nodezlib.constants.BROTLI_OPERATION_FLUSH + })); + else { + decoders.length = 0; + break; + } + } + } + const onError = this.onError.bind(this); + resolve({ + status: status, + statusText: statusText, + headersList: headersList, + body: decoders.length ? $7a9b02141dd10726$require$pipeline(this.body, ...decoders, (err)=>{ + if (err) this.onError(err); + }).on('error', onError) : this.body.on('error', onError) + }); + return true; + }, + onData (chunk) { + if (fetchParams.controller.dump) return; + // 1. If one or more bytes have been transmitted from response’s + // message body, then: + // 1. Let bytes be the transmitted bytes. + const bytes = chunk; + // 2. Let codings be the result of extracting header list values + // given `Content-Encoding` and response’s header list. + // See pullAlgorithm. + // 3. Increase timingInfo’s encoded body size by bytes’s length. + timingInfo.encodedBodySize += bytes.byteLength; + // 4. See pullAlgorithm... + return this.body.push(bytes); + }, + onComplete () { + if (this.abort) fetchParams.controller.off('terminated', this.abort); + if (fetchParams.controller.onAborted) fetchParams.controller.off('terminated', fetchParams.controller.onAborted); + fetchParams.controller.ended = true; + this.body.push(null); + }, + onError (error) { + if (this.abort) fetchParams.controller.off('terminated', this.abort); + this.body?.destroy(error); + fetchParams.controller.terminate(error); + reject(error); + }, + onUpgrade (status, rawHeaders, socket) { + if (status !== 101) return; + const headersList = new $7a9b02141dd10726$require$HeadersList(); + for(let i = 0; i < rawHeaders.length; i += 2)headersList.append($7a9b02141dd10726$require$bufferToLowerCasedHeaderName(rawHeaders[i]), rawHeaders[i + 1].toString('latin1'), true); + resolve({ + status: status, + statusText: $7a9b02141dd10726$require$STATUS_CODES[status], + headersList: headersList, + socket: socket + }); + return true; + } + })); } - // 20. If request’s integrity metadata is not the empty string, then: - if (request.integrity) { - // 1. Let processBodyError be this step: run fetch finale given fetchParams - // and a network error. - const processBodyError = (reason)=>$fd36c5c8024bd3ac$var$fetchFinale(fetchParams, $fd36c5c8024bd3ac$require$makeNetworkError(reason)); - // 2. If request’s response tainting is "opaque", or response’s body is null, - // then run processBodyError and abort these steps. - if (request.responseTainting === "opaque" || response.body == null) { - processBodyError(response.error); - return; - } - // 3. Let processBody given bytes be these steps: - const processBody = (bytes)=>{ - // 1. If bytes do not match request’s integrity metadata, - // then run processBodyError and abort these steps. [SRI] - if (!$fd36c5c8024bd3ac$require$bytesMatch(bytes, request.integrity)) { - processBodyError("integrity mismatch"); - return; - } - // 2. Set response’s body to bytes as a body. - response.body = $fd36c5c8024bd3ac$require$safelyExtractBody(bytes)[0]; - // 3. Run fetch finale given fetchParams and response. - $fd36c5c8024bd3ac$var$fetchFinale(fetchParams, response); - }; - // 4. Fully read response’s body given processBody and processBodyError. - await $fd36c5c8024bd3ac$require$fullyReadBody(response.body, processBody, processBodyError); - } else // 21. Otherwise, run fetch finale given fetchParams and response. - $fd36c5c8024bd3ac$var$fetchFinale(fetchParams, response); } +module.exports = { + fetch: $7a9b02141dd10726$var$fetch, + Fetch: $7a9b02141dd10726$var$Fetch, + fetching: $7a9b02141dd10726$var$fetching, + finalizeAndReportTiming: $7a9b02141dd10726$var$finalizeAndReportTiming +}; -// https://fetch.spec.whatwg.org/#concept-scheme-fetch -// given a fetch params fetchParams -function $fd36c5c8024bd3ac$var$schemeFetch(fetchParams) { - // Note: since the connection is destroyed on redirect, which sets fetchParams to a - // cancelled state, we do not want this condition to trigger *unless* there have been - // no redirects. See https://github.com/nodejs/undici/issues/1776 - // 1. If fetchParams is canceled, then return the appropriate network error for fetchParams. - if ($fd36c5c8024bd3ac$require$isCancelled(fetchParams) && fetchParams.request.redirectCount === 0) return Promise.resolve($fd36c5c8024bd3ac$require$makeAppropriateNetworkError(fetchParams)); - // 2. Let request be fetchParams’s request. - const { request: request } = fetchParams; - const { protocol: scheme } = $fd36c5c8024bd3ac$require$requestCurrentURL(request); - // 3. Switch on request’s current URL’s scheme and run the associated steps: - switch(scheme){ - case "about:": - // If request’s current URL’s path is the string "blank", then return a new response - // whose status message is `OK`, header list is « (`Content-Type`, `text/html;charset=utf-8`) », - // and body is the empty byte sequence as a body. - // Otherwise, return a network error. - return Promise.resolve($fd36c5c8024bd3ac$require$makeNetworkError("about scheme is not supported")); - case "blob:": - { - if (!$fd36c5c8024bd3ac$var$resolveObjectURL) $fd36c5c8024bd3ac$var$resolveObjectURL = $g40fK$buffer.resolveObjectURL; - // 1. Let blobURLEntry be request’s current URL’s blob URL entry. - const blobURLEntry = $fd36c5c8024bd3ac$require$requestCurrentURL(request); - // https://github.com/web-platform-tests/wpt/blob/7b0ebaccc62b566a1965396e5be7bb2bc06f841f/FileAPI/url/resources/fetch-tests.js#L52-L56 - // Buffer.resolveObjectURL does not ignore URL queries. - if (blobURLEntry.search.length !== 0) return Promise.resolve($fd36c5c8024bd3ac$require$makeNetworkError("NetworkError when attempting to fetch resource.")); - const blobURLEntryObject = $fd36c5c8024bd3ac$var$resolveObjectURL(blobURLEntry.toString()); - // 2. If request’s method is not `GET`, blobURLEntry is null, or blobURLEntry’s - // object is not a Blob object, then return a network error. - if (request.method !== "GET" || !$fd36c5c8024bd3ac$require$isBlobLike(blobURLEntryObject)) return Promise.resolve($fd36c5c8024bd3ac$require$makeNetworkError("invalid method")); - // 3. Let bodyWithType be the result of safely extracting blobURLEntry’s object. - const bodyWithType = $fd36c5c8024bd3ac$require$safelyExtractBody(blobURLEntryObject); - // 4. Let body be bodyWithType’s body. - const body = bodyWithType[0]; - // 5. Let length be body’s length, serialized and isomorphic encoded. - const length = $fd36c5c8024bd3ac$require$isomorphicEncode(`${body.length}`); - // 6. Let type be bodyWithType’s type if it is non-null; otherwise the empty byte sequence. - const type = bodyWithType[1] ?? ""; - // 7. Return a new response whose status message is `OK`, header list is - // « (`Content-Length`, length), (`Content-Type`, type) », and body is body. - const response = $fd36c5c8024bd3ac$require$makeResponse({ - statusText: "OK", - headersList: [ - [ - "content-length", - { - name: "Content-Length", - value: length - } - ], - [ - "content-type", - { - name: "Content-Type", - value: type - } - ] - ] - }); - response.body = body; - return Promise.resolve(response); - } - case "data:": - { - // 1. Let dataURLStruct be the result of running the - // data: URL processor on request’s current URL. - const currentURL = $fd36c5c8024bd3ac$require$requestCurrentURL(request); - const dataURLStruct = $fd36c5c8024bd3ac$require$dataURLProcessor(currentURL); - // 2. If dataURLStruct is failure, then return a - // network error. - if (dataURLStruct === "failure") return Promise.resolve($fd36c5c8024bd3ac$require$makeNetworkError("failed to fetch the data URL")); - // 3. Let mimeType be dataURLStruct’s MIME type, serialized. - const mimeType = $fd36c5c8024bd3ac$require$serializeAMimeType(dataURLStruct.mimeType); - // 4. Return a response whose status message is `OK`, - // header list is « (`Content-Type`, mimeType) », - // and body is dataURLStruct’s body as a body. - return Promise.resolve($fd36c5c8024bd3ac$require$makeResponse({ - statusText: "OK", - headersList: [ - [ - "content-type", - { - name: "Content-Type", - value: mimeType - } - ] - ], - body: $fd36c5c8024bd3ac$require$safelyExtractBody(dataURLStruct.body)[0] - })); - } - case "file:": - // For now, unfortunate as it is, file URLs are left as an exercise for the reader. - // When in doubt, return a network error. - return Promise.resolve($fd36c5c8024bd3ac$require$makeNetworkError("not implemented... yet...")); - case "http:": - case "https:": - // Return the result of running HTTP fetch given fetchParams. - return $fd36c5c8024bd3ac$var$httpFetch(fetchParams).catch((err)=>$fd36c5c8024bd3ac$require$makeNetworkError(err)); - default: - return Promise.resolve($fd36c5c8024bd3ac$require$makeNetworkError("unknown scheme")); - } +}); +parcelRegister("A4fmv", function(module, exports) { +'use strict'; +// We include a version number for the Dispatcher API. In case of breaking changes, +// this version number must be increased to avoid conflicts. +const $06c6a83a7815557a$var$globalDispatcher = Symbol.for('undici.globalDispatcher.1'); + +var $gTXXK = parcelRequire("gTXXK"); +var $06c6a83a7815557a$require$InvalidArgumentError = $gTXXK.InvalidArgumentError; + +var $h3pYu = parcelRequire("h3pYu"); +if ($06c6a83a7815557a$var$getGlobalDispatcher() === undefined) $06c6a83a7815557a$var$setGlobalDispatcher(new $h3pYu()); +function $06c6a83a7815557a$var$setGlobalDispatcher(agent) { + if (!agent || typeof agent.dispatch !== 'function') throw new $06c6a83a7815557a$require$InvalidArgumentError('Argument agent must implement Agent'); + Object.defineProperty(globalThis, $06c6a83a7815557a$var$globalDispatcher, { + value: agent, + writable: true, + enumerable: false, + configurable: false + }); } -// https://fetch.spec.whatwg.org/#finalize-response -function $fd36c5c8024bd3ac$var$finalizeResponse(fetchParams, response) { - // 1. Set fetchParams’s request’s done flag. - fetchParams.request.done = true; - // 2, If fetchParams’s process response done is not null, then queue a fetch - // task to run fetchParams’s process response done given response, with - // fetchParams’s task destination. - if (fetchParams.processResponseDone != null) queueMicrotask(()=>fetchParams.processResponseDone(response)); +function $06c6a83a7815557a$var$getGlobalDispatcher() { + return globalThis[$06c6a83a7815557a$var$globalDispatcher]; } -// https://fetch.spec.whatwg.org/#fetch-finale -function $fd36c5c8024bd3ac$var$fetchFinale(fetchParams, response) { - // 1. If response is a network error, then: - if (response.type === "error") { - // 1. Set response’s URL list to « fetchParams’s request’s URL list[0] ». - response.urlList = [ - fetchParams.request.urlList[0] +module.exports = { + setGlobalDispatcher: $06c6a83a7815557a$var$setGlobalDispatcher, + getGlobalDispatcher: $06c6a83a7815557a$var$getGlobalDispatcher +}; + +}); +parcelRegister("h3pYu", function(module, exports) { +'use strict'; + +var $gTXXK = parcelRequire("gTXXK"); +var $c6a6dd8300b77df3$require$InvalidArgumentError = $gTXXK.InvalidArgumentError; + +var $gNVEc = parcelRequire("gNVEc"); +var $c6a6dd8300b77df3$require$kClients = $gNVEc.kClients; +var $c6a6dd8300b77df3$require$kRunning = $gNVEc.kRunning; +var $c6a6dd8300b77df3$require$kClose = $gNVEc.kClose; +var $c6a6dd8300b77df3$require$kDestroy = $gNVEc.kDestroy; +var $c6a6dd8300b77df3$require$kDispatch = $gNVEc.kDispatch; +var $c6a6dd8300b77df3$require$kInterceptors = $gNVEc.kInterceptors; + +var $e0ttg = parcelRequire("e0ttg"); + +var $fhRiv = parcelRequire("fhRiv"); + +var $63Rhm = parcelRequire("63Rhm"); + +var $bFRvW = parcelRequire("bFRvW"); + +var $9H5gi = parcelRequire("9H5gi"); +const $c6a6dd8300b77df3$var$kOnConnect = Symbol('onConnect'); +const $c6a6dd8300b77df3$var$kOnDisconnect = Symbol('onDisconnect'); +const $c6a6dd8300b77df3$var$kOnConnectionError = Symbol('onConnectionError'); +const $c6a6dd8300b77df3$var$kMaxRedirections = Symbol('maxRedirections'); +const $c6a6dd8300b77df3$var$kOnDrain = Symbol('onDrain'); +const $c6a6dd8300b77df3$var$kFactory = Symbol('factory'); +const $c6a6dd8300b77df3$var$kOptions = Symbol('options'); +function $c6a6dd8300b77df3$var$defaultFactory(origin, opts) { + return opts && opts.connections === 1 ? new $63Rhm(origin, opts) : new $fhRiv(origin, opts); +} +class $c6a6dd8300b77df3$var$Agent extends $e0ttg { + constructor({ factory: factory = $c6a6dd8300b77df3$var$defaultFactory, maxRedirections: maxRedirections = 0, connect: connect, ...options } = {}){ + if (typeof factory !== 'function') throw new $c6a6dd8300b77df3$require$InvalidArgumentError('factory must be a function.'); + if (connect != null && typeof connect !== 'function' && typeof connect !== 'object') throw new $c6a6dd8300b77df3$require$InvalidArgumentError('connect must be a function or an object'); + if (!Number.isInteger(maxRedirections) || maxRedirections < 0) throw new $c6a6dd8300b77df3$require$InvalidArgumentError('maxRedirections must be a positive number'); + super(options); + if (connect && typeof connect !== 'function') connect = { + ...connect + }; + this[$c6a6dd8300b77df3$require$kInterceptors] = options.interceptors?.Agent && Array.isArray(options.interceptors.Agent) ? options.interceptors.Agent : [ + $9H5gi({ + maxRedirections: maxRedirections + }) ]; - // 2. Set response’s timing info to the result of creating an opaque timing - // info for fetchParams’s timing info. - response.timingInfo = $fd36c5c8024bd3ac$require$createOpaqueTimingInfo({ - startTime: fetchParams.timingInfo.startTime - }); - } - // 2. Let processResponseEndOfBody be the following steps: - const processResponseEndOfBody = ()=>{ - // 1. Set fetchParams’s request’s done flag. - fetchParams.request.done = true; - // If fetchParams’s process response end-of-body is not null, - // then queue a fetch task to run fetchParams’s process response - // end-of-body given response with fetchParams’s task destination. - if (fetchParams.processResponseEndOfBody != null) queueMicrotask(()=>fetchParams.processResponseEndOfBody(response)); - }; - // 3. If fetchParams’s process response is non-null, then queue a fetch task - // to run fetchParams’s process response given response, with fetchParams’s - // task destination. - if (fetchParams.processResponse != null) queueMicrotask(()=>fetchParams.processResponse(response)); - // 4. If response’s body is null, then run processResponseEndOfBody. - if (response.body == null) processResponseEndOfBody(); - else { - // 5. Otherwise: - // 1. Let transformStream be a new a TransformStream. - // 2. Let identityTransformAlgorithm be an algorithm which, given chunk, - // enqueues chunk in transformStream. - const identityTransformAlgorithm = (chunk, controller)=>{ - controller.enqueue(chunk); + this[$c6a6dd8300b77df3$var$kOptions] = { + ...$bFRvW.deepClone(options), + connect: connect }; - // 3. Set up transformStream with transformAlgorithm set to identityTransformAlgorithm - // and flushAlgorithm set to processResponseEndOfBody. - const transformStream = new $fd36c5c8024bd3ac$require$TransformStream({ - start () {}, - transform: identityTransformAlgorithm, - flush: processResponseEndOfBody - }, { - size () { - return 1; - } - }, { - size () { - return 1; - } - }); - // 4. Set response’s body to the result of piping response’s body through transformStream. - response.body = { - stream: response.body.stream.pipeThrough(transformStream) + this[$c6a6dd8300b77df3$var$kOptions].interceptors = options.interceptors ? { + ...options.interceptors + } : undefined; + this[$c6a6dd8300b77df3$var$kMaxRedirections] = maxRedirections; + this[$c6a6dd8300b77df3$var$kFactory] = factory; + this[$c6a6dd8300b77df3$require$kClients] = new Map(); + this[$c6a6dd8300b77df3$var$kOnDrain] = (origin, targets)=>{ + this.emit('drain', origin, [ + this, + ...targets + ]); + }; + this[$c6a6dd8300b77df3$var$kOnConnect] = (origin, targets)=>{ + this.emit('connect', origin, [ + this, + ...targets + ]); + }; + this[$c6a6dd8300b77df3$var$kOnDisconnect] = (origin, targets, err)=>{ + this.emit('disconnect', origin, [ + this, + ...targets + ], err); + }; + this[$c6a6dd8300b77df3$var$kOnConnectionError] = (origin, targets, err)=>{ + this.emit('connectionError', origin, [ + this, + ...targets + ], err); }; } - // 6. If fetchParams’s process response consume body is non-null, then: - if (fetchParams.processResponseConsumeBody != null) { - // 1. Let processBody given nullOrBytes be this step: run fetchParams’s - // process response consume body given response and nullOrBytes. - const processBody = (nullOrBytes)=>fetchParams.processResponseConsumeBody(response, nullOrBytes); - // 2. Let processBodyError be this step: run fetchParams’s process - // response consume body given response and failure. - const processBodyError = (failure)=>fetchParams.processResponseConsumeBody(response, failure); - // 3. If response’s body is null, then queue a fetch task to run processBody - // given null, with fetchParams’s task destination. - if (response.body == null) queueMicrotask(()=>processBody(null)); - else // 4. Otherwise, fully read response’s body given processBody, processBodyError, - // and fetchParams’s task destination. - return $fd36c5c8024bd3ac$require$fullyReadBody(response.body, processBody, processBodyError); - return Promise.resolve(); + get [$c6a6dd8300b77df3$require$kRunning]() { + let ret = 0; + for (const client of this[$c6a6dd8300b77df3$require$kClients].values())ret += client[$c6a6dd8300b77df3$require$kRunning]; + return ret; + } + [$c6a6dd8300b77df3$require$kDispatch](opts, handler) { + let key; + if (opts.origin && (typeof opts.origin === 'string' || opts.origin instanceof URL)) key = String(opts.origin); + else throw new $c6a6dd8300b77df3$require$InvalidArgumentError('opts.origin must be a non-empty string or URL.'); + let dispatcher = this[$c6a6dd8300b77df3$require$kClients].get(key); + if (!dispatcher) { + dispatcher = this[$c6a6dd8300b77df3$var$kFactory](opts.origin, this[$c6a6dd8300b77df3$var$kOptions]).on('drain', this[$c6a6dd8300b77df3$var$kOnDrain]).on('connect', this[$c6a6dd8300b77df3$var$kOnConnect]).on('disconnect', this[$c6a6dd8300b77df3$var$kOnDisconnect]).on('connectionError', this[$c6a6dd8300b77df3$var$kOnConnectionError]); + // This introduces a tiny memory leak, as dispatchers are never removed from the map. + // TODO(mcollina): remove te timer when the client/pool do not have any more + // active connections. + this[$c6a6dd8300b77df3$require$kClients].set(key, dispatcher); + } + return dispatcher.dispatch(opts, handler); + } + async [$c6a6dd8300b77df3$require$kClose]() { + const closePromises = []; + for (const client of this[$c6a6dd8300b77df3$require$kClients].values())closePromises.push(client.close()); + this[$c6a6dd8300b77df3$require$kClients].clear(); + await Promise.all(closePromises); + } + async [$c6a6dd8300b77df3$require$kDestroy](err) { + const destroyPromises = []; + for (const client of this[$c6a6dd8300b77df3$require$kClients].values())destroyPromises.push(client.destroy(err)); + this[$c6a6dd8300b77df3$require$kClients].clear(); + await Promise.all(destroyPromises); } } -// https://fetch.spec.whatwg.org/#http-fetch -async function $fd36c5c8024bd3ac$var$httpFetch(fetchParams) { - // 1. Let request be fetchParams’s request. - const request = fetchParams.request; - // 2. Let response be null. - let response = null; - // 3. Let actualResponse be null. - let actualResponse = null; - // 4. Let timingInfo be fetchParams’s timing info. - const timingInfo = fetchParams.timingInfo; - // 5. If request’s service-workers mode is "all", then: - request.serviceWorkers; - // 6. If response is null, then: - if (response === null) { - // 1. If makeCORSPreflight is true and one of these conditions is true: - // TODO - // 2. If request’s redirect mode is "follow", then set request’s - // service-workers mode to "none". - if (request.redirect === "follow") request.serviceWorkers = "none"; - // 3. Set response and actualResponse to the result of running - // HTTP-network-or-cache fetch given fetchParams. - actualResponse = response = await $fd36c5c8024bd3ac$var$httpNetworkOrCacheFetch(fetchParams); - // 4. If request’s response tainting is "cors" and a CORS check - // for request and response returns failure, then return a network error. - if (request.responseTainting === "cors" && $fd36c5c8024bd3ac$require$corsCheck(request, response) === "failure") return $fd36c5c8024bd3ac$require$makeNetworkError("cors failure"); - // 5. If the TAO check for request and response returns failure, then set - // request’s timing allow failed flag. - if ($fd36c5c8024bd3ac$require$TAOCheck(request, response) === "failure") request.timingAllowFailed = true; +module.exports = $c6a6dd8300b77df3$var$Agent; + +}); +parcelRegister("e0ttg", function(module, exports) { +'use strict'; + +var $ciMz5 = parcelRequire("ciMz5"); + +var $gTXXK = parcelRequire("gTXXK"); +var $a327ed19b338098d$require$ClientDestroyedError = $gTXXK.ClientDestroyedError; +var $a327ed19b338098d$require$ClientClosedError = $gTXXK.ClientClosedError; +var $a327ed19b338098d$require$InvalidArgumentError = $gTXXK.InvalidArgumentError; + +var $gNVEc = parcelRequire("gNVEc"); +var $a327ed19b338098d$require$kDestroy = $gNVEc.kDestroy; +var $a327ed19b338098d$require$kClose = $gNVEc.kClose; +var $a327ed19b338098d$require$kClosed = $gNVEc.kClosed; +var $a327ed19b338098d$require$kDestroyed = $gNVEc.kDestroyed; +var $a327ed19b338098d$require$kDispatch = $gNVEc.kDispatch; +var $a327ed19b338098d$require$kInterceptors = $gNVEc.kInterceptors; +const $a327ed19b338098d$var$kOnDestroyed = Symbol('onDestroyed'); +const $a327ed19b338098d$var$kOnClosed = Symbol('onClosed'); +const $a327ed19b338098d$var$kInterceptedDispatch = Symbol('Intercepted Dispatch'); +const $a327ed19b338098d$var$kWebSocketOptions = Symbol('webSocketOptions'); +class $a327ed19b338098d$var$DispatcherBase extends $ciMz5 { + constructor(opts){ + super(); + this[$a327ed19b338098d$require$kDestroyed] = false; + this[$a327ed19b338098d$var$kOnDestroyed] = null; + this[$a327ed19b338098d$require$kClosed] = false; + this[$a327ed19b338098d$var$kOnClosed] = []; + this[$a327ed19b338098d$var$kWebSocketOptions] = opts?.webSocket ?? {}; } - // 7. If either request’s response tainting or response’s type - // is "opaque", and the cross-origin resource policy check with - // request’s origin, request’s client, request’s destination, - // and actualResponse returns blocked, then return a network error. - if ((request.responseTainting === "opaque" || response.type === "opaque") && $fd36c5c8024bd3ac$require$crossOriginResourcePolicyCheck(request.origin, request.client, request.destination, actualResponse) === "blocked") return $fd36c5c8024bd3ac$require$makeNetworkError("blocked"); - // 8. If actualResponse’s status is a redirect status, then: - if ($fd36c5c8024bd3ac$require$redirectStatusSet.has(actualResponse.status)) { - // 1. If actualResponse’s status is not 303, request’s body is not null, - // and the connection uses HTTP/2, then user agents may, and are even - // encouraged to, transmit an RST_STREAM frame. - // See, https://github.com/whatwg/fetch/issues/1288 - if (request.redirect !== "manual") fetchParams.controller.connection.destroy(); - // 2. Switch on request’s redirect mode: - if (request.redirect === "error") // Set response to a network error. - response = $fd36c5c8024bd3ac$require$makeNetworkError("unexpected redirect"); - else if (request.redirect === "manual") // Set response to an opaque-redirect filtered response whose internal - // response is actualResponse. - // NOTE(spec): On the web this would return an `opaqueredirect` response, - // but that doesn't make sense server side. - // See https://github.com/nodejs/undici/issues/1193. - response = actualResponse; - else if (request.redirect === "follow") // Set response to the result of running HTTP-redirect fetch given - // fetchParams and response. - response = await $fd36c5c8024bd3ac$var$httpRedirectFetch(fetchParams, response); - else $g40fK$assert(false); + get webSocketOptions() { + return { + maxFragments: this[$a327ed19b338098d$var$kWebSocketOptions].maxFragments ?? 131072, + maxPayloadSize: this[$a327ed19b338098d$var$kWebSocketOptions].maxPayloadSize ?? 134217728 + }; + } + get destroyed() { + return this[$a327ed19b338098d$require$kDestroyed]; + } + get closed() { + return this[$a327ed19b338098d$require$kClosed]; + } + get interceptors() { + return this[$a327ed19b338098d$require$kInterceptors]; + } + set interceptors(newInterceptors) { + if (newInterceptors) for(let i = newInterceptors.length - 1; i >= 0; i--){ + const interceptor = this[$a327ed19b338098d$require$kInterceptors][i]; + if (typeof interceptor !== 'function') throw new $a327ed19b338098d$require$InvalidArgumentError('interceptor must be an function'); + } + this[$a327ed19b338098d$require$kInterceptors] = newInterceptors; + } + close(callback) { + if (callback === undefined) return new Promise((resolve, reject)=>{ + this.close((err, data)=>{ + return err ? reject(err) : resolve(data); + }); + }); + if (typeof callback !== 'function') throw new $a327ed19b338098d$require$InvalidArgumentError('invalid callback'); + if (this[$a327ed19b338098d$require$kDestroyed]) { + queueMicrotask(()=>callback(new $a327ed19b338098d$require$ClientDestroyedError(), null)); + return; + } + if (this[$a327ed19b338098d$require$kClosed]) { + if (this[$a327ed19b338098d$var$kOnClosed]) this[$a327ed19b338098d$var$kOnClosed].push(callback); + else queueMicrotask(()=>callback(null, null)); + return; + } + this[$a327ed19b338098d$require$kClosed] = true; + this[$a327ed19b338098d$var$kOnClosed].push(callback); + const onClosed = ()=>{ + const callbacks = this[$a327ed19b338098d$var$kOnClosed]; + this[$a327ed19b338098d$var$kOnClosed] = null; + for(let i = 0; i < callbacks.length; i++)callbacks[i](null, null); + }; + // Should not error. + this[$a327ed19b338098d$require$kClose]().then(()=>this.destroy()).then(()=>{ + queueMicrotask(onClosed); + }); + } + destroy(err, callback) { + if (typeof err === 'function') { + callback = err; + err = null; + } + if (callback === undefined) return new Promise((resolve, reject)=>{ + this.destroy(err, (err, data)=>{ + return err ? /* istanbul ignore next: should never error */ reject(err) : resolve(data); + }); + }); + if (typeof callback !== 'function') throw new $a327ed19b338098d$require$InvalidArgumentError('invalid callback'); + if (this[$a327ed19b338098d$require$kDestroyed]) { + if (this[$a327ed19b338098d$var$kOnDestroyed]) this[$a327ed19b338098d$var$kOnDestroyed].push(callback); + else queueMicrotask(()=>callback(null, null)); + return; + } + if (!err) err = new $a327ed19b338098d$require$ClientDestroyedError(); + this[$a327ed19b338098d$require$kDestroyed] = true; + this[$a327ed19b338098d$var$kOnDestroyed] = this[$a327ed19b338098d$var$kOnDestroyed] || []; + this[$a327ed19b338098d$var$kOnDestroyed].push(callback); + const onDestroyed = ()=>{ + const callbacks = this[$a327ed19b338098d$var$kOnDestroyed]; + this[$a327ed19b338098d$var$kOnDestroyed] = null; + for(let i = 0; i < callbacks.length; i++)callbacks[i](null, null); + }; + // Should not error. + this[$a327ed19b338098d$require$kDestroy](err).then(()=>{ + queueMicrotask(onDestroyed); + }); + } + [$a327ed19b338098d$var$kInterceptedDispatch](opts, handler) { + if (!this[$a327ed19b338098d$require$kInterceptors] || this[$a327ed19b338098d$require$kInterceptors].length === 0) { + this[$a327ed19b338098d$var$kInterceptedDispatch] = this[$a327ed19b338098d$require$kDispatch]; + return this[$a327ed19b338098d$require$kDispatch](opts, handler); + } + let dispatch = this[$a327ed19b338098d$require$kDispatch].bind(this); + for(let i = this[$a327ed19b338098d$require$kInterceptors].length - 1; i >= 0; i--)dispatch = this[$a327ed19b338098d$require$kInterceptors][i](dispatch); + this[$a327ed19b338098d$var$kInterceptedDispatch] = dispatch; + return dispatch(opts, handler); + } + dispatch(opts, handler) { + if (!handler || typeof handler !== 'object') throw new $a327ed19b338098d$require$InvalidArgumentError('handler must be an object'); + try { + if (!opts || typeof opts !== 'object') throw new $a327ed19b338098d$require$InvalidArgumentError('opts must be an object.'); + if (this[$a327ed19b338098d$require$kDestroyed] || this[$a327ed19b338098d$var$kOnDestroyed]) throw new $a327ed19b338098d$require$ClientDestroyedError(); + if (this[$a327ed19b338098d$require$kClosed]) throw new $a327ed19b338098d$require$ClientClosedError(); + return this[$a327ed19b338098d$var$kInterceptedDispatch](opts, handler); + } catch (err) { + if (typeof handler.onError !== 'function') throw new $a327ed19b338098d$require$InvalidArgumentError('invalid onError method'); + handler.onError(err); + return false; + } } - // 9. Set response’s timing info to timingInfo. - response.timingInfo = timingInfo; - // 10. Return response. - return response; } -// https://fetch.spec.whatwg.org/#http-redirect-fetch -function $fd36c5c8024bd3ac$var$httpRedirectFetch(fetchParams, response) { - // 1. Let request be fetchParams’s request. - const request = fetchParams.request; - // 2. Let actualResponse be response, if response is not a filtered response, - // and response’s internal response otherwise. - const actualResponse = response.internalResponse ? response.internalResponse : response; - // 3. Let locationURL be actualResponse’s location URL given request’s current - // URL’s fragment. - let locationURL; - try { - locationURL = $fd36c5c8024bd3ac$require$responseLocationURL(actualResponse, $fd36c5c8024bd3ac$require$requestCurrentURL(request).hash); - // 4. If locationURL is null, then return response. - if (locationURL == null) return response; - } catch (err) { - // 5. If locationURL is failure, then return a network error. - return Promise.resolve($fd36c5c8024bd3ac$require$makeNetworkError(err)); +module.exports = $a327ed19b338098d$var$DispatcherBase; + +}); +parcelRegister("ciMz5", function(module, exports) { +'use strict'; + +class $8f4cd66f4c57abf9$var$Dispatcher extends $in2sP$nodeevents { + dispatch() { + throw new Error('not implemented'); } - // 6. If locationURL’s scheme is not an HTTP(S) scheme, then return a network - // error. - if (!$fd36c5c8024bd3ac$require$urlIsHttpHttpsScheme(locationURL)) return Promise.resolve($fd36c5c8024bd3ac$require$makeNetworkError("URL scheme must be a HTTP(S) scheme")); - // 7. If request’s redirect count is 20, then return a network error. - if (request.redirectCount === 20) return Promise.resolve($fd36c5c8024bd3ac$require$makeNetworkError("redirect count exceeded")); - // 8. Increase request’s redirect count by 1. - request.redirectCount += 1; - // 9. If request’s mode is "cors", locationURL includes credentials, and - // request’s origin is not same origin with locationURL’s origin, then return - // a network error. - if (request.mode === "cors" && (locationURL.username || locationURL.password) && !$fd36c5c8024bd3ac$require$sameOrigin(request, locationURL)) return Promise.resolve($fd36c5c8024bd3ac$require$makeNetworkError('cross origin not allowed for request mode "cors"')); - // 10. If request’s response tainting is "cors" and locationURL includes - // credentials, then return a network error. - if (request.responseTainting === "cors" && (locationURL.username || locationURL.password)) return Promise.resolve($fd36c5c8024bd3ac$require$makeNetworkError('URL cannot contain credentials for request mode "cors"')); - // 11. If actualResponse’s status is not 303, request’s body is non-null, - // and request’s body’s source is null, then return a network error. - if (actualResponse.status !== 303 && request.body != null && request.body.source == null) return Promise.resolve($fd36c5c8024bd3ac$require$makeNetworkError()); - // 12. If one of the following is true - // - actualResponse’s status is 301 or 302 and request’s method is `POST` - // - actualResponse’s status is 303 and request’s method is not `GET` or `HEAD` - if ([ - 301, - 302 - ].includes(actualResponse.status) && request.method === "POST" || actualResponse.status === 303 && !$fd36c5c8024bd3ac$var$GET_OR_HEAD.includes(request.method)) { - // then: - // 1. Set request’s method to `GET` and request’s body to null. - request.method = "GET"; - request.body = null; - // 2. For each headerName of request-body-header name, delete headerName from - // request’s header list. - for (const headerName of $fd36c5c8024bd3ac$require$requestBodyHeader)request.headersList.delete(headerName); + close() { + throw new Error('not implemented'); } - // 13. If request’s current URL’s origin is not same origin with locationURL’s - // origin, then for each headerName of CORS non-wildcard request-header name, - // delete headerName from request’s header list. - if (!$fd36c5c8024bd3ac$require$sameOrigin($fd36c5c8024bd3ac$require$requestCurrentURL(request), locationURL)) { - // https://fetch.spec.whatwg.org/#cors-non-wildcard-request-header-name - request.headersList.delete("authorization"); - // https://fetch.spec.whatwg.org/#authentication-entries - request.headersList.delete("proxy-authorization", true); - // "Cookie" and "Host" are forbidden request-headers, which undici doesn't implement. - request.headersList.delete("cookie"); - request.headersList.delete("host"); + destroy() { + throw new Error('not implemented'); } - // 14. If request’s body is non-null, then set request’s body to the first return - // value of safely extracting request’s body’s source. - if (request.body != null) { - $g40fK$assert(request.body.source != null); - request.body = $fd36c5c8024bd3ac$require$safelyExtractBody(request.body.source)[0]; + compose(...args) { + // So we handle [interceptor1, interceptor2] or interceptor1, interceptor2, ... + const interceptors = Array.isArray(args[0]) ? args[0] : args; + let dispatch = this.dispatch.bind(this); + for (const interceptor of interceptors){ + if (interceptor == null) continue; + if (typeof interceptor !== 'function') throw new TypeError(`invalid interceptor, expected function received ${typeof interceptor}`); + dispatch = interceptor(dispatch); + if (dispatch == null || typeof dispatch !== 'function' || dispatch.length !== 2) throw new TypeError('invalid interceptor'); + } + return new $8f4cd66f4c57abf9$var$ComposedDispatcher(this, dispatch); } - // 15. Let timingInfo be fetchParams’s timing info. - const timingInfo = fetchParams.timingInfo; - // 16. Set timingInfo’s redirect end time and post-redirect start time to the - // coarsened shared current time given fetchParams’s cross-origin isolated - // capability. - timingInfo.redirectEndTime = timingInfo.postRedirectStartTime = $fd36c5c8024bd3ac$require$coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability); - // 17. If timingInfo’s redirect start time is 0, then set timingInfo’s - // redirect start time to timingInfo’s start time. - if (timingInfo.redirectStartTime === 0) timingInfo.redirectStartTime = timingInfo.startTime; - // 18. Append locationURL to request’s URL list. - request.urlList.push(locationURL); - // 19. Invoke set request’s referrer policy on redirect on request and - // actualResponse. - $fd36c5c8024bd3ac$require$setRequestReferrerPolicyOnRedirect(request, actualResponse); - // 20. Return the result of running main fetch given fetchParams and true. - return $fd36c5c8024bd3ac$var$mainFetch(fetchParams, true); } -// https://fetch.spec.whatwg.org/#http-network-or-cache-fetch -async function $fd36c5c8024bd3ac$var$httpNetworkOrCacheFetch(fetchParams, isAuthenticationFetch = false, isNewConnectionFetch = false) { - // 1. Let request be fetchParams’s request. - const request = fetchParams.request; - // 2. Let httpFetchParams be null. - let httpFetchParams = null; - // 3. Let httpRequest be null. - let httpRequest = null; - // 4. Let response be null. - let response = null; - // 5. Let storedResponse be null. - // TODO: cache - // 6. Let httpCache be null. - const httpCache = null; - // 7. Let the revalidatingFlag be unset. - const revalidatingFlag = false; - // 8. Run these steps, but abort when the ongoing fetch is terminated: - // 1. If request’s window is "no-window" and request’s redirect mode is - // "error", then set httpFetchParams to fetchParams and httpRequest to - // request. - if (request.window === "no-window" && request.redirect === "error") { - httpFetchParams = fetchParams; - httpRequest = request; - } else { - // Otherwise: - // 1. Set httpRequest to a clone of request. - httpRequest = $fd36c5c8024bd3ac$require$makeRequest(request); - // 2. Set httpFetchParams to a copy of fetchParams. - httpFetchParams = { - ...fetchParams - }; - // 3. Set httpFetchParams’s request to httpRequest. - httpFetchParams.request = httpRequest; +class $8f4cd66f4c57abf9$var$ComposedDispatcher extends $8f4cd66f4c57abf9$var$Dispatcher { + #dispatcher = null; + #dispatch = null; + constructor(dispatcher, dispatch){ + super(); + this.#dispatcher = dispatcher; + this.#dispatch = dispatch; } - // 3. Let includeCredentials be true if one of - const includeCredentials = request.credentials === "include" || request.credentials === "same-origin" && request.responseTainting === "basic"; - // 4. Let contentLength be httpRequest’s body’s length, if httpRequest’s - // body is non-null; otherwise null. - const contentLength = httpRequest.body ? httpRequest.body.length : null; - // 5. Let contentLengthHeaderValue be null. - let contentLengthHeaderValue = null; - // 6. If httpRequest’s body is null and httpRequest’s method is `POST` or - // `PUT`, then set contentLengthHeaderValue to `0`. - if (httpRequest.body == null && [ - "POST", - "PUT" - ].includes(httpRequest.method)) contentLengthHeaderValue = "0"; - // 7. If contentLength is non-null, then set contentLengthHeaderValue to - // contentLength, serialized and isomorphic encoded. - if (contentLength != null) contentLengthHeaderValue = $fd36c5c8024bd3ac$require$isomorphicEncode(`${contentLength}`); - // 8. If contentLengthHeaderValue is non-null, then append - // `Content-Length`/contentLengthHeaderValue to httpRequest’s header - // list. - if (contentLengthHeaderValue != null) httpRequest.headersList.append("content-length", contentLengthHeaderValue); - // 9. If contentLengthHeaderValue is non-null, then append (`Content-Length`, - // contentLengthHeaderValue) to httpRequest’s header list. - // 10. If contentLength is non-null and httpRequest’s keepalive is true, - // then: - contentLength != null && httpRequest.keepalive; - // 11. If httpRequest’s referrer is a URL, then append - // `Referer`/httpRequest’s referrer, serialized and isomorphic encoded, - // to httpRequest’s header list. - if (httpRequest.referrer instanceof URL) httpRequest.headersList.append("referer", $fd36c5c8024bd3ac$require$isomorphicEncode(httpRequest.referrer.href)); - // 12. Append a request `Origin` header for httpRequest. - $fd36c5c8024bd3ac$require$appendRequestOriginHeader(httpRequest); - // 13. Append the Fetch metadata headers for httpRequest. [FETCH-METADATA] - $fd36c5c8024bd3ac$require$appendFetchMetadata(httpRequest); - // 14. If httpRequest’s header list does not contain `User-Agent`, then - // user agents should append `User-Agent`/default `User-Agent` value to - // httpRequest’s header list. - if (!httpRequest.headersList.contains("user-agent")) httpRequest.headersList.append("user-agent", typeof esbuildDetection === "undefined" ? "undici" : "node"); - // 15. If httpRequest’s cache mode is "default" and httpRequest’s header - // list contains `If-Modified-Since`, `If-None-Match`, - // `If-Unmodified-Since`, `If-Match`, or `If-Range`, then set - // httpRequest’s cache mode to "no-store". - if (httpRequest.cache === "default" && (httpRequest.headersList.contains("if-modified-since") || httpRequest.headersList.contains("if-none-match") || httpRequest.headersList.contains("if-unmodified-since") || httpRequest.headersList.contains("if-match") || httpRequest.headersList.contains("if-range"))) httpRequest.cache = "no-store"; - // 16. If httpRequest’s cache mode is "no-cache", httpRequest’s prevent - // no-cache cache-control header modification flag is unset, and - // httpRequest’s header list does not contain `Cache-Control`, then append - // `Cache-Control`/`max-age=0` to httpRequest’s header list. - if (httpRequest.cache === "no-cache" && !httpRequest.preventNoCacheCacheControlHeaderModification && !httpRequest.headersList.contains("cache-control")) httpRequest.headersList.append("cache-control", "max-age=0"); - // 17. If httpRequest’s cache mode is "no-store" or "reload", then: - if (httpRequest.cache === "no-store" || httpRequest.cache === "reload") { - // 1. If httpRequest’s header list does not contain `Pragma`, then append - // `Pragma`/`no-cache` to httpRequest’s header list. - if (!httpRequest.headersList.contains("pragma")) httpRequest.headersList.append("pragma", "no-cache"); - // 2. If httpRequest’s header list does not contain `Cache-Control`, - // then append `Cache-Control`/`no-cache` to httpRequest’s header list. - if (!httpRequest.headersList.contains("cache-control")) httpRequest.headersList.append("cache-control", "no-cache"); + dispatch(...args) { + this.#dispatch(...args); } - // 18. If httpRequest’s header list contains `Range`, then append - // `Accept-Encoding`/`identity` to httpRequest’s header list. - if (httpRequest.headersList.contains("range")) httpRequest.headersList.append("accept-encoding", "identity"); - // 19. Modify httpRequest’s header list per HTTP. Do not append a given - // header if httpRequest’s header list contains that header’s name. - // TODO: https://github.com/whatwg/fetch/issues/1285#issuecomment-896560129 - if (!httpRequest.headersList.contains("accept-encoding")) { - if ($fd36c5c8024bd3ac$require$urlHasHttpsScheme($fd36c5c8024bd3ac$require$requestCurrentURL(httpRequest))) httpRequest.headersList.append("accept-encoding", "br, gzip, deflate"); - else httpRequest.headersList.append("accept-encoding", "gzip, deflate"); + close(...args) { + return this.#dispatcher.close(...args); } - httpRequest.headersList.delete("host"); - // 20. If includeCredentials is true, then: - includeCredentials; - // 21. If there’s a proxy-authentication entry, use it as appropriate. - // TODO: proxy-authentication - // 22. Set httpCache to the result of determining the HTTP cache - // partition, given httpRequest. - // TODO: cache - // 23. If httpCache is null, then set httpRequest’s cache mode to - // "no-store". - if (httpCache == null) httpRequest.cache = "no-store"; - // 24. If httpRequest’s cache mode is neither "no-store" nor "reload", - // then: - httpRequest.mode !== "no-store" && httpRequest.mode; - // 9. If aborted, then return the appropriate network error for fetchParams. - // TODO - // 10. If response is null, then: - if (response == null) { - // 1. If httpRequest’s cache mode is "only-if-cached", then return a - // network error. - if (httpRequest.mode === "only-if-cached") return $fd36c5c8024bd3ac$require$makeNetworkError("only if cached"); - // 2. Let forwardResponse be the result of running HTTP-network fetch - // given httpFetchParams, includeCredentials, and isNewConnectionFetch. - const forwardResponse = await $fd36c5c8024bd3ac$var$httpNetworkFetch(httpFetchParams, includeCredentials, isNewConnectionFetch); - // 3. If httpRequest’s method is unsafe and forwardResponse’s status is - // in the range 200 to 399, inclusive, invalidate appropriate stored - // responses in httpCache, as per the "Invalidation" chapter of HTTP - // Caching, and set storedResponse to null. [HTTP-CACHING] - !$fd36c5c8024bd3ac$require$safeMethodsSet.has(httpRequest.method) && forwardResponse.status >= 200 && forwardResponse.status; - // 4. If the revalidatingFlag is set and forwardResponse’s status is 304, - // then: - revalidatingFlag && forwardResponse.status; - // 5. If response is null, then: - if (response == null) // 1. Set response to forwardResponse. - response = forwardResponse; + destroy(...args) { + return this.#dispatcher.destroy(...args); } - // 11. Set response’s URL list to a clone of httpRequest’s URL list. - response.urlList = [ - ...httpRequest.urlList - ]; - // 12. If httpRequest’s header list contains `Range`, then set response’s - // range-requested flag. - if (httpRequest.headersList.contains("range")) response.rangeRequested = true; - // 13. Set response’s request-includes-credentials to includeCredentials. - response.requestIncludesCredentials = includeCredentials; - // 14. If response’s status is 401, httpRequest’s response tainting is not - // "cors", includeCredentials is true, and request’s window is an environment - // settings object, then: - // TODO - // 15. If response’s status is 407, then: - if (response.status === 407) { - // 1. If request’s window is "no-window", then return a network error. - if (request.window === "no-window") return $fd36c5c8024bd3ac$require$makeNetworkError(); - // 2. ??? - // 3. If fetchParams is canceled, then return the appropriate network error for fetchParams. - if ($fd36c5c8024bd3ac$require$isCancelled(fetchParams)) return $fd36c5c8024bd3ac$require$makeAppropriateNetworkError(fetchParams); - // 4. Prompt the end user as appropriate in request’s window and store - // the result as a proxy-authentication entry. [HTTP-AUTH] - // TODO: Invoke some kind of callback? - // 5. Set response to the result of running HTTP-network-or-cache fetch given - // fetchParams. - // TODO - return $fd36c5c8024bd3ac$require$makeNetworkError("proxy authentication required"); +} +module.exports = $8f4cd66f4c57abf9$var$Dispatcher; + +}); + + +parcelRegister("fhRiv", function(module, exports) { +'use strict'; + +var $lCaiQ = parcelRequire("lCaiQ"); +var $b211c9529e774e07$require$PoolBase = $lCaiQ.PoolBase; +var $b211c9529e774e07$require$kClients = $lCaiQ.kClients; +var $b211c9529e774e07$require$kNeedDrain = $lCaiQ.kNeedDrain; +var $b211c9529e774e07$require$kAddClient = $lCaiQ.kAddClient; +var $b211c9529e774e07$require$kGetDispatcher = $lCaiQ.kGetDispatcher; + +var $63Rhm = parcelRequire("63Rhm"); + +var $gTXXK = parcelRequire("gTXXK"); +var $b211c9529e774e07$require$InvalidArgumentError = $gTXXK.InvalidArgumentError; + +var $bFRvW = parcelRequire("bFRvW"); + +var $gNVEc = parcelRequire("gNVEc"); +var $b211c9529e774e07$require$kUrl = $gNVEc.kUrl; +var $b211c9529e774e07$require$kInterceptors = $gNVEc.kInterceptors; + +var $ifuPO = parcelRequire("ifuPO"); +const $b211c9529e774e07$var$kOptions = Symbol('options'); +const $b211c9529e774e07$var$kConnections = Symbol('connections'); +const $b211c9529e774e07$var$kFactory = Symbol('factory'); +function $b211c9529e774e07$var$defaultFactory(origin, opts) { + return new $63Rhm(origin, opts); +} +class $b211c9529e774e07$var$Pool extends $b211c9529e774e07$require$PoolBase { + constructor(origin, { connections: connections, factory: factory = $b211c9529e774e07$var$defaultFactory, connect: connect, connectTimeout: connectTimeout, tls: tls, maxCachedSessions: maxCachedSessions, socketPath: socketPath, autoSelectFamily: autoSelectFamily, autoSelectFamilyAttemptTimeout: autoSelectFamilyAttemptTimeout, allowH2: allowH2, ...options } = {}){ + if (connections != null && (!Number.isFinite(connections) || connections < 0)) throw new $b211c9529e774e07$require$InvalidArgumentError('invalid connections'); + if (typeof factory !== 'function') throw new $b211c9529e774e07$require$InvalidArgumentError('factory must be a function.'); + if (connect != null && typeof connect !== 'function' && typeof connect !== 'object') throw new $b211c9529e774e07$require$InvalidArgumentError('connect must be a function or an object'); + if (typeof connect !== 'function') connect = $ifuPO({ + ...tls, + maxCachedSessions: maxCachedSessions, + allowH2: allowH2, + socketPath: socketPath, + timeout: connectTimeout, + ...autoSelectFamily ? { + autoSelectFamily: autoSelectFamily, + autoSelectFamilyAttemptTimeout: autoSelectFamilyAttemptTimeout + } : undefined, + ...connect + }); + super(options); + this[$b211c9529e774e07$require$kInterceptors] = options.interceptors?.Pool && Array.isArray(options.interceptors.Pool) ? options.interceptors.Pool : []; + this[$b211c9529e774e07$var$kConnections] = connections || null; + this[$b211c9529e774e07$require$kUrl] = $bFRvW.parseOrigin(origin); + this[$b211c9529e774e07$var$kOptions] = { + ...$bFRvW.deepClone(options), + connect: connect, + allowH2: allowH2 + }; + this[$b211c9529e774e07$var$kOptions].interceptors = options.interceptors ? { + ...options.interceptors + } : undefined; + this[$b211c9529e774e07$var$kFactory] = factory; + this.on('connectionError', (origin, targets, error)=>{ + // If a connection error occurs, we remove the client from the pool, + // and emit a connectionError event. They will not be re-used. + // Fixes https://github.com/nodejs/undici/issues/3895 + for (const target of targets){ + // Do not use kRemoveClient here, as it will close the client, + // but the client cannot be closed in this state. + const idx = this[$b211c9529e774e07$require$kClients].indexOf(target); + if (idx !== -1) this[$b211c9529e774e07$require$kClients].splice(idx, 1); + } + }); } - // 16. If all of the following are true - if (// response’s status is 421 - response.status === 421 && // isNewConnectionFetch is false - !isNewConnectionFetch && // request’s body is null, or request’s body is non-null and request’s body’s source is non-null - (request.body == null || request.body.source != null)) { - // then: - // 1. If fetchParams is canceled, then return the appropriate network error for fetchParams. - if ($fd36c5c8024bd3ac$require$isCancelled(fetchParams)) return $fd36c5c8024bd3ac$require$makeAppropriateNetworkError(fetchParams); - // 2. Set response to the result of running HTTP-network-or-cache - // fetch given fetchParams, isAuthenticationFetch, and true. - // TODO (spec): The spec doesn't specify this but we need to cancel - // the active response before we can start a new one. - // https://github.com/whatwg/fetch/issues/1293 - fetchParams.controller.connection.destroy(); - response = await $fd36c5c8024bd3ac$var$httpNetworkOrCacheFetch(fetchParams, isAuthenticationFetch, true); + [$b211c9529e774e07$require$kGetDispatcher]() { + for (const client of this[$b211c9529e774e07$require$kClients]){ + if (!client[$b211c9529e774e07$require$kNeedDrain]) return client; + } + if (!this[$b211c9529e774e07$var$kConnections] || this[$b211c9529e774e07$require$kClients].length < this[$b211c9529e774e07$var$kConnections]) { + const dispatcher = this[$b211c9529e774e07$var$kFactory](this[$b211c9529e774e07$require$kUrl], this[$b211c9529e774e07$var$kOptions]); + this[$b211c9529e774e07$require$kAddClient](dispatcher); + return dispatcher; + } } - // 17. If isAuthenticationFetch is true, then create an authentication entry - isAuthenticationFetch; - // 18. Return response. - return response; } +module.exports = $b211c9529e774e07$var$Pool; -// https://fetch.spec.whatwg.org/#http-network-fetch -async function $fd36c5c8024bd3ac$var$httpNetworkFetch(fetchParams, includeCredentials = false, forceNewConnection = false) { - $g40fK$assert(!fetchParams.controller.connection || fetchParams.controller.connection.destroyed); - fetchParams.controller.connection = { - abort: null, - destroyed: false, - destroy (err) { - if (!this.destroyed) { - this.destroyed = true; - this.abort?.(err ?? new $fd36c5c8024bd3ac$require$DOMException("The operation was aborted.", "AbortError")); +}); +parcelRegister("lCaiQ", function(module, exports) { +'use strict'; + +var $e0ttg = parcelRequire("e0ttg"); + +var $dNMo4 = parcelRequire("dNMo4"); + +var $gNVEc = parcelRequire("gNVEc"); +var $fbc5238333bd5094$require$kConnected = $gNVEc.kConnected; +var $fbc5238333bd5094$require$kSize = $gNVEc.kSize; +var $fbc5238333bd5094$require$kRunning = $gNVEc.kRunning; +var $fbc5238333bd5094$require$kPending = $gNVEc.kPending; +var $fbc5238333bd5094$require$kQueued = $gNVEc.kQueued; +var $fbc5238333bd5094$require$kBusy = $gNVEc.kBusy; +var $fbc5238333bd5094$require$kFree = $gNVEc.kFree; +var $fbc5238333bd5094$require$kUrl = $gNVEc.kUrl; +var $fbc5238333bd5094$require$kClose = $gNVEc.kClose; +var $fbc5238333bd5094$require$kDestroy = $gNVEc.kDestroy; +var $fbc5238333bd5094$require$kDispatch = $gNVEc.kDispatch; + +var $bUmeJ = parcelRequire("bUmeJ"); +const $fbc5238333bd5094$var$kClients = Symbol('clients'); +const $fbc5238333bd5094$var$kNeedDrain = Symbol('needDrain'); +const $fbc5238333bd5094$var$kQueue = Symbol('queue'); +const $fbc5238333bd5094$var$kClosedResolve = Symbol('closed resolve'); +const $fbc5238333bd5094$var$kOnDrain = Symbol('onDrain'); +const $fbc5238333bd5094$var$kOnConnect = Symbol('onConnect'); +const $fbc5238333bd5094$var$kOnDisconnect = Symbol('onDisconnect'); +const $fbc5238333bd5094$var$kOnConnectionError = Symbol('onConnectionError'); +const $fbc5238333bd5094$var$kGetDispatcher = Symbol('get dispatcher'); +const $fbc5238333bd5094$var$kAddClient = Symbol('add client'); +const $fbc5238333bd5094$var$kRemoveClient = Symbol('remove client'); +const $fbc5238333bd5094$var$kStats = Symbol('stats'); +class $fbc5238333bd5094$var$PoolBase extends $e0ttg { + constructor(opts){ + super(opts); + this[$fbc5238333bd5094$var$kQueue] = new $dNMo4(); + this[$fbc5238333bd5094$var$kClients] = []; + this[$fbc5238333bd5094$require$kQueued] = 0; + const pool = this; + this[$fbc5238333bd5094$var$kOnDrain] = function onDrain(origin, targets) { + const queue = pool[$fbc5238333bd5094$var$kQueue]; + let needDrain = false; + while(!needDrain){ + const item = queue.shift(); + if (!item) break; + pool[$fbc5238333bd5094$require$kQueued]--; + needDrain = !this.dispatch(item.opts, item.handler); } - } - }; - // 1. Let request be fetchParams’s request. - const request = fetchParams.request; - // 2. Let response be null. - let response = null; - // 3. Let timingInfo be fetchParams’s timing info. - const timingInfo = fetchParams.timingInfo; - // 4. Let httpCache be the result of determining the HTTP cache partition, - // given request. - // TODO: cache - const httpCache = null; - // 5. If httpCache is null, then set request’s cache mode to "no-store". - if (httpCache == null) request.cache = "no-store"; - // 6. Let networkPartitionKey be the result of determining the network - // partition key given request. - // TODO - // 7. Let newConnection be "yes" if forceNewConnection is true; otherwise - // "no". - const newConnection = forceNewConnection ? "yes" : "no" // eslint-disable-line no-unused-vars - ; - // 8. Switch on request’s mode: - request.mode; - // 9. Run these steps, but abort when the ongoing fetch is terminated: - // 1. If connection is failure, then return a network error. - // 2. Set timingInfo’s final connection timing info to the result of - // calling clamp and coarsen connection timing info with connection’s - // timing info, timingInfo’s post-redirect start time, and fetchParams’s - // cross-origin isolated capability. - // 3. If connection is not an HTTP/2 connection, request’s body is non-null, - // and request’s body’s source is null, then append (`Transfer-Encoding`, - // `chunked`) to request’s header list. - // 4. Set timingInfo’s final network-request start time to the coarsened - // shared current time given fetchParams’s cross-origin isolated - // capability. - // 5. Set response to the result of making an HTTP request over connection - // using request with the following caveats: - // - Follow the relevant requirements from HTTP. [HTTP] [HTTP-SEMANTICS] - // [HTTP-COND] [HTTP-CACHING] [HTTP-AUTH] - // - If request’s body is non-null, and request’s body’s source is null, - // then the user agent may have a buffer of up to 64 kibibytes and store - // a part of request’s body in that buffer. If the user agent reads from - // request’s body beyond that buffer’s size and the user agent needs to - // resend request, then instead return a network error. - // - Set timingInfo’s final network-response start time to the coarsened - // shared current time given fetchParams’s cross-origin isolated capability, - // immediately after the user agent’s HTTP parser receives the first byte - // of the response (e.g., frame header bytes for HTTP/2 or response status - // line for HTTP/1.x). - // - Wait until all the headers are transmitted. - // - Any responses whose status is in the range 100 to 199, inclusive, - // and is not 101, are to be ignored, except for the purposes of setting - // timingInfo’s final network-response start time above. - // - If request’s header list contains `Transfer-Encoding`/`chunked` and - // response is transferred via HTTP/1.0 or older, then return a network - // error. - // - If the HTTP request results in a TLS client certificate dialog, then: - // 1. If request’s window is an environment settings object, make the - // dialog available in request’s window. - // 2. Otherwise, return a network error. - // To transmit request’s body body, run these steps: - let requestBody = null; - // 1. If body is null and fetchParams’s process request end-of-body is - // non-null, then queue a fetch task given fetchParams’s process request - // end-of-body and fetchParams’s task destination. - if (request.body == null && fetchParams.processRequestEndOfBody) queueMicrotask(()=>fetchParams.processRequestEndOfBody()); - else if (request.body != null) { - // 2. Otherwise, if body is non-null: - // 1. Let processBodyChunk given bytes be these steps: - const processBodyChunk = async function*(bytes) { - // 1. If the ongoing fetch is terminated, then abort these steps. - if ($fd36c5c8024bd3ac$require$isCancelled(fetchParams)) return; - // 2. Run this step in parallel: transmit bytes. - yield bytes; - // 3. If fetchParams’s process request body is non-null, then run - // fetchParams’s process request body given bytes’s length. - fetchParams.processRequestBodyChunkLength?.(bytes.byteLength); + this[$fbc5238333bd5094$var$kNeedDrain] = needDrain; + if (!this[$fbc5238333bd5094$var$kNeedDrain] && pool[$fbc5238333bd5094$var$kNeedDrain]) { + pool[$fbc5238333bd5094$var$kNeedDrain] = false; + pool.emit('drain', origin, [ + pool, + ...targets + ]); + } + if (pool[$fbc5238333bd5094$var$kClosedResolve] && queue.isEmpty()) Promise.all(pool[$fbc5238333bd5094$var$kClients].map((c)=>c.close())).then(pool[$fbc5238333bd5094$var$kClosedResolve]); }; - // 2. Let processEndOfBody be these steps: - const processEndOfBody = ()=>{ - // 1. If fetchParams is canceled, then abort these steps. - if ($fd36c5c8024bd3ac$require$isCancelled(fetchParams)) return; - // 2. If fetchParams’s process request end-of-body is non-null, - // then run fetchParams’s process request end-of-body. - if (fetchParams.processRequestEndOfBody) fetchParams.processRequestEndOfBody(); + this[$fbc5238333bd5094$var$kOnConnect] = (origin, targets)=>{ + pool.emit('connect', origin, [ + pool, + ...targets + ]); }; - // 3. Let processBodyError given e be these steps: - const processBodyError = (e)=>{ - // 1. If fetchParams is canceled, then abort these steps. - if ($fd36c5c8024bd3ac$require$isCancelled(fetchParams)) return; - // 2. If e is an "AbortError" DOMException, then abort fetchParams’s controller. - if (e.name === "AbortError") fetchParams.controller.abort(); - else fetchParams.controller.terminate(e); + this[$fbc5238333bd5094$var$kOnDisconnect] = (origin, targets, err)=>{ + pool.emit('disconnect', origin, [ + pool, + ...targets + ], err); }; - // 4. Incrementally read request’s body given processBodyChunk, processEndOfBody, - // processBodyError, and fetchParams’s task destination. - requestBody = async function*() { - try { - for await (const bytes of request.body.stream)yield* processBodyChunk(bytes); - processEndOfBody(); - } catch (err) { - processBodyError(err); - } - }(); + this[$fbc5238333bd5094$var$kOnConnectionError] = (origin, targets, err)=>{ + pool.emit('connectionError', origin, [ + pool, + ...targets + ], err); + }; + this[$fbc5238333bd5094$var$kStats] = new $bUmeJ(this); + } + get [$fbc5238333bd5094$require$kBusy]() { + return this[$fbc5238333bd5094$var$kNeedDrain]; + } + get [$fbc5238333bd5094$require$kConnected]() { + return this[$fbc5238333bd5094$var$kClients].filter((client)=>client[$fbc5238333bd5094$require$kConnected]).length; + } + get [$fbc5238333bd5094$require$kFree]() { + return this[$fbc5238333bd5094$var$kClients].filter((client)=>client[$fbc5238333bd5094$require$kConnected] && !client[$fbc5238333bd5094$var$kNeedDrain]).length; + } + get [$fbc5238333bd5094$require$kPending]() { + let ret = this[$fbc5238333bd5094$require$kQueued]; + for (const { [$fbc5238333bd5094$require$kPending]: pending } of this[$fbc5238333bd5094$var$kClients])ret += pending; + return ret; + } + get [$fbc5238333bd5094$require$kRunning]() { + let ret = 0; + for (const { [$fbc5238333bd5094$require$kRunning]: running } of this[$fbc5238333bd5094$var$kClients])ret += running; + return ret; + } + get [$fbc5238333bd5094$require$kSize]() { + let ret = this[$fbc5238333bd5094$require$kQueued]; + for (const { [$fbc5238333bd5094$require$kSize]: size } of this[$fbc5238333bd5094$var$kClients])ret += size; + return ret; + } + get stats() { + return this[$fbc5238333bd5094$var$kStats]; + } + async [$fbc5238333bd5094$require$kClose]() { + if (this[$fbc5238333bd5094$var$kQueue].isEmpty()) await Promise.all(this[$fbc5238333bd5094$var$kClients].map((c)=>c.close())); + else await new Promise((resolve)=>{ + this[$fbc5238333bd5094$var$kClosedResolve] = resolve; + }); + } + async [$fbc5238333bd5094$require$kDestroy](err) { + while(true){ + const item = this[$fbc5238333bd5094$var$kQueue].shift(); + if (!item) break; + item.handler.onError(err); + } + await Promise.all(this[$fbc5238333bd5094$var$kClients].map((c)=>c.destroy(err))); + } + [$fbc5238333bd5094$require$kDispatch](opts, handler) { + const dispatcher = this[$fbc5238333bd5094$var$kGetDispatcher](); + if (!dispatcher) { + this[$fbc5238333bd5094$var$kNeedDrain] = true; + this[$fbc5238333bd5094$var$kQueue].push({ + opts: opts, + handler: handler + }); + this[$fbc5238333bd5094$require$kQueued]++; + } else if (!dispatcher.dispatch(opts, handler)) { + dispatcher[$fbc5238333bd5094$var$kNeedDrain] = true; + this[$fbc5238333bd5094$var$kNeedDrain] = !this[$fbc5238333bd5094$var$kGetDispatcher](); + } + return !this[$fbc5238333bd5094$var$kNeedDrain]; + } + [$fbc5238333bd5094$var$kAddClient](client) { + client.on('drain', this[$fbc5238333bd5094$var$kOnDrain]).on('connect', this[$fbc5238333bd5094$var$kOnConnect]).on('disconnect', this[$fbc5238333bd5094$var$kOnDisconnect]).on('connectionError', this[$fbc5238333bd5094$var$kOnConnectionError]); + this[$fbc5238333bd5094$var$kClients].push(client); + if (this[$fbc5238333bd5094$var$kNeedDrain]) queueMicrotask(()=>{ + if (this[$fbc5238333bd5094$var$kNeedDrain]) this[$fbc5238333bd5094$var$kOnDrain](client[$fbc5238333bd5094$require$kUrl], [ + this, + client + ]); + }); + return this; + } + [$fbc5238333bd5094$var$kRemoveClient](client) { + client.close(()=>{ + const idx = this[$fbc5238333bd5094$var$kClients].indexOf(client); + if (idx !== -1) this[$fbc5238333bd5094$var$kClients].splice(idx, 1); + }); + this[$fbc5238333bd5094$var$kNeedDrain] = this[$fbc5238333bd5094$var$kClients].some((dispatcher)=>!dispatcher[$fbc5238333bd5094$var$kNeedDrain] && dispatcher.closed !== true && dispatcher.destroyed !== true); + } +} +module.exports = { + PoolBase: $fbc5238333bd5094$var$PoolBase, + kClients: $fbc5238333bd5094$var$kClients, + kNeedDrain: $fbc5238333bd5094$var$kNeedDrain, + kAddClient: $fbc5238333bd5094$var$kAddClient, + kRemoveClient: $fbc5238333bd5094$var$kRemoveClient, + kGetDispatcher: $fbc5238333bd5094$var$kGetDispatcher +}; + +}); +parcelRegister("dNMo4", function(module, exports) { +/* eslint-disable */ 'use strict'; +// Extracted from node/lib/internal/fixed_queue.js +// Currently optimal queue size, tested on V8 6.0 - 6.6. Must be power of two. +const $a0c562ae95b675c6$var$kSize = 2048; +const $a0c562ae95b675c6$var$kMask = $a0c562ae95b675c6$var$kSize - 1; +// The FixedQueue is implemented as a singly-linked list of fixed-size +// circular buffers. It looks something like this: +// +// head tail +// | | +// v v +// +-----------+ <-----\ +-----------+ <------\ +-----------+ +// | [null] | \----- | next | \------- | next | +// +-----------+ +-----------+ +-----------+ +// | item | <-- bottom | item | <-- bottom | [empty] | +// | item | | item | | [empty] | +// | item | | item | | [empty] | +// | item | | item | | [empty] | +// | item | | item | bottom --> | item | +// | item | | item | | item | +// | ... | | ... | | ... | +// | item | | item | | item | +// | item | | item | | item | +// | [empty] | <-- top | item | | item | +// | [empty] | | item | | item | +// | [empty] | | [empty] | <-- top top --> | [empty] | +// +-----------+ +-----------+ +-----------+ +// +// Or, if there is only one circular buffer, it looks something +// like either of these: +// +// head tail head tail +// | | | | +// v v v v +// +-----------+ +-----------+ +// | [null] | | [null] | +// +-----------+ +-----------+ +// | [empty] | | item | +// | [empty] | | item | +// | item | <-- bottom top --> | [empty] | +// | item | | [empty] | +// | [empty] | <-- top bottom --> | item | +// | [empty] | | item | +// +-----------+ +-----------+ +// +// Adding a value means moving `top` forward by one, removing means +// moving `bottom` forward by one. After reaching the end, the queue +// wraps around. +// +// When `top === bottom` the current queue is empty and when +// `top + 1 === bottom` it's full. This wastes a single space of storage +// but allows much quicker checks. +class $a0c562ae95b675c6$var$FixedCircularBuffer { + constructor(){ + this.bottom = 0; + this.top = 0; + this.list = new Array($a0c562ae95b675c6$var$kSize); + this.next = null; + } + isEmpty() { + return this.top === this.bottom; + } + isFull() { + return (this.top + 1 & $a0c562ae95b675c6$var$kMask) === this.bottom; + } + push(data) { + this.list[this.top] = data; + this.top = this.top + 1 & $a0c562ae95b675c6$var$kMask; + } + shift() { + const nextItem = this.list[this.bottom]; + if (nextItem === undefined) return null; + this.list[this.bottom] = undefined; + this.bottom = this.bottom + 1 & $a0c562ae95b675c6$var$kMask; + return nextItem; + } +} +module.exports = class FixedQueue { + constructor(){ + this.head = this.tail = new $a0c562ae95b675c6$var$FixedCircularBuffer(); + } + isEmpty() { + return this.head.isEmpty(); + } + push(data) { + if (this.head.isFull()) // Head is full: Creates a new queue, sets the old queue's `.next` to it, + // and sets it as the new main queue. + this.head = this.head.next = new $a0c562ae95b675c6$var$FixedCircularBuffer(); + this.head.push(data); + } + shift() { + const tail = this.tail; + const next = tail.shift(); + if (tail.isEmpty() && tail.next !== null) // If there is another queue, it forms the new tail. + this.tail = tail.next; + return next; } - try { - // socket is only provided for websockets - const { body: body, status: status, statusText: statusText, headersList: headersList, socket: socket } = await dispatch({ - body: requestBody +}; + +}); + +parcelRegister("bUmeJ", function(module, exports) { + +var $gNVEc = parcelRequire("gNVEc"); +var $023cbea6b91a36b5$require$kFree = $gNVEc.kFree; +var $023cbea6b91a36b5$require$kConnected = $gNVEc.kConnected; +var $023cbea6b91a36b5$require$kPending = $gNVEc.kPending; +var $023cbea6b91a36b5$require$kQueued = $gNVEc.kQueued; +var $023cbea6b91a36b5$require$kRunning = $gNVEc.kRunning; +var $023cbea6b91a36b5$require$kSize = $gNVEc.kSize; +const $023cbea6b91a36b5$var$kPool = Symbol('pool'); +class $023cbea6b91a36b5$var$PoolStats { + constructor(pool){ + this[$023cbea6b91a36b5$var$kPool] = pool; + } + get connected() { + return this[$023cbea6b91a36b5$var$kPool][$023cbea6b91a36b5$require$kConnected]; + } + get free() { + return this[$023cbea6b91a36b5$var$kPool][$023cbea6b91a36b5$require$kFree]; + } + get pending() { + return this[$023cbea6b91a36b5$var$kPool][$023cbea6b91a36b5$require$kPending]; + } + get queued() { + return this[$023cbea6b91a36b5$var$kPool][$023cbea6b91a36b5$require$kQueued]; + } + get running() { + return this[$023cbea6b91a36b5$var$kPool][$023cbea6b91a36b5$require$kRunning]; + } + get size() { + return this[$023cbea6b91a36b5$var$kPool][$023cbea6b91a36b5$require$kSize]; + } +} +module.exports = $023cbea6b91a36b5$var$PoolStats; + +}); + + +parcelRegister("63Rhm", function(module, exports) { +// @ts-check +'use strict'; + + + + +var $bFRvW = parcelRequire("bFRvW"); + +var $l6jyj = parcelRequire("l6jyj"); +var $469c59fd2696c37c$require$channels = $l6jyj.channels; + +var $7VhY3 = parcelRequire("7VhY3"); + +var $e0ttg = parcelRequire("e0ttg"); + +var $gTXXK = parcelRequire("gTXXK"); +var $469c59fd2696c37c$require$InvalidArgumentError = $gTXXK.InvalidArgumentError; +var $469c59fd2696c37c$require$InformationalError = $gTXXK.InformationalError; +var $469c59fd2696c37c$require$ClientDestroyedError = $gTXXK.ClientDestroyedError; + +var $ifuPO = parcelRequire("ifuPO"); + +var $gNVEc = parcelRequire("gNVEc"); +var $469c59fd2696c37c$require$kUrl = $gNVEc.kUrl; +var $469c59fd2696c37c$require$kServerName = $gNVEc.kServerName; +var $469c59fd2696c37c$require$kClient = $gNVEc.kClient; +var $469c59fd2696c37c$require$kBusy = $gNVEc.kBusy; +var $469c59fd2696c37c$require$kConnect = $gNVEc.kConnect; +var $469c59fd2696c37c$require$kResuming = $gNVEc.kResuming; +var $469c59fd2696c37c$require$kRunning = $gNVEc.kRunning; +var $469c59fd2696c37c$require$kPending = $gNVEc.kPending; +var $469c59fd2696c37c$require$kSize = $gNVEc.kSize; +var $469c59fd2696c37c$require$kQueue = $gNVEc.kQueue; +var $469c59fd2696c37c$require$kConnected = $gNVEc.kConnected; +var $469c59fd2696c37c$require$kConnecting = $gNVEc.kConnecting; +var $469c59fd2696c37c$require$kNeedDrain = $gNVEc.kNeedDrain; +var $469c59fd2696c37c$require$kKeepAliveDefaultTimeout = $gNVEc.kKeepAliveDefaultTimeout; +var $469c59fd2696c37c$require$kHostHeader = $gNVEc.kHostHeader; +var $469c59fd2696c37c$require$kPendingIdx = $gNVEc.kPendingIdx; +var $469c59fd2696c37c$require$kRunningIdx = $gNVEc.kRunningIdx; +var $469c59fd2696c37c$require$kError = $gNVEc.kError; +var $469c59fd2696c37c$require$kPipelining = $gNVEc.kPipelining; +var $469c59fd2696c37c$require$kKeepAliveTimeoutValue = $gNVEc.kKeepAliveTimeoutValue; +var $469c59fd2696c37c$require$kMaxHeadersSize = $gNVEc.kMaxHeadersSize; +var $469c59fd2696c37c$require$kKeepAliveMaxTimeout = $gNVEc.kKeepAliveMaxTimeout; +var $469c59fd2696c37c$require$kKeepAliveTimeoutThreshold = $gNVEc.kKeepAliveTimeoutThreshold; +var $469c59fd2696c37c$require$kHeadersTimeout = $gNVEc.kHeadersTimeout; +var $469c59fd2696c37c$require$kBodyTimeout = $gNVEc.kBodyTimeout; +var $469c59fd2696c37c$require$kStrictContentLength = $gNVEc.kStrictContentLength; +var $469c59fd2696c37c$require$kConnector = $gNVEc.kConnector; +var $469c59fd2696c37c$require$kMaxRedirections = $gNVEc.kMaxRedirections; +var $469c59fd2696c37c$require$kMaxRequests = $gNVEc.kMaxRequests; +var $469c59fd2696c37c$require$kCounter = $gNVEc.kCounter; +var $469c59fd2696c37c$require$kClose = $gNVEc.kClose; +var $469c59fd2696c37c$require$kDestroy = $gNVEc.kDestroy; +var $469c59fd2696c37c$require$kDispatch = $gNVEc.kDispatch; +var $469c59fd2696c37c$require$kInterceptors = $gNVEc.kInterceptors; +var $469c59fd2696c37c$require$kLocalAddress = $gNVEc.kLocalAddress; +var $469c59fd2696c37c$require$kMaxResponseSize = $gNVEc.kMaxResponseSize; +var $469c59fd2696c37c$require$kOnError = $gNVEc.kOnError; +var $469c59fd2696c37c$require$kHTTPContext = $gNVEc.kHTTPContext; +var $469c59fd2696c37c$require$kMaxConcurrentStreams = $gNVEc.kMaxConcurrentStreams; +var $469c59fd2696c37c$require$kResume = $gNVEc.kResume; + +var $cnBuN = parcelRequire("cnBuN"); + +var $4m0uI = parcelRequire("4m0uI"); +let $469c59fd2696c37c$var$deprecatedInterceptorWarned = false; +const $469c59fd2696c37c$var$kClosedResolve = Symbol('kClosedResolve'); +const $469c59fd2696c37c$var$noop = ()=>{}; +function $469c59fd2696c37c$var$getPipelining(client) { + return client[$469c59fd2696c37c$require$kPipelining] ?? client[$469c59fd2696c37c$require$kHTTPContext]?.defaultPipelining ?? 1; +} +/** + * @type {import('../../types/client.js').default} + */ class $469c59fd2696c37c$var$Client extends $e0ttg { + /** + * + * @param {string|URL} url + * @param {import('../../types/client.js').Client.Options} options + */ constructor(url, { interceptors: interceptors, maxHeaderSize: maxHeaderSize, headersTimeout: headersTimeout, socketTimeout: socketTimeout, requestTimeout: requestTimeout, connectTimeout: connectTimeout, bodyTimeout: bodyTimeout, idleTimeout: idleTimeout, keepAlive: keepAlive, keepAliveTimeout: keepAliveTimeout, maxKeepAliveTimeout: maxKeepAliveTimeout, keepAliveMaxTimeout: keepAliveMaxTimeout, keepAliveTimeoutThreshold: keepAliveTimeoutThreshold, socketPath: socketPath, pipelining: pipelining, tls: tls, strictContentLength: strictContentLength, maxCachedSessions: maxCachedSessions, maxRedirections: maxRedirections, connect: connect, maxRequestsPerClient: maxRequestsPerClient, localAddress: localAddress, maxResponseSize: maxResponseSize, autoSelectFamily: autoSelectFamily, autoSelectFamilyAttemptTimeout: autoSelectFamilyAttemptTimeout, maxConcurrentStreams: // h2 + maxConcurrentStreams, allowH2: allowH2, webSocket: webSocket } = {}){ + super({ + webSocket: webSocket }); - if (socket) response = $fd36c5c8024bd3ac$require$makeResponse({ - status: status, - statusText: statusText, - headersList: headersList, - socket: socket + if (keepAlive !== undefined) throw new $469c59fd2696c37c$require$InvalidArgumentError('unsupported keepAlive, use pipelining=0 instead'); + if (socketTimeout !== undefined) throw new $469c59fd2696c37c$require$InvalidArgumentError('unsupported socketTimeout, use headersTimeout & bodyTimeout instead'); + if (requestTimeout !== undefined) throw new $469c59fd2696c37c$require$InvalidArgumentError('unsupported requestTimeout, use headersTimeout & bodyTimeout instead'); + if (idleTimeout !== undefined) throw new $469c59fd2696c37c$require$InvalidArgumentError('unsupported idleTimeout, use keepAliveTimeout instead'); + if (maxKeepAliveTimeout !== undefined) throw new $469c59fd2696c37c$require$InvalidArgumentError('unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead'); + if (maxHeaderSize != null && !Number.isFinite(maxHeaderSize)) throw new $469c59fd2696c37c$require$InvalidArgumentError('invalid maxHeaderSize'); + if (socketPath != null && typeof socketPath !== 'string') throw new $469c59fd2696c37c$require$InvalidArgumentError('invalid socketPath'); + if (connectTimeout != null && (!Number.isFinite(connectTimeout) || connectTimeout < 0)) throw new $469c59fd2696c37c$require$InvalidArgumentError('invalid connectTimeout'); + if (keepAliveTimeout != null && (!Number.isFinite(keepAliveTimeout) || keepAliveTimeout <= 0)) throw new $469c59fd2696c37c$require$InvalidArgumentError('invalid keepAliveTimeout'); + if (keepAliveMaxTimeout != null && (!Number.isFinite(keepAliveMaxTimeout) || keepAliveMaxTimeout <= 0)) throw new $469c59fd2696c37c$require$InvalidArgumentError('invalid keepAliveMaxTimeout'); + if (keepAliveTimeoutThreshold != null && !Number.isFinite(keepAliveTimeoutThreshold)) throw new $469c59fd2696c37c$require$InvalidArgumentError('invalid keepAliveTimeoutThreshold'); + if (headersTimeout != null && (!Number.isInteger(headersTimeout) || headersTimeout < 0)) throw new $469c59fd2696c37c$require$InvalidArgumentError('headersTimeout must be a positive integer or zero'); + if (bodyTimeout != null && (!Number.isInteger(bodyTimeout) || bodyTimeout < 0)) throw new $469c59fd2696c37c$require$InvalidArgumentError('bodyTimeout must be a positive integer or zero'); + if (connect != null && typeof connect !== 'function' && typeof connect !== 'object') throw new $469c59fd2696c37c$require$InvalidArgumentError('connect must be a function or an object'); + if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) throw new $469c59fd2696c37c$require$InvalidArgumentError('maxRedirections must be a positive number'); + if (maxRequestsPerClient != null && (!Number.isInteger(maxRequestsPerClient) || maxRequestsPerClient < 0)) throw new $469c59fd2696c37c$require$InvalidArgumentError('maxRequestsPerClient must be a positive number'); + if (localAddress != null && (typeof localAddress !== 'string' || $in2sP$nodenet.isIP(localAddress) === 0)) throw new $469c59fd2696c37c$require$InvalidArgumentError('localAddress must be valid string IP address'); + if (maxResponseSize != null && (!Number.isInteger(maxResponseSize) || maxResponseSize < -1)) throw new $469c59fd2696c37c$require$InvalidArgumentError('maxResponseSize must be a positive number'); + if (autoSelectFamilyAttemptTimeout != null && (!Number.isInteger(autoSelectFamilyAttemptTimeout) || autoSelectFamilyAttemptTimeout < -1)) throw new $469c59fd2696c37c$require$InvalidArgumentError('autoSelectFamilyAttemptTimeout must be a positive number'); + // h2 + if (allowH2 != null && typeof allowH2 !== 'boolean') throw new $469c59fd2696c37c$require$InvalidArgumentError('allowH2 must be a valid boolean value'); + if (maxConcurrentStreams != null && (typeof maxConcurrentStreams !== 'number' || maxConcurrentStreams < 1)) throw new $469c59fd2696c37c$require$InvalidArgumentError('maxConcurrentStreams must be a positive integer, greater than 0'); + if (typeof connect !== 'function') connect = $ifuPO({ + ...tls, + maxCachedSessions: maxCachedSessions, + allowH2: allowH2, + socketPath: socketPath, + timeout: connectTimeout, + ...autoSelectFamily ? { + autoSelectFamily: autoSelectFamily, + autoSelectFamilyAttemptTimeout: autoSelectFamilyAttemptTimeout + } : undefined, + ...connect }); - else { - const iterator = body[Symbol.asyncIterator](); - fetchParams.controller.next = ()=>iterator.next(); - response = $fd36c5c8024bd3ac$require$makeResponse({ - status: status, - statusText: statusText, - headersList: headersList - }); - } - } catch (err) { - // 10. If aborted, then: - if (err.name === "AbortError") { - // 1. If connection uses HTTP/2, then transmit an RST_STREAM frame. - fetchParams.controller.connection.destroy(); - // 2. Return the appropriate network error for fetchParams. - return $fd36c5c8024bd3ac$require$makeAppropriateNetworkError(fetchParams, err); - } - return $fd36c5c8024bd3ac$require$makeNetworkError(err); - } - // 11. Let pullAlgorithm be an action that resumes the ongoing fetch - // if it is suspended. - const pullAlgorithm = ()=>{ - fetchParams.controller.resume(); - }; - // 12. Let cancelAlgorithm be an algorithm that aborts fetchParams’s - // controller with reason, given reason. - const cancelAlgorithm = (reason)=>{ - fetchParams.controller.abort(reason); - }; - // 13. Let highWaterMark be a non-negative, non-NaN number, chosen by - // the user agent. - // TODO - // 14. Let sizeAlgorithm be an algorithm that accepts a chunk object - // and returns a non-negative, non-NaN, non-infinite number, chosen by the user agent. - // TODO - // 15. Let stream be a new ReadableStream. - // 16. Set up stream with pullAlgorithm set to pullAlgorithm, - // cancelAlgorithm set to cancelAlgorithm, highWaterMark set to - // highWaterMark, and sizeAlgorithm set to sizeAlgorithm. - if (!$fd36c5c8024bd3ac$var$ReadableStream) $fd36c5c8024bd3ac$var$ReadableStream = $g40fK$streamweb.ReadableStream; - const stream = new $fd36c5c8024bd3ac$var$ReadableStream({ - async start (controller) { - fetchParams.controller.controller = controller; - }, - async pull (controller) { - await pullAlgorithm(controller); - }, - async cancel (reason) { - await cancelAlgorithm(reason); - } - }, { - highWaterMark: 0, - size () { - return 1; - } - }); - // 17. Run these steps, but abort when the ongoing fetch is terminated: - // 1. Set response’s body to a new body whose stream is stream. - response.body = { - stream: stream - }; - // 2. If response is not a network error and request’s cache mode is - // not "no-store", then update response in httpCache for request. - // TODO - // 3. If includeCredentials is true and the user agent is not configured - // to block cookies for request (see section 7 of [COOKIES]), then run the - // "set-cookie-string" parsing algorithm (see section 5.2 of [COOKIES]) on - // the value of each header whose name is a byte-case-insensitive match for - // `Set-Cookie` in response’s header list, if any, and request’s current URL. - // TODO - // 18. If aborted, then: - // TODO - // 19. Run these steps in parallel: - // 1. Run these steps, but abort when fetchParams is canceled: - fetchParams.controller.on("terminated", onAborted); - fetchParams.controller.resume = async ()=>{ - // 1. While true - while(true){ - // 1-3. See onData... - // 4. Set bytes to the result of handling content codings given - // codings and bytes. - let bytes; - let isFailure; - try { - const { done: done, value: value } = await fetchParams.controller.next(); - if ($fd36c5c8024bd3ac$require$isAborted(fetchParams)) break; - bytes = done ? undefined : value; - } catch (err) { - if (fetchParams.controller.ended && !timingInfo.encodedBodySize) // zlib doesn't like empty streams. - bytes = undefined; - else { - bytes = err; - // err may be propagated from the result of calling readablestream.cancel, - // which might not be an error. https://github.com/nodejs/undici/issues/2009 - isFailure = true; - } - } - if (bytes === undefined) { - // 2. Otherwise, if the bytes transmission for response’s message - // body is done normally and stream is readable, then close - // stream, finalize response for fetchParams and response, and - // abort these in-parallel steps. - $fd36c5c8024bd3ac$require$readableStreamClose(fetchParams.controller.controller); - $fd36c5c8024bd3ac$var$finalizeResponse(fetchParams, response); - return; - } - // 5. Increase timingInfo’s decoded body size by bytes’s length. - timingInfo.decodedBodySize += bytes?.byteLength ?? 0; - // 6. If bytes is failure, then terminate fetchParams’s controller. - if (isFailure) { - fetchParams.controller.terminate(bytes); - return; - } - // 7. Enqueue a Uint8Array wrapping an ArrayBuffer containing bytes - // into stream. - fetchParams.controller.controller.enqueue(new Uint8Array(bytes)); - // 8. If stream is errored, then terminate the ongoing fetch. - if ($fd36c5c8024bd3ac$require$isErrored(stream)) { - fetchParams.controller.terminate(); - return; + if (interceptors?.Client && Array.isArray(interceptors.Client)) { + this[$469c59fd2696c37c$require$kInterceptors] = interceptors.Client; + if (!$469c59fd2696c37c$var$deprecatedInterceptorWarned) { + $469c59fd2696c37c$var$deprecatedInterceptorWarned = true; + process.emitWarning('Client.Options#interceptor is deprecated. Use Dispatcher#compose instead.', { + code: 'UNDICI-CLIENT-INTERCEPTOR-DEPRECATED' + }); } - // 9. If stream doesn’t need more data ask the user agent to suspend - // the ongoing fetch. - if (!fetchParams.controller.controller.desiredSize) return; - } - }; - // 2. If aborted, then: - function onAborted(reason) { - // 2. If fetchParams is aborted, then: - if ($fd36c5c8024bd3ac$require$isAborted(fetchParams)) { - // 1. Set response’s aborted flag. - response.aborted = true; - // 2. If stream is readable, then error stream with the result of - // deserialize a serialized abort reason given fetchParams’s - // controller’s serialized abort reason and an - // implementation-defined realm. - if ($fd36c5c8024bd3ac$require$isReadable(stream)) fetchParams.controller.controller.error(fetchParams.controller.serializedAbortReason); - } else // 3. Otherwise, if stream is readable, error stream with a TypeError. - if ($fd36c5c8024bd3ac$require$isReadable(stream)) fetchParams.controller.controller.error(new TypeError("terminated", { - cause: $fd36c5c8024bd3ac$require$isErrorLike(reason) ? reason : undefined - })); - // 4. If connection uses HTTP/2, then transmit an RST_STREAM frame. - // 5. Otherwise, the user agent should close connection unless it would be bad for performance to do so. - fetchParams.controller.connection.destroy(); + } else this[$469c59fd2696c37c$require$kInterceptors] = [ + $9H5gi({ + maxRedirections: maxRedirections + }) + ]; + this[$469c59fd2696c37c$require$kUrl] = $bFRvW.parseOrigin(url); + this[$469c59fd2696c37c$require$kConnector] = connect; + this[$469c59fd2696c37c$require$kPipelining] = pipelining != null ? pipelining : 1; + this[$469c59fd2696c37c$require$kMaxHeadersSize] = maxHeaderSize || $in2sP$nodehttp.maxHeaderSize; + this[$469c59fd2696c37c$require$kKeepAliveDefaultTimeout] = keepAliveTimeout == null ? 4e3 : keepAliveTimeout; + this[$469c59fd2696c37c$require$kKeepAliveMaxTimeout] = keepAliveMaxTimeout == null ? 600e3 : keepAliveMaxTimeout; + this[$469c59fd2696c37c$require$kKeepAliveTimeoutThreshold] = keepAliveTimeoutThreshold == null ? 2e3 : keepAliveTimeoutThreshold; + this[$469c59fd2696c37c$require$kKeepAliveTimeoutValue] = this[$469c59fd2696c37c$require$kKeepAliveDefaultTimeout]; + this[$469c59fd2696c37c$require$kServerName] = null; + this[$469c59fd2696c37c$require$kLocalAddress] = localAddress != null ? localAddress : null; + this[$469c59fd2696c37c$require$kResuming] = 0 // 0, idle, 1, scheduled, 2 resuming + ; + this[$469c59fd2696c37c$require$kNeedDrain] = 0 // 0, idle, 1, scheduled, 2 resuming + ; + this[$469c59fd2696c37c$require$kHostHeader] = `host: ${this[$469c59fd2696c37c$require$kUrl].hostname}${this[$469c59fd2696c37c$require$kUrl].port ? `:${this[$469c59fd2696c37c$require$kUrl].port}` : ''}\r\n`; + this[$469c59fd2696c37c$require$kBodyTimeout] = bodyTimeout != null ? bodyTimeout : 300e3; + this[$469c59fd2696c37c$require$kHeadersTimeout] = headersTimeout != null ? headersTimeout : 300e3; + this[$469c59fd2696c37c$require$kStrictContentLength] = strictContentLength == null ? true : strictContentLength; + this[$469c59fd2696c37c$require$kMaxRedirections] = maxRedirections; + this[$469c59fd2696c37c$require$kMaxRequests] = maxRequestsPerClient; + this[$469c59fd2696c37c$var$kClosedResolve] = null; + this[$469c59fd2696c37c$require$kMaxResponseSize] = maxResponseSize > -1 ? maxResponseSize : -1; + this[$469c59fd2696c37c$require$kMaxConcurrentStreams] = maxConcurrentStreams != null ? maxConcurrentStreams : 100 // Max peerConcurrentStreams for a Node h2 server + ; + this[$469c59fd2696c37c$require$kHTTPContext] = null; + // kQueue is built up of 3 sections separated by + // the kRunningIdx and kPendingIdx indices. + // | complete | running | pending | + // ^ kRunningIdx ^ kPendingIdx ^ kQueue.length + // kRunningIdx points to the first running element. + // kPendingIdx points to the first pending element. + // This implements a fast queue with an amortized + // time of O(1). + this[$469c59fd2696c37c$require$kQueue] = []; + this[$469c59fd2696c37c$require$kRunningIdx] = 0; + this[$469c59fd2696c37c$require$kPendingIdx] = 0; + this[$469c59fd2696c37c$require$kResume] = (sync)=>$469c59fd2696c37c$var$resume(this, sync); + this[$469c59fd2696c37c$require$kOnError] = (err)=>$469c59fd2696c37c$var$onError(this, err); } - // 20. Return response. - return response; - async function dispatch({ body: body }) { - const url = $fd36c5c8024bd3ac$require$requestCurrentURL(request); - /** @type {import('../..').Agent} */ const agent = fetchParams.controller.dispatcher; - return new Promise((resolve, reject)=>agent.dispatch({ - path: url.pathname + url.search, - origin: url.origin, - method: request.method, - body: fetchParams.controller.dispatcher.isMockActive ? request.body && (request.body.source || request.body.stream) : body, - headers: request.headersList.entries, - maxRedirections: 0, - upgrade: request.mode === "websocket" ? "websocket" : undefined - }, { - body: null, - abort: null, - onConnect (abort) { - // TODO (fix): Do we need connection here? - const { connection: connection } = fetchParams.controller; - if (connection.destroyed) abort(new $fd36c5c8024bd3ac$require$DOMException("The operation was aborted.", "AbortError")); - else { - fetchParams.controller.on("terminated", abort); - this.abort = connection.abort = abort; - } - }, - onHeaders (status, headersList, resume, statusText) { - if (status < 200) return; - let codings = []; - let location = ""; - const headers = new $fd36c5c8024bd3ac$require$Headers(); - // For H2, the headers are a plain JS object - // We distinguish between them and iterate accordingly - if (Array.isArray(headersList)) for(let n = 0; n < headersList.length; n += 2){ - const key = headersList[n + 0].toString("latin1"); - const val = headersList[n + 1].toString("latin1"); - if (key.toLowerCase() === "content-encoding") // https://www.rfc-editor.org/rfc/rfc7231#section-3.1.2.1 - // "All content-coding values are case-insensitive..." - codings = val.toLowerCase().split(",").map((x)=>x.trim()); - else if (key.toLowerCase() === "location") location = val; - headers[$fd36c5c8024bd3ac$require$kHeadersList].append(key, val); - } - else { - const keys = Object.keys(headersList); - for (const key of keys){ - const val = headersList[key]; - if (key.toLowerCase() === "content-encoding") // https://www.rfc-editor.org/rfc/rfc7231#section-3.1.2.1 - // "All content-coding values are case-insensitive..." - codings = val.toLowerCase().split(",").map((x)=>x.trim()).reverse(); - else if (key.toLowerCase() === "location") location = val; - headers[$fd36c5c8024bd3ac$require$kHeadersList].append(key, val); - } - } - this.body = new $fd36c5c8024bd3ac$require$Readable({ - read: resume - }); - const decoders = []; - const willFollow = request.redirect === "follow" && location && $fd36c5c8024bd3ac$require$redirectStatusSet.has(status); - // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Encoding - if (request.method !== "HEAD" && request.method !== "CONNECT" && !$fd36c5c8024bd3ac$require$nullBodyStatus.includes(status) && !willFollow) for (const coding of codings){ - // https://www.rfc-editor.org/rfc/rfc9112.html#section-7.2 - if (coding === "x-gzip" || coding === "gzip") decoders.push($g40fK$zlib.createGunzip({ - // Be less strict when decoding compressed responses, since sometimes - // servers send slightly invalid responses that are still accepted - // by common browsers. - // Always using Z_SYNC_FLUSH is what cURL does. - flush: $g40fK$zlib.constants.Z_SYNC_FLUSH, - finishFlush: $g40fK$zlib.constants.Z_SYNC_FLUSH - })); - else if (coding === "deflate") decoders.push($g40fK$zlib.createInflate()); - else if (coding === "br") decoders.push($g40fK$zlib.createBrotliDecompress()); - else { - decoders.length = 0; - break; - } - } - resolve({ - status: status, - statusText: statusText, - headersList: headers[$fd36c5c8024bd3ac$require$kHeadersList], - body: decoders.length ? $fd36c5c8024bd3ac$require$pipeline(this.body, ...decoders, ()=>{}) : this.body.on("error", ()=>{}) - }); - return true; - }, - onData (chunk) { - if (fetchParams.controller.dump) return; - // 1. If one or more bytes have been transmitted from response’s - // message body, then: - // 1. Let bytes be the transmitted bytes. - const bytes = chunk; - // 2. Let codings be the result of extracting header list values - // given `Content-Encoding` and response’s header list. - // See pullAlgorithm. - // 3. Increase timingInfo’s encoded body size by bytes’s length. - timingInfo.encodedBodySize += bytes.byteLength; - // 4. See pullAlgorithm... - return this.body.push(bytes); - }, - onComplete () { - if (this.abort) fetchParams.controller.off("terminated", this.abort); - fetchParams.controller.ended = true; - this.body.push(null); - }, - onError (error) { - if (this.abort) fetchParams.controller.off("terminated", this.abort); - this.body?.destroy(error); - fetchParams.controller.terminate(error); - reject(error); - }, - onUpgrade (status, headersList, socket) { - if (status !== 101) return; - const headers = new $fd36c5c8024bd3ac$require$Headers(); - for(let n = 0; n < headersList.length; n += 2){ - const key = headersList[n + 0].toString("latin1"); - const val = headersList[n + 1].toString("latin1"); - headers[$fd36c5c8024bd3ac$require$kHeadersList].append(key, val); - } - resolve({ - status: status, - statusText: $fd36c5c8024bd3ac$require$STATUS_CODES[status], - headersList: headers[$fd36c5c8024bd3ac$require$kHeadersList], - socket: socket - }); - return true; + get pipelining() { + return this[$469c59fd2696c37c$require$kPipelining]; + } + set pipelining(value) { + this[$469c59fd2696c37c$require$kPipelining] = value; + this[$469c59fd2696c37c$require$kResume](true); + } + get [$469c59fd2696c37c$require$kPending]() { + return this[$469c59fd2696c37c$require$kQueue].length - this[$469c59fd2696c37c$require$kPendingIdx]; + } + get [$469c59fd2696c37c$require$kRunning]() { + return this[$469c59fd2696c37c$require$kPendingIdx] - this[$469c59fd2696c37c$require$kRunningIdx]; + } + get [$469c59fd2696c37c$require$kSize]() { + return this[$469c59fd2696c37c$require$kQueue].length - this[$469c59fd2696c37c$require$kRunningIdx]; + } + get [$469c59fd2696c37c$require$kConnected]() { + return !!this[$469c59fd2696c37c$require$kHTTPContext] && !this[$469c59fd2696c37c$require$kConnecting] && !this[$469c59fd2696c37c$require$kHTTPContext].destroyed; + } + get [$469c59fd2696c37c$require$kBusy]() { + return Boolean(this[$469c59fd2696c37c$require$kHTTPContext]?.busy(null) || this[$469c59fd2696c37c$require$kSize] >= ($469c59fd2696c37c$var$getPipelining(this) || 1) || this[$469c59fd2696c37c$require$kPending] > 0); + } + /* istanbul ignore: only used for test */ [$469c59fd2696c37c$require$kConnect](cb) { + $469c59fd2696c37c$var$connect(this); + this.once('connect', cb); + } + [$469c59fd2696c37c$require$kDispatch](opts, handler) { + const origin = opts.origin || this[$469c59fd2696c37c$require$kUrl].origin; + const request = new $7VhY3(origin, opts, handler); + this[$469c59fd2696c37c$require$kQueue].push(request); + if (this[$469c59fd2696c37c$require$kResuming]) ; + else if ($bFRvW.bodyLength(request.body) == null && $bFRvW.isIterable(request.body)) { + // Wait a tick in case stream/iterator is ended in the same tick. + this[$469c59fd2696c37c$require$kResuming] = 1; + queueMicrotask(()=>$469c59fd2696c37c$var$resume(this)); + } else this[$469c59fd2696c37c$require$kResume](true); + if (this[$469c59fd2696c37c$require$kResuming] && this[$469c59fd2696c37c$require$kNeedDrain] !== 2 && this[$469c59fd2696c37c$require$kBusy]) this[$469c59fd2696c37c$require$kNeedDrain] = 2; + return this[$469c59fd2696c37c$require$kNeedDrain] < 2; + } + async [$469c59fd2696c37c$require$kClose]() { + // TODO: for H2 we need to gracefully flush the remaining enqueued + // request and close each stream. + return new Promise((resolve)=>{ + if (this[$469c59fd2696c37c$require$kSize]) this[$469c59fd2696c37c$var$kClosedResolve] = resolve; + else resolve(null); + }); + } + async [$469c59fd2696c37c$require$kDestroy](err) { + return new Promise((resolve)=>{ + const requests = this[$469c59fd2696c37c$require$kQueue].splice(this[$469c59fd2696c37c$require$kPendingIdx]); + for(let i = 0; i < requests.length; i++){ + const request = requests[i]; + $bFRvW.errorRequest(this, request, err); + } + const callback = ()=>{ + if (this[$469c59fd2696c37c$var$kClosedResolve]) { + // TODO (fix): Should we error here with ClientDestroyedError? + this[$469c59fd2696c37c$var$kClosedResolve](); + this[$469c59fd2696c37c$var$kClosedResolve] = null; } - })); + resolve(null); + }; + if (this[$469c59fd2696c37c$require$kHTTPContext]) { + this[$469c59fd2696c37c$require$kHTTPContext].destroy(err, callback); + this[$469c59fd2696c37c$require$kHTTPContext] = null; + } else queueMicrotask(callback); + this[$469c59fd2696c37c$require$kResume](); + }); } } -module.exports = { - fetch: $fd36c5c8024bd3ac$var$fetch, - Fetch: $fd36c5c8024bd3ac$var$Fetch, - fetching: $fd36c5c8024bd3ac$var$fetching, - finalizeAndReportTiming: $fd36c5c8024bd3ac$var$finalizeAndReportTiming -}; - -}); -parcelRegister("lHKGY", function(module, exports) { -"use strict"; - -var $gXdj5 = parcelRequire("gXdj5"); -var $fcd1d539b7f7300d$require$Headers = $gXdj5.Headers; -var $fcd1d539b7f7300d$require$HeadersList = $gXdj5.HeadersList; -var $fcd1d539b7f7300d$require$fill = $gXdj5.fill; - -var $4ub3w = parcelRequire("4ub3w"); -var $fcd1d539b7f7300d$require$extractBody = $4ub3w.extractBody; -var $fcd1d539b7f7300d$require$cloneBody = $4ub3w.cloneBody; -var $fcd1d539b7f7300d$require$mixinBody = $4ub3w.mixinBody; - -var $gv2nV = parcelRequire("gv2nV"); -const { kEnumerableProperty: $fcd1d539b7f7300d$var$kEnumerableProperty } = $gv2nV; - -var $4EkpM = parcelRequire("4EkpM"); -var $fcd1d539b7f7300d$require$isValidReasonPhrase = $4EkpM.isValidReasonPhrase; -var $fcd1d539b7f7300d$require$isCancelled = $4EkpM.isCancelled; -var $fcd1d539b7f7300d$require$isAborted = $4EkpM.isAborted; -var $fcd1d539b7f7300d$require$isBlobLike = $4EkpM.isBlobLike; -var $fcd1d539b7f7300d$require$serializeJavascriptValueToJSONString = $4EkpM.serializeJavascriptValueToJSONString; -var $fcd1d539b7f7300d$require$isErrorLike = $4EkpM.isErrorLike; -var $fcd1d539b7f7300d$require$isomorphicEncode = $4EkpM.isomorphicEncode; - -var $1ZCMb = parcelRequire("1ZCMb"); -var $fcd1d539b7f7300d$require$redirectStatusSet = $1ZCMb.redirectStatusSet; -var $fcd1d539b7f7300d$require$nullBodyStatus = $1ZCMb.nullBodyStatus; -var $fcd1d539b7f7300d$require$DOMException = $1ZCMb.DOMException; - -var $74L4J = parcelRequire("74L4J"); -var $fcd1d539b7f7300d$require$kState = $74L4J.kState; -var $fcd1d539b7f7300d$require$kHeaders = $74L4J.kHeaders; -var $fcd1d539b7f7300d$require$kGuard = $74L4J.kGuard; -var $fcd1d539b7f7300d$require$kRealm = $74L4J.kRealm; - -var $jk0LQ = parcelRequire("jk0LQ"); -var $fcd1d539b7f7300d$require$webidl = $jk0LQ.webidl; - -var $40V0q = parcelRequire("40V0q"); -var $fcd1d539b7f7300d$require$FormData = $40V0q.FormData; - -var $5pfdo = parcelRequire("5pfdo"); -var $fcd1d539b7f7300d$require$getGlobalOrigin = $5pfdo.getGlobalOrigin; - -var $bNorT = parcelRequire("bNorT"); -var $fcd1d539b7f7300d$require$URLSerializer = $bNorT.URLSerializer; - -var $hHZvh = parcelRequire("hHZvh"); -var $fcd1d539b7f7300d$require$kHeadersList = $hHZvh.kHeadersList; -var $fcd1d539b7f7300d$require$kConstruct = $hHZvh.kConstruct; - -var $fcd1d539b7f7300d$require$types = $g40fK$util.types; - -const $fcd1d539b7f7300d$var$ReadableStream = globalThis.ReadableStream || $g40fK$streamweb.ReadableStream; -const $fcd1d539b7f7300d$var$textEncoder = new TextEncoder("utf-8"); -// https://fetch.spec.whatwg.org/#response-class -class $fcd1d539b7f7300d$var$Response { - // Creates network error Response. - static error() { - // TODO - const relevantRealm = { - settingsObject: {} - }; - // The static error() method steps are to return the result of creating a - // Response object, given a new network error, "immutable", and this’s - // relevant Realm. - const responseObject = new $fcd1d539b7f7300d$var$Response(); - responseObject[$fcd1d539b7f7300d$require$kState] = $fcd1d539b7f7300d$var$makeNetworkError(); - responseObject[$fcd1d539b7f7300d$require$kRealm] = relevantRealm; - responseObject[$fcd1d539b7f7300d$require$kHeaders][$fcd1d539b7f7300d$require$kHeadersList] = responseObject[$fcd1d539b7f7300d$require$kState].headersList; - responseObject[$fcd1d539b7f7300d$require$kHeaders][$fcd1d539b7f7300d$require$kGuard] = "immutable"; - responseObject[$fcd1d539b7f7300d$require$kHeaders][$fcd1d539b7f7300d$require$kRealm] = relevantRealm; - return responseObject; +var $9H5gi = parcelRequire("9H5gi"); +function $469c59fd2696c37c$var$onError(client, err) { + if (client[$469c59fd2696c37c$require$kRunning] === 0 && err.code !== 'UND_ERR_INFO' && err.code !== 'UND_ERR_SOCKET') { + // Error is not caused by running request and not a recoverable + // socket error. + $in2sP$nodeassert(client[$469c59fd2696c37c$require$kPendingIdx] === client[$469c59fd2696c37c$require$kRunningIdx]); + const requests = client[$469c59fd2696c37c$require$kQueue].splice(client[$469c59fd2696c37c$require$kRunningIdx]); + for(let i = 0; i < requests.length; i++){ + const request = requests[i]; + $bFRvW.errorRequest(client, request, err); + } + $in2sP$nodeassert(client[$469c59fd2696c37c$require$kSize] === 0); } - // https://fetch.spec.whatwg.org/#dom-response-json - static json(data, init = {}) { - $fcd1d539b7f7300d$require$webidl.argumentLengthCheck(arguments, 1, { - header: "Response.json" - }); - if (init !== null) init = $fcd1d539b7f7300d$require$webidl.converters.ResponseInit(init); - // 1. Let bytes the result of running serialize a JavaScript value to JSON bytes on data. - const bytes = $fcd1d539b7f7300d$var$textEncoder.encode($fcd1d539b7f7300d$require$serializeJavascriptValueToJSONString(data)); - // 2. Let body be the result of extracting bytes. - const body = $fcd1d539b7f7300d$require$extractBody(bytes); - // 3. Let responseObject be the result of creating a Response object, given a new response, - // "response", and this’s relevant Realm. - const relevantRealm = { - settingsObject: {} - }; - const responseObject = new $fcd1d539b7f7300d$var$Response(); - responseObject[$fcd1d539b7f7300d$require$kRealm] = relevantRealm; - responseObject[$fcd1d539b7f7300d$require$kHeaders][$fcd1d539b7f7300d$require$kGuard] = "response"; - responseObject[$fcd1d539b7f7300d$require$kHeaders][$fcd1d539b7f7300d$require$kRealm] = relevantRealm; - // 4. Perform initialize a response given responseObject, init, and (body, "application/json"). - $fcd1d539b7f7300d$var$initializeResponse(responseObject, init, { - body: body[0], - type: "application/json" - }); - // 5. Return responseObject. - return responseObject; +} +/** + * @param {Client} client + * @returns + */ async function $469c59fd2696c37c$var$connect(client) { + $in2sP$nodeassert(!client[$469c59fd2696c37c$require$kConnecting]); + $in2sP$nodeassert(!client[$469c59fd2696c37c$require$kHTTPContext]); + let { host: host, hostname: hostname, protocol: protocol, port: port } = client[$469c59fd2696c37c$require$kUrl]; + // Resolve ipv6 + if (hostname[0] === '[') { + const idx = hostname.indexOf(']'); + $in2sP$nodeassert(idx !== -1); + const ip = hostname.substring(1, idx); + $in2sP$nodeassert($in2sP$nodenet.isIP(ip)); + hostname = ip; } - // Creates a redirect Response that redirects to url with status status. - static redirect(url, status = 302) { - const relevantRealm = { - settingsObject: {} - }; - $fcd1d539b7f7300d$require$webidl.argumentLengthCheck(arguments, 1, { - header: "Response.redirect" + client[$469c59fd2696c37c$require$kConnecting] = true; + if ($469c59fd2696c37c$require$channels.beforeConnect.hasSubscribers) $469c59fd2696c37c$require$channels.beforeConnect.publish({ + connectParams: { + host: host, + hostname: hostname, + protocol: protocol, + port: port, + version: client[$469c59fd2696c37c$require$kHTTPContext]?.version, + servername: client[$469c59fd2696c37c$require$kServerName], + localAddress: client[$469c59fd2696c37c$require$kLocalAddress] + }, + connector: client[$469c59fd2696c37c$require$kConnector] + }); + try { + const socket = await new Promise((resolve, reject)=>{ + client[$469c59fd2696c37c$require$kConnector]({ + host: host, + hostname: hostname, + protocol: protocol, + port: port, + servername: client[$469c59fd2696c37c$require$kServerName], + localAddress: client[$469c59fd2696c37c$require$kLocalAddress] + }, (err, socket)=>{ + if (err) reject(err); + else resolve(socket); + }); }); - url = $fcd1d539b7f7300d$require$webidl.converters.USVString(url); - status = $fcd1d539b7f7300d$require$webidl.converters["unsigned short"](status); - // 1. Let parsedURL be the result of parsing url with current settings - // object’s API base URL. - // 2. If parsedURL is failure, then throw a TypeError. - // TODO: base-URL? - let parsedURL; + if (client.destroyed) { + $bFRvW.destroy(socket.on('error', $469c59fd2696c37c$var$noop), new $469c59fd2696c37c$require$ClientDestroyedError()); + return; + } + $in2sP$nodeassert(socket); try { - parsedURL = new URL(url, $fcd1d539b7f7300d$require$getGlobalOrigin()); + client[$469c59fd2696c37c$require$kHTTPContext] = socket.alpnProtocol === 'h2' ? await $4m0uI(client, socket) : await $cnBuN(client, socket); } catch (err) { - throw Object.assign(new TypeError("Failed to parse URL from " + url), { - cause: err + socket.destroy().on('error', $469c59fd2696c37c$var$noop); + throw err; + } + client[$469c59fd2696c37c$require$kConnecting] = false; + socket[$469c59fd2696c37c$require$kCounter] = 0; + socket[$469c59fd2696c37c$require$kMaxRequests] = client[$469c59fd2696c37c$require$kMaxRequests]; + socket[$469c59fd2696c37c$require$kClient] = client; + socket[$469c59fd2696c37c$require$kError] = null; + if ($469c59fd2696c37c$require$channels.connected.hasSubscribers) $469c59fd2696c37c$require$channels.connected.publish({ + connectParams: { + host: host, + hostname: hostname, + protocol: protocol, + port: port, + version: client[$469c59fd2696c37c$require$kHTTPContext]?.version, + servername: client[$469c59fd2696c37c$require$kServerName], + localAddress: client[$469c59fd2696c37c$require$kLocalAddress] + }, + connector: client[$469c59fd2696c37c$require$kConnector], + socket: socket + }); + client.emit('connect', client[$469c59fd2696c37c$require$kUrl], [ + client + ]); + } catch (err) { + if (client.destroyed) return; + client[$469c59fd2696c37c$require$kConnecting] = false; + if ($469c59fd2696c37c$require$channels.connectError.hasSubscribers) $469c59fd2696c37c$require$channels.connectError.publish({ + connectParams: { + host: host, + hostname: hostname, + protocol: protocol, + port: port, + version: client[$469c59fd2696c37c$require$kHTTPContext]?.version, + servername: client[$469c59fd2696c37c$require$kServerName], + localAddress: client[$469c59fd2696c37c$require$kLocalAddress] + }, + connector: client[$469c59fd2696c37c$require$kConnector], + error: err + }); + if (err.code === 'ERR_TLS_CERT_ALTNAME_INVALID') { + $in2sP$nodeassert(client[$469c59fd2696c37c$require$kRunning] === 0); + while(client[$469c59fd2696c37c$require$kPending] > 0 && client[$469c59fd2696c37c$require$kQueue][client[$469c59fd2696c37c$require$kPendingIdx]].servername === client[$469c59fd2696c37c$require$kServerName]){ + const request = client[$469c59fd2696c37c$require$kQueue][client[$469c59fd2696c37c$require$kPendingIdx]++]; + $bFRvW.errorRequest(client, request, err); + } + } else $469c59fd2696c37c$var$onError(client, err); + client.emit('connectionError', client[$469c59fd2696c37c$require$kUrl], [ + client + ], err); + } + client[$469c59fd2696c37c$require$kResume](); +} +function $469c59fd2696c37c$var$emitDrain(client) { + client[$469c59fd2696c37c$require$kNeedDrain] = 0; + client.emit('drain', client[$469c59fd2696c37c$require$kUrl], [ + client + ]); +} +function $469c59fd2696c37c$var$resume(client, sync) { + if (client[$469c59fd2696c37c$require$kResuming] === 2) return; + client[$469c59fd2696c37c$require$kResuming] = 2; + $469c59fd2696c37c$var$_resume(client, sync); + client[$469c59fd2696c37c$require$kResuming] = 0; + if (client[$469c59fd2696c37c$require$kRunningIdx] > 256) { + client[$469c59fd2696c37c$require$kQueue].splice(0, client[$469c59fd2696c37c$require$kRunningIdx]); + client[$469c59fd2696c37c$require$kPendingIdx] -= client[$469c59fd2696c37c$require$kRunningIdx]; + client[$469c59fd2696c37c$require$kRunningIdx] = 0; + } +} +function $469c59fd2696c37c$var$_resume(client, sync) { + while(true){ + if (client.destroyed) { + $in2sP$nodeassert(client[$469c59fd2696c37c$require$kPending] === 0); + return; + } + if (client[$469c59fd2696c37c$var$kClosedResolve] && !client[$469c59fd2696c37c$require$kSize]) { + client[$469c59fd2696c37c$var$kClosedResolve](); + client[$469c59fd2696c37c$var$kClosedResolve] = null; + return; + } + if (client[$469c59fd2696c37c$require$kHTTPContext]) client[$469c59fd2696c37c$require$kHTTPContext].resume(); + if (client[$469c59fd2696c37c$require$kBusy]) client[$469c59fd2696c37c$require$kNeedDrain] = 2; + else if (client[$469c59fd2696c37c$require$kNeedDrain] === 2) { + if (sync) { + client[$469c59fd2696c37c$require$kNeedDrain] = 1; + queueMicrotask(()=>$469c59fd2696c37c$var$emitDrain(client)); + } else $469c59fd2696c37c$var$emitDrain(client); + continue; + } + if (client[$469c59fd2696c37c$require$kPending] === 0) return; + if (client[$469c59fd2696c37c$require$kRunning] >= ($469c59fd2696c37c$var$getPipelining(client) || 1)) return; + const request = client[$469c59fd2696c37c$require$kQueue][client[$469c59fd2696c37c$require$kPendingIdx]]; + if (client[$469c59fd2696c37c$require$kUrl].protocol === 'https:' && client[$469c59fd2696c37c$require$kServerName] !== request.servername) { + if (client[$469c59fd2696c37c$require$kRunning] > 0) return; + client[$469c59fd2696c37c$require$kServerName] = request.servername; + client[$469c59fd2696c37c$require$kHTTPContext]?.destroy(new $469c59fd2696c37c$require$InformationalError('servername changed'), ()=>{ + client[$469c59fd2696c37c$require$kHTTPContext] = null; + $469c59fd2696c37c$var$resume(client); }); } - // 3. If status is not a redirect status, then throw a RangeError. - if (!$fcd1d539b7f7300d$require$redirectStatusSet.has(status)) throw new RangeError("Invalid status code " + status); - // 4. Let responseObject be the result of creating a Response object, - // given a new response, "immutable", and this’s relevant Realm. - const responseObject = new $fcd1d539b7f7300d$var$Response(); - responseObject[$fcd1d539b7f7300d$require$kRealm] = relevantRealm; - responseObject[$fcd1d539b7f7300d$require$kHeaders][$fcd1d539b7f7300d$require$kGuard] = "immutable"; - responseObject[$fcd1d539b7f7300d$require$kHeaders][$fcd1d539b7f7300d$require$kRealm] = relevantRealm; - // 5. Set responseObject’s response’s status to status. - responseObject[$fcd1d539b7f7300d$require$kState].status = status; - // 6. Let value be parsedURL, serialized and isomorphic encoded. - const value = $fcd1d539b7f7300d$require$isomorphicEncode($fcd1d539b7f7300d$require$URLSerializer(parsedURL)); - // 7. Append `Location`/value to responseObject’s response’s header list. - responseObject[$fcd1d539b7f7300d$require$kState].headersList.append("location", value); - // 8. Return responseObject. - return responseObject; + if (client[$469c59fd2696c37c$require$kConnecting]) return; + if (!client[$469c59fd2696c37c$require$kHTTPContext]) { + $469c59fd2696c37c$var$connect(client); + return; + } + if (client[$469c59fd2696c37c$require$kHTTPContext].destroyed) return; + if (client[$469c59fd2696c37c$require$kHTTPContext].busy(request)) return; + if (!request.aborted && client[$469c59fd2696c37c$require$kHTTPContext].write(request)) client[$469c59fd2696c37c$require$kPendingIdx]++; + else client[$469c59fd2696c37c$require$kQueue].splice(client[$469c59fd2696c37c$require$kPendingIdx], 1); } - // https://fetch.spec.whatwg.org/#dom-response - constructor(body = null, init = {}){ - if (body !== null) body = $fcd1d539b7f7300d$require$webidl.converters.BodyInit(body); - init = $fcd1d539b7f7300d$require$webidl.converters.ResponseInit(init); - // TODO - this[$fcd1d539b7f7300d$require$kRealm] = { - settingsObject: {} - }; - // 1. Set this’s response to a new response. - this[$fcd1d539b7f7300d$require$kState] = $fcd1d539b7f7300d$var$makeResponse({}); - // 2. Set this’s headers to a new Headers object with this’s relevant - // Realm, whose header list is this’s response’s header list and guard - // is "response". - this[$fcd1d539b7f7300d$require$kHeaders] = new $fcd1d539b7f7300d$require$Headers($fcd1d539b7f7300d$require$kConstruct); - this[$fcd1d539b7f7300d$require$kHeaders][$fcd1d539b7f7300d$require$kGuard] = "response"; - this[$fcd1d539b7f7300d$require$kHeaders][$fcd1d539b7f7300d$require$kHeadersList] = this[$fcd1d539b7f7300d$require$kState].headersList; - this[$fcd1d539b7f7300d$require$kHeaders][$fcd1d539b7f7300d$require$kRealm] = this[$fcd1d539b7f7300d$require$kRealm]; - // 3. Let bodyWithType be null. - let bodyWithType = null; - // 4. If body is non-null, then set bodyWithType to the result of extracting body. - if (body != null) { - const [extractedBody, type] = $fcd1d539b7f7300d$require$extractBody(body); - bodyWithType = { - body: extractedBody, - type: type +} +module.exports = $469c59fd2696c37c$var$Client; + +}); +parcelRegister("7VhY3", function(module, exports) { +'use strict'; + +var $gTXXK = parcelRequire("gTXXK"); +var $5c4bcb45c952bd3a$require$InvalidArgumentError = $gTXXK.InvalidArgumentError; +var $5c4bcb45c952bd3a$require$NotSupportedError = $gTXXK.NotSupportedError; + + +var $bFRvW = parcelRequire("bFRvW"); +var $5c4bcb45c952bd3a$require$isValidHTTPToken = $bFRvW.isValidHTTPToken; +var $5c4bcb45c952bd3a$require$isValidHeaderValue = $bFRvW.isValidHeaderValue; +var $5c4bcb45c952bd3a$require$isStream = $bFRvW.isStream; +var $5c4bcb45c952bd3a$require$destroy = $bFRvW.destroy; +var $5c4bcb45c952bd3a$require$isBuffer = $bFRvW.isBuffer; +var $5c4bcb45c952bd3a$require$isFormDataLike = $bFRvW.isFormDataLike; +var $5c4bcb45c952bd3a$require$isIterable = $bFRvW.isIterable; +var $5c4bcb45c952bd3a$require$isBlobLike = $bFRvW.isBlobLike; +var $5c4bcb45c952bd3a$require$buildURL = $bFRvW.buildURL; +var $5c4bcb45c952bd3a$require$validateHandler = $bFRvW.validateHandler; +var $5c4bcb45c952bd3a$require$getServerName = $bFRvW.getServerName; +var $5c4bcb45c952bd3a$require$normalizedMethodRecords = $bFRvW.normalizedMethodRecords; + +var $l6jyj = parcelRequire("l6jyj"); +var $5c4bcb45c952bd3a$require$channels = $l6jyj.channels; + +var $4xbXj = parcelRequire("4xbXj"); +var $5c4bcb45c952bd3a$require$headerNameLowerCasedRecord = $4xbXj.headerNameLowerCasedRecord; +// Verifies that a given path is valid does not contain control chars \x00 to \x20 +const $5c4bcb45c952bd3a$var$invalidPathRegex = /[^\u0021-\u00ff]/; +const $5c4bcb45c952bd3a$var$kHandler = Symbol('handler'); +class $5c4bcb45c952bd3a$var$Request { + constructor(origin, { path: path, method: method, body: body, headers: headers, query: query, idempotent: idempotent, blocking: blocking, upgrade: upgrade, headersTimeout: headersTimeout, bodyTimeout: bodyTimeout, reset: reset, throwOnError: throwOnError, expectContinue: expectContinue, servername: servername }, handler){ + if (typeof path !== 'string') throw new $5c4bcb45c952bd3a$require$InvalidArgumentError('path must be a string'); + else if (path[0] !== '/' && !(path.startsWith('http://') || path.startsWith('https://')) && method !== 'CONNECT') throw new $5c4bcb45c952bd3a$require$InvalidArgumentError('path must be an absolute URL or start with a slash'); + else if ($5c4bcb45c952bd3a$var$invalidPathRegex.test(path)) throw new $5c4bcb45c952bd3a$require$InvalidArgumentError('invalid request path'); + if (typeof method !== 'string') throw new $5c4bcb45c952bd3a$require$InvalidArgumentError('method must be a string'); + else if ($5c4bcb45c952bd3a$require$normalizedMethodRecords[method] === undefined && !$5c4bcb45c952bd3a$require$isValidHTTPToken(method)) throw new $5c4bcb45c952bd3a$require$InvalidArgumentError('invalid request method'); + if (upgrade && typeof upgrade !== 'string') throw new $5c4bcb45c952bd3a$require$InvalidArgumentError('upgrade must be a string'); + if (upgrade && !$5c4bcb45c952bd3a$require$isValidHeaderValue(upgrade)) throw new $5c4bcb45c952bd3a$require$InvalidArgumentError('invalid upgrade header'); + if (headersTimeout != null && (!Number.isFinite(headersTimeout) || headersTimeout < 0)) throw new $5c4bcb45c952bd3a$require$InvalidArgumentError('invalid headersTimeout'); + if (bodyTimeout != null && (!Number.isFinite(bodyTimeout) || bodyTimeout < 0)) throw new $5c4bcb45c952bd3a$require$InvalidArgumentError('invalid bodyTimeout'); + if (reset != null && typeof reset !== 'boolean') throw new $5c4bcb45c952bd3a$require$InvalidArgumentError('invalid reset'); + if (expectContinue != null && typeof expectContinue !== 'boolean') throw new $5c4bcb45c952bd3a$require$InvalidArgumentError('invalid expectContinue'); + this.headersTimeout = headersTimeout; + this.bodyTimeout = bodyTimeout; + this.throwOnError = throwOnError === true; + this.method = method; + this.abort = null; + if (body == null) this.body = null; + else if ($5c4bcb45c952bd3a$require$isStream(body)) { + this.body = body; + const rState = this.body._readableState; + if (!rState || !rState.autoDestroy) { + this.endHandler = function autoDestroy() { + $5c4bcb45c952bd3a$require$destroy(this); + }; + this.body.on('end', this.endHandler); + } + this.errorHandler = (err)=>{ + if (this.abort) this.abort(err); + else this.error = err; }; + this.body.on('error', this.errorHandler); + } else if ($5c4bcb45c952bd3a$require$isBuffer(body)) this.body = body.byteLength ? body : null; + else if (ArrayBuffer.isView(body)) this.body = body.buffer.byteLength ? Buffer.from(body.buffer, body.byteOffset, body.byteLength) : null; + else if (body instanceof ArrayBuffer) this.body = body.byteLength ? Buffer.from(body) : null; + else if (typeof body === 'string') this.body = body.length ? Buffer.from(body) : null; + else if ($5c4bcb45c952bd3a$require$isFormDataLike(body) || $5c4bcb45c952bd3a$require$isIterable(body) || $5c4bcb45c952bd3a$require$isBlobLike(body)) this.body = body; + else throw new $5c4bcb45c952bd3a$require$InvalidArgumentError('body must be a string, a Buffer, a Readable stream, an iterable, or an async iterable'); + this.completed = false; + this.aborted = false; + this.upgrade = upgrade || null; + this.path = query ? $5c4bcb45c952bd3a$require$buildURL(path, query) : path; + this.origin = origin; + this.idempotent = idempotent == null ? method === 'HEAD' || method === 'GET' : idempotent; + this.blocking = blocking == null ? false : blocking; + this.reset = reset == null ? null : reset; + this.host = null; + this.contentLength = null; + this.contentType = null; + this.headers = []; + // Only for H2 + this.expectContinue = expectContinue != null ? expectContinue : false; + if (Array.isArray(headers)) { + if (headers.length % 2 !== 0) throw new $5c4bcb45c952bd3a$require$InvalidArgumentError('headers array must be even'); + for(let i = 0; i < headers.length; i += 2)$5c4bcb45c952bd3a$var$processHeader(this, headers[i], headers[i + 1]); + } else if (headers && typeof headers === 'object') { + if (headers[Symbol.iterator]) for (const header of headers){ + if (!Array.isArray(header) || header.length !== 2) throw new $5c4bcb45c952bd3a$require$InvalidArgumentError('headers must be in key-value pair format'); + $5c4bcb45c952bd3a$var$processHeader(this, header[0], header[1]); + } + else { + const keys = Object.keys(headers); + for(let i = 0; i < keys.length; ++i)$5c4bcb45c952bd3a$var$processHeader(this, keys[i], headers[keys[i]]); + } + } else if (headers != null) throw new $5c4bcb45c952bd3a$require$InvalidArgumentError('headers must be an object or an array'); + $5c4bcb45c952bd3a$require$validateHandler(handler, method, upgrade); + this.servername = servername || $5c4bcb45c952bd3a$require$getServerName(this.host); + this[$5c4bcb45c952bd3a$var$kHandler] = handler; + if ($5c4bcb45c952bd3a$require$channels.create.hasSubscribers) $5c4bcb45c952bd3a$require$channels.create.publish({ + request: this + }); + } + onBodySent(chunk) { + if (this[$5c4bcb45c952bd3a$var$kHandler].onBodySent) try { + return this[$5c4bcb45c952bd3a$var$kHandler].onBodySent(chunk); + } catch (err) { + this.abort(err); } - // 5. Perform initialize a response given this, init, and bodyWithType. - $fcd1d539b7f7300d$var$initializeResponse(this, init, bodyWithType); } - // Returns response’s type, e.g., "cors". - get type() { - $fcd1d539b7f7300d$require$webidl.brandCheck(this, $fcd1d539b7f7300d$var$Response); - // The type getter steps are to return this’s response’s type. - return this[$fcd1d539b7f7300d$require$kState].type; + onRequestSent() { + if ($5c4bcb45c952bd3a$require$channels.bodySent.hasSubscribers) $5c4bcb45c952bd3a$require$channels.bodySent.publish({ + request: this + }); + if (this[$5c4bcb45c952bd3a$var$kHandler].onRequestSent) try { + return this[$5c4bcb45c952bd3a$var$kHandler].onRequestSent(); + } catch (err) { + this.abort(err); + } + } + onConnect(abort) { + $in2sP$nodeassert(!this.aborted); + $in2sP$nodeassert(!this.completed); + if (this.error) abort(this.error); + else { + this.abort = abort; + return this[$5c4bcb45c952bd3a$var$kHandler].onConnect(abort); + } + } + onResponseStarted() { + return this[$5c4bcb45c952bd3a$var$kHandler].onResponseStarted?.(); + } + onHeaders(statusCode, headers, resume, statusText) { + $in2sP$nodeassert(!this.aborted); + $in2sP$nodeassert(!this.completed); + if ($5c4bcb45c952bd3a$require$channels.headers.hasSubscribers) $5c4bcb45c952bd3a$require$channels.headers.publish({ + request: this, + response: { + statusCode: statusCode, + headers: headers, + statusText: statusText + } + }); + try { + return this[$5c4bcb45c952bd3a$var$kHandler].onHeaders(statusCode, headers, resume, statusText); + } catch (err) { + this.abort(err); + } + } + onData(chunk) { + $in2sP$nodeassert(!this.aborted); + $in2sP$nodeassert(!this.completed); + try { + return this[$5c4bcb45c952bd3a$var$kHandler].onData(chunk); + } catch (err) { + this.abort(err); + return false; + } + } + onUpgrade(statusCode, headers, socket) { + $in2sP$nodeassert(!this.aborted); + $in2sP$nodeassert(!this.completed); + return this[$5c4bcb45c952bd3a$var$kHandler].onUpgrade(statusCode, headers, socket); + } + onComplete(trailers) { + this.onFinally(); + $in2sP$nodeassert(!this.aborted); + this.completed = true; + if ($5c4bcb45c952bd3a$require$channels.trailers.hasSubscribers) $5c4bcb45c952bd3a$require$channels.trailers.publish({ + request: this, + trailers: trailers + }); + try { + return this[$5c4bcb45c952bd3a$var$kHandler].onComplete(trailers); + } catch (err) { + // TODO (fix): This might be a bad idea? + this.onError(err); + } } - // Returns response’s URL, if it has one; otherwise the empty string. - get url() { - $fcd1d539b7f7300d$require$webidl.brandCheck(this, $fcd1d539b7f7300d$var$Response); - const urlList = this[$fcd1d539b7f7300d$require$kState].urlList; - // The url getter steps are to return the empty string if this’s - // response’s URL is null; otherwise this’s response’s URL, - // serialized with exclude fragment set to true. - const url = urlList[urlList.length - 1] ?? null; - if (url === null) return ""; - return $fcd1d539b7f7300d$require$URLSerializer(url, true); + onError(error) { + this.onFinally(); + if ($5c4bcb45c952bd3a$require$channels.error.hasSubscribers) $5c4bcb45c952bd3a$require$channels.error.publish({ + request: this, + error: error + }); + if (this.aborted) return; + this.aborted = true; + return this[$5c4bcb45c952bd3a$var$kHandler].onError(error); } - // Returns whether response was obtained through a redirect. - get redirected() { - $fcd1d539b7f7300d$require$webidl.brandCheck(this, $fcd1d539b7f7300d$var$Response); - // The redirected getter steps are to return true if this’s response’s URL - // list has more than one item; otherwise false. - return this[$fcd1d539b7f7300d$require$kState].urlList.length > 1; + onFinally() { + if (this.errorHandler) { + this.body.off('error', this.errorHandler); + this.errorHandler = null; + } + if (this.endHandler) { + this.body.off('end', this.endHandler); + this.endHandler = null; + } } - // Returns response’s status. - get status() { - $fcd1d539b7f7300d$require$webidl.brandCheck(this, $fcd1d539b7f7300d$var$Response); - // The status getter steps are to return this’s response’s status. - return this[$fcd1d539b7f7300d$require$kState].status; + addHeader(key, value) { + $5c4bcb45c952bd3a$var$processHeader(this, key, value); + return this; } - // Returns whether response’s status is an ok status. - get ok() { - $fcd1d539b7f7300d$require$webidl.brandCheck(this, $fcd1d539b7f7300d$var$Response); - // The ok getter steps are to return true if this’s response’s status is an - // ok status; otherwise false. - return this[$fcd1d539b7f7300d$require$kState].status >= 200 && this[$fcd1d539b7f7300d$require$kState].status <= 299; +} +function $5c4bcb45c952bd3a$var$processHeader(request, key, val) { + if (val && typeof val === 'object' && !Array.isArray(val)) throw new $5c4bcb45c952bd3a$require$InvalidArgumentError(`invalid ${key} header`); + else if (val === undefined) return; + let headerName = $5c4bcb45c952bd3a$require$headerNameLowerCasedRecord[key]; + if (headerName === undefined) { + headerName = key.toLowerCase(); + if ($5c4bcb45c952bd3a$require$headerNameLowerCasedRecord[headerName] === undefined && !$5c4bcb45c952bd3a$require$isValidHTTPToken(headerName)) throw new $5c4bcb45c952bd3a$require$InvalidArgumentError('invalid header key'); + } + if (Array.isArray(val)) { + const arr = []; + for(let i = 0; i < val.length; i++){ + if (typeof val[i] === 'string') { + if (!$5c4bcb45c952bd3a$require$isValidHeaderValue(val[i])) throw new $5c4bcb45c952bd3a$require$InvalidArgumentError(`invalid ${key} header`); + arr.push(val[i]); + } else if (val[i] === null) arr.push(''); + else if (typeof val[i] === 'object') throw new $5c4bcb45c952bd3a$require$InvalidArgumentError(`invalid ${key} header`); + else { + // Coerce primitives (and reject unsafe coercions such as functions + // with a crafted toString/Symbol.toPrimitive). + const str = `${val[i]}`; + if (!$5c4bcb45c952bd3a$require$isValidHeaderValue(str)) throw new $5c4bcb45c952bd3a$require$InvalidArgumentError(`invalid ${key} header`); + arr.push(str); + } + } + val = arr; + } else if (typeof val === 'string') { + if (!$5c4bcb45c952bd3a$require$isValidHeaderValue(val)) throw new $5c4bcb45c952bd3a$require$InvalidArgumentError(`invalid ${key} header`); + } else if (val === null) val = ''; + else { + // Coerce primitives (and reject unsafe coercions such as functions + // with a crafted toString/Symbol.toPrimitive). + val = `${val}`; + if (!$5c4bcb45c952bd3a$require$isValidHeaderValue(val)) throw new $5c4bcb45c952bd3a$require$InvalidArgumentError(`invalid ${key} header`); + } + if (headerName === 'host') { + if (request.host !== null) throw new $5c4bcb45c952bd3a$require$InvalidArgumentError('duplicate host header'); + if (typeof val !== 'string') throw new $5c4bcb45c952bd3a$require$InvalidArgumentError('invalid host header'); + // Consumed by Client + request.host = val; + } else if (headerName === 'content-length') { + if (request.contentLength !== null) throw new $5c4bcb45c952bd3a$require$InvalidArgumentError('duplicate content-length header'); + request.contentLength = parseInt(val, 10); + if (!Number.isFinite(request.contentLength)) throw new $5c4bcb45c952bd3a$require$InvalidArgumentError('invalid content-length header'); + } else if (request.contentType === null && headerName === 'content-type') { + request.contentType = val; + request.headers.push(key, val); + } else if (headerName === 'transfer-encoding' || headerName === 'keep-alive' || headerName === 'upgrade') throw new $5c4bcb45c952bd3a$require$InvalidArgumentError(`invalid ${headerName} header`); + else if (headerName === 'connection') { + const value = typeof val === 'string' ? val.toLowerCase() : null; + if (value !== 'close' && value !== 'keep-alive') throw new $5c4bcb45c952bd3a$require$InvalidArgumentError('invalid connection header'); + if (value === 'close') request.reset = true; + } else if (headerName === 'expect') throw new $5c4bcb45c952bd3a$require$NotSupportedError('expect header not supported'); + else request.headers.push(key, val); +} +module.exports = $5c4bcb45c952bd3a$var$Request; + +}); + +parcelRegister("ifuPO", function(module, exports) { +'use strict'; + + + +var $bFRvW = parcelRequire("bFRvW"); + +var $gTXXK = parcelRequire("gTXXK"); +var $d4918bcf2671d1f6$require$InvalidArgumentError = $gTXXK.InvalidArgumentError; +var $d4918bcf2671d1f6$require$ConnectTimeoutError = $gTXXK.ConnectTimeoutError; + +var $lI7Ok = parcelRequire("lI7Ok"); +function $d4918bcf2671d1f6$var$noop() {} +let $d4918bcf2671d1f6$var$tls // include tls conditionally since it is not always available +; +// TODO: session re-use does not wait for the first +// connection to resolve the session and might therefore +// resolve the same servername multiple times even when +// re-use is enabled. +let $d4918bcf2671d1f6$var$SessionCache; +// FIXME: remove workaround when the Node bug is fixed +// https://github.com/nodejs/node/issues/49344#issuecomment-1741776308 +if ($parcel$global.FinalizationRegistry && !(process.env.NODE_V8_COVERAGE || process.env.UNDICI_NO_FG)) $d4918bcf2671d1f6$var$SessionCache = class WeakSessionCache { + constructor(maxCachedSessions){ + this._maxCachedSessions = maxCachedSessions; + this._sessionCache = new Map(); + this._sessionRegistry = new $parcel$global.FinalizationRegistry((key)=>{ + if (this._sessionCache.size < this._maxCachedSessions) return; + const ref = this._sessionCache.get(key); + if (ref !== undefined && ref.deref() === undefined) this._sessionCache.delete(key); + }); } - // Returns response’s status message. - get statusText() { - $fcd1d539b7f7300d$require$webidl.brandCheck(this, $fcd1d539b7f7300d$var$Response); - // The statusText getter steps are to return this’s response’s status - // message. - return this[$fcd1d539b7f7300d$require$kState].statusText; + get(sessionKey) { + const ref = this._sessionCache.get(sessionKey); + return ref ? ref.deref() : null; } - // Returns response’s headers as Headers. - get headers() { - $fcd1d539b7f7300d$require$webidl.brandCheck(this, $fcd1d539b7f7300d$var$Response); - // The headers getter steps are to return this’s headers. - return this[$fcd1d539b7f7300d$require$kHeaders]; + set(sessionKey, session) { + if (this._maxCachedSessions === 0) return; + this._sessionCache.set(sessionKey, new WeakRef(session)); + this._sessionRegistry.register(session, sessionKey); } - get body() { - $fcd1d539b7f7300d$require$webidl.brandCheck(this, $fcd1d539b7f7300d$var$Response); - return this[$fcd1d539b7f7300d$require$kState].body ? this[$fcd1d539b7f7300d$require$kState].body.stream : null; +}; +else $d4918bcf2671d1f6$var$SessionCache = class SimpleSessionCache { + constructor(maxCachedSessions){ + this._maxCachedSessions = maxCachedSessions; + this._sessionCache = new Map(); } - get bodyUsed() { - $fcd1d539b7f7300d$require$webidl.brandCheck(this, $fcd1d539b7f7300d$var$Response); - return !!this[$fcd1d539b7f7300d$require$kState].body && $gv2nV.isDisturbed(this[$fcd1d539b7f7300d$require$kState].body.stream); + get(sessionKey) { + return this._sessionCache.get(sessionKey); } - // Returns a clone of response. - clone() { - $fcd1d539b7f7300d$require$webidl.brandCheck(this, $fcd1d539b7f7300d$var$Response); - // 1. If this is unusable, then throw a TypeError. - if (this.bodyUsed || this.body && this.body.locked) throw $fcd1d539b7f7300d$require$webidl.errors.exception({ - header: "Response.clone", - message: "Body has already been consumed." - }); - // 2. Let clonedResponse be the result of cloning this’s response. - const clonedResponse = $fcd1d539b7f7300d$var$cloneResponse(this[$fcd1d539b7f7300d$require$kState]); - // 3. Return the result of creating a Response object, given - // clonedResponse, this’s headers’s guard, and this’s relevant Realm. - const clonedResponseObject = new $fcd1d539b7f7300d$var$Response(); - clonedResponseObject[$fcd1d539b7f7300d$require$kState] = clonedResponse; - clonedResponseObject[$fcd1d539b7f7300d$require$kRealm] = this[$fcd1d539b7f7300d$require$kRealm]; - clonedResponseObject[$fcd1d539b7f7300d$require$kHeaders][$fcd1d539b7f7300d$require$kHeadersList] = clonedResponse.headersList; - clonedResponseObject[$fcd1d539b7f7300d$require$kHeaders][$fcd1d539b7f7300d$require$kGuard] = this[$fcd1d539b7f7300d$require$kHeaders][$fcd1d539b7f7300d$require$kGuard]; - clonedResponseObject[$fcd1d539b7f7300d$require$kHeaders][$fcd1d539b7f7300d$require$kRealm] = this[$fcd1d539b7f7300d$require$kHeaders][$fcd1d539b7f7300d$require$kRealm]; - return clonedResponseObject; - } -} -$fcd1d539b7f7300d$require$mixinBody($fcd1d539b7f7300d$var$Response); -Object.defineProperties($fcd1d539b7f7300d$var$Response.prototype, { - type: $fcd1d539b7f7300d$var$kEnumerableProperty, - url: $fcd1d539b7f7300d$var$kEnumerableProperty, - status: $fcd1d539b7f7300d$var$kEnumerableProperty, - ok: $fcd1d539b7f7300d$var$kEnumerableProperty, - redirected: $fcd1d539b7f7300d$var$kEnumerableProperty, - statusText: $fcd1d539b7f7300d$var$kEnumerableProperty, - headers: $fcd1d539b7f7300d$var$kEnumerableProperty, - clone: $fcd1d539b7f7300d$var$kEnumerableProperty, - body: $fcd1d539b7f7300d$var$kEnumerableProperty, - bodyUsed: $fcd1d539b7f7300d$var$kEnumerableProperty, - [Symbol.toStringTag]: { - value: "Response", - configurable: true + set(sessionKey, session) { + if (this._maxCachedSessions === 0) return; + if (this._sessionCache.size >= this._maxCachedSessions) { + // remove the oldest session + const { value: oldestKey } = this._sessionCache.keys().next(); + this._sessionCache.delete(oldestKey); + } + this._sessionCache.set(sessionKey, session); } -}); -Object.defineProperties($fcd1d539b7f7300d$var$Response, { - json: $fcd1d539b7f7300d$var$kEnumerableProperty, - redirect: $fcd1d539b7f7300d$var$kEnumerableProperty, - error: $fcd1d539b7f7300d$var$kEnumerableProperty -}); -// https://fetch.spec.whatwg.org/#concept-response-clone -function $fcd1d539b7f7300d$var$cloneResponse(response) { - // To clone a response response, run these steps: - // 1. If response is a filtered response, then return a new identical - // filtered response whose internal response is a clone of response’s - // internal response. - if (response.internalResponse) return $fcd1d539b7f7300d$var$filterResponse($fcd1d539b7f7300d$var$cloneResponse(response.internalResponse), response.type); - // 2. Let newResponse be a copy of response, except for its body. - const newResponse = $fcd1d539b7f7300d$var$makeResponse({ - ...response, - body: null - }); - // 3. If response’s body is non-null, then set newResponse’s body to the - // result of cloning response’s body. - if (response.body != null) newResponse.body = $fcd1d539b7f7300d$require$cloneBody(response.body); - // 4. Return newResponse. - return newResponse; -} -function $fcd1d539b7f7300d$var$makeResponse(init) { - return { - aborted: false, - rangeRequested: false, - timingAllowPassed: false, - requestIncludesCredentials: false, - type: "default", - status: 200, - timingInfo: null, - cacheState: "", - statusText: "", - ...init, - headersList: init.headersList ? new $fcd1d539b7f7300d$require$HeadersList(init.headersList) : new $fcd1d539b7f7300d$require$HeadersList(), - urlList: init.urlList ? [ - ...init.urlList - ] : [] - }; -} -function $fcd1d539b7f7300d$var$makeNetworkError(reason) { - const isError = $fcd1d539b7f7300d$require$isErrorLike(reason); - return $fcd1d539b7f7300d$var$makeResponse({ - type: "error", - status: 0, - error: isError ? reason : new Error(reason ? String(reason) : reason), - aborted: reason && reason.name === "AbortError" - }); -} -function $fcd1d539b7f7300d$var$makeFilteredResponse(response, state) { - state = { - internalResponse: response, - ...state +}; + +function $d4918bcf2671d1f6$var$buildConnector({ allowH2: allowH2, maxCachedSessions: maxCachedSessions, socketPath: socketPath, timeout: timeout, session: customSession, ...opts }) { + if (maxCachedSessions != null && (!Number.isInteger(maxCachedSessions) || maxCachedSessions < 0)) throw new $d4918bcf2671d1f6$require$InvalidArgumentError('maxCachedSessions must be a positive integer or zero'); + const options = { + path: socketPath, + ...opts }; - return new Proxy(response, { - get (target, p) { - return p in state ? state[p] : target[p]; - }, - set (target, p, value) { - $g40fK$assert(!(p in state)); - target[p] = value; - return true; + const sessionCache = new $d4918bcf2671d1f6$var$SessionCache(maxCachedSessions == null ? 100 : maxCachedSessions); + timeout = timeout == null ? 10e3 : timeout; + allowH2 = allowH2 != null ? allowH2 : false; + return function connect({ hostname: hostname, host: host, protocol: protocol, port: port, servername: servername, localAddress: localAddress, httpSocket: httpSocket }, callback) { + let socket; + if (protocol === 'https:') { + if (!$d4918bcf2671d1f6$var$tls) $d4918bcf2671d1f6$var$tls = $in2sP$nodetls; + servername = servername || options.servername || $bFRvW.getServerName(host) || null; + const sessionKey = servername || hostname; + $in2sP$nodeassert(sessionKey); + const session = customSession || sessionCache.get(sessionKey) || null; + port = port || 443; + socket = $d4918bcf2671d1f6$var$tls.connect({ + highWaterMark: 16384, + ...options, + servername: servername, + session: session, + localAddress: localAddress, + // TODO(HTTP/2): Add support for h2c + ALPNProtocols: allowH2 ? [ + 'http/1.1', + 'h2' + ] : [ + 'http/1.1' + ], + socket: httpSocket, + port: port, + host: hostname + }); + socket.on('session', function(session) { + // TODO (fix): Can a session become invalid once established? Don't think so? + sessionCache.set(sessionKey, session); + }); + } else { + $in2sP$nodeassert(!httpSocket, 'httpSocket can only be sent on TLS update'); + port = port || 80; + socket = $in2sP$nodenet.connect({ + highWaterMark: 65536, + ...options, + localAddress: localAddress, + port: port, + host: hostname + }); } - }); -} -// https://fetch.spec.whatwg.org/#concept-filtered-response -function $fcd1d539b7f7300d$var$filterResponse(response, type) { - // Set response to the following filtered response with response as its - // internal response, depending on request’s response tainting: - if (type === "basic") // A basic filtered response is a filtered response whose type is "basic" - // and header list excludes any headers in internal response’s header list - // whose name is a forbidden response-header name. - // Note: undici does not implement forbidden response-header names - return $fcd1d539b7f7300d$var$makeFilteredResponse(response, { - type: "basic", - headersList: response.headersList - }); - else if (type === "cors") // A CORS filtered response is a filtered response whose type is "cors" - // and header list excludes any headers in internal response’s header - // list whose name is not a CORS-safelisted response-header name, given - // internal response’s CORS-exposed header-name list. - // Note: undici does not implement CORS-safelisted response-header names - return $fcd1d539b7f7300d$var$makeFilteredResponse(response, { - type: "cors", - headersList: response.headersList - }); - else if (type === "opaque") // An opaque filtered response is a filtered response whose type is - // "opaque", URL list is the empty list, status is 0, status message - // is the empty byte sequence, header list is empty, and body is null. - return $fcd1d539b7f7300d$var$makeFilteredResponse(response, { - type: "opaque", - urlList: Object.freeze([]), - status: 0, - statusText: "", - body: null - }); - else if (type === "opaqueredirect") // An opaque-redirect filtered response is a filtered response whose type - // is "opaqueredirect", status is 0, status message is the empty byte - // sequence, header list is empty, and body is null. - return $fcd1d539b7f7300d$var$makeFilteredResponse(response, { - type: "opaqueredirect", - status: 0, - statusText: "", - headersList: [], - body: null - }); - else $g40fK$assert(false); + // Set TCP keep alive options on the socket here instead of in connect() for the case of assigning the socket + if (options.keepAlive == null || options.keepAlive) { + const keepAliveInitialDelay = options.keepAliveInitialDelay === undefined ? 60e3 : options.keepAliveInitialDelay; + socket.setKeepAlive(true, keepAliveInitialDelay); + } + const clearConnectTimeout = $d4918bcf2671d1f6$var$setupConnectTimeout(new WeakRef(socket), { + timeout: timeout, + hostname: hostname, + port: port + }); + socket.setNoDelay(true).once(protocol === 'https:' ? 'secureConnect' : 'connect', function() { + queueMicrotask(clearConnectTimeout); + if (callback) { + const cb = callback; + callback = null; + cb(null, this); + } + }).on('error', function(err) { + queueMicrotask(clearConnectTimeout); + if (callback) { + const cb = callback; + callback = null; + cb(err); + } + }); + return socket; + }; } -// https://fetch.spec.whatwg.org/#appropriate-network-error -function $fcd1d539b7f7300d$var$makeAppropriateNetworkError(fetchParams, err = null) { - // 1. Assert: fetchParams is canceled. - $g40fK$assert($fcd1d539b7f7300d$require$isCancelled(fetchParams)); - // 2. Return an aborted network error if fetchParams is aborted; - // otherwise return a network error. - return $fcd1d539b7f7300d$require$isAborted(fetchParams) ? $fcd1d539b7f7300d$var$makeNetworkError(Object.assign(new $fcd1d539b7f7300d$require$DOMException("The operation was aborted.", "AbortError"), { - cause: err - })) : $fcd1d539b7f7300d$var$makeNetworkError(Object.assign(new $fcd1d539b7f7300d$require$DOMException("Request was cancelled."), { - cause: err - })); +/** + * @param {WeakRef} socketWeakRef + * @param {object} opts + * @param {number} opts.timeout + * @param {string} opts.hostname + * @param {number} opts.port + * @returns {() => void} + */ const $d4918bcf2671d1f6$var$setupConnectTimeout = process.platform === 'win32' ? (socketWeakRef, opts)=>{ + if (!opts.timeout) return $d4918bcf2671d1f6$var$noop; + let s1 = null; + let s2 = null; + const fastTimer = $lI7Ok.setFastTimeout(()=>{ + // setImmediate is added to make sure that we prioritize socket error events over timeouts + s1 = setImmediate(()=>{ + // Windows needs an extra setImmediate probably due to implementation differences in the socket logic + s2 = setImmediate(()=>$d4918bcf2671d1f6$var$onConnectTimeout(socketWeakRef.deref(), opts)); + }); + }, opts.timeout); + return ()=>{ + $lI7Ok.clearFastTimeout(fastTimer); + clearImmediate(s1); + clearImmediate(s2); + }; +} : (socketWeakRef, opts)=>{ + if (!opts.timeout) return $d4918bcf2671d1f6$var$noop; + let s1 = null; + const fastTimer = $lI7Ok.setFastTimeout(()=>{ + // setImmediate is added to make sure that we prioritize socket error events over timeouts + s1 = setImmediate(()=>{ + $d4918bcf2671d1f6$var$onConnectTimeout(socketWeakRef.deref(), opts); + }); + }, opts.timeout); + return ()=>{ + $lI7Ok.clearFastTimeout(fastTimer); + clearImmediate(s1); + }; +}; +/** + * @param {net.Socket} socket + * @param {object} opts + * @param {number} opts.timeout + * @param {string} opts.hostname + * @param {number} opts.port + */ function $d4918bcf2671d1f6$var$onConnectTimeout(socket, opts) { + // The socket could be already garbage collected + if (socket == null) return; + let message = 'Connect Timeout Error'; + if (Array.isArray(socket.autoSelectFamilyAttemptedAddresses)) message += ` (attempted addresses: ${socket.autoSelectFamilyAttemptedAddresses.join(', ')},`; + else message += ` (attempted address: ${opts.hostname}:${opts.port},`; + message += ` timeout: ${opts.timeout}ms)`; + $bFRvW.destroy(socket, new $d4918bcf2671d1f6$require$ConnectTimeoutError(message)); +} +module.exports = $d4918bcf2671d1f6$var$buildConnector; + +}); +parcelRegister("lI7Ok", function(module, exports) { +'use strict'; +/** + * This module offers an optimized timer implementation designed for scenarios + * where high precision is not critical. + * + * The timer achieves faster performance by using a low-resolution approach, + * with an accuracy target of within 500ms. This makes it particularly useful + * for timers with delays of 1 second or more, where exact timing is less + * crucial. + * + * It's important to note that Node.js timers are inherently imprecise, as + * delays can occur due to the event loop being blocked by other operations. + * Consequently, timers may trigger later than their scheduled time. + */ /** + * The fastNow variable contains the internal fast timer clock value. + * + * @type {number} + */ let $fce3c41c52930edf$var$fastNow = 0; +/** + * RESOLUTION_MS represents the target resolution time in milliseconds. + * + * @type {number} + * @default 1000 + */ const $fce3c41c52930edf$var$RESOLUTION_MS = 1e3; +/** + * TICK_MS defines the desired interval in milliseconds between each tick. + * The target value is set to half the resolution time, minus 1 ms, to account + * for potential event loop overhead. + * + * @type {number} + * @default 499 + */ const $fce3c41c52930edf$var$TICK_MS = ($fce3c41c52930edf$var$RESOLUTION_MS >> 1) - 1; +/** + * fastNowTimeout is a Node.js timer used to manage and process + * the FastTimers stored in the `fastTimers` array. + * + * @type {NodeJS.Timeout} + */ let $fce3c41c52930edf$var$fastNowTimeout; +/** + * The kFastTimer symbol is used to identify FastTimer instances. + * + * @type {Symbol} + */ const $fce3c41c52930edf$var$kFastTimer = Symbol('kFastTimer'); +/** + * The fastTimers array contains all active FastTimers. + * + * @type {FastTimer[]} + */ const $fce3c41c52930edf$var$fastTimers = []; +/** + * These constants represent the various states of a FastTimer. + */ /** + * The `NOT_IN_LIST` constant indicates that the FastTimer is not included + * in the `fastTimers` array. Timers with this status will not be processed + * during the next tick by the `onTick` function. + * + * A FastTimer can be re-added to the `fastTimers` array by invoking the + * `refresh` method on the FastTimer instance. + * + * @type {-2} + */ const $fce3c41c52930edf$var$NOT_IN_LIST = -2; +/** + * The `TO_BE_CLEARED` constant indicates that the FastTimer is scheduled + * for removal from the `fastTimers` array. A FastTimer in this state will + * be removed in the next tick by the `onTick` function and will no longer + * be processed. + * + * This status is also set when the `clear` method is called on the FastTimer instance. + * + * @type {-1} + */ const $fce3c41c52930edf$var$TO_BE_CLEARED = -1; +/** + * The `PENDING` constant signifies that the FastTimer is awaiting processing + * in the next tick by the `onTick` function. Timers with this status will have + * their `_idleStart` value set and their status updated to `ACTIVE` in the next tick. + * + * @type {0} + */ const $fce3c41c52930edf$var$PENDING = 0; +/** + * The `ACTIVE` constant indicates that the FastTimer is active and waiting + * for its timer to expire. During the next tick, the `onTick` function will + * check if the timer has expired, and if so, it will execute the associated callback. + * + * @type {1} + */ const $fce3c41c52930edf$var$ACTIVE = 1; +/** + * The onTick function processes the fastTimers array. + * + * @returns {void} + */ function $fce3c41c52930edf$var$onTick() { + /** + * Increment the fastNow value by the TICK_MS value, despite the actual time + * that has passed since the last tick. This approach ensures independence + * from the system clock and delays caused by a blocked event loop. + * + * @type {number} + */ $fce3c41c52930edf$var$fastNow += $fce3c41c52930edf$var$TICK_MS; + /** + * The `idx` variable is used to iterate over the `fastTimers` array. + * Expired timers are removed by replacing them with the last element in the array. + * Consequently, `idx` is only incremented when the current element is not removed. + * + * @type {number} + */ let idx = 0; + /** + * The len variable will contain the length of the fastTimers array + * and will be decremented when a FastTimer should be removed from the + * fastTimers array. + * + * @type {number} + */ let len = $fce3c41c52930edf$var$fastTimers.length; + while(idx < len){ + /** + * @type {FastTimer} + */ const timer = $fce3c41c52930edf$var$fastTimers[idx]; + // If the timer is in the ACTIVE state and the timer has expired, it will + // be processed in the next tick. + if (timer._state === $fce3c41c52930edf$var$PENDING) { + // Set the _idleStart value to the fastNow value minus the TICK_MS value + // to account for the time the timer was in the PENDING state. + timer._idleStart = $fce3c41c52930edf$var$fastNow - $fce3c41c52930edf$var$TICK_MS; + timer._state = $fce3c41c52930edf$var$ACTIVE; + } else if (timer._state === $fce3c41c52930edf$var$ACTIVE && $fce3c41c52930edf$var$fastNow >= timer._idleStart + timer._idleTimeout) { + timer._state = $fce3c41c52930edf$var$TO_BE_CLEARED; + timer._idleStart = -1; + timer._onTimeout(timer._timerArg); + } + if (timer._state === $fce3c41c52930edf$var$TO_BE_CLEARED) { + timer._state = $fce3c41c52930edf$var$NOT_IN_LIST; + // Move the last element to the current index and decrement len if it is + // not the only element in the array. + if (--len !== 0) $fce3c41c52930edf$var$fastTimers[idx] = $fce3c41c52930edf$var$fastTimers[len]; + } else ++idx; + } + // Set the length of the fastTimers array to the new length and thus + // removing the excess FastTimers elements from the array. + $fce3c41c52930edf$var$fastTimers.length = len; + // If there are still active FastTimers in the array, refresh the Timer. + // If there are no active FastTimers, the timer will be refreshed again + // when a new FastTimer is instantiated. + if ($fce3c41c52930edf$var$fastTimers.length !== 0) $fce3c41c52930edf$var$refreshTimeout(); +} +function $fce3c41c52930edf$var$refreshTimeout() { + // If the fastNowTimeout is already set, refresh it. + if ($fce3c41c52930edf$var$fastNowTimeout) $fce3c41c52930edf$var$fastNowTimeout.refresh(); + else { + clearTimeout($fce3c41c52930edf$var$fastNowTimeout); + $fce3c41c52930edf$var$fastNowTimeout = setTimeout($fce3c41c52930edf$var$onTick, $fce3c41c52930edf$var$TICK_MS); + // If the Timer has an unref method, call it to allow the process to exit if + // there are no other active handles. + if ($fce3c41c52930edf$var$fastNowTimeout.unref) $fce3c41c52930edf$var$fastNowTimeout.unref(); + } } -// https://whatpr.org/fetch/1392.html#initialize-a-response -function $fcd1d539b7f7300d$var$initializeResponse(response, init, body) { - // 1. If init["status"] is not in the range 200 to 599, inclusive, then - // throw a RangeError. - 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.'); - // 2. If init["statusText"] does not match the reason-phrase token production, - // then throw a TypeError. - if ("statusText" in init && init.statusText != null) { - // See, https://datatracker.ietf.org/doc/html/rfc7230#section-3.1.2: - // reason-phrase = *( HTAB / SP / VCHAR / obs-text ) - if (!$fcd1d539b7f7300d$require$isValidReasonPhrase(String(init.statusText))) throw new TypeError("Invalid statusText"); +/** + * The `FastTimer` class is a data structure designed to store and manage + * timer information. + */ class $fce3c41c52930edf$var$FastTimer { + [$fce3c41c52930edf$var$kFastTimer] = true; + /** + * The state of the timer, which can be one of the following: + * - NOT_IN_LIST (-2) + * - TO_BE_CLEARED (-1) + * - PENDING (0) + * - ACTIVE (1) + * + * @type {-2|-1|0|1} + * @private + */ _state = $fce3c41c52930edf$var$NOT_IN_LIST; + /** + * The number of milliseconds to wait before calling the callback. + * + * @type {number} + * @private + */ _idleTimeout = -1; + /** + * The time in milliseconds when the timer was started. This value is used to + * calculate when the timer should expire. + * + * @type {number} + * @default -1 + * @private + */ _idleStart = -1; + /** + * The function to be executed when the timer expires. + * @type {Function} + * @private + */ _onTimeout; + /** + * The argument to be passed to the callback when the timer expires. + * + * @type {*} + * @private + */ _timerArg; + /** + * @constructor + * @param {Function} callback A function to be executed after the timer + * expires. + * @param {number} delay The time, in milliseconds that the timer should wait + * before the specified function or code is executed. + * @param {*} arg + */ constructor(callback, delay, arg){ + this._onTimeout = callback; + this._idleTimeout = delay; + this._timerArg = arg; + this.refresh(); } - // 3. Set response’s response’s status to init["status"]. - if ("status" in init && init.status != null) response[$fcd1d539b7f7300d$require$kState].status = init.status; - // 4. Set response’s response’s status message to init["statusText"]. - if ("statusText" in init && init.statusText != null) response[$fcd1d539b7f7300d$require$kState].statusText = init.statusText; - // 5. If init["headers"] exists, then fill response’s headers with init["headers"]. - if ("headers" in init && init.headers != null) $fcd1d539b7f7300d$require$fill(response[$fcd1d539b7f7300d$require$kHeaders], init.headers); - // 6. If body was given, then: - if (body) { - // 1. If response's status is a null body status, then throw a TypeError. - if ($fcd1d539b7f7300d$require$nullBodyStatus.includes(response.status)) throw $fcd1d539b7f7300d$require$webidl.errors.exception({ - header: "Response constructor", - message: "Invalid response status code " + response.status - }); - // 2. Set response's body to body's body. - response[$fcd1d539b7f7300d$require$kState].body = body.body; - // 3. If body's type is non-null and response's header list does not contain - // `Content-Type`, then append (`Content-Type`, body's type) to response's header list. - if (body.type != null && !response[$fcd1d539b7f7300d$require$kState].headersList.contains("Content-Type")) response[$fcd1d539b7f7300d$require$kState].headersList.append("content-type", body.type); + /** + * Sets the timer's start time to the current time, and reschedules the timer + * to call its callback at the previously specified duration adjusted to the + * current time. + * Using this on a timer that has already called its callback will reactivate + * the timer. + * + * @returns {void} + */ refresh() { + // In the special case that the timer is not in the list of active timers, + // add it back to the array to be processed in the next tick by the onTick + // function. + if (this._state === $fce3c41c52930edf$var$NOT_IN_LIST) $fce3c41c52930edf$var$fastTimers.push(this); + // If the timer is the only active timer, refresh the fastNowTimeout for + // better resolution. + if (!$fce3c41c52930edf$var$fastNowTimeout || $fce3c41c52930edf$var$fastTimers.length === 1) $fce3c41c52930edf$var$refreshTimeout(); + // Setting the state to PENDING will cause the timer to be reset in the + // next tick by the onTick function. + this._state = $fce3c41c52930edf$var$PENDING; + } + /** + * The `clear` method cancels the timer, preventing it from executing. + * + * @returns {void} + * @private + */ clear() { + // Set the state to TO_BE_CLEARED to mark the timer for removal in the next + // tick by the onTick function. + this._state = $fce3c41c52930edf$var$TO_BE_CLEARED; + // Reset the _idleStart value to -1 to indicate that the timer is no longer + // active. + this._idleStart = -1; } } -$fcd1d539b7f7300d$require$webidl.converters.ReadableStream = $fcd1d539b7f7300d$require$webidl.interfaceConverter($fcd1d539b7f7300d$var$ReadableStream); -$fcd1d539b7f7300d$require$webidl.converters.FormData = $fcd1d539b7f7300d$require$webidl.interfaceConverter($fcd1d539b7f7300d$require$FormData); -$fcd1d539b7f7300d$require$webidl.converters.URLSearchParams = $fcd1d539b7f7300d$require$webidl.interfaceConverter(URLSearchParams); -// https://fetch.spec.whatwg.org/#typedefdef-xmlhttprequestbodyinit -$fcd1d539b7f7300d$require$webidl.converters.XMLHttpRequestBodyInit = function(V) { - if (typeof V === "string") return $fcd1d539b7f7300d$require$webidl.converters.USVString(V); - if ($fcd1d539b7f7300d$require$isBlobLike(V)) return $fcd1d539b7f7300d$require$webidl.converters.Blob(V, { - strict: false - }); - if ($fcd1d539b7f7300d$require$types.isArrayBuffer(V) || $fcd1d539b7f7300d$require$types.isTypedArray(V) || $fcd1d539b7f7300d$require$types.isDataView(V)) return $fcd1d539b7f7300d$require$webidl.converters.BufferSource(V); - if ($gv2nV.isFormDataLike(V)) return $fcd1d539b7f7300d$require$webidl.converters.FormData(V, { - strict: false - }); - if (V instanceof URLSearchParams) return $fcd1d539b7f7300d$require$webidl.converters.URLSearchParams(V); - return $fcd1d539b7f7300d$require$webidl.converters.DOMString(V); -}; -// https://fetch.spec.whatwg.org/#bodyinit -$fcd1d539b7f7300d$require$webidl.converters.BodyInit = function(V) { - if (V instanceof $fcd1d539b7f7300d$var$ReadableStream) return $fcd1d539b7f7300d$require$webidl.converters.ReadableStream(V); - // Note: the spec doesn't include async iterables, - // this is an undici extension. - if (V?.[Symbol.asyncIterator]) return V; - return $fcd1d539b7f7300d$require$webidl.converters.XMLHttpRequestBodyInit(V); -}; -$fcd1d539b7f7300d$require$webidl.converters.ResponseInit = $fcd1d539b7f7300d$require$webidl.dictionaryConverter([ - { - key: "status", - converter: $fcd1d539b7f7300d$require$webidl.converters["unsigned short"], - defaultValue: 200 +/** + * This module exports a setTimeout and clearTimeout function that can be + * used as a drop-in replacement for the native functions. + */ module.exports = { + /** + * The setTimeout() method sets a timer which executes a function once the + * timer expires. + * @param {Function} callback A function to be executed after the timer + * expires. + * @param {number} delay The time, in milliseconds that the timer should + * wait before the specified function or code is executed. + * @param {*} [arg] An optional argument to be passed to the callback function + * when the timer expires. + * @returns {NodeJS.Timeout|FastTimer} + */ setTimeout (callback, delay, arg) { + // If the delay is less than or equal to the RESOLUTION_MS value return a + // native Node.js Timer instance. + return delay <= $fce3c41c52930edf$var$RESOLUTION_MS ? setTimeout(callback, delay, arg) : new $fce3c41c52930edf$var$FastTimer(callback, delay, arg); }, - { - key: "statusText", - converter: $fcd1d539b7f7300d$require$webidl.converters.ByteString, - defaultValue: "" + /** + * The clearTimeout method cancels an instantiated Timer previously created + * by calling setTimeout. + * + * @param {NodeJS.Timeout|FastTimer} timeout + */ clearTimeout (timeout) { + // If the timeout is a FastTimer, call its own clear method. + if (timeout[$fce3c41c52930edf$var$kFastTimer]) /** + * @type {FastTimer} + */ timeout.clear(); + else clearTimeout(timeout); }, - { - key: "headers", - converter: $fcd1d539b7f7300d$require$webidl.converters.HeadersInit - } -]); -module.exports = { - makeNetworkError: $fcd1d539b7f7300d$var$makeNetworkError, - makeResponse: $fcd1d539b7f7300d$var$makeResponse, - makeAppropriateNetworkError: $fcd1d539b7f7300d$var$makeAppropriateNetworkError, - filterResponse: $fcd1d539b7f7300d$var$filterResponse, - Response: $fcd1d539b7f7300d$var$Response, - cloneResponse: $fcd1d539b7f7300d$var$cloneResponse + /** + * The setFastTimeout() method sets a fastTimer which executes a function once + * the timer expires. + * @param {Function} callback A function to be executed after the timer + * expires. + * @param {number} delay The time, in milliseconds that the timer should + * wait before the specified function or code is executed. + * @param {*} [arg] An optional argument to be passed to the callback function + * when the timer expires. + * @returns {FastTimer} + */ setFastTimeout (callback, delay, arg) { + return new $fce3c41c52930edf$var$FastTimer(callback, delay, arg); + }, + /** + * The clearTimeout method cancels an instantiated FastTimer previously + * created by calling setFastTimeout. + * + * @param {FastTimer} timeout + */ clearFastTimeout (timeout) { + timeout.clear(); + }, + /** + * The now method returns the value of the internal fast timer clock. + * + * @returns {number} + */ now () { + return $fce3c41c52930edf$var$fastNow; + }, + /** + * Trigger the onTick function to process the fastTimers array. + * Exported for testing purposes only. + * Marking as deprecated to discourage any use outside of testing. + * @deprecated + * @param {number} [delay=0] The delay in milliseconds to add to the now value. + */ tick (delay = 0) { + $fce3c41c52930edf$var$fastNow += delay - $fce3c41c52930edf$var$RESOLUTION_MS + 1; + $fce3c41c52930edf$var$onTick(); + $fce3c41c52930edf$var$onTick(); + }, + /** + * Reset FastTimers. + * Exported for testing purposes only. + * Marking as deprecated to discourage any use outside of testing. + * @deprecated + */ reset () { + $fce3c41c52930edf$var$fastNow = 0; + $fce3c41c52930edf$var$fastTimers.length = 0; + clearTimeout($fce3c41c52930edf$var$fastNowTimeout); + $fce3c41c52930edf$var$fastNowTimeout = null; + }, + kFastTimer: /** + * Exporting for testing purposes only. + * Marking as deprecated to discourage any use outside of testing. + * @deprecated + */ $fce3c41c52930edf$var$kFastTimer }; }); -parcelRegister("gXdj5", function(module, exports) { -// https://github.com/Ethan-Arrowood/undici-fetch -"use strict"; - -var $hHZvh = parcelRequire("hHZvh"); -var $c57c7a7ef88344d8$require$kHeadersList = $hHZvh.kHeadersList; -var $c57c7a7ef88344d8$require$kConstruct = $hHZvh.kConstruct; - -var $74L4J = parcelRequire("74L4J"); -var $c57c7a7ef88344d8$require$kGuard = $74L4J.kGuard; - -var $gv2nV = parcelRequire("gv2nV"); -var $c57c7a7ef88344d8$require$kEnumerableProperty = $gv2nV.kEnumerableProperty; -var $4EkpM = parcelRequire("4EkpM"); -var $c57c7a7ef88344d8$require$makeIterator = $4EkpM.makeIterator; -var $c57c7a7ef88344d8$require$isValidHeaderName = $4EkpM.isValidHeaderName; -var $c57c7a7ef88344d8$require$isValidHeaderValue = $4EkpM.isValidHeaderValue; -var $jk0LQ = parcelRequire("jk0LQ"); -var $c57c7a7ef88344d8$require$webidl = $jk0LQ.webidl; - -const $c57c7a7ef88344d8$var$kHeadersMap = Symbol("headers map"); -const $c57c7a7ef88344d8$var$kHeadersSortedMap = Symbol("headers map sorted"); -/** - * @param {number} code - */ function $c57c7a7ef88344d8$var$isHTTPWhiteSpaceCharCode(code) { - return code === 0x00a || code === 0x00d || code === 0x009 || code === 0x020; -} -/** - * @see https://fetch.spec.whatwg.org/#concept-header-value-normalize - * @param {string} potentialValue - */ function $c57c7a7ef88344d8$var$headerValueNormalize(potentialValue) { - // To normalize a byte sequence potentialValue, remove - // any leading and trailing HTTP whitespace bytes from - // potentialValue. - let i = 0; - let j = potentialValue.length; - while(j > i && $c57c7a7ef88344d8$var$isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(j - 1)))--j; - while(j > i && $c57c7a7ef88344d8$var$isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(i)))++i; - return i === 0 && j === potentialValue.length ? potentialValue : potentialValue.substring(i, j); -} -function $c57c7a7ef88344d8$var$fill(headers, object) { - // To fill a Headers object headers with a given object object, run these steps: - // 1. If object is a sequence, then for each header in object: - // Note: webidl conversion to array has already been done. - if (Array.isArray(object)) for(let i = 0; i < object.length; ++i){ - const header = object[i]; - // 1. If header does not contain exactly two items, then throw a TypeError. - if (header.length !== 2) throw $c57c7a7ef88344d8$require$webidl.errors.exception({ - header: "Headers constructor", - message: `expected name/value pair to be length 2, found ${header.length}.` - }); - // 2. Append (header’s first item, header’s second item) to headers. - $c57c7a7ef88344d8$var$appendHeader(headers, header[0], header[1]); +parcelRegister("cnBuN", function(module, exports) { +'use strict'; + + +var $bFRvW = parcelRequire("bFRvW"); + +var $l6jyj = parcelRequire("l6jyj"); +var $9034b7dfe607ccd7$require$channels = $l6jyj.channels; + +var $lI7Ok = parcelRequire("lI7Ok"); + +var $gTXXK = parcelRequire("gTXXK"); +var $9034b7dfe607ccd7$require$RequestContentLengthMismatchError = $gTXXK.RequestContentLengthMismatchError; +var $9034b7dfe607ccd7$require$ResponseContentLengthMismatchError = $gTXXK.ResponseContentLengthMismatchError; +var $9034b7dfe607ccd7$require$RequestAbortedError = $gTXXK.RequestAbortedError; +var $9034b7dfe607ccd7$require$InvalidArgumentError = $gTXXK.InvalidArgumentError; +var $9034b7dfe607ccd7$require$HeadersTimeoutError = $gTXXK.HeadersTimeoutError; +var $9034b7dfe607ccd7$require$HeadersOverflowError = $gTXXK.HeadersOverflowError; +var $9034b7dfe607ccd7$require$SocketError = $gTXXK.SocketError; +var $9034b7dfe607ccd7$require$InformationalError = $gTXXK.InformationalError; +var $9034b7dfe607ccd7$require$BodyTimeoutError = $gTXXK.BodyTimeoutError; +var $9034b7dfe607ccd7$require$HTTPParserError = $gTXXK.HTTPParserError; +var $9034b7dfe607ccd7$require$ResponseExceededMaxSizeError = $gTXXK.ResponseExceededMaxSizeError; + +var $gNVEc = parcelRequire("gNVEc"); +var $9034b7dfe607ccd7$require$kUrl = $gNVEc.kUrl; +var $9034b7dfe607ccd7$require$kReset = $gNVEc.kReset; +var $9034b7dfe607ccd7$require$kClient = $gNVEc.kClient; +var $9034b7dfe607ccd7$require$kParser = $gNVEc.kParser; +var $9034b7dfe607ccd7$require$kBlocking = $gNVEc.kBlocking; +var $9034b7dfe607ccd7$require$kRunning = $gNVEc.kRunning; +var $9034b7dfe607ccd7$require$kPending = $gNVEc.kPending; +var $9034b7dfe607ccd7$require$kSize = $gNVEc.kSize; +var $9034b7dfe607ccd7$require$kWriting = $gNVEc.kWriting; +var $9034b7dfe607ccd7$require$kQueue = $gNVEc.kQueue; +var $9034b7dfe607ccd7$require$kNoRef = $gNVEc.kNoRef; +var $9034b7dfe607ccd7$require$kKeepAliveDefaultTimeout = $gNVEc.kKeepAliveDefaultTimeout; +var $9034b7dfe607ccd7$require$kHostHeader = $gNVEc.kHostHeader; +var $9034b7dfe607ccd7$require$kPendingIdx = $gNVEc.kPendingIdx; +var $9034b7dfe607ccd7$require$kRunningIdx = $gNVEc.kRunningIdx; +var $9034b7dfe607ccd7$require$kError = $gNVEc.kError; +var $9034b7dfe607ccd7$require$kPipelining = $gNVEc.kPipelining; +var $9034b7dfe607ccd7$require$kSocket = $gNVEc.kSocket; +var $9034b7dfe607ccd7$require$kKeepAliveTimeoutValue = $gNVEc.kKeepAliveTimeoutValue; +var $9034b7dfe607ccd7$require$kMaxHeadersSize = $gNVEc.kMaxHeadersSize; +var $9034b7dfe607ccd7$require$kKeepAliveMaxTimeout = $gNVEc.kKeepAliveMaxTimeout; +var $9034b7dfe607ccd7$require$kKeepAliveTimeoutThreshold = $gNVEc.kKeepAliveTimeoutThreshold; +var $9034b7dfe607ccd7$require$kHeadersTimeout = $gNVEc.kHeadersTimeout; +var $9034b7dfe607ccd7$require$kBodyTimeout = $gNVEc.kBodyTimeout; +var $9034b7dfe607ccd7$require$kStrictContentLength = $gNVEc.kStrictContentLength; +var $9034b7dfe607ccd7$require$kMaxRequests = $gNVEc.kMaxRequests; +var $9034b7dfe607ccd7$require$kCounter = $gNVEc.kCounter; +var $9034b7dfe607ccd7$require$kMaxResponseSize = $gNVEc.kMaxResponseSize; +var $9034b7dfe607ccd7$require$kOnError = $gNVEc.kOnError; +var $9034b7dfe607ccd7$require$kResume = $gNVEc.kResume; +var $9034b7dfe607ccd7$require$kHTTPContext = $gNVEc.kHTTPContext; + +var $edeaF = parcelRequire("edeaF"); +const $9034b7dfe607ccd7$var$EMPTY_BUF = Buffer.alloc(0); +const $9034b7dfe607ccd7$var$FastBuffer = Buffer[Symbol.species]; +const $9034b7dfe607ccd7$var$addListener = $bFRvW.addListener; +const $9034b7dfe607ccd7$var$removeAllListeners = $bFRvW.removeAllListeners; +const $9034b7dfe607ccd7$var$kIdleSocketValidation = Symbol('kIdleSocketValidation'); +const $9034b7dfe607ccd7$var$kIdleSocketValidationTimeout = Symbol('kIdleSocketValidationTimeout'); +const $9034b7dfe607ccd7$var$kSocketUsed = Symbol('kSocketUsed'); +let $9034b7dfe607ccd7$var$extractBody; + + + +async function $9034b7dfe607ccd7$var$lazyllhttp() { + const llhttpWasmData = process.env.JEST_WORKER_ID ? (parcelRequire("1o60o")) : undefined; + let mod; + try { + mod = await WebAssembly.compile((parcelRequire("fTYUf"))); + } catch (e) { + /* istanbul ignore next */ // We could check if the error was caused by the simd option not + // being enabled, but the occurring of this other error + // * https://github.com/emscripten-core/emscripten/issues/11495 + // got me to remove that check to avoid breaking Node 12. + mod = await WebAssembly.compile(llhttpWasmData || (parcelRequire("1o60o"))); } - else if (typeof object === "object" && object !== null) { - // Note: null should throw - // 2. Otherwise, object is a record, then for each key → value in object, - // append (key, value) to headers - const keys = Object.keys(object); - for(let i = 0; i < keys.length; ++i)$c57c7a7ef88344d8$var$appendHeader(headers, keys[i], object[keys[i]]); - } else throw $c57c7a7ef88344d8$require$webidl.errors.conversionFailed({ - prefix: "Headers constructor", - argument: "Argument 1", - types: [ - "sequence>", - "record" - ] - }); -} -/** - * @see https://fetch.spec.whatwg.org/#concept-headers-append - */ function $c57c7a7ef88344d8$var$appendHeader(headers, name, value) { - // 1. Normalize value. - value = $c57c7a7ef88344d8$var$headerValueNormalize(value); - // 2. If name is not a header name or value is not a - // header value, then throw a TypeError. - if (!$c57c7a7ef88344d8$require$isValidHeaderName(name)) throw $c57c7a7ef88344d8$require$webidl.errors.invalidArgument({ - prefix: "Headers.append", - value: name, - type: "header name" - }); - else if (!$c57c7a7ef88344d8$require$isValidHeaderValue(value)) throw $c57c7a7ef88344d8$require$webidl.errors.invalidArgument({ - prefix: "Headers.append", - value: value, - type: "header value" + return await WebAssembly.instantiate(mod, { + env: { + /* eslint-disable camelcase */ wasm_on_url: (p, at, len)=>{ + /* istanbul ignore next */ return 0; + }, + wasm_on_status: (p, at, len)=>{ + $in2sP$nodeassert($9034b7dfe607ccd7$var$currentParser.ptr === p); + const start = at - $9034b7dfe607ccd7$var$currentBufferPtr + $9034b7dfe607ccd7$var$currentBufferRef.byteOffset; + return $9034b7dfe607ccd7$var$currentParser.onStatus(new $9034b7dfe607ccd7$var$FastBuffer($9034b7dfe607ccd7$var$currentBufferRef.buffer, start, len)) || 0; + }, + wasm_on_message_begin: (p)=>{ + $in2sP$nodeassert($9034b7dfe607ccd7$var$currentParser.ptr === p); + return $9034b7dfe607ccd7$var$currentParser.onMessageBegin() || 0; + }, + wasm_on_header_field: (p, at, len)=>{ + $in2sP$nodeassert($9034b7dfe607ccd7$var$currentParser.ptr === p); + const start = at - $9034b7dfe607ccd7$var$currentBufferPtr + $9034b7dfe607ccd7$var$currentBufferRef.byteOffset; + return $9034b7dfe607ccd7$var$currentParser.onHeaderField(new $9034b7dfe607ccd7$var$FastBuffer($9034b7dfe607ccd7$var$currentBufferRef.buffer, start, len)) || 0; + }, + wasm_on_header_value: (p, at, len)=>{ + $in2sP$nodeassert($9034b7dfe607ccd7$var$currentParser.ptr === p); + const start = at - $9034b7dfe607ccd7$var$currentBufferPtr + $9034b7dfe607ccd7$var$currentBufferRef.byteOffset; + return $9034b7dfe607ccd7$var$currentParser.onHeaderValue(new $9034b7dfe607ccd7$var$FastBuffer($9034b7dfe607ccd7$var$currentBufferRef.buffer, start, len)) || 0; + }, + wasm_on_headers_complete: (p, statusCode, upgrade, shouldKeepAlive)=>{ + $in2sP$nodeassert($9034b7dfe607ccd7$var$currentParser.ptr === p); + return $9034b7dfe607ccd7$var$currentParser.onHeadersComplete(statusCode, Boolean(upgrade), Boolean(shouldKeepAlive)) || 0; + }, + wasm_on_body: (p, at, len)=>{ + $in2sP$nodeassert($9034b7dfe607ccd7$var$currentParser.ptr === p); + const start = at - $9034b7dfe607ccd7$var$currentBufferPtr + $9034b7dfe607ccd7$var$currentBufferRef.byteOffset; + return $9034b7dfe607ccd7$var$currentParser.onBody(new $9034b7dfe607ccd7$var$FastBuffer($9034b7dfe607ccd7$var$currentBufferRef.buffer, start, len)) || 0; + }, + wasm_on_message_complete: (p)=>{ + $in2sP$nodeassert($9034b7dfe607ccd7$var$currentParser.ptr === p); + return $9034b7dfe607ccd7$var$currentParser.onMessageComplete() || 0; + } + } }); - // 3. If headers’s guard is "immutable", then throw a TypeError. - // 4. Otherwise, if headers’s guard is "request" and name is a - // forbidden header name, return. - // Note: undici does not implement forbidden header names - if (headers[$c57c7a7ef88344d8$require$kGuard] === "immutable") throw new TypeError("immutable"); - else headers[$c57c7a7ef88344d8$require$kGuard]; - // 6. Otherwise, if headers’s guard is "response" and name is a - // forbidden response-header name, return. - // 7. Append (name, value) to headers’s header list. - return headers[$c57c7a7ef88344d8$require$kHeadersList].append(name, value); -// 8. If headers’s guard is "request-no-cors", then remove -// privileged no-CORS request headers from headers } -class $c57c7a7ef88344d8$var$HeadersList { - /** @type {[string, string][]|null} */ cookies = null; - constructor(init){ - if (init instanceof $c57c7a7ef88344d8$var$HeadersList) { - this[$c57c7a7ef88344d8$var$kHeadersMap] = new Map(init[$c57c7a7ef88344d8$var$kHeadersMap]); - this[$c57c7a7ef88344d8$var$kHeadersSortedMap] = init[$c57c7a7ef88344d8$var$kHeadersSortedMap]; - this.cookies = init.cookies === null ? null : [ - ...init.cookies - ]; - } else { - this[$c57c7a7ef88344d8$var$kHeadersMap] = new Map(init); - this[$c57c7a7ef88344d8$var$kHeadersSortedMap] = null; +let $9034b7dfe607ccd7$var$llhttpInstance = null; +let $9034b7dfe607ccd7$var$llhttpPromise = $9034b7dfe607ccd7$var$lazyllhttp(); +$9034b7dfe607ccd7$var$llhttpPromise.catch(); +let $9034b7dfe607ccd7$var$currentParser = null; +let $9034b7dfe607ccd7$var$currentBufferRef = null; +let $9034b7dfe607ccd7$var$currentBufferSize = 0; +let $9034b7dfe607ccd7$var$currentBufferPtr = null; +const $9034b7dfe607ccd7$var$USE_NATIVE_TIMER = 0; +const $9034b7dfe607ccd7$var$USE_FAST_TIMER = 1; +// Use fast timers for headers and body to take eventual event loop +// latency into account. +const $9034b7dfe607ccd7$var$TIMEOUT_HEADERS = 2 | $9034b7dfe607ccd7$var$USE_FAST_TIMER; +const $9034b7dfe607ccd7$var$TIMEOUT_BODY = 4 | $9034b7dfe607ccd7$var$USE_FAST_TIMER; +// Use native timers to ignore event loop latency for keep-alive +// handling. +const $9034b7dfe607ccd7$var$TIMEOUT_KEEP_ALIVE = 8 | $9034b7dfe607ccd7$var$USE_NATIVE_TIMER; +class $9034b7dfe607ccd7$var$Parser { + constructor(client, socket, { exports: exports }){ + $in2sP$nodeassert(Number.isFinite(client[$9034b7dfe607ccd7$require$kMaxHeadersSize]) && client[$9034b7dfe607ccd7$require$kMaxHeadersSize] > 0); + this.llhttp = exports; + this.ptr = this.llhttp.llhttp_alloc($edeaF.TYPE.RESPONSE); + this.client = client; + this.socket = socket; + this.timeout = null; + this.timeoutValue = null; + this.timeoutType = null; + this.statusCode = null; + this.statusText = ''; + this.upgrade = false; + this.headers = []; + this.headersSize = 0; + this.headersMaxSize = client[$9034b7dfe607ccd7$require$kMaxHeadersSize]; + this.shouldKeepAlive = false; + this.paused = false; + this.resume = this.resume.bind(this); + this.bytesRead = 0; + this.keepAlive = ''; + this.contentLength = ''; + this.connection = ''; + this.maxResponseSize = client[$9034b7dfe607ccd7$require$kMaxResponseSize]; + } + setTimeout(delay, type) { + // If the existing timer and the new timer are of different timer type + // (fast or native) or have different delay, we need to clear the existing + // timer and set a new one. + if (delay !== this.timeoutValue || type & $9034b7dfe607ccd7$var$USE_FAST_TIMER ^ this.timeoutType & $9034b7dfe607ccd7$var$USE_FAST_TIMER) { + // If a timeout is already set, clear it with clearTimeout of the fast + // timer implementation, as it can clear fast and native timers. + if (this.timeout) { + $lI7Ok.clearTimeout(this.timeout); + this.timeout = null; + } + if (delay) { + if (type & $9034b7dfe607ccd7$var$USE_FAST_TIMER) this.timeout = $lI7Ok.setFastTimeout($9034b7dfe607ccd7$var$onParserTimeout, delay, new WeakRef(this)); + else { + this.timeout = setTimeout($9034b7dfe607ccd7$var$onParserTimeout, delay, new WeakRef(this)); + this.timeout.unref(); + } + } + this.timeoutValue = delay; + } else if (this.timeout) // istanbul ignore else: only for jest + { + if (this.timeout.refresh) this.timeout.refresh(); } + this.timeoutType = type; } - // https://fetch.spec.whatwg.org/#header-list-contains - contains(name) { - // A header list list contains a header name name if list - // contains a header whose name is a byte-case-insensitive - // match for name. - name = name.toLowerCase(); - return this[$c57c7a7ef88344d8$var$kHeadersMap].has(name); + resume() { + if (this.socket.destroyed || !this.paused) return; + $in2sP$nodeassert(this.ptr != null); + $in2sP$nodeassert($9034b7dfe607ccd7$var$currentParser == null); + this.llhttp.llhttp_resume(this.ptr); + $in2sP$nodeassert(this.timeoutType === $9034b7dfe607ccd7$var$TIMEOUT_BODY); + if (this.timeout) // istanbul ignore else: only for jest + { + if (this.timeout.refresh) this.timeout.refresh(); + } + this.paused = false; + this.execute(this.socket.read() || $9034b7dfe607ccd7$var$EMPTY_BUF) // Flush parser. + ; + this.readMore(); } - clear() { - this[$c57c7a7ef88344d8$var$kHeadersMap].clear(); - this[$c57c7a7ef88344d8$var$kHeadersSortedMap] = null; - this.cookies = null; + readMore() { + while(!this.paused && this.ptr){ + const chunk = this.socket.read(); + if (chunk === null) break; + this.execute(chunk); + } } - // https://fetch.spec.whatwg.org/#concept-header-list-append - append(name, value) { - this[$c57c7a7ef88344d8$var$kHeadersSortedMap] = null; - // 1. If list contains name, then set name to the first such - // header’s name. - const lowercaseName = name.toLowerCase(); - const exists = this[$c57c7a7ef88344d8$var$kHeadersMap].get(lowercaseName); - // 2. Append (name, value) to list. - if (exists) { - const delimiter = lowercaseName === "cookie" ? "; " : ", "; - this[$c57c7a7ef88344d8$var$kHeadersMap].set(lowercaseName, { - name: exists.name, - value: `${exists.value}${delimiter}${value}` - }); - } else this[$c57c7a7ef88344d8$var$kHeadersMap].set(lowercaseName, { - name: name, - value: value - }); - if (lowercaseName === "set-cookie") { - this.cookies ??= []; - this.cookies.push(value); + execute(data) { + $in2sP$nodeassert(this.ptr != null); + $in2sP$nodeassert($9034b7dfe607ccd7$var$currentParser == null); + $in2sP$nodeassert(!this.paused); + const { socket: socket, llhttp: llhttp } = this; + if (data.length > $9034b7dfe607ccd7$var$currentBufferSize) { + if ($9034b7dfe607ccd7$var$currentBufferPtr) llhttp.free($9034b7dfe607ccd7$var$currentBufferPtr); + $9034b7dfe607ccd7$var$currentBufferSize = Math.ceil(data.length / 4096) * 4096; + $9034b7dfe607ccd7$var$currentBufferPtr = llhttp.malloc($9034b7dfe607ccd7$var$currentBufferSize); + } + new Uint8Array(llhttp.memory.buffer, $9034b7dfe607ccd7$var$currentBufferPtr, $9034b7dfe607ccd7$var$currentBufferSize).set(data); + // Call `execute` on the wasm parser. + // We pass the `llhttp_parser` pointer address, the pointer address of buffer view data, + // and finally the length of bytes to parse. + // The return value is an error code or `constants.ERROR.OK`. + try { + let ret; + try { + $9034b7dfe607ccd7$var$currentBufferRef = data; + $9034b7dfe607ccd7$var$currentParser = this; + ret = llhttp.llhttp_execute(this.ptr, $9034b7dfe607ccd7$var$currentBufferPtr, data.length); + /* eslint-disable-next-line no-useless-catch */ } catch (err) { + /* istanbul ignore next: difficult to make a test case for */ throw err; + } finally{ + $9034b7dfe607ccd7$var$currentParser = null; + $9034b7dfe607ccd7$var$currentBufferRef = null; + } + const offset = llhttp.llhttp_get_error_pos(this.ptr) - $9034b7dfe607ccd7$var$currentBufferPtr; + if (ret !== $edeaF.ERROR.OK) { + const body = data.subarray(offset); + if (ret === $edeaF.ERROR.PAUSED_UPGRADE) this.onUpgrade(body); + else if (ret === $edeaF.ERROR.PAUSED) { + this.paused = true; + socket.unshift(body); + } else throw this.createError(ret, body); + } + } catch (err) { + $bFRvW.destroy(socket, err); } } - // https://fetch.spec.whatwg.org/#concept-header-list-set - set(name, value) { - this[$c57c7a7ef88344d8$var$kHeadersSortedMap] = null; - const lowercaseName = name.toLowerCase(); - if (lowercaseName === "set-cookie") this.cookies = [ - value - ]; - // 1. If list contains name, then set the value of - // the first such header to value and remove the - // others. - // 2. Otherwise, append header (name, value) to list. - this[$c57c7a7ef88344d8$var$kHeadersMap].set(lowercaseName, { - name: name, - value: value - }); - } - // https://fetch.spec.whatwg.org/#concept-header-list-delete - delete(name) { - this[$c57c7a7ef88344d8$var$kHeadersSortedMap] = null; - name = name.toLowerCase(); - if (name === "set-cookie") this.cookies = null; - this[$c57c7a7ef88344d8$var$kHeadersMap].delete(name); + finish() { + $in2sP$nodeassert($9034b7dfe607ccd7$var$currentParser === null); + $in2sP$nodeassert(this.ptr != null); + $in2sP$nodeassert(!this.paused); + const { llhttp: llhttp } = this; + let ret; + try { + $9034b7dfe607ccd7$var$currentParser = this; + ret = llhttp.llhttp_finish(this.ptr); + } finally{ + $9034b7dfe607ccd7$var$currentParser = null; + } + if (ret === $edeaF.ERROR.OK) return null; + if (ret === $edeaF.ERROR.PAUSED || ret === $edeaF.ERROR.PAUSED_UPGRADE) { + this.paused = true; + return null; + } + return this.createError(ret, $9034b7dfe607ccd7$var$EMPTY_BUF); } - // https://fetch.spec.whatwg.org/#concept-header-list-get - get(name) { - const value = this[$c57c7a7ef88344d8$var$kHeadersMap].get(name.toLowerCase()); - // 1. If list does not contain name, then return null. - // 2. Return the values of all headers in list whose name - // is a byte-case-insensitive match for name, - // separated from each other by 0x2C 0x20, in order. - return value === undefined ? null : value.value; + createError(ret, data) { + const { llhttp: llhttp, contentLength: contentLength, bytesRead: bytesRead } = this; + if (contentLength && bytesRead !== parseInt(contentLength, 10)) return new $9034b7dfe607ccd7$require$ResponseContentLengthMismatchError(); + const ptr = llhttp.llhttp_get_error_reason(this.ptr); + let message = ''; + if (ptr) { + const len = new Uint8Array(llhttp.memory.buffer, ptr).indexOf(0); + message = 'Response does not match the HTTP/1.1 protocol (' + Buffer.from(llhttp.memory.buffer, ptr, len).toString() + ')'; + } + return new $9034b7dfe607ccd7$require$HTTPParserError(message, $edeaF.ERROR[ret], data); } - *[Symbol.iterator]() { - // use the lowercased name - for (const [name, { value: value }] of this[$c57c7a7ef88344d8$var$kHeadersMap])yield [ - name, - value - ]; + destroy() { + $in2sP$nodeassert(this.ptr != null); + $in2sP$nodeassert($9034b7dfe607ccd7$var$currentParser == null); + this.llhttp.llhttp_free(this.ptr); + this.ptr = null; + this.timeout && $lI7Ok.clearTimeout(this.timeout); + this.timeout = null; + this.timeoutValue = null; + this.timeoutType = null; + this.paused = false; } - get entries() { - const headers = {}; - if (this[$c57c7a7ef88344d8$var$kHeadersMap].size) for (const { name: name, value: value } of this[$c57c7a7ef88344d8$var$kHeadersMap].values())headers[name] = value; - return headers; + onStatus(buf) { + this.statusText = buf.toString(); } -} -// https://fetch.spec.whatwg.org/#headers-class -class $c57c7a7ef88344d8$var$Headers { - constructor(init){ - if (init === $c57c7a7ef88344d8$require$kConstruct) return; - this[$c57c7a7ef88344d8$require$kHeadersList] = new $c57c7a7ef88344d8$var$HeadersList(); - // The new Headers(init) constructor steps are: - // 1. Set this’s guard to "none". - this[$c57c7a7ef88344d8$require$kGuard] = "none"; - // 2. If init is given, then fill this with init. - if (init !== undefined) { - init = $c57c7a7ef88344d8$require$webidl.converters.HeadersInit(init); - $c57c7a7ef88344d8$var$fill(this, init); + onMessageBegin() { + const { socket: socket, client: client } = this; + /* istanbul ignore next: difficult to make a test case for */ if (socket.destroyed) return -1; + if (client[$9034b7dfe607ccd7$require$kRunning] === 0) { + $bFRvW.destroy(socket, new $9034b7dfe607ccd7$require$SocketError('bad response', $bFRvW.getSocketInfo(socket))); + return -1; } + const request = client[$9034b7dfe607ccd7$require$kQueue][client[$9034b7dfe607ccd7$require$kRunningIdx]]; + if (!request) return -1; + request.onResponseStarted(); } - // https://fetch.spec.whatwg.org/#dom-headers-append - append(name, value) { - $c57c7a7ef88344d8$require$webidl.brandCheck(this, $c57c7a7ef88344d8$var$Headers); - $c57c7a7ef88344d8$require$webidl.argumentLengthCheck(arguments, 2, { - header: "Headers.append" - }); - name = $c57c7a7ef88344d8$require$webidl.converters.ByteString(name); - value = $c57c7a7ef88344d8$require$webidl.converters.ByteString(value); - return $c57c7a7ef88344d8$var$appendHeader(this, name, value); + onHeaderField(buf) { + const len = this.headers.length; + if ((len & 1) === 0) this.headers.push(buf); + else this.headers[len - 1] = Buffer.concat([ + this.headers[len - 1], + buf + ]); + this.trackHeader(buf.length); } - // https://fetch.spec.whatwg.org/#dom-headers-delete - delete(name) { - $c57c7a7ef88344d8$require$webidl.brandCheck(this, $c57c7a7ef88344d8$var$Headers); - $c57c7a7ef88344d8$require$webidl.argumentLengthCheck(arguments, 1, { - header: "Headers.delete" - }); - name = $c57c7a7ef88344d8$require$webidl.converters.ByteString(name); - // 1. If name is not a header name, then throw a TypeError. - if (!$c57c7a7ef88344d8$require$isValidHeaderName(name)) throw $c57c7a7ef88344d8$require$webidl.errors.invalidArgument({ - prefix: "Headers.delete", - value: name, - type: "header name" - }); - // 2. If this’s guard is "immutable", then throw a TypeError. - // 3. Otherwise, if this’s guard is "request" and name is a - // forbidden header name, return. - // 4. Otherwise, if this’s guard is "request-no-cors", name - // is not a no-CORS-safelisted request-header name, and - // name is not a privileged no-CORS request-header name, - // return. - // 5. Otherwise, if this’s guard is "response" and name is - // a forbidden response-header name, return. - // Note: undici does not implement forbidden header names - if (this[$c57c7a7ef88344d8$require$kGuard] === "immutable") throw new TypeError("immutable"); - else this[$c57c7a7ef88344d8$require$kGuard]; - // 6. If this’s header list does not contain name, then - // return. - if (!this[$c57c7a7ef88344d8$require$kHeadersList].contains(name)) return; - // 7. Delete name from this’s header list. - // 8. If this’s guard is "request-no-cors", then remove - // privileged no-CORS request headers from this. - this[$c57c7a7ef88344d8$require$kHeadersList].delete(name); + onHeaderValue(buf) { + let len = this.headers.length; + if ((len & 1) === 1) { + this.headers.push(buf); + len += 1; + } else this.headers[len - 1] = Buffer.concat([ + this.headers[len - 1], + buf + ]); + const key = this.headers[len - 2]; + if (key.length === 10) { + const headerName = $bFRvW.bufferToLowerCasedHeaderName(key); + if (headerName === 'keep-alive') this.keepAlive += buf.toString(); + else if (headerName === 'connection') this.connection += buf.toString(); + } else if (key.length === 14 && $bFRvW.bufferToLowerCasedHeaderName(key) === 'content-length') this.contentLength += buf.toString(); + this.trackHeader(buf.length); } - // https://fetch.spec.whatwg.org/#dom-headers-get - get(name) { - $c57c7a7ef88344d8$require$webidl.brandCheck(this, $c57c7a7ef88344d8$var$Headers); - $c57c7a7ef88344d8$require$webidl.argumentLengthCheck(arguments, 1, { - header: "Headers.get" - }); - name = $c57c7a7ef88344d8$require$webidl.converters.ByteString(name); - // 1. If name is not a header name, then throw a TypeError. - if (!$c57c7a7ef88344d8$require$isValidHeaderName(name)) throw $c57c7a7ef88344d8$require$webidl.errors.invalidArgument({ - prefix: "Headers.get", - value: name, - type: "header name" - }); - // 2. Return the result of getting name from this’s header - // list. - return this[$c57c7a7ef88344d8$require$kHeadersList].get(name); + trackHeader(len) { + this.headersSize += len; + if (this.headersSize >= this.headersMaxSize) $bFRvW.destroy(this.socket, new $9034b7dfe607ccd7$require$HeadersOverflowError()); } - // https://fetch.spec.whatwg.org/#dom-headers-has - has(name) { - $c57c7a7ef88344d8$require$webidl.brandCheck(this, $c57c7a7ef88344d8$var$Headers); - $c57c7a7ef88344d8$require$webidl.argumentLengthCheck(arguments, 1, { - header: "Headers.has" - }); - name = $c57c7a7ef88344d8$require$webidl.converters.ByteString(name); - // 1. If name is not a header name, then throw a TypeError. - if (!$c57c7a7ef88344d8$require$isValidHeaderName(name)) throw $c57c7a7ef88344d8$require$webidl.errors.invalidArgument({ - prefix: "Headers.has", - value: name, - type: "header name" - }); - // 2. Return true if this’s header list contains name; - // otherwise false. - return this[$c57c7a7ef88344d8$require$kHeadersList].contains(name); + onUpgrade(head) { + const { upgrade: upgrade, client: client, socket: socket, headers: headers, statusCode: statusCode } = this; + $in2sP$nodeassert(upgrade); + $in2sP$nodeassert(client[$9034b7dfe607ccd7$require$kSocket] === socket); + $in2sP$nodeassert(!socket.destroyed); + $in2sP$nodeassert(!this.paused); + $in2sP$nodeassert((headers.length & 1) === 0); + const request = client[$9034b7dfe607ccd7$require$kQueue][client[$9034b7dfe607ccd7$require$kRunningIdx]]; + $in2sP$nodeassert(request); + $in2sP$nodeassert(request.upgrade || request.method === 'CONNECT'); + this.statusCode = null; + this.statusText = ''; + this.shouldKeepAlive = null; + this.headers = []; + this.headersSize = 0; + socket.unshift(head); + socket[$9034b7dfe607ccd7$require$kParser].destroy(); + socket[$9034b7dfe607ccd7$require$kParser] = null; + socket[$9034b7dfe607ccd7$require$kClient] = null; + socket[$9034b7dfe607ccd7$require$kError] = null; + $9034b7dfe607ccd7$var$removeAllListeners(socket); + client[$9034b7dfe607ccd7$require$kSocket] = null; + client[$9034b7dfe607ccd7$require$kHTTPContext] = null // TODO (fix): This is hacky... + ; + client[$9034b7dfe607ccd7$require$kQueue][client[$9034b7dfe607ccd7$require$kRunningIdx]++] = null; + client.emit('disconnect', client[$9034b7dfe607ccd7$require$kUrl], [ + client + ], new $9034b7dfe607ccd7$require$InformationalError('upgrade')); + try { + request.onUpgrade(statusCode, headers, socket); + } catch (err) { + $bFRvW.destroy(socket, err); + } + client[$9034b7dfe607ccd7$require$kResume](); } - // https://fetch.spec.whatwg.org/#dom-headers-set - set(name, value) { - $c57c7a7ef88344d8$require$webidl.brandCheck(this, $c57c7a7ef88344d8$var$Headers); - $c57c7a7ef88344d8$require$webidl.argumentLengthCheck(arguments, 2, { - header: "Headers.set" - }); - name = $c57c7a7ef88344d8$require$webidl.converters.ByteString(name); - value = $c57c7a7ef88344d8$require$webidl.converters.ByteString(value); - // 1. Normalize value. - value = $c57c7a7ef88344d8$var$headerValueNormalize(value); - // 2. If name is not a header name or value is not a - // header value, then throw a TypeError. - if (!$c57c7a7ef88344d8$require$isValidHeaderName(name)) throw $c57c7a7ef88344d8$require$webidl.errors.invalidArgument({ - prefix: "Headers.set", - value: name, - type: "header name" - }); - else if (!$c57c7a7ef88344d8$require$isValidHeaderValue(value)) throw $c57c7a7ef88344d8$require$webidl.errors.invalidArgument({ - prefix: "Headers.set", - value: value, - type: "header value" - }); - // 3. If this’s guard is "immutable", then throw a TypeError. - // 4. Otherwise, if this’s guard is "request" and name is a - // forbidden header name, return. - // 5. Otherwise, if this’s guard is "request-no-cors" and - // name/value is not a no-CORS-safelisted request-header, - // return. - // 6. Otherwise, if this’s guard is "response" and name is a - // forbidden response-header name, return. - // Note: undici does not implement forbidden header names - if (this[$c57c7a7ef88344d8$require$kGuard] === "immutable") throw new TypeError("immutable"); - else this[$c57c7a7ef88344d8$require$kGuard]; - // 7. Set (name, value) in this’s header list. - // 8. If this’s guard is "request-no-cors", then remove - // privileged no-CORS request headers from this - this[$c57c7a7ef88344d8$require$kHeadersList].set(name, value); + onHeadersComplete(statusCode, upgrade, shouldKeepAlive) { + const { client: client, socket: socket, headers: headers, statusText: statusText } = this; + /* istanbul ignore next: difficult to make a test case for */ if (socket.destroyed) return -1; + if (client[$9034b7dfe607ccd7$require$kRunning] === 0) { + $bFRvW.destroy(socket, new $9034b7dfe607ccd7$require$SocketError('bad response', $bFRvW.getSocketInfo(socket))); + return -1; + } + const request = client[$9034b7dfe607ccd7$require$kQueue][client[$9034b7dfe607ccd7$require$kRunningIdx]]; + /* istanbul ignore next: difficult to make a test case for */ if (!request) return -1; + $in2sP$nodeassert(!this.upgrade); + $in2sP$nodeassert(this.statusCode < 200); + if (statusCode === 100) { + $bFRvW.destroy(socket, new $9034b7dfe607ccd7$require$SocketError('bad response', $bFRvW.getSocketInfo(socket))); + return -1; + } + /* this can only happen if server is misbehaving */ if (upgrade && !request.upgrade) { + $bFRvW.destroy(socket, new $9034b7dfe607ccd7$require$SocketError('bad upgrade', $bFRvW.getSocketInfo(socket))); + return -1; + } + $in2sP$nodeassert(this.timeoutType === $9034b7dfe607ccd7$var$TIMEOUT_HEADERS); + this.statusCode = statusCode; + this.shouldKeepAlive = shouldKeepAlive || // Override llhttp value which does not allow keepAlive for HEAD. + request.method === 'HEAD' && !socket[$9034b7dfe607ccd7$require$kReset] && this.connection.toLowerCase() === 'keep-alive'; + if (this.statusCode >= 200) { + const bodyTimeout = request.bodyTimeout != null ? request.bodyTimeout : client[$9034b7dfe607ccd7$require$kBodyTimeout]; + this.setTimeout(bodyTimeout, $9034b7dfe607ccd7$var$TIMEOUT_BODY); + } else if (this.timeout) // istanbul ignore else: only for jest + { + if (this.timeout.refresh) this.timeout.refresh(); + } + if (request.method === 'CONNECT') { + $in2sP$nodeassert(client[$9034b7dfe607ccd7$require$kRunning] === 1); + this.upgrade = true; + return 2; + } + if (upgrade) { + $in2sP$nodeassert(client[$9034b7dfe607ccd7$require$kRunning] === 1); + this.upgrade = true; + return 2; + } + $in2sP$nodeassert((this.headers.length & 1) === 0); + this.headers = []; + this.headersSize = 0; + if (this.shouldKeepAlive && client[$9034b7dfe607ccd7$require$kPipelining]) { + const keepAliveTimeout = this.keepAlive ? $bFRvW.parseKeepAliveTimeout(this.keepAlive) : null; + if (keepAliveTimeout != null) { + const timeout = Math.min(keepAliveTimeout - client[$9034b7dfe607ccd7$require$kKeepAliveTimeoutThreshold], client[$9034b7dfe607ccd7$require$kKeepAliveMaxTimeout]); + if (timeout <= 0) socket[$9034b7dfe607ccd7$require$kReset] = true; + else client[$9034b7dfe607ccd7$require$kKeepAliveTimeoutValue] = timeout; + } else client[$9034b7dfe607ccd7$require$kKeepAliveTimeoutValue] = client[$9034b7dfe607ccd7$require$kKeepAliveDefaultTimeout]; + } else // Stop more requests from being dispatched. + socket[$9034b7dfe607ccd7$require$kReset] = true; + const pause = request.onHeaders(statusCode, headers, this.resume, statusText) === false; + if (request.aborted) return -1; + if (request.method === 'HEAD') return 1; + if (statusCode < 200) return 1; + if (socket[$9034b7dfe607ccd7$require$kBlocking]) { + socket[$9034b7dfe607ccd7$require$kBlocking] = false; + client[$9034b7dfe607ccd7$require$kResume](); + } + return pause ? $edeaF.ERROR.PAUSED : 0; } - // https://fetch.spec.whatwg.org/#dom-headers-getsetcookie - getSetCookie() { - $c57c7a7ef88344d8$require$webidl.brandCheck(this, $c57c7a7ef88344d8$var$Headers); - // 1. If this’s header list does not contain `Set-Cookie`, then return « ». - // 2. Return the values of all headers in this’s header list whose name is - // a byte-case-insensitive match for `Set-Cookie`, in order. - const list = this[$c57c7a7ef88344d8$require$kHeadersList].cookies; - if (list) return [ - ...list - ]; - return []; + onBody(buf) { + const { client: client, socket: socket, statusCode: statusCode, maxResponseSize: maxResponseSize } = this; + if (socket.destroyed) return -1; + const request = client[$9034b7dfe607ccd7$require$kQueue][client[$9034b7dfe607ccd7$require$kRunningIdx]]; + $in2sP$nodeassert(request); + $in2sP$nodeassert(this.timeoutType === $9034b7dfe607ccd7$var$TIMEOUT_BODY); + if (this.timeout) // istanbul ignore else: only for jest + { + if (this.timeout.refresh) this.timeout.refresh(); + } + $in2sP$nodeassert(statusCode >= 200); + if (maxResponseSize > -1 && this.bytesRead + buf.length > maxResponseSize) { + $bFRvW.destroy(socket, new $9034b7dfe607ccd7$require$ResponseExceededMaxSizeError()); + return -1; + } + this.bytesRead += buf.length; + if (request.onData(buf) === false) return $edeaF.ERROR.PAUSED; } - // https://fetch.spec.whatwg.org/#concept-header-list-sort-and-combine - get [$c57c7a7ef88344d8$var$kHeadersSortedMap]() { - if (this[$c57c7a7ef88344d8$require$kHeadersList][$c57c7a7ef88344d8$var$kHeadersSortedMap]) return this[$c57c7a7ef88344d8$require$kHeadersList][$c57c7a7ef88344d8$var$kHeadersSortedMap]; - // 1. Let headers be an empty list of headers with the key being the name - // and value the value. - const headers = []; - // 2. Let names be the result of convert header names to a sorted-lowercase - // set with all the names of the headers in list. - const names = [ - ...this[$c57c7a7ef88344d8$require$kHeadersList] - ].sort((a, b)=>a[0] < b[0] ? -1 : 1); - const cookies = this[$c57c7a7ef88344d8$require$kHeadersList].cookies; - // 3. For each name of names: - for(let i = 0; i < names.length; ++i){ - const [name, value] = names[i]; - // 1. If name is `set-cookie`, then: - if (name === "set-cookie") // 1. Let values be a list of all values of headers in list whose name - // is a byte-case-insensitive match for name, in order. - // 2. For each value of values: - // 1. Append (name, value) to headers. - for(let j = 0; j < cookies.length; ++j)headers.push([ - name, - cookies[j] - ]); - else { - // 2. Otherwise: - // 1. Let value be the result of getting name from list. - // 2. Assert: value is non-null. - $g40fK$assert(value !== null); - // 3. Append (name, value) to headers. - headers.push([ - name, - value - ]); + onMessageComplete() { + const { client: client, socket: socket, statusCode: statusCode, upgrade: upgrade, headers: headers, contentLength: contentLength, bytesRead: bytesRead, shouldKeepAlive: shouldKeepAlive } = this; + if (socket.destroyed && (!statusCode || shouldKeepAlive)) return -1; + if (upgrade) return; + $in2sP$nodeassert(statusCode >= 100); + $in2sP$nodeassert((this.headers.length & 1) === 0); + const request = client[$9034b7dfe607ccd7$require$kQueue][client[$9034b7dfe607ccd7$require$kRunningIdx]]; + $in2sP$nodeassert(request); + this.statusCode = null; + this.statusText = ''; + this.bytesRead = 0; + this.contentLength = ''; + this.keepAlive = ''; + this.connection = ''; + this.headers = []; + this.headersSize = 0; + if (statusCode < 200) return; + /* istanbul ignore next: should be handled by llhttp? */ if (request.method !== 'HEAD' && contentLength && bytesRead !== parseInt(contentLength, 10)) { + $bFRvW.destroy(socket, new $9034b7dfe607ccd7$require$ResponseContentLengthMismatchError()); + return -1; + } + request.onComplete(headers); + client[$9034b7dfe607ccd7$require$kQueue][client[$9034b7dfe607ccd7$require$kRunningIdx]++] = null; + socket[$9034b7dfe607ccd7$var$kSocketUsed] = true; + if (socket[$9034b7dfe607ccd7$require$kWriting]) { + $in2sP$nodeassert(client[$9034b7dfe607ccd7$require$kRunning] === 0); + // Response completed before request. + $bFRvW.destroy(socket, new $9034b7dfe607ccd7$require$InformationalError('reset')); + return $edeaF.ERROR.PAUSED; + } else if (!shouldKeepAlive) { + $bFRvW.destroy(socket, new $9034b7dfe607ccd7$require$InformationalError('reset')); + return $edeaF.ERROR.PAUSED; + } else if (socket[$9034b7dfe607ccd7$require$kReset] && client[$9034b7dfe607ccd7$require$kRunning] === 0) { + // Destroy socket once all requests have completed. + // The request at the tail of the pipeline is the one + // that requested reset and no further requests should + // have been queued since then. + $bFRvW.destroy(socket, new $9034b7dfe607ccd7$require$InformationalError('reset')); + return $edeaF.ERROR.PAUSED; + } else if (client[$9034b7dfe607ccd7$require$kPipelining] == null || client[$9034b7dfe607ccd7$require$kPipelining] === 1) // We must wait a full event loop cycle to reuse this socket to make sure + // that non-spec compliant servers are not closing the connection even if they + // said they won't. + setImmediate(()=>client[$9034b7dfe607ccd7$require$kResume]()); + else client[$9034b7dfe607ccd7$require$kResume](); + } +} +function $9034b7dfe607ccd7$var$onParserTimeout(parser) { + const { socket: socket, timeoutType: timeoutType, client: client, paused: paused } = parser.deref(); + /* istanbul ignore else */ if (timeoutType === $9034b7dfe607ccd7$var$TIMEOUT_HEADERS) { + if (!socket[$9034b7dfe607ccd7$require$kWriting] || socket.writableNeedDrain || client[$9034b7dfe607ccd7$require$kRunning] > 1) { + $in2sP$nodeassert(!paused, 'cannot be paused while waiting for headers'); + $bFRvW.destroy(socket, new $9034b7dfe607ccd7$require$HeadersTimeoutError()); + } + } else if (timeoutType === $9034b7dfe607ccd7$var$TIMEOUT_BODY) { + if (!paused) $bFRvW.destroy(socket, new $9034b7dfe607ccd7$require$BodyTimeoutError()); + } else if (timeoutType === $9034b7dfe607ccd7$var$TIMEOUT_KEEP_ALIVE) { + $in2sP$nodeassert(client[$9034b7dfe607ccd7$require$kRunning] === 0 && client[$9034b7dfe607ccd7$require$kKeepAliveTimeoutValue]); + $bFRvW.destroy(socket, new $9034b7dfe607ccd7$require$InformationalError('socket idle timeout')); + } +} +async function $9034b7dfe607ccd7$var$connectH1(client, socket) { + client[$9034b7dfe607ccd7$require$kSocket] = socket; + if (!$9034b7dfe607ccd7$var$llhttpInstance) { + $9034b7dfe607ccd7$var$llhttpInstance = await $9034b7dfe607ccd7$var$llhttpPromise; + $9034b7dfe607ccd7$var$llhttpPromise = null; + } + socket[$9034b7dfe607ccd7$require$kNoRef] = false; + socket[$9034b7dfe607ccd7$require$kWriting] = false; + socket[$9034b7dfe607ccd7$require$kReset] = false; + socket[$9034b7dfe607ccd7$require$kBlocking] = false; + socket[$9034b7dfe607ccd7$var$kIdleSocketValidation] = 0; + socket[$9034b7dfe607ccd7$var$kIdleSocketValidationTimeout] = null; + socket[$9034b7dfe607ccd7$var$kSocketUsed] = false; + socket[$9034b7dfe607ccd7$require$kParser] = new $9034b7dfe607ccd7$var$Parser(client, socket, $9034b7dfe607ccd7$var$llhttpInstance); + $9034b7dfe607ccd7$var$addListener(socket, 'error', function(err) { + $in2sP$nodeassert(err.code !== 'ERR_TLS_CERT_ALTNAME_INVALID'); + const parser = this[$9034b7dfe607ccd7$require$kParser]; + // On Mac OS, we get an ECONNRESET even if there is a full body to be forwarded + // to the user. + if (err.code === 'ECONNRESET' && parser.statusCode && !parser.shouldKeepAlive) { + const parserErr = parser.finish(); + if (parserErr) { + this[$9034b7dfe607ccd7$require$kError] = parserErr; + this[$9034b7dfe607ccd7$require$kClient][$9034b7dfe607ccd7$require$kOnError](parserErr); + } + return; + } + this[$9034b7dfe607ccd7$require$kError] = err; + this[$9034b7dfe607ccd7$require$kClient][$9034b7dfe607ccd7$require$kOnError](err); + }); + $9034b7dfe607ccd7$var$addListener(socket, 'readable', function() { + const parser = this[$9034b7dfe607ccd7$require$kParser]; + if (parser) parser.readMore(); + }); + $9034b7dfe607ccd7$var$addListener(socket, 'end', function() { + const parser = this[$9034b7dfe607ccd7$require$kParser]; + if (parser.statusCode && !parser.shouldKeepAlive) { + const parserErr = parser.finish(); + if (parserErr) $bFRvW.destroy(this, parserErr); + return; + } + $bFRvW.destroy(this, new $9034b7dfe607ccd7$require$SocketError('other side closed', $bFRvW.getSocketInfo(this))); + }); + $9034b7dfe607ccd7$var$addListener(socket, 'close', function() { + const client = this[$9034b7dfe607ccd7$require$kClient]; + const parser = this[$9034b7dfe607ccd7$require$kParser]; + $9034b7dfe607ccd7$var$clearIdleSocketValidation(this); + if (parser) { + if (!this[$9034b7dfe607ccd7$require$kError] && parser.statusCode && !parser.shouldKeepAlive) this[$9034b7dfe607ccd7$require$kError] = parser.finish() || this[$9034b7dfe607ccd7$require$kError]; + this[$9034b7dfe607ccd7$require$kParser].destroy(); + this[$9034b7dfe607ccd7$require$kParser] = null; + } + const err = this[$9034b7dfe607ccd7$require$kError] || new $9034b7dfe607ccd7$require$SocketError('closed', $bFRvW.getSocketInfo(this)); + client[$9034b7dfe607ccd7$require$kSocket] = null; + client[$9034b7dfe607ccd7$require$kHTTPContext] = null // TODO (fix): This is hacky... + ; + if (client.destroyed) { + $in2sP$nodeassert(client[$9034b7dfe607ccd7$require$kPending] === 0); + // Fail entire queue. + const requests = client[$9034b7dfe607ccd7$require$kQueue].splice(client[$9034b7dfe607ccd7$require$kRunningIdx]); + for(let i = 0; i < requests.length; i++){ + const request = requests[i]; + $bFRvW.errorRequest(client, request, err); + } + } else if (client[$9034b7dfe607ccd7$require$kRunning] > 0 && err.code !== 'UND_ERR_INFO') { + // Fail head of pipeline. + const request = client[$9034b7dfe607ccd7$require$kQueue][client[$9034b7dfe607ccd7$require$kRunningIdx]]; + client[$9034b7dfe607ccd7$require$kQueue][client[$9034b7dfe607ccd7$require$kRunningIdx]++] = null; + $bFRvW.errorRequest(client, request, err); + } + client[$9034b7dfe607ccd7$require$kPendingIdx] = client[$9034b7dfe607ccd7$require$kRunningIdx]; + $in2sP$nodeassert(client[$9034b7dfe607ccd7$require$kRunning] === 0); + client.emit('disconnect', client[$9034b7dfe607ccd7$require$kUrl], [ + client + ], err); + client[$9034b7dfe607ccd7$require$kResume](); + }); + let closed = false; + socket.on('close', ()=>{ + closed = true; + }); + return { + version: 'h1', + defaultPipelining: 1, + write (...args) { + return $9034b7dfe607ccd7$var$writeH1(client, ...args); + }, + resume () { + $9034b7dfe607ccd7$var$resumeH1(client); + }, + destroy (err, callback) { + if (closed) queueMicrotask(callback); + else socket.destroy(err).on('close', callback); + }, + get destroyed () { + return socket.destroyed; + }, + busy (request) { + if (socket[$9034b7dfe607ccd7$require$kWriting] || socket[$9034b7dfe607ccd7$require$kReset] || socket[$9034b7dfe607ccd7$require$kBlocking] || socket[$9034b7dfe607ccd7$var$kIdleSocketValidation] === 1) return true; + if (request) { + if (client[$9034b7dfe607ccd7$require$kRunning] > 0 && !request.idempotent) // Non-idempotent request cannot be retried. + // Ensure that no other requests are inflight and + // could cause failure. + return true; + if (client[$9034b7dfe607ccd7$require$kRunning] > 0 && (request.upgrade || request.method === 'CONNECT')) // Don't dispatch an upgrade until all preceding requests have completed. + // A misbehaving server might upgrade the connection before all pipelined + // request has completed. + return true; + if (client[$9034b7dfe607ccd7$require$kRunning] > 0 && $bFRvW.bodyLength(request.body) !== 0 && ($bFRvW.isStream(request.body) || $bFRvW.isAsyncIterable(request.body) || $bFRvW.isFormDataLike(request.body))) // Request with stream or iterator body can error while other requests + // are inflight and indirectly error those as well. + // Ensure this doesn't happen by waiting for inflight + // to complete before dispatching. + // Request with stream or iterator body cannot be retried. + // Ensure that no other requests are inflight and + // could cause failure. + return true; } + return false; } - this[$c57c7a7ef88344d8$require$kHeadersList][$c57c7a7ef88344d8$var$kHeadersSortedMap] = headers; - // 4. Return headers. - return headers; + }; +} +function $9034b7dfe607ccd7$var$clearIdleSocketValidation(socket) { + if (socket[$9034b7dfe607ccd7$var$kIdleSocketValidationTimeout]) { + clearTimeout(socket[$9034b7dfe607ccd7$var$kIdleSocketValidationTimeout]); + socket[$9034b7dfe607ccd7$var$kIdleSocketValidationTimeout] = null; } - keys() { - $c57c7a7ef88344d8$require$webidl.brandCheck(this, $c57c7a7ef88344d8$var$Headers); - if (this[$c57c7a7ef88344d8$require$kGuard] === "immutable") { - const value = this[$c57c7a7ef88344d8$var$kHeadersSortedMap]; - return $c57c7a7ef88344d8$require$makeIterator(()=>value, "Headers", "key"); + socket[$9034b7dfe607ccd7$var$kIdleSocketValidation] = 0; +} +function $9034b7dfe607ccd7$var$scheduleIdleSocketValidation(client, socket) { + socket[$9034b7dfe607ccd7$var$kIdleSocketValidation] = 1; + socket[$9034b7dfe607ccd7$var$kIdleSocketValidationTimeout] = setTimeout(()=>{ + socket[$9034b7dfe607ccd7$var$kIdleSocketValidationTimeout] = null; + socket[$9034b7dfe607ccd7$var$kIdleSocketValidation] = 2; + if (client[$9034b7dfe607ccd7$require$kSocket] === socket && !socket.destroyed) client[$9034b7dfe607ccd7$require$kResume](); + }, 0); + socket[$9034b7dfe607ccd7$var$kIdleSocketValidationTimeout].unref?.(); +} +/** + * @param {import('./client.js')} client + */ function $9034b7dfe607ccd7$var$resumeH1(client) { + const socket = client[$9034b7dfe607ccd7$require$kSocket]; + if (socket && !socket.destroyed) { + if (client[$9034b7dfe607ccd7$require$kSize] === 0) { + if (!socket[$9034b7dfe607ccd7$require$kNoRef] && socket.unref) { + socket.unref(); + socket[$9034b7dfe607ccd7$require$kNoRef] = true; + } + } else if (socket[$9034b7dfe607ccd7$require$kNoRef] && socket.ref) { + socket.ref(); + socket[$9034b7dfe607ccd7$require$kNoRef] = false; + } + if (client[$9034b7dfe607ccd7$require$kRunning] === 0 && client[$9034b7dfe607ccd7$require$kPending] > 0 && socket[$9034b7dfe607ccd7$var$kSocketUsed]) { + if (socket[$9034b7dfe607ccd7$var$kIdleSocketValidation] === 0) { + $9034b7dfe607ccd7$var$scheduleIdleSocketValidation(client, socket); + socket[$9034b7dfe607ccd7$require$kParser].readMore(); + if (socket.destroyed) return; + return; + } + if (socket[$9034b7dfe607ccd7$var$kIdleSocketValidation] === 1) { + socket[$9034b7dfe607ccd7$require$kParser].readMore(); + if (socket.destroyed) return; + return; + } } - return $c57c7a7ef88344d8$require$makeIterator(()=>[ - ...this[$c57c7a7ef88344d8$var$kHeadersSortedMap].values() - ], "Headers", "key"); - } - values() { - $c57c7a7ef88344d8$require$webidl.brandCheck(this, $c57c7a7ef88344d8$var$Headers); - if (this[$c57c7a7ef88344d8$require$kGuard] === "immutable") { - const value = this[$c57c7a7ef88344d8$var$kHeadersSortedMap]; - return $c57c7a7ef88344d8$require$makeIterator(()=>value, "Headers", "value"); + if (client[$9034b7dfe607ccd7$require$kRunning] === 0) { + socket[$9034b7dfe607ccd7$require$kParser].readMore(); + if (socket.destroyed) return; + } + if (client[$9034b7dfe607ccd7$require$kSize] === 0) { + if (socket[$9034b7dfe607ccd7$require$kParser].timeoutType !== $9034b7dfe607ccd7$var$TIMEOUT_KEEP_ALIVE) socket[$9034b7dfe607ccd7$require$kParser].setTimeout(client[$9034b7dfe607ccd7$require$kKeepAliveTimeoutValue], $9034b7dfe607ccd7$var$TIMEOUT_KEEP_ALIVE); + } else if (client[$9034b7dfe607ccd7$require$kRunning] > 0 && socket[$9034b7dfe607ccd7$require$kParser].statusCode < 200) { + if (socket[$9034b7dfe607ccd7$require$kParser].timeoutType !== $9034b7dfe607ccd7$var$TIMEOUT_HEADERS) { + const request = client[$9034b7dfe607ccd7$require$kQueue][client[$9034b7dfe607ccd7$require$kRunningIdx]]; + const headersTimeout = request.headersTimeout != null ? request.headersTimeout : client[$9034b7dfe607ccd7$require$kHeadersTimeout]; + socket[$9034b7dfe607ccd7$require$kParser].setTimeout(headersTimeout, $9034b7dfe607ccd7$var$TIMEOUT_HEADERS); + } } - return $c57c7a7ef88344d8$require$makeIterator(()=>[ - ...this[$c57c7a7ef88344d8$var$kHeadersSortedMap].values() - ], "Headers", "value"); } - entries() { - $c57c7a7ef88344d8$require$webidl.brandCheck(this, $c57c7a7ef88344d8$var$Headers); - if (this[$c57c7a7ef88344d8$require$kGuard] === "immutable") { - const value = this[$c57c7a7ef88344d8$var$kHeadersSortedMap]; - return $c57c7a7ef88344d8$require$makeIterator(()=>value, "Headers", "key+value"); +} +// https://www.rfc-editor.org/rfc/rfc7230#section-3.3.2 +function $9034b7dfe607ccd7$var$shouldSendContentLength(method) { + return method !== 'GET' && method !== 'HEAD' && method !== 'OPTIONS' && method !== 'TRACE' && method !== 'CONNECT'; +} + +function $9034b7dfe607ccd7$var$writeH1(client, request) { + const { method: method, path: path, host: host, upgrade: upgrade, blocking: blocking, reset: reset } = request; + let { body: body, headers: headers, contentLength: contentLength } = request; + // https://tools.ietf.org/html/rfc7231#section-4.3.1 + // https://tools.ietf.org/html/rfc7231#section-4.3.2 + // https://tools.ietf.org/html/rfc7231#section-4.3.5 + // Sending a payload body on a request that does not + // expect it can cause undefined behavior on some + // servers and corrupt connection state. Do not + // re-use the connection for further requests. + const expectsPayload = method === 'PUT' || method === 'POST' || method === 'PATCH' || method === 'QUERY' || method === 'PROPFIND' || method === 'PROPPATCH'; + if ($bFRvW.isFormDataLike(body)) { + if (!$9034b7dfe607ccd7$var$extractBody) $9034b7dfe607ccd7$var$extractBody = (parcelRequire("8masf")).extractBody; + const [bodyStream, contentType] = $9034b7dfe607ccd7$var$extractBody(body); + if (request.contentType == null) headers.push('content-type', contentType); + body = bodyStream.stream; + contentLength = bodyStream.length; + } else if ($bFRvW.isBlobLike(body) && request.contentType == null) { + const contentType = body.type; + if (contentType) { + const contentTypeValue = `${contentType}`; + if (!$bFRvW.isValidHeaderValue(contentTypeValue)) { + $bFRvW.errorRequest(client, request, new $9034b7dfe607ccd7$require$InvalidArgumentError('invalid content-type header')); + return false; + } + headers.push('content-type', contentTypeValue); } - return $c57c7a7ef88344d8$require$makeIterator(()=>[ - ...this[$c57c7a7ef88344d8$var$kHeadersSortedMap].values() - ], "Headers", "key+value"); } - /** - * @param {(value: string, key: string, self: Headers) => void} callbackFn - * @param {unknown} thisArg - */ forEach(callbackFn, thisArg = globalThis) { - $c57c7a7ef88344d8$require$webidl.brandCheck(this, $c57c7a7ef88344d8$var$Headers); - $c57c7a7ef88344d8$require$webidl.argumentLengthCheck(arguments, 1, { - header: "Headers.forEach" - }); - if (typeof callbackFn !== "function") throw new TypeError("Failed to execute 'forEach' on 'Headers': parameter 1 is not of type 'Function'."); - for (const [key, value] of this)callbackFn.apply(thisArg, [ - value, - key, - this - ]); + if (body && typeof body.read === 'function') // Try to read EOF in order to get length. + body.read(0); + const bodyLength = $bFRvW.bodyLength(body); + contentLength = bodyLength ?? contentLength; + if (contentLength === null) contentLength = request.contentLength; + if (contentLength === 0 && !expectsPayload) // https://tools.ietf.org/html/rfc7230#section-3.3.2 + // A user agent SHOULD NOT send a Content-Length header field when + // the request message does not contain a payload body and the method + // semantics do not anticipate such a body. + contentLength = null; + // https://github.com/nodejs/undici/issues/2046 + // A user agent may send a Content-Length header with 0 value, this should be allowed. + if ($9034b7dfe607ccd7$var$shouldSendContentLength(method) && contentLength > 0 && request.contentLength !== null && request.contentLength !== contentLength) { + if (client[$9034b7dfe607ccd7$require$kStrictContentLength]) { + $bFRvW.errorRequest(client, request, new $9034b7dfe607ccd7$require$RequestContentLengthMismatchError()); + return false; + } + process.emitWarning(new $9034b7dfe607ccd7$require$RequestContentLengthMismatchError()); } - [Symbol.for("nodejs.util.inspect.custom")]() { - $c57c7a7ef88344d8$require$webidl.brandCheck(this, $c57c7a7ef88344d8$var$Headers); - return this[$c57c7a7ef88344d8$require$kHeadersList]; - } -} -$c57c7a7ef88344d8$var$Headers.prototype[Symbol.iterator] = $c57c7a7ef88344d8$var$Headers.prototype.entries; -Object.defineProperties($c57c7a7ef88344d8$var$Headers.prototype, { - append: $c57c7a7ef88344d8$require$kEnumerableProperty, - delete: $c57c7a7ef88344d8$require$kEnumerableProperty, - get: $c57c7a7ef88344d8$require$kEnumerableProperty, - has: $c57c7a7ef88344d8$require$kEnumerableProperty, - set: $c57c7a7ef88344d8$require$kEnumerableProperty, - getSetCookie: $c57c7a7ef88344d8$require$kEnumerableProperty, - keys: $c57c7a7ef88344d8$require$kEnumerableProperty, - values: $c57c7a7ef88344d8$require$kEnumerableProperty, - entries: $c57c7a7ef88344d8$require$kEnumerableProperty, - forEach: $c57c7a7ef88344d8$require$kEnumerableProperty, - [Symbol.iterator]: { - enumerable: false - }, - [Symbol.toStringTag]: { - value: "Headers", - configurable: true + const socket = client[$9034b7dfe607ccd7$require$kSocket]; + $9034b7dfe607ccd7$var$clearIdleSocketValidation(socket); + const abort = (err)=>{ + if (request.aborted || request.completed) return; + $bFRvW.errorRequest(client, request, err || new $9034b7dfe607ccd7$require$RequestAbortedError()); + $bFRvW.destroy(body); + $bFRvW.destroy(socket, new $9034b7dfe607ccd7$require$InformationalError('aborted')); + }; + try { + request.onConnect(abort); + } catch (err) { + $bFRvW.errorRequest(client, request, err); } -}); -$c57c7a7ef88344d8$require$webidl.converters.HeadersInit = function(V) { - if ($c57c7a7ef88344d8$require$webidl.util.Type(V) === "Object") { - if (V[Symbol.iterator]) return $c57c7a7ef88344d8$require$webidl.converters["sequence>"](V); - return $c57c7a7ef88344d8$require$webidl.converters["record"](V); - } - throw $c57c7a7ef88344d8$require$webidl.errors.conversionFailed({ - prefix: "Headers constructor", - argument: "Argument 1", - types: [ - "sequence>", - "record" - ] + if (request.aborted) return false; + if (method === 'HEAD') // https://github.com/mcollina/undici/issues/258 + // Close after a HEAD request to interop with misbehaving servers + // that may send a body in the response. + socket[$9034b7dfe607ccd7$require$kReset] = true; + if (upgrade || method === 'CONNECT') // On CONNECT or upgrade, block pipeline from dispatching further + // requests on this connection. + socket[$9034b7dfe607ccd7$require$kReset] = true; + if (reset != null) socket[$9034b7dfe607ccd7$require$kReset] = reset; + if (client[$9034b7dfe607ccd7$require$kMaxRequests] && socket[$9034b7dfe607ccd7$require$kCounter]++ >= client[$9034b7dfe607ccd7$require$kMaxRequests]) socket[$9034b7dfe607ccd7$require$kReset] = true; + if (blocking) socket[$9034b7dfe607ccd7$require$kBlocking] = true; + let header = `${method} ${path} HTTP/1.1\r\n`; + if (typeof host === 'string') header += `host: ${host}\r\n`; + else header += client[$9034b7dfe607ccd7$require$kHostHeader]; + if (upgrade) header += `connection: upgrade\r\nupgrade: ${upgrade}\r\n`; + else if (client[$9034b7dfe607ccd7$require$kPipelining] && !socket[$9034b7dfe607ccd7$require$kReset]) header += 'connection: keep-alive\r\n'; + else header += 'connection: close\r\n'; + if (Array.isArray(headers)) for(let n = 0; n < headers.length; n += 2){ + const key = headers[n + 0]; + const val = headers[n + 1]; + if (Array.isArray(val)) for(let i = 0; i < val.length; i++)header += `${key}: ${val[i]}\r\n`; + else header += `${key}: ${val}\r\n`; + } + if ($9034b7dfe607ccd7$require$channels.sendHeaders.hasSubscribers) $9034b7dfe607ccd7$require$channels.sendHeaders.publish({ + request: request, + headers: header, + socket: socket }); -}; -module.exports = { - fill: $c57c7a7ef88344d8$var$fill, - Headers: $c57c7a7ef88344d8$var$Headers, - HeadersList: $c57c7a7ef88344d8$var$HeadersList -}; - -}); - - -parcelRegister("gY7cH", function(module, exports) { -/* globals AbortController */ "use strict"; - -var $4ub3w = parcelRequire("4ub3w"); -var $c5a7d6780e79f770$require$extractBody = $4ub3w.extractBody; -var $c5a7d6780e79f770$require$mixinBody = $4ub3w.mixinBody; -var $c5a7d6780e79f770$require$cloneBody = $4ub3w.cloneBody; - -var $gXdj5 = parcelRequire("gXdj5"); -var $c5a7d6780e79f770$require$Headers = $gXdj5.Headers; -var $c5a7d6780e79f770$require$fillHeaders = $gXdj5.fill; -var $c5a7d6780e79f770$require$HeadersList = $gXdj5.HeadersList; - -const { FinalizationRegistry: $c5a7d6780e79f770$var$FinalizationRegistry } = (parcelRequire("kz6S0"))(); - -var $gv2nV = parcelRequire("gv2nV"); - -var $4EkpM = parcelRequire("4EkpM"); -var $c5a7d6780e79f770$require$isValidHTTPToken = $4EkpM.isValidHTTPToken; -var $c5a7d6780e79f770$require$sameOrigin = $4EkpM.sameOrigin; -var $c5a7d6780e79f770$require$normalizeMethod = $4EkpM.normalizeMethod; -var $c5a7d6780e79f770$require$makePolicyContainer = $4EkpM.makePolicyContainer; -var $c5a7d6780e79f770$require$normalizeMethodRecord = $4EkpM.normalizeMethodRecord; - -var $1ZCMb = parcelRequire("1ZCMb"); -var $c5a7d6780e79f770$require$forbiddenMethodsSet = $1ZCMb.forbiddenMethodsSet; -var $c5a7d6780e79f770$require$corsSafeListedMethodsSet = $1ZCMb.corsSafeListedMethodsSet; -var $c5a7d6780e79f770$require$referrerPolicy = $1ZCMb.referrerPolicy; -var $c5a7d6780e79f770$require$requestRedirect = $1ZCMb.requestRedirect; -var $c5a7d6780e79f770$require$requestMode = $1ZCMb.requestMode; -var $c5a7d6780e79f770$require$requestCredentials = $1ZCMb.requestCredentials; -var $c5a7d6780e79f770$require$requestCache = $1ZCMb.requestCache; -var $c5a7d6780e79f770$require$requestDuplex = $1ZCMb.requestDuplex; -const { kEnumerableProperty: $c5a7d6780e79f770$var$kEnumerableProperty } = $gv2nV; - -var $74L4J = parcelRequire("74L4J"); -var $c5a7d6780e79f770$require$kHeaders = $74L4J.kHeaders; -var $c5a7d6780e79f770$require$kSignal = $74L4J.kSignal; -var $c5a7d6780e79f770$require$kState = $74L4J.kState; -var $c5a7d6780e79f770$require$kGuard = $74L4J.kGuard; -var $c5a7d6780e79f770$require$kRealm = $74L4J.kRealm; - -var $jk0LQ = parcelRequire("jk0LQ"); -var $c5a7d6780e79f770$require$webidl = $jk0LQ.webidl; - -var $5pfdo = parcelRequire("5pfdo"); -var $c5a7d6780e79f770$require$getGlobalOrigin = $5pfdo.getGlobalOrigin; - -var $bNorT = parcelRequire("bNorT"); -var $c5a7d6780e79f770$require$URLSerializer = $bNorT.URLSerializer; - -var $hHZvh = parcelRequire("hHZvh"); -var $c5a7d6780e79f770$require$kHeadersList = $hHZvh.kHeadersList; -var $c5a7d6780e79f770$require$kConstruct = $hHZvh.kConstruct; - - -var $c5a7d6780e79f770$require$getMaxListeners = $g40fK$events.getMaxListeners; -var $c5a7d6780e79f770$require$setMaxListeners = $g40fK$events.setMaxListeners; -var $c5a7d6780e79f770$require$getEventListeners = $g40fK$events.getEventListeners; -var $c5a7d6780e79f770$require$defaultMaxListeners = $g40fK$events.defaultMaxListeners; -let $c5a7d6780e79f770$var$TransformStream = globalThis.TransformStream; -const $c5a7d6780e79f770$var$kAbortController = Symbol("abortController"); -const $c5a7d6780e79f770$var$requestFinalizer = new $c5a7d6780e79f770$var$FinalizationRegistry(({ signal: signal, abort: abort })=>{ - signal.removeEventListener("abort", abort); -}); - -// https://fetch.spec.whatwg.org/#request-class -class $c5a7d6780e79f770$var$Request { - // https://fetch.spec.whatwg.org/#dom-request - constructor(input, init = {}){ - if (input === $c5a7d6780e79f770$require$kConstruct) return; - $c5a7d6780e79f770$require$webidl.argumentLengthCheck(arguments, 1, { - header: "Request constructor" + /* istanbul ignore else: assertion */ if (!body || bodyLength === 0) $9034b7dfe607ccd7$var$writeBuffer(abort, null, client, request, socket, contentLength, header, expectsPayload); + else if ($bFRvW.isBuffer(body)) $9034b7dfe607ccd7$var$writeBuffer(abort, body, client, request, socket, contentLength, header, expectsPayload); + else if ($bFRvW.isBlobLike(body)) { + if (typeof body.stream === 'function') $9034b7dfe607ccd7$var$writeIterable(abort, body.stream(), client, request, socket, contentLength, header, expectsPayload); + else $9034b7dfe607ccd7$var$writeBlob(abort, body, client, request, socket, contentLength, header, expectsPayload); + } else if ($bFRvW.isStream(body)) $9034b7dfe607ccd7$var$writeStream(abort, body, client, request, socket, contentLength, header, expectsPayload); + else if ($bFRvW.isIterable(body)) $9034b7dfe607ccd7$var$writeIterable(abort, body, client, request, socket, contentLength, header, expectsPayload); + else $in2sP$nodeassert(false); + return true; +} +function $9034b7dfe607ccd7$var$writeStream(abort, body, client, request, socket, contentLength, header, expectsPayload) { + $in2sP$nodeassert(contentLength !== 0 || client[$9034b7dfe607ccd7$require$kRunning] === 0, 'stream body cannot be pipelined'); + let finished = false; + const writer = new $9034b7dfe607ccd7$var$AsyncWriter({ + abort: abort, + socket: socket, + request: request, + contentLength: contentLength, + client: client, + expectsPayload: expectsPayload, + header: header + }); + const onData = function(chunk) { + if (finished) return; + try { + if (!writer.write(chunk) && this.pause) this.pause(); + } catch (err) { + $bFRvW.destroy(this, err); + } + }; + const onDrain = function() { + if (finished) return; + if (body.resume) body.resume(); + }; + const onClose = function() { + // 'close' might be emitted *before* 'error' for + // broken streams. Wait a tick to avoid this case. + queueMicrotask(()=>{ + // It's only safe to remove 'error' listener after + // 'close'. + body.removeListener('error', onFinished); }); - input = $c5a7d6780e79f770$require$webidl.converters.RequestInfo(input); - init = $c5a7d6780e79f770$require$webidl.converters.RequestInit(init); - // https://html.spec.whatwg.org/multipage/webappapis.html#environment-settings-object - this[$c5a7d6780e79f770$require$kRealm] = { - settingsObject: { - baseUrl: $c5a7d6780e79f770$require$getGlobalOrigin(), - get origin () { - return this.baseUrl?.origin; - }, - policyContainer: $c5a7d6780e79f770$require$makePolicyContainer() - } - }; - // 1. Let request be null. - let request = null; - // 2. Let fallbackMode be null. - let fallbackMode = null; - // 3. Let baseURL be this’s relevant settings object’s API base URL. - const baseUrl = this[$c5a7d6780e79f770$require$kRealm].settingsObject.baseUrl; - // 4. Let signal be null. - let signal = null; - // 5. If input is a string, then: - if (typeof input === "string") { - // 1. Let parsedURL be the result of parsing input with baseURL. - // 2. If parsedURL is failure, then throw a TypeError. - let parsedURL; - try { - parsedURL = new URL(input, baseUrl); - } catch (err) { - throw new TypeError("Failed to parse URL from " + input, { - cause: err - }); + if (!finished) { + const err = new $9034b7dfe607ccd7$require$RequestAbortedError(); + queueMicrotask(()=>onFinished(err)); + } + }; + const onFinished = function(err) { + if (finished) return; + finished = true; + $in2sP$nodeassert(socket.destroyed || socket[$9034b7dfe607ccd7$require$kWriting] && client[$9034b7dfe607ccd7$require$kRunning] <= 1); + socket.off('drain', onDrain).off('error', onFinished); + body.removeListener('data', onData).removeListener('end', onFinished).removeListener('close', onClose); + if (!err) try { + writer.end(); + } catch (er) { + err = er; + } + writer.destroy(err); + if (err && (err.code !== 'UND_ERR_INFO' || err.message !== 'reset')) $bFRvW.destroy(body, err); + else $bFRvW.destroy(body); + }; + body.on('data', onData).on('end', onFinished).on('error', onFinished).on('close', onClose); + if (body.resume) body.resume(); + socket.on('drain', onDrain).on('error', onFinished); + if (body.errorEmitted ?? body.errored) setImmediate(()=>onFinished(body.errored)); + else if (body.endEmitted ?? body.readableEnded) setImmediate(()=>onFinished(null)); + if (body.closeEmitted ?? body.closed) setImmediate(onClose); +} +function $9034b7dfe607ccd7$var$writeBuffer(abort, body, client, request, socket, contentLength, header, expectsPayload) { + try { + if (!body) { + if (contentLength === 0) socket.write(`${header}content-length: 0\r\n\r\n`, 'latin1'); + else { + $in2sP$nodeassert(contentLength === null, 'no body must not have content length'); + socket.write(`${header}\r\n`, 'latin1'); } - // 3. If parsedURL includes credentials, then throw a TypeError. - if (parsedURL.username || parsedURL.password) throw new TypeError("Request cannot be constructed from a URL that includes credentials: " + input); - // 4. Set request to a new request whose URL is parsedURL. - request = $c5a7d6780e79f770$var$makeRequest({ - urlList: [ - parsedURL - ] - }); - // 5. Set fallbackMode to "cors". - fallbackMode = "cors"; - } else { - // 6. Otherwise: - // 7. Assert: input is a Request object. - $g40fK$assert(input instanceof $c5a7d6780e79f770$var$Request); - // 8. Set request to input’s request. - request = input[$c5a7d6780e79f770$require$kState]; - // 9. Set signal to input’s signal. - signal = input[$c5a7d6780e79f770$require$kSignal]; + } else if ($bFRvW.isBuffer(body)) { + $in2sP$nodeassert(contentLength === body.byteLength, 'buffer body must have content length'); + socket.cork(); + socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, 'latin1'); + socket.write(body); + socket.uncork(); + request.onBodySent(body); + if (!expectsPayload && request.reset !== false) socket[$9034b7dfe607ccd7$require$kReset] = true; } - // 7. Let origin be this’s relevant settings object’s origin. - const origin = this[$c5a7d6780e79f770$require$kRealm].settingsObject.origin; - // 8. Let window be "client". - let window = "client"; - // 9. If request’s window is an environment settings object and its origin - // is same origin with origin, then set window to request’s window. - if (request.window?.constructor?.name === "EnvironmentSettingsObject" && $c5a7d6780e79f770$require$sameOrigin(request.window, origin)) window = request.window; - // 10. If init["window"] exists and is non-null, then throw a TypeError. - if (init.window != null) throw new TypeError(`'window' option '${window}' must be null`); - // 11. If init["window"] exists, then set window to "no-window". - if ("window" in init) window = "no-window"; - // 12. Set request to a new request with the following properties: - request = $c5a7d6780e79f770$var$makeRequest({ - // URL request’s URL. - // undici implementation note: this is set as the first item in request's urlList in makeRequest - // method request’s method. - method: request.method, - // header list A copy of request’s header list. - // undici implementation note: headersList is cloned in makeRequest - headersList: request.headersList, - // unsafe-request flag Set. - unsafeRequest: request.unsafeRequest, - // client This’s relevant settings object. - client: this[$c5a7d6780e79f770$require$kRealm].settingsObject, - window: // window window. - window, - // priority request’s priority. - priority: request.priority, - // origin request’s origin. The propagation of the origin is only significant for navigation requests - // being handled by a service worker. In this scenario a request can have an origin that is different - // from the current client. - origin: request.origin, - // referrer request’s referrer. - referrer: request.referrer, - // referrer policy request’s referrer policy. - referrerPolicy: request.referrerPolicy, - // mode request’s mode. - mode: request.mode, - // credentials mode request’s credentials mode. - credentials: request.credentials, - // cache mode request’s cache mode. - cache: request.cache, - // redirect mode request’s redirect mode. - redirect: request.redirect, - // integrity metadata request’s integrity metadata. - integrity: request.integrity, - // keepalive request’s keepalive. - keepalive: request.keepalive, - // reload-navigation flag request’s reload-navigation flag. - reloadNavigation: request.reloadNavigation, - // history-navigation flag request’s history-navigation flag. - historyNavigation: request.historyNavigation, - // URL list A clone of request’s URL list. - urlList: [ - ...request.urlList - ] - }); - const initHasKey = Object.keys(init).length !== 0; - // 13. If init is not empty, then: - if (initHasKey) { - // 1. If request’s mode is "navigate", then set it to "same-origin". - if (request.mode === "navigate") request.mode = "same-origin"; - // 2. Unset request’s reload-navigation flag. - request.reloadNavigation = false; - // 3. Unset request’s history-navigation flag. - request.historyNavigation = false; - // 4. Set request’s origin to "client". - request.origin = "client"; - // 5. Set request’s referrer to "client" - request.referrer = "client"; - // 6. Set request’s referrer policy to the empty string. - request.referrerPolicy = ""; - // 7. Set request’s URL to request’s current URL. - request.url = request.urlList[request.urlList.length - 1]; - // 8. Set request’s URL list to « request’s URL ». - request.urlList = [ - request.url - ]; + request.onRequestSent(); + client[$9034b7dfe607ccd7$require$kResume](); + } catch (err) { + abort(err); + } +} +async function $9034b7dfe607ccd7$var$writeBlob(abort, body, client, request, socket, contentLength, header, expectsPayload) { + $in2sP$nodeassert(contentLength === body.size, 'blob body must have content length'); + try { + if (contentLength != null && contentLength !== body.size) throw new $9034b7dfe607ccd7$require$RequestContentLengthMismatchError(); + const buffer = Buffer.from(await body.arrayBuffer()); + socket.cork(); + socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, 'latin1'); + socket.write(buffer); + socket.uncork(); + request.onBodySent(buffer); + request.onRequestSent(); + if (!expectsPayload && request.reset !== false) socket[$9034b7dfe607ccd7$require$kReset] = true; + client[$9034b7dfe607ccd7$require$kResume](); + } catch (err) { + abort(err); + } +} +async function $9034b7dfe607ccd7$var$writeIterable(abort, body, client, request, socket, contentLength, header, expectsPayload) { + $in2sP$nodeassert(contentLength !== 0 || client[$9034b7dfe607ccd7$require$kRunning] === 0, 'iterator body cannot be pipelined'); + let callback = null; + function onDrain() { + if (callback) { + const cb = callback; + callback = null; + cb(); + } + } + const waitForDrain = ()=>new Promise((resolve, reject)=>{ + $in2sP$nodeassert(callback === null); + if (socket[$9034b7dfe607ccd7$require$kError]) reject(socket[$9034b7dfe607ccd7$require$kError]); + else callback = resolve; + }); + socket.on('close', onDrain).on('drain', onDrain); + const writer = new $9034b7dfe607ccd7$var$AsyncWriter({ + abort: abort, + socket: socket, + request: request, + contentLength: contentLength, + client: client, + expectsPayload: expectsPayload, + header: header + }); + try { + // It's up to the user to somehow abort the async iterable. + for await (const chunk of body){ + if (socket[$9034b7dfe607ccd7$require$kError]) throw socket[$9034b7dfe607ccd7$require$kError]; + if (!writer.write(chunk)) await waitForDrain(); } - // 14. If init["referrer"] exists, then: - if (init.referrer !== undefined) { - // 1. Let referrer be init["referrer"]. - const referrer = init.referrer; - // 2. If referrer is the empty string, then set request’s referrer to "no-referrer". - if (referrer === "") request.referrer = "no-referrer"; - else { - // 1. Let parsedReferrer be the result of parsing referrer with - // baseURL. - // 2. If parsedReferrer is failure, then throw a TypeError. - let parsedReferrer; - try { - parsedReferrer = new URL(referrer, baseUrl); - } catch (err) { - throw new TypeError(`Referrer "${referrer}" is not a valid URL.`, { - cause: err - }); - } - // 3. If one of the following is true - // - parsedReferrer’s scheme is "about" and path is the string "client" - // - parsedReferrer’s origin is not same origin with origin - // then set request’s referrer to "client". - if (parsedReferrer.protocol === "about:" && parsedReferrer.hostname === "client" || origin && !$c5a7d6780e79f770$require$sameOrigin(parsedReferrer, this[$c5a7d6780e79f770$require$kRealm].settingsObject.baseUrl)) request.referrer = "client"; - else // 4. Otherwise, set request’s referrer to parsedReferrer. - request.referrer = parsedReferrer; + writer.end(); + } catch (err) { + writer.destroy(err); + } finally{ + socket.off('close', onDrain).off('drain', onDrain); + } +} +class $9034b7dfe607ccd7$var$AsyncWriter { + constructor({ abort: abort, socket: socket, request: request, contentLength: contentLength, client: client, expectsPayload: expectsPayload, header: header }){ + this.socket = socket; + this.request = request; + this.contentLength = contentLength; + this.client = client; + this.bytesWritten = 0; + this.expectsPayload = expectsPayload; + this.header = header; + this.abort = abort; + socket[$9034b7dfe607ccd7$require$kWriting] = true; + } + write(chunk) { + const { socket: socket, request: request, contentLength: contentLength, client: client, bytesWritten: bytesWritten, expectsPayload: expectsPayload, header: header } = this; + if (socket[$9034b7dfe607ccd7$require$kError]) throw socket[$9034b7dfe607ccd7$require$kError]; + if (socket.destroyed) return false; + const len = Buffer.byteLength(chunk); + if (!len) return true; + // We should defer writing chunks. + if (contentLength !== null && bytesWritten + len > contentLength) { + if (client[$9034b7dfe607ccd7$require$kStrictContentLength]) throw new $9034b7dfe607ccd7$require$RequestContentLengthMismatchError(); + process.emitWarning(new $9034b7dfe607ccd7$require$RequestContentLengthMismatchError()); + } + socket.cork(); + if (bytesWritten === 0) { + if (!expectsPayload && request.reset !== false) socket[$9034b7dfe607ccd7$require$kReset] = true; + if (contentLength === null) socket.write(`${header}transfer-encoding: chunked\r\n`, 'latin1'); + else socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, 'latin1'); + } + if (contentLength === null) socket.write(`\r\n${len.toString(16)}\r\n`, 'latin1'); + this.bytesWritten += len; + const ret = socket.write(chunk); + socket.uncork(); + request.onBodySent(chunk); + if (!ret) { + if (socket[$9034b7dfe607ccd7$require$kParser].timeout && socket[$9034b7dfe607ccd7$require$kParser].timeoutType === $9034b7dfe607ccd7$var$TIMEOUT_HEADERS) // istanbul ignore else: only for jest + { + if (socket[$9034b7dfe607ccd7$require$kParser].timeout.refresh) socket[$9034b7dfe607ccd7$require$kParser].timeout.refresh(); } } - // 15. If init["referrerPolicy"] exists, then set request’s referrer policy - // to it. - if (init.referrerPolicy !== undefined) request.referrerPolicy = init.referrerPolicy; - // 16. Let mode be init["mode"] if it exists, and fallbackMode otherwise. - let mode; - if (init.mode !== undefined) mode = init.mode; - else mode = fallbackMode; - // 17. If mode is "navigate", then throw a TypeError. - if (mode === "navigate") throw $c5a7d6780e79f770$require$webidl.errors.exception({ - header: "Request constructor", - message: "invalid request mode navigate." + return ret; + } + end() { + const { socket: socket, contentLength: contentLength, client: client, bytesWritten: bytesWritten, expectsPayload: expectsPayload, header: header, request: request } = this; + request.onRequestSent(); + socket[$9034b7dfe607ccd7$require$kWriting] = false; + if (socket[$9034b7dfe607ccd7$require$kError]) throw socket[$9034b7dfe607ccd7$require$kError]; + if (socket.destroyed) return; + if (bytesWritten === 0) { + if (expectsPayload) // https://tools.ietf.org/html/rfc7230#section-3.3.2 + // A user agent SHOULD send a Content-Length in a request message when + // no Transfer-Encoding is sent and the request method defines a meaning + // for an enclosed payload body. + socket.write(`${header}content-length: 0\r\n\r\n`, 'latin1'); + else socket.write(`${header}\r\n`, 'latin1'); + } else if (contentLength === null) socket.write('\r\n0\r\n\r\n', 'latin1'); + if (contentLength !== null && bytesWritten !== contentLength) { + if (client[$9034b7dfe607ccd7$require$kStrictContentLength]) throw new $9034b7dfe607ccd7$require$RequestContentLengthMismatchError(); + else process.emitWarning(new $9034b7dfe607ccd7$require$RequestContentLengthMismatchError()); + } + if (socket[$9034b7dfe607ccd7$require$kParser].timeout && socket[$9034b7dfe607ccd7$require$kParser].timeoutType === $9034b7dfe607ccd7$var$TIMEOUT_HEADERS) // istanbul ignore else: only for jest + { + if (socket[$9034b7dfe607ccd7$require$kParser].timeout.refresh) socket[$9034b7dfe607ccd7$require$kParser].timeout.refresh(); + } + client[$9034b7dfe607ccd7$require$kResume](); + } + destroy(err) { + const { socket: socket, client: client, abort: abort } = this; + socket[$9034b7dfe607ccd7$require$kWriting] = false; + if (err) { + $in2sP$nodeassert(client[$9034b7dfe607ccd7$require$kRunning] <= 1, 'pipeline should only contain this request'); + abort(err); + } + } +} +module.exports = $9034b7dfe607ccd7$var$connectH1; + +}); +parcelRegister("edeaF", function(module, exports) { +"use strict"; +Object.defineProperty(module.exports, "__esModule", { + value: true +}); +module.exports.SPECIAL_HEADERS = module.exports.HEADER_STATE = module.exports.MINOR = module.exports.MAJOR = module.exports.CONNECTION_TOKEN_CHARS = module.exports.HEADER_CHARS = module.exports.TOKEN = module.exports.STRICT_TOKEN = module.exports.HEX = module.exports.URL_CHAR = module.exports.STRICT_URL_CHAR = module.exports.USERINFO_CHARS = module.exports.MARK = module.exports.ALPHANUM = module.exports.NUM = module.exports.HEX_MAP = module.exports.NUM_MAP = module.exports.ALPHA = module.exports.FINISH = module.exports.H_METHOD_MAP = module.exports.METHOD_MAP = module.exports.METHODS_RTSP = module.exports.METHODS_ICE = module.exports.METHODS_HTTP = module.exports.METHODS = module.exports.LENIENT_FLAGS = module.exports.FLAGS = module.exports.TYPE = module.exports.ERROR = void 0; + +var $iaDdQ = parcelRequire("iaDdQ"); +// C headers +var $a58d45a7dec2005c$var$ERROR; +(function(ERROR) { + ERROR[ERROR["OK"] = 0] = "OK"; + ERROR[ERROR["INTERNAL"] = 1] = "INTERNAL"; + ERROR[ERROR["STRICT"] = 2] = "STRICT"; + ERROR[ERROR["LF_EXPECTED"] = 3] = "LF_EXPECTED"; + ERROR[ERROR["UNEXPECTED_CONTENT_LENGTH"] = 4] = "UNEXPECTED_CONTENT_LENGTH"; + ERROR[ERROR["CLOSED_CONNECTION"] = 5] = "CLOSED_CONNECTION"; + ERROR[ERROR["INVALID_METHOD"] = 6] = "INVALID_METHOD"; + ERROR[ERROR["INVALID_URL"] = 7] = "INVALID_URL"; + ERROR[ERROR["INVALID_CONSTANT"] = 8] = "INVALID_CONSTANT"; + ERROR[ERROR["INVALID_VERSION"] = 9] = "INVALID_VERSION"; + ERROR[ERROR["INVALID_HEADER_TOKEN"] = 10] = "INVALID_HEADER_TOKEN"; + ERROR[ERROR["INVALID_CONTENT_LENGTH"] = 11] = "INVALID_CONTENT_LENGTH"; + ERROR[ERROR["INVALID_CHUNK_SIZE"] = 12] = "INVALID_CHUNK_SIZE"; + ERROR[ERROR["INVALID_STATUS"] = 13] = "INVALID_STATUS"; + ERROR[ERROR["INVALID_EOF_STATE"] = 14] = "INVALID_EOF_STATE"; + ERROR[ERROR["INVALID_TRANSFER_ENCODING"] = 15] = "INVALID_TRANSFER_ENCODING"; + ERROR[ERROR["CB_MESSAGE_BEGIN"] = 16] = "CB_MESSAGE_BEGIN"; + ERROR[ERROR["CB_HEADERS_COMPLETE"] = 17] = "CB_HEADERS_COMPLETE"; + ERROR[ERROR["CB_MESSAGE_COMPLETE"] = 18] = "CB_MESSAGE_COMPLETE"; + ERROR[ERROR["CB_CHUNK_HEADER"] = 19] = "CB_CHUNK_HEADER"; + ERROR[ERROR["CB_CHUNK_COMPLETE"] = 20] = "CB_CHUNK_COMPLETE"; + ERROR[ERROR["PAUSED"] = 21] = "PAUSED"; + ERROR[ERROR["PAUSED_UPGRADE"] = 22] = "PAUSED_UPGRADE"; + ERROR[ERROR["PAUSED_H2_UPGRADE"] = 23] = "PAUSED_H2_UPGRADE"; + ERROR[ERROR["USER"] = 24] = "USER"; +})($a58d45a7dec2005c$var$ERROR = module.exports.ERROR || (module.exports.ERROR = {})); +var $a58d45a7dec2005c$var$TYPE; +(function(TYPE) { + TYPE[TYPE["BOTH"] = 0] = "BOTH"; + TYPE[TYPE["REQUEST"] = 1] = "REQUEST"; + TYPE[TYPE["RESPONSE"] = 2] = "RESPONSE"; +})($a58d45a7dec2005c$var$TYPE = module.exports.TYPE || (module.exports.TYPE = {})); +var $a58d45a7dec2005c$var$FLAGS; +(function(FLAGS) { + FLAGS[FLAGS["CONNECTION_KEEP_ALIVE"] = 1] = "CONNECTION_KEEP_ALIVE"; + FLAGS[FLAGS["CONNECTION_CLOSE"] = 2] = "CONNECTION_CLOSE"; + FLAGS[FLAGS["CONNECTION_UPGRADE"] = 4] = "CONNECTION_UPGRADE"; + FLAGS[FLAGS["CHUNKED"] = 8] = "CHUNKED"; + FLAGS[FLAGS["UPGRADE"] = 16] = "UPGRADE"; + FLAGS[FLAGS["CONTENT_LENGTH"] = 32] = "CONTENT_LENGTH"; + FLAGS[FLAGS["SKIPBODY"] = 64] = "SKIPBODY"; + FLAGS[FLAGS["TRAILING"] = 128] = "TRAILING"; + // 1 << 8 is unused + FLAGS[FLAGS["TRANSFER_ENCODING"] = 512] = "TRANSFER_ENCODING"; +})($a58d45a7dec2005c$var$FLAGS = module.exports.FLAGS || (module.exports.FLAGS = {})); +var $a58d45a7dec2005c$var$LENIENT_FLAGS; +(function(LENIENT_FLAGS) { + LENIENT_FLAGS[LENIENT_FLAGS["HEADERS"] = 1] = "HEADERS"; + LENIENT_FLAGS[LENIENT_FLAGS["CHUNKED_LENGTH"] = 2] = "CHUNKED_LENGTH"; + LENIENT_FLAGS[LENIENT_FLAGS["KEEP_ALIVE"] = 4] = "KEEP_ALIVE"; +})($a58d45a7dec2005c$var$LENIENT_FLAGS = module.exports.LENIENT_FLAGS || (module.exports.LENIENT_FLAGS = {})); +var $a58d45a7dec2005c$var$METHODS; +(function(METHODS) { + METHODS[METHODS["DELETE"] = 0] = "DELETE"; + METHODS[METHODS["GET"] = 1] = "GET"; + METHODS[METHODS["HEAD"] = 2] = "HEAD"; + METHODS[METHODS["POST"] = 3] = "POST"; + METHODS[METHODS["PUT"] = 4] = "PUT"; + /* pathological */ METHODS[METHODS["CONNECT"] = 5] = "CONNECT"; + METHODS[METHODS["OPTIONS"] = 6] = "OPTIONS"; + METHODS[METHODS["TRACE"] = 7] = "TRACE"; + /* WebDAV */ METHODS[METHODS["COPY"] = 8] = "COPY"; + METHODS[METHODS["LOCK"] = 9] = "LOCK"; + METHODS[METHODS["MKCOL"] = 10] = "MKCOL"; + METHODS[METHODS["MOVE"] = 11] = "MOVE"; + METHODS[METHODS["PROPFIND"] = 12] = "PROPFIND"; + METHODS[METHODS["PROPPATCH"] = 13] = "PROPPATCH"; + METHODS[METHODS["SEARCH"] = 14] = "SEARCH"; + METHODS[METHODS["UNLOCK"] = 15] = "UNLOCK"; + METHODS[METHODS["BIND"] = 16] = "BIND"; + METHODS[METHODS["REBIND"] = 17] = "REBIND"; + METHODS[METHODS["UNBIND"] = 18] = "UNBIND"; + METHODS[METHODS["ACL"] = 19] = "ACL"; + /* subversion */ METHODS[METHODS["REPORT"] = 20] = "REPORT"; + METHODS[METHODS["MKACTIVITY"] = 21] = "MKACTIVITY"; + METHODS[METHODS["CHECKOUT"] = 22] = "CHECKOUT"; + METHODS[METHODS["MERGE"] = 23] = "MERGE"; + /* upnp */ METHODS[METHODS["M-SEARCH"] = 24] = "M-SEARCH"; + METHODS[METHODS["NOTIFY"] = 25] = "NOTIFY"; + METHODS[METHODS["SUBSCRIBE"] = 26] = "SUBSCRIBE"; + METHODS[METHODS["UNSUBSCRIBE"] = 27] = "UNSUBSCRIBE"; + /* RFC-5789 */ METHODS[METHODS["PATCH"] = 28] = "PATCH"; + METHODS[METHODS["PURGE"] = 29] = "PURGE"; + /* CalDAV */ METHODS[METHODS["MKCALENDAR"] = 30] = "MKCALENDAR"; + /* RFC-2068, section 19.6.1.2 */ METHODS[METHODS["LINK"] = 31] = "LINK"; + METHODS[METHODS["UNLINK"] = 32] = "UNLINK"; + /* icecast */ METHODS[METHODS["SOURCE"] = 33] = "SOURCE"; + /* RFC-7540, section 11.6 */ METHODS[METHODS["PRI"] = 34] = "PRI"; + /* RFC-2326 RTSP */ METHODS[METHODS["DESCRIBE"] = 35] = "DESCRIBE"; + METHODS[METHODS["ANNOUNCE"] = 36] = "ANNOUNCE"; + METHODS[METHODS["SETUP"] = 37] = "SETUP"; + METHODS[METHODS["PLAY"] = 38] = "PLAY"; + METHODS[METHODS["PAUSE"] = 39] = "PAUSE"; + METHODS[METHODS["TEARDOWN"] = 40] = "TEARDOWN"; + METHODS[METHODS["GET_PARAMETER"] = 41] = "GET_PARAMETER"; + METHODS[METHODS["SET_PARAMETER"] = 42] = "SET_PARAMETER"; + METHODS[METHODS["REDIRECT"] = 43] = "REDIRECT"; + METHODS[METHODS["RECORD"] = 44] = "RECORD"; + /* RAOP */ METHODS[METHODS["FLUSH"] = 45] = "FLUSH"; +})($a58d45a7dec2005c$var$METHODS = module.exports.METHODS || (module.exports.METHODS = {})); +module.exports.METHODS_HTTP = [ + $a58d45a7dec2005c$var$METHODS.DELETE, + $a58d45a7dec2005c$var$METHODS.GET, + $a58d45a7dec2005c$var$METHODS.HEAD, + $a58d45a7dec2005c$var$METHODS.POST, + $a58d45a7dec2005c$var$METHODS.PUT, + $a58d45a7dec2005c$var$METHODS.CONNECT, + $a58d45a7dec2005c$var$METHODS.OPTIONS, + $a58d45a7dec2005c$var$METHODS.TRACE, + $a58d45a7dec2005c$var$METHODS.COPY, + $a58d45a7dec2005c$var$METHODS.LOCK, + $a58d45a7dec2005c$var$METHODS.MKCOL, + $a58d45a7dec2005c$var$METHODS.MOVE, + $a58d45a7dec2005c$var$METHODS.PROPFIND, + $a58d45a7dec2005c$var$METHODS.PROPPATCH, + $a58d45a7dec2005c$var$METHODS.SEARCH, + $a58d45a7dec2005c$var$METHODS.UNLOCK, + $a58d45a7dec2005c$var$METHODS.BIND, + $a58d45a7dec2005c$var$METHODS.REBIND, + $a58d45a7dec2005c$var$METHODS.UNBIND, + $a58d45a7dec2005c$var$METHODS.ACL, + $a58d45a7dec2005c$var$METHODS.REPORT, + $a58d45a7dec2005c$var$METHODS.MKACTIVITY, + $a58d45a7dec2005c$var$METHODS.CHECKOUT, + $a58d45a7dec2005c$var$METHODS.MERGE, + $a58d45a7dec2005c$var$METHODS['M-SEARCH'], + $a58d45a7dec2005c$var$METHODS.NOTIFY, + $a58d45a7dec2005c$var$METHODS.SUBSCRIBE, + $a58d45a7dec2005c$var$METHODS.UNSUBSCRIBE, + $a58d45a7dec2005c$var$METHODS.PATCH, + $a58d45a7dec2005c$var$METHODS.PURGE, + $a58d45a7dec2005c$var$METHODS.MKCALENDAR, + $a58d45a7dec2005c$var$METHODS.LINK, + $a58d45a7dec2005c$var$METHODS.UNLINK, + $a58d45a7dec2005c$var$METHODS.PRI, + // TODO(indutny): should we allow it with HTTP? + $a58d45a7dec2005c$var$METHODS.SOURCE +]; +module.exports.METHODS_ICE = [ + $a58d45a7dec2005c$var$METHODS.SOURCE +]; +module.exports.METHODS_RTSP = [ + $a58d45a7dec2005c$var$METHODS.OPTIONS, + $a58d45a7dec2005c$var$METHODS.DESCRIBE, + $a58d45a7dec2005c$var$METHODS.ANNOUNCE, + $a58d45a7dec2005c$var$METHODS.SETUP, + $a58d45a7dec2005c$var$METHODS.PLAY, + $a58d45a7dec2005c$var$METHODS.PAUSE, + $a58d45a7dec2005c$var$METHODS.TEARDOWN, + $a58d45a7dec2005c$var$METHODS.GET_PARAMETER, + $a58d45a7dec2005c$var$METHODS.SET_PARAMETER, + $a58d45a7dec2005c$var$METHODS.REDIRECT, + $a58d45a7dec2005c$var$METHODS.RECORD, + $a58d45a7dec2005c$var$METHODS.FLUSH, + // For AirPlay + $a58d45a7dec2005c$var$METHODS.GET, + $a58d45a7dec2005c$var$METHODS.POST +]; +module.exports.METHOD_MAP = $iaDdQ.enumToMap($a58d45a7dec2005c$var$METHODS); +module.exports.H_METHOD_MAP = {}; +Object.keys(module.exports.METHOD_MAP).forEach((key)=>{ + if (/^H/.test(key)) module.exports.H_METHOD_MAP[key] = module.exports.METHOD_MAP[key]; +}); +var $a58d45a7dec2005c$var$FINISH; +(function(FINISH) { + FINISH[FINISH["SAFE"] = 0] = "SAFE"; + FINISH[FINISH["SAFE_WITH_CB"] = 1] = "SAFE_WITH_CB"; + FINISH[FINISH["UNSAFE"] = 2] = "UNSAFE"; +})($a58d45a7dec2005c$var$FINISH = module.exports.FINISH || (module.exports.FINISH = {})); +module.exports.ALPHA = []; +for(let i = 'A'.charCodeAt(0); i <= 'Z'.charCodeAt(0); i++){ + // Upper case + module.exports.ALPHA.push(String.fromCharCode(i)); + // Lower case + module.exports.ALPHA.push(String.fromCharCode(i + 0x20)); +} +module.exports.NUM_MAP = { + 0: 0, + 1: 1, + 2: 2, + 3: 3, + 4: 4, + 5: 5, + 6: 6, + 7: 7, + 8: 8, + 9: 9 +}; +module.exports.HEX_MAP = { + 0: 0, + 1: 1, + 2: 2, + 3: 3, + 4: 4, + 5: 5, + 6: 6, + 7: 7, + 8: 8, + 9: 9, + A: 0XA, + B: 0XB, + C: 0XC, + D: 0XD, + E: 0XE, + F: 0XF, + a: 0xa, + b: 0xb, + c: 0xc, + d: 0xd, + e: 0xe, + f: 0xf +}; +module.exports.NUM = [ + '0', + '1', + '2', + '3', + '4', + '5', + '6', + '7', + '8', + '9' +]; +module.exports.ALPHANUM = module.exports.ALPHA.concat(module.exports.NUM); +module.exports.MARK = [ + '-', + '_', + '.', + '!', + '~', + '*', + '\'', + '(', + ')' +]; +module.exports.USERINFO_CHARS = module.exports.ALPHANUM.concat(module.exports.MARK).concat([ + '%', + ';', + ':', + '&', + '=', + '+', + '$', + ',' +]); +// TODO(indutny): use RFC +module.exports.STRICT_URL_CHAR = [ + '!', + '"', + '$', + '%', + '&', + '\'', + '(', + ')', + '*', + '+', + ',', + '-', + '.', + '/', + ':', + ';', + '<', + '=', + '>', + '@', + '[', + '\\', + ']', + '^', + '_', + '`', + '{', + '|', + '}', + '~' +].concat(module.exports.ALPHANUM); +module.exports.URL_CHAR = module.exports.STRICT_URL_CHAR.concat([ + '\t', + '\f' +]); +// All characters with 0x80 bit set to 1 +for(let i = 0x80; i <= 0xff; i++)module.exports.URL_CHAR.push(i); +module.exports.HEX = module.exports.NUM.concat([ + 'a', + 'b', + 'c', + 'd', + 'e', + 'f', + 'A', + 'B', + 'C', + 'D', + 'E', + 'F' +]); +/* Tokens as defined by rfc 2616. Also lowercases them. + * token = 1* + * separators = "(" | ")" | "<" | ">" | "@" + * | "," | ";" | ":" | "\" | <"> + * | "/" | "[" | "]" | "?" | "=" + * | "{" | "}" | SP | HT + */ module.exports.STRICT_TOKEN = [ + '!', + '#', + '$', + '%', + '&', + '\'', + '*', + '+', + '-', + '.', + '^', + '_', + '`', + '|', + '~' +].concat(module.exports.ALPHANUM); +module.exports.TOKEN = module.exports.STRICT_TOKEN.concat([ + ' ' +]); +/* + * Verify that a char is a valid visible (printable) US-ASCII + * character or %x80-FF + */ module.exports.HEADER_CHARS = [ + '\t' +]; +for(let i = 32; i <= 255; i++)if (i !== 127) module.exports.HEADER_CHARS.push(i); +// ',' = \x44 +module.exports.CONNECTION_TOKEN_CHARS = module.exports.HEADER_CHARS.filter((c)=>c !== 44); +module.exports.MAJOR = module.exports.NUM_MAP; +module.exports.MINOR = module.exports.MAJOR; +var $a58d45a7dec2005c$var$HEADER_STATE; +(function(HEADER_STATE) { + HEADER_STATE[HEADER_STATE["GENERAL"] = 0] = "GENERAL"; + HEADER_STATE[HEADER_STATE["CONNECTION"] = 1] = "CONNECTION"; + HEADER_STATE[HEADER_STATE["CONTENT_LENGTH"] = 2] = "CONTENT_LENGTH"; + HEADER_STATE[HEADER_STATE["TRANSFER_ENCODING"] = 3] = "TRANSFER_ENCODING"; + HEADER_STATE[HEADER_STATE["UPGRADE"] = 4] = "UPGRADE"; + HEADER_STATE[HEADER_STATE["CONNECTION_KEEP_ALIVE"] = 5] = "CONNECTION_KEEP_ALIVE"; + HEADER_STATE[HEADER_STATE["CONNECTION_CLOSE"] = 6] = "CONNECTION_CLOSE"; + HEADER_STATE[HEADER_STATE["CONNECTION_UPGRADE"] = 7] = "CONNECTION_UPGRADE"; + HEADER_STATE[HEADER_STATE["TRANSFER_ENCODING_CHUNKED"] = 8] = "TRANSFER_ENCODING_CHUNKED"; +})($a58d45a7dec2005c$var$HEADER_STATE = module.exports.HEADER_STATE || (module.exports.HEADER_STATE = {})); +module.exports.SPECIAL_HEADERS = { + 'connection': $a58d45a7dec2005c$var$HEADER_STATE.CONNECTION, + 'content-length': $a58d45a7dec2005c$var$HEADER_STATE.CONTENT_LENGTH, + 'proxy-connection': $a58d45a7dec2005c$var$HEADER_STATE.CONNECTION, + 'transfer-encoding': $a58d45a7dec2005c$var$HEADER_STATE.TRANSFER_ENCODING, + 'upgrade': $a58d45a7dec2005c$var$HEADER_STATE.UPGRADE +}; //# sourceMappingURL=constants.js.map + +}); +parcelRegister("iaDdQ", function(module, exports) { +"use strict"; +Object.defineProperty(module.exports, "__esModule", { + value: true +}); +module.exports.enumToMap = void 0; +function $d3a795e197eeb12b$var$enumToMap(obj) { + const res = {}; + Object.keys(obj).forEach((key)=>{ + const value = obj[key]; + if (typeof value === 'number') res[key] = value; + }); + return res; +} +module.exports.enumToMap = $d3a795e197eeb12b$var$enumToMap; //# sourceMappingURL=utils.js.map + +}); + + + +parcelRegister("4m0uI", function(module, exports) { +'use strict'; + + +var $32b999aacc7841a3$require$pipeline = $in2sP$nodestream.pipeline; + +var $bFRvW = parcelRequire("bFRvW"); + +var $gTXXK = parcelRequire("gTXXK"); +var $32b999aacc7841a3$require$RequestContentLengthMismatchError = $gTXXK.RequestContentLengthMismatchError; +var $32b999aacc7841a3$require$RequestAbortedError = $gTXXK.RequestAbortedError; +var $32b999aacc7841a3$require$SocketError = $gTXXK.SocketError; +var $32b999aacc7841a3$require$InformationalError = $gTXXK.InformationalError; + +var $gNVEc = parcelRequire("gNVEc"); +var $32b999aacc7841a3$require$kUrl = $gNVEc.kUrl; +var $32b999aacc7841a3$require$kReset = $gNVEc.kReset; +var $32b999aacc7841a3$require$kClient = $gNVEc.kClient; +var $32b999aacc7841a3$require$kRunning = $gNVEc.kRunning; +var $32b999aacc7841a3$require$kPending = $gNVEc.kPending; +var $32b999aacc7841a3$require$kQueue = $gNVEc.kQueue; +var $32b999aacc7841a3$require$kPendingIdx = $gNVEc.kPendingIdx; +var $32b999aacc7841a3$require$kRunningIdx = $gNVEc.kRunningIdx; +var $32b999aacc7841a3$require$kError = $gNVEc.kError; +var $32b999aacc7841a3$require$kSocket = $gNVEc.kSocket; +var $32b999aacc7841a3$require$kStrictContentLength = $gNVEc.kStrictContentLength; +var $32b999aacc7841a3$require$kOnError = $gNVEc.kOnError; +var $32b999aacc7841a3$require$kMaxConcurrentStreams = $gNVEc.kMaxConcurrentStreams; +var $32b999aacc7841a3$require$kHTTP2Session = $gNVEc.kHTTP2Session; +var $32b999aacc7841a3$require$kResume = $gNVEc.kResume; +var $32b999aacc7841a3$require$kSize = $gNVEc.kSize; +var $32b999aacc7841a3$require$kHTTPContext = $gNVEc.kHTTPContext; +const $32b999aacc7841a3$var$kOpenStreams = Symbol('open streams'); +let $32b999aacc7841a3$var$extractBody; +// Experimental +let $32b999aacc7841a3$var$h2ExperimentalWarned = false; +/** @type {import('http2')} */ let $32b999aacc7841a3$var$http2; + +try { + $32b999aacc7841a3$var$http2 = $32b999aacc7841a3$import$2ec4a6dcfc1e0844; +} catch { + // @ts-ignore + $32b999aacc7841a3$var$http2 = { + constants: {} + }; +} +const { constants: { HTTP2_HEADER_AUTHORITY: $32b999aacc7841a3$var$HTTP2_HEADER_AUTHORITY, HTTP2_HEADER_METHOD: $32b999aacc7841a3$var$HTTP2_HEADER_METHOD, HTTP2_HEADER_PATH: $32b999aacc7841a3$var$HTTP2_HEADER_PATH, HTTP2_HEADER_SCHEME: $32b999aacc7841a3$var$HTTP2_HEADER_SCHEME, HTTP2_HEADER_CONTENT_LENGTH: $32b999aacc7841a3$var$HTTP2_HEADER_CONTENT_LENGTH, HTTP2_HEADER_EXPECT: $32b999aacc7841a3$var$HTTP2_HEADER_EXPECT, HTTP2_HEADER_STATUS: $32b999aacc7841a3$var$HTTP2_HEADER_STATUS } } = $32b999aacc7841a3$var$http2; +function $32b999aacc7841a3$var$parseH2Headers(headers) { + const result = []; + for (const [name, value] of Object.entries(headers)){ + // h2 may concat the header value by array + // e.g. Set-Cookie + if (Array.isArray(value)) for (const subvalue of value)// we need to provide each header value of header name + // because the headers handler expect name-value pair + result.push(Buffer.from(name), Buffer.from(subvalue)); + else result.push(Buffer.from(name), Buffer.from(value)); + } + return result; +} +async function $32b999aacc7841a3$var$connectH2(client, socket) { + client[$32b999aacc7841a3$require$kSocket] = socket; + if (!$32b999aacc7841a3$var$h2ExperimentalWarned) { + $32b999aacc7841a3$var$h2ExperimentalWarned = true; + process.emitWarning('H2 support is experimental, expect them to change at any time.', { + code: 'UNDICI-H2' }); - // 18. If mode is non-null, set request’s mode to mode. - if (mode != null) request.mode = mode; - // 19. If init["credentials"] exists, then set request’s credentials mode - // to it. - if (init.credentials !== undefined) request.credentials = init.credentials; - // 18. If init["cache"] exists, then set request’s cache mode to it. - if (init.cache !== undefined) request.cache = init.cache; - // 21. If request’s cache mode is "only-if-cached" and request’s mode is - // not "same-origin", then throw a TypeError. - if (request.cache === "only-if-cached" && request.mode !== "same-origin") throw new TypeError("'only-if-cached' can be set only with 'same-origin' mode"); - // 22. If init["redirect"] exists, then set request’s redirect mode to it. - if (init.redirect !== undefined) request.redirect = init.redirect; - // 23. If init["integrity"] exists, then set request’s integrity metadata to it. - if (init.integrity != null) request.integrity = String(init.integrity); - // 24. If init["keepalive"] exists, then set request’s keepalive to it. - if (init.keepalive !== undefined) request.keepalive = Boolean(init.keepalive); - // 25. If init["method"] exists, then: - if (init.method !== undefined) { - // 1. Let method be init["method"]. - let method = init.method; - // 2. If method is not a method or method is a forbidden method, then - // throw a TypeError. - if (!$c5a7d6780e79f770$require$isValidHTTPToken(method)) throw new TypeError(`'${method}' is not a valid HTTP method.`); - if ($c5a7d6780e79f770$require$forbiddenMethodsSet.has(method.toUpperCase())) throw new TypeError(`'${method}' HTTP method is unsupported.`); - // 3. Normalize method. - method = $c5a7d6780e79f770$require$normalizeMethodRecord[method] ?? $c5a7d6780e79f770$require$normalizeMethod(method); - // 4. Set request’s method to method. - request.method = method; - } - // 26. If init["signal"] exists, then set signal to it. - if (init.signal !== undefined) signal = init.signal; - // 27. Set this’s request to request. - this[$c5a7d6780e79f770$require$kState] = request; - // 28. Set this’s signal to a new AbortSignal object with this’s relevant - // Realm. - // TODO: could this be simplified with AbortSignal.any - // (https://dom.spec.whatwg.org/#dom-abortsignal-any) - const ac = new AbortController(); - this[$c5a7d6780e79f770$require$kSignal] = ac.signal; - this[$c5a7d6780e79f770$require$kSignal][$c5a7d6780e79f770$require$kRealm] = this[$c5a7d6780e79f770$require$kRealm]; - // 29. If signal is not null, then make this’s signal follow signal. - if (signal != null) { - if (!signal || typeof signal.aborted !== "boolean" || typeof signal.addEventListener !== "function") throw new TypeError("Failed to construct 'Request': member signal is not of type AbortSignal."); - if (signal.aborted) ac.abort(signal.reason); - else { - // Keep a strong ref to ac while request object - // is alive. This is needed to prevent AbortController - // from being prematurely garbage collected. - // See, https://github.com/nodejs/undici/issues/1926. - this[$c5a7d6780e79f770$var$kAbortController] = ac; - const acRef = new WeakRef(ac); - const abort = function() { - const ac = acRef.deref(); - if (ac !== undefined) ac.abort(this.reason); - }; - // Third-party AbortControllers may not work with these. - // See, https://github.com/nodejs/undici/pull/1910#issuecomment-1464495619. - try { - // If the max amount of listeners is equal to the default, increase it - // This is only available in node >= v19.9.0 - if (typeof $c5a7d6780e79f770$require$getMaxListeners === "function" && $c5a7d6780e79f770$require$getMaxListeners(signal) === $c5a7d6780e79f770$require$defaultMaxListeners) $c5a7d6780e79f770$require$setMaxListeners(100, signal); - else if ($c5a7d6780e79f770$require$getEventListeners(signal, "abort").length >= $c5a7d6780e79f770$require$defaultMaxListeners) $c5a7d6780e79f770$require$setMaxListeners(100, signal); - } catch {} - $gv2nV.addAbortListener(signal, abort); - $c5a7d6780e79f770$var$requestFinalizer.register(ac, { - signal: signal, - abort: abort - }); + } + const session = $32b999aacc7841a3$var$http2.connect(client[$32b999aacc7841a3$require$kUrl], { + createConnection: ()=>socket, + peerMaxConcurrentStreams: client[$32b999aacc7841a3$require$kMaxConcurrentStreams] + }); + session[$32b999aacc7841a3$var$kOpenStreams] = 0; + session[$32b999aacc7841a3$require$kClient] = client; + session[$32b999aacc7841a3$require$kSocket] = socket; + $bFRvW.addListener(session, 'error', $32b999aacc7841a3$var$onHttp2SessionError); + $bFRvW.addListener(session, 'frameError', $32b999aacc7841a3$var$onHttp2FrameError); + $bFRvW.addListener(session, 'end', $32b999aacc7841a3$var$onHttp2SessionEnd); + $bFRvW.addListener(session, 'goaway', $32b999aacc7841a3$var$onHTTP2GoAway); + $bFRvW.addListener(session, 'close', function() { + const { [$32b999aacc7841a3$require$kClient]: client } = this; + const { [$32b999aacc7841a3$require$kSocket]: socket } = client; + const err = this[$32b999aacc7841a3$require$kSocket][$32b999aacc7841a3$require$kError] || this[$32b999aacc7841a3$require$kError] || new $32b999aacc7841a3$require$SocketError('closed', $bFRvW.getSocketInfo(socket)); + client[$32b999aacc7841a3$require$kHTTP2Session] = null; + if (client.destroyed) { + $in2sP$nodeassert(client[$32b999aacc7841a3$require$kPending] === 0); + // Fail entire queue. + const requests = client[$32b999aacc7841a3$require$kQueue].splice(client[$32b999aacc7841a3$require$kRunningIdx]); + for(let i = 0; i < requests.length; i++){ + const request = requests[i]; + $bFRvW.errorRequest(client, request, err); } } - // 30. Set this’s headers to a new Headers object with this’s relevant - // Realm, whose header list is request’s header list and guard is - // "request". - this[$c5a7d6780e79f770$require$kHeaders] = new $c5a7d6780e79f770$require$Headers($c5a7d6780e79f770$require$kConstruct); - this[$c5a7d6780e79f770$require$kHeaders][$c5a7d6780e79f770$require$kHeadersList] = request.headersList; - this[$c5a7d6780e79f770$require$kHeaders][$c5a7d6780e79f770$require$kGuard] = "request"; - this[$c5a7d6780e79f770$require$kHeaders][$c5a7d6780e79f770$require$kRealm] = this[$c5a7d6780e79f770$require$kRealm]; - // 31. If this’s request’s mode is "no-cors", then: - if (mode === "no-cors") { - // 1. If this’s request’s method is not a CORS-safelisted method, - // then throw a TypeError. - if (!$c5a7d6780e79f770$require$corsSafeListedMethodsSet.has(request.method)) throw new TypeError(`'${request.method} is unsupported in no-cors mode.`); - // 2. Set this’s headers’s guard to "request-no-cors". - this[$c5a7d6780e79f770$require$kHeaders][$c5a7d6780e79f770$require$kGuard] = "request-no-cors"; + }); + session.unref(); + client[$32b999aacc7841a3$require$kHTTP2Session] = session; + socket[$32b999aacc7841a3$require$kHTTP2Session] = session; + $bFRvW.addListener(socket, 'error', function(err) { + $in2sP$nodeassert(err.code !== 'ERR_TLS_CERT_ALTNAME_INVALID'); + this[$32b999aacc7841a3$require$kError] = err; + this[$32b999aacc7841a3$require$kClient][$32b999aacc7841a3$require$kOnError](err); + }); + $bFRvW.addListener(socket, 'end', function() { + $bFRvW.destroy(this, new $32b999aacc7841a3$require$SocketError('other side closed', $bFRvW.getSocketInfo(this))); + }); + $bFRvW.addListener(socket, 'close', function() { + const err = this[$32b999aacc7841a3$require$kError] || new $32b999aacc7841a3$require$SocketError('closed', $bFRvW.getSocketInfo(this)); + client[$32b999aacc7841a3$require$kSocket] = null; + if (this[$32b999aacc7841a3$require$kHTTP2Session] != null) this[$32b999aacc7841a3$require$kHTTP2Session].destroy(err); + client[$32b999aacc7841a3$require$kPendingIdx] = client[$32b999aacc7841a3$require$kRunningIdx]; + $in2sP$nodeassert(client[$32b999aacc7841a3$require$kRunning] === 0); + client.emit('disconnect', client[$32b999aacc7841a3$require$kUrl], [ + client + ], err); + client[$32b999aacc7841a3$require$kResume](); + }); + let closed = false; + socket.on('close', ()=>{ + closed = true; + }); + return { + version: 'h2', + defaultPipelining: Infinity, + write (...args) { + return $32b999aacc7841a3$var$writeH2(client, ...args); + }, + resume () { + $32b999aacc7841a3$var$resumeH2(client); + }, + destroy (err, callback) { + if (closed) queueMicrotask(callback); + else // Destroying the socket will trigger the session close + socket.destroy(err).on('close', callback); + }, + get destroyed () { + return socket.destroyed; + }, + busy () { + return false; } - // 32. If init is not empty, then: - if (initHasKey) { - /** @type {HeadersList} */ const headersList = this[$c5a7d6780e79f770$require$kHeaders][$c5a7d6780e79f770$require$kHeadersList]; - // 1. Let headers be a copy of this’s headers and its associated header - // list. - // 2. If init["headers"] exists, then set headers to init["headers"]. - const headers = init.headers !== undefined ? init.headers : new $c5a7d6780e79f770$require$HeadersList(headersList); - // 3. Empty this’s headers’s header list. - headersList.clear(); - // 4. If headers is a Headers object, then for each header in its header - // list, append header’s name/header’s value to this’s headers. - if (headers instanceof $c5a7d6780e79f770$require$HeadersList) { - for (const [key, val] of headers)headersList.append(key, val); - // Note: Copy the `set-cookie` meta-data. - headersList.cookies = headers.cookies; - } else // 5. Otherwise, fill this’s headers with headers. - $c5a7d6780e79f770$require$fillHeaders(this[$c5a7d6780e79f770$require$kHeaders], headers); + }; +} +function $32b999aacc7841a3$var$resumeH2(client) { + const socket = client[$32b999aacc7841a3$require$kSocket]; + if (socket?.destroyed === false) { + if (client[$32b999aacc7841a3$require$kSize] === 0 && client[$32b999aacc7841a3$require$kMaxConcurrentStreams] === 0) { + socket.unref(); + client[$32b999aacc7841a3$require$kHTTP2Session].unref(); + } else { + socket.ref(); + client[$32b999aacc7841a3$require$kHTTP2Session].ref(); } - // 33. Let inputBody be input’s request’s body if input is a Request - // object; otherwise null. - const inputBody = input instanceof $c5a7d6780e79f770$var$Request ? input[$c5a7d6780e79f770$require$kState].body : null; - // 34. If either init["body"] exists and is non-null or inputBody is - // non-null, and request’s method is `GET` or `HEAD`, then throw a - // TypeError. - if ((init.body != null || inputBody != null) && (request.method === "GET" || request.method === "HEAD")) throw new TypeError("Request with GET/HEAD method cannot have body."); - // 35. Let initBody be null. - let initBody = null; - // 36. If init["body"] exists and is non-null, then: - if (init.body != null) { - // 1. Let Content-Type be null. - // 2. Set initBody and Content-Type to the result of extracting - // init["body"], with keepalive set to request’s keepalive. - const [extractedBody, contentType] = $c5a7d6780e79f770$require$extractBody(init.body, request.keepalive); - initBody = extractedBody; - // 3, If Content-Type is non-null and this’s headers’s header list does - // not contain `Content-Type`, then append `Content-Type`/Content-Type to - // this’s headers. - if (contentType && !this[$c5a7d6780e79f770$require$kHeaders][$c5a7d6780e79f770$require$kHeadersList].contains("content-type")) this[$c5a7d6780e79f770$require$kHeaders].append("content-type", contentType); + } +} +function $32b999aacc7841a3$var$onHttp2SessionError(err) { + $in2sP$nodeassert(err.code !== 'ERR_TLS_CERT_ALTNAME_INVALID'); + this[$32b999aacc7841a3$require$kSocket][$32b999aacc7841a3$require$kError] = err; + this[$32b999aacc7841a3$require$kClient][$32b999aacc7841a3$require$kOnError](err); +} +function $32b999aacc7841a3$var$onHttp2FrameError(type, code, id) { + if (id === 0) { + const err = new $32b999aacc7841a3$require$InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`); + this[$32b999aacc7841a3$require$kSocket][$32b999aacc7841a3$require$kError] = err; + this[$32b999aacc7841a3$require$kClient][$32b999aacc7841a3$require$kOnError](err); + } +} +function $32b999aacc7841a3$var$onHttp2SessionEnd() { + const err = new $32b999aacc7841a3$require$SocketError('other side closed', $bFRvW.getSocketInfo(this[$32b999aacc7841a3$require$kSocket])); + this.destroy(err); + $bFRvW.destroy(this[$32b999aacc7841a3$require$kSocket], err); +} +/** + * This is the root cause of #3011 + * We need to handle GOAWAY frames properly, and trigger the session close + * along with the socket right away + */ function $32b999aacc7841a3$var$onHTTP2GoAway(code) { + // We cannot recover, so best to close the session and the socket + const err = this[$32b999aacc7841a3$require$kError] || new $32b999aacc7841a3$require$SocketError(`HTTP/2: "GOAWAY" frame received with code ${code}`, $bFRvW.getSocketInfo(this)); + const client = this[$32b999aacc7841a3$require$kClient]; + client[$32b999aacc7841a3$require$kSocket] = null; + client[$32b999aacc7841a3$require$kHTTPContext] = null; + if (this[$32b999aacc7841a3$require$kHTTP2Session] != null) { + this[$32b999aacc7841a3$require$kHTTP2Session].destroy(err); + this[$32b999aacc7841a3$require$kHTTP2Session] = null; + } + $bFRvW.destroy(this[$32b999aacc7841a3$require$kSocket], err); + // Fail head of pipeline. + if (client[$32b999aacc7841a3$require$kRunningIdx] < client[$32b999aacc7841a3$require$kQueue].length) { + const request = client[$32b999aacc7841a3$require$kQueue][client[$32b999aacc7841a3$require$kRunningIdx]]; + client[$32b999aacc7841a3$require$kQueue][client[$32b999aacc7841a3$require$kRunningIdx]++] = null; + $bFRvW.errorRequest(client, request, err); + client[$32b999aacc7841a3$require$kPendingIdx] = client[$32b999aacc7841a3$require$kRunningIdx]; + } + $in2sP$nodeassert(client[$32b999aacc7841a3$require$kRunning] === 0); + client.emit('disconnect', client[$32b999aacc7841a3$require$kUrl], [ + client + ], err); + client[$32b999aacc7841a3$require$kResume](); +} +// https://www.rfc-editor.org/rfc/rfc7230#section-3.3.2 +function $32b999aacc7841a3$var$shouldSendContentLength(method) { + return method !== 'GET' && method !== 'HEAD' && method !== 'OPTIONS' && method !== 'TRACE' && method !== 'CONNECT'; +} + +function $32b999aacc7841a3$var$writeH2(client, request) { + const session = client[$32b999aacc7841a3$require$kHTTP2Session]; + const { method: method, path: path, host: host, upgrade: upgrade, expectContinue: expectContinue, signal: signal, headers: reqHeaders } = request; + let { body: body } = request; + if (upgrade) { + $bFRvW.errorRequest(client, request, new Error('Upgrade not supported for H2')); + return false; + } + const headers = {}; + for(let n = 0; n < reqHeaders.length; n += 2){ + const key = reqHeaders[n + 0]; + const val = reqHeaders[n + 1]; + if (Array.isArray(val)) { + for(let i = 0; i < val.length; i++)if (headers[key]) headers[key] += `,${val[i]}`; + else headers[key] = val[i]; + } else headers[key] = val; + } + /** @type {import('node:http2').ClientHttp2Stream} */ let stream; + const { hostname: hostname, port: port } = client[$32b999aacc7841a3$require$kUrl]; + headers[$32b999aacc7841a3$var$HTTP2_HEADER_AUTHORITY] = host || `${hostname}${port ? `:${port}` : ''}`; + headers[$32b999aacc7841a3$var$HTTP2_HEADER_METHOD] = method; + const abort = (err)=>{ + if (request.aborted || request.completed) return; + err = err || new $32b999aacc7841a3$require$RequestAbortedError(); + $bFRvW.errorRequest(client, request, err); + if (stream != null) $bFRvW.destroy(stream, err); + // We do not destroy the socket as we can continue using the session + // the stream get's destroyed and the session remains to create new streams + $bFRvW.destroy(body, err); + client[$32b999aacc7841a3$require$kQueue][client[$32b999aacc7841a3$require$kRunningIdx]++] = null; + client[$32b999aacc7841a3$require$kResume](); + }; + try { + // We are already connected, streams are pending. + // We can call on connect, and wait for abort + request.onConnect(abort); + } catch (err) { + $bFRvW.errorRequest(client, request, err); + } + if (request.aborted) return false; + if (method === 'CONNECT') { + session.ref(); + // We are already connected, streams are pending, first request + // will create a new stream. We trigger a request to create the stream and wait until + // `ready` event is triggered + // We disabled endStream to allow the user to write to the stream + stream = session.request(headers, { + endStream: false, + signal: signal + }); + if (stream.id && !stream.pending) { + request.onUpgrade(null, null, stream); + ++session[$32b999aacc7841a3$var$kOpenStreams]; + client[$32b999aacc7841a3$require$kQueue][client[$32b999aacc7841a3$require$kRunningIdx]++] = null; + } else stream.once('ready', ()=>{ + request.onUpgrade(null, null, stream); + ++session[$32b999aacc7841a3$var$kOpenStreams]; + client[$32b999aacc7841a3$require$kQueue][client[$32b999aacc7841a3$require$kRunningIdx]++] = null; + }); + stream.once('close', ()=>{ + session[$32b999aacc7841a3$var$kOpenStreams] -= 1; + if (session[$32b999aacc7841a3$var$kOpenStreams] === 0) session.unref(); + }); + return true; + } + // https://tools.ietf.org/html/rfc7540#section-8.3 + // :path and :scheme headers must be omitted when sending CONNECT + headers[$32b999aacc7841a3$var$HTTP2_HEADER_PATH] = path; + headers[$32b999aacc7841a3$var$HTTP2_HEADER_SCHEME] = 'https'; + // https://tools.ietf.org/html/rfc7231#section-4.3.1 + // https://tools.ietf.org/html/rfc7231#section-4.3.2 + // https://tools.ietf.org/html/rfc7231#section-4.3.5 + // Sending a payload body on a request that does not + // expect it can cause undefined behavior on some + // servers and corrupt connection state. Do not + // re-use the connection for further requests. + const expectsPayload = method === 'PUT' || method === 'POST' || method === 'PATCH'; + if (body && typeof body.read === 'function') // Try to read EOF in order to get length. + body.read(0); + let contentLength = $bFRvW.bodyLength(body); + if ($bFRvW.isFormDataLike(body)) { + $32b999aacc7841a3$var$extractBody ??= (parcelRequire("8masf")).extractBody; + const [bodyStream, contentType] = $32b999aacc7841a3$var$extractBody(body); + headers['content-type'] = contentType; + body = bodyStream.stream; + contentLength = bodyStream.length; + } + if (contentLength == null) contentLength = request.contentLength; + if (contentLength === 0 || !expectsPayload) // https://tools.ietf.org/html/rfc7230#section-3.3.2 + // A user agent SHOULD NOT send a Content-Length header field when + // the request message does not contain a payload body and the method + // semantics do not anticipate such a body. + contentLength = null; + // https://github.com/nodejs/undici/issues/2046 + // A user agent may send a Content-Length header with 0 value, this should be allowed. + if ($32b999aacc7841a3$var$shouldSendContentLength(method) && contentLength > 0 && request.contentLength != null && request.contentLength !== contentLength) { + if (client[$32b999aacc7841a3$require$kStrictContentLength]) { + $bFRvW.errorRequest(client, request, new $32b999aacc7841a3$require$RequestContentLengthMismatchError()); + return false; } - // 37. Let inputOrInitBody be initBody if it is non-null; otherwise - // inputBody. - const inputOrInitBody = initBody ?? inputBody; - // 38. If inputOrInitBody is non-null and inputOrInitBody’s source is - // null, then: - if (inputOrInitBody != null && inputOrInitBody.source == null) { - // 1. If initBody is non-null and init["duplex"] does not exist, - // then throw a TypeError. - if (initBody != null && init.duplex == null) throw new TypeError("RequestInit: duplex option is required when sending a body."); - // 2. If this’s request’s mode is neither "same-origin" nor "cors", - // then throw a TypeError. - if (request.mode !== "same-origin" && request.mode !== "cors") throw new TypeError('If request is made from ReadableStream, mode should be "same-origin" or "cors"'); - // 3. Set this’s request’s use-CORS-preflight flag. - request.useCORSPreflightFlag = true; + process.emitWarning(new $32b999aacc7841a3$require$RequestContentLengthMismatchError()); + } + if (contentLength != null) { + $in2sP$nodeassert(body, 'no body must not have content length'); + headers[$32b999aacc7841a3$var$HTTP2_HEADER_CONTENT_LENGTH] = `${contentLength}`; + } + session.ref(); + const shouldEndStream = method === 'GET' || method === 'HEAD' || body === null; + if (expectContinue) { + headers[$32b999aacc7841a3$var$HTTP2_HEADER_EXPECT] = '100-continue'; + stream = session.request(headers, { + endStream: shouldEndStream, + signal: signal + }); + stream.once('continue', writeBodyH2); + } else { + stream = session.request(headers, { + endStream: shouldEndStream, + signal: signal + }); + writeBodyH2(); + } + // Increment counter as we have new streams open + ++session[$32b999aacc7841a3$var$kOpenStreams]; + stream.once('response', (headers)=>{ + const { [$32b999aacc7841a3$var$HTTP2_HEADER_STATUS]: statusCode, ...realHeaders } = headers; + request.onResponseStarted(); + // Due to the stream nature, it is possible we face a race condition + // where the stream has been assigned, but the request has been aborted + // the request remains in-flight and headers hasn't been received yet + // for those scenarios, best effort is to destroy the stream immediately + // as there's no value to keep it open. + if (request.aborted) { + const err = new $32b999aacc7841a3$require$RequestAbortedError(); + $bFRvW.errorRequest(client, request, err); + $bFRvW.destroy(stream, err); + return; } - // 39. Let finalBody be inputOrInitBody. - let finalBody = inputOrInitBody; - // 40. If initBody is null and inputBody is non-null, then: - if (initBody == null && inputBody != null) { - // 1. If input is unusable, then throw a TypeError. - if ($gv2nV.isDisturbed(inputBody.stream) || inputBody.stream.locked) throw new TypeError("Cannot construct a Request with a Request object that has already been used."); - // 2. Set finalBody to the result of creating a proxy for inputBody. - if (!$c5a7d6780e79f770$var$TransformStream) $c5a7d6780e79f770$var$TransformStream = $g40fK$streamweb.TransformStream; - // https://streams.spec.whatwg.org/#readablestream-create-a-proxy - const identityTransform = new $c5a7d6780e79f770$var$TransformStream(); - inputBody.stream.pipeThrough(identityTransform); - finalBody = { - source: inputBody.source, - length: inputBody.length, - stream: identityTransform.readable - }; + if (request.onHeaders(Number(statusCode), $32b999aacc7841a3$var$parseH2Headers(realHeaders), stream.resume.bind(stream), '') === false) stream.pause(); + stream.on('data', (chunk)=>{ + if (request.onData(chunk) === false) stream.pause(); + }); + }); + stream.once('end', ()=>{ + // When state is null, it means we haven't consumed body and the stream still do not have + // a state. + // Present specially when using pipeline or stream + if (stream.state?.state == null || stream.state.state < 6) request.onComplete([]); + if (session[$32b999aacc7841a3$var$kOpenStreams] === 0) // Stream is closed or half-closed-remote (6), decrement counter and cleanup + // It does not have sense to continue working with the stream as we do not + // have yet RST_STREAM support on client-side + session.unref(); + abort(new $32b999aacc7841a3$require$InformationalError('HTTP/2: stream half-closed (remote)')); + client[$32b999aacc7841a3$require$kQueue][client[$32b999aacc7841a3$require$kRunningIdx]++] = null; + client[$32b999aacc7841a3$require$kPendingIdx] = client[$32b999aacc7841a3$require$kRunningIdx]; + client[$32b999aacc7841a3$require$kResume](); + }); + stream.once('close', ()=>{ + session[$32b999aacc7841a3$var$kOpenStreams] -= 1; + if (session[$32b999aacc7841a3$var$kOpenStreams] === 0) session.unref(); + }); + stream.once('error', function(err) { + abort(err); + }); + stream.once('frameError', (type, code)=>{ + abort(new $32b999aacc7841a3$require$InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`)); + }); + // stream.on('aborted', () => { + // // TODO(HTTP/2): Support aborted + // }) + // stream.on('timeout', () => { + // // TODO(HTTP/2): Support timeout + // }) + // stream.on('push', headers => { + // // TODO(HTTP/2): Support push + // }) + // stream.on('trailers', headers => { + // // TODO(HTTP/2): Support trailers + // }) + return true; + function writeBodyH2() { + /* istanbul ignore else: assertion */ if (!body || contentLength === 0) $32b999aacc7841a3$var$writeBuffer(abort, stream, null, client, request, client[$32b999aacc7841a3$require$kSocket], contentLength, expectsPayload); + else if ($bFRvW.isBuffer(body)) $32b999aacc7841a3$var$writeBuffer(abort, stream, body, client, request, client[$32b999aacc7841a3$require$kSocket], contentLength, expectsPayload); + else if ($bFRvW.isBlobLike(body)) { + if (typeof body.stream === 'function') $32b999aacc7841a3$var$writeIterable(abort, stream, body.stream(), client, request, client[$32b999aacc7841a3$require$kSocket], contentLength, expectsPayload); + else $32b999aacc7841a3$var$writeBlob(abort, stream, body, client, request, client[$32b999aacc7841a3$require$kSocket], contentLength, expectsPayload); + } else if ($bFRvW.isStream(body)) $32b999aacc7841a3$var$writeStream(abort, client[$32b999aacc7841a3$require$kSocket], expectsPayload, stream, body, client, request, contentLength); + else if ($bFRvW.isIterable(body)) $32b999aacc7841a3$var$writeIterable(abort, stream, body, client, request, client[$32b999aacc7841a3$require$kSocket], contentLength, expectsPayload); + else $in2sP$nodeassert(false); + } +} +function $32b999aacc7841a3$var$writeBuffer(abort, h2stream, body, client, request, socket, contentLength, expectsPayload) { + try { + if (body != null && $bFRvW.isBuffer(body)) { + $in2sP$nodeassert(contentLength === body.byteLength, 'buffer body must have content length'); + h2stream.cork(); + h2stream.write(body); + h2stream.uncork(); + h2stream.end(); + request.onBodySent(body); } - // 41. Set this’s request’s body to finalBody. - this[$c5a7d6780e79f770$require$kState].body = finalBody; + if (!expectsPayload) socket[$32b999aacc7841a3$require$kReset] = true; + request.onRequestSent(); + client[$32b999aacc7841a3$require$kResume](); + } catch (error) { + abort(error); } - // Returns request’s HTTP method, which is "GET" by default. - get method() { - $c5a7d6780e79f770$require$webidl.brandCheck(this, $c5a7d6780e79f770$var$Request); - // The method getter steps are to return this’s request’s method. - return this[$c5a7d6780e79f770$require$kState].method; +} +function $32b999aacc7841a3$var$writeStream(abort, socket, expectsPayload, h2stream, body, client, request, contentLength) { + $in2sP$nodeassert(contentLength !== 0 || client[$32b999aacc7841a3$require$kRunning] === 0, 'stream body cannot be pipelined'); + // For HTTP/2, is enough to pipe the stream + const pipe = $32b999aacc7841a3$require$pipeline(body, h2stream, (err)=>{ + if (err) { + $bFRvW.destroy(pipe, err); + abort(err); + } else { + $bFRvW.removeAllListeners(pipe); + request.onRequestSent(); + if (!expectsPayload) socket[$32b999aacc7841a3$require$kReset] = true; + client[$32b999aacc7841a3$require$kResume](); + } + }); + $bFRvW.addListener(pipe, 'data', onPipeData); + function onPipeData(chunk) { + request.onBodySent(chunk); } - // Returns the URL of request as a string. - get url() { - $c5a7d6780e79f770$require$webidl.brandCheck(this, $c5a7d6780e79f770$var$Request); - // The url getter steps are to return this’s request’s URL, serialized. - return $c5a7d6780e79f770$require$URLSerializer(this[$c5a7d6780e79f770$require$kState].url); +} +async function $32b999aacc7841a3$var$writeBlob(abort, h2stream, body, client, request, socket, contentLength, expectsPayload) { + $in2sP$nodeassert(contentLength === body.size, 'blob body must have content length'); + try { + if (contentLength != null && contentLength !== body.size) throw new $32b999aacc7841a3$require$RequestContentLengthMismatchError(); + const buffer = Buffer.from(await body.arrayBuffer()); + h2stream.cork(); + h2stream.write(buffer); + h2stream.uncork(); + h2stream.end(); + request.onBodySent(buffer); + request.onRequestSent(); + if (!expectsPayload) socket[$32b999aacc7841a3$require$kReset] = true; + client[$32b999aacc7841a3$require$kResume](); + } catch (err) { + abort(err); } - // Returns a Headers object consisting of the headers associated with request. - // Note that headers added in the network layer by the user agent will not - // be accounted for in this object, e.g., the "Host" header. - get headers() { - $c5a7d6780e79f770$require$webidl.brandCheck(this, $c5a7d6780e79f770$var$Request); - // The headers getter steps are to return this’s headers. - return this[$c5a7d6780e79f770$require$kHeaders]; +} +async function $32b999aacc7841a3$var$writeIterable(abort, h2stream, body, client, request, socket, contentLength, expectsPayload) { + $in2sP$nodeassert(contentLength !== 0 || client[$32b999aacc7841a3$require$kRunning] === 0, 'iterator body cannot be pipelined'); + let callback = null; + function onDrain() { + if (callback) { + const cb = callback; + callback = null; + cb(); + } } - // Returns the kind of resource requested by request, e.g., "document" - // or "script". - get destination() { - $c5a7d6780e79f770$require$webidl.brandCheck(this, $c5a7d6780e79f770$var$Request); - // The destination getter are to return this’s request’s destination. - return this[$c5a7d6780e79f770$require$kState].destination; + const waitForDrain = ()=>new Promise((resolve, reject)=>{ + $in2sP$nodeassert(callback === null); + if (socket[$32b999aacc7841a3$require$kError]) reject(socket[$32b999aacc7841a3$require$kError]); + else callback = resolve; + }); + h2stream.on('close', onDrain).on('drain', onDrain); + try { + // It's up to the user to somehow abort the async iterable. + for await (const chunk of body){ + if (socket[$32b999aacc7841a3$require$kError]) throw socket[$32b999aacc7841a3$require$kError]; + const res = h2stream.write(chunk); + request.onBodySent(chunk); + if (!res) await waitForDrain(); + } + h2stream.end(); + request.onRequestSent(); + if (!expectsPayload) socket[$32b999aacc7841a3$require$kReset] = true; + client[$32b999aacc7841a3$require$kResume](); + } catch (err) { + abort(err); + } finally{ + h2stream.off('close', onDrain).off('drain', onDrain); } - // Returns the referrer of request. Its value can be a same-origin URL if - // explicitly set in init, the empty string to indicate no referrer, and - // "about:client" when defaulting to the global’s default. This is used - // during fetching to determine the value of the `Referer` header of the - // request being made. - get referrer() { - $c5a7d6780e79f770$require$webidl.brandCheck(this, $c5a7d6780e79f770$var$Request); - // 1. If this’s request’s referrer is "no-referrer", then return the - // empty string. - if (this[$c5a7d6780e79f770$require$kState].referrer === "no-referrer") return ""; - // 2. If this’s request’s referrer is "client", then return - // "about:client". - if (this[$c5a7d6780e79f770$require$kState].referrer === "client") return "about:client"; - // Return this’s request’s referrer, serialized. - return this[$c5a7d6780e79f770$require$kState].referrer.toString(); +} +module.exports = $32b999aacc7841a3$var$connectH2; + +}); + +parcelRegister("9H5gi", function(module, exports) { +'use strict'; + +var $7URCa = parcelRequire("7URCa"); +function $70ec3613a3a04c5e$var$createRedirectInterceptor({ maxRedirections: defaultMaxRedirections }) { + return (dispatch)=>{ + return function Intercept(opts, handler) { + const { maxRedirections: maxRedirections = defaultMaxRedirections } = opts; + if (!maxRedirections) return dispatch(opts, handler); + const redirectHandler = new $7URCa(dispatch, maxRedirections, opts, handler); + opts = { + ...opts, + maxRedirections: 0 + } // Stop sub dispatcher from also redirecting. + ; + return dispatch(opts, redirectHandler); + }; + }; +} +module.exports = $70ec3613a3a04c5e$var$createRedirectInterceptor; + +}); + + + + + + +parcelRegister("eMXiC", function(module, exports) { +'use strict'; + +var $lD59k = parcelRequire("lD59k"); +var $ac438bf8fd70349f$require$maxUnsigned16Bit = $lD59k.maxUnsigned16Bit; +const $ac438bf8fd70349f$var$BUFFER_SIZE = 16386; +/** @type {import('crypto')} */ let $ac438bf8fd70349f$var$crypto; +let $ac438bf8fd70349f$var$buffer = null; +let $ac438bf8fd70349f$var$bufIdx = $ac438bf8fd70349f$var$BUFFER_SIZE; + +try { + $ac438bf8fd70349f$var$crypto = $ac438bf8fd70349f$import$28cd61d2634f5f6d; +/* c8 ignore next 3 */ } catch { + $ac438bf8fd70349f$var$crypto = { + // not full compatibility, but minimum. + randomFillSync: function randomFillSync(buffer, _offset, _size) { + for(let i = 0; i < buffer.length; ++i)buffer[i] = Math.random() * 255 | 0; + return buffer; + } + }; +} +function $ac438bf8fd70349f$var$generateMask() { + if ($ac438bf8fd70349f$var$bufIdx === $ac438bf8fd70349f$var$BUFFER_SIZE) { + $ac438bf8fd70349f$var$bufIdx = 0; + $ac438bf8fd70349f$var$crypto.randomFillSync($ac438bf8fd70349f$var$buffer ??= Buffer.allocUnsafe($ac438bf8fd70349f$var$BUFFER_SIZE), 0, $ac438bf8fd70349f$var$BUFFER_SIZE); } - // Returns the referrer policy associated with request. - // This is used during fetching to compute the value of the request’s - // referrer. - get referrerPolicy() { - $c5a7d6780e79f770$require$webidl.brandCheck(this, $c5a7d6780e79f770$var$Request); - // The referrerPolicy getter steps are to return this’s request’s referrer policy. - return this[$c5a7d6780e79f770$require$kState].referrerPolicy; + return [ + $ac438bf8fd70349f$var$buffer[$ac438bf8fd70349f$var$bufIdx++], + $ac438bf8fd70349f$var$buffer[$ac438bf8fd70349f$var$bufIdx++], + $ac438bf8fd70349f$var$buffer[$ac438bf8fd70349f$var$bufIdx++], + $ac438bf8fd70349f$var$buffer[$ac438bf8fd70349f$var$bufIdx++] + ]; +} +class $ac438bf8fd70349f$var$WebsocketFrameSend { + /** + * @param {Buffer|undefined} data + */ constructor(data){ + this.frameData = data; } - // Returns the mode associated with request, which is a string indicating - // whether the request will use CORS, or will be restricted to same-origin - // URLs. - get mode() { - $c5a7d6780e79f770$require$webidl.brandCheck(this, $c5a7d6780e79f770$var$Request); - // The mode getter steps are to return this’s request’s mode. - return this[$c5a7d6780e79f770$require$kState].mode; + createFrame(opcode) { + const frameData = this.frameData; + const maskKey = $ac438bf8fd70349f$var$generateMask(); + const bodyLength = frameData?.byteLength ?? 0; + /** @type {number} */ let payloadLength = bodyLength // 0-125 + ; + let offset = 6; + if (bodyLength > $ac438bf8fd70349f$require$maxUnsigned16Bit) { + offset += 8 // payload length is next 8 bytes + ; + payloadLength = 127; + } else if (bodyLength > 125) { + offset += 2 // payload length is next 2 bytes + ; + payloadLength = 126; + } + const buffer = Buffer.allocUnsafe(bodyLength + offset); + // Clear first 2 bytes, everything else is overwritten + buffer[0] = buffer[1] = 0; + buffer[0] |= 0x80 // FIN + ; + buffer[0] = (buffer[0] & 0xF0) + opcode // opcode + ; + /*! ws. MIT License. Einar Otto Stangvik */ buffer[offset - 4] = maskKey[0]; + buffer[offset - 3] = maskKey[1]; + buffer[offset - 2] = maskKey[2]; + buffer[offset - 1] = maskKey[3]; + buffer[1] = payloadLength; + if (payloadLength === 126) buffer.writeUInt16BE(bodyLength, 2); + else if (payloadLength === 127) { + // Clear extended payload length + buffer[2] = buffer[3] = 0; + buffer.writeUIntBE(bodyLength, 4, 6); + } + buffer[1] |= 0x80 // MASK + ; + // mask body + for(let i = 0; i < bodyLength; ++i)buffer[offset + i] = frameData[i] ^ maskKey[i & 3]; + return buffer; } - // Returns the credentials mode associated with request, - // which is a string indicating whether credentials will be sent with the - // request always, never, or only when sent to a same-origin URL. - get credentials() { - // The credentials getter steps are to return this’s request’s credentials mode. - return this[$c5a7d6780e79f770$require$kState].credentials; +} +module.exports = { + WebsocketFrameSend: $ac438bf8fd70349f$var$WebsocketFrameSend +}; + +}); + + +parcelRegister("jppK0", function(module, exports) { +'use strict'; + +var $e21451bf59758fbd$require$Writable = $in2sP$nodestream.Writable; + + +var $lD59k = parcelRequire("lD59k"); +var $e21451bf59758fbd$require$parserStates = $lD59k.parserStates; +var $e21451bf59758fbd$require$opcodes = $lD59k.opcodes; +var $e21451bf59758fbd$require$states = $lD59k.states; +var $e21451bf59758fbd$require$emptyBuffer = $lD59k.emptyBuffer; +var $e21451bf59758fbd$require$sentCloseFrameState = $lD59k.sentCloseFrameState; + +var $fjGba = parcelRequire("fjGba"); +var $e21451bf59758fbd$require$kReadyState = $fjGba.kReadyState; +var $e21451bf59758fbd$require$kSentClose = $fjGba.kSentClose; +var $e21451bf59758fbd$require$kResponse = $fjGba.kResponse; +var $e21451bf59758fbd$require$kReceivedClose = $fjGba.kReceivedClose; + +var $l6jyj = parcelRequire("l6jyj"); +var $e21451bf59758fbd$require$channels = $l6jyj.channels; + +var $coFSg = parcelRequire("coFSg"); +var $e21451bf59758fbd$require$isValidStatusCode = $coFSg.isValidStatusCode; +var $e21451bf59758fbd$require$isValidOpcode = $coFSg.isValidOpcode; +var $e21451bf59758fbd$require$failWebsocketConnection = $coFSg.failWebsocketConnection; +var $e21451bf59758fbd$require$websocketMessageReceived = $coFSg.websocketMessageReceived; +var $e21451bf59758fbd$require$utf8Decode = $coFSg.utf8Decode; +var $e21451bf59758fbd$require$isControlFrame = $coFSg.isControlFrame; +var $e21451bf59758fbd$require$isTextBinaryFrame = $coFSg.isTextBinaryFrame; +var $e21451bf59758fbd$require$isContinuationFrame = $coFSg.isContinuationFrame; + +var $eMXiC = parcelRequire("eMXiC"); +var $e21451bf59758fbd$require$WebsocketFrameSend = $eMXiC.WebsocketFrameSend; + +var $dIZUQ = parcelRequire("dIZUQ"); +var $e21451bf59758fbd$require$closeWebSocketConnection = $dIZUQ.closeWebSocketConnection; + +var $kYSqV = parcelRequire("kYSqV"); +var $e21451bf59758fbd$require$PerMessageDeflate = $kYSqV.PerMessageDeflate; + +var $gTXXK = parcelRequire("gTXXK"); +var $e21451bf59758fbd$require$MessageSizeExceededError = $gTXXK.MessageSizeExceededError; +function $e21451bf59758fbd$var$failWebsocketConnectionWithCode(ws, code, reason) { + $e21451bf59758fbd$require$closeWebSocketConnection(ws, code, reason, Buffer.byteLength(reason)); + $e21451bf59758fbd$require$failWebsocketConnection(ws, reason); +} +// This code was influenced by ws released under the MIT license. +// Copyright (c) 2011 Einar Otto Stangvik +// Copyright (c) 2013 Arnout Kazemier and contributors +// Copyright (c) 2016 Luigi Pinca and contributors +class $e21451bf59758fbd$var$ByteParser extends $e21451bf59758fbd$require$Writable { + #buffers = []; + #fragmentsBytes = 0; + #byteOffset = 0; + #loop = false; + #state = $e21451bf59758fbd$require$parserStates.INFO; + #info = {}; + #fragments = []; + /** @type {Map} */ #extensions; + /** @type {number} */ #maxFragments; + /** @type {number} */ #maxPayloadSize; + /** + * @param {import('./websocket').WebSocket} ws + * @param {Map|null} extensions + * @param {{ maxFragments?: number, maxPayloadSize?: number }} [options] + */ constructor(ws, extensions, options = {}){ + super(); + this.ws = ws; + this.#extensions = extensions == null ? new Map() : extensions; + this.#maxFragments = options.maxFragments ?? 0; + this.#maxPayloadSize = options.maxPayloadSize ?? 0; + if (this.#extensions.has('permessage-deflate')) this.#extensions.set('permessage-deflate', new $e21451bf59758fbd$require$PerMessageDeflate(extensions, options)); } - // Returns the cache mode associated with request, - // which is a string indicating how the request will - // interact with the browser’s cache when fetching. - get cache() { - $c5a7d6780e79f770$require$webidl.brandCheck(this, $c5a7d6780e79f770$var$Request); - // The cache getter steps are to return this’s request’s cache mode. - return this[$c5a7d6780e79f770$require$kState].cache; + /** + * @param {Buffer} chunk + * @param {() => void} callback + */ _write(chunk, _, callback) { + this.#buffers.push(chunk); + this.#byteOffset += chunk.length; + this.#loop = true; + this.run(callback); } - // Returns the redirect mode associated with request, - // which is a string indicating how redirects for the - // request will be handled during fetching. A request - // will follow redirects by default. - get redirect() { - $c5a7d6780e79f770$require$webidl.brandCheck(this, $c5a7d6780e79f770$var$Request); - // The redirect getter steps are to return this’s request’s redirect mode. - return this[$c5a7d6780e79f770$require$kState].redirect; + #validatePayloadLength() { + if (this.#maxPayloadSize > 0 && !$e21451bf59758fbd$require$isControlFrame(this.#info.opcode) && this.#info.payloadLength + this.#fragmentsBytes > this.#maxPayloadSize) { + $e21451bf59758fbd$var$failWebsocketConnectionWithCode(this.ws, 1009, 'Payload size exceeds maximum allowed size'); + return false; + } + return true; } - // Returns request’s subresource integrity metadata, which is a - // cryptographic hash of the resource being fetched. Its value - // consists of multiple hashes separated by whitespace. [SRI] - get integrity() { - $c5a7d6780e79f770$require$webidl.brandCheck(this, $c5a7d6780e79f770$var$Request); - // The integrity getter steps are to return this’s request’s integrity - // metadata. - return this[$c5a7d6780e79f770$require$kState].integrity; + /** + * Runs whenever a new chunk is received. + * Callback is called whenever there are no more chunks buffering, + * or not enough bytes are buffered to parse. + */ run(callback) { + while(this.#loop){ + if (this.#state === $e21451bf59758fbd$require$parserStates.INFO) { + // If there aren't enough bytes to parse the payload length, etc. + if (this.#byteOffset < 2) return callback(); + const buffer = this.consume(2); + const fin = (buffer[0] & 0x80) !== 0; + const opcode = buffer[0] & 0x0F; + const masked = (buffer[1] & 0x80) === 0x80; + const fragmented = !fin && opcode !== $e21451bf59758fbd$require$opcodes.CONTINUATION; + const payloadLength = buffer[1] & 0x7F; + const rsv1 = buffer[0] & 0x40; + const rsv2 = buffer[0] & 0x20; + const rsv3 = buffer[0] & 0x10; + if (!$e21451bf59758fbd$require$isValidOpcode(opcode)) { + $e21451bf59758fbd$require$failWebsocketConnection(this.ws, 'Invalid opcode received'); + return callback(); + } + if (masked) { + $e21451bf59758fbd$require$failWebsocketConnection(this.ws, 'Frame cannot be masked'); + return callback(); + } + // MUST be 0 unless an extension is negotiated that defines meanings + // for non-zero values. If a nonzero value is received and none of + // the negotiated extensions defines the meaning of such a nonzero + // value, the receiving endpoint MUST _Fail the WebSocket + // Connection_. + // This document allocates the RSV1 bit of the WebSocket header for + // PMCEs and calls the bit the "Per-Message Compressed" bit. On a + // WebSocket connection where a PMCE is in use, this bit indicates + // whether a message is compressed or not. + if (rsv1 !== 0 && !this.#extensions.has('permessage-deflate')) { + $e21451bf59758fbd$require$failWebsocketConnection(this.ws, 'Expected RSV1 to be clear.'); + return; + } + if (rsv2 !== 0 || rsv3 !== 0) { + $e21451bf59758fbd$require$failWebsocketConnection(this.ws, 'RSV1, RSV2, RSV3 must be clear'); + return; + } + if (fragmented && !$e21451bf59758fbd$require$isTextBinaryFrame(opcode)) { + // Only text and binary frames can be fragmented + $e21451bf59758fbd$require$failWebsocketConnection(this.ws, 'Invalid frame type was fragmented.'); + return; + } + // If we are already parsing a text/binary frame and do not receive either + // a continuation frame or close frame, fail the connection. + if ($e21451bf59758fbd$require$isTextBinaryFrame(opcode) && this.#fragments.length > 0) { + $e21451bf59758fbd$require$failWebsocketConnection(this.ws, 'Expected continuation frame'); + return; + } + if (this.#info.fragmented && fragmented) { + // A fragmented frame can't be fragmented itself + $e21451bf59758fbd$require$failWebsocketConnection(this.ws, 'Fragmented frame exceeded 125 bytes.'); + return; + } + // "All control frames MUST have a payload length of 125 bytes or less + // and MUST NOT be fragmented." + if ((payloadLength > 125 || fragmented) && $e21451bf59758fbd$require$isControlFrame(opcode)) { + $e21451bf59758fbd$require$failWebsocketConnection(this.ws, 'Control frame either too large or fragmented'); + return; + } + if ($e21451bf59758fbd$require$isContinuationFrame(opcode) && this.#fragments.length === 0 && !this.#info.compressed) { + $e21451bf59758fbd$require$failWebsocketConnection(this.ws, 'Unexpected continuation frame'); + return; + } + if (payloadLength <= 125) { + this.#info.payloadLength = payloadLength; + this.#state = $e21451bf59758fbd$require$parserStates.READ_DATA; + if (!this.#validatePayloadLength()) return; + } else if (payloadLength === 126) this.#state = $e21451bf59758fbd$require$parserStates.PAYLOADLENGTH_16; + else if (payloadLength === 127) this.#state = $e21451bf59758fbd$require$parserStates.PAYLOADLENGTH_64; + if ($e21451bf59758fbd$require$isTextBinaryFrame(opcode)) { + this.#info.binaryType = opcode; + this.#info.compressed = rsv1 !== 0; + } + this.#info.opcode = opcode; + this.#info.masked = masked; + this.#info.fin = fin; + this.#info.fragmented = fragmented; + } else if (this.#state === $e21451bf59758fbd$require$parserStates.PAYLOADLENGTH_16) { + if (this.#byteOffset < 2) return callback(); + const buffer = this.consume(2); + this.#info.payloadLength = buffer.readUInt16BE(0); + this.#state = $e21451bf59758fbd$require$parserStates.READ_DATA; + if (!this.#validatePayloadLength()) return; + } else if (this.#state === $e21451bf59758fbd$require$parserStates.PAYLOADLENGTH_64) { + if (this.#byteOffset < 8) return callback(); + const buffer = this.consume(8); + const upper = buffer.readUInt32BE(0); + const lower = buffer.readUInt32BE(4); + // 2^31 is the maximum bytes an arraybuffer can contain + // on 32-bit systems. Although, on 64-bit systems, this is + // 2^53-1 bytes. + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Invalid_array_length + // https://source.chromium.org/chromium/chromium/src/+/main:v8/src/common/globals.h;drc=1946212ac0100668f14eb9e2843bdd846e510a1e;bpv=1;bpt=1;l=1275 + // https://source.chromium.org/chromium/chromium/src/+/main:v8/src/objects/js-array-buffer.h;l=34;drc=1946212ac0100668f14eb9e2843bdd846e510a1e + if (upper !== 0 || lower > 2 ** 31 - 1) { + $e21451bf59758fbd$require$failWebsocketConnection(this.ws, 'Received payload length > 2^31 bytes.'); + return; + } + this.#info.payloadLength = lower; + this.#state = $e21451bf59758fbd$require$parserStates.READ_DATA; + if (!this.#validatePayloadLength()) return; + } else if (this.#state === $e21451bf59758fbd$require$parserStates.READ_DATA) { + if (this.#byteOffset < this.#info.payloadLength) return callback(); + const body = this.consume(this.#info.payloadLength); + if ($e21451bf59758fbd$require$isControlFrame(this.#info.opcode)) { + this.#loop = this.parseControlFrame(body); + this.#state = $e21451bf59758fbd$require$parserStates.INFO; + } else if (!this.#info.compressed) { + if (!this.writeFragments(body)) return; + if (this.#maxPayloadSize > 0 && this.#fragmentsBytes > this.#maxPayloadSize) { + $e21451bf59758fbd$var$failWebsocketConnectionWithCode(this.ws, 1009, new $e21451bf59758fbd$require$MessageSizeExceededError().message); + return; + } + // If the frame is not fragmented, a message has been received. + // If the frame is fragmented, it will terminate with a fin bit set + // and an opcode of 0 (continuation), therefore we handle that when + // parsing continuation frames, not here. + if (!this.#info.fragmented && this.#info.fin) $e21451bf59758fbd$require$websocketMessageReceived(this.ws, this.#info.binaryType, this.consumeFragments()); + this.#state = $e21451bf59758fbd$require$parserStates.INFO; + } else { + this.#extensions.get('permessage-deflate').decompress(body, this.#info.fin, (error, data)=>{ + if (error) { + const code = error instanceof $e21451bf59758fbd$require$MessageSizeExceededError ? 1009 : 1007; + $e21451bf59758fbd$var$failWebsocketConnectionWithCode(this.ws, code, error.message); + return; + } + if (!this.writeFragments(data)) return; + if (this.#maxPayloadSize > 0 && this.#fragmentsBytes > this.#maxPayloadSize) { + $e21451bf59758fbd$var$failWebsocketConnectionWithCode(this.ws, 1009, new $e21451bf59758fbd$require$MessageSizeExceededError().message); + return; + } + if (!this.#info.fin) { + this.#state = $e21451bf59758fbd$require$parserStates.INFO; + this.#loop = true; + this.run(callback); + return; + } + $e21451bf59758fbd$require$websocketMessageReceived(this.ws, this.#info.binaryType, this.consumeFragments()); + this.#loop = true; + this.#state = $e21451bf59758fbd$require$parserStates.INFO; + this.run(callback); + }); + this.#loop = false; + break; + } + } + } } - // Returns a boolean indicating whether or not request can outlive the - // global in which it was created. - get keepalive() { - $c5a7d6780e79f770$require$webidl.brandCheck(this, $c5a7d6780e79f770$var$Request); - // The keepalive getter steps are to return this’s request’s keepalive. - return this[$c5a7d6780e79f770$require$kState].keepalive; + /** + * Take n bytes from the buffered Buffers + * @param {number} n + * @returns {Buffer} + */ consume(n) { + if (n > this.#byteOffset) throw new Error('Called consume() before buffers satiated.'); + else if (n === 0) return $e21451bf59758fbd$require$emptyBuffer; + if (this.#buffers[0].length === n) { + this.#byteOffset -= this.#buffers[0].length; + return this.#buffers.shift(); + } + const buffer = Buffer.allocUnsafe(n); + let offset = 0; + while(offset !== n){ + const next = this.#buffers[0]; + const { length: length } = next; + if (length + offset === n) { + buffer.set(this.#buffers.shift(), offset); + break; + } else if (length + offset > n) { + buffer.set(next.subarray(0, n - offset), offset); + this.#buffers[0] = next.subarray(n - offset); + break; + } else { + buffer.set(this.#buffers.shift(), offset); + offset += next.length; + } + } + this.#byteOffset -= n; + return buffer; } - // Returns a boolean indicating whether or not request is for a reload - // navigation. - get isReloadNavigation() { - $c5a7d6780e79f770$require$webidl.brandCheck(this, $c5a7d6780e79f770$var$Request); - // The isReloadNavigation getter steps are to return true if this’s - // request’s reload-navigation flag is set; otherwise false. - return this[$c5a7d6780e79f770$require$kState].reloadNavigation; + writeFragments(fragment) { + if (this.#maxFragments > 0 && this.#fragments.length === this.#maxFragments) { + $e21451bf59758fbd$var$failWebsocketConnectionWithCode(this.ws, 1008, 'Too many message fragments'); + return false; + } + this.#fragmentsBytes += fragment.length; + this.#fragments.push(fragment); + return true; } - // Returns a boolean indicating whether or not request is for a history - // navigation (a.k.a. back-foward navigation). - get isHistoryNavigation() { - $c5a7d6780e79f770$require$webidl.brandCheck(this, $c5a7d6780e79f770$var$Request); - // The isHistoryNavigation getter steps are to return true if this’s request’s - // history-navigation flag is set; otherwise false. - return this[$c5a7d6780e79f770$require$kState].historyNavigation; + consumeFragments() { + const fragments = this.#fragments; + if (fragments.length === 1) { + this.#fragmentsBytes = 0; + return fragments.shift(); + } + const output = Buffer.concat(fragments, this.#fragmentsBytes); + this.#fragments = []; + this.#fragmentsBytes = 0; + return output; } - // Returns the signal associated with request, which is an AbortSignal - // object indicating whether or not request has been aborted, and its - // abort event handler. - get signal() { - $c5a7d6780e79f770$require$webidl.brandCheck(this, $c5a7d6780e79f770$var$Request); - // The signal getter steps are to return this’s signal. - return this[$c5a7d6780e79f770$require$kSignal]; + parseCloseBody(data) { + $in2sP$nodeassert(data.length !== 1); + // https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.5 + /** @type {number|undefined} */ let code; + if (data.length >= 2) // _The WebSocket Connection Close Code_ is + // defined as the status code (Section 7.4) contained in the first Close + // control frame received by the application + code = data.readUInt16BE(0); + if (code !== undefined && !$e21451bf59758fbd$require$isValidStatusCode(code)) return { + code: 1002, + reason: 'Invalid status code', + error: true + }; + // https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.6 + /** @type {Buffer} */ let reason = data.subarray(2); + // Remove BOM + if (reason[0] === 0xEF && reason[1] === 0xBB && reason[2] === 0xBF) reason = reason.subarray(3); + try { + reason = $e21451bf59758fbd$require$utf8Decode(reason); + } catch { + return { + code: 1007, + reason: 'Invalid UTF-8', + error: true + }; + } + return { + code: code, + reason: reason, + error: false + }; } - get body() { - $c5a7d6780e79f770$require$webidl.brandCheck(this, $c5a7d6780e79f770$var$Request); - return this[$c5a7d6780e79f770$require$kState].body ? this[$c5a7d6780e79f770$require$kState].body.stream : null; + /** + * Parses control frames. + * @param {Buffer} body + */ parseControlFrame(body) { + const { opcode: opcode, payloadLength: payloadLength } = this.#info; + if (opcode === $e21451bf59758fbd$require$opcodes.CLOSE) { + if (payloadLength === 1) { + $e21451bf59758fbd$require$failWebsocketConnection(this.ws, 'Received close frame with a 1-byte body.'); + return false; + } + this.#info.closeInfo = this.parseCloseBody(body); + if (this.#info.closeInfo.error) { + const { code: code, reason: reason } = this.#info.closeInfo; + $e21451bf59758fbd$require$closeWebSocketConnection(this.ws, code, reason, reason.length); + $e21451bf59758fbd$require$failWebsocketConnection(this.ws, reason); + return false; + } + if (this.ws[$e21451bf59758fbd$require$kSentClose] !== $e21451bf59758fbd$require$sentCloseFrameState.SENT) { + // If an endpoint receives a Close frame and did not previously send a + // Close frame, the endpoint MUST send a Close frame in response. (When + // sending a Close frame in response, the endpoint typically echos the + // status code it received.) + let body = $e21451bf59758fbd$require$emptyBuffer; + if (this.#info.closeInfo.code) { + body = Buffer.allocUnsafe(2); + body.writeUInt16BE(this.#info.closeInfo.code, 0); + } + const closeFrame = new $e21451bf59758fbd$require$WebsocketFrameSend(body); + this.ws[$e21451bf59758fbd$require$kResponse].socket.write(closeFrame.createFrame($e21451bf59758fbd$require$opcodes.CLOSE), (err)=>{ + if (!err) this.ws[$e21451bf59758fbd$require$kSentClose] = $e21451bf59758fbd$require$sentCloseFrameState.SENT; + }); + } + // Upon either sending or receiving a Close control frame, it is said + // that _The WebSocket Closing Handshake is Started_ and that the + // WebSocket connection is in the CLOSING state. + this.ws[$e21451bf59758fbd$require$kReadyState] = $e21451bf59758fbd$require$states.CLOSING; + this.ws[$e21451bf59758fbd$require$kReceivedClose] = true; + return false; + } else if (opcode === $e21451bf59758fbd$require$opcodes.PING) // Upon receipt of a Ping frame, an endpoint MUST send a Pong frame in + // response, unless it already received a Close frame. + // A Pong frame sent in response to a Ping frame must have identical + // "Application data" + { + if (!this.ws[$e21451bf59758fbd$require$kReceivedClose]) { + const frame = new $e21451bf59758fbd$require$WebsocketFrameSend(body); + this.ws[$e21451bf59758fbd$require$kResponse].socket.write(frame.createFrame($e21451bf59758fbd$require$opcodes.PONG)); + if ($e21451bf59758fbd$require$channels.ping.hasSubscribers) $e21451bf59758fbd$require$channels.ping.publish({ + payload: body + }); + } + } else if (opcode === $e21451bf59758fbd$require$opcodes.PONG) // A Pong frame MAY be sent unsolicited. This serves as a + // unidirectional heartbeat. A response to an unsolicited Pong frame is + // not expected. + { + if ($e21451bf59758fbd$require$channels.pong.hasSubscribers) $e21451bf59758fbd$require$channels.pong.publish({ + payload: body + }); + } + return true; } - get bodyUsed() { - $c5a7d6780e79f770$require$webidl.brandCheck(this, $c5a7d6780e79f770$var$Request); - return !!this[$c5a7d6780e79f770$require$kState].body && $gv2nV.isDisturbed(this[$c5a7d6780e79f770$require$kState].body.stream); + get closingInfo() { + return this.#info.closeInfo; } - get duplex() { - $c5a7d6780e79f770$require$webidl.brandCheck(this, $c5a7d6780e79f770$var$Request); - return "half"; +} +module.exports = { + ByteParser: $e21451bf59758fbd$var$ByteParser +}; + +}); +parcelRegister("kYSqV", function(module, exports) { +'use strict'; + +var $f463a28e600f29b0$require$createInflateRaw = $in2sP$nodezlib.createInflateRaw; +var $f463a28e600f29b0$require$Z_DEFAULT_WINDOWBITS = $in2sP$nodezlib.Z_DEFAULT_WINDOWBITS; + +var $coFSg = parcelRequire("coFSg"); +var $f463a28e600f29b0$require$isValidClientWindowBits = $coFSg.isValidClientWindowBits; + +var $gTXXK = parcelRequire("gTXXK"); +var $f463a28e600f29b0$require$MessageSizeExceededError = $gTXXK.MessageSizeExceededError; +const $f463a28e600f29b0$var$tail = Buffer.from([ + 0x00, + 0x00, + 0xff, + 0xff +]); +const $f463a28e600f29b0$var$kBuffer = Symbol('kBuffer'); +const $f463a28e600f29b0$var$kLength = Symbol('kLength'); +class $f463a28e600f29b0$var$PerMessageDeflate { + /** @type {import('node:zlib').InflateRaw} */ #inflate; + #options = {}; + #maxPayloadSize = 0; + /** + * @param {Map} extensions + */ constructor(extensions, options){ + this.#options.serverNoContextTakeover = extensions.has('server_no_context_takeover'); + this.#options.serverMaxWindowBits = extensions.get('server_max_window_bits'); + this.#maxPayloadSize = options.maxPayloadSize; } - // Returns a clone of request. - clone() { - $c5a7d6780e79f770$require$webidl.brandCheck(this, $c5a7d6780e79f770$var$Request); - // 1. If this is unusable, then throw a TypeError. - if (this.bodyUsed || this.body?.locked) throw new TypeError("unusable"); - // 2. Let clonedRequest be the result of cloning this’s request. - const clonedRequest = $c5a7d6780e79f770$var$cloneRequest(this[$c5a7d6780e79f770$require$kState]); - // 3. Let clonedRequestObject be the result of creating a Request object, - // given clonedRequest, this’s headers’s guard, and this’s relevant Realm. - const clonedRequestObject = new $c5a7d6780e79f770$var$Request($c5a7d6780e79f770$require$kConstruct); - clonedRequestObject[$c5a7d6780e79f770$require$kState] = clonedRequest; - clonedRequestObject[$c5a7d6780e79f770$require$kRealm] = this[$c5a7d6780e79f770$require$kRealm]; - clonedRequestObject[$c5a7d6780e79f770$require$kHeaders] = new $c5a7d6780e79f770$require$Headers($c5a7d6780e79f770$require$kConstruct); - clonedRequestObject[$c5a7d6780e79f770$require$kHeaders][$c5a7d6780e79f770$require$kHeadersList] = clonedRequest.headersList; - clonedRequestObject[$c5a7d6780e79f770$require$kHeaders][$c5a7d6780e79f770$require$kGuard] = this[$c5a7d6780e79f770$require$kHeaders][$c5a7d6780e79f770$require$kGuard]; - clonedRequestObject[$c5a7d6780e79f770$require$kHeaders][$c5a7d6780e79f770$require$kRealm] = this[$c5a7d6780e79f770$require$kHeaders][$c5a7d6780e79f770$require$kRealm]; - // 4. Make clonedRequestObject’s signal follow this’s signal. - const ac = new AbortController(); - if (this.signal.aborted) ac.abort(this.signal.reason); - else $gv2nV.addAbortListener(this.signal, ()=>{ - ac.abort(this.signal.reason); + /** + * Decompress a compressed payload. + * @param {Buffer} chunk Compressed data + * @param {boolean} fin Final fragment flag + * @param {Function} callback Callback function + */ decompress(chunk, fin, callback) { + // An endpoint uses the following algorithm to decompress a message. + // 1. Append 4 octets of 0x00 0x00 0xff 0xff to the tail end of the + // payload of the message. + // 2. Decompress the resulting data using DEFLATE. + if (!this.#inflate) { + let windowBits = $f463a28e600f29b0$require$Z_DEFAULT_WINDOWBITS; + if (this.#options.serverMaxWindowBits) { + if (!$f463a28e600f29b0$require$isValidClientWindowBits(this.#options.serverMaxWindowBits)) { + callback(new Error('Invalid server_max_window_bits')); + return; + } + windowBits = Number.parseInt(this.#options.serverMaxWindowBits); + } + try { + this.#inflate = $f463a28e600f29b0$require$createInflateRaw({ + windowBits: windowBits + }); + } catch (err) { + callback(err); + return; + } + this.#inflate[$f463a28e600f29b0$var$kBuffer] = []; + this.#inflate[$f463a28e600f29b0$var$kLength] = 0; + this.#inflate.on('data', (data)=>{ + this.#inflate[$f463a28e600f29b0$var$kLength] += data.length; + if (this.#maxPayloadSize > 0 && this.#inflate[$f463a28e600f29b0$var$kLength] > this.#maxPayloadSize) { + callback(new $f463a28e600f29b0$require$MessageSizeExceededError()); + this.#inflate.removeAllListeners(); + this.#inflate = null; + return; + } + this.#inflate[$f463a28e600f29b0$var$kBuffer].push(data); + }); + this.#inflate.on('error', (err)=>{ + this.#inflate = null; + callback(err); + }); + } + this.#inflate.write(chunk); + if (fin) this.#inflate.write($f463a28e600f29b0$var$tail); + this.#inflate.flush(()=>{ + if (!this.#inflate) return; + const full = Buffer.concat(this.#inflate[$f463a28e600f29b0$var$kBuffer], this.#inflate[$f463a28e600f29b0$var$kLength]); + this.#inflate[$f463a28e600f29b0$var$kBuffer].length = 0; + this.#inflate[$f463a28e600f29b0$var$kLength] = 0; + callback(null, full); }); - clonedRequestObject[$c5a7d6780e79f770$require$kSignal] = ac.signal; - // 4. Return clonedRequestObject. - return clonedRequestObject; - } -} -$c5a7d6780e79f770$require$mixinBody($c5a7d6780e79f770$var$Request); -function $c5a7d6780e79f770$var$makeRequest(init) { - // https://fetch.spec.whatwg.org/#requests - const request = { - method: "GET", - localURLsOnly: false, - unsafeRequest: false, - body: null, - client: null, - reservedClient: null, - replacesClientId: "", - window: "client", - keepalive: false, - serviceWorkers: "all", - initiator: "", - destination: "", - priority: null, - origin: "client", - policyContainer: "client", - referrer: "client", - referrerPolicy: "", - mode: "no-cors", - useCORSPreflightFlag: false, - credentials: "same-origin", - useCredentials: false, - cache: "default", - redirect: "follow", - integrity: "", - cryptoGraphicsNonceMetadata: "", - parserMetadata: "", - reloadNavigation: false, - historyNavigation: false, - userActivation: false, - taintedOrigin: false, - redirectCount: 0, - responseTainting: "basic", - preventNoCacheCacheControlHeaderModification: false, - done: false, - timingAllowFailed: false, - ...init, - headersList: init.headersList ? new $c5a7d6780e79f770$require$HeadersList(init.headersList) : new $c5a7d6780e79f770$require$HeadersList() - }; - request.url = request.urlList[0]; - return request; -} -// https://fetch.spec.whatwg.org/#concept-request-clone -function $c5a7d6780e79f770$var$cloneRequest(request) { - // To clone a request request, run these steps: - // 1. Let newRequest be a copy of request, except for its body. - const newRequest = $c5a7d6780e79f770$var$makeRequest({ - ...request, - body: null - }); - // 2. If request’s body is non-null, set newRequest’s body to the - // result of cloning request’s body. - if (request.body != null) newRequest.body = $c5a7d6780e79f770$require$cloneBody(request.body); - // 3. Return newRequest. - return newRequest; -} -Object.defineProperties($c5a7d6780e79f770$var$Request.prototype, { - method: $c5a7d6780e79f770$var$kEnumerableProperty, - url: $c5a7d6780e79f770$var$kEnumerableProperty, - headers: $c5a7d6780e79f770$var$kEnumerableProperty, - redirect: $c5a7d6780e79f770$var$kEnumerableProperty, - clone: $c5a7d6780e79f770$var$kEnumerableProperty, - signal: $c5a7d6780e79f770$var$kEnumerableProperty, - duplex: $c5a7d6780e79f770$var$kEnumerableProperty, - destination: $c5a7d6780e79f770$var$kEnumerableProperty, - body: $c5a7d6780e79f770$var$kEnumerableProperty, - bodyUsed: $c5a7d6780e79f770$var$kEnumerableProperty, - isHistoryNavigation: $c5a7d6780e79f770$var$kEnumerableProperty, - isReloadNavigation: $c5a7d6780e79f770$var$kEnumerableProperty, - keepalive: $c5a7d6780e79f770$var$kEnumerableProperty, - integrity: $c5a7d6780e79f770$var$kEnumerableProperty, - cache: $c5a7d6780e79f770$var$kEnumerableProperty, - credentials: $c5a7d6780e79f770$var$kEnumerableProperty, - attribute: $c5a7d6780e79f770$var$kEnumerableProperty, - referrerPolicy: $c5a7d6780e79f770$var$kEnumerableProperty, - referrer: $c5a7d6780e79f770$var$kEnumerableProperty, - mode: $c5a7d6780e79f770$var$kEnumerableProperty, - [Symbol.toStringTag]: { - value: "Request", - configurable: true } -}); -$c5a7d6780e79f770$require$webidl.converters.Request = $c5a7d6780e79f770$require$webidl.interfaceConverter($c5a7d6780e79f770$var$Request); -// https://fetch.spec.whatwg.org/#requestinfo -$c5a7d6780e79f770$require$webidl.converters.RequestInfo = function(V) { - if (typeof V === "string") return $c5a7d6780e79f770$require$webidl.converters.USVString(V); - if (V instanceof $c5a7d6780e79f770$var$Request) return $c5a7d6780e79f770$require$webidl.converters.Request(V); - return $c5a7d6780e79f770$require$webidl.converters.USVString(V); +} +module.exports = { + PerMessageDeflate: $f463a28e600f29b0$var$PerMessageDeflate }; -$c5a7d6780e79f770$require$webidl.converters.AbortSignal = $c5a7d6780e79f770$require$webidl.interfaceConverter(AbortSignal); -// https://fetch.spec.whatwg.org/#requestinit -$c5a7d6780e79f770$require$webidl.converters.RequestInit = $c5a7d6780e79f770$require$webidl.dictionaryConverter([ - { - key: "method", - converter: $c5a7d6780e79f770$require$webidl.converters.ByteString - }, - { - key: "headers", - converter: $c5a7d6780e79f770$require$webidl.converters.HeadersInit - }, - { - key: "body", - converter: $c5a7d6780e79f770$require$webidl.nullableConverter($c5a7d6780e79f770$require$webidl.converters.BodyInit) - }, - { - key: "referrer", - converter: $c5a7d6780e79f770$require$webidl.converters.USVString - }, - { - key: "referrerPolicy", - converter: $c5a7d6780e79f770$require$webidl.converters.DOMString, - // https://w3c.github.io/webappsec-referrer-policy/#referrer-policy - allowedValues: $c5a7d6780e79f770$require$referrerPolicy - }, - { - key: "mode", - converter: $c5a7d6780e79f770$require$webidl.converters.DOMString, - // https://fetch.spec.whatwg.org/#concept-request-mode - allowedValues: $c5a7d6780e79f770$require$requestMode - }, - { - key: "credentials", - converter: $c5a7d6780e79f770$require$webidl.converters.DOMString, - // https://fetch.spec.whatwg.org/#requestcredentials - allowedValues: $c5a7d6780e79f770$require$requestCredentials - }, - { - key: "cache", - converter: $c5a7d6780e79f770$require$webidl.converters.DOMString, - // https://fetch.spec.whatwg.org/#requestcache - allowedValues: $c5a7d6780e79f770$require$requestCache - }, - { - key: "redirect", - converter: $c5a7d6780e79f770$require$webidl.converters.DOMString, - // https://fetch.spec.whatwg.org/#requestredirect - allowedValues: $c5a7d6780e79f770$require$requestRedirect - }, - { - key: "integrity", - converter: $c5a7d6780e79f770$require$webidl.converters.DOMString - }, - { - key: "keepalive", - converter: $c5a7d6780e79f770$require$webidl.converters.boolean - }, - { - key: "signal", - converter: $c5a7d6780e79f770$require$webidl.nullableConverter((signal)=>$c5a7d6780e79f770$require$webidl.converters.AbortSignal(signal, { - strict: false - })) - }, - { - key: "window", - converter: $c5a7d6780e79f770$require$webidl.converters.any - }, - { - key: "duplex", - converter: $c5a7d6780e79f770$require$webidl.converters.DOMString, - allowedValues: $c5a7d6780e79f770$require$requestDuplex + +}); + + +parcelRegister("iWDVb", function(module, exports) { +'use strict'; + +var $eMXiC = parcelRequire("eMXiC"); +var $dcac9c56b70b553c$require$WebsocketFrameSend = $eMXiC.WebsocketFrameSend; + +var $lD59k = parcelRequire("lD59k"); +var $dcac9c56b70b553c$require$opcodes = $lD59k.opcodes; +var $dcac9c56b70b553c$require$sendHints = $lD59k.sendHints; + +var $dNMo4 = parcelRequire("dNMo4"); +/** @type {typeof Uint8Array} */ const $dcac9c56b70b553c$var$FastBuffer = Buffer[Symbol.species]; +/** + * @typedef {object} SendQueueNode + * @property {Promise | null} promise + * @property {((...args: any[]) => any)} callback + * @property {Buffer | null} frame + */ class $dcac9c56b70b553c$var$SendQueue { + /** + * @type {FixedQueue} + */ #queue = new $dNMo4(); + /** + * @type {boolean} + */ #running = false; + /** @type {import('node:net').Socket} */ #socket; + constructor(socket){ + this.#socket = socket; + } + add(item, cb, hint) { + if (hint !== $dcac9c56b70b553c$require$sendHints.blob) { + const frame = $dcac9c56b70b553c$var$createFrame(item, hint); + if (!this.#running) // fast-path + this.#socket.write(frame, cb); + else { + /** @type {SendQueueNode} */ const node = { + promise: null, + callback: cb, + frame: frame + }; + this.#queue.push(node); + } + return; + } + /** @type {SendQueueNode} */ const node = { + promise: item.arrayBuffer().then((ab)=>{ + node.promise = null; + node.frame = $dcac9c56b70b553c$var$createFrame(ab, hint); + }), + callback: cb, + frame: null + }; + this.#queue.push(node); + if (!this.#running) this.#run(); + } + async #run() { + this.#running = true; + const queue = this.#queue; + while(!queue.isEmpty()){ + const node = queue.shift(); + // wait pending promise + if (node.promise !== null) await node.promise; + // write + this.#socket.write(node.frame, node.callback); + // cleanup + node.callback = node.frame = null; + } + this.#running = false; + } +} +function $dcac9c56b70b553c$var$createFrame(data, hint) { + return new $dcac9c56b70b553c$require$WebsocketFrameSend($dcac9c56b70b553c$var$toBuffer(data, hint)).createFrame(hint === $dcac9c56b70b553c$require$sendHints.string ? $dcac9c56b70b553c$require$opcodes.TEXT : $dcac9c56b70b553c$require$opcodes.BINARY); +} +function $dcac9c56b70b553c$var$toBuffer(data, hint) { + switch(hint){ + case $dcac9c56b70b553c$require$sendHints.string: + return Buffer.from(data); + case $dcac9c56b70b553c$require$sendHints.arrayBuffer: + case $dcac9c56b70b553c$require$sendHints.blob: + return new $dcac9c56b70b553c$var$FastBuffer(data); + case $dcac9c56b70b553c$require$sendHints.typedArray: + return new $dcac9c56b70b553c$var$FastBuffer(data.buffer, data.byteOffset, data.byteLength); } -]); +} module.exports = { - Request: $c5a7d6780e79f770$var$Request, - makeRequest: $c5a7d6780e79f770$var$makeRequest + SendQueue: $dcac9c56b70b553c$var$SendQueue }; }); -parcelRegister("lOCC7", function(module, exports) { -"use strict"; +parcelRegister("5azwT", function(module, exports) { +'use strict'; -var $91Le5 = parcelRequire("91Le5"); -var $fe1c385e6d6f2790$require$staticPropertyDescriptors = $91Le5.staticPropertyDescriptors; -var $fe1c385e6d6f2790$require$readOperation = $91Le5.readOperation; -var $fe1c385e6d6f2790$require$fireAProgressEvent = $91Le5.fireAProgressEvent; +var $3aZfA = parcelRequire("3aZfA"); +var $3c397257130962f2$require$MAX_SAFE_COMPONENT_LENGTH = $3aZfA.MAX_SAFE_COMPONENT_LENGTH; +var $3c397257130962f2$require$MAX_SAFE_BUILD_LENGTH = $3aZfA.MAX_SAFE_BUILD_LENGTH; +var $3c397257130962f2$require$MAX_LENGTH = $3aZfA.MAX_LENGTH; -var $9Voqm = parcelRequire("9Voqm"); -var $fe1c385e6d6f2790$require$kState = $9Voqm.kState; -var $fe1c385e6d6f2790$require$kError = $9Voqm.kError; -var $fe1c385e6d6f2790$require$kResult = $9Voqm.kResult; -var $fe1c385e6d6f2790$require$kEvents = $9Voqm.kEvents; -var $fe1c385e6d6f2790$require$kAborted = $9Voqm.kAborted; +var $1MK6F = parcelRequire("1MK6F"); +exports = module.exports = {}; +// The actual regexps go on exports.re +const re = exports.re = []; +const safeRe = exports.safeRe = []; +const src = exports.src = []; +const safeSrc = exports.safeSrc = []; +const t = exports.t = {}; +let R = 0; +const LETTERDASHNUMBER = '[a-zA-Z0-9-]'; +// Replace some greedy regex tokens to prevent regex dos issues. These regex are +// used internally via the safeRe object since all inputs in this library get +// normalized first to trim and collapse all extra whitespace. The original +// regexes are exported for userland consumption and lower level usage. A +// future breaking change could export the safer regex only with a note that +// all input should have extra whitespace removed. +const safeRegexReplacements = [ + [ + '\\s', + 1 + ], + [ + '\\d', + $3c397257130962f2$require$MAX_LENGTH + ], + [ + LETTERDASHNUMBER, + $3c397257130962f2$require$MAX_SAFE_BUILD_LENGTH + ] +]; +const makeSafeRegex = (value)=>{ + for (const [token, max] of safeRegexReplacements)value = value.split(`${token}*`).join(`${token}{0,${max}}`).split(`${token}+`).join(`${token}{1,${max}}`); + return value; +}; +const createToken = (name, value, isGlobal)=>{ + const safe = makeSafeRegex(value); + const index = R++; + $1MK6F(name, index, value); + t[name] = index; + src[index] = value; + safeSrc[index] = safe; + re[index] = new RegExp(value, isGlobal ? 'g' : undefined); + safeRe[index] = new RegExp(safe, isGlobal ? 'g' : undefined); +}; +// The following Regular Expressions can be used for tokenizing, +// validating, and parsing SemVer version strings. +// ## Numeric Identifier +// A single `0`, or a non-zero digit followed by zero or more digits. +createToken('NUMERICIDENTIFIER', '0|[1-9]\\d*'); +createToken('NUMERICIDENTIFIERLOOSE', '\\d+'); +// ## Non-numeric Identifier +// Zero or more digits, followed by a letter or hyphen, and then zero or +// more letters, digits, or hyphens. +createToken('NONNUMERICIDENTIFIER', `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`); +// ## Main Version +// Three dot-separated numeric identifiers. +createToken('MAINVERSION', `(${src[t.NUMERICIDENTIFIER]})\\.` + `(${src[t.NUMERICIDENTIFIER]})\\.` + `(${src[t.NUMERICIDENTIFIER]})`); +createToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` + `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` + `(${src[t.NUMERICIDENTIFIERLOOSE]})`); +// ## Pre-release Version Identifier +// A numeric identifier, or a non-numeric identifier. +// Non-numeric identifiers include numeric identifiers but can be longer. +// Therefore non-numeric identifiers must go first. +createToken('PRERELEASEIDENTIFIER', `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIER]})`); +createToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIERLOOSE]})`); +// ## Pre-release Version +// Hyphen, followed by one or more dot-separated pre-release version +// identifiers. +createToken('PRERELEASE', `(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`); +createToken('PRERELEASELOOSE', `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`); +// ## Build Metadata Identifier +// Any combination of digits, letters, or hyphens. +createToken('BUILDIDENTIFIER', `${LETTERDASHNUMBER}+`); +// ## Build Metadata +// Plus sign, followed by one or more period-separated build metadata +// identifiers. +createToken('BUILD', `(?:\\+(${src[t.BUILDIDENTIFIER]}(?:\\.${src[t.BUILDIDENTIFIER]})*))`); +// ## Full Version String +// A main version, followed optionally by a pre-release version and +// build metadata. +// Note that the only major, minor, patch, and pre-release sections of +// the version string are capturing groups. The build metadata is not a +// capturing group, because it should not ever be used in version +// comparison. +createToken('FULLPLAIN', `v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`); +createToken('FULL', `^${src[t.FULLPLAIN]}$`); +// like full, but allows v1.2.3 and =1.2.3, which people do sometimes. +// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty +// common in the npm registry. +createToken('LOOSEPLAIN', `[v=\\s]*${src[t.MAINVERSIONLOOSE]}${src[t.PRERELEASELOOSE]}?${src[t.BUILD]}?`); +createToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`); +createToken('GTLT', '((?:<|>)?=?)'); +// Something like "2.*" or "1.2.x". +// Note that "x.x" is a valid xRange identifier, meaning "any version" +// Only the first item is strictly required. +createToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`); +createToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`); +createToken('XRANGEPLAIN', `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})` + `(?:\\.(${src[t.XRANGEIDENTIFIER]})` + `(?:\\.(${src[t.XRANGEIDENTIFIER]})` + `(?:${src[t.PRERELEASE]})?${src[t.BUILD]}?` + `)?)?`); +createToken('XRANGEPLAINLOOSE', `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` + `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` + `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` + `(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?` + `)?)?`); +createToken('XRANGE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`); +createToken('XRANGELOOSE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`); +// Coercion. +// Extract anything that could conceivably be a part of a valid semver +createToken('COERCEPLAIN', `${"(^|[^\\d])(\\d{1,"}${$3c397257130962f2$require$MAX_SAFE_COMPONENT_LENGTH}})` + `(?:\\.(\\d{1,${$3c397257130962f2$require$MAX_SAFE_COMPONENT_LENGTH}}))?` + `(?:\\.(\\d{1,${$3c397257130962f2$require$MAX_SAFE_COMPONENT_LENGTH}}))?`); +createToken('COERCE', `${src[t.COERCEPLAIN]}(?:$|[^\\d])`); +createToken('COERCEFULL', src[t.COERCEPLAIN] + `(?:${src[t.PRERELEASE]})?` + `(?:${src[t.BUILD]})?` + `(?:$|[^\\d])`); +createToken('COERCERTL', src[t.COERCE], true); +createToken('COERCERTLFULL', src[t.COERCEFULL], true); +// Tilde ranges. +// Meaning is "reasonably at or greater than" +createToken('LONETILDE', '(?:~>?)'); +createToken('TILDETRIM', `(\\s*)${src[t.LONETILDE]}\\s+`, true); +exports.tildeTrimReplace = '$1~'; +createToken('TILDE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`); +createToken('TILDELOOSE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`); +// Caret ranges. +// Meaning is "at least and backwards compatible with" +createToken('LONECARET', '(?:\\^)'); +createToken('CARETTRIM', `(\\s*)${src[t.LONECARET]}\\s+`, true); +exports.caretTrimReplace = '$1^'; +createToken('CARET', `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`); +createToken('CARETLOOSE', `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`); +// A simple gt/lt/eq thing, or just "" to indicate "any version" +createToken('COMPARATORLOOSE', `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`); +createToken('COMPARATOR', `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`); +// An expression to strip any whitespace between the gtlt and the thing +// it modifies, so that `> 1.2.3` ==> `>1.2.3` +createToken('COMPARATORTRIM', `(\\s*)${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true); +exports.comparatorTrimReplace = '$1$2$3'; +// Something like `1.2.3 - 1.2.4` +// Note that these all use the loose form, because they'll be +// checked against either the strict or loose comparator form +// later. +createToken('HYPHENRANGE', `^\\s*(${src[t.XRANGEPLAIN]})` + `\\s+-\\s+` + `(${src[t.XRANGEPLAIN]})` + `\\s*$`); +createToken('HYPHENRANGELOOSE', `^\\s*(${src[t.XRANGEPLAINLOOSE]})` + `\\s+-\\s+` + `(${src[t.XRANGEPLAINLOOSE]})` + `\\s*$`); +// Star ranges basically just allow anything at all. +createToken('STAR', '(<|>)?=?\\s*\\*'); +// >=0.0.0 is like a star +createToken('GTE0', '^\\s*>=\\s*0\\.0\\.0\\s*$'); +createToken('GTE0PRE', '^\\s*>=\\s*0\\.0\\.0-0\\s*$'); -var $jk0LQ = parcelRequire("jk0LQ"); -var $fe1c385e6d6f2790$require$webidl = $jk0LQ.webidl; +}); +parcelRegister("3aZfA", function(module, exports) { +'use strict'; +// Note: this is the semver.org version of the spec that it implements +// Not necessarily the package version of this code. +const $2501d155896be0fa$var$SEMVER_SPEC_VERSION = '2.0.0'; +const $2501d155896be0fa$var$MAX_LENGTH = 256; +const $2501d155896be0fa$var$MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */ 9007199254740991; +// Max safe segment length for coercion. +const $2501d155896be0fa$var$MAX_SAFE_COMPONENT_LENGTH = 16; +// Max safe length for a build identifier. The max length minus 6 characters for +// the shortest version with a build 0.0.0+BUILD. +const $2501d155896be0fa$var$MAX_SAFE_BUILD_LENGTH = $2501d155896be0fa$var$MAX_LENGTH - 6; +const $2501d155896be0fa$var$RELEASE_TYPES = [ + 'major', + 'premajor', + 'minor', + 'preminor', + 'patch', + 'prepatch', + 'prerelease' +]; +module.exports = { + MAX_LENGTH: $2501d155896be0fa$var$MAX_LENGTH, + MAX_SAFE_COMPONENT_LENGTH: $2501d155896be0fa$var$MAX_SAFE_COMPONENT_LENGTH, + MAX_SAFE_BUILD_LENGTH: $2501d155896be0fa$var$MAX_SAFE_BUILD_LENGTH, + MAX_SAFE_INTEGER: $2501d155896be0fa$var$MAX_SAFE_INTEGER, + RELEASE_TYPES: $2501d155896be0fa$var$RELEASE_TYPES, + SEMVER_SPEC_VERSION: $2501d155896be0fa$var$SEMVER_SPEC_VERSION, + FLAG_INCLUDE_PRERELEASE: 1, + FLAG_LOOSE: 2 +}; -var $gv2nV = parcelRequire("gv2nV"); -var $fe1c385e6d6f2790$require$kEnumerableProperty = $gv2nV.kEnumerableProperty; -class $fe1c385e6d6f2790$var$FileReader extends EventTarget { - constructor(){ - super(); - this[$fe1c385e6d6f2790$require$kState] = "empty"; - this[$fe1c385e6d6f2790$require$kResult] = null; - this[$fe1c385e6d6f2790$require$kError] = null; - this[$fe1c385e6d6f2790$require$kEvents] = { - loadend: null, - error: null, - abort: null, - load: null, - progress: null, - loadstart: null - }; - } - /** - * @see https://w3c.github.io/FileAPI/#dfn-readAsArrayBuffer - * @param {import('buffer').Blob} blob - */ readAsArrayBuffer(blob) { - $fe1c385e6d6f2790$require$webidl.brandCheck(this, $fe1c385e6d6f2790$var$FileReader); - $fe1c385e6d6f2790$require$webidl.argumentLengthCheck(arguments, 1, { - header: "FileReader.readAsArrayBuffer" - }); - blob = $fe1c385e6d6f2790$require$webidl.converters.Blob(blob, { - strict: false - }); - // The readAsArrayBuffer(blob) method, when invoked, - // must initiate a read operation for blob with ArrayBuffer. - $fe1c385e6d6f2790$require$readOperation(this, blob, "ArrayBuffer"); - } - /** - * @see https://w3c.github.io/FileAPI/#readAsBinaryString - * @param {import('buffer').Blob} blob - */ readAsBinaryString(blob) { - $fe1c385e6d6f2790$require$webidl.brandCheck(this, $fe1c385e6d6f2790$var$FileReader); - $fe1c385e6d6f2790$require$webidl.argumentLengthCheck(arguments, 1, { - header: "FileReader.readAsBinaryString" - }); - blob = $fe1c385e6d6f2790$require$webidl.converters.Blob(blob, { - strict: false - }); - // The readAsBinaryString(blob) method, when invoked, - // must initiate a read operation for blob with BinaryString. - $fe1c385e6d6f2790$require$readOperation(this, blob, "BinaryString"); - } - /** - * @see https://w3c.github.io/FileAPI/#readAsDataText - * @param {import('buffer').Blob} blob - * @param {string?} encoding - */ readAsText(blob, encoding) { - $fe1c385e6d6f2790$require$webidl.brandCheck(this, $fe1c385e6d6f2790$var$FileReader); - $fe1c385e6d6f2790$require$webidl.argumentLengthCheck(arguments, 1, { - header: "FileReader.readAsText" - }); - blob = $fe1c385e6d6f2790$require$webidl.converters.Blob(blob, { - strict: false - }); - if (encoding !== undefined) encoding = $fe1c385e6d6f2790$require$webidl.converters.DOMString(encoding); - // The readAsText(blob, encoding) method, when invoked, - // must initiate a read operation for blob with Text and encoding. - $fe1c385e6d6f2790$require$readOperation(this, blob, "Text", encoding); - } - /** - * @see https://w3c.github.io/FileAPI/#dfn-readAsDataURL - * @param {import('buffer').Blob} blob - */ readAsDataURL(blob) { - $fe1c385e6d6f2790$require$webidl.brandCheck(this, $fe1c385e6d6f2790$var$FileReader); - $fe1c385e6d6f2790$require$webidl.argumentLengthCheck(arguments, 1, { - header: "FileReader.readAsDataURL" - }); - blob = $fe1c385e6d6f2790$require$webidl.converters.Blob(blob, { - strict: false - }); - // The readAsDataURL(blob) method, when invoked, must - // initiate a read operation for blob with DataURL. - $fe1c385e6d6f2790$require$readOperation(this, blob, "DataURL"); - } - /** - * @see https://w3c.github.io/FileAPI/#dfn-abort - */ abort() { - // 1. If this's state is "empty" or if this's state is - // "done" set this's result to null and terminate - // this algorithm. - if (this[$fe1c385e6d6f2790$require$kState] === "empty" || this[$fe1c385e6d6f2790$require$kState] === "done") { - this[$fe1c385e6d6f2790$require$kResult] = null; - return; - } - // 2. If this's state is "loading" set this's state to - // "done" and set this's result to null. - if (this[$fe1c385e6d6f2790$require$kState] === "loading") { - this[$fe1c385e6d6f2790$require$kState] = "done"; - this[$fe1c385e6d6f2790$require$kResult] = null; - } - // 3. If there are any tasks from this on the file reading - // task source in an affiliated task queue, then remove - // those tasks from that task queue. - this[$fe1c385e6d6f2790$require$kAborted] = true; - // 4. Terminate the algorithm for the read method being processed. - // TODO - // 5. Fire a progress event called abort at this. - $fe1c385e6d6f2790$require$fireAProgressEvent("abort", this); - // 6. If this's state is not "loading", fire a progress - // event called loadend at this. - if (this[$fe1c385e6d6f2790$require$kState] !== "loading") $fe1c385e6d6f2790$require$fireAProgressEvent("loadend", this); - } - /** - * @see https://w3c.github.io/FileAPI/#dom-filereader-readystate - */ get readyState() { - $fe1c385e6d6f2790$require$webidl.brandCheck(this, $fe1c385e6d6f2790$var$FileReader); - switch(this[$fe1c385e6d6f2790$require$kState]){ - case "empty": - return this.EMPTY; - case "loading": - return this.LOADING; - case "done": - return this.DONE; - } - } - /** - * @see https://w3c.github.io/FileAPI/#dom-filereader-result - */ get result() { - $fe1c385e6d6f2790$require$webidl.brandCheck(this, $fe1c385e6d6f2790$var$FileReader); - // The result attribute’s getter, when invoked, must return - // this's result. - return this[$fe1c385e6d6f2790$require$kResult]; - } - /** - * @see https://w3c.github.io/FileAPI/#dom-filereader-error - */ get error() { - $fe1c385e6d6f2790$require$webidl.brandCheck(this, $fe1c385e6d6f2790$var$FileReader); - // The error attribute’s getter, when invoked, must return - // this's error. - return this[$fe1c385e6d6f2790$require$kError]; - } - get onloadend() { - $fe1c385e6d6f2790$require$webidl.brandCheck(this, $fe1c385e6d6f2790$var$FileReader); - return this[$fe1c385e6d6f2790$require$kEvents].loadend; - } - set onloadend(fn) { - $fe1c385e6d6f2790$require$webidl.brandCheck(this, $fe1c385e6d6f2790$var$FileReader); - if (this[$fe1c385e6d6f2790$require$kEvents].loadend) this.removeEventListener("loadend", this[$fe1c385e6d6f2790$require$kEvents].loadend); - if (typeof fn === "function") { - this[$fe1c385e6d6f2790$require$kEvents].loadend = fn; - this.addEventListener("loadend", fn); - } else this[$fe1c385e6d6f2790$require$kEvents].loadend = null; - } - get onerror() { - $fe1c385e6d6f2790$require$webidl.brandCheck(this, $fe1c385e6d6f2790$var$FileReader); - return this[$fe1c385e6d6f2790$require$kEvents].error; - } - set onerror(fn) { - $fe1c385e6d6f2790$require$webidl.brandCheck(this, $fe1c385e6d6f2790$var$FileReader); - if (this[$fe1c385e6d6f2790$require$kEvents].error) this.removeEventListener("error", this[$fe1c385e6d6f2790$require$kEvents].error); - if (typeof fn === "function") { - this[$fe1c385e6d6f2790$require$kEvents].error = fn; - this.addEventListener("error", fn); - } else this[$fe1c385e6d6f2790$require$kEvents].error = null; - } - get onloadstart() { - $fe1c385e6d6f2790$require$webidl.brandCheck(this, $fe1c385e6d6f2790$var$FileReader); - return this[$fe1c385e6d6f2790$require$kEvents].loadstart; - } - set onloadstart(fn) { - $fe1c385e6d6f2790$require$webidl.brandCheck(this, $fe1c385e6d6f2790$var$FileReader); - if (this[$fe1c385e6d6f2790$require$kEvents].loadstart) this.removeEventListener("loadstart", this[$fe1c385e6d6f2790$require$kEvents].loadstart); - if (typeof fn === "function") { - this[$fe1c385e6d6f2790$require$kEvents].loadstart = fn; - this.addEventListener("loadstart", fn); - } else this[$fe1c385e6d6f2790$require$kEvents].loadstart = null; +}); + +parcelRegister("1MK6F", function(module, exports) { +'use strict'; +const $14ce09f3e2e17616$var$debug = typeof process === 'object' && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args)=>console.error('SEMVER', ...args) : ()=>{}; +module.exports = $14ce09f3e2e17616$var$debug; + +}); + + +parcelRegister("4iVAa", function(module, exports) { +"use strict"; +Object.defineProperty(module.exports, "__esModule", { + value: true +}); +module.exports.getProxyUrl = $32258288933a2495$var$getProxyUrl; +module.exports.checkBypass = $32258288933a2495$var$checkBypass; +function $32258288933a2495$var$getProxyUrl(reqUrl) { + const usingSsl = reqUrl.protocol === 'https:'; + if ($32258288933a2495$var$checkBypass(reqUrl)) return undefined; + const proxyVar = (()=>{ + if (usingSsl) return process.env['https_proxy'] || process.env['HTTPS_PROXY']; + else return process.env['http_proxy'] || process.env['HTTP_PROXY']; + })(); + if (proxyVar) try { + return new $32258288933a2495$var$DecodedURL(proxyVar); + } catch (_a) { + if (!proxyVar.startsWith('http://') && !proxyVar.startsWith('https://')) return new $32258288933a2495$var$DecodedURL(`http://${proxyVar}`); } - get onprogress() { - $fe1c385e6d6f2790$require$webidl.brandCheck(this, $fe1c385e6d6f2790$var$FileReader); - return this[$fe1c385e6d6f2790$require$kEvents].progress; + else return undefined; +} +function $32258288933a2495$var$checkBypass(reqUrl) { + if (!reqUrl.hostname) return false; + const reqHost = reqUrl.hostname; + if ($32258288933a2495$var$isLoopbackAddress(reqHost)) return true; + const noProxy = process.env['no_proxy'] || process.env['NO_PROXY'] || ''; + if (!noProxy) return false; + // Determine the request port + let reqPort; + if (reqUrl.port) reqPort = Number(reqUrl.port); + else if (reqUrl.protocol === 'http:') reqPort = 80; + else if (reqUrl.protocol === 'https:') reqPort = 443; + // Format the request hostname and hostname with port + const upperReqHosts = [ + reqUrl.hostname.toUpperCase() + ]; + if (typeof reqPort === 'number') upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); + // Compare request host against noproxy + for (const upperNoProxyItem of noProxy.split(',').map((x)=>x.trim().toUpperCase()).filter((x)=>x)){ + if (upperNoProxyItem === '*' || upperReqHosts.some((x)=>x === upperNoProxyItem || x.endsWith(`.${upperNoProxyItem}`) || upperNoProxyItem.startsWith('.') && x.endsWith(`${upperNoProxyItem}`))) return true; } - set onprogress(fn) { - $fe1c385e6d6f2790$require$webidl.brandCheck(this, $fe1c385e6d6f2790$var$FileReader); - if (this[$fe1c385e6d6f2790$require$kEvents].progress) this.removeEventListener("progress", this[$fe1c385e6d6f2790$require$kEvents].progress); - if (typeof fn === "function") { - this[$fe1c385e6d6f2790$require$kEvents].progress = fn; - this.addEventListener("progress", fn); - } else this[$fe1c385e6d6f2790$require$kEvents].progress = null; + return false; +} +function $32258288933a2495$var$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]'); +} +class $32258288933a2495$var$DecodedURL extends URL { + constructor(url, base){ + super(url, base); + this._decodedUsername = decodeURIComponent(super.username); + this._decodedPassword = decodeURIComponent(super.password); } - get onload() { - $fe1c385e6d6f2790$require$webidl.brandCheck(this, $fe1c385e6d6f2790$var$FileReader); - return this[$fe1c385e6d6f2790$require$kEvents].load; + get username() { + return this._decodedUsername; } - set onload(fn) { - $fe1c385e6d6f2790$require$webidl.brandCheck(this, $fe1c385e6d6f2790$var$FileReader); - if (this[$fe1c385e6d6f2790$require$kEvents].load) this.removeEventListener("load", this[$fe1c385e6d6f2790$require$kEvents].load); - if (typeof fn === "function") { - this[$fe1c385e6d6f2790$require$kEvents].load = fn; - this.addEventListener("load", fn); - } else this[$fe1c385e6d6f2790$require$kEvents].load = null; + get password() { + return this._decodedPassword; } - get onabort() { - $fe1c385e6d6f2790$require$webidl.brandCheck(this, $fe1c385e6d6f2790$var$FileReader); - return this[$fe1c385e6d6f2790$require$kEvents].abort; +} + +}); + + +// We use any as a valid input type +/* eslint-disable @typescript-eslint/no-explicit-any */ /** + * Sanitizes an input into a string so it can be passed into issueCommand safely + * @param input input to sanitize into a string + */ function $7b771feba26294ba$export$ebd44b35730ddf09(input) { + if (input === null || input === undefined) return ''; + else if (typeof input === 'string' || input instanceof String) return input; + return JSON.stringify(input); +} +function $7b771feba26294ba$export$c631cdb40b36344f(annotationProperties) { + if (!Object.keys(annotationProperties).length) return {}; + return { + title: annotationProperties.title, + file: annotationProperties.file, + line: annotationProperties.startLine, + endLine: annotationProperties.endLine, + col: annotationProperties.startColumn, + endColumn: annotationProperties.endColumn + }; +} + + +function $8fb3ba41ccbf1d5e$export$6f7affdb9abb265c(command, properties, message) { + const cmd = new $8fb3ba41ccbf1d5e$var$Command(command, properties, message); + process.stdout.write(cmd.toString() + $in2sP$os.EOL); +} +function $8fb3ba41ccbf1d5e$export$69ad3503f98be476(name, message = '') { + $8fb3ba41ccbf1d5e$export$6f7affdb9abb265c(name, {}, message); +} +const $8fb3ba41ccbf1d5e$var$CMD_STRING = '::'; +class $8fb3ba41ccbf1d5e$var$Command { + constructor(command, properties, message){ + if (!command) command = 'missing.command'; + this.command = command; + this.properties = properties; + this.message = message; } - set onabort(fn) { - $fe1c385e6d6f2790$require$webidl.brandCheck(this, $fe1c385e6d6f2790$var$FileReader); - if (this[$fe1c385e6d6f2790$require$kEvents].abort) this.removeEventListener("abort", this[$fe1c385e6d6f2790$require$kEvents].abort); - if (typeof fn === "function") { - this[$fe1c385e6d6f2790$require$kEvents].abort = fn; - this.addEventListener("abort", fn); - } else this[$fe1c385e6d6f2790$require$kEvents].abort = null; + toString() { + let cmdStr = $8fb3ba41ccbf1d5e$var$CMD_STRING + this.command; + if (this.properties && Object.keys(this.properties).length > 0) { + cmdStr += ' '; + let first = true; + for(const key in this.properties)if (this.properties.hasOwnProperty(key)) { + const val = this.properties[key]; + if (val) { + if (first) first = false; + else cmdStr += ','; + cmdStr += `${key}=${$8fb3ba41ccbf1d5e$var$escapeProperty(val)}`; + } + } + } + cmdStr += `${$8fb3ba41ccbf1d5e$var$CMD_STRING}${$8fb3ba41ccbf1d5e$var$escapeData(this.message)}`; + return cmdStr; } } -// https://w3c.github.io/FileAPI/#dom-filereader-empty -$fe1c385e6d6f2790$var$FileReader.EMPTY = $fe1c385e6d6f2790$var$FileReader.prototype.EMPTY = 0; -// https://w3c.github.io/FileAPI/#dom-filereader-loading -$fe1c385e6d6f2790$var$FileReader.LOADING = $fe1c385e6d6f2790$var$FileReader.prototype.LOADING = 1; -// https://w3c.github.io/FileAPI/#dom-filereader-done -$fe1c385e6d6f2790$var$FileReader.DONE = $fe1c385e6d6f2790$var$FileReader.prototype.DONE = 2; -Object.defineProperties($fe1c385e6d6f2790$var$FileReader.prototype, { - EMPTY: $fe1c385e6d6f2790$require$staticPropertyDescriptors, - LOADING: $fe1c385e6d6f2790$require$staticPropertyDescriptors, - DONE: $fe1c385e6d6f2790$require$staticPropertyDescriptors, - readAsArrayBuffer: $fe1c385e6d6f2790$require$kEnumerableProperty, - readAsBinaryString: $fe1c385e6d6f2790$require$kEnumerableProperty, - readAsText: $fe1c385e6d6f2790$require$kEnumerableProperty, - readAsDataURL: $fe1c385e6d6f2790$require$kEnumerableProperty, - abort: $fe1c385e6d6f2790$require$kEnumerableProperty, - readyState: $fe1c385e6d6f2790$require$kEnumerableProperty, - result: $fe1c385e6d6f2790$require$kEnumerableProperty, - error: $fe1c385e6d6f2790$require$kEnumerableProperty, - onloadstart: $fe1c385e6d6f2790$require$kEnumerableProperty, - onprogress: $fe1c385e6d6f2790$require$kEnumerableProperty, - onload: $fe1c385e6d6f2790$require$kEnumerableProperty, - onabort: $fe1c385e6d6f2790$require$kEnumerableProperty, - onerror: $fe1c385e6d6f2790$require$kEnumerableProperty, - onloadend: $fe1c385e6d6f2790$require$kEnumerableProperty, - [Symbol.toStringTag]: { - value: "FileReader", - writable: false, - enumerable: false, - configurable: true - } -}); -Object.defineProperties($fe1c385e6d6f2790$var$FileReader, { - EMPTY: $fe1c385e6d6f2790$require$staticPropertyDescriptors, - LOADING: $fe1c385e6d6f2790$require$staticPropertyDescriptors, - DONE: $fe1c385e6d6f2790$require$staticPropertyDescriptors -}); -module.exports = { - FileReader: $fe1c385e6d6f2790$var$FileReader -}; +function $8fb3ba41ccbf1d5e$var$escapeData(s) { + return (0, $7b771feba26294ba$export$ebd44b35730ddf09)(s).replace(/%/g, '%25').replace(/\r/g, '%0D').replace(/\n/g, '%0A'); +} +function $8fb3ba41ccbf1d5e$var$escapeProperty(s) { + return (0, $7b771feba26294ba$export$ebd44b35730ddf09)(s).replace(/%/g, '%25').replace(/\r/g, '%0D').replace(/\n/g, '%0A').replace(/:/g, '%3A').replace(/,/g, '%2C'); +} -}); -parcelRegister("91Le5", function(module, exports) { -"use strict"; -var $9Voqm = parcelRequire("9Voqm"); -var $6928d72c08e15f82$require$kState = $9Voqm.kState; -var $6928d72c08e15f82$require$kError = $9Voqm.kError; -var $6928d72c08e15f82$require$kResult = $9Voqm.kResult; -var $6928d72c08e15f82$require$kAborted = $9Voqm.kAborted; -var $6928d72c08e15f82$require$kLastProgressEventFired = $9Voqm.kLastProgressEventFired; +// For internal use, subject to change. +// We use any as a valid input type +/* eslint-disable @typescript-eslint/no-explicit-any */ -var $3tbIX = parcelRequire("3tbIX"); -var $6928d72c08e15f82$require$ProgressEvent = $3tbIX.ProgressEvent; -var $eXh5A = parcelRequire("eXh5A"); -var $6928d72c08e15f82$require$getEncoding = $eXh5A.getEncoding; -var $1ZCMb = parcelRequire("1ZCMb"); -var $6928d72c08e15f82$require$DOMException = $1ZCMb.DOMException; +function $67605895a4635f25$export$a6e4b8693ff0ad55(command, message) { + const filePath = process.env[`GITHUB_${command}`]; + if (!filePath) throw new Error(`Unable to find environment variable for file command ${command}`); + if (!$in2sP$fs.existsSync(filePath)) throw new Error(`Missing file at path: ${filePath}`); + $in2sP$fs.appendFileSync(filePath, `${(0, $7b771feba26294ba$export$ebd44b35730ddf09)(message)}${$in2sP$os.EOL}`, { + encoding: 'utf8' + }); +} +function $67605895a4635f25$export$49d60a52f1bc38f5(key, value) { + const delimiter = `ghadelimiter_${$in2sP$crypto.randomUUID()}`; + const convertedValue = (0, $7b771feba26294ba$export$ebd44b35730ddf09)(value); + // These should realistically never happen, but just in case someone finds a + // way to exploit uuid generation let's not allow keys or values that contain + // the delimiter. + if (key.includes(delimiter)) throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); + if (convertedValue.includes(delimiter)) throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); + return `${key}<<${delimiter}${$in2sP$os.EOL}${convertedValue}${$in2sP$os.EOL}${delimiter}`; +} -var $bNorT = parcelRequire("bNorT"); -var $6928d72c08e15f82$require$serializeAMimeType = $bNorT.serializeAMimeType; -var $6928d72c08e15f82$require$parseMIMEType = $bNorT.parseMIMEType; -var $6928d72c08e15f82$require$types = $g40fK$util.types; -var $6928d72c08e15f82$require$StringDecoder = $g40fK$string_decoder.StringDecoder; -var $6928d72c08e15f82$require$btoa = $g40fK$buffer.btoa; -/** @type {PropertyDescriptor} */ const $6928d72c08e15f82$var$staticPropertyDescriptors = { - enumerable: true, - writable: false, - configurable: false -}; -/** - * @see https://w3c.github.io/FileAPI/#readOperation - * @param {import('./filereader').FileReader} fr - * @param {import('buffer').Blob} blob - * @param {string} type - * @param {string?} encodingName - */ function $6928d72c08e15f82$var$readOperation(fr, blob, type, encodingName) { - // 1. If fr’s state is "loading", throw an InvalidStateError - // DOMException. - if (fr[$6928d72c08e15f82$require$kState] === "loading") throw new $6928d72c08e15f82$require$DOMException("Invalid state", "InvalidStateError"); - // 2. Set fr’s state to "loading". - fr[$6928d72c08e15f82$require$kState] = "loading"; - // 3. Set fr’s result to null. - fr[$6928d72c08e15f82$require$kResult] = null; - // 4. Set fr’s error to null. - fr[$6928d72c08e15f82$require$kError] = null; - // 5. Let stream be the result of calling get stream on blob. - /** @type {import('stream/web').ReadableStream} */ const stream = blob.stream(); - // 6. Let reader be the result of getting a reader from stream. - const reader = stream.getReader(); - // 7. Let bytes be an empty byte sequence. - /** @type {Uint8Array[]} */ const bytes = []; - // 8. Let chunkPromise be the result of reading a chunk from - // stream with reader. - let chunkPromise = reader.read(); - // 9. Let isFirstChunk be true. - let isFirstChunk = true; - (async ()=>{ - while(!fr[$6928d72c08e15f82$require$kAborted])// 1. Wait for chunkPromise to be fulfilled or rejected. - try { - const { done: done, value: value } = await chunkPromise; - // 2. If chunkPromise is fulfilled, and isFirstChunk is - // true, queue a task to fire a progress event called - // loadstart at fr. - if (isFirstChunk && !fr[$6928d72c08e15f82$require$kAborted]) queueMicrotask(()=>{ - $6928d72c08e15f82$var$fireAProgressEvent("loadstart", fr); - }); - // 3. Set isFirstChunk to false. - isFirstChunk = false; - // 4. If chunkPromise is fulfilled with an object whose - // done property is false and whose value property is - // a Uint8Array object, run these steps: - if (!done && $6928d72c08e15f82$require$types.isUint8Array(value)) { - // 1. Let bs be the byte sequence represented by the - // Uint8Array object. - // 2. Append bs to bytes. - bytes.push(value); - // 3. If roughly 50ms have passed since these steps - // were last invoked, queue a task to fire a - // progress event called progress at fr. - if ((fr[$6928d72c08e15f82$require$kLastProgressEventFired] === undefined || Date.now() - fr[$6928d72c08e15f82$require$kLastProgressEventFired] >= 50) && !fr[$6928d72c08e15f82$require$kAborted]) { - fr[$6928d72c08e15f82$require$kLastProgressEventFired] = Date.now(); - queueMicrotask(()=>{ - $6928d72c08e15f82$var$fireAProgressEvent("progress", fr); - }); - } - // 4. Set chunkPromise to the result of reading a - // chunk from stream with reader. - chunkPromise = reader.read(); - } else if (done) { - // 5. Otherwise, if chunkPromise is fulfilled with an - // object whose done property is true, queue a task - // to run the following steps and abort this algorithm: - queueMicrotask(()=>{ - // 1. Set fr’s state to "done". - fr[$6928d72c08e15f82$require$kState] = "done"; - // 2. Let result be the result of package data given - // bytes, type, blob’s type, and encodingName. - try { - const result = $6928d72c08e15f82$var$packageData(bytes, type, blob.type, encodingName); - // 4. Else: - if (fr[$6928d72c08e15f82$require$kAborted]) return; - // 1. Set fr’s result to result. - fr[$6928d72c08e15f82$require$kResult] = result; - // 2. Fire a progress event called load at the fr. - $6928d72c08e15f82$var$fireAProgressEvent("load", fr); - } catch (error) { - // 3. If package data threw an exception error: - // 1. Set fr’s error to error. - fr[$6928d72c08e15f82$require$kError] = error; - // 2. Fire a progress event called error at fr. - $6928d72c08e15f82$var$fireAProgressEvent("error", fr); - } - // 5. If fr’s state is not "loading", fire a progress - // event called loadend at the fr. - if (fr[$6928d72c08e15f82$require$kState] !== "loading") $6928d72c08e15f82$var$fireAProgressEvent("loadend", fr); - }); - break; - } - } catch (error) { - if (fr[$6928d72c08e15f82$require$kAborted]) return; - // 6. Otherwise, if chunkPromise is rejected with an - // error error, queue a task to run the following - // steps and abort this algorithm: - queueMicrotask(()=>{ - // 1. Set fr’s state to "done". - fr[$6928d72c08e15f82$require$kState] = "done"; - // 2. Set fr’s error to error. - fr[$6928d72c08e15f82$require$kError] = error; - // 3. Fire a progress event called error at fr. - $6928d72c08e15f82$var$fireAProgressEvent("error", fr); - // 4. If fr’s state is not "loading", fire a progress - // event called loadend at fr. - if (fr[$6928d72c08e15f82$require$kState] !== "loading") $6928d72c08e15f82$var$fireAProgressEvent("loadend", fr); - }); - break; - } + +/* eslint-disable @typescript-eslint/no-explicit-any */ + +function $6ae147d44f86d2e7$export$5dee9601e91f0ebf(reqUrl) { + const usingSsl = reqUrl.protocol === 'https:'; + if ($6ae147d44f86d2e7$export$6a0eb57449d8a380(reqUrl)) return undefined; + const proxyVar = (()=>{ + if (usingSsl) return process.env['https_proxy'] || process.env['HTTPS_PROXY']; + else return process.env['http_proxy'] || process.env['HTTP_PROXY']; })(); -} -/** - * @see https://w3c.github.io/FileAPI/#fire-a-progress-event - * @see https://dom.spec.whatwg.org/#concept-event-fire - * @param {string} e The name of the event - * @param {import('./filereader').FileReader} reader - */ function $6928d72c08e15f82$var$fireAProgressEvent(e, reader) { - // The progress event e does not bubble. e.bubbles must be false - // The progress event e is NOT cancelable. e.cancelable must be false - const event = new $6928d72c08e15f82$require$ProgressEvent(e, { - bubbles: false, - cancelable: false - }); - reader.dispatchEvent(event); -} -/** - * @see https://w3c.github.io/FileAPI/#blob-package-data - * @param {Uint8Array[]} bytes - * @param {string} type - * @param {string?} mimeType - * @param {string?} encodingName - */ function $6928d72c08e15f82$var$packageData(bytes, type, mimeType, encodingName) { - // 1. A Blob has an associated package data algorithm, given - // bytes, a type, a optional mimeType, and a optional - // encodingName, which switches on type and runs the - // associated steps: - switch(type){ - case "DataURL": - { - // 1. Return bytes as a DataURL [RFC2397] subject to - // the considerations below: - // * Use mimeType as part of the Data URL if it is - // available in keeping with the Data URL - // specification [RFC2397]. - // * If mimeType is not available return a Data URL - // without a media-type. [RFC2397]. - // https://datatracker.ietf.org/doc/html/rfc2397#section-3 - // dataurl := "data:" [ mediatype ] [ ";base64" ] "," data - // mediatype := [ type "/" subtype ] *( ";" parameter ) - // data := *urlchar - // parameter := attribute "=" value - let dataURL = "data:"; - const parsed = $6928d72c08e15f82$require$parseMIMEType(mimeType || "application/octet-stream"); - if (parsed !== "failure") dataURL += $6928d72c08e15f82$require$serializeAMimeType(parsed); - dataURL += ";base64,"; - const decoder = new $6928d72c08e15f82$require$StringDecoder("latin1"); - for (const chunk of bytes)dataURL += $6928d72c08e15f82$require$btoa(decoder.write(chunk)); - dataURL += $6928d72c08e15f82$require$btoa(decoder.end()); - return dataURL; - } - case "Text": - { - // 1. Let encoding be failure - let encoding = "failure"; - // 2. If the encodingName is present, set encoding to the - // result of getting an encoding from encodingName. - if (encodingName) encoding = $6928d72c08e15f82$require$getEncoding(encodingName); - // 3. If encoding is failure, and mimeType is present: - if (encoding === "failure" && mimeType) { - // 1. Let type be the result of parse a MIME type - // given mimeType. - const type = $6928d72c08e15f82$require$parseMIMEType(mimeType); - // 2. If type is not failure, set encoding to the result - // of getting an encoding from type’s parameters["charset"]. - if (type !== "failure") encoding = $6928d72c08e15f82$require$getEncoding(type.parameters.get("charset")); - } - // 4. If encoding is failure, then set encoding to UTF-8. - if (encoding === "failure") encoding = "UTF-8"; - // 5. Decode bytes using fallback encoding encoding, and - // return the result. - return $6928d72c08e15f82$var$decode(bytes, encoding); - } - case "ArrayBuffer": - { - // Return a new ArrayBuffer whose contents are bytes. - const sequence = $6928d72c08e15f82$var$combineByteSequences(bytes); - return sequence.buffer; - } - case "BinaryString": - { - // Return bytes as a binary string, in which every byte - // is represented by a code unit of equal value [0..255]. - let binaryString = ""; - const decoder = new $6928d72c08e15f82$require$StringDecoder("latin1"); - for (const chunk of bytes)binaryString += decoder.write(chunk); - binaryString += decoder.end(); - return binaryString; - } + if (proxyVar) try { + return new $6ae147d44f86d2e7$var$DecodedURL(proxyVar); + } catch (_a) { + if (!proxyVar.startsWith('http://') && !proxyVar.startsWith('https://')) return new $6ae147d44f86d2e7$var$DecodedURL(`http://${proxyVar}`); } + else return undefined; } -/** - * @see https://encoding.spec.whatwg.org/#decode - * @param {Uint8Array[]} ioQueue - * @param {string} encoding - */ function $6928d72c08e15f82$var$decode(ioQueue, encoding) { - const bytes = $6928d72c08e15f82$var$combineByteSequences(ioQueue); - // 1. Let BOMEncoding be the result of BOM sniffing ioQueue. - const BOMEncoding = $6928d72c08e15f82$var$BOMSniffing(bytes); - let slice = 0; - // 2. If BOMEncoding is non-null: - if (BOMEncoding !== null) { - // 1. Set encoding to BOMEncoding. - encoding = BOMEncoding; - // 2. Read three bytes from ioQueue, if BOMEncoding is - // UTF-8; otherwise read two bytes. - // (Do nothing with those bytes.) - slice = BOMEncoding === "UTF-8" ? 3 : 2; +function $6ae147d44f86d2e7$export$6a0eb57449d8a380(reqUrl) { + if (!reqUrl.hostname) return false; + const reqHost = reqUrl.hostname; + if ($6ae147d44f86d2e7$var$isLoopbackAddress(reqHost)) return true; + const noProxy = process.env['no_proxy'] || process.env['NO_PROXY'] || ''; + if (!noProxy) return false; + // Determine the request port + let reqPort; + if (reqUrl.port) reqPort = Number(reqUrl.port); + else if (reqUrl.protocol === 'http:') reqPort = 80; + else if (reqUrl.protocol === 'https:') reqPort = 443; + // Format the request hostname and hostname with port + const upperReqHosts = [ + reqUrl.hostname.toUpperCase() + ]; + if (typeof reqPort === 'number') upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); + // Compare request host against noproxy + for (const upperNoProxyItem of noProxy.split(',').map((x)=>x.trim().toUpperCase()).filter((x)=>x)){ + if (upperNoProxyItem === '*' || upperReqHosts.some((x)=>x === upperNoProxyItem || x.endsWith(`.${upperNoProxyItem}`) || upperNoProxyItem.startsWith('.') && x.endsWith(`${upperNoProxyItem}`))) return true; } - // 3. Process a queue with an instance of encoding’s - // decoder, ioQueue, output, and "replacement". - // 4. Return output. - const sliced = bytes.slice(slice); - return new TextDecoder(encoding).decode(sliced); -} -/** - * @see https://encoding.spec.whatwg.org/#bom-sniff - * @param {Uint8Array} ioQueue - */ function $6928d72c08e15f82$var$BOMSniffing(ioQueue) { - // 1. Let BOM be the result of peeking 3 bytes from ioQueue, - // converted to a byte sequence. - const [a, b, c] = ioQueue; - // 2. For each of the rows in the table below, starting with - // the first one and going down, if BOM starts with the - // bytes given in the first column, then return the - // encoding given in the cell in the second column of that - // row. Otherwise, return null. - if (a === 0xEF && b === 0xBB && c === 0xBF) return "UTF-8"; - else if (a === 0xFE && b === 0xFF) return "UTF-16BE"; - else if (a === 0xFF && b === 0xFE) return "UTF-16LE"; - return null; + return false; } -/** - * @param {Uint8Array[]} sequences - */ function $6928d72c08e15f82$var$combineByteSequences(sequences) { - const size = sequences.reduce((a, b)=>{ - return a + b.byteLength; - }, 0); - let offset = 0; - return sequences.reduce((a, b)=>{ - a.set(b, offset); - offset += b.byteLength; - return a; - }, new Uint8Array(size)); +function $6ae147d44f86d2e7$var$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]'); +} +class $6ae147d44f86d2e7$var$DecodedURL extends URL { + constructor(url, base){ + super(url, base); + this._decodedUsername = decodeURIComponent(super.username); + this._decodedPassword = decodeURIComponent(super.password); + } + get username() { + return this._decodedUsername; + } + get password() { + return this._decodedPassword; + } } -module.exports = { - staticPropertyDescriptors: $6928d72c08e15f82$var$staticPropertyDescriptors, - readOperation: $6928d72c08e15f82$var$readOperation, - fireAProgressEvent: $6928d72c08e15f82$var$fireAProgressEvent -}; - -}); -parcelRegister("9Voqm", function(module, exports) { -"use strict"; -module.exports = { - kState: Symbol("FileReader state"), - kResult: Symbol("FileReader result"), - kError: Symbol("FileReader error"), - kLastProgressEventFired: Symbol("FileReader last progress event fired timestamp"), - kEvents: Symbol("FileReader events"), - kAborted: Symbol("FileReader aborted") -}; -}); -parcelRegister("3tbIX", function(module, exports) { -"use strict"; -var $jk0LQ = parcelRequire("jk0LQ"); -var $286d2cb1ed916e1b$require$webidl = $jk0LQ.webidl; -const $286d2cb1ed916e1b$var$kState = Symbol("ProgressEvent state"); +var $476G3 = parcelRequire("476G3"); +var $c06c3fa92e0659a8$export$ab054a1ef92eeb01; +var $c06c3fa92e0659a8$export$1f2bb630327ac4b6; +var $c06c3fa92e0659a8$export$14963ee5c8637e11; +var $c06c3fa92e0659a8$export$3ea9790e91014eeb; +var $c06c3fa92e0659a8$export$f05c48a4001d5356; +var $c06c3fa92e0659a8$export$6f9e642c23f9615d; +var $c06c3fa92e0659a8$export$954fdbb7ca3f9ed9; +var $c06c3fa92e0659a8$export$b8b97c589dfcfcdc; +var $c06c3fa92e0659a8$export$cfbc337f7857f27a; +var $c06c3fa92e0659a8$export$c3def51f5c0b7771; +var $c06c3fa92e0659a8$export$9af91951fcedc08c; +var $c06c3fa92e0659a8$export$e56ca57b32a6e9c7; +var $c06c3fa92e0659a8$export$e33eea3854577e76; +var $c06c3fa92e0659a8$export$ebbe0f536b18196e; +var $c06c3fa92e0659a8$export$30f3b02011db23c0; +var $c06c3fa92e0659a8$export$7debb50ef11d5e0b; +var $c06c3fa92e0659a8$export$ea76ac48857e9378; +var $c06c3fa92e0659a8$export$6f0c702cbe7d6ed8; +var $c06c3fa92e0659a8$export$e7aa7bc5c1b3cfb3; +var $c06c3fa92e0659a8$export$79b704688b15c0f4; +var $c06c3fa92e0659a8$export$9f633d56d7ec90d3; +var $c06c3fa92e0659a8$export$7fa6c5b6f8193917; +var $c06c3fa92e0659a8$export$3963aa24c930693c; +var $c06c3fa92e0659a8$export$b6afa8811b7e644e; +var $c06c3fa92e0659a8$export$3c8f13373e08d457; +var $c06c3fa92e0659a8$export$79f8e34925aa870f; +var $c06c3fa92e0659a8$export$4b73629724933f6e; +// Cache & CacheStorage are tightly coupled with fetch. Even if it may run +// in an older version of Node, it doesn't have any use without fetch. +var $c06c3fa92e0659a8$export$50ac77867c9f1e40; +var $c06c3fa92e0659a8$export$b43e45590305ffaa; +var $c06c3fa92e0659a8$export$f3eb5caaef7b2b34; +var $c06c3fa92e0659a8$export$14dd963aa71ac36d; +var $c06c3fa92e0659a8$export$110700823644f4a6; +var $c06c3fa92e0659a8$export$85e6adb445fa3ef0; +var $c06c3fa92e0659a8$export$b00e4516a48bbc61; +var $c06c3fa92e0659a8$export$3909fb301d3dc8c9; +var $c06c3fa92e0659a8$export$a143ac65dc19b005; +var $c06c3fa92e0659a8$export$4c6f5e6e10fb9fd0; +var $c06c3fa92e0659a8$export$fbae1a0d0e7e2437; +var $c06c3fa92e0659a8$export$b5fe3f66a567bec0; +var $c06c3fa92e0659a8$export$4938110305e6185f; +var $c06c3fa92e0659a8$export$43f28b24e1eb8181; +var $c06c3fa92e0659a8$export$64605811ab45167f; +var $c06c3fa92e0659a8$export$ba387509dbaf942e; +var $c06c3fa92e0659a8$export$8ff68bc3613e0197; +var $c06c3fa92e0659a8$export$e3431e6e5e89c327; +var $c06c3fa92e0659a8$export$44e9728040f17046; +var $c06c3fa92e0659a8$export$7219863409fc71b7; +var $c06c3fa92e0659a8$export$31c54eb8781d4391; +'use strict'; + +var $63Rhm = parcelRequire("63Rhm"); + +var $ciMz5 = parcelRequire("ciMz5"); + +var $fhRiv = parcelRequire("fhRiv"); +var $d57334a83053cdad$exports = {}; +'use strict'; + +var $gTXXK = parcelRequire("gTXXK"); +var $d57334a83053cdad$require$BalancedPoolMissingUpstreamError = $gTXXK.BalancedPoolMissingUpstreamError; +var $d57334a83053cdad$require$InvalidArgumentError = $gTXXK.InvalidArgumentError; + +var $lCaiQ = parcelRequire("lCaiQ"); +var $d57334a83053cdad$require$PoolBase = $lCaiQ.PoolBase; +var $d57334a83053cdad$require$kClients = $lCaiQ.kClients; +var $d57334a83053cdad$require$kNeedDrain = $lCaiQ.kNeedDrain; +var $d57334a83053cdad$require$kAddClient = $lCaiQ.kAddClient; +var $d57334a83053cdad$require$kRemoveClient = $lCaiQ.kRemoveClient; +var $d57334a83053cdad$require$kGetDispatcher = $lCaiQ.kGetDispatcher; + +var $fhRiv = parcelRequire("fhRiv"); + +var $gNVEc = parcelRequire("gNVEc"); +var $d57334a83053cdad$require$kUrl = $gNVEc.kUrl; +var $d57334a83053cdad$require$kInterceptors = $gNVEc.kInterceptors; + +var $bFRvW = parcelRequire("bFRvW"); +var $d57334a83053cdad$require$parseOrigin = $bFRvW.parseOrigin; +const $d57334a83053cdad$var$kFactory = Symbol('factory'); +const $d57334a83053cdad$var$kOptions = Symbol('options'); +const $d57334a83053cdad$var$kGreatestCommonDivisor = Symbol('kGreatestCommonDivisor'); +const $d57334a83053cdad$var$kCurrentWeight = Symbol('kCurrentWeight'); +const $d57334a83053cdad$var$kIndex = Symbol('kIndex'); +const $d57334a83053cdad$var$kWeight = Symbol('kWeight'); +const $d57334a83053cdad$var$kMaxWeightPerServer = Symbol('kMaxWeightPerServer'); +const $d57334a83053cdad$var$kErrorPenalty = Symbol('kErrorPenalty'); /** - * @see https://xhr.spec.whatwg.org/#progressevent - */ class $286d2cb1ed916e1b$var$ProgressEvent extends Event { - constructor(type, eventInitDict = {}){ - type = $286d2cb1ed916e1b$require$webidl.converters.DOMString(type); - eventInitDict = $286d2cb1ed916e1b$require$webidl.converters.ProgressEventInit(eventInitDict ?? {}); - super(type, eventInitDict); - this[$286d2cb1ed916e1b$var$kState] = { - lengthComputable: eventInitDict.lengthComputable, - loaded: eventInitDict.loaded, - total: eventInitDict.total - }; + * Calculate the greatest common divisor of two numbers by + * using the Euclidean algorithm. + * + * @param {number} a + * @param {number} b + * @returns {number} + */ function $d57334a83053cdad$var$getGreatestCommonDivisor(a, b) { + if (a === 0) return b; + while(b !== 0){ + const t = b; + b = a % b; + a = t; + } + return a; +} +function $d57334a83053cdad$var$defaultFactory(origin, opts) { + return new $fhRiv(origin, opts); +} +class $d57334a83053cdad$var$BalancedPool extends $d57334a83053cdad$require$PoolBase { + constructor(upstreams = [], { factory: factory = $d57334a83053cdad$var$defaultFactory, ...opts } = {}){ + super(); + this[$d57334a83053cdad$var$kOptions] = opts; + this[$d57334a83053cdad$var$kIndex] = -1; + this[$d57334a83053cdad$var$kCurrentWeight] = 0; + this[$d57334a83053cdad$var$kMaxWeightPerServer] = this[$d57334a83053cdad$var$kOptions].maxWeightPerServer || 100; + this[$d57334a83053cdad$var$kErrorPenalty] = this[$d57334a83053cdad$var$kOptions].errorPenalty || 15; + if (!Array.isArray(upstreams)) upstreams = [ + upstreams + ]; + if (typeof factory !== 'function') throw new $d57334a83053cdad$require$InvalidArgumentError('factory must be a function.'); + this[$d57334a83053cdad$require$kInterceptors] = opts.interceptors?.BalancedPool && Array.isArray(opts.interceptors.BalancedPool) ? opts.interceptors.BalancedPool : []; + this[$d57334a83053cdad$var$kFactory] = factory; + for (const upstream of upstreams)this.addUpstream(upstream); + this._updateBalancedPoolStats(); } - get lengthComputable() { - $286d2cb1ed916e1b$require$webidl.brandCheck(this, $286d2cb1ed916e1b$var$ProgressEvent); - return this[$286d2cb1ed916e1b$var$kState].lengthComputable; + addUpstream(upstream) { + const upstreamOrigin = $d57334a83053cdad$require$parseOrigin(upstream).origin; + if (this[$d57334a83053cdad$require$kClients].find((pool)=>pool[$d57334a83053cdad$require$kUrl].origin === upstreamOrigin && pool.closed !== true && pool.destroyed !== true)) return this; + const pool = this[$d57334a83053cdad$var$kFactory](upstreamOrigin, Object.assign({}, this[$d57334a83053cdad$var$kOptions])); + this[$d57334a83053cdad$require$kAddClient](pool); + pool.on('connect', ()=>{ + pool[$d57334a83053cdad$var$kWeight] = Math.min(this[$d57334a83053cdad$var$kMaxWeightPerServer], pool[$d57334a83053cdad$var$kWeight] + this[$d57334a83053cdad$var$kErrorPenalty]); + }); + pool.on('connectionError', ()=>{ + pool[$d57334a83053cdad$var$kWeight] = Math.max(1, pool[$d57334a83053cdad$var$kWeight] - this[$d57334a83053cdad$var$kErrorPenalty]); + this._updateBalancedPoolStats(); + }); + pool.on('disconnect', (...args)=>{ + const err = args[2]; + if (err && err.code === 'UND_ERR_SOCKET') { + // decrease the weight of the pool. + pool[$d57334a83053cdad$var$kWeight] = Math.max(1, pool[$d57334a83053cdad$var$kWeight] - this[$d57334a83053cdad$var$kErrorPenalty]); + this._updateBalancedPoolStats(); + } + }); + for (const client of this[$d57334a83053cdad$require$kClients])client[$d57334a83053cdad$var$kWeight] = this[$d57334a83053cdad$var$kMaxWeightPerServer]; + this._updateBalancedPoolStats(); + return this; } - get loaded() { - $286d2cb1ed916e1b$require$webidl.brandCheck(this, $286d2cb1ed916e1b$var$ProgressEvent); - return this[$286d2cb1ed916e1b$var$kState].loaded; + _updateBalancedPoolStats() { + let result = 0; + for(let i = 0; i < this[$d57334a83053cdad$require$kClients].length; i++)result = $d57334a83053cdad$var$getGreatestCommonDivisor(this[$d57334a83053cdad$require$kClients][i][$d57334a83053cdad$var$kWeight], result); + this[$d57334a83053cdad$var$kGreatestCommonDivisor] = result; } - get total() { - $286d2cb1ed916e1b$require$webidl.brandCheck(this, $286d2cb1ed916e1b$var$ProgressEvent); - return this[$286d2cb1ed916e1b$var$kState].total; + removeUpstream(upstream) { + const upstreamOrigin = $d57334a83053cdad$require$parseOrigin(upstream).origin; + const pool = this[$d57334a83053cdad$require$kClients].find((pool)=>pool[$d57334a83053cdad$require$kUrl].origin === upstreamOrigin && pool.closed !== true && pool.destroyed !== true); + if (pool) this[$d57334a83053cdad$require$kRemoveClient](pool); + return this; } -} -$286d2cb1ed916e1b$require$webidl.converters.ProgressEventInit = $286d2cb1ed916e1b$require$webidl.dictionaryConverter([ - { - key: "lengthComputable", - converter: $286d2cb1ed916e1b$require$webidl.converters.boolean, - defaultValue: false - }, - { - key: "loaded", - converter: $286d2cb1ed916e1b$require$webidl.converters["unsigned long long"], - defaultValue: 0 - }, - { - key: "total", - converter: $286d2cb1ed916e1b$require$webidl.converters["unsigned long long"], - defaultValue: 0 - }, - { - key: "bubbles", - converter: $286d2cb1ed916e1b$require$webidl.converters.boolean, - defaultValue: false - }, - { - key: "cancelable", - converter: $286d2cb1ed916e1b$require$webidl.converters.boolean, - defaultValue: false - }, - { - key: "composed", - converter: $286d2cb1ed916e1b$require$webidl.converters.boolean, - defaultValue: false + get upstreams() { + return this[$d57334a83053cdad$require$kClients].filter((dispatcher)=>dispatcher.closed !== true && dispatcher.destroyed !== true).map((p)=>p[$d57334a83053cdad$require$kUrl].origin); } -]); -module.exports = { - ProgressEvent: $286d2cb1ed916e1b$var$ProgressEvent -}; - -}); - -parcelRegister("eXh5A", function(module, exports) { -"use strict"; -/** - * @see https://encoding.spec.whatwg.org/#concept-encoding-get - * @param {string|undefined} label - */ function $ae33d4e483bc518e$var$getEncoding(label) { - if (!label) return "failure"; - // 1. Remove any leading and trailing ASCII whitespace from label. - // 2. If label is an ASCII case-insensitive match for any of the - // labels listed in the table below, then return the - // corresponding encoding; otherwise return failure. - switch(label.trim().toLowerCase()){ - case "unicode-1-1-utf-8": - case "unicode11utf8": - case "unicode20utf8": - case "utf-8": - case "utf8": - case "x-unicode20utf8": - return "UTF-8"; - case "866": - case "cp866": - case "csibm866": - case "ibm866": - return "IBM866"; - case "csisolatin2": - case "iso-8859-2": - case "iso-ir-101": - case "iso8859-2": - case "iso88592": - case "iso_8859-2": - case "iso_8859-2:1987": - case "l2": - case "latin2": - return "ISO-8859-2"; - case "csisolatin3": - case "iso-8859-3": - case "iso-ir-109": - case "iso8859-3": - case "iso88593": - case "iso_8859-3": - case "iso_8859-3:1988": - case "l3": - case "latin3": - return "ISO-8859-3"; - case "csisolatin4": - case "iso-8859-4": - case "iso-ir-110": - case "iso8859-4": - case "iso88594": - case "iso_8859-4": - case "iso_8859-4:1988": - case "l4": - case "latin4": - return "ISO-8859-4"; - case "csisolatincyrillic": - case "cyrillic": - case "iso-8859-5": - case "iso-ir-144": - case "iso8859-5": - case "iso88595": - case "iso_8859-5": - case "iso_8859-5:1988": - return "ISO-8859-5"; - case "arabic": - case "asmo-708": - case "csiso88596e": - case "csiso88596i": - case "csisolatinarabic": - case "ecma-114": - case "iso-8859-6": - case "iso-8859-6-e": - case "iso-8859-6-i": - case "iso-ir-127": - case "iso8859-6": - case "iso88596": - case "iso_8859-6": - case "iso_8859-6:1987": - return "ISO-8859-6"; - case "csisolatingreek": - case "ecma-118": - case "elot_928": - case "greek": - case "greek8": - case "iso-8859-7": - case "iso-ir-126": - case "iso8859-7": - case "iso88597": - case "iso_8859-7": - case "iso_8859-7:1987": - case "sun_eu_greek": - return "ISO-8859-7"; - case "csiso88598e": - case "csisolatinhebrew": - case "hebrew": - case "iso-8859-8": - case "iso-8859-8-e": - case "iso-ir-138": - case "iso8859-8": - case "iso88598": - case "iso_8859-8": - case "iso_8859-8:1988": - case "visual": - return "ISO-8859-8"; - case "csiso88598i": - case "iso-8859-8-i": - case "logical": - return "ISO-8859-8-I"; - case "csisolatin6": - case "iso-8859-10": - case "iso-ir-157": - case "iso8859-10": - case "iso885910": - case "l6": - case "latin6": - return "ISO-8859-10"; - case "iso-8859-13": - case "iso8859-13": - case "iso885913": - return "ISO-8859-13"; - case "iso-8859-14": - case "iso8859-14": - case "iso885914": - return "ISO-8859-14"; - case "csisolatin9": - case "iso-8859-15": - case "iso8859-15": - case "iso885915": - case "iso_8859-15": - case "l9": - return "ISO-8859-15"; - case "iso-8859-16": - return "ISO-8859-16"; - case "cskoi8r": - case "koi": - case "koi8": - case "koi8-r": - case "koi8_r": - return "KOI8-R"; - case "koi8-ru": - case "koi8-u": - return "KOI8-U"; - case "csmacintosh": - case "mac": - case "macintosh": - case "x-mac-roman": - return "macintosh"; - case "iso-8859-11": - case "iso8859-11": - case "iso885911": - case "tis-620": - case "windows-874": - return "windows-874"; - case "cp1250": - case "windows-1250": - case "x-cp1250": - return "windows-1250"; - case "cp1251": - case "windows-1251": - case "x-cp1251": - return "windows-1251"; - case "ansi_x3.4-1968": - case "ascii": - case "cp1252": - case "cp819": - case "csisolatin1": - case "ibm819": - case "iso-8859-1": - case "iso-ir-100": - case "iso8859-1": - case "iso88591": - case "iso_8859-1": - case "iso_8859-1:1987": - case "l1": - case "latin1": - case "us-ascii": - case "windows-1252": - case "x-cp1252": - return "windows-1252"; - case "cp1253": - case "windows-1253": - case "x-cp1253": - return "windows-1253"; - case "cp1254": - case "csisolatin5": - case "iso-8859-9": - case "iso-ir-148": - case "iso8859-9": - case "iso88599": - case "iso_8859-9": - case "iso_8859-9:1989": - case "l5": - case "latin5": - case "windows-1254": - case "x-cp1254": - return "windows-1254"; - case "cp1255": - case "windows-1255": - case "x-cp1255": - return "windows-1255"; - case "cp1256": - case "windows-1256": - case "x-cp1256": - return "windows-1256"; - case "cp1257": - case "windows-1257": - case "x-cp1257": - return "windows-1257"; - case "cp1258": - case "windows-1258": - case "x-cp1258": - return "windows-1258"; - case "x-mac-cyrillic": - case "x-mac-ukrainian": - return "x-mac-cyrillic"; - case "chinese": - case "csgb2312": - case "csiso58gb231280": - case "gb2312": - case "gb_2312": - case "gb_2312-80": - case "gbk": - case "iso-ir-58": - case "x-gbk": - return "GBK"; - case "gb18030": - return "gb18030"; - case "big5": - case "big5-hkscs": - case "cn-big5": - case "csbig5": - case "x-x-big5": - return "Big5"; - case "cseucpkdfmtjapanese": - case "euc-jp": - case "x-euc-jp": - return "EUC-JP"; - case "csiso2022jp": - case "iso-2022-jp": - return "ISO-2022-JP"; - case "csshiftjis": - case "ms932": - case "ms_kanji": - case "shift-jis": - case "shift_jis": - case "sjis": - case "windows-31j": - case "x-sjis": - return "Shift_JIS"; - case "cseuckr": - case "csksc56011987": - case "euc-kr": - case "iso-ir-149": - case "korean": - case "ks_c_5601-1987": - case "ks_c_5601-1989": - case "ksc5601": - case "ksc_5601": - case "windows-949": - return "EUC-KR"; - case "csiso2022kr": - case "hz-gb-2312": - case "iso-2022-cn": - case "iso-2022-cn-ext": - case "iso-2022-kr": - case "replacement": - return "replacement"; - case "unicodefffe": - case "utf-16be": - return "UTF-16BE"; - case "csunicode": - case "iso-10646-ucs-2": - case "ucs-2": - case "unicode": - case "unicodefeff": - case "utf-16": - case "utf-16le": - return "UTF-16LE"; - case "x-user-defined": - return "x-user-defined"; - default: - return "failure"; + [$d57334a83053cdad$require$kGetDispatcher]() { + // We validate that pools is greater than 0, + // otherwise we would have to wait until an upstream + // is added, which might never happen. + if (this[$d57334a83053cdad$require$kClients].length === 0) throw new $d57334a83053cdad$require$BalancedPoolMissingUpstreamError(); + const dispatcher = this[$d57334a83053cdad$require$kClients].find((dispatcher)=>!dispatcher[$d57334a83053cdad$require$kNeedDrain] && dispatcher.closed !== true && dispatcher.destroyed !== true); + if (!dispatcher) return; + const allClientsBusy = this[$d57334a83053cdad$require$kClients].map((pool)=>pool[$d57334a83053cdad$require$kNeedDrain]).reduce((a, b)=>a && b, true); + if (allClientsBusy) return; + let counter = 0; + let maxWeightIndex = this[$d57334a83053cdad$require$kClients].findIndex((pool)=>!pool[$d57334a83053cdad$require$kNeedDrain]); + while(counter++ < this[$d57334a83053cdad$require$kClients].length){ + this[$d57334a83053cdad$var$kIndex] = (this[$d57334a83053cdad$var$kIndex] + 1) % this[$d57334a83053cdad$require$kClients].length; + const pool = this[$d57334a83053cdad$require$kClients][this[$d57334a83053cdad$var$kIndex]]; + // find pool index with the largest weight + if (pool[$d57334a83053cdad$var$kWeight] > this[$d57334a83053cdad$require$kClients][maxWeightIndex][$d57334a83053cdad$var$kWeight] && !pool[$d57334a83053cdad$require$kNeedDrain]) maxWeightIndex = this[$d57334a83053cdad$var$kIndex]; + // decrease the current weight every `this[kClients].length`. + if (this[$d57334a83053cdad$var$kIndex] === 0) { + // Set the current weight to the next lower weight. + this[$d57334a83053cdad$var$kCurrentWeight] = this[$d57334a83053cdad$var$kCurrentWeight] - this[$d57334a83053cdad$var$kGreatestCommonDivisor]; + if (this[$d57334a83053cdad$var$kCurrentWeight] <= 0) this[$d57334a83053cdad$var$kCurrentWeight] = this[$d57334a83053cdad$var$kMaxWeightPerServer]; + } + if (pool[$d57334a83053cdad$var$kWeight] >= this[$d57334a83053cdad$var$kCurrentWeight] && !pool[$d57334a83053cdad$require$kNeedDrain]) return pool; + } + this[$d57334a83053cdad$var$kCurrentWeight] = this[$d57334a83053cdad$require$kClients][maxWeightIndex][$d57334a83053cdad$var$kWeight]; + this[$d57334a83053cdad$var$kIndex] = maxWeightIndex; + return this[$d57334a83053cdad$require$kClients][maxWeightIndex]; } } -module.exports = { - getEncoding: $ae33d4e483bc518e$var$getEncoding -}; +$d57334a83053cdad$exports = $d57334a83053cdad$var$BalancedPool; -}); +var $h3pYu = parcelRequire("h3pYu"); +var $58f872e44871c57c$exports = {}; +'use strict'; -parcelRegister("6Lz7o", function(module, exports) { -"use strict"; +var $gNVEc = parcelRequire("gNVEc"); +var $58f872e44871c57c$require$kProxy = $gNVEc.kProxy; +var $58f872e44871c57c$require$kClose = $gNVEc.kClose; +var $58f872e44871c57c$require$kDestroy = $gNVEc.kDestroy; +var $58f872e44871c57c$require$kDispatch = $gNVEc.kDispatch; +var $58f872e44871c57c$require$kInterceptors = $gNVEc.kInterceptors; -var $6iKmm = parcelRequire("6iKmm"); -var $4ed25fa12029d4f0$require$kConstruct = $6iKmm.kConstruct; +var $58f872e44871c57c$require$URL = $in2sP$nodeurl.URL; -var $iQq1W = parcelRequire("iQq1W"); -var $4ed25fa12029d4f0$require$Cache = $iQq1W.Cache; +var $h3pYu = parcelRequire("h3pYu"); -var $jk0LQ = parcelRequire("jk0LQ"); -var $4ed25fa12029d4f0$require$webidl = $jk0LQ.webidl; +var $fhRiv = parcelRequire("fhRiv"); -var $gv2nV = parcelRequire("gv2nV"); -var $4ed25fa12029d4f0$require$kEnumerableProperty = $gv2nV.kEnumerableProperty; -class $4ed25fa12029d4f0$var$CacheStorage { - /** - * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-name-to-cache-map - * @type {Map{}; +function $58f872e44871c57c$var$defaultAgentFactory(origin, opts) { + if (opts.connections === 1) return new $63Rhm(origin, opts); + return new $fhRiv(origin, opts); +} +class $58f872e44871c57c$var$Http1ProxyWrapper extends $e0ttg { + #client; + constructor(proxyUrl, { headers: headers = {}, connect: connect, factory: factory }){ + super(); + if (!proxyUrl) throw new $58f872e44871c57c$require$InvalidArgumentError('Proxy URL is mandatory'); + this[$58f872e44871c57c$var$kProxyHeaders] = headers; + if (factory) this.#client = factory(proxyUrl, { + connect: connect + }); + else this.#client = new $63Rhm(proxyUrl, { + connect: connect + }); } - async match(request, options = {}) { - $4ed25fa12029d4f0$require$webidl.brandCheck(this, $4ed25fa12029d4f0$var$CacheStorage); - $4ed25fa12029d4f0$require$webidl.argumentLengthCheck(arguments, 1, { - header: "CacheStorage.match" + [$58f872e44871c57c$require$kDispatch](opts, handler) { + const onHeaders = handler.onHeaders; + handler.onHeaders = function(statusCode, data, resume) { + if (statusCode === 407) { + if (typeof handler.onError === 'function') handler.onError(new $58f872e44871c57c$require$InvalidArgumentError('Proxy Authentication Required (407)')); + return; + } + if (onHeaders) onHeaders.call(this, statusCode, data, resume); + }; + // Rewrite request as an HTTP1 Proxy request, without tunneling. + const { origin: origin, path: path = '/', headers: headers = {} } = opts; + opts.path = origin + path; + if (!('host' in headers) && !('Host' in headers)) { + const { host: host } = new $58f872e44871c57c$require$URL(origin); + headers.host = host; + } + opts.headers = { + ...this[$58f872e44871c57c$var$kProxyHeaders], + ...headers + }; + return this.#client[$58f872e44871c57c$require$kDispatch](opts, handler); + } + async [$58f872e44871c57c$require$kClose]() { + return this.#client.close(); + } + async [$58f872e44871c57c$require$kDestroy](err) { + return this.#client.destroy(err); + } +} +class $58f872e44871c57c$var$ProxyAgent extends $e0ttg { + constructor(opts){ + super(); + if (!opts || typeof opts === 'object' && !(opts instanceof $58f872e44871c57c$require$URL) && !opts.uri) throw new $58f872e44871c57c$require$InvalidArgumentError('Proxy uri is mandatory'); + const { clientFactory: clientFactory = $58f872e44871c57c$var$defaultFactory } = opts; + if (typeof clientFactory !== 'function') throw new $58f872e44871c57c$require$InvalidArgumentError('Proxy opts.clientFactory must be a function.'); + const { proxyTunnel: proxyTunnel = true } = opts; + const url = this.#getUrl(opts); + const { href: href, origin: origin, port: port, protocol: protocol, username: username, password: password, hostname: proxyHostname } = url; + this[$58f872e44871c57c$require$kProxy] = { + uri: href, + protocol: protocol + }; + this[$58f872e44871c57c$require$kInterceptors] = opts.interceptors?.ProxyAgent && Array.isArray(opts.interceptors.ProxyAgent) ? opts.interceptors.ProxyAgent : []; + this[$58f872e44871c57c$var$kRequestTls] = opts.requestTls; + this[$58f872e44871c57c$var$kProxyTls] = opts.proxyTls; + this[$58f872e44871c57c$var$kProxyHeaders] = opts.headers || {}; + this[$58f872e44871c57c$var$kTunnelProxy] = proxyTunnel; + if (opts.auth && opts.token) throw new $58f872e44871c57c$require$InvalidArgumentError('opts.auth cannot be used in combination with opts.token'); + else if (opts.auth) /* @deprecated in favour of opts.token */ this[$58f872e44871c57c$var$kProxyHeaders]['proxy-authorization'] = `Basic ${opts.auth}`; + else if (opts.token) this[$58f872e44871c57c$var$kProxyHeaders]['proxy-authorization'] = opts.token; + else if (username && password) this[$58f872e44871c57c$var$kProxyHeaders]['proxy-authorization'] = `Basic ${Buffer.from(`${decodeURIComponent(username)}:${decodeURIComponent(password)}`).toString('base64')}`; + const connect = $ifuPO({ + ...opts.proxyTls }); - request = $4ed25fa12029d4f0$require$webidl.converters.RequestInfo(request); - options = $4ed25fa12029d4f0$require$webidl.converters.MultiCacheQueryOptions(options); - // 1. - if (options.cacheName != null) // 1.1.1.1 - { - if (this.#caches.has(options.cacheName)) { - // 1.1.1.1.1 - const cacheList = this.#caches.get(options.cacheName); - const cache = new $4ed25fa12029d4f0$require$Cache($4ed25fa12029d4f0$require$kConstruct, cacheList); - return await cache.match(request, options); + this[$58f872e44871c57c$var$kConnectEndpoint] = $ifuPO({ + ...opts.requestTls + }); + const agentFactory = opts.factory || $58f872e44871c57c$var$defaultAgentFactory; + const factory = (origin, options)=>{ + const { protocol: protocol } = new $58f872e44871c57c$require$URL(origin); + if (!this[$58f872e44871c57c$var$kTunnelProxy] && protocol === 'http:' && this[$58f872e44871c57c$require$kProxy].protocol === 'http:') return new $58f872e44871c57c$var$Http1ProxyWrapper(this[$58f872e44871c57c$require$kProxy].uri, { + headers: this[$58f872e44871c57c$var$kProxyHeaders], + connect: connect, + factory: agentFactory + }); + return agentFactory(origin, options); + }; + this[$58f872e44871c57c$var$kClient] = clientFactory(url, { + connect: connect + }); + this[$58f872e44871c57c$var$kAgent] = new $h3pYu({ + ...opts, + factory: factory, + connect: async (opts, callback)=>{ + let requestedPath = opts.host; + if (!opts.port) requestedPath += `:${$58f872e44871c57c$var$defaultProtocolPort(opts.protocol)}`; + try { + const { socket: socket, statusCode: statusCode } = await this[$58f872e44871c57c$var$kClient].connect({ + origin: origin, + port: port, + path: requestedPath, + signal: opts.signal, + headers: { + ...this[$58f872e44871c57c$var$kProxyHeaders], + host: opts.host + }, + servername: this[$58f872e44871c57c$var$kProxyTls]?.servername || proxyHostname + }); + if (statusCode !== 200) { + socket.on('error', $58f872e44871c57c$var$noop).destroy(); + callback(new $58f872e44871c57c$require$RequestAbortedError(`Proxy response (${statusCode}) !== 200 when HTTP Tunneling`)); + } + if (opts.protocol !== 'https:') { + callback(null, socket); + return; + } + let servername; + if (this[$58f872e44871c57c$var$kRequestTls]) servername = this[$58f872e44871c57c$var$kRequestTls].servername; + else servername = opts.servername; + this[$58f872e44871c57c$var$kConnectEndpoint]({ + ...opts, + servername: servername, + httpSocket: socket + }, callback); + } catch (err) { + if (err.code === 'ERR_TLS_CERT_ALTNAME_INVALID') // Throw a custom error to avoid loop in client.js#connect + callback(new $58f872e44871c57c$require$SecureProxyConnectionError(err)); + else callback(err); + } } - } else // 2.2 - for (const cacheList of this.#caches.values()){ - const cache = new $4ed25fa12029d4f0$require$Cache($4ed25fa12029d4f0$require$kConstruct, cacheList); - // 2.2.1.2 - const response = await cache.match(request, options); - if (response !== undefined) return response; + }); + } + dispatch(opts, handler) { + const headers = $58f872e44871c57c$var$buildHeaders(opts.headers); + $58f872e44871c57c$var$throwIfProxyAuthIsSent(headers); + if (headers && !('host' in headers) && !('Host' in headers)) { + const { host: host } = new $58f872e44871c57c$require$URL(opts.origin); + headers.host = host; } + return this[$58f872e44871c57c$var$kAgent].dispatch({ + ...opts, + headers: headers + }, handler); } /** - * @see https://w3c.github.io/ServiceWorker/#cache-storage-has - * @param {string} cacheName - * @returns {Promise} - */ async has(cacheName) { - $4ed25fa12029d4f0$require$webidl.brandCheck(this, $4ed25fa12029d4f0$var$CacheStorage); - $4ed25fa12029d4f0$require$webidl.argumentLengthCheck(arguments, 1, { - header: "CacheStorage.has" - }); - cacheName = $4ed25fa12029d4f0$require$webidl.converters.DOMString(cacheName); - // 2.1.1 - // 2.2 - return this.#caches.has(cacheName); + * @param {import('../types/proxy-agent').ProxyAgent.Options | string | URL} opts + * @returns {URL} + */ #getUrl(opts) { + if (typeof opts === 'string') return new $58f872e44871c57c$require$URL(opts); + else if (opts instanceof $58f872e44871c57c$require$URL) return opts; + else return new $58f872e44871c57c$require$URL(opts.uri); } - /** - * @see https://w3c.github.io/ServiceWorker/#dom-cachestorage-open - * @param {string} cacheName - * @returns {Promise} - */ async open(cacheName) { - $4ed25fa12029d4f0$require$webidl.brandCheck(this, $4ed25fa12029d4f0$var$CacheStorage); - $4ed25fa12029d4f0$require$webidl.argumentLengthCheck(arguments, 1, { - header: "CacheStorage.open" + async [$58f872e44871c57c$require$kClose]() { + await this[$58f872e44871c57c$var$kAgent].close(); + await this[$58f872e44871c57c$var$kClient].close(); + } + async [$58f872e44871c57c$require$kDestroy]() { + await this[$58f872e44871c57c$var$kAgent].destroy(); + await this[$58f872e44871c57c$var$kClient].destroy(); + } +} +/** + * @param {string[] | Record} headers + * @returns {Record} + */ function $58f872e44871c57c$var$buildHeaders(headers) { + // When using undici.fetch, the headers list is stored + // as an array. + if (Array.isArray(headers)) { + /** @type {Record} */ const headersPair = {}; + for(let i = 0; i < headers.length; i += 2)headersPair[headers[i]] = headers[i + 1]; + return headersPair; + } + return headers; +} +/** + * @param {Record} headers + * + * Previous versions of ProxyAgent suggests the Proxy-Authorization in request headers + * Nevertheless, it was changed and to avoid a security vulnerability by end users + * this check was created. + * It should be removed in the next major version for performance reasons + */ function $58f872e44871c57c$var$throwIfProxyAuthIsSent(headers) { + const existProxyAuth = headers && Object.keys(headers).find((key)=>key.toLowerCase() === 'proxy-authorization'); + if (existProxyAuth) throw new $58f872e44871c57c$require$InvalidArgumentError('Proxy-Authorization should be sent in ProxyAgent constructor'); +} +$58f872e44871c57c$exports = $58f872e44871c57c$var$ProxyAgent; + + +var $fa0bbcba1187e152$exports = {}; +'use strict'; + +var $e0ttg = parcelRequire("e0ttg"); + +var $gNVEc = parcelRequire("gNVEc"); +var $fa0bbcba1187e152$require$kClose = $gNVEc.kClose; +var $fa0bbcba1187e152$require$kDestroy = $gNVEc.kDestroy; +var $fa0bbcba1187e152$require$kClosed = $gNVEc.kClosed; +var $fa0bbcba1187e152$require$kDestroyed = $gNVEc.kDestroyed; +var $fa0bbcba1187e152$require$kDispatch = $gNVEc.kDispatch; +var $fa0bbcba1187e152$require$kNoProxyAgent = $gNVEc.kNoProxyAgent; +var $fa0bbcba1187e152$require$kHttpProxyAgent = $gNVEc.kHttpProxyAgent; +var $fa0bbcba1187e152$require$kHttpsProxyAgent = $gNVEc.kHttpsProxyAgent; + + +var $h3pYu = parcelRequire("h3pYu"); +const $fa0bbcba1187e152$var$DEFAULT_PORTS = { + 'http:': 80, + 'https:': 443 +}; +let $fa0bbcba1187e152$var$experimentalWarned = false; +class $fa0bbcba1187e152$var$EnvHttpProxyAgent extends $e0ttg { + #noProxyValue = null; + #noProxyEntries = null; + #opts = null; + constructor(opts = {}){ + super(); + this.#opts = opts; + if (!$fa0bbcba1187e152$var$experimentalWarned) { + $fa0bbcba1187e152$var$experimentalWarned = true; + process.emitWarning('EnvHttpProxyAgent is experimental, expect them to change at any time.', { + code: 'UNDICI-EHPA' + }); + } + const { httpProxy: httpProxy, httpsProxy: httpsProxy, noProxy: noProxy, ...agentOpts } = opts; + this[$fa0bbcba1187e152$require$kNoProxyAgent] = new $h3pYu(agentOpts); + const HTTP_PROXY = httpProxy ?? process.env.http_proxy ?? process.env.HTTP_PROXY; + if (HTTP_PROXY) this[$fa0bbcba1187e152$require$kHttpProxyAgent] = new $58f872e44871c57c$exports({ + ...agentOpts, + uri: HTTP_PROXY }); - cacheName = $4ed25fa12029d4f0$require$webidl.converters.DOMString(cacheName); - // 2.1 - if (this.#caches.has(cacheName)) { - // await caches.open('v1') !== await caches.open('v1') - // 2.1.1 - const cache = this.#caches.get(cacheName); - // 2.1.1.1 - return new $4ed25fa12029d4f0$require$Cache($4ed25fa12029d4f0$require$kConstruct, cache); + else this[$fa0bbcba1187e152$require$kHttpProxyAgent] = this[$fa0bbcba1187e152$require$kNoProxyAgent]; + const HTTPS_PROXY = httpsProxy ?? process.env.https_proxy ?? process.env.HTTPS_PROXY; + if (HTTPS_PROXY) this[$fa0bbcba1187e152$require$kHttpsProxyAgent] = new $58f872e44871c57c$exports({ + ...agentOpts, + uri: HTTPS_PROXY + }); + else this[$fa0bbcba1187e152$require$kHttpsProxyAgent] = this[$fa0bbcba1187e152$require$kHttpProxyAgent]; + this.#parseNoProxy(); + } + [$fa0bbcba1187e152$require$kDispatch](opts, handler) { + const url = new URL(opts.origin); + const agent = this.#getProxyAgentForUrl(url); + return agent.dispatch(opts, handler); + } + async [$fa0bbcba1187e152$require$kClose]() { + await this[$fa0bbcba1187e152$require$kNoProxyAgent].close(); + if (!this[$fa0bbcba1187e152$require$kHttpProxyAgent][$fa0bbcba1187e152$require$kClosed]) await this[$fa0bbcba1187e152$require$kHttpProxyAgent].close(); + if (!this[$fa0bbcba1187e152$require$kHttpsProxyAgent][$fa0bbcba1187e152$require$kClosed]) await this[$fa0bbcba1187e152$require$kHttpsProxyAgent].close(); + } + async [$fa0bbcba1187e152$require$kDestroy](err) { + await this[$fa0bbcba1187e152$require$kNoProxyAgent].destroy(err); + if (!this[$fa0bbcba1187e152$require$kHttpProxyAgent][$fa0bbcba1187e152$require$kDestroyed]) await this[$fa0bbcba1187e152$require$kHttpProxyAgent].destroy(err); + if (!this[$fa0bbcba1187e152$require$kHttpsProxyAgent][$fa0bbcba1187e152$require$kDestroyed]) await this[$fa0bbcba1187e152$require$kHttpsProxyAgent].destroy(err); + } + #getProxyAgentForUrl(url) { + let { protocol: protocol, host: hostname, port: port } = url; + // Stripping ports in this way instead of using parsedUrl.hostname to make + // sure that the brackets around IPv6 addresses are kept. + hostname = hostname.replace(/:\d*$/, '').toLowerCase(); + port = Number.parseInt(port, 10) || $fa0bbcba1187e152$var$DEFAULT_PORTS[protocol] || 0; + if (!this.#shouldProxy(hostname, port)) return this[$fa0bbcba1187e152$require$kNoProxyAgent]; + if (protocol === 'https:') return this[$fa0bbcba1187e152$require$kHttpsProxyAgent]; + return this[$fa0bbcba1187e152$require$kHttpProxyAgent]; + } + #shouldProxy(hostname, port) { + if (this.#noProxyChanged) this.#parseNoProxy(); + if (this.#noProxyEntries.length === 0) return true // Always proxy if NO_PROXY is not set or empty. + ; + if (this.#noProxyValue === '*') return false // Never proxy if wildcard is set. + ; + for(let i = 0; i < this.#noProxyEntries.length; i++){ + const entry = this.#noProxyEntries[i]; + if (entry.port && entry.port !== port) continue; // Skip if ports don't match. + if (!/^[.*]/.test(entry.hostname)) { + // No wildcards, so don't proxy only if there is not an exact match. + if (hostname === entry.hostname) return false; + } else { + // Don't proxy if the hostname ends with the no_proxy host. + if (hostname.endsWith(entry.hostname.replace(/^\*/, ''))) return false; + } } - // 2.2 - const cache = []; - // 2.3 - this.#caches.set(cacheName, cache); - // 2.4 - return new $4ed25fa12029d4f0$require$Cache($4ed25fa12029d4f0$require$kConstruct, cache); + return true; } - /** - * @see https://w3c.github.io/ServiceWorker/#cache-storage-delete - * @param {string} cacheName - * @returns {Promise} - */ async delete(cacheName) { - $4ed25fa12029d4f0$require$webidl.brandCheck(this, $4ed25fa12029d4f0$var$CacheStorage); - $4ed25fa12029d4f0$require$webidl.argumentLengthCheck(arguments, 1, { - header: "CacheStorage.delete" - }); - cacheName = $4ed25fa12029d4f0$require$webidl.converters.DOMString(cacheName); - return this.#caches.delete(cacheName); + #parseNoProxy() { + const noProxyValue = this.#opts.noProxy ?? this.#noProxyEnv; + const noProxySplit = noProxyValue.split(/[,\s]/); + const noProxyEntries = []; + for(let i = 0; i < noProxySplit.length; i++){ + const entry = noProxySplit[i]; + if (!entry) continue; + const parsed = entry.match(/^(.+):(\d+)$/); + noProxyEntries.push({ + hostname: (parsed ? parsed[1] : entry).toLowerCase(), + port: parsed ? Number.parseInt(parsed[2], 10) : 0 + }); + } + this.#noProxyValue = noProxyValue; + this.#noProxyEntries = noProxyEntries; } - /** - * @see https://w3c.github.io/ServiceWorker/#cache-storage-keys - * @returns {string[]} - */ async keys() { - $4ed25fa12029d4f0$require$webidl.brandCheck(this, $4ed25fa12029d4f0$var$CacheStorage); - // 2.1 - const keys = this.#caches.keys(); - // 2.2 - return [ - ...keys - ]; + get #noProxyChanged() { + if (this.#opts.noProxy !== undefined) return false; + return this.#noProxyValue !== this.#noProxyEnv; + } + get #noProxyEnv() { + return process.env.no_proxy ?? process.env.NO_PROXY ?? ''; } } -Object.defineProperties($4ed25fa12029d4f0$var$CacheStorage.prototype, { - [Symbol.toStringTag]: { - value: "CacheStorage", - configurable: true - }, - match: $4ed25fa12029d4f0$require$kEnumerableProperty, - has: $4ed25fa12029d4f0$require$kEnumerableProperty, - open: $4ed25fa12029d4f0$require$kEnumerableProperty, - delete: $4ed25fa12029d4f0$require$kEnumerableProperty, - keys: $4ed25fa12029d4f0$require$kEnumerableProperty -}); -module.exports = { - CacheStorage: $4ed25fa12029d4f0$var$CacheStorage -}; +$fa0bbcba1187e152$exports = $fa0bbcba1187e152$var$EnvHttpProxyAgent; + + +var $9b045014931c6cf2$exports = {}; +'use strict'; + +var $ciMz5 = parcelRequire("ciMz5"); + +var $igYNQ = parcelRequire("igYNQ"); +class $9b045014931c6cf2$var$RetryAgent extends $ciMz5 { + #agent = null; + #options = null; + constructor(agent, options = {}){ + super(options); + this.#agent = agent; + this.#options = options; + } + dispatch(opts, handler) { + const retry = new $igYNQ({ + ...opts, + retryOptions: this.#options + }, { + dispatch: this.#agent.dispatch.bind(this.#agent), + handler: handler + }); + return this.#agent.dispatch(opts, retry); + } + close() { + return this.#agent.close(); + } + destroy() { + return this.#agent.destroy(); + } +} +$9b045014931c6cf2$exports = $9b045014931c6cf2$var$RetryAgent; -}); -parcelRegister("6iKmm", function(module, exports) { -"use strict"; -module.exports = { - kConstruct: (parcelRequire("hHZvh")).kConstruct -}; -}); +var $gTXXK = parcelRequire("gTXXK"); -parcelRegister("iQq1W", function(module, exports) { -"use strict"; +var $bFRvW = parcelRequire("bFRvW"); +const { InvalidArgumentError: $c06c3fa92e0659a8$var$InvalidArgumentError } = $gTXXK; +var $7047ddf88f54f8a7$exports = {}; -var $6iKmm = parcelRequire("6iKmm"); -var $db8146697506d79c$require$kConstruct = $6iKmm.kConstruct; +$parcel$export($7047ddf88f54f8a7$exports, "request", () => $7047ddf88f54f8a7$export$b5fe3f66a567bec0, (v) => $7047ddf88f54f8a7$export$b5fe3f66a567bec0 = v); +$parcel$export($7047ddf88f54f8a7$exports, "stream", () => $7047ddf88f54f8a7$export$4938110305e6185f, (v) => $7047ddf88f54f8a7$export$4938110305e6185f = v); +$parcel$export($7047ddf88f54f8a7$exports, "pipeline", () => $7047ddf88f54f8a7$export$43f28b24e1eb8181, (v) => $7047ddf88f54f8a7$export$43f28b24e1eb8181 = v); +$parcel$export($7047ddf88f54f8a7$exports, "upgrade", () => $7047ddf88f54f8a7$export$ba387509dbaf942e, (v) => $7047ddf88f54f8a7$export$ba387509dbaf942e = v); +$parcel$export($7047ddf88f54f8a7$exports, "connect", () => $7047ddf88f54f8a7$export$64605811ab45167f, (v) => $7047ddf88f54f8a7$export$64605811ab45167f = v); +var $7047ddf88f54f8a7$export$b5fe3f66a567bec0; +var $7047ddf88f54f8a7$export$4938110305e6185f; +var $7047ddf88f54f8a7$export$43f28b24e1eb8181; +var $7047ddf88f54f8a7$export$ba387509dbaf942e; +var $7047ddf88f54f8a7$export$64605811ab45167f; +'use strict'; -var $bPuCD = parcelRequire("bPuCD"); -var $db8146697506d79c$require$urlEquals = $bPuCD.urlEquals; -var $db8146697506d79c$require$getFieldValues = $bPuCD.fieldValues; +$7047ddf88f54f8a7$export$b5fe3f66a567bec0 = (parcelRequire("lfqfn")); -var $gv2nV = parcelRequire("gv2nV"); -var $db8146697506d79c$require$kEnumerableProperty = $gv2nV.kEnumerableProperty; -var $db8146697506d79c$require$isDisturbed = $gv2nV.isDisturbed; +$7047ddf88f54f8a7$export$4938110305e6185f = (parcelRequire("4iCbk")); -var $hHZvh = parcelRequire("hHZvh"); -var $db8146697506d79c$require$kHeadersList = $hHZvh.kHeadersList; +$7047ddf88f54f8a7$export$43f28b24e1eb8181 = (parcelRequire("lrjUb")); -var $jk0LQ = parcelRequire("jk0LQ"); -var $db8146697506d79c$require$webidl = $jk0LQ.webidl; +$7047ddf88f54f8a7$export$ba387509dbaf942e = (parcelRequire("ciYwn")); -var $lHKGY = parcelRequire("lHKGY"); -var $db8146697506d79c$require$Response = $lHKGY.Response; -var $db8146697506d79c$require$cloneResponse = $lHKGY.cloneResponse; +$7047ddf88f54f8a7$export$64605811ab45167f = (parcelRequire("b2QcJ")); -var $gY7cH = parcelRequire("gY7cH"); -var $db8146697506d79c$require$Request = $gY7cH.Request; -var $74L4J = parcelRequire("74L4J"); -var $db8146697506d79c$require$kState = $74L4J.kState; -var $db8146697506d79c$require$kHeaders = $74L4J.kHeaders; -var $db8146697506d79c$require$kGuard = $74L4J.kGuard; -var $db8146697506d79c$require$kRealm = $74L4J.kRealm; -var $lJQOR = parcelRequire("lJQOR"); -var $db8146697506d79c$require$fetching = $lJQOR.fetching; +var $ifuPO = parcelRequire("ifuPO"); +var $f90680b29eb66442$exports = {}; +'use strict'; -var $4EkpM = parcelRequire("4EkpM"); -var $db8146697506d79c$require$urlIsHttpHttpsScheme = $4EkpM.urlIsHttpHttpsScheme; -var $db8146697506d79c$require$createDeferredPromise = $4EkpM.createDeferredPromise; -var $db8146697506d79c$require$readAllBytes = $4EkpM.readAllBytes; +var $f90680b29eb66442$require$promisify = $in2sP$nodeutil.promisify; +var $63Rhm = parcelRequire("63Rhm"); +var $aa604bc295903c92$exports = {}; +'use strict'; +var $6bbb4c83a27496f4$exports = {}; +'use strict'; -var $gvOkt = parcelRequire("gvOkt"); -var $db8146697506d79c$require$getGlobalDispatcher = $gvOkt.getGlobalDispatcher; +var $gTXXK = parcelRequire("gTXXK"); +var $6bbb4c83a27496f4$require$UndiciError = $gTXXK.UndiciError; +const $6bbb4c83a27496f4$var$kMockNotMatchedError = Symbol.for('undici.error.UND_MOCK_ERR_MOCK_NOT_MATCHED'); /** - * @see https://w3c.github.io/ServiceWorker/#dfn-cache-batch-operation - * @typedef {Object} CacheBatchOperation - * @property {'delete' | 'put'} type - * @property {any} request - * @property {any} response - * @property {import('../../types/cache').CacheQueryOptions} options - */ /** - * @see https://w3c.github.io/ServiceWorker/#dfn-request-response-list - * @typedef {[any, any][]} requestResponseList - */ class $db8146697506d79c$var$Cache { - /** - * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-request-response-list - * @type {requestResponseList} - */ #relevantRequestResponseList; - constructor(){ - if (arguments[0] !== $db8146697506d79c$require$kConstruct) $db8146697506d79c$require$webidl.illegalConstructor(); - this.#relevantRequestResponseList = arguments[1]; - } - async match(request, options = {}) { - $db8146697506d79c$require$webidl.brandCheck(this, $db8146697506d79c$var$Cache); - $db8146697506d79c$require$webidl.argumentLengthCheck(arguments, 1, { - header: "Cache.match" - }); - request = $db8146697506d79c$require$webidl.converters.RequestInfo(request); - options = $db8146697506d79c$require$webidl.converters.CacheQueryOptions(options); - const p = await this.matchAll(request, options); - if (p.length === 0) return; - return p[0]; + * The request does not match any registered mock dispatches. + */ class $6bbb4c83a27496f4$var$MockNotMatchedError extends $6bbb4c83a27496f4$require$UndiciError { + constructor(message){ + super(message); + Error.captureStackTrace(this, $6bbb4c83a27496f4$var$MockNotMatchedError); + this.name = 'MockNotMatchedError'; + this.message = message || 'The request does not match any registered mock dispatches'; + this.code = 'UND_MOCK_ERR_MOCK_NOT_MATCHED'; } - async matchAll(request, options = {}) { - $db8146697506d79c$require$webidl.brandCheck(this, $db8146697506d79c$var$Cache); - if (request !== undefined) request = $db8146697506d79c$require$webidl.converters.RequestInfo(request); - options = $db8146697506d79c$require$webidl.converters.CacheQueryOptions(options); - // 1. - let r = null; - // 2. - if (request !== undefined) { - if (request instanceof $db8146697506d79c$require$Request) { - // 2.1.1 - r = request[$db8146697506d79c$require$kState]; - // 2.1.2 - if (r.method !== "GET" && !options.ignoreMethod) return []; - } else if (typeof request === "string") // 2.2.1 - r = new $db8146697506d79c$require$Request(request)[$db8146697506d79c$require$kState]; - } - // 5. - // 5.1 - const responses = []; - // 5.2 - if (request === undefined) // 5.2.1 - for (const requestResponse of this.#relevantRequestResponseList)responses.push(requestResponse[1]); - else { - // 5.3.1 - const requestResponses = this.#queryCache(r, options); - // 5.3.2 - for (const requestResponse of requestResponses)responses.push(requestResponse[1]); - } - // 5.4 - // We don't implement CORs so we don't need to loop over the responses, yay! - // 5.5.1 - const responseList = []; - // 5.5.2 - for (const response of responses){ - // 5.5.2.1 - const responseObject = new $db8146697506d79c$require$Response(response.body?.source ?? null); - const body = responseObject[$db8146697506d79c$require$kState].body; - responseObject[$db8146697506d79c$require$kState] = response; - responseObject[$db8146697506d79c$require$kState].body = body; - responseObject[$db8146697506d79c$require$kHeaders][$db8146697506d79c$require$kHeadersList] = response.headersList; - responseObject[$db8146697506d79c$require$kHeaders][$db8146697506d79c$require$kGuard] = "immutable"; - responseList.push(responseObject); - } - // 6. - return Object.freeze(responseList); + static [Symbol.hasInstance](instance) { + return instance && instance[$6bbb4c83a27496f4$var$kMockNotMatchedError] === true; } - async add(request) { - $db8146697506d79c$require$webidl.brandCheck(this, $db8146697506d79c$var$Cache); - $db8146697506d79c$require$webidl.argumentLengthCheck(arguments, 1, { - header: "Cache.add" - }); - request = $db8146697506d79c$require$webidl.converters.RequestInfo(request); - // 1. - const requests = [ - request + [$6bbb4c83a27496f4$var$kMockNotMatchedError] = true; +} +$6bbb4c83a27496f4$exports = { + MockNotMatchedError: $6bbb4c83a27496f4$var$MockNotMatchedError +}; + + +var $aa604bc295903c92$require$MockNotMatchedError = $6bbb4c83a27496f4$exports.MockNotMatchedError; +var $5cb1365a47e9f79c$exports = {}; +'use strict'; +$5cb1365a47e9f79c$exports = { + kAgent: Symbol('agent'), + kOptions: Symbol('options'), + kFactory: Symbol('factory'), + kDispatches: Symbol('dispatches'), + kDispatchKey: Symbol('dispatch key'), + kDefaultHeaders: Symbol('default headers'), + kDefaultTrailers: Symbol('default trailers'), + kContentLength: Symbol('content length'), + kMockAgent: Symbol('mock agent'), + kMockAgentSet: Symbol('mock agent set'), + kMockAgentGet: Symbol('mock agent get'), + kMockDispatch: Symbol('mock dispatch'), + kClose: Symbol('close'), + kOriginalClose: Symbol('original agent close'), + kOrigin: Symbol('origin'), + kIsMockActive: Symbol('is mock active'), + kNetConnect: Symbol('net connect'), + kGetNetConnect: Symbol('get net connect'), + kConnected: Symbol('connected') +}; + + +var $aa604bc295903c92$require$kDispatches = $5cb1365a47e9f79c$exports.kDispatches; +var $aa604bc295903c92$require$kMockAgent = $5cb1365a47e9f79c$exports.kMockAgent; +var $aa604bc295903c92$require$kOriginalDispatch = $5cb1365a47e9f79c$exports.kOriginalDispatch; +var $aa604bc295903c92$require$kOrigin = $5cb1365a47e9f79c$exports.kOrigin; +var $aa604bc295903c92$require$kGetNetConnect = $5cb1365a47e9f79c$exports.kGetNetConnect; + +var $bFRvW = parcelRequire("bFRvW"); +var $aa604bc295903c92$require$buildURL = $bFRvW.buildURL; + +var $aa604bc295903c92$require$STATUS_CODES = $in2sP$nodehttp.STATUS_CODES; + +const { types: { isPromise: $aa604bc295903c92$var$isPromise } } = $in2sP$nodeutil; +function $aa604bc295903c92$var$matchValue(match, value) { + if (typeof match === 'string') return match === value; + if (match instanceof RegExp) return match.test(value); + if (typeof match === 'function') return match(value) === true; + return false; +} +function $aa604bc295903c92$var$lowerCaseEntries(headers) { + return Object.fromEntries(Object.entries(headers).map(([headerName, headerValue])=>{ + return [ + headerName.toLocaleLowerCase(), + headerValue ]; - // 2. - const responseArrayPromise = this.addAll(requests); - // 3. - return await responseArrayPromise; - } - async addAll(requests) { - $db8146697506d79c$require$webidl.brandCheck(this, $db8146697506d79c$var$Cache); - $db8146697506d79c$require$webidl.argumentLengthCheck(arguments, 1, { - header: "Cache.addAll" - }); - requests = $db8146697506d79c$require$webidl.converters["sequence"](requests); - // 1. - const responsePromises = []; - // 2. - const requestList = []; - // 3. - for (const request of requests){ - if (typeof request === "string") continue; - // 3.1 - const r = request[$db8146697506d79c$require$kState]; - // 3.2 - if (!$db8146697506d79c$require$urlIsHttpHttpsScheme(r.url) || r.method !== "GET") throw $db8146697506d79c$require$webidl.errors.exception({ - header: "Cache.addAll", - message: "Expected http/s scheme when method is not GET." - }); - } - // 4. - /** @type {ReturnType[]} */ const fetchControllers = []; - // 5. - for (const request of requests){ - // 5.1 - const r = new $db8146697506d79c$require$Request(request)[$db8146697506d79c$require$kState]; - // 5.2 - if (!$db8146697506d79c$require$urlIsHttpHttpsScheme(r.url)) throw $db8146697506d79c$require$webidl.errors.exception({ - header: "Cache.addAll", - message: "Expected http/s scheme." - }); - // 5.4 - r.initiator = "fetch"; - r.destination = "subresource"; - // 5.5 - requestList.push(r); - // 5.6 - const responsePromise = $db8146697506d79c$require$createDeferredPromise(); - // 5.7 - fetchControllers.push($db8146697506d79c$require$fetching({ - request: r, - dispatcher: $db8146697506d79c$require$getGlobalDispatcher(), - processResponse (response) { - // 1. - if (response.type === "error" || response.status === 206 || response.status < 200 || response.status > 299) responsePromise.reject($db8146697506d79c$require$webidl.errors.exception({ - header: "Cache.addAll", - message: "Received an invalid status code or the request failed." - })); - else if (response.headersList.contains("vary")) { - // 2.1 - const fieldValues = $db8146697506d79c$require$getFieldValues(response.headersList.get("vary")); - // 2.2 - for (const fieldValue of fieldValues)// 2.2.1 - if (fieldValue === "*") { - responsePromise.reject($db8146697506d79c$require$webidl.errors.exception({ - header: "Cache.addAll", - message: "invalid vary field value" - })); - for (const controller of fetchControllers)controller.abort(); - return; - } - } - }, - processResponseEndOfBody (response) { - // 1. - if (response.aborted) { - responsePromise.reject(new DOMException("aborted", "AbortError")); - return; - } - // 2. - responsePromise.resolve(response); - } - })); - // 5.8 - responsePromises.push(responsePromise.promise); - } - // 6. - const p = Promise.all(responsePromises); - // 7. - const responses = await p; - // 7.1 - const operations = []; - // 7.2 - let index = 0; - // 7.3 - for (const response of responses){ - // 7.3.1 - /** @type {CacheBatchOperation} */ const operation = { - type: "put", - request: requestList[index], - response: response // 7.3.4 - }; - operations.push(operation) // 7.3.5 - ; - index++ // 7.3.6 - ; - } - // 7.5 - const cacheJobPromise = $db8146697506d79c$require$createDeferredPromise(); - // 7.6.1 - let errorData = null; - // 7.6.2 - try { - this.#batchCacheOperations(operations); - } catch (e) { - errorData = e; + })); +} +/** + * @param {import('../../index').Headers|string[]|Record} headers + * @param {string} key + */ function $aa604bc295903c92$var$getHeaderByName(headers, key) { + if (Array.isArray(headers)) { + for(let i = 0; i < headers.length; i += 2){ + if (headers[i].toLocaleLowerCase() === key.toLocaleLowerCase()) return headers[i + 1]; } - // 7.6.3 - queueMicrotask(()=>{ - // 7.6.3.1 - if (errorData === null) cacheJobPromise.resolve(undefined); - else // 7.6.3.2 - cacheJobPromise.reject(errorData); - }); - // 7.7 - return cacheJobPromise.promise; + return undefined; + } else if (typeof headers.get === 'function') return headers.get(key); + else return $aa604bc295903c92$var$lowerCaseEntries(headers)[key.toLocaleLowerCase()]; +} +/** @param {string[]} headers */ function $aa604bc295903c92$var$buildHeadersFromArray(headers) { + const clone = headers.slice(); + const entries = []; + for(let index = 0; index < clone.length; index += 2)entries.push([ + clone[index], + clone[index + 1] + ]); + return Object.fromEntries(entries); +} +function $aa604bc295903c92$var$matchHeaders(mockDispatch, headers) { + if (typeof mockDispatch.headers === 'function') { + if (Array.isArray(headers)) headers = $aa604bc295903c92$var$buildHeadersFromArray(headers); + return mockDispatch.headers(headers ? $aa604bc295903c92$var$lowerCaseEntries(headers) : {}); } - async put(request, response) { - $db8146697506d79c$require$webidl.brandCheck(this, $db8146697506d79c$var$Cache); - $db8146697506d79c$require$webidl.argumentLengthCheck(arguments, 2, { - header: "Cache.put" - }); - request = $db8146697506d79c$require$webidl.converters.RequestInfo(request); - response = $db8146697506d79c$require$webidl.converters.Response(response); - // 1. - let innerRequest = null; - // 2. - if (request instanceof $db8146697506d79c$require$Request) innerRequest = request[$db8146697506d79c$require$kState]; - else innerRequest = new $db8146697506d79c$require$Request(request)[$db8146697506d79c$require$kState]; - // 4. - if (!$db8146697506d79c$require$urlIsHttpHttpsScheme(innerRequest.url) || innerRequest.method !== "GET") throw $db8146697506d79c$require$webidl.errors.exception({ - header: "Cache.put", - message: "Expected an http/s scheme when method is not GET" - }); - // 5. - const innerResponse = response[$db8146697506d79c$require$kState]; - // 6. - if (innerResponse.status === 206) throw $db8146697506d79c$require$webidl.errors.exception({ - header: "Cache.put", - message: "Got 206 status" - }); - // 7. - if (innerResponse.headersList.contains("vary")) { - // 7.1. - const fieldValues = $db8146697506d79c$require$getFieldValues(innerResponse.headersList.get("vary")); - // 7.2. - for (const fieldValue of fieldValues){ - // 7.2.1 - if (fieldValue === "*") throw $db8146697506d79c$require$webidl.errors.exception({ - header: "Cache.put", - message: "Got * vary field value" - }); - } - } - // 8. - if (innerResponse.body && ($db8146697506d79c$require$isDisturbed(innerResponse.body.stream) || innerResponse.body.stream.locked)) throw $db8146697506d79c$require$webidl.errors.exception({ - header: "Cache.put", - message: "Response body is locked or disturbed" - }); - // 9. - const clonedResponse = $db8146697506d79c$require$cloneResponse(innerResponse); - // 10. - const bodyReadPromise = $db8146697506d79c$require$createDeferredPromise(); - // 11. - if (innerResponse.body != null) { - // 11.1 - const stream = innerResponse.body.stream; - // 11.2 - const reader = stream.getReader(); - // 11.3 - $db8146697506d79c$require$readAllBytes(reader).then(bodyReadPromise.resolve, bodyReadPromise.reject); - } else bodyReadPromise.resolve(undefined); - // 12. - /** @type {CacheBatchOperation[]} */ const operations = []; - // 13. - /** @type {CacheBatchOperation} */ const operation = { - type: "put", - request: innerRequest, - response: clonedResponse // 16. - }; - // 17. - operations.push(operation); - // 19. - const bytes = await bodyReadPromise.promise; - if (clonedResponse.body != null) clonedResponse.body.source = bytes; - // 19.1 - const cacheJobPromise = $db8146697506d79c$require$createDeferredPromise(); - // 19.2.1 - let errorData = null; - // 19.2.2 - try { - this.#batchCacheOperations(operations); - } catch (e) { - errorData = e; - } - // 19.2.3 - queueMicrotask(()=>{ - // 19.2.3.1 - if (errorData === null) cacheJobPromise.resolve(); - else cacheJobPromise.reject(errorData); - }); - return cacheJobPromise.promise; + if (typeof mockDispatch.headers === 'undefined') return true; + if (typeof headers !== 'object' || typeof mockDispatch.headers !== 'object') return false; + for (const [matchHeaderName, matchHeaderValue] of Object.entries(mockDispatch.headers)){ + const headerValue = $aa604bc295903c92$var$getHeaderByName(headers, matchHeaderName); + if (!$aa604bc295903c92$var$matchValue(matchHeaderValue, headerValue)) return false; + } + return true; +} +function $aa604bc295903c92$var$safeUrl(path) { + if (typeof path !== 'string') return path; + const pathSegments = path.split('?'); + if (pathSegments.length !== 2) return path; + const qp = new URLSearchParams(pathSegments.pop()); + qp.sort(); + return [ + ...pathSegments, + qp.toString() + ].join('?'); +} +function $aa604bc295903c92$var$matchKey(mockDispatch, { path: path, method: method, body: body, headers: headers }) { + const pathMatch = $aa604bc295903c92$var$matchValue(mockDispatch.path, path); + const methodMatch = $aa604bc295903c92$var$matchValue(mockDispatch.method, method); + const bodyMatch = typeof mockDispatch.body !== 'undefined' ? $aa604bc295903c92$var$matchValue(mockDispatch.body, body) : true; + const headersMatch = $aa604bc295903c92$var$matchHeaders(mockDispatch, headers); + return pathMatch && methodMatch && bodyMatch && headersMatch; +} +function $aa604bc295903c92$var$getResponseData(data) { + if (Buffer.isBuffer(data)) return data; + else if (data instanceof Uint8Array) return data; + else if (data instanceof ArrayBuffer) return data; + else if (typeof data === 'object') return JSON.stringify(data); + else return data.toString(); +} +function $aa604bc295903c92$var$getMockDispatch(mockDispatches, key) { + const basePath = key.query ? $aa604bc295903c92$require$buildURL(key.path, key.query) : key.path; + const resolvedPath = typeof basePath === 'string' ? $aa604bc295903c92$var$safeUrl(basePath) : basePath; + // Match path + let matchedMockDispatches = mockDispatches.filter(({ consumed: consumed })=>!consumed).filter(({ path: path })=>$aa604bc295903c92$var$matchValue($aa604bc295903c92$var$safeUrl(path), resolvedPath)); + if (matchedMockDispatches.length === 0) throw new $aa604bc295903c92$require$MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`); + // Match method + matchedMockDispatches = matchedMockDispatches.filter(({ method: method })=>$aa604bc295903c92$var$matchValue(method, key.method)); + if (matchedMockDispatches.length === 0) throw new $aa604bc295903c92$require$MockNotMatchedError(`Mock dispatch not matched for method '${key.method}' on path '${resolvedPath}'`); + // Match body + matchedMockDispatches = matchedMockDispatches.filter(({ body: body })=>typeof body !== 'undefined' ? $aa604bc295903c92$var$matchValue(body, key.body) : true); + if (matchedMockDispatches.length === 0) throw new $aa604bc295903c92$require$MockNotMatchedError(`Mock dispatch not matched for body '${key.body}' on path '${resolvedPath}'`); + // Match headers + matchedMockDispatches = matchedMockDispatches.filter((mockDispatch)=>$aa604bc295903c92$var$matchHeaders(mockDispatch, key.headers)); + if (matchedMockDispatches.length === 0) { + const headers = typeof key.headers === 'object' ? JSON.stringify(key.headers) : key.headers; + throw new $aa604bc295903c92$require$MockNotMatchedError(`Mock dispatch not matched for headers '${headers}' on path '${resolvedPath}'`); } - async delete(request, options = {}) { - $db8146697506d79c$require$webidl.brandCheck(this, $db8146697506d79c$var$Cache); - $db8146697506d79c$require$webidl.argumentLengthCheck(arguments, 1, { - header: "Cache.delete" - }); - request = $db8146697506d79c$require$webidl.converters.RequestInfo(request); - options = $db8146697506d79c$require$webidl.converters.CacheQueryOptions(options); - /** - * @type {Request} - */ let r = null; - if (request instanceof $db8146697506d79c$require$Request) { - r = request[$db8146697506d79c$require$kState]; - if (r.method !== "GET" && !options.ignoreMethod) return false; - } else { - $g40fK$assert(typeof request === "string"); - r = new $db8146697506d79c$require$Request(request)[$db8146697506d79c$require$kState]; - } - /** @type {CacheBatchOperation[]} */ const operations = []; - /** @type {CacheBatchOperation} */ const operation = { - type: "delete", - request: r, - options: options - }; - operations.push(operation); - const cacheJobPromise = $db8146697506d79c$require$createDeferredPromise(); - let errorData = null; - let requestResponses; - try { - requestResponses = this.#batchCacheOperations(operations); - } catch (e) { - errorData = e; + return matchedMockDispatches[0]; +} +function $aa604bc295903c92$var$addMockDispatch(mockDispatches, key, data) { + const baseData = { + timesInvoked: 0, + times: 1, + persist: false, + consumed: false + }; + const replyData = typeof data === 'function' ? { + callback: data + } : { + ...data + }; + const newMockDispatch = { + ...baseData, + ...key, + pending: true, + data: { + error: null, + ...replyData } - queueMicrotask(()=>{ - if (errorData === null) cacheJobPromise.resolve(!!requestResponses?.length); - else cacheJobPromise.reject(errorData); - }); - return cacheJobPromise.promise; + }; + mockDispatches.push(newMockDispatch); + return newMockDispatch; +} +function $aa604bc295903c92$var$deleteMockDispatch(mockDispatches, key) { + const index = mockDispatches.findIndex((dispatch)=>{ + if (!dispatch.consumed) return false; + return $aa604bc295903c92$var$matchKey(dispatch, key); + }); + if (index !== -1) mockDispatches.splice(index, 1); +} +function $aa604bc295903c92$var$buildKey(opts) { + const { path: path, method: method, body: body, headers: headers, query: query } = opts; + return { + path: path, + method: method, + body: body, + headers: headers, + query: query + }; +} +function $aa604bc295903c92$var$generateKeyValues(data) { + const keys = Object.keys(data); + const result = []; + for(let i = 0; i < keys.length; ++i){ + const key = keys[i]; + const value = data[key]; + const name = Buffer.from(`${key}`); + if (Array.isArray(value)) for(let j = 0; j < value.length; ++j)result.push(name, Buffer.from(`${value[j]}`)); + else result.push(name, Buffer.from(`${value}`)); } - /** - * @see https://w3c.github.io/ServiceWorker/#dom-cache-keys - * @param {any} request - * @param {import('../../types/cache').CacheQueryOptions} options - * @returns {readonly Request[]} - */ async keys(request, options = {}) { - $db8146697506d79c$require$webidl.brandCheck(this, $db8146697506d79c$var$Cache); - if (request !== undefined) request = $db8146697506d79c$require$webidl.converters.RequestInfo(request); - options = $db8146697506d79c$require$webidl.converters.CacheQueryOptions(options); - // 1. - let r = null; - // 2. - if (request !== undefined) { - // 2.1 - if (request instanceof $db8146697506d79c$require$Request) { - // 2.1.1 - r = request[$db8146697506d79c$require$kState]; - // 2.1.2 - if (r.method !== "GET" && !options.ignoreMethod) return []; - } else if (typeof request === "string") r = new $db8146697506d79c$require$Request(request)[$db8146697506d79c$require$kState]; + return result; +} +/** + * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status + * @param {number} statusCode + */ function $aa604bc295903c92$var$getStatusText(statusCode) { + return $aa604bc295903c92$require$STATUS_CODES[statusCode] || 'unknown'; +} +async function $aa604bc295903c92$var$getResponse(body) { + const buffers = []; + for await (const data of body)buffers.push(data); + return Buffer.concat(buffers).toString('utf8'); +} +/** + * Mock dispatch function used to simulate undici dispatches + */ function $aa604bc295903c92$var$mockDispatch(opts, handler) { + // Get mock dispatch from built key + const key = $aa604bc295903c92$var$buildKey(opts); + const mockDispatch = $aa604bc295903c92$var$getMockDispatch(this[$aa604bc295903c92$require$kDispatches], key); + mockDispatch.timesInvoked++; + // Here's where we resolve a callback if a callback is present for the dispatch data. + if (mockDispatch.data.callback) mockDispatch.data = { + ...mockDispatch.data, + ...mockDispatch.data.callback(opts) + }; + // Parse mockDispatch data + const { data: { statusCode: statusCode, data: data, headers: headers, trailers: trailers, error: error }, delay: delay, persist: persist } = mockDispatch; + const { timesInvoked: timesInvoked, times: times } = mockDispatch; + // If it's used up and not persistent, mark as consumed + mockDispatch.consumed = !persist && timesInvoked >= times; + mockDispatch.pending = timesInvoked < times; + // If specified, trigger dispatch error + if (error !== null) { + $aa604bc295903c92$var$deleteMockDispatch(this[$aa604bc295903c92$require$kDispatches], key); + handler.onError(error); + return true; + } + // Handle the request with a delay if necessary + if (typeof delay === 'number' && delay > 0) setTimeout(()=>{ + handleReply(this[$aa604bc295903c92$require$kDispatches]); + }, delay); + else handleReply(this[$aa604bc295903c92$require$kDispatches]); + function handleReply(mockDispatches, _data = data) { + // fetch's HeadersList is a 1D string array + const optsHeaders = Array.isArray(opts.headers) ? $aa604bc295903c92$var$buildHeadersFromArray(opts.headers) : opts.headers; + const body = typeof _data === 'function' ? _data({ + ...opts, + headers: optsHeaders + }) : _data; + // util.types.isPromise is likely needed for jest. + if ($aa604bc295903c92$var$isPromise(body)) { + // If handleReply is asynchronous, throwing an error + // in the callback will reject the promise, rather than + // synchronously throw the error, which breaks some tests. + // Rather, we wait for the callback to resolve if it is a + // promise, and then re-run handleReply with the new body. + body.then((newData)=>handleReply(mockDispatches, newData)); + return; } - // 4. - const promise = $db8146697506d79c$require$createDeferredPromise(); - // 5. - // 5.1 - const requests = []; - // 5.2 - if (request === undefined) // 5.2.1 - for (const requestResponse of this.#relevantRequestResponseList)// 5.2.1.1 - requests.push(requestResponse[0]); - else { - // 5.3.1 - const requestResponses = this.#queryCache(r, options); - // 5.3.2 - for (const requestResponse of requestResponses)// 5.3.2.1 - requests.push(requestResponse[0]); + const responseData = $aa604bc295903c92$var$getResponseData(body); + const responseHeaders = $aa604bc295903c92$var$generateKeyValues(headers); + const responseTrailers = $aa604bc295903c92$var$generateKeyValues(trailers); + handler.onConnect?.((err)=>handler.onError(err), null); + handler.onHeaders?.(statusCode, responseHeaders, resume, $aa604bc295903c92$var$getStatusText(statusCode)); + handler.onData?.(Buffer.from(responseData)); + handler.onComplete?.(responseTrailers); + $aa604bc295903c92$var$deleteMockDispatch(mockDispatches, key); + } + function resume() {} + return true; +} +function $aa604bc295903c92$var$buildMockDispatch() { + const agent = this[$aa604bc295903c92$require$kMockAgent]; + const origin = this[$aa604bc295903c92$require$kOrigin]; + const originalDispatch = this[$aa604bc295903c92$require$kOriginalDispatch]; + return function dispatch(opts, handler) { + if (agent.isMockActive) try { + $aa604bc295903c92$var$mockDispatch.call(this, opts, handler); + } catch (error) { + if (error instanceof $aa604bc295903c92$require$MockNotMatchedError) { + const netConnect = agent[$aa604bc295903c92$require$kGetNetConnect](); + if (netConnect === false) throw new $aa604bc295903c92$require$MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect disabled)`); + if ($aa604bc295903c92$var$checkNetConnect(netConnect, origin)) originalDispatch.call(this, opts, handler); + else throw new $aa604bc295903c92$require$MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect is not enabled for this origin)`); + } else throw error; } - // 5.4 - queueMicrotask(()=>{ - // 5.4.1 - const requestList = []; - // 5.4.2 - for (const request of requests){ - const requestObject = new $db8146697506d79c$require$Request("https://a"); - requestObject[$db8146697506d79c$require$kState] = request; - requestObject[$db8146697506d79c$require$kHeaders][$db8146697506d79c$require$kHeadersList] = request.headersList; - requestObject[$db8146697506d79c$require$kHeaders][$db8146697506d79c$require$kGuard] = "immutable"; - requestObject[$db8146697506d79c$require$kRealm] = request.client; - // 5.4.2.1 - requestList.push(requestObject); - } - // 5.4.3 - promise.resolve(Object.freeze(requestList)); - }); - return promise.promise; + else originalDispatch.call(this, opts, handler); + }; +} +function $aa604bc295903c92$var$checkNetConnect(netConnect, origin) { + const url = new URL(origin); + if (netConnect === true) return true; + else if (Array.isArray(netConnect) && netConnect.some((matcher)=>$aa604bc295903c92$var$matchValue(matcher, url.host))) return true; + return false; +} +function $aa604bc295903c92$var$buildMockOptions(opts) { + if (opts) { + const { agent: agent, ...mockOptions } = opts; + return mockOptions; } - /** - * @see https://w3c.github.io/ServiceWorker/#batch-cache-operations-algorithm - * @param {CacheBatchOperation[]} operations - * @returns {requestResponseList} - */ #batchCacheOperations(operations) { - // 1. - const cache = this.#relevantRequestResponseList; - // 2. - const backupCache = [ - ...cache - ]; - // 3. - const addedItems = []; - // 4.1 - const resultList = []; - try { - // 4.2 - for (const operation of operations){ - // 4.2.1 - if (operation.type !== "delete" && operation.type !== "put") throw $db8146697506d79c$require$webidl.errors.exception({ - header: "Cache.#batchCacheOperations", - message: 'operation type does not match "delete" or "put"' - }); - // 4.2.2 - if (operation.type === "delete" && operation.response != null) throw $db8146697506d79c$require$webidl.errors.exception({ - header: "Cache.#batchCacheOperations", - message: "delete operation should not have an associated response" - }); - // 4.2.3 - if (this.#queryCache(operation.request, operation.options, addedItems).length) throw new DOMException("???", "InvalidStateError"); - // 4.2.4 - let requestResponses; - // 4.2.5 - if (operation.type === "delete") { - // 4.2.5.1 - requestResponses = this.#queryCache(operation.request, operation.options); - // TODO: the spec is wrong, this is needed to pass WPTs - if (requestResponses.length === 0) return []; - // 4.2.5.2 - for (const requestResponse of requestResponses){ - const idx = cache.indexOf(requestResponse); - $g40fK$assert(idx !== -1); - // 4.2.5.2.1 - cache.splice(idx, 1); - } - } else if (operation.type === "put") { - // 4.2.6.1 - if (operation.response == null) throw $db8146697506d79c$require$webidl.errors.exception({ - header: "Cache.#batchCacheOperations", - message: "put operation should have an associated response" - }); - // 4.2.6.2 - const r = operation.request; - // 4.2.6.3 - if (!$db8146697506d79c$require$urlIsHttpHttpsScheme(r.url)) throw $db8146697506d79c$require$webidl.errors.exception({ - header: "Cache.#batchCacheOperations", - message: "expected http or https scheme" - }); - // 4.2.6.4 - if (r.method !== "GET") throw $db8146697506d79c$require$webidl.errors.exception({ - header: "Cache.#batchCacheOperations", - message: "not get method" - }); - // 4.2.6.5 - if (operation.options != null) throw $db8146697506d79c$require$webidl.errors.exception({ - header: "Cache.#batchCacheOperations", - message: "options must not be defined" - }); - // 4.2.6.6 - requestResponses = this.#queryCache(operation.request); - // 4.2.6.7 - for (const requestResponse of requestResponses){ - const idx = cache.indexOf(requestResponse); - $g40fK$assert(idx !== -1); - // 4.2.6.7.1 - cache.splice(idx, 1); - } - // 4.2.6.8 - cache.push([ - operation.request, - operation.response - ]); - // 4.2.6.10 - addedItems.push([ - operation.request, - operation.response - ]); - } - // 4.2.7 - resultList.push([ - operation.request, - operation.response - ]); +} +$aa604bc295903c92$exports = { + getResponseData: $aa604bc295903c92$var$getResponseData, + getMockDispatch: $aa604bc295903c92$var$getMockDispatch, + addMockDispatch: $aa604bc295903c92$var$addMockDispatch, + deleteMockDispatch: $aa604bc295903c92$var$deleteMockDispatch, + buildKey: $aa604bc295903c92$var$buildKey, + generateKeyValues: $aa604bc295903c92$var$generateKeyValues, + matchValue: $aa604bc295903c92$var$matchValue, + getResponse: $aa604bc295903c92$var$getResponse, + getStatusText: $aa604bc295903c92$var$getStatusText, + mockDispatch: $aa604bc295903c92$var$mockDispatch, + buildMockDispatch: $aa604bc295903c92$var$buildMockDispatch, + checkNetConnect: $aa604bc295903c92$var$checkNetConnect, + buildMockOptions: $aa604bc295903c92$var$buildMockOptions, + getHeaderByName: $aa604bc295903c92$var$getHeaderByName, + buildHeadersFromArray: $aa604bc295903c92$var$buildHeadersFromArray +}; + + +var $f90680b29eb66442$require$buildMockDispatch = $aa604bc295903c92$exports.buildMockDispatch; + +var $f90680b29eb66442$require$kDispatches = $5cb1365a47e9f79c$exports.kDispatches; +var $f90680b29eb66442$require$kMockAgent = $5cb1365a47e9f79c$exports.kMockAgent; +var $f90680b29eb66442$require$kClose = $5cb1365a47e9f79c$exports.kClose; +var $f90680b29eb66442$require$kOriginalClose = $5cb1365a47e9f79c$exports.kOriginalClose; +var $f90680b29eb66442$require$kOrigin = $5cb1365a47e9f79c$exports.kOrigin; +var $f90680b29eb66442$require$kOriginalDispatch = $5cb1365a47e9f79c$exports.kOriginalDispatch; +var $f90680b29eb66442$require$kConnected = $5cb1365a47e9f79c$exports.kConnected; +var $091e80542b169402$export$fb1b189d8a131a8b; +var $091e80542b169402$export$61f2724da7650995; +'use strict'; + +var $091e80542b169402$require$getResponseData = $aa604bc295903c92$exports.getResponseData; +var $091e80542b169402$require$buildKey = $aa604bc295903c92$exports.buildKey; +var $091e80542b169402$require$addMockDispatch = $aa604bc295903c92$exports.addMockDispatch; + +var $091e80542b169402$require$kDispatches = $5cb1365a47e9f79c$exports.kDispatches; +var $091e80542b169402$require$kDispatchKey = $5cb1365a47e9f79c$exports.kDispatchKey; +var $091e80542b169402$require$kDefaultHeaders = $5cb1365a47e9f79c$exports.kDefaultHeaders; +var $091e80542b169402$require$kDefaultTrailers = $5cb1365a47e9f79c$exports.kDefaultTrailers; +var $091e80542b169402$require$kContentLength = $5cb1365a47e9f79c$exports.kContentLength; +var $091e80542b169402$require$kMockDispatch = $5cb1365a47e9f79c$exports.kMockDispatch; + +var $gTXXK = parcelRequire("gTXXK"); +var $091e80542b169402$require$InvalidArgumentError = $gTXXK.InvalidArgumentError; + +var $bFRvW = parcelRequire("bFRvW"); +var $091e80542b169402$require$buildURL = $bFRvW.buildURL; +/** + * Defines the scope API for an interceptor reply + */ class $091e80542b169402$var$MockScope { + constructor(mockDispatch){ + this[$091e80542b169402$require$kMockDispatch] = mockDispatch; + } + /** + * Delay a reply by a set amount in ms. + */ delay(waitInMs) { + if (typeof waitInMs !== 'number' || !Number.isInteger(waitInMs) || waitInMs <= 0) throw new $091e80542b169402$require$InvalidArgumentError('waitInMs must be a valid integer > 0'); + this[$091e80542b169402$require$kMockDispatch].delay = waitInMs; + return this; + } + /** + * For a defined reply, never mark as consumed. + */ persist() { + this[$091e80542b169402$require$kMockDispatch].persist = true; + return this; + } + /** + * Allow one to define a reply for a set amount of matching requests. + */ times(repeatTimes) { + if (typeof repeatTimes !== 'number' || !Number.isInteger(repeatTimes) || repeatTimes <= 0) throw new $091e80542b169402$require$InvalidArgumentError('repeatTimes must be a valid integer > 0'); + this[$091e80542b169402$require$kMockDispatch].times = repeatTimes; + return this; + } +} +/** + * Defines an interceptor for a Mock + */ class $091e80542b169402$var$MockInterceptor { + constructor(opts, mockDispatches){ + if (typeof opts !== 'object') throw new $091e80542b169402$require$InvalidArgumentError('opts must be an object'); + if (typeof opts.path === 'undefined') throw new $091e80542b169402$require$InvalidArgumentError('opts.path must be defined'); + if (typeof opts.method === 'undefined') opts.method = 'GET'; + // See https://github.com/nodejs/undici/issues/1245 + // As per RFC 3986, clients are not supposed to send URI + // fragments to servers when they retrieve a document, + if (typeof opts.path === 'string') { + if (opts.query) opts.path = $091e80542b169402$require$buildURL(opts.path, opts.query); + else { + // Matches https://github.com/nodejs/undici/blob/main/lib/web/fetch/index.js#L1811 + const parsedURL = new URL(opts.path, 'data://'); + opts.path = parsedURL.pathname + parsedURL.search; } - // 4.3 - return resultList; - } catch (e) { - // 5.1 - this.#relevantRequestResponseList.length = 0; - // 5.2 - this.#relevantRequestResponseList = backupCache; - // 5.3 - throw e; } + if (typeof opts.method === 'string') opts.method = opts.method.toUpperCase(); + this[$091e80542b169402$require$kDispatchKey] = $091e80542b169402$require$buildKey(opts); + this[$091e80542b169402$require$kDispatches] = mockDispatches; + this[$091e80542b169402$require$kDefaultHeaders] = {}; + this[$091e80542b169402$require$kDefaultTrailers] = {}; + this[$091e80542b169402$require$kContentLength] = false; + } + createMockScopeDispatchData({ statusCode: statusCode, data: data, responseOptions: responseOptions }) { + const responseData = $091e80542b169402$require$getResponseData(data); + const contentLength = this[$091e80542b169402$require$kContentLength] ? { + 'content-length': responseData.length + } : {}; + const headers = { + ...this[$091e80542b169402$require$kDefaultHeaders], + ...contentLength, + ...responseOptions.headers + }; + const trailers = { + ...this[$091e80542b169402$require$kDefaultTrailers], + ...responseOptions.trailers + }; + return { + statusCode: statusCode, + data: data, + headers: headers, + trailers: trailers + }; + } + validateReplyParameters(replyParameters) { + if (typeof replyParameters.statusCode === 'undefined') throw new $091e80542b169402$require$InvalidArgumentError('statusCode must be defined'); + if (typeof replyParameters.responseOptions !== 'object' || replyParameters.responseOptions === null) throw new $091e80542b169402$require$InvalidArgumentError('responseOptions must be an object'); } /** - * @see https://w3c.github.io/ServiceWorker/#query-cache - * @param {any} requestQuery - * @param {import('../../types/cache').CacheQueryOptions} options - * @param {requestResponseList} targetStorage - * @returns {requestResponseList} - */ #queryCache(requestQuery, options, targetStorage) { - /** @type {requestResponseList} */ const resultList = []; - const storage = targetStorage ?? this.#relevantRequestResponseList; - for (const requestResponse of storage){ - const [cachedRequest, cachedResponse] = requestResponse; - if (this.#requestMatchesCachedItem(requestQuery, cachedRequest, cachedResponse, options)) resultList.push(requestResponse); + * Mock an undici request with a defined reply. + */ reply(replyOptionsCallbackOrStatusCode) { + // Values of reply aren't available right now as they + // can only be available when the reply callback is invoked. + if (typeof replyOptionsCallbackOrStatusCode === 'function') { + // We'll first wrap the provided callback in another function, + // this function will properly resolve the data from the callback + // when invoked. + const wrappedDefaultsCallback = (opts)=>{ + // Our reply options callback contains the parameter for statusCode, data and options. + const resolvedData = replyOptionsCallbackOrStatusCode(opts); + // Check if it is in the right format + if (typeof resolvedData !== 'object' || resolvedData === null) throw new $091e80542b169402$require$InvalidArgumentError('reply options callback must return an object'); + const replyParameters = { + data: '', + responseOptions: {}, + ...resolvedData + }; + this.validateReplyParameters(replyParameters); + // Since the values can be obtained immediately we return them + // from this higher order function that will be resolved later. + return { + ...this.createMockScopeDispatchData(replyParameters) + }; + }; + // Add usual dispatch data, but this time set the data parameter to function that will eventually provide data. + const newMockDispatch = $091e80542b169402$require$addMockDispatch(this[$091e80542b169402$require$kDispatches], this[$091e80542b169402$require$kDispatchKey], wrappedDefaultsCallback); + return new $091e80542b169402$var$MockScope(newMockDispatch); } - return resultList; + // We can have either one or three parameters, if we get here, + // we should have 1-3 parameters. So we spread the arguments of + // this function to obtain the parameters, since replyData will always + // just be the statusCode. + const replyParameters = { + statusCode: replyOptionsCallbackOrStatusCode, + data: arguments[1] === undefined ? '' : arguments[1], + responseOptions: arguments[2] === undefined ? {} : arguments[2] + }; + this.validateReplyParameters(replyParameters); + // Send in-already provided data like usual + const dispatchData = this.createMockScopeDispatchData(replyParameters); + const newMockDispatch = $091e80542b169402$require$addMockDispatch(this[$091e80542b169402$require$kDispatches], this[$091e80542b169402$require$kDispatchKey], dispatchData); + return new $091e80542b169402$var$MockScope(newMockDispatch); } /** - * @see https://w3c.github.io/ServiceWorker/#request-matches-cached-item-algorithm - * @param {any} requestQuery - * @param {any} request - * @param {any | null} response - * @param {import('../../types/cache').CacheQueryOptions | undefined} options - * @returns {boolean} - */ #requestMatchesCachedItem(requestQuery, request, response = null, options) { - // if (options?.ignoreMethod === false && request.method === 'GET') { - // return false - // } - const queryURL = new URL(requestQuery.url); - const cachedURL = new URL(request.url); - if (options?.ignoreSearch) { - cachedURL.search = ""; - queryURL.search = ""; - } - if (!$db8146697506d79c$require$urlEquals(queryURL, cachedURL, true)) return false; - if (response == null || options?.ignoreVary || !response.headersList.contains("vary")) return true; - const fieldValues = $db8146697506d79c$require$getFieldValues(response.headersList.get("vary")); - for (const fieldValue of fieldValues){ - if (fieldValue === "*") return false; - const requestValue = request.headersList.get(fieldValue); - const queryValue = requestQuery.headersList.get(fieldValue); - // If one has the header and the other doesn't, or one has - // a different value than the other, return false - if (requestValue !== queryValue) return false; - } - return true; + * Mock an undici request with a defined error. + */ replyWithError(error) { + if (typeof error === 'undefined') throw new $091e80542b169402$require$InvalidArgumentError('error must be defined'); + const newMockDispatch = $091e80542b169402$require$addMockDispatch(this[$091e80542b169402$require$kDispatches], this[$091e80542b169402$require$kDispatchKey], { + error: error + }); + return new $091e80542b169402$var$MockScope(newMockDispatch); } -} -Object.defineProperties($db8146697506d79c$var$Cache.prototype, { - [Symbol.toStringTag]: { - value: "Cache", - configurable: true - }, - match: $db8146697506d79c$require$kEnumerableProperty, - matchAll: $db8146697506d79c$require$kEnumerableProperty, - add: $db8146697506d79c$require$kEnumerableProperty, - addAll: $db8146697506d79c$require$kEnumerableProperty, - put: $db8146697506d79c$require$kEnumerableProperty, - delete: $db8146697506d79c$require$kEnumerableProperty, - keys: $db8146697506d79c$require$kEnumerableProperty -}); -const $db8146697506d79c$var$cacheQueryOptionConverters = [ - { - key: "ignoreSearch", - converter: $db8146697506d79c$require$webidl.converters.boolean, - defaultValue: false - }, - { - key: "ignoreMethod", - converter: $db8146697506d79c$require$webidl.converters.boolean, - defaultValue: false - }, - { - key: "ignoreVary", - converter: $db8146697506d79c$require$webidl.converters.boolean, - defaultValue: false + /** + * Set default reply headers on the interceptor for subsequent replies + */ defaultReplyHeaders(headers) { + if (typeof headers === 'undefined') throw new $091e80542b169402$require$InvalidArgumentError('headers must be defined'); + this[$091e80542b169402$require$kDefaultHeaders] = headers; + return this; } -]; -$db8146697506d79c$require$webidl.converters.CacheQueryOptions = $db8146697506d79c$require$webidl.dictionaryConverter($db8146697506d79c$var$cacheQueryOptionConverters); -$db8146697506d79c$require$webidl.converters.MultiCacheQueryOptions = $db8146697506d79c$require$webidl.dictionaryConverter([ - ...$db8146697506d79c$var$cacheQueryOptionConverters, - { - key: "cacheName", - converter: $db8146697506d79c$require$webidl.converters.DOMString + /** + * Set default reply trailers on the interceptor for subsequent replies + */ defaultReplyTrailers(trailers) { + if (typeof trailers === 'undefined') throw new $091e80542b169402$require$InvalidArgumentError('trailers must be defined'); + this[$091e80542b169402$require$kDefaultTrailers] = trailers; + return this; } -]); -$db8146697506d79c$require$webidl.converters.Response = $db8146697506d79c$require$webidl.interfaceConverter($db8146697506d79c$require$Response); -$db8146697506d79c$require$webidl.converters["sequence"] = $db8146697506d79c$require$webidl.sequenceConverter($db8146697506d79c$require$webidl.converters.RequestInfo); -module.exports = { - Cache: $db8146697506d79c$var$Cache -}; + /** + * Set reply content length header for replies on the interceptor + */ replyContentLength() { + this[$091e80542b169402$require$kContentLength] = true; + return this; + } +} +$091e80542b169402$export$fb1b189d8a131a8b = $091e80542b169402$var$MockInterceptor; +$091e80542b169402$export$61f2724da7650995 = $091e80542b169402$var$MockScope; -}); -parcelRegister("bPuCD", function(module, exports) { -"use strict"; +var $f90680b29eb66442$require$MockInterceptor = $091e80542b169402$export$fb1b189d8a131a8b; -var $bNorT = parcelRequire("bNorT"); -var $89cc360bcd010260$require$URLSerializer = $bNorT.URLSerializer; +var $gNVEc = parcelRequire("gNVEc"); -var $4EkpM = parcelRequire("4EkpM"); -var $89cc360bcd010260$require$isValidHeaderName = $4EkpM.isValidHeaderName; +var $gTXXK = parcelRequire("gTXXK"); +var $f90680b29eb66442$require$InvalidArgumentError = $gTXXK.InvalidArgumentError; /** - * @see https://url.spec.whatwg.org/#concept-url-equals - * @param {URL} A - * @param {URL} B - * @param {boolean | undefined} excludeFragment - * @returns {boolean} - */ function $89cc360bcd010260$var$urlEquals(A, B, excludeFragment = false) { - const serializedA = $89cc360bcd010260$require$URLSerializer(A, excludeFragment); - const serializedB = $89cc360bcd010260$require$URLSerializer(B, excludeFragment); - return serializedA === serializedB; -} -/** - * @see https://github.com/chromium/chromium/blob/694d20d134cb553d8d89e5500b9148012b1ba299/content/browser/cache_storage/cache_storage_cache.cc#L260-L262 - * @param {string} header - */ function $89cc360bcd010260$var$fieldValues(header) { - $g40fK$assert(header !== null); - const values = []; - for (let value of header.split(",")){ - value = value.trim(); - if (!value.length) continue; - else if (!$89cc360bcd010260$require$isValidHeaderName(value)) continue; - values.push(value); + * MockClient provides an API that extends the Client to influence the mockDispatches. + */ class $f90680b29eb66442$var$MockClient extends $63Rhm { + constructor(origin, opts){ + super(origin, opts); + if (!opts || !opts.agent || typeof opts.agent.dispatch !== 'function') throw new $f90680b29eb66442$require$InvalidArgumentError('Argument opts.agent must implement Agent'); + this[$f90680b29eb66442$require$kMockAgent] = opts.agent; + this[$f90680b29eb66442$require$kOrigin] = origin; + this[$f90680b29eb66442$require$kDispatches] = []; + this[$f90680b29eb66442$require$kConnected] = 1; + this[$f90680b29eb66442$require$kOriginalDispatch] = this.dispatch; + this[$f90680b29eb66442$require$kOriginalClose] = this.close.bind(this); + this.dispatch = $f90680b29eb66442$require$buildMockDispatch.call(this); + this.close = this[$f90680b29eb66442$require$kClose]; + } + get [$gNVEc.kConnected]() { + return this[$f90680b29eb66442$require$kConnected]; + } + /** + * Sets up the base interceptor for mocking replies from undici. + */ intercept(opts) { + return new $f90680b29eb66442$require$MockInterceptor(opts, this[$f90680b29eb66442$require$kDispatches]); + } + async [$f90680b29eb66442$require$kClose]() { + await $f90680b29eb66442$require$promisify(this[$f90680b29eb66442$require$kOriginalClose])(); + this[$f90680b29eb66442$require$kConnected] = 0; + this[$f90680b29eb66442$require$kMockAgent][$gNVEc.kClients].delete(this[$f90680b29eb66442$require$kOrigin]); } - return values; } -module.exports = { - urlEquals: $89cc360bcd010260$var$urlEquals, - fieldValues: $89cc360bcd010260$var$fieldValues -}; - -}); +$f90680b29eb66442$exports = $f90680b29eb66442$var$MockClient; +var $026b1d5e8d298f3a$exports = {}; +'use strict'; -parcelRegister("7vf90", function(module, exports) { -"use strict"; +var $gNVEc = parcelRequire("gNVEc"); +var $026b1d5e8d298f3a$require$kClients = $gNVEc.kClients; -var $aJBbx = parcelRequire("aJBbx"); -var $57672cfebc024df3$require$parseSetCookie = $aJBbx.parseSetCookie; +var $h3pYu = parcelRequire("h3pYu"); -var $2LYV0 = parcelRequire("2LYV0"); -var $57672cfebc024df3$require$stringify = $2LYV0.stringify; -var $57672cfebc024df3$require$getHeadersList = $2LYV0.getHeadersList; +var $026b1d5e8d298f3a$require$kAgent = $5cb1365a47e9f79c$exports.kAgent; +var $026b1d5e8d298f3a$require$kMockAgentSet = $5cb1365a47e9f79c$exports.kMockAgentSet; +var $026b1d5e8d298f3a$require$kMockAgentGet = $5cb1365a47e9f79c$exports.kMockAgentGet; +var $026b1d5e8d298f3a$require$kDispatches = $5cb1365a47e9f79c$exports.kDispatches; +var $026b1d5e8d298f3a$require$kIsMockActive = $5cb1365a47e9f79c$exports.kIsMockActive; +var $026b1d5e8d298f3a$require$kNetConnect = $5cb1365a47e9f79c$exports.kNetConnect; +var $026b1d5e8d298f3a$require$kGetNetConnect = $5cb1365a47e9f79c$exports.kGetNetConnect; +var $026b1d5e8d298f3a$require$kOptions = $5cb1365a47e9f79c$exports.kOptions; +var $026b1d5e8d298f3a$require$kFactory = $5cb1365a47e9f79c$exports.kFactory; -var $jk0LQ = parcelRequire("jk0LQ"); -var $57672cfebc024df3$require$webidl = $jk0LQ.webidl; +var $7c0261826f664d10$exports = {}; +'use strict'; -var $gXdj5 = parcelRequire("gXdj5"); -var $57672cfebc024df3$require$Headers = $gXdj5.Headers; -/** - * @typedef {Object} Cookie - * @property {string} name - * @property {string} value - * @property {Date|number|undefined} expires - * @property {number|undefined} maxAge - * @property {string|undefined} domain - * @property {string|undefined} path - * @property {boolean|undefined} secure - * @property {boolean|undefined} httpOnly - * @property {'Strict'|'Lax'|'None'} sameSite - * @property {string[]} unparsed - */ /** - * @param {Headers} headers - * @returns {Record} - */ function $57672cfebc024df3$var$getCookies(headers) { - $57672cfebc024df3$require$webidl.argumentLengthCheck(arguments, 1, { - header: "getCookies" - }); - $57672cfebc024df3$require$webidl.brandCheck(headers, $57672cfebc024df3$require$Headers, { - strict: false - }); - const cookie = headers.get("cookie"); - const out = {}; - if (!cookie) return out; - for (const piece of cookie.split(";")){ - const [name, ...value] = piece.split("="); - out[name.trim()] = value.join("="); - } - return out; -} -/** - * @param {Headers} headers - * @param {string} name - * @param {{ path?: string, domain?: string }|undefined} attributes - * @returns {void} - */ function $57672cfebc024df3$var$deleteCookie(headers, name, attributes) { - $57672cfebc024df3$require$webidl.argumentLengthCheck(arguments, 2, { - header: "deleteCookie" - }); - $57672cfebc024df3$require$webidl.brandCheck(headers, $57672cfebc024df3$require$Headers, { - strict: false - }); - name = $57672cfebc024df3$require$webidl.converters.DOMString(name); - attributes = $57672cfebc024df3$require$webidl.converters.DeleteCookieAttributes(attributes); - // Matches behavior of - // https://github.com/denoland/deno_std/blob/63827b16330b82489a04614027c33b7904e08be5/http/cookie.ts#L278 - $57672cfebc024df3$var$setCookie(headers, { - name: name, - value: "", - expires: new Date(0), - ...attributes - }); -} -/** - * @param {Headers} headers - * @returns {Cookie[]} - */ function $57672cfebc024df3$var$getSetCookies(headers) { - $57672cfebc024df3$require$webidl.argumentLengthCheck(arguments, 1, { - header: "getSetCookies" - }); - $57672cfebc024df3$require$webidl.brandCheck(headers, $57672cfebc024df3$require$Headers, { - strict: false - }); - const cookies = $57672cfebc024df3$require$getHeadersList(headers).cookies; - if (!cookies) return []; - // In older versions of undici, cookies is a list of name:value. - return cookies.map((pair)=>$57672cfebc024df3$require$parseSetCookie(Array.isArray(pair) ? pair[1] : pair)); -} -/** - * @param {Headers} headers - * @param {Cookie} cookie - * @returns {void} - */ function $57672cfebc024df3$var$setCookie(headers, cookie) { - $57672cfebc024df3$require$webidl.argumentLengthCheck(arguments, 2, { - header: "setCookie" - }); - $57672cfebc024df3$require$webidl.brandCheck(headers, $57672cfebc024df3$require$Headers, { - strict: false - }); - cookie = $57672cfebc024df3$require$webidl.converters.Cookie(cookie); - const str = $57672cfebc024df3$require$stringify(cookie); - if (str) headers.append("Set-Cookie", $57672cfebc024df3$require$stringify(cookie)); -} -$57672cfebc024df3$require$webidl.converters.DeleteCookieAttributes = $57672cfebc024df3$require$webidl.dictionaryConverter([ - { - converter: $57672cfebc024df3$require$webidl.nullableConverter($57672cfebc024df3$require$webidl.converters.DOMString), - key: "path", - defaultValue: null - }, - { - converter: $57672cfebc024df3$require$webidl.nullableConverter($57672cfebc024df3$require$webidl.converters.DOMString), - key: "domain", - defaultValue: null - } -]); -$57672cfebc024df3$require$webidl.converters.Cookie = $57672cfebc024df3$require$webidl.dictionaryConverter([ - { - converter: $57672cfebc024df3$require$webidl.converters.DOMString, - key: "name" - }, - { - converter: $57672cfebc024df3$require$webidl.converters.DOMString, - key: "value" - }, - { - converter: $57672cfebc024df3$require$webidl.nullableConverter((value)=>{ - if (typeof value === "number") return $57672cfebc024df3$require$webidl.converters["unsigned long long"](value); - return new Date(value); - }), - key: "expires", - defaultValue: null - }, - { - converter: $57672cfebc024df3$require$webidl.nullableConverter($57672cfebc024df3$require$webidl.converters["long long"]), - key: "maxAge", - defaultValue: null - }, - { - converter: $57672cfebc024df3$require$webidl.nullableConverter($57672cfebc024df3$require$webidl.converters.DOMString), - key: "domain", - defaultValue: null - }, - { - converter: $57672cfebc024df3$require$webidl.nullableConverter($57672cfebc024df3$require$webidl.converters.DOMString), - key: "path", - defaultValue: null - }, - { - converter: $57672cfebc024df3$require$webidl.nullableConverter($57672cfebc024df3$require$webidl.converters.boolean), - key: "secure", - defaultValue: null - }, - { - converter: $57672cfebc024df3$require$webidl.nullableConverter($57672cfebc024df3$require$webidl.converters.boolean), - key: "httpOnly", - defaultValue: null - }, - { - converter: $57672cfebc024df3$require$webidl.converters.USVString, - key: "sameSite", - allowedValues: [ - "Strict", - "Lax", - "None" - ] - }, - { - converter: $57672cfebc024df3$require$webidl.sequenceConverter($57672cfebc024df3$require$webidl.converters.DOMString), - key: "unparsed", - defaultValue: [] - } -]); -module.exports = { - getCookies: $57672cfebc024df3$var$getCookies, - deleteCookie: $57672cfebc024df3$var$deleteCookie, - getSetCookies: $57672cfebc024df3$var$getSetCookies, - setCookie: $57672cfebc024df3$var$setCookie -}; +var $7c0261826f664d10$require$promisify = $in2sP$nodeutil.promisify; -}); -parcelRegister("aJBbx", function(module, exports) { -"use strict"; +var $fhRiv = parcelRequire("fhRiv"); -var $gvvOW = parcelRequire("gvvOW"); -var $7d0af38c6191834b$require$maxNameValuePairSize = $gvvOW.maxNameValuePairSize; -var $7d0af38c6191834b$require$maxAttributeValueSize = $gvvOW.maxAttributeValueSize; +var $7c0261826f664d10$require$buildMockDispatch = $aa604bc295903c92$exports.buildMockDispatch; -var $2LYV0 = parcelRequire("2LYV0"); -var $7d0af38c6191834b$require$isCTLExcludingHtab = $2LYV0.isCTLExcludingHtab; +var $7c0261826f664d10$require$kDispatches = $5cb1365a47e9f79c$exports.kDispatches; +var $7c0261826f664d10$require$kMockAgent = $5cb1365a47e9f79c$exports.kMockAgent; +var $7c0261826f664d10$require$kClose = $5cb1365a47e9f79c$exports.kClose; +var $7c0261826f664d10$require$kOriginalClose = $5cb1365a47e9f79c$exports.kOriginalClose; +var $7c0261826f664d10$require$kOrigin = $5cb1365a47e9f79c$exports.kOrigin; +var $7c0261826f664d10$require$kOriginalDispatch = $5cb1365a47e9f79c$exports.kOriginalDispatch; +var $7c0261826f664d10$require$kConnected = $5cb1365a47e9f79c$exports.kConnected; -var $bNorT = parcelRequire("bNorT"); -var $7d0af38c6191834b$require$collectASequenceOfCodePointsFast = $bNorT.collectASequenceOfCodePointsFast; +var $7c0261826f664d10$require$MockInterceptor = $091e80542b169402$export$fb1b189d8a131a8b; +var $gNVEc = parcelRequire("gNVEc"); + +var $gTXXK = parcelRequire("gTXXK"); +var $7c0261826f664d10$require$InvalidArgumentError = $gTXXK.InvalidArgumentError; /** - * @description Parses the field-value attributes of a set-cookie header string. - * @see https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4 - * @param {string} header - * @returns if the header is invalid, null will be returned - */ function $7d0af38c6191834b$var$parseSetCookie(header) { - // 1. If the set-cookie-string contains a %x00-08 / %x0A-1F / %x7F - // character (CTL characters excluding HTAB): Abort these steps and - // ignore the set-cookie-string entirely. - if ($7d0af38c6191834b$require$isCTLExcludingHtab(header)) return null; - let nameValuePair = ""; - let unparsedAttributes = ""; - let name = ""; - let value = ""; - // 2. If the set-cookie-string contains a %x3B (";") character: - if (header.includes(";")) { - // 1. The name-value-pair string consists of the characters up to, - // but not including, the first %x3B (";"), and the unparsed- - // attributes consist of the remainder of the set-cookie-string - // (including the %x3B (";") in question). - const position = { - position: 0 - }; - nameValuePair = $7d0af38c6191834b$require$collectASequenceOfCodePointsFast(";", header, position); - unparsedAttributes = header.slice(position.position); - } else // Otherwise: - // 1. The name-value-pair string consists of all the characters - // contained in the set-cookie-string, and the unparsed- - // attributes is the empty string. - nameValuePair = header; - // 3. If the name-value-pair string lacks a %x3D ("=") character, then - // the name string is empty, and the value string is the value of - // name-value-pair. - if (!nameValuePair.includes("=")) value = nameValuePair; - else { - // Otherwise, the name string consists of the characters up to, but - // not including, the first %x3D ("=") character, and the (possibly - // empty) value string consists of the characters after the first - // %x3D ("=") character. - const position = { - position: 0 - }; - name = $7d0af38c6191834b$require$collectASequenceOfCodePointsFast("=", nameValuePair, position); - value = nameValuePair.slice(position.position + 1); + * MockPool provides an API that extends the Pool to influence the mockDispatches. + */ class $7c0261826f664d10$var$MockPool extends $fhRiv { + constructor(origin, opts){ + super(origin, opts); + if (!opts || !opts.agent || typeof opts.agent.dispatch !== 'function') throw new $7c0261826f664d10$require$InvalidArgumentError('Argument opts.agent must implement Agent'); + this[$7c0261826f664d10$require$kMockAgent] = opts.agent; + this[$7c0261826f664d10$require$kOrigin] = origin; + this[$7c0261826f664d10$require$kDispatches] = []; + this[$7c0261826f664d10$require$kConnected] = 1; + this[$7c0261826f664d10$require$kOriginalDispatch] = this.dispatch; + this[$7c0261826f664d10$require$kOriginalClose] = this.close.bind(this); + this.dispatch = $7c0261826f664d10$require$buildMockDispatch.call(this); + this.close = this[$7c0261826f664d10$require$kClose]; + } + get [$gNVEc.kConnected]() { + return this[$7c0261826f664d10$require$kConnected]; + } + /** + * Sets up the base interceptor for mocking replies from undici. + */ intercept(opts) { + return new $7c0261826f664d10$require$MockInterceptor(opts, this[$7c0261826f664d10$require$kDispatches]); + } + async [$7c0261826f664d10$require$kClose]() { + await $7c0261826f664d10$require$promisify(this[$7c0261826f664d10$require$kOriginalClose])(); + this[$7c0261826f664d10$require$kConnected] = 0; + this[$7c0261826f664d10$require$kMockAgent][$gNVEc.kClients].delete(this[$7c0261826f664d10$require$kOrigin]); } - // 4. Remove any leading or trailing WSP characters from the name - // string and the value string. - name = name.trim(); - value = value.trim(); - // 5. If the sum of the lengths of the name string and the value string - // is more than 4096 octets, abort these steps and ignore the set- - // cookie-string entirely. - if (name.length + value.length > $7d0af38c6191834b$require$maxNameValuePairSize) return null; - // 6. The cookie-name is the name string, and the cookie-value is the - // value string. - return { - name: name, - value: value, - ...$7d0af38c6191834b$var$parseUnparsedAttributes(unparsedAttributes) - }; } +$7c0261826f664d10$exports = $7c0261826f664d10$var$MockPool; + + + +var $026b1d5e8d298f3a$require$matchValue = $aa604bc295903c92$exports.matchValue; +var $026b1d5e8d298f3a$require$buildMockOptions = $aa604bc295903c92$exports.buildMockOptions; + +var $gTXXK = parcelRequire("gTXXK"); +var $026b1d5e8d298f3a$require$InvalidArgumentError = $gTXXK.InvalidArgumentError; +var $026b1d5e8d298f3a$require$UndiciError = $gTXXK.UndiciError; + +var $ciMz5 = parcelRequire("ciMz5"); +var $30db8527e98669a9$exports = {}; +'use strict'; +const $30db8527e98669a9$var$singulars = { + pronoun: 'it', + is: 'is', + was: 'was', + this: 'this' +}; +const $30db8527e98669a9$var$plurals = { + pronoun: 'they', + is: 'are', + was: 'were', + this: 'these' +}; +$30db8527e98669a9$exports = class Pluralizer { + constructor(singular, plural){ + this.singular = singular; + this.plural = plural; + } + pluralize(count) { + const one = count === 1; + const keys = one ? $30db8527e98669a9$var$singulars : $30db8527e98669a9$var$plurals; + const noun = one ? this.singular : this.plural; + return { + ...keys, + count: count, + noun: noun + }; + } +}; + + +var $941c3478f2a14851$exports = {}; +'use strict'; + +var $941c3478f2a14851$require$Transform = $in2sP$nodestream.Transform; + +var $941c3478f2a14851$require$Console = $in2sP$nodeconsole.Console; +const $941c3478f2a14851$var$PERSISTENT = process.versions.icu ? "\u2705" : 'Y '; +const $941c3478f2a14851$var$NOT_PERSISTENT = process.versions.icu ? "\u274C" : 'N '; /** - * Parses the remaining attributes of a set-cookie header - * @see https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4 - * @param {string} unparsedAttributes - * @param {[Object.]={}} cookieAttributeList - */ function $7d0af38c6191834b$var$parseUnparsedAttributes(unparsedAttributes, cookieAttributeList = {}) { - // 1. If the unparsed-attributes string is empty, skip the rest of - // these steps. - if (unparsedAttributes.length === 0) return cookieAttributeList; - // 2. Discard the first character of the unparsed-attributes (which - // will be a %x3B (";") character). - $g40fK$assert(unparsedAttributes[0] === ";"); - unparsedAttributes = unparsedAttributes.slice(1); - let cookieAv = ""; - // 3. If the remaining unparsed-attributes contains a %x3B (";") - // character: - if (unparsedAttributes.includes(";")) { - // 1. Consume the characters of the unparsed-attributes up to, but - // not including, the first %x3B (";") character. - cookieAv = $7d0af38c6191834b$require$collectASequenceOfCodePointsFast(";", unparsedAttributes, { - position: 0 + * Gets the output of `console.table(…)` as a string. + */ $941c3478f2a14851$exports = class PendingInterceptorsFormatter { + constructor({ disableColors: disableColors } = {}){ + this.transform = new $941c3478f2a14851$require$Transform({ + transform (chunk, _enc, cb) { + cb(null, chunk); + } + }); + this.logger = new $941c3478f2a14851$require$Console({ + stdout: this.transform, + inspectOptions: { + colors: !disableColors && !process.env.CI + } }); - unparsedAttributes = unparsedAttributes.slice(cookieAv.length); - } else { - // Otherwise: - // 1. Consume the remainder of the unparsed-attributes. - cookieAv = unparsedAttributes; - unparsedAttributes = ""; } - // Let the cookie-av string be the characters consumed in this step. - let attributeName = ""; - let attributeValue = ""; - // 4. If the cookie-av string contains a %x3D ("=") character: - if (cookieAv.includes("=")) { - // 1. The (possibly empty) attribute-name string consists of the - // characters up to, but not including, the first %x3D ("=") - // character, and the (possibly empty) attribute-value string - // consists of the characters after the first %x3D ("=") - // character. - const position = { - position: 0 - }; - attributeName = $7d0af38c6191834b$require$collectASequenceOfCodePointsFast("=", cookieAv, position); - attributeValue = cookieAv.slice(position.position + 1); - } else // Otherwise: - // 1. The attribute-name string consists of the entire cookie-av - // string, and the attribute-value string is empty. - attributeName = cookieAv; - // 5. Remove any leading or trailing WSP characters from the attribute- - // name string and the attribute-value string. - attributeName = attributeName.trim(); - attributeValue = attributeValue.trim(); - // 6. If the attribute-value is longer than 1024 octets, ignore the - // cookie-av string and return to Step 1 of this algorithm. - if (attributeValue.length > $7d0af38c6191834b$require$maxAttributeValueSize) return $7d0af38c6191834b$var$parseUnparsedAttributes(unparsedAttributes, cookieAttributeList); - // 7. Process the attribute-name and attribute-value according to the - // requirements in the following subsections. (Notice that - // attributes with unrecognized attribute-names are ignored.) - const attributeNameLowercase = attributeName.toLowerCase(); - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.1 - // If the attribute-name case-insensitively matches the string - // "Expires", the user agent MUST process the cookie-av as follows. - if (attributeNameLowercase === "expires") { - // 1. Let the expiry-time be the result of parsing the attribute-value - // as cookie-date (see Section 5.1.1). - const expiryTime = new Date(attributeValue); - // 2. If the attribute-value failed to parse as a cookie date, ignore - // the cookie-av. - cookieAttributeList.expires = expiryTime; - } else if (attributeNameLowercase === "max-age") { - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.2 - // If the attribute-name case-insensitively matches the string "Max- - // Age", the user agent MUST process the cookie-av as follows. - // 1. If the first character of the attribute-value is not a DIGIT or a - // "-" character, ignore the cookie-av. - const charCode = attributeValue.charCodeAt(0); - if ((charCode < 48 || charCode > 57) && attributeValue[0] !== "-") return $7d0af38c6191834b$var$parseUnparsedAttributes(unparsedAttributes, cookieAttributeList); - // 2. If the remainder of attribute-value contains a non-DIGIT - // character, ignore the cookie-av. - if (!/^\d+$/.test(attributeValue)) return $7d0af38c6191834b$var$parseUnparsedAttributes(unparsedAttributes, cookieAttributeList); - // 3. Let delta-seconds be the attribute-value converted to an integer. - const deltaSeconds = Number(attributeValue); - // 4. Let cookie-age-limit be the maximum age of the cookie (which - // SHOULD be 400 days or less, see Section 4.1.2.2). - // 5. Set delta-seconds to the smaller of its present value and cookie- - // age-limit. - // deltaSeconds = Math.min(deltaSeconds * 1000, maxExpiresMs) - // 6. If delta-seconds is less than or equal to zero (0), let expiry- - // time be the earliest representable date and time. Otherwise, let - // the expiry-time be the current date and time plus delta-seconds - // seconds. - // const expiryTime = deltaSeconds <= 0 ? Date.now() : Date.now() + deltaSeconds - // 7. Append an attribute to the cookie-attribute-list with an - // attribute-name of Max-Age and an attribute-value of expiry-time. - cookieAttributeList.maxAge = deltaSeconds; - } else if (attributeNameLowercase === "domain") { - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.3 - // If the attribute-name case-insensitively matches the string "Domain", - // the user agent MUST process the cookie-av as follows. - // 1. Let cookie-domain be the attribute-value. - let cookieDomain = attributeValue; - // 2. If cookie-domain starts with %x2E ("."), let cookie-domain be - // cookie-domain without its leading %x2E ("."). - if (cookieDomain[0] === ".") cookieDomain = cookieDomain.slice(1); - // 3. Convert the cookie-domain to lower case. - cookieDomain = cookieDomain.toLowerCase(); - // 4. Append an attribute to the cookie-attribute-list with an - // attribute-name of Domain and an attribute-value of cookie-domain. - cookieAttributeList.domain = cookieDomain; - } else if (attributeNameLowercase === "path") { - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.4 - // If the attribute-name case-insensitively matches the string "Path", - // the user agent MUST process the cookie-av as follows. - // 1. If the attribute-value is empty or if the first character of the - // attribute-value is not %x2F ("/"): - let cookiePath = ""; - if (attributeValue.length === 0 || attributeValue[0] !== "/") // 1. Let cookie-path be the default-path. - cookiePath = "/"; - else // Otherwise: - // 1. Let cookie-path be the attribute-value. - cookiePath = attributeValue; - // 2. Append an attribute to the cookie-attribute-list with an - // attribute-name of Path and an attribute-value of cookie-path. - cookieAttributeList.path = cookiePath; - } else if (attributeNameLowercase === "secure") // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.5 - // If the attribute-name case-insensitively matches the string "Secure", - // the user agent MUST append an attribute to the cookie-attribute-list - // with an attribute-name of Secure and an empty attribute-value. - cookieAttributeList.secure = true; - else if (attributeNameLowercase === "httponly") // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.6 - // If the attribute-name case-insensitively matches the string - // "HttpOnly", the user agent MUST append an attribute to the cookie- - // attribute-list with an attribute-name of HttpOnly and an empty - // attribute-value. - cookieAttributeList.httpOnly = true; - else if (attributeNameLowercase === "samesite") { - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.7 - // If the attribute-name case-insensitively matches the string - // "SameSite", the user agent MUST process the cookie-av as follows: - // 1. Let enforcement be "Default". - let enforcement = "Default"; - const attributeValueLowercase = attributeValue.toLowerCase(); - // 2. If cookie-av's attribute-value is a case-insensitive match for - // "None", set enforcement to "None". - if (attributeValueLowercase.includes("none")) enforcement = "None"; - // 3. If cookie-av's attribute-value is a case-insensitive match for - // "Strict", set enforcement to "Strict". - if (attributeValueLowercase.includes("strict")) enforcement = "Strict"; - // 4. If cookie-av's attribute-value is a case-insensitive match for - // "Lax", set enforcement to "Lax". - if (attributeValueLowercase.includes("lax")) enforcement = "Lax"; - // 5. Append an attribute to the cookie-attribute-list with an - // attribute-name of "SameSite" and an attribute-value of - // enforcement. - cookieAttributeList.sameSite = enforcement; - } else { - cookieAttributeList.unparsed ??= []; - cookieAttributeList.unparsed.push(`${attributeName}=${attributeValue}`); + format(pendingInterceptors) { + const withPrettyHeaders = pendingInterceptors.map(({ method: method, path: path, data: { statusCode: statusCode }, persist: persist, times: times, timesInvoked: timesInvoked, origin: origin })=>({ + Method: method, + Origin: origin, + Path: path, + 'Status code': statusCode, + Persistent: persist ? $941c3478f2a14851$var$PERSISTENT : $941c3478f2a14851$var$NOT_PERSISTENT, + Invocations: timesInvoked, + Remaining: persist ? Infinity : times - timesInvoked + })); + this.logger.table(withPrettyHeaders); + return this.transform.read().toString(); + } +}; + + +class $026b1d5e8d298f3a$var$MockAgent extends $ciMz5 { + constructor(opts){ + super(opts); + this[$026b1d5e8d298f3a$require$kNetConnect] = true; + this[$026b1d5e8d298f3a$require$kIsMockActive] = true; + // Instantiate Agent and encapsulate + if (opts?.agent && typeof opts.agent.dispatch !== 'function') throw new $026b1d5e8d298f3a$require$InvalidArgumentError('Argument opts.agent must implement Agent'); + const agent = opts?.agent ? opts.agent : new $h3pYu(opts); + this[$026b1d5e8d298f3a$require$kAgent] = agent; + this[$026b1d5e8d298f3a$require$kClients] = agent[$026b1d5e8d298f3a$require$kClients]; + this[$026b1d5e8d298f3a$require$kOptions] = $026b1d5e8d298f3a$require$buildMockOptions(opts); + } + get(origin) { + let dispatcher = this[$026b1d5e8d298f3a$require$kMockAgentGet](origin); + if (!dispatcher) { + dispatcher = this[$026b1d5e8d298f3a$require$kFactory](origin); + this[$026b1d5e8d298f3a$require$kMockAgentSet](origin, dispatcher); + } + return dispatcher; + } + dispatch(opts, handler) { + // Call MockAgent.get to perform additional setup before dispatching as normal + this.get(opts.origin); + return this[$026b1d5e8d298f3a$require$kAgent].dispatch(opts, handler); + } + async close() { + await this[$026b1d5e8d298f3a$require$kAgent].close(); + this[$026b1d5e8d298f3a$require$kClients].clear(); + } + deactivate() { + this[$026b1d5e8d298f3a$require$kIsMockActive] = false; + } + activate() { + this[$026b1d5e8d298f3a$require$kIsMockActive] = true; + } + enableNetConnect(matcher) { + if (typeof matcher === 'string' || typeof matcher === 'function' || matcher instanceof RegExp) { + if (Array.isArray(this[$026b1d5e8d298f3a$require$kNetConnect])) this[$026b1d5e8d298f3a$require$kNetConnect].push(matcher); + else this[$026b1d5e8d298f3a$require$kNetConnect] = [ + matcher + ]; + } else if (typeof matcher === 'undefined') this[$026b1d5e8d298f3a$require$kNetConnect] = true; + else throw new $026b1d5e8d298f3a$require$InvalidArgumentError('Unsupported matcher. Must be one of String|Function|RegExp.'); + } + disableNetConnect() { + this[$026b1d5e8d298f3a$require$kNetConnect] = false; + } + // This is required to bypass issues caused by using global symbols - see: + // https://github.com/nodejs/undici/issues/1447 + get isMockActive() { + return this[$026b1d5e8d298f3a$require$kIsMockActive]; + } + [$026b1d5e8d298f3a$require$kMockAgentSet](origin, dispatcher) { + this[$026b1d5e8d298f3a$require$kClients].set(origin, dispatcher); + } + [$026b1d5e8d298f3a$require$kFactory](origin) { + const mockOptions = Object.assign({ + agent: this + }, this[$026b1d5e8d298f3a$require$kOptions]); + return this[$026b1d5e8d298f3a$require$kOptions] && this[$026b1d5e8d298f3a$require$kOptions].connections === 1 ? new $f90680b29eb66442$exports(origin, mockOptions) : new $7c0261826f664d10$exports(origin, mockOptions); + } + [$026b1d5e8d298f3a$require$kMockAgentGet](origin) { + // First check if we can immediately find it + const client = this[$026b1d5e8d298f3a$require$kClients].get(origin); + if (client) return client; + // If the origin is not a string create a dummy parent pool and return to user + if (typeof origin !== 'string') { + const dispatcher = this[$026b1d5e8d298f3a$require$kFactory]('http://localhost:9999'); + this[$026b1d5e8d298f3a$require$kMockAgentSet](origin, dispatcher); + return dispatcher; + } + // If we match, create a pool and assign the same dispatches + for (const [keyMatcher, nonExplicitDispatcher] of Array.from(this[$026b1d5e8d298f3a$require$kClients]))if (nonExplicitDispatcher && typeof keyMatcher !== 'string' && $026b1d5e8d298f3a$require$matchValue(keyMatcher, origin)) { + const dispatcher = this[$026b1d5e8d298f3a$require$kFactory](origin); + this[$026b1d5e8d298f3a$require$kMockAgentSet](origin, dispatcher); + dispatcher[$026b1d5e8d298f3a$require$kDispatches] = nonExplicitDispatcher[$026b1d5e8d298f3a$require$kDispatches]; + return dispatcher; + } + } + [$026b1d5e8d298f3a$require$kGetNetConnect]() { + return this[$026b1d5e8d298f3a$require$kNetConnect]; + } + pendingInterceptors() { + const mockAgentClients = this[$026b1d5e8d298f3a$require$kClients]; + return Array.from(mockAgentClients.entries()).flatMap(([origin, scope])=>scope[$026b1d5e8d298f3a$require$kDispatches].map((dispatch)=>({ + ...dispatch, + origin: origin + }))).filter(({ pending: pending })=>pending); + } + assertNoPendingInterceptors({ pendingInterceptorsFormatter: pendingInterceptorsFormatter = new $941c3478f2a14851$exports() } = {}) { + const pending = this.pendingInterceptors(); + if (pending.length === 0) return; + const pluralizer = new $30db8527e98669a9$exports('interceptor', 'interceptors').pluralize(pending.length); + throw new $026b1d5e8d298f3a$require$UndiciError(` +${pluralizer.count} ${pluralizer.noun} ${pluralizer.is} pending: + +${pendingInterceptorsFormatter.format(pending)} +`.trim()); } - // 8. Return to Step 1 of this algorithm. - return $7d0af38c6191834b$var$parseUnparsedAttributes(unparsedAttributes, cookieAttributeList); } -module.exports = { - parseSetCookie: $7d0af38c6191834b$var$parseSetCookie, - parseUnparsedAttributes: $7d0af38c6191834b$var$parseUnparsedAttributes -}; +$026b1d5e8d298f3a$exports = $026b1d5e8d298f3a$var$MockAgent; -}); -parcelRegister("gvvOW", function(module, exports) { -"use strict"; -// https://wicg.github.io/cookie-store/#cookie-maximum-attribute-value-size -const $c048398393648327$var$maxAttributeValueSize = 1024; -// https://wicg.github.io/cookie-store/#cookie-maximum-name-value-pair-size -const $c048398393648327$var$maxNameValuePairSize = 4096; -module.exports = { - maxAttributeValueSize: $c048398393648327$var$maxAttributeValueSize, - maxNameValuePairSize: $c048398393648327$var$maxNameValuePairSize -}; -}); -parcelRegister("2LYV0", function(module, exports) { -"use strict"; -var $hHZvh = parcelRequire("hHZvh"); -var $204f39b4da556a98$require$kHeadersList = $hHZvh.kHeadersList; -function $204f39b4da556a98$var$isCTLExcludingHtab(value) { - if (value.length === 0) return false; - for (const char of value){ - const code = char.charCodeAt(0); - if (code >= 0x00 || code <= 0x08 || code >= 0x0A || code <= 0x1F || code === 0x7F) return false; - } +var $igYNQ = parcelRequire("igYNQ"); + +var $A4fmv = parcelRequire("A4fmv"); +var $c06c3fa92e0659a8$require$getGlobalDispatcher = $A4fmv.getGlobalDispatcher; +var $c06c3fa92e0659a8$require$setGlobalDispatcher = $A4fmv.setGlobalDispatcher; + +var $4suPr = parcelRequire("4suPr"); + +var $7URCa = parcelRequire("7URCa"); + +var $9H5gi = parcelRequire("9H5gi"); +Object.assign($ciMz5.prototype, $7047ddf88f54f8a7$exports); +$c06c3fa92e0659a8$export$ab054a1ef92eeb01 = $ciMz5; +$c06c3fa92e0659a8$export$1f2bb630327ac4b6 = $63Rhm; +$c06c3fa92e0659a8$export$14963ee5c8637e11 = $fhRiv; +$c06c3fa92e0659a8$export$3ea9790e91014eeb = $d57334a83053cdad$exports; +$c06c3fa92e0659a8$export$f05c48a4001d5356 = $h3pYu; +$c06c3fa92e0659a8$export$6f9e642c23f9615d = $58f872e44871c57c$exports; +$c06c3fa92e0659a8$export$954fdbb7ca3f9ed9 = $fa0bbcba1187e152$exports; +$c06c3fa92e0659a8$export$b8b97c589dfcfcdc = $9b045014931c6cf2$exports; +$c06c3fa92e0659a8$export$cfbc337f7857f27a = $igYNQ; +$c06c3fa92e0659a8$export$c3def51f5c0b7771 = $4suPr; +$c06c3fa92e0659a8$export$9af91951fcedc08c = $7URCa; +$c06c3fa92e0659a8$export$e56ca57b32a6e9c7 = $9H5gi; + + + + +$c06c3fa92e0659a8$export$e33eea3854577e76 = { + redirect: (parcelRequire("heVBK")), + retry: (parcelRequire("2Xtjy")), + dump: (parcelRequire("ENkFU")), + dns: (parcelRequire("lXY2D")) +}; +$c06c3fa92e0659a8$export$ebbe0f536b18196e = $ifuPO; +$c06c3fa92e0659a8$export$30f3b02011db23c0 = $gTXXK; +$c06c3fa92e0659a8$export$7debb50ef11d5e0b = { + parseHeaders: $bFRvW.parseHeaders, + headerNameToString: $bFRvW.headerNameToString +}; +function $c06c3fa92e0659a8$var$makeDispatcher(fn) { + return (url, opts, handler)=>{ + if (typeof opts === 'function') { + handler = opts; + opts = null; + } + if (!url || typeof url !== 'string' && typeof url !== 'object' && !(url instanceof URL)) throw new $c06c3fa92e0659a8$var$InvalidArgumentError('invalid url'); + if (opts != null && typeof opts !== 'object') throw new $c06c3fa92e0659a8$var$InvalidArgumentError('invalid opts'); + if (opts && opts.path != null) { + if (typeof opts.path !== 'string') throw new $c06c3fa92e0659a8$var$InvalidArgumentError('invalid opts.path'); + let path = opts.path; + if (!opts.path.startsWith('/')) path = `/${path}`; + url = new URL($bFRvW.parseOrigin(url).origin + path); + } else { + if (!opts) opts = typeof url === 'object' ? url : {}; + url = $bFRvW.parseURL(url); + } + const { agent: agent, dispatcher: dispatcher = $c06c3fa92e0659a8$require$getGlobalDispatcher() } = opts; + if (agent) throw new $c06c3fa92e0659a8$var$InvalidArgumentError('unsupported opts.agent. Did you mean opts.client?'); + return fn.call(dispatcher, { + ...opts, + origin: url.origin, + path: url.search ? `${url.pathname}${url.search}` : url.pathname, + method: opts.method || (opts.body ? 'PUT' : 'GET') + }, handler); + }; } -/** - CHAR = - token = 1* - separators = "(" | ")" | "<" | ">" | "@" - | "," | ";" | ":" | "\" | <"> - | "/" | "[" | "]" | "?" | "=" - | "{" | "}" | SP | HT - * @param {string} name - */ function $204f39b4da556a98$var$validateCookieName(name) { - for (const char of name){ - const code = char.charCodeAt(0); - if (code <= 0x20 || code > 0x7F || char === "(" || char === ")" || char === ">" || char === "<" || char === "@" || char === "," || char === ";" || char === ":" || char === "\\" || char === '"' || char === "/" || char === "[" || char === "]" || char === "?" || char === "=" || char === "{" || char === "}") throw new Error("Invalid cookie name"); +$c06c3fa92e0659a8$export$ea76ac48857e9378 = $c06c3fa92e0659a8$require$setGlobalDispatcher; +$c06c3fa92e0659a8$export$6f0c702cbe7d6ed8 = $c06c3fa92e0659a8$require$getGlobalDispatcher; + +var $awCP7 = parcelRequire("awCP7"); +var $c06c3fa92e0659a8$require$fetchImpl = $awCP7.fetch; +$c06c3fa92e0659a8$export$e7aa7bc5c1b3cfb3 = async function fetch(init, options) { + try { + return await $c06c3fa92e0659a8$require$fetchImpl(init, options); + } catch (err) { + if (err && typeof err === 'object') Error.captureStackTrace(err); + throw err; } -} +}; + +$c06c3fa92e0659a8$export$79b704688b15c0f4 = (parcelRequire("3dLRE")).Headers; + +$c06c3fa92e0659a8$export$9f633d56d7ec90d3 = (parcelRequire("85Oaa")).Response; + +$c06c3fa92e0659a8$export$7fa6c5b6f8193917 = (parcelRequire("9rjJZ")).Request; + +$c06c3fa92e0659a8$export$3963aa24c930693c = (parcelRequire("kFkJR")).FormData; + +$c06c3fa92e0659a8$export$b6afa8811b7e644e = globalThis.File ?? $in2sP$nodebuffer.File; + +$c06c3fa92e0659a8$export$3c8f13373e08d457 = (parcelRequire("goMEM")).FileReader; + +var $8Dg7Y = parcelRequire("8Dg7Y"); +var $c06c3fa92e0659a8$require$setGlobalOrigin = $8Dg7Y.setGlobalOrigin; +var $c06c3fa92e0659a8$require$getGlobalOrigin = $8Dg7Y.getGlobalOrigin; +$c06c3fa92e0659a8$export$79f8e34925aa870f = $c06c3fa92e0659a8$require$setGlobalOrigin; +$c06c3fa92e0659a8$export$4b73629724933f6e = $c06c3fa92e0659a8$require$getGlobalOrigin; +var $c27cd225d456f564$exports = {}; +'use strict'; +var $1368b1cf184fb36f$exports = {}; +'use strict'; + +$1368b1cf184fb36f$exports = { + kConstruct: (parcelRequire("gNVEc")).kConstruct +}; + + +var $c27cd225d456f564$require$kConstruct = $1368b1cf184fb36f$exports.kConstruct; +var $2ac5d5cfe121f808$exports = {}; +'use strict'; + +var $2ac5d5cfe121f808$require$kConstruct = $1368b1cf184fb36f$exports.kConstruct; +var $5e1c89445518106c$exports = {}; +'use strict'; + + +var $30IsM = parcelRequire("30IsM"); +var $5e1c89445518106c$require$URLSerializer = $30IsM.URLSerializer; + +var $7z0I9 = parcelRequire("7z0I9"); +var $5e1c89445518106c$require$isValidHeaderName = $7z0I9.isValidHeaderName; /** - cookie-value = *cookie-octet / ( DQUOTE *cookie-octet DQUOTE ) - cookie-octet = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E - ; US-ASCII characters excluding CTLs, - ; whitespace DQUOTE, comma, semicolon, - ; and backslash - * @param {string} value - */ function $204f39b4da556a98$var$validateCookieValue(value) { - for (const char of value){ - const code = char.charCodeAt(0); - if (code < 0x21 || // exclude CTLs (0-31) - code === 0x22 || code === 0x2C || code === 0x3B || code === 0x5C || code > 0x7E // non-ascii - ) throw new Error("Invalid header value"); - } + * @see https://url.spec.whatwg.org/#concept-url-equals + * @param {URL} A + * @param {URL} B + * @param {boolean | undefined} excludeFragment + * @returns {boolean} + */ function $5e1c89445518106c$var$urlEquals(A, B, excludeFragment = false) { + const serializedA = $5e1c89445518106c$require$URLSerializer(A, excludeFragment); + const serializedB = $5e1c89445518106c$require$URLSerializer(B, excludeFragment); + return serializedA === serializedB; } /** - * path-value = - * @param {string} path - */ function $204f39b4da556a98$var$validateCookiePath(path) { - for (const char of path){ - const code = char.charCodeAt(0); - if (code < 0x21 || char === ";") throw new Error("Invalid cookie path"); + * @see https://github.com/chromium/chromium/blob/694d20d134cb553d8d89e5500b9148012b1ba299/content/browser/cache_storage/cache_storage_cache.cc#L260-L262 + * @param {string} header + */ function $5e1c89445518106c$var$getFieldValues(header) { + $in2sP$nodeassert(header !== null); + const values = []; + for (let value of header.split(',')){ + value = value.trim(); + if ($5e1c89445518106c$require$isValidHeaderName(value)) values.push(value); } + return values; } -/** - * I have no idea why these values aren't allowed to be honest, - * but Deno tests these. - Khafra - * @param {string} domain - */ function $204f39b4da556a98$var$validateCookieDomain(domain) { - if (domain.startsWith("-") || domain.endsWith(".") || domain.endsWith("-")) throw new Error("Invalid cookie domain"); -} -/** - * @see https://www.rfc-editor.org/rfc/rfc7231#section-7.1.1.1 - * @param {number|Date} date - IMF-fixdate = day-name "," SP date1 SP time-of-day SP GMT - ; fixed length/zone/capitalization subset of the format - ; see Section 3.3 of [RFC5322] +$5e1c89445518106c$exports = { + urlEquals: $5e1c89445518106c$var$urlEquals, + getFieldValues: $5e1c89445518106c$var$getFieldValues +}; - day-name = %x4D.6F.6E ; "Mon", case-sensitive - / %x54.75.65 ; "Tue", case-sensitive - / %x57.65.64 ; "Wed", case-sensitive - / %x54.68.75 ; "Thu", case-sensitive - / %x46.72.69 ; "Fri", case-sensitive - / %x53.61.74 ; "Sat", case-sensitive - / %x53.75.6E ; "Sun", case-sensitive - date1 = day SP month SP year - ; e.g., 02 Jun 1982 - day = 2DIGIT - month = %x4A.61.6E ; "Jan", case-sensitive - / %x46.65.62 ; "Feb", case-sensitive - / %x4D.61.72 ; "Mar", case-sensitive - / %x41.70.72 ; "Apr", case-sensitive - / %x4D.61.79 ; "May", case-sensitive - / %x4A.75.6E ; "Jun", case-sensitive - / %x4A.75.6C ; "Jul", case-sensitive - / %x41.75.67 ; "Aug", case-sensitive - / %x53.65.70 ; "Sep", case-sensitive - / %x4F.63.74 ; "Oct", case-sensitive - / %x4E.6F.76 ; "Nov", case-sensitive - / %x44.65.63 ; "Dec", case-sensitive - year = 4DIGIT +var $2ac5d5cfe121f808$require$urlEquals = $5e1c89445518106c$exports.urlEquals; +var $2ac5d5cfe121f808$require$getFieldValues = $5e1c89445518106c$exports.getFieldValues; - GMT = %x47.4D.54 ; "GMT", case-sensitive +var $bFRvW = parcelRequire("bFRvW"); +var $2ac5d5cfe121f808$require$kEnumerableProperty = $bFRvW.kEnumerableProperty; +var $2ac5d5cfe121f808$require$isDisturbed = $bFRvW.isDisturbed; - time-of-day = hour ":" minute ":" second - ; 00:00:00 - 23:59:60 (leap second) +var $5HTG7 = parcelRequire("5HTG7"); +var $2ac5d5cfe121f808$require$webidl = $5HTG7.webidl; + +var $85Oaa = parcelRequire("85Oaa"); +var $2ac5d5cfe121f808$require$Response = $85Oaa.Response; +var $2ac5d5cfe121f808$require$cloneResponse = $85Oaa.cloneResponse; +var $2ac5d5cfe121f808$require$fromInnerResponse = $85Oaa.fromInnerResponse; + +var $9rjJZ = parcelRequire("9rjJZ"); +var $2ac5d5cfe121f808$require$Request = $9rjJZ.Request; +var $2ac5d5cfe121f808$require$fromInnerRequest = $9rjJZ.fromInnerRequest; + +var $faXHi = parcelRequire("faXHi"); +var $2ac5d5cfe121f808$require$kState = $faXHi.kState; + +var $awCP7 = parcelRequire("awCP7"); +var $2ac5d5cfe121f808$require$fetching = $awCP7.fetching; + +var $7z0I9 = parcelRequire("7z0I9"); +var $2ac5d5cfe121f808$require$urlIsHttpHttpsScheme = $7z0I9.urlIsHttpHttpsScheme; +var $2ac5d5cfe121f808$require$createDeferredPromise = $7z0I9.createDeferredPromise; +var $2ac5d5cfe121f808$require$readAllBytes = $7z0I9.readAllBytes; - hour = 2DIGIT - minute = 2DIGIT - second = 2DIGIT - */ function $204f39b4da556a98$var$toIMFDate(date) { - if (typeof date === "number") date = new Date(date); - const days = [ - "Sun", - "Mon", - "Tue", - "Wed", - "Thu", - "Fri", - "Sat" - ]; - const months = [ - "Jan", - "Feb", - "Mar", - "Apr", - "May", - "Jun", - "Jul", - "Aug", - "Sep", - "Oct", - "Nov", - "Dec" - ]; - const dayName = days[date.getUTCDay()]; - const day = date.getUTCDate().toString().padStart(2, "0"); - const month = months[date.getUTCMonth()]; - const year = date.getUTCFullYear(); - const hour = date.getUTCHours().toString().padStart(2, "0"); - const minute = date.getUTCMinutes().toString().padStart(2, "0"); - const second = date.getUTCSeconds().toString().padStart(2, "0"); - return `${dayName}, ${day} ${month} ${year} ${hour}:${minute}:${second} GMT`; -} -/** - max-age-av = "Max-Age=" non-zero-digit *DIGIT - ; In practice, both expires-av and max-age-av - ; are limited to dates representable by the - ; user agent. - * @param {number} maxAge - */ function $204f39b4da556a98$var$validateCookieMaxAge(maxAge) { - if (maxAge < 0) throw new Error("Invalid cookie max-age"); -} /** - * @see https://www.rfc-editor.org/rfc/rfc6265#section-4.1.1 - * @param {import('./index').Cookie} cookie - */ function $204f39b4da556a98$var$stringify(cookie) { - if (cookie.name.length === 0) return null; - $204f39b4da556a98$var$validateCookieName(cookie.name); - $204f39b4da556a98$var$validateCookieValue(cookie.value); - const out = [ - `${cookie.name}=${cookie.value}` - ]; - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-cookie-prefixes-00#section-3.1 - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-cookie-prefixes-00#section-3.2 - if (cookie.name.startsWith("__Secure-")) cookie.secure = true; - if (cookie.name.startsWith("__Host-")) { - cookie.secure = true; - cookie.domain = null; - cookie.path = "/"; + * @see https://w3c.github.io/ServiceWorker/#dfn-cache-batch-operation + * @typedef {Object} CacheBatchOperation + * @property {'delete' | 'put'} type + * @property {any} request + * @property {any} response + * @property {import('../../types/cache').CacheQueryOptions} options + */ /** + * @see https://w3c.github.io/ServiceWorker/#dfn-request-response-list + * @typedef {[any, any][]} requestResponseList + */ class $2ac5d5cfe121f808$var$Cache { + /** + * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-request-response-list + * @type {requestResponseList} + */ #relevantRequestResponseList; + constructor(){ + if (arguments[0] !== $2ac5d5cfe121f808$require$kConstruct) $2ac5d5cfe121f808$require$webidl.illegalConstructor(); + $2ac5d5cfe121f808$require$webidl.util.markAsUncloneable(this); + this.#relevantRequestResponseList = arguments[1]; } - if (cookie.secure) out.push("Secure"); - if (cookie.httpOnly) out.push("HttpOnly"); - if (typeof cookie.maxAge === "number") { - $204f39b4da556a98$var$validateCookieMaxAge(cookie.maxAge); - out.push(`Max-Age=${cookie.maxAge}`); + async match(request, options = {}) { + $2ac5d5cfe121f808$require$webidl.brandCheck(this, $2ac5d5cfe121f808$var$Cache); + const prefix = 'Cache.match'; + $2ac5d5cfe121f808$require$webidl.argumentLengthCheck(arguments, 1, prefix); + request = $2ac5d5cfe121f808$require$webidl.converters.RequestInfo(request, prefix, 'request'); + options = $2ac5d5cfe121f808$require$webidl.converters.CacheQueryOptions(options, prefix, 'options'); + const p = this.#internalMatchAll(request, options, 1); + if (p.length === 0) return; + return p[0]; } - if (cookie.domain) { - $204f39b4da556a98$var$validateCookieDomain(cookie.domain); - out.push(`Domain=${cookie.domain}`); + async matchAll(request, options = {}) { + $2ac5d5cfe121f808$require$webidl.brandCheck(this, $2ac5d5cfe121f808$var$Cache); + const prefix = 'Cache.matchAll'; + if (request !== undefined) request = $2ac5d5cfe121f808$require$webidl.converters.RequestInfo(request, prefix, 'request'); + options = $2ac5d5cfe121f808$require$webidl.converters.CacheQueryOptions(options, prefix, 'options'); + return this.#internalMatchAll(request, options); } - if (cookie.path) { - $204f39b4da556a98$var$validateCookiePath(cookie.path); - out.push(`Path=${cookie.path}`); + async add(request) { + $2ac5d5cfe121f808$require$webidl.brandCheck(this, $2ac5d5cfe121f808$var$Cache); + const prefix = 'Cache.add'; + $2ac5d5cfe121f808$require$webidl.argumentLengthCheck(arguments, 1, prefix); + request = $2ac5d5cfe121f808$require$webidl.converters.RequestInfo(request, prefix, 'request'); + // 1. + const requests = [ + request + ]; + // 2. + const responseArrayPromise = this.addAll(requests); + // 3. + return await responseArrayPromise; + } + async addAll(requests) { + $2ac5d5cfe121f808$require$webidl.brandCheck(this, $2ac5d5cfe121f808$var$Cache); + const prefix = 'Cache.addAll'; + $2ac5d5cfe121f808$require$webidl.argumentLengthCheck(arguments, 1, prefix); + // 1. + const responsePromises = []; + // 2. + const requestList = []; + // 3. + for (let request of requests){ + if (request === undefined) throw $2ac5d5cfe121f808$require$webidl.errors.conversionFailed({ + prefix: prefix, + argument: 'Argument 1', + types: [ + 'undefined is not allowed' + ] + }); + request = $2ac5d5cfe121f808$require$webidl.converters.RequestInfo(request); + if (typeof request === 'string') continue; + // 3.1 + const r = request[$2ac5d5cfe121f808$require$kState]; + // 3.2 + if (!$2ac5d5cfe121f808$require$urlIsHttpHttpsScheme(r.url) || r.method !== 'GET') throw $2ac5d5cfe121f808$require$webidl.errors.exception({ + header: prefix, + message: 'Expected http/s scheme when method is not GET.' + }); + } + // 4. + /** @type {ReturnType[]} */ const fetchControllers = []; + // 5. + for (const request of requests){ + // 5.1 + const r = new $2ac5d5cfe121f808$require$Request(request)[$2ac5d5cfe121f808$require$kState]; + // 5.2 + if (!$2ac5d5cfe121f808$require$urlIsHttpHttpsScheme(r.url)) throw $2ac5d5cfe121f808$require$webidl.errors.exception({ + header: prefix, + message: 'Expected http/s scheme.' + }); + // 5.4 + r.initiator = 'fetch'; + r.destination = 'subresource'; + // 5.5 + requestList.push(r); + // 5.6 + const responsePromise = $2ac5d5cfe121f808$require$createDeferredPromise(); + // 5.7 + fetchControllers.push($2ac5d5cfe121f808$require$fetching({ + request: r, + processResponse (response) { + // 1. + if (response.type === 'error' || response.status === 206 || response.status < 200 || response.status > 299) responsePromise.reject($2ac5d5cfe121f808$require$webidl.errors.exception({ + header: 'Cache.addAll', + message: 'Received an invalid status code or the request failed.' + })); + else if (response.headersList.contains('vary')) { + // 2.1 + const fieldValues = $2ac5d5cfe121f808$require$getFieldValues(response.headersList.get('vary')); + // 2.2 + for (const fieldValue of fieldValues)// 2.2.1 + if (fieldValue === '*') { + responsePromise.reject($2ac5d5cfe121f808$require$webidl.errors.exception({ + header: 'Cache.addAll', + message: 'invalid vary field value' + })); + for (const controller of fetchControllers)controller.abort(); + return; + } + } + }, + processResponseEndOfBody (response) { + // 1. + if (response.aborted) { + responsePromise.reject(new DOMException('aborted', 'AbortError')); + return; + } + // 2. + responsePromise.resolve(response); + } + })); + // 5.8 + responsePromises.push(responsePromise.promise); + } + // 6. + const p = Promise.all(responsePromises); + // 7. + const responses = await p; + // 7.1 + const operations = []; + // 7.2 + let index = 0; + // 7.3 + for (const response of responses){ + // 7.3.1 + /** @type {CacheBatchOperation} */ const operation = { + type: 'put', + request: requestList[index], + response: response // 7.3.4 + }; + operations.push(operation) // 7.3.5 + ; + index++ // 7.3.6 + ; + } + // 7.5 + const cacheJobPromise = $2ac5d5cfe121f808$require$createDeferredPromise(); + // 7.6.1 + let errorData = null; + // 7.6.2 + try { + this.#batchCacheOperations(operations); + } catch (e) { + errorData = e; + } + // 7.6.3 + queueMicrotask(()=>{ + // 7.6.3.1 + if (errorData === null) cacheJobPromise.resolve(undefined); + else // 7.6.3.2 + cacheJobPromise.reject(errorData); + }); + // 7.7 + return cacheJobPromise.promise; } - if (cookie.expires && cookie.expires.toString() !== "Invalid Date") out.push(`Expires=${$204f39b4da556a98$var$toIMFDate(cookie.expires)}`); - if (cookie.sameSite) out.push(`SameSite=${cookie.sameSite}`); - for (const part of cookie.unparsed){ - if (!part.includes("=")) throw new Error("Invalid unparsed"); - const [key, ...value] = part.split("="); - out.push(`${key.trim()}=${value.join("=")}`); + async put(request, response) { + $2ac5d5cfe121f808$require$webidl.brandCheck(this, $2ac5d5cfe121f808$var$Cache); + const prefix = 'Cache.put'; + $2ac5d5cfe121f808$require$webidl.argumentLengthCheck(arguments, 2, prefix); + request = $2ac5d5cfe121f808$require$webidl.converters.RequestInfo(request, prefix, 'request'); + response = $2ac5d5cfe121f808$require$webidl.converters.Response(response, prefix, 'response'); + // 1. + let innerRequest = null; + // 2. + if (request instanceof $2ac5d5cfe121f808$require$Request) innerRequest = request[$2ac5d5cfe121f808$require$kState]; + else innerRequest = new $2ac5d5cfe121f808$require$Request(request)[$2ac5d5cfe121f808$require$kState]; + // 4. + if (!$2ac5d5cfe121f808$require$urlIsHttpHttpsScheme(innerRequest.url) || innerRequest.method !== 'GET') throw $2ac5d5cfe121f808$require$webidl.errors.exception({ + header: prefix, + message: 'Expected an http/s scheme when method is not GET' + }); + // 5. + const innerResponse = response[$2ac5d5cfe121f808$require$kState]; + // 6. + if (innerResponse.status === 206) throw $2ac5d5cfe121f808$require$webidl.errors.exception({ + header: prefix, + message: 'Got 206 status' + }); + // 7. + if (innerResponse.headersList.contains('vary')) { + // 7.1. + const fieldValues = $2ac5d5cfe121f808$require$getFieldValues(innerResponse.headersList.get('vary')); + // 7.2. + for (const fieldValue of fieldValues){ + // 7.2.1 + if (fieldValue === '*') throw $2ac5d5cfe121f808$require$webidl.errors.exception({ + header: prefix, + message: 'Got * vary field value' + }); + } + } + // 8. + if (innerResponse.body && ($2ac5d5cfe121f808$require$isDisturbed(innerResponse.body.stream) || innerResponse.body.stream.locked)) throw $2ac5d5cfe121f808$require$webidl.errors.exception({ + header: prefix, + message: 'Response body is locked or disturbed' + }); + // 9. + const clonedResponse = $2ac5d5cfe121f808$require$cloneResponse(innerResponse); + // 10. + const bodyReadPromise = $2ac5d5cfe121f808$require$createDeferredPromise(); + // 11. + if (innerResponse.body != null) { + // 11.1 + const stream = innerResponse.body.stream; + // 11.2 + const reader = stream.getReader(); + // 11.3 + $2ac5d5cfe121f808$require$readAllBytes(reader).then(bodyReadPromise.resolve, bodyReadPromise.reject); + } else bodyReadPromise.resolve(undefined); + // 12. + /** @type {CacheBatchOperation[]} */ const operations = []; + // 13. + /** @type {CacheBatchOperation} */ const operation = { + type: 'put', + request: innerRequest, + response: clonedResponse // 16. + }; + // 17. + operations.push(operation); + // 19. + const bytes = await bodyReadPromise.promise; + if (clonedResponse.body != null) clonedResponse.body.source = bytes; + // 19.1 + const cacheJobPromise = $2ac5d5cfe121f808$require$createDeferredPromise(); + // 19.2.1 + let errorData = null; + // 19.2.2 + try { + this.#batchCacheOperations(operations); + } catch (e) { + errorData = e; + } + // 19.2.3 + queueMicrotask(()=>{ + // 19.2.3.1 + if (errorData === null) cacheJobPromise.resolve(); + else cacheJobPromise.reject(errorData); + }); + return cacheJobPromise.promise; } - return out.join("; "); -} -let $204f39b4da556a98$var$kHeadersListNode; -function $204f39b4da556a98$var$getHeadersList(headers) { - if (headers[$204f39b4da556a98$require$kHeadersList]) return headers[$204f39b4da556a98$require$kHeadersList]; - if (!$204f39b4da556a98$var$kHeadersListNode) { - $204f39b4da556a98$var$kHeadersListNode = Object.getOwnPropertySymbols(headers).find((symbol)=>symbol.description === "headers list"); - $g40fK$assert($204f39b4da556a98$var$kHeadersListNode, "Headers cannot be parsed"); + async delete(request, options = {}) { + $2ac5d5cfe121f808$require$webidl.brandCheck(this, $2ac5d5cfe121f808$var$Cache); + const prefix = 'Cache.delete'; + $2ac5d5cfe121f808$require$webidl.argumentLengthCheck(arguments, 1, prefix); + request = $2ac5d5cfe121f808$require$webidl.converters.RequestInfo(request, prefix, 'request'); + options = $2ac5d5cfe121f808$require$webidl.converters.CacheQueryOptions(options, prefix, 'options'); + /** + * @type {Request} + */ let r = null; + if (request instanceof $2ac5d5cfe121f808$require$Request) { + r = request[$2ac5d5cfe121f808$require$kState]; + if (r.method !== 'GET' && !options.ignoreMethod) return false; + } else { + $in2sP$nodeassert(typeof request === 'string'); + r = new $2ac5d5cfe121f808$require$Request(request)[$2ac5d5cfe121f808$require$kState]; + } + /** @type {CacheBatchOperation[]} */ const operations = []; + /** @type {CacheBatchOperation} */ const operation = { + type: 'delete', + request: r, + options: options + }; + operations.push(operation); + const cacheJobPromise = $2ac5d5cfe121f808$require$createDeferredPromise(); + let errorData = null; + let requestResponses; + try { + requestResponses = this.#batchCacheOperations(operations); + } catch (e) { + errorData = e; + } + queueMicrotask(()=>{ + if (errorData === null) cacheJobPromise.resolve(!!requestResponses?.length); + else cacheJobPromise.reject(errorData); + }); + return cacheJobPromise.promise; } - const headersList = headers[$204f39b4da556a98$var$kHeadersListNode]; - $g40fK$assert(headersList); - return headersList; -} -module.exports = { - isCTLExcludingHtab: $204f39b4da556a98$var$isCTLExcludingHtab, - stringify: $204f39b4da556a98$var$stringify, - getHeadersList: $204f39b4da556a98$var$getHeadersList -}; - -}); - - - -parcelRegister("gL9m6", function(module, exports) { -"use strict"; - -var $jk0LQ = parcelRequire("jk0LQ"); -var $c3384af39265c39a$require$webidl = $jk0LQ.webidl; - -var $1ZCMb = parcelRequire("1ZCMb"); -var $c3384af39265c39a$require$DOMException = $1ZCMb.DOMException; - -var $bNorT = parcelRequire("bNorT"); -var $c3384af39265c39a$require$URLSerializer = $bNorT.URLSerializer; - -var $5pfdo = parcelRequire("5pfdo"); -var $c3384af39265c39a$require$getGlobalOrigin = $5pfdo.getGlobalOrigin; - -var $gKxlG = parcelRequire("gKxlG"); -var $c3384af39265c39a$require$staticPropertyDescriptors = $gKxlG.staticPropertyDescriptors; -var $c3384af39265c39a$require$states = $gKxlG.states; -var $c3384af39265c39a$require$opcodes = $gKxlG.opcodes; -var $c3384af39265c39a$require$emptyBuffer = $gKxlG.emptyBuffer; - -var $eHBZp = parcelRequire("eHBZp"); -var $c3384af39265c39a$require$kWebSocketURL = $eHBZp.kWebSocketURL; -var $c3384af39265c39a$require$kReadyState = $eHBZp.kReadyState; -var $c3384af39265c39a$require$kController = $eHBZp.kController; -var $c3384af39265c39a$require$kBinaryType = $eHBZp.kBinaryType; -var $c3384af39265c39a$require$kResponse = $eHBZp.kResponse; -var $c3384af39265c39a$require$kSentClose = $eHBZp.kSentClose; -var $c3384af39265c39a$require$kByteParser = $eHBZp.kByteParser; - -var $hdN0j = parcelRequire("hdN0j"); -var $c3384af39265c39a$require$isEstablished = $hdN0j.isEstablished; -var $c3384af39265c39a$require$isClosing = $hdN0j.isClosing; -var $c3384af39265c39a$require$isValidSubprotocol = $hdN0j.isValidSubprotocol; -var $c3384af39265c39a$require$failWebsocketConnection = $hdN0j.failWebsocketConnection; -var $c3384af39265c39a$require$fireEvent = $hdN0j.fireEvent; - -var $2w8rC = parcelRequire("2w8rC"); -var $c3384af39265c39a$require$establishWebSocketConnection = $2w8rC.establishWebSocketConnection; - -var $j1ah5 = parcelRequire("j1ah5"); -var $c3384af39265c39a$require$WebsocketFrameSend = $j1ah5.WebsocketFrameSend; - -var $4ZT6d = parcelRequire("4ZT6d"); -var $c3384af39265c39a$require$ByteParser = $4ZT6d.ByteParser; - -var $gv2nV = parcelRequire("gv2nV"); -var $c3384af39265c39a$require$kEnumerableProperty = $gv2nV.kEnumerableProperty; -var $c3384af39265c39a$require$isBlobLike = $gv2nV.isBlobLike; - -var $gvOkt = parcelRequire("gvOkt"); -var $c3384af39265c39a$require$getGlobalDispatcher = $gvOkt.getGlobalDispatcher; - -var $c3384af39265c39a$require$types = $g40fK$util.types; -let $c3384af39265c39a$var$experimentalWarned = false; -// https://websockets.spec.whatwg.org/#interface-definition -class $c3384af39265c39a$var$WebSocket extends EventTarget { - #events = { - open: null, - error: null, - close: null, - message: null - }; - #bufferedAmount = 0; - #protocol = ""; - #extensions = ""; /** - * @param {string} url - * @param {string|string[]} protocols - */ constructor(url, protocols = []){ - super(); - $c3384af39265c39a$require$webidl.argumentLengthCheck(arguments, 1, { - header: "WebSocket constructor" - }); - if (!$c3384af39265c39a$var$experimentalWarned) { - $c3384af39265c39a$var$experimentalWarned = true; - process.emitWarning("WebSockets are experimental, expect them to change at any time.", { - code: "UNDICI-WS" - }); + * @see https://w3c.github.io/ServiceWorker/#dom-cache-keys + * @param {any} request + * @param {import('../../types/cache').CacheQueryOptions} options + * @returns {Promise} + */ async keys(request, options = {}) { + $2ac5d5cfe121f808$require$webidl.brandCheck(this, $2ac5d5cfe121f808$var$Cache); + const prefix = 'Cache.keys'; + if (request !== undefined) request = $2ac5d5cfe121f808$require$webidl.converters.RequestInfo(request, prefix, 'request'); + options = $2ac5d5cfe121f808$require$webidl.converters.CacheQueryOptions(options, prefix, 'options'); + // 1. + let r = null; + // 2. + if (request !== undefined) { + // 2.1 + if (request instanceof $2ac5d5cfe121f808$require$Request) { + // 2.1.1 + r = request[$2ac5d5cfe121f808$require$kState]; + // 2.1.2 + if (r.method !== 'GET' && !options.ignoreMethod) return []; + } else if (typeof request === 'string') r = new $2ac5d5cfe121f808$require$Request(request)[$2ac5d5cfe121f808$require$kState]; } - const options = $c3384af39265c39a$require$webidl.converters["DOMString or sequence or WebSocketInit"](protocols); - url = $c3384af39265c39a$require$webidl.converters.USVString(url); - protocols = options.protocols; - // 1. Let baseURL be this's relevant settings object's API base URL. - const baseURL = $c3384af39265c39a$require$getGlobalOrigin(); - // 1. Let urlRecord be the result of applying the URL parser to url with baseURL. - let urlRecord; + // 4. + const promise = $2ac5d5cfe121f808$require$createDeferredPromise(); + // 5. + // 5.1 + const requests = []; + // 5.2 + if (request === undefined) // 5.2.1 + for (const requestResponse of this.#relevantRequestResponseList)// 5.2.1.1 + requests.push(requestResponse[0]); + else { + // 5.3.1 + const requestResponses = this.#queryCache(r, options); + // 5.3.2 + for (const requestResponse of requestResponses)// 5.3.2.1 + requests.push(requestResponse[0]); + } + // 5.4 + queueMicrotask(()=>{ + // 5.4.1 + const requestList = []; + // 5.4.2 + for (const request of requests){ + const requestObject = $2ac5d5cfe121f808$require$fromInnerRequest(request, new AbortController().signal, 'immutable'); + // 5.4.2.1 + requestList.push(requestObject); + } + // 5.4.3 + promise.resolve(Object.freeze(requestList)); + }); + return promise.promise; + } + /** + * @see https://w3c.github.io/ServiceWorker/#batch-cache-operations-algorithm + * @param {CacheBatchOperation[]} operations + * @returns {requestResponseList} + */ #batchCacheOperations(operations) { + // 1. + const cache = this.#relevantRequestResponseList; + // 2. + const backupCache = [ + ...cache + ]; + // 3. + const addedItems = []; + // 4.1 + const resultList = []; try { - urlRecord = new URL(url, baseURL); + // 4.2 + for (const operation of operations){ + // 4.2.1 + if (operation.type !== 'delete' && operation.type !== 'put') throw $2ac5d5cfe121f808$require$webidl.errors.exception({ + header: 'Cache.#batchCacheOperations', + message: 'operation type does not match "delete" or "put"' + }); + // 4.2.2 + if (operation.type === 'delete' && operation.response != null) throw $2ac5d5cfe121f808$require$webidl.errors.exception({ + header: 'Cache.#batchCacheOperations', + message: 'delete operation should not have an associated response' + }); + // 4.2.3 + if (this.#queryCache(operation.request, operation.options, addedItems).length) throw new DOMException('???', 'InvalidStateError'); + // 4.2.4 + let requestResponses; + // 4.2.5 + if (operation.type === 'delete') { + // 4.2.5.1 + requestResponses = this.#queryCache(operation.request, operation.options); + // TODO: the spec is wrong, this is needed to pass WPTs + if (requestResponses.length === 0) return []; + // 4.2.5.2 + for (const requestResponse of requestResponses){ + const idx = cache.indexOf(requestResponse); + $in2sP$nodeassert(idx !== -1); + // 4.2.5.2.1 + cache.splice(idx, 1); + } + } else if (operation.type === 'put') { + // 4.2.6.1 + if (operation.response == null) throw $2ac5d5cfe121f808$require$webidl.errors.exception({ + header: 'Cache.#batchCacheOperations', + message: 'put operation should have an associated response' + }); + // 4.2.6.2 + const r = operation.request; + // 4.2.6.3 + if (!$2ac5d5cfe121f808$require$urlIsHttpHttpsScheme(r.url)) throw $2ac5d5cfe121f808$require$webidl.errors.exception({ + header: 'Cache.#batchCacheOperations', + message: 'expected http or https scheme' + }); + // 4.2.6.4 + if (r.method !== 'GET') throw $2ac5d5cfe121f808$require$webidl.errors.exception({ + header: 'Cache.#batchCacheOperations', + message: 'not get method' + }); + // 4.2.6.5 + if (operation.options != null) throw $2ac5d5cfe121f808$require$webidl.errors.exception({ + header: 'Cache.#batchCacheOperations', + message: 'options must not be defined' + }); + // 4.2.6.6 + requestResponses = this.#queryCache(operation.request); + // 4.2.6.7 + for (const requestResponse of requestResponses){ + const idx = cache.indexOf(requestResponse); + $in2sP$nodeassert(idx !== -1); + // 4.2.6.7.1 + cache.splice(idx, 1); + } + // 4.2.6.8 + cache.push([ + operation.request, + operation.response + ]); + // 4.2.6.10 + addedItems.push([ + operation.request, + operation.response + ]); + } + // 4.2.7 + resultList.push([ + operation.request, + operation.response + ]); + } + // 4.3 + return resultList; } catch (e) { - // 3. If urlRecord is failure, then throw a "SyntaxError" DOMException. - throw new $c3384af39265c39a$require$DOMException(e, "SyntaxError"); + // 5.1 + this.#relevantRequestResponseList.length = 0; + // 5.2 + this.#relevantRequestResponseList = backupCache; + // 5.3 + throw e; } - // 4. If urlRecord’s scheme is "http", then set urlRecord’s scheme to "ws". - if (urlRecord.protocol === "http:") urlRecord.protocol = "ws:"; - else if (urlRecord.protocol === "https:") // 5. Otherwise, if urlRecord’s scheme is "https", set urlRecord’s scheme to "wss". - urlRecord.protocol = "wss:"; - // 6. If urlRecord’s scheme is not "ws" or "wss", then throw a "SyntaxError" DOMException. - if (urlRecord.protocol !== "ws:" && urlRecord.protocol !== "wss:") throw new $c3384af39265c39a$require$DOMException(`Expected a ws: or wss: protocol, got ${urlRecord.protocol}`, "SyntaxError"); - // 7. If urlRecord’s fragment is non-null, then throw a "SyntaxError" - // DOMException. - if (urlRecord.hash || urlRecord.href.endsWith("#")) throw new $c3384af39265c39a$require$DOMException("Got fragment", "SyntaxError"); - // 8. If protocols is a string, set protocols to a sequence consisting - // of just that string. - if (typeof protocols === "string") protocols = [ - protocols - ]; - // 9. If any of the values in protocols occur more than once or otherwise - // fail to match the requirements for elements that comprise the value - // of `Sec-WebSocket-Protocol` fields as defined by The WebSocket - // protocol, then throw a "SyntaxError" DOMException. - if (protocols.length !== new Set(protocols.map((p)=>p.toLowerCase())).size) throw new $c3384af39265c39a$require$DOMException("Invalid Sec-WebSocket-Protocol value", "SyntaxError"); - if (protocols.length > 0 && !protocols.every((p)=>$c3384af39265c39a$require$isValidSubprotocol(p))) throw new $c3384af39265c39a$require$DOMException("Invalid Sec-WebSocket-Protocol value", "SyntaxError"); - // 10. Set this's url to urlRecord. - this[$c3384af39265c39a$require$kWebSocketURL] = new URL(urlRecord.href); - // 11. Let client be this's relevant settings object. - // 12. Run this step in parallel: - // 1. Establish a WebSocket connection given urlRecord, protocols, - // and client. - this[$c3384af39265c39a$require$kController] = $c3384af39265c39a$require$establishWebSocketConnection(urlRecord, protocols, this, (response)=>this.#onConnectionEstablished(response), options); - // Each WebSocket object has an associated ready state, which is a - // number representing the state of the connection. Initially it must - // be CONNECTING (0). - this[$c3384af39265c39a$require$kReadyState] = $c3384af39265c39a$var$WebSocket.CONNECTING; - // The extensions attribute must initially return the empty string. - // The protocol attribute must initially return the empty string. - // Each WebSocket object has an associated binary type, which is a - // BinaryType. Initially it must be "blob". - this[$c3384af39265c39a$require$kBinaryType] = "blob"; } /** - * @see https://websockets.spec.whatwg.org/#dom-websocket-close - * @param {number|undefined} code - * @param {string|undefined} reason - */ close(code, reason) { - $c3384af39265c39a$require$webidl.brandCheck(this, $c3384af39265c39a$var$WebSocket); - if (code !== undefined) code = $c3384af39265c39a$require$webidl.converters["unsigned short"](code, { - clamp: true - }); - if (reason !== undefined) reason = $c3384af39265c39a$require$webidl.converters.USVString(reason); - // 1. If code is present, but is neither an integer equal to 1000 nor an - // integer in the range 3000 to 4999, inclusive, throw an - // "InvalidAccessError" DOMException. - if (code !== undefined) { - if (code !== 1000 && (code < 3000 || code > 4999)) throw new $c3384af39265c39a$require$DOMException("invalid code", "InvalidAccessError"); - } - let reasonByteLength = 0; - // 2. If reason is present, then run these substeps: - if (reason !== undefined) { - // 1. Let reasonBytes be the result of encoding reason. - // 2. If reasonBytes is longer than 123 bytes, then throw a - // "SyntaxError" DOMException. - reasonByteLength = Buffer.byteLength(reason); - if (reasonByteLength > 123) throw new $c3384af39265c39a$require$DOMException(`Reason must be less than 123 bytes; received ${reasonByteLength}`, "SyntaxError"); + * @see https://w3c.github.io/ServiceWorker/#query-cache + * @param {any} requestQuery + * @param {import('../../types/cache').CacheQueryOptions} options + * @param {requestResponseList} targetStorage + * @returns {requestResponseList} + */ #queryCache(requestQuery, options, targetStorage) { + /** @type {requestResponseList} */ const resultList = []; + const storage = targetStorage ?? this.#relevantRequestResponseList; + for (const requestResponse of storage){ + const [cachedRequest, cachedResponse] = requestResponse; + if (this.#requestMatchesCachedItem(requestQuery, cachedRequest, cachedResponse, options)) resultList.push(requestResponse); } - // 3. Run the first matching steps from the following list: - if (this[$c3384af39265c39a$require$kReadyState] === $c3384af39265c39a$var$WebSocket.CLOSING || this[$c3384af39265c39a$require$kReadyState] === $c3384af39265c39a$var$WebSocket.CLOSED) ; - else if (!$c3384af39265c39a$require$isEstablished(this)) { - // If the WebSocket connection is not yet established - // Fail the WebSocket connection and set this's ready state - // to CLOSING (2). - $c3384af39265c39a$require$failWebsocketConnection(this, "Connection was closed before it was established."); - this[$c3384af39265c39a$require$kReadyState] = $c3384af39265c39a$var$WebSocket.CLOSING; - } else if (!$c3384af39265c39a$require$isClosing(this)) { - // If the WebSocket closing handshake has not yet been started - // Start the WebSocket closing handshake and set this's ready - // state to CLOSING (2). - // - If neither code nor reason is present, the WebSocket Close - // message must not have a body. - // - If code is present, then the status code to use in the - // WebSocket Close message must be the integer given by code. - // - If reason is also present, then reasonBytes must be - // provided in the Close message after the status code. - const frame = new $c3384af39265c39a$require$WebsocketFrameSend(); - // If neither code nor reason is present, the WebSocket Close - // message must not have a body. - // If code is present, then the status code to use in the - // WebSocket Close message must be the integer given by code. - if (code !== undefined && reason === undefined) { - frame.frameData = Buffer.allocUnsafe(2); - frame.frameData.writeUInt16BE(code, 0); - } else if (code !== undefined && reason !== undefined) { - // If reason is also present, then reasonBytes must be - // provided in the Close message after the status code. - frame.frameData = Buffer.allocUnsafe(2 + reasonByteLength); - frame.frameData.writeUInt16BE(code, 0); - // the body MAY contain UTF-8-encoded data with value /reason/ - frame.frameData.write(reason, 2, "utf-8"); - } else frame.frameData = $c3384af39265c39a$require$emptyBuffer; - /** @type {import('stream').Duplex} */ const socket = this[$c3384af39265c39a$require$kResponse].socket; - socket.write(frame.createFrame($c3384af39265c39a$require$opcodes.CLOSE), (err)=>{ - if (!err) this[$c3384af39265c39a$require$kSentClose] = true; - }); - // Upon either sending or receiving a Close control frame, it is said - // that _The WebSocket Closing Handshake is Started_ and that the - // WebSocket connection is in the CLOSING state. - this[$c3384af39265c39a$require$kReadyState] = $c3384af39265c39a$require$states.CLOSING; - } else // Otherwise - // Set this's ready state to CLOSING (2). - this[$c3384af39265c39a$require$kReadyState] = $c3384af39265c39a$var$WebSocket.CLOSING; + return resultList; } /** - * @see https://websockets.spec.whatwg.org/#dom-websocket-send - * @param {NodeJS.TypedArray|ArrayBuffer|Blob|string} data - */ send(data) { - $c3384af39265c39a$require$webidl.brandCheck(this, $c3384af39265c39a$var$WebSocket); - $c3384af39265c39a$require$webidl.argumentLengthCheck(arguments, 1, { - header: "WebSocket.send" - }); - data = $c3384af39265c39a$require$webidl.converters.WebSocketSendData(data); - // 1. If this's ready state is CONNECTING, then throw an - // "InvalidStateError" DOMException. - if (this[$c3384af39265c39a$require$kReadyState] === $c3384af39265c39a$var$WebSocket.CONNECTING) throw new $c3384af39265c39a$require$DOMException("Sent before connected.", "InvalidStateError"); - // 2. Run the appropriate set of steps from the following list: - // https://datatracker.ietf.org/doc/html/rfc6455#section-6.1 - // https://datatracker.ietf.org/doc/html/rfc6455#section-5.2 - if (!$c3384af39265c39a$require$isEstablished(this) || $c3384af39265c39a$require$isClosing(this)) return; - /** @type {import('stream').Duplex} */ const socket = this[$c3384af39265c39a$require$kResponse].socket; - // If data is a string - if (typeof data === "string") { - // If the WebSocket connection is established and the WebSocket - // closing handshake has not yet started, then the user agent - // must send a WebSocket Message comprised of the data argument - // using a text frame opcode; if the data cannot be sent, e.g. - // because it would need to be buffered but the buffer is full, - // the user agent must flag the WebSocket as full and then close - // the WebSocket connection. Any invocation of this method with a - // string argument that does not throw an exception must increase - // the bufferedAmount attribute by the number of bytes needed to - // express the argument as UTF-8. - const value = Buffer.from(data); - const frame = new $c3384af39265c39a$require$WebsocketFrameSend(value); - const buffer = frame.createFrame($c3384af39265c39a$require$opcodes.TEXT); - this.#bufferedAmount += value.byteLength; - socket.write(buffer, ()=>{ - this.#bufferedAmount -= value.byteLength; - }); - } else if ($c3384af39265c39a$require$types.isArrayBuffer(data)) { - // If the WebSocket connection is established, and the WebSocket - // closing handshake has not yet started, then the user agent must - // send a WebSocket Message comprised of data using a binary frame - // opcode; if the data cannot be sent, e.g. because it would need - // to be buffered but the buffer is full, the user agent must flag - // the WebSocket as full and then close the WebSocket connection. - // The data to be sent is the data stored in the buffer described - // by the ArrayBuffer object. Any invocation of this method with an - // ArrayBuffer argument that does not throw an exception must - // increase the bufferedAmount attribute by the length of the - // ArrayBuffer in bytes. - const value = Buffer.from(data); - const frame = new $c3384af39265c39a$require$WebsocketFrameSend(value); - const buffer = frame.createFrame($c3384af39265c39a$require$opcodes.BINARY); - this.#bufferedAmount += value.byteLength; - socket.write(buffer, ()=>{ - this.#bufferedAmount -= value.byteLength; - }); - } else if (ArrayBuffer.isView(data)) { - // If the WebSocket connection is established, and the WebSocket - // closing handshake has not yet started, then the user agent must - // send a WebSocket Message comprised of data using a binary frame - // opcode; if the data cannot be sent, e.g. because it would need to - // be buffered but the buffer is full, the user agent must flag the - // WebSocket as full and then close the WebSocket connection. The - // data to be sent is the data stored in the section of the buffer - // described by the ArrayBuffer object that data references. Any - // invocation of this method with this kind of argument that does - // not throw an exception must increase the bufferedAmount attribute - // by the length of data’s buffer in bytes. - const ab = Buffer.from(data, data.byteOffset, data.byteLength); - const frame = new $c3384af39265c39a$require$WebsocketFrameSend(ab); - const buffer = frame.createFrame($c3384af39265c39a$require$opcodes.BINARY); - this.#bufferedAmount += ab.byteLength; - socket.write(buffer, ()=>{ - this.#bufferedAmount -= ab.byteLength; - }); - } else if ($c3384af39265c39a$require$isBlobLike(data)) { - // If the WebSocket connection is established, and the WebSocket - // closing handshake has not yet started, then the user agent must - // send a WebSocket Message comprised of data using a binary frame - // opcode; if the data cannot be sent, e.g. because it would need to - // be buffered but the buffer is full, the user agent must flag the - // WebSocket as full and then close the WebSocket connection. The data - // to be sent is the raw data represented by the Blob object. Any - // invocation of this method with a Blob argument that does not throw - // an exception must increase the bufferedAmount attribute by the size - // of the Blob object’s raw data, in bytes. - const frame = new $c3384af39265c39a$require$WebsocketFrameSend(); - data.arrayBuffer().then((ab)=>{ - const value = Buffer.from(ab); - frame.frameData = value; - const buffer = frame.createFrame($c3384af39265c39a$require$opcodes.BINARY); - this.#bufferedAmount += value.byteLength; - socket.write(buffer, ()=>{ - this.#bufferedAmount -= value.byteLength; - }); - }); + * @see https://w3c.github.io/ServiceWorker/#request-matches-cached-item-algorithm + * @param {any} requestQuery + * @param {any} request + * @param {any | null} response + * @param {import('../../types/cache').CacheQueryOptions | undefined} options + * @returns {boolean} + */ #requestMatchesCachedItem(requestQuery, request, response = null, options) { + // if (options?.ignoreMethod === false && request.method === 'GET') { + // return false + // } + const queryURL = new URL(requestQuery.url); + const cachedURL = new URL(request.url); + if (options?.ignoreSearch) { + cachedURL.search = ''; + queryURL.search = ''; } + if (!$2ac5d5cfe121f808$require$urlEquals(queryURL, cachedURL, true)) return false; + if (response == null || options?.ignoreVary || !response.headersList.contains('vary')) return true; + const fieldValues = $2ac5d5cfe121f808$require$getFieldValues(response.headersList.get('vary')); + for (const fieldValue of fieldValues){ + if (fieldValue === '*') return false; + const requestValue = request.headersList.get(fieldValue); + const queryValue = requestQuery.headersList.get(fieldValue); + // If one has the header and the other doesn't, or one has + // a different value than the other, return false + if (requestValue !== queryValue) return false; + } + return true; } - get readyState() { - $c3384af39265c39a$require$webidl.brandCheck(this, $c3384af39265c39a$var$WebSocket); - // The readyState getter steps are to return this's ready state. - return this[$c3384af39265c39a$require$kReadyState]; - } - get bufferedAmount() { - $c3384af39265c39a$require$webidl.brandCheck(this, $c3384af39265c39a$var$WebSocket); - return this.#bufferedAmount; - } - get url() { - $c3384af39265c39a$require$webidl.brandCheck(this, $c3384af39265c39a$var$WebSocket); - // The url getter steps are to return this's url, serialized. - return $c3384af39265c39a$require$URLSerializer(this[$c3384af39265c39a$require$kWebSocketURL]); - } - get extensions() { - $c3384af39265c39a$require$webidl.brandCheck(this, $c3384af39265c39a$var$WebSocket); - return this.#extensions; - } - get protocol() { - $c3384af39265c39a$require$webidl.brandCheck(this, $c3384af39265c39a$var$WebSocket); - return this.#protocol; - } - get onopen() { - $c3384af39265c39a$require$webidl.brandCheck(this, $c3384af39265c39a$var$WebSocket); - return this.#events.open; - } - set onopen(fn) { - $c3384af39265c39a$require$webidl.brandCheck(this, $c3384af39265c39a$var$WebSocket); - if (this.#events.open) this.removeEventListener("open", this.#events.open); - if (typeof fn === "function") { - this.#events.open = fn; - this.addEventListener("open", fn); - } else this.#events.open = null; - } - get onerror() { - $c3384af39265c39a$require$webidl.brandCheck(this, $c3384af39265c39a$var$WebSocket); - return this.#events.error; - } - set onerror(fn) { - $c3384af39265c39a$require$webidl.brandCheck(this, $c3384af39265c39a$var$WebSocket); - if (this.#events.error) this.removeEventListener("error", this.#events.error); - if (typeof fn === "function") { - this.#events.error = fn; - this.addEventListener("error", fn); - } else this.#events.error = null; - } - get onclose() { - $c3384af39265c39a$require$webidl.brandCheck(this, $c3384af39265c39a$var$WebSocket); - return this.#events.close; - } - set onclose(fn) { - $c3384af39265c39a$require$webidl.brandCheck(this, $c3384af39265c39a$var$WebSocket); - if (this.#events.close) this.removeEventListener("close", this.#events.close); - if (typeof fn === "function") { - this.#events.close = fn; - this.addEventListener("close", fn); - } else this.#events.close = null; - } - get onmessage() { - $c3384af39265c39a$require$webidl.brandCheck(this, $c3384af39265c39a$var$WebSocket); - return this.#events.message; - } - set onmessage(fn) { - $c3384af39265c39a$require$webidl.brandCheck(this, $c3384af39265c39a$var$WebSocket); - if (this.#events.message) this.removeEventListener("message", this.#events.message); - if (typeof fn === "function") { - this.#events.message = fn; - this.addEventListener("message", fn); - } else this.#events.message = null; - } - get binaryType() { - $c3384af39265c39a$require$webidl.brandCheck(this, $c3384af39265c39a$var$WebSocket); - return this[$c3384af39265c39a$require$kBinaryType]; - } - set binaryType(type) { - $c3384af39265c39a$require$webidl.brandCheck(this, $c3384af39265c39a$var$WebSocket); - if (type !== "blob" && type !== "arraybuffer") this[$c3384af39265c39a$require$kBinaryType] = "blob"; - else this[$c3384af39265c39a$require$kBinaryType] = type; - } - /** - * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol - */ #onConnectionEstablished(response) { - // processResponse is called when the "response’s header list has been received and initialized." - // once this happens, the connection is open - this[$c3384af39265c39a$require$kResponse] = response; - const parser = new $c3384af39265c39a$require$ByteParser(this); - parser.on("drain", function onParserDrain() { - this.ws[$c3384af39265c39a$require$kResponse].socket.resume(); - }); - response.socket.ws = this; - this[$c3384af39265c39a$require$kByteParser] = parser; - // 1. Change the ready state to OPEN (1). - this[$c3384af39265c39a$require$kReadyState] = $c3384af39265c39a$require$states.OPEN; - // 2. Change the extensions attribute’s value to the extensions in use, if - // it is not the null value. - // https://datatracker.ietf.org/doc/html/rfc6455#section-9.1 - const extensions = response.headersList.get("sec-websocket-extensions"); - if (extensions !== null) this.#extensions = extensions; - // 3. Change the protocol attribute’s value to the subprotocol in use, if - // it is not the null value. - // https://datatracker.ietf.org/doc/html/rfc6455#section-1.9 - const protocol = response.headersList.get("sec-websocket-protocol"); - if (protocol !== null) this.#protocol = protocol; - // 4. Fire an event named open at the WebSocket object. - $c3384af39265c39a$require$fireEvent("open", this); + #internalMatchAll(request, options, maxResponses = Infinity) { + // 1. + let r = null; + // 2. + if (request !== undefined) { + if (request instanceof $2ac5d5cfe121f808$require$Request) { + // 2.1.1 + r = request[$2ac5d5cfe121f808$require$kState]; + // 2.1.2 + if (r.method !== 'GET' && !options.ignoreMethod) return []; + } else if (typeof request === 'string') // 2.2.1 + r = new $2ac5d5cfe121f808$require$Request(request)[$2ac5d5cfe121f808$require$kState]; + } + // 5. + // 5.1 + const responses = []; + // 5.2 + if (request === undefined) // 5.2.1 + for (const requestResponse of this.#relevantRequestResponseList)responses.push(requestResponse[1]); + else { + // 5.3.1 + const requestResponses = this.#queryCache(r, options); + // 5.3.2 + for (const requestResponse of requestResponses)responses.push(requestResponse[1]); + } + // 5.4 + // We don't implement CORs so we don't need to loop over the responses, yay! + // 5.5.1 + const responseList = []; + // 5.5.2 + for (const response of responses){ + // 5.5.2.1 + const responseObject = $2ac5d5cfe121f808$require$fromInnerResponse(response, 'immutable'); + responseList.push(responseObject.clone()); + if (responseList.length >= maxResponses) break; + } + // 6. + return Object.freeze(responseList); } } -// https://websockets.spec.whatwg.org/#dom-websocket-connecting -$c3384af39265c39a$var$WebSocket.CONNECTING = $c3384af39265c39a$var$WebSocket.prototype.CONNECTING = $c3384af39265c39a$require$states.CONNECTING; -// https://websockets.spec.whatwg.org/#dom-websocket-open -$c3384af39265c39a$var$WebSocket.OPEN = $c3384af39265c39a$var$WebSocket.prototype.OPEN = $c3384af39265c39a$require$states.OPEN; -// https://websockets.spec.whatwg.org/#dom-websocket-closing -$c3384af39265c39a$var$WebSocket.CLOSING = $c3384af39265c39a$var$WebSocket.prototype.CLOSING = $c3384af39265c39a$require$states.CLOSING; -// https://websockets.spec.whatwg.org/#dom-websocket-closed -$c3384af39265c39a$var$WebSocket.CLOSED = $c3384af39265c39a$var$WebSocket.prototype.CLOSED = $c3384af39265c39a$require$states.CLOSED; -Object.defineProperties($c3384af39265c39a$var$WebSocket.prototype, { - CONNECTING: $c3384af39265c39a$require$staticPropertyDescriptors, - OPEN: $c3384af39265c39a$require$staticPropertyDescriptors, - CLOSING: $c3384af39265c39a$require$staticPropertyDescriptors, - CLOSED: $c3384af39265c39a$require$staticPropertyDescriptors, - url: $c3384af39265c39a$require$kEnumerableProperty, - readyState: $c3384af39265c39a$require$kEnumerableProperty, - bufferedAmount: $c3384af39265c39a$require$kEnumerableProperty, - onopen: $c3384af39265c39a$require$kEnumerableProperty, - onerror: $c3384af39265c39a$require$kEnumerableProperty, - onclose: $c3384af39265c39a$require$kEnumerableProperty, - close: $c3384af39265c39a$require$kEnumerableProperty, - onmessage: $c3384af39265c39a$require$kEnumerableProperty, - binaryType: $c3384af39265c39a$require$kEnumerableProperty, - send: $c3384af39265c39a$require$kEnumerableProperty, - extensions: $c3384af39265c39a$require$kEnumerableProperty, - protocol: $c3384af39265c39a$require$kEnumerableProperty, +Object.defineProperties($2ac5d5cfe121f808$var$Cache.prototype, { [Symbol.toStringTag]: { - value: "WebSocket", - writable: false, - enumerable: false, + value: 'Cache', configurable: true - } -}); -Object.defineProperties($c3384af39265c39a$var$WebSocket, { - CONNECTING: $c3384af39265c39a$require$staticPropertyDescriptors, - OPEN: $c3384af39265c39a$require$staticPropertyDescriptors, - CLOSING: $c3384af39265c39a$require$staticPropertyDescriptors, - CLOSED: $c3384af39265c39a$require$staticPropertyDescriptors + }, + match: $2ac5d5cfe121f808$require$kEnumerableProperty, + matchAll: $2ac5d5cfe121f808$require$kEnumerableProperty, + add: $2ac5d5cfe121f808$require$kEnumerableProperty, + addAll: $2ac5d5cfe121f808$require$kEnumerableProperty, + put: $2ac5d5cfe121f808$require$kEnumerableProperty, + delete: $2ac5d5cfe121f808$require$kEnumerableProperty, + keys: $2ac5d5cfe121f808$require$kEnumerableProperty }); -$c3384af39265c39a$require$webidl.converters["sequence"] = $c3384af39265c39a$require$webidl.sequenceConverter($c3384af39265c39a$require$webidl.converters.DOMString); -$c3384af39265c39a$require$webidl.converters["DOMString or sequence"] = function(V) { - if ($c3384af39265c39a$require$webidl.util.Type(V) === "Object" && Symbol.iterator in V) return $c3384af39265c39a$require$webidl.converters["sequence"](V); - return $c3384af39265c39a$require$webidl.converters.DOMString(V); -}; -// This implements the propsal made in https://github.com/whatwg/websockets/issues/42 -$c3384af39265c39a$require$webidl.converters.WebSocketInit = $c3384af39265c39a$require$webidl.dictionaryConverter([ +const $2ac5d5cfe121f808$var$cacheQueryOptionConverters = [ { - key: "protocols", - converter: $c3384af39265c39a$require$webidl.converters["DOMString or sequence"], - get defaultValue () { - return []; - } + key: 'ignoreSearch', + converter: $2ac5d5cfe121f808$require$webidl.converters.boolean, + defaultValue: ()=>false }, { - key: "dispatcher", - converter: (V)=>V, - get defaultValue () { - return $c3384af39265c39a$require$getGlobalDispatcher(); - } + key: 'ignoreMethod', + converter: $2ac5d5cfe121f808$require$webidl.converters.boolean, + defaultValue: ()=>false }, { - key: "headers", - converter: $c3384af39265c39a$require$webidl.nullableConverter($c3384af39265c39a$require$webidl.converters.HeadersInit) + key: 'ignoreVary', + converter: $2ac5d5cfe121f808$require$webidl.converters.boolean, + defaultValue: ()=>false } -]); -$c3384af39265c39a$require$webidl.converters["DOMString or sequence or WebSocketInit"] = function(V) { - if ($c3384af39265c39a$require$webidl.util.Type(V) === "Object" && !(Symbol.iterator in V)) return $c3384af39265c39a$require$webidl.converters.WebSocketInit(V); - return { - protocols: $c3384af39265c39a$require$webidl.converters["DOMString or sequence"](V) - }; -}; -$c3384af39265c39a$require$webidl.converters.WebSocketSendData = function(V) { - if ($c3384af39265c39a$require$webidl.util.Type(V) === "Object") { - if ($c3384af39265c39a$require$isBlobLike(V)) return $c3384af39265c39a$require$webidl.converters.Blob(V, { - strict: false - }); - if (ArrayBuffer.isView(V) || $c3384af39265c39a$require$types.isAnyArrayBuffer(V)) return $c3384af39265c39a$require$webidl.converters.BufferSource(V); +]; +$2ac5d5cfe121f808$require$webidl.converters.CacheQueryOptions = $2ac5d5cfe121f808$require$webidl.dictionaryConverter($2ac5d5cfe121f808$var$cacheQueryOptionConverters); +$2ac5d5cfe121f808$require$webidl.converters.MultiCacheQueryOptions = $2ac5d5cfe121f808$require$webidl.dictionaryConverter([ + ...$2ac5d5cfe121f808$var$cacheQueryOptionConverters, + { + key: 'cacheName', + converter: $2ac5d5cfe121f808$require$webidl.converters.DOMString } - return $c3384af39265c39a$require$webidl.converters.USVString(V); -}; -module.exports = { - WebSocket: $c3384af39265c39a$var$WebSocket +]); +$2ac5d5cfe121f808$require$webidl.converters.Response = $2ac5d5cfe121f808$require$webidl.interfaceConverter($2ac5d5cfe121f808$require$Response); +$2ac5d5cfe121f808$require$webidl.converters['sequence'] = $2ac5d5cfe121f808$require$webidl.sequenceConverter($2ac5d5cfe121f808$require$webidl.converters.RequestInfo); +$2ac5d5cfe121f808$exports = { + Cache: $2ac5d5cfe121f808$var$Cache }; -}); -parcelRegister("gKxlG", function(module, exports) { -"use strict"; -// This is a Globally Unique Identifier unique used -// to validate that the endpoint accepts websocket -// connections. -// See https://www.rfc-editor.org/rfc/rfc6455.html#section-1.3 -const $c31acf944d74ea56$var$uid = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"; -/** @type {PropertyDescriptor} */ const $c31acf944d74ea56$var$staticPropertyDescriptors = { - enumerable: true, - writable: false, - configurable: false -}; -const $c31acf944d74ea56$var$states = { - CONNECTING: 0, - OPEN: 1, - CLOSING: 2, - CLOSED: 3 -}; -const $c31acf944d74ea56$var$opcodes = { - CONTINUATION: 0x0, - TEXT: 0x1, - BINARY: 0x2, - CLOSE: 0x8, - PING: 0x9, - PONG: 0xA -}; -const $c31acf944d74ea56$var$maxUnsigned16Bit = 2 ** 16 - 1 // 65535 -; -const $c31acf944d74ea56$var$parserStates = { - INFO: 0, - PAYLOADLENGTH_16: 2, - PAYLOADLENGTH_64: 3, - READ_DATA: 4 -}; -const $c31acf944d74ea56$var$emptyBuffer = Buffer.allocUnsafe(0); -module.exports = { - uid: $c31acf944d74ea56$var$uid, - staticPropertyDescriptors: $c31acf944d74ea56$var$staticPropertyDescriptors, - states: $c31acf944d74ea56$var$states, - opcodes: $c31acf944d74ea56$var$opcodes, - maxUnsigned16Bit: $c31acf944d74ea56$var$maxUnsigned16Bit, - parserStates: $c31acf944d74ea56$var$parserStates, - emptyBuffer: $c31acf944d74ea56$var$emptyBuffer -}; -}); +var $c27cd225d456f564$require$Cache = $2ac5d5cfe121f808$exports.Cache; -parcelRegister("eHBZp", function(module, exports) { -"use strict"; -module.exports = { - kWebSocketURL: Symbol("url"), - kReadyState: Symbol("ready state"), - kController: Symbol("controller"), - kResponse: Symbol("response"), - kBinaryType: Symbol("binary type"), - kSentClose: Symbol("sent close"), - kReceivedClose: Symbol("received close"), - kByteParser: Symbol("byte parser") -}; +var $5HTG7 = parcelRequire("5HTG7"); +var $c27cd225d456f564$require$webidl = $5HTG7.webidl; +var $bFRvW = parcelRequire("bFRvW"); +var $c27cd225d456f564$require$kEnumerableProperty = $bFRvW.kEnumerableProperty; +class $c27cd225d456f564$var$CacheStorage { + /** + * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-name-to-cache-map + * @type {Map} + */ async has(cacheName) { + $c27cd225d456f564$require$webidl.brandCheck(this, $c27cd225d456f564$var$CacheStorage); + const prefix = 'CacheStorage.has'; + $c27cd225d456f564$require$webidl.argumentLengthCheck(arguments, 1, prefix); + cacheName = $c27cd225d456f564$require$webidl.converters.DOMString(cacheName, prefix, 'cacheName'); + // 2.1.1 + // 2.2 + return this.#caches.has(cacheName); + } + /** + * @see https://w3c.github.io/ServiceWorker/#dom-cachestorage-open + * @param {string} cacheName + * @returns {Promise} + */ async open(cacheName) { + $c27cd225d456f564$require$webidl.brandCheck(this, $c27cd225d456f564$var$CacheStorage); + const prefix = 'CacheStorage.open'; + $c27cd225d456f564$require$webidl.argumentLengthCheck(arguments, 1, prefix); + cacheName = $c27cd225d456f564$require$webidl.converters.DOMString(cacheName, prefix, 'cacheName'); + // 2.1 + if (this.#caches.has(cacheName)) { + // await caches.open('v1') !== await caches.open('v1') + // 2.1.1 + const cache = this.#caches.get(cacheName); + // 2.1.1.1 + return new $c27cd225d456f564$require$Cache($c27cd225d456f564$require$kConstruct, cache); + } + // 2.2 + const cache = []; + // 2.3 + this.#caches.set(cacheName, cache); + // 2.4 + return new $c27cd225d456f564$require$Cache($c27cd225d456f564$require$kConstruct, cache); + } + /** + * @see https://w3c.github.io/ServiceWorker/#cache-storage-delete + * @param {string} cacheName + * @returns {Promise} + */ async delete(cacheName) { + $c27cd225d456f564$require$webidl.brandCheck(this, $c27cd225d456f564$var$CacheStorage); + const prefix = 'CacheStorage.delete'; + $c27cd225d456f564$require$webidl.argumentLengthCheck(arguments, 1, prefix); + cacheName = $c27cd225d456f564$require$webidl.converters.DOMString(cacheName, prefix, 'cacheName'); + return this.#caches.delete(cacheName); + } + /** + * @see https://w3c.github.io/ServiceWorker/#cache-storage-keys + * @returns {Promise} + */ async keys() { + $c27cd225d456f564$require$webidl.brandCheck(this, $c27cd225d456f564$var$CacheStorage); + // 2.1 + const keys = this.#caches.keys(); + // 2.2 + return [ + ...keys + ]; + } +} +Object.defineProperties($c27cd225d456f564$var$CacheStorage.prototype, { + [Symbol.toStringTag]: { + value: 'CacheStorage', + configurable: true + }, + match: $c27cd225d456f564$require$kEnumerableProperty, + has: $c27cd225d456f564$require$kEnumerableProperty, + open: $c27cd225d456f564$require$kEnumerableProperty, + delete: $c27cd225d456f564$require$kEnumerableProperty, + keys: $c27cd225d456f564$require$kEnumerableProperty }); +$c27cd225d456f564$exports = { + CacheStorage: $c27cd225d456f564$var$CacheStorage +}; -parcelRegister("hdN0j", function(module, exports) { -"use strict"; -var $eHBZp = parcelRequire("eHBZp"); -var $c899a9bb28f4240c$require$kReadyState = $eHBZp.kReadyState; -var $c899a9bb28f4240c$require$kController = $eHBZp.kController; -var $c899a9bb28f4240c$require$kResponse = $eHBZp.kResponse; -var $c899a9bb28f4240c$require$kBinaryType = $eHBZp.kBinaryType; -var $c899a9bb28f4240c$require$kWebSocketURL = $eHBZp.kWebSocketURL; +var $c06c3fa92e0659a8$require$CacheStorage = $c27cd225d456f564$exports.CacheStorage; -var $gKxlG = parcelRequire("gKxlG"); -var $c899a9bb28f4240c$require$states = $gKxlG.states; -var $c899a9bb28f4240c$require$opcodes = $gKxlG.opcodes; +var $c06c3fa92e0659a8$require$kConstruct = $1368b1cf184fb36f$exports.kConstruct; +$c06c3fa92e0659a8$export$50ac77867c9f1e40 = new $c06c3fa92e0659a8$require$CacheStorage($c06c3fa92e0659a8$require$kConstruct); +var $8fe9dec0a26c5099$exports = {}; +'use strict'; +var $6cf75b465db5ee07$exports = {}; +'use strict'; +var $de828d7235d36331$exports = {}; +'use strict'; +// https://wicg.github.io/cookie-store/#cookie-maximum-attribute-value-size +const $de828d7235d36331$var$maxAttributeValueSize = 1024; +// https://wicg.github.io/cookie-store/#cookie-maximum-name-value-pair-size +const $de828d7235d36331$var$maxNameValuePairSize = 4096; +$de828d7235d36331$exports = { + maxAttributeValueSize: $de828d7235d36331$var$maxAttributeValueSize, + maxNameValuePairSize: $de828d7235d36331$var$maxNameValuePairSize +}; -var $5ljG7 = parcelRequire("5ljG7"); -var $c899a9bb28f4240c$require$MessageEvent = $5ljG7.MessageEvent; -var $c899a9bb28f4240c$require$ErrorEvent = $5ljG7.ErrorEvent; -/* globals Blob */ /** - * @param {import('./websocket').WebSocket} ws - */ function $c899a9bb28f4240c$var$isEstablished(ws) { - // If the server's response is validated as provided for above, it is - // said that _The WebSocket Connection is Established_ and that the - // WebSocket Connection is in the OPEN state. - return ws[$c899a9bb28f4240c$require$kReadyState] === $c899a9bb28f4240c$require$states.OPEN; + +var $6cf75b465db5ee07$require$maxNameValuePairSize = $de828d7235d36331$exports.maxNameValuePairSize; +var $6cf75b465db5ee07$require$maxAttributeValueSize = $de828d7235d36331$exports.maxAttributeValueSize; +var $1cd972fe10b993d3$exports = {}; +'use strict'; +/** + * @param {string} value + * @returns {boolean} + */ function $1cd972fe10b993d3$var$isCTLExcludingHtab(value) { + for(let i = 0; i < value.length; ++i){ + const code = value.charCodeAt(i); + if (code >= 0x00 && code <= 0x08 || code >= 0x0A && code <= 0x1F || code === 0x7F) return true; + } + return false; } /** - * @param {import('./websocket').WebSocket} ws - */ function $c899a9bb28f4240c$var$isClosing(ws) { - // Upon either sending or receiving a Close control frame, it is said - // that _The WebSocket Closing Handshake is Started_ and that the - // WebSocket connection is in the CLOSING state. - return ws[$c899a9bb28f4240c$require$kReadyState] === $c899a9bb28f4240c$require$states.CLOSING; + CHAR = + token = 1* + separators = "(" | ")" | "<" | ">" | "@" + | "," | ";" | ":" | "\" | <"> + | "/" | "[" | "]" | "?" | "=" + | "{" | "}" | SP | HT + * @param {string} name + */ function $1cd972fe10b993d3$var$validateCookieName(name) { + for(let i = 0; i < name.length; ++i){ + const code = name.charCodeAt(i); + if (code < 0x21 || // exclude CTLs (0-31), SP and HT + code > 0x7E || // exclude non-ascii and DEL + code === 0x22 || // " + code === 0x28 || // ( + code === 0x29 || // ) + code === 0x3C || // < + code === 0x3E || // > + code === 0x40 || // @ + code === 0x2C || // , + code === 0x3B || // ; + code === 0x3A || // : + code === 0x5C || // \ + code === 0x2F || // / + code === 0x5B || // [ + code === 0x5D || // ] + code === 0x3F || // ? + code === 0x3D || // = + code === 0x7B || // { + code === 0x7D // } + ) throw new Error('Invalid cookie name'); + } } /** - * @param {import('./websocket').WebSocket} ws - */ function $c899a9bb28f4240c$var$isClosed(ws) { - return ws[$c899a9bb28f4240c$require$kReadyState] === $c899a9bb28f4240c$require$states.CLOSED; + cookie-value = *cookie-octet / ( DQUOTE *cookie-octet DQUOTE ) + cookie-octet = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E + ; US-ASCII characters excluding CTLs, + ; whitespace DQUOTE, comma, semicolon, + ; and backslash + * @param {string} value + */ function $1cd972fe10b993d3$var$validateCookieValue(value) { + let len = value.length; + let i = 0; + // if the value is wrapped in DQUOTE + if (value[0] === '"') { + if (len === 1 || value[len - 1] !== '"') throw new Error('Invalid cookie value'); + --len; + ++i; + } + while(i < len){ + const code = value.charCodeAt(i++); + if (code < 0x21 || // exclude CTLs (0-31) + code > 0x7E || // non-ascii and DEL (127) + code === 0x22 || // " + code === 0x2C || // , + code === 0x3B || // ; + code === 0x5C // \ + ) throw new Error('Invalid cookie value'); + } } /** - * @see https://dom.spec.whatwg.org/#concept-event-fire - * @param {string} e - * @param {EventTarget} target - * @param {EventInit | undefined} eventInitDict - */ function $c899a9bb28f4240c$var$fireEvent(e, target, eventConstructor = Event, eventInitDict) { - // 1. If eventConstructor is not given, then let eventConstructor be Event. - // 2. Let event be the result of creating an event given eventConstructor, - // in the relevant realm of target. - // 3. Initialize event’s type attribute to e. - const event = new eventConstructor(e, eventInitDict) // eslint-disable-line new-cap + * path-value = + * @param {string} path + */ function $1cd972fe10b993d3$var$validateCookiePath(path) { + for(let i = 0; i < path.length; ++i){ + const code = path.charCodeAt(i); + if (code < 0x20 || // exclude CTLs (0-31) + code > 0x7E || // exclude DEL and non-ascii + code === 0x3B // ; + ) throw new Error('Invalid cookie path'); + } +} +/** + * ::= | + * + * ::= any one of the 52 alphabetic characters A through Z in + * upper case and a through z in lower case + * + * ::= any one of the ten digits 0 through 9r + * + * @see https://www.rfc-editor.org/rfc/rfc1034#section-3.5 + * @param {number} code + */ function $1cd972fe10b993d3$var$isLetterOrDigit(code) { + return code >= 0x30 && code <= 0x39 || // 0-9 + code >= 0x41 && code <= 0x5A || // A-Z + code >= 0x61 && code <= 0x7A // a-z ; - // 4. Initialize any other IDL attributes of event as described in the - // invocation of this algorithm. - // 5. Return the result of dispatching event at target, with legacy target - // override flag set if set. - target.dispatchEvent(event); } /** - * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol - * @param {import('./websocket').WebSocket} ws - * @param {number} type Opcode - * @param {Buffer} data application data - */ function $c899a9bb28f4240c$var$websocketMessageReceived(ws, type, data) { - // 1. If ready state is not OPEN (1), then return. - if (ws[$c899a9bb28f4240c$require$kReadyState] !== $c899a9bb28f4240c$require$states.OPEN) return; - // 2. Let dataForEvent be determined by switching on type and binary type: - let dataForEvent; - if (type === $c899a9bb28f4240c$require$opcodes.TEXT) // -> type indicates that the data is Text - // a new DOMString containing data - try { - dataForEvent = new TextDecoder("utf-8", { - fatal: true - }).decode(data); - } catch { - $c899a9bb28f4240c$var$failWebsocketConnection(ws, "Received invalid UTF-8 in text frame."); - return; - } - else if (type === $c899a9bb28f4240c$require$opcodes.BINARY) { - if (ws[$c899a9bb28f4240c$require$kBinaryType] === "blob") // -> type indicates that the data is Binary and binary type is "blob" - // a new Blob object, created in the relevant Realm of the WebSocket - // object, that represents data as its raw data - dataForEvent = new Blob([ - data - ]); - else // -> type indicates that the data is Binary and binary type is "arraybuffer" - // a new ArrayBuffer object, created in the relevant Realm of the - // WebSocket object, whose contents are data - dataForEvent = new Uint8Array(data).buffer; + * Validates a cookie domain against the "preferred name syntax". + * + * ::= | " " + * ::=